* { box-sizing: border-box; }

.no-badge { color: #2563eb; }

.search-box {
    width: 100%;
    padding: 10px;
    font-size: 1rem;
    border: 1px solid #c7ccd1;
    border-radius: 6px;
    margin-bottom: 14px;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
    background: #fff;
    padding: 14px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 14px;
}

.filter-bar .search-box {
    flex: 1 1 220px;
    margin-bottom: 0;
}

.filter-date {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.85rem;
    color: #444;
}

.filter-date input {
    padding: 9px 10px;
    border: 1px solid #c7ccd1;
    border-radius: 6px;
    font-size: 0.95rem;
}

body {
    margin: 0;
    font-family: -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    background: #f2f4f7;
    color: #1c2733;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-footer {
    margin-top: auto;
    background: #1c2733;
    color: #cbd3db;
    padding: 20px 16px;
}

.site-footer-inner {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-links a {
    color: #cbd3db;
    text-decoration: none;
    font-size: 0.85rem;
}

.footer-links a:hover { color: #fff; text-decoration: underline; }

.footer-copy {
    font-size: 0.8rem;
    margin: 0;
    color: #8a95a1;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 16px;
    flex: 1 0 auto;
    width: 100%;
}

.topbar {
    background: #1c2733;
    color: #fff;
    padding: 12px 16px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.topbar a {
    color: #fff;
    text-decoration: none;
    margin-right: 12px;
    font-size: 0.95rem;
}

.topbar a:hover { text-decoration: underline; }

.topbar a.brand {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: 0;
}
.topbar a.brand img { display: block; border-radius: 6px; }

.topbar .spacer { flex: 1; }

h1 { font-size: 1.4rem; }
h2 { font-size: 1.15rem; }

form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #fff;
    padding: 16px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

form fieldset {
    border: 1px solid #dfe3e8;
    border-radius: 6px;
    padding: 12px;
}

form legend {
    font-weight: 600;
    padding: 0 6px;
}

.field-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.9rem;
}

input, select, textarea {
    padding: 10px;
    font-size: 1rem;
    border: 1px solid #c7ccd1;
    border-radius: 6px;
    width: 100%;
}

button, .btn {
    padding: 12px 16px;
    font-size: 1rem;
    border: none;
    border-radius: 6px;
    background: #2563eb;
    color: #fff;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    display: inline-block;
}

button:hover, .btn:hover { background: #1d4ed8; }

.btn.secondary { background: #6b7280; }
.btn.secondary:hover { background: #4b5563; }
.btn.danger { background: #dc2626; }
.btn.danger:hover { background: #b91c1c; }

.whatsapp-btn {
    background: #25d366;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
}
.whatsapp-btn:hover { background: #1eb857; }

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

th, td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #eef0f2;
    font-size: 0.9rem;
}

th { background: #eef1f5; }

.card {
    background: #fff;
    padding: 16px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 16px;
}

.error {
    background: #fde8e8;
    color: #9b1c1c;
    padding: 10px;
    border-radius: 6px;
}

.success {
    background: #e6f8ec;
    color: #1a7f42;
    padding: 10px;
    border-radius: 6px;
}

.drawing-preview img {
    max-width: 100%;
    height: auto;
    display: block;
    margin-bottom: 10px;
    border: 1px solid #dfe3e8;
    border-radius: 6px;
}

.container.wide {
    max-width: 1300px;
}

.drawing-scroll {
    overflow-x: auto;
    background: #fafbfc;
    border: 1px solid #dfe3e8;
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 20px;
}

.drawing-scroll img {
    display: block;
    max-width: none;
    height: auto;
}

.thumb {
    max-width: 100%;
    width: 220px;
    height: auto;
    border: 1px solid #dfe3e8;
    border-radius: 6px;
}

.table-scroll {
    overflow-x: auto;
}

.actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

/* Küçük tekli-buton formları (örn. Arşivle) .actions içindeki diğer
   butonlarla aynı görünsün; genel "form" kart stilini burada iptal et. */
.actions form {
    display: contents;
}

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.75rem;
}

.badge.active { background: #e6f8ec; color: #1a7f42; }
.badge.inactive { background: #fde8e8; color: #9b1c1c; }
.badge.admin { background: #eef0ff; color: #3b3fc7; }

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.stat-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2563eb;
}

.stat-label {
    font-size: 0.85rem;
    color: #667085;
}

@media (min-width: 640px) {
    .field-grid {
        grid-template-columns: 1fr 1fr;
    }
    .field-grid.cam-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
