:root {
    --sidebar: #1f2937;
    --sidebar-text: #e5e7eb;
    --accent: #9c6b3c;
    --border: #e5e7eb;
    --bg: #f3f4f6;
}

* { box-sizing: border-box; }
body.admin-body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: var(--bg);
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: 100vh;
}
.sidebar {
    background: var(--sidebar);
    color: var(--sidebar-text);
    padding: 1.5rem 1rem;
}
.sidebar-brand {
    font-weight: bold;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}
.sidebar nav { display: grid; gap: 0.4rem; }
.sidebar a {
    color: var(--sidebar-text);
    text-decoration: none;
    padding: 0.6rem 0.8rem;
    border-radius: 8px;
}
.sidebar a:hover { background: rgba(255,255,255,0.08); }

.admin-main { padding: 1.5rem 2rem; }
.admin-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}
.panel {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
}
.panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}
table {
    width: 100%;
    border-collapse: collapse;
}
th, td {
    text-align: left;
    padding: 0.75rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.stat-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.2rem;
}
.stat-card span { display: block; color: #6b7280; font-size: 0.9rem; }
.stat-card strong { font-size: 1.8rem; }

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.form-grid label { display: grid; gap: 0.35rem; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid input, .form-grid textarea, .form-grid select {
    padding: 0.65rem;
    border: 1px solid var(--border);
    border-radius: 8px;
}
.checkbox { display: flex !important; align-items: center; gap: 0.5rem; }
.settings-section {
    border-bottom: 1px solid var(--border);
    padding-bottom: 1.25rem;
    margin-bottom: 1.25rem;
}
.settings-section:last-of-type { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.settings-section h3 {
    margin: 0 0 1rem 0;
    font-size: 1rem;
    color: #374151;
    grid-column: 1 / -1;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 0.4rem;
    display: inline-block;
}

.btn {
    display: inline-block;
    padding: 0.65rem 1rem;
    border: none;
    border-radius: 8px;
    background: var(--accent);
    color: #fff;
    cursor: pointer;
    text-decoration: none;
}
.link-btn {
    background: none;
    border: none;
    color: #b42318;
    cursor: pointer;
    padding: 0;
}
.actions { display: flex; gap: 0.75rem; align-items: center; }
.badge {
    background: #eef2ff;
    color: #3730a3;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    font-size: 0.85rem;
}
.alert {
    padding: 0.85rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}
.alert-success { background: #e7f8ef; color: #1f7a4d; }
.alert-error { background: #fdecec; color: #b42318; }

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    font-family: 'Segoe UI', Arial, sans-serif;
}
.login-card {
    width: min(400px, 92%);
    background: #fff;
    padding: 2.5rem 2rem;
    border-radius: 16px;
    display: grid;
    gap: 1.25rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.login-brand {
    text-align: center;
    margin-bottom: 0.5rem;
}
.login-icon {
    width: 56px;
    height: 56px;
    background: var(--accent);
    color: #fff;
    font-size: 1.5rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    margin: 0 auto 0.75rem;
    box-shadow: 0 4px 12px rgba(156,107,60,0.3);
}
.login-brand h1 {
    margin: 0;
    font-size: 1.5rem;
    color: #111827;
    font-weight: 700;
}
.login-sub {
    margin: 0.25rem 0 0;
    color: #6b7280;
    font-size: 0.9rem;
}
.login-field {
    display: grid;
    gap: 0.35rem;
}
.login-field label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
}
.login-field input {
    width: 100%;
    padding: 0.75rem 0.9rem;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}
.login-field input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(156,107,60,0.15);
}
.login-field input::placeholder {
    color: #9ca3af;
}
.login-btn {
    width: 100%;
    padding: 0.8rem;
    border: none;
    border-radius: 10px;
    background: var(--accent);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}
.login-btn:hover {
    background: #8a5c30;
}
.login-btn:active {
    transform: scale(0.98);
}
.login-footer {
    text-align: center;
    margin: 0;
    font-size: 0.85rem;
}
.login-footer a {
    color: var(--accent);
    text-decoration: none;
}
.login-footer a:hover {
    text-decoration: underline;
}

.totals { margin: 1rem 0; }
.totals .total { font-size: 1.2rem; font-weight: bold; }

@media (max-width: 900px) {
    body.admin-body { grid-template-columns: 1fr; }
    .sidebar nav { grid-template-columns: repeat(2, 1fr); }
    .stats-grid, .form-grid { grid-template-columns: 1fr; }
}
