:root {
    --accent: #e85d04;
    --accent-hover: #d00000;
    --sidebar-width: 260px;
    --sidebar-collapsed: 72px;
    --topbar-height: 56px;
    --bg-page: #f4f4f5;
    --border: #e4e4e7;
    --text-muted: #71717a;
}

* { box-sizing: border-box; }

body {
    font-family: 'Source Sans 3', system-ui, sans-serif;
    background: var(--bg-page);
    color: #18181b;
    margin: 0;
}

.btn-accent {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.btn-accent:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    color: #fff;
}

.bg-accent-subtle { background: #fff4ed; }
.text-accent { color: var(--accent) !important; }

/* Auth */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
}
.auth-card {
    width: 100%;
    max-width: 400px;
    padding: 2rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 24px rgba(0,0,0,.08);
    border: 1px solid var(--border);
}
.auth-logo {
    width: 56px;
    height: 56px;
    margin: 0 auto 1rem;
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    font-size: 1.5rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Admin layout */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: var(--sidebar-width);
    background: #fff;
    border-right: 1px solid var(--border);
    flex-shrink: 0;
    transition: width .2s ease;
    overflow: hidden;
}

.admin-wrapper.sidebar-collapsed .admin-sidebar {
    width: var(--sidebar-collapsed);
}

.admin-wrapper.sidebar-collapsed .brand-text,
.admin-wrapper.sidebar-collapsed .nav-link span,
.admin-wrapper.sidebar-collapsed .nav-group-label {
    display: none;
}

.sidebar-brand {
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    padding: 0 1rem;
    gap: .75rem;
    border-bottom: 1px solid var(--border);
    font-weight: 700;
    font-size: .95rem;
}

.brand-icon {
    width: 36px;
    height: 36px;
    background: var(--accent);
    color: #fff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sidebar-nav {
    padding: .75rem 0;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .55rem 1rem;
    color: #3f3f46;
    text-decoration: none;
    font-size: .9rem;
    border-left: 3px solid transparent;
}

.sidebar-nav .nav-link:hover {
    background: #fafafa;
    color: #18181b;
}

.sidebar-nav .nav-link.active {
    background: #fff7ed;
    color: var(--accent);
    border-left-color: var(--accent);
    font-weight: 600;
}

.sidebar-nav .nav-link.disabled {
    opacity: .5;
    cursor: not-allowed;
}

.nav-group-label {
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-muted);
    padding: .75rem 1rem .25rem;
}

.admin-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.admin-topbar {
    height: var(--topbar-height);
    background: #232f3e;
    color: #fff;
    display: flex;
    align-items: center;
    padding: 0 1rem;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.admin-topbar .sidebar-toggle {
    color: #fff;
    text-decoration: none;
    font-size: 1.25rem;
    padding: .25rem .5rem;
}

.topbar-search {
    position: relative;
    flex: 1;
    max-width: 480px;
}

.topbar-search i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    z-index: 1;
}

.topbar-search .form-control {
    padding-left: 2.25rem;
    background: #37475a;
    border: 1px solid #546178;
    color: #fff;
    font-size: .875rem;
}

.topbar-search .form-control::placeholder { color: #94a3b8; }
.topbar-search .form-control:focus {
    background: #fff;
    color: #18181b;
    border-color: var(--accent);
    box-shadow: none;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 4px;
    margin-top: 4px;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
    max-height: 280px;
    overflow-y: auto;
}

.search-results a {
    display: block;
    padding: .5rem 1rem;
    color: #18181b;
    text-decoration: none;
    font-size: .875rem;
}

.search-results a:hover { background: #f4f4f5; }

.admin-content {
    padding: 1.5rem 2rem;
    flex: 1;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

/* Dashboard cards */
.stat-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem;
    height: 100%;
}

.stat-card-accent { border-left: 4px solid var(--accent); }
.stat-card-primary { border-left: 4px solid #2563eb; }
.stat-card-success { border-left: 4px solid #16a34a; }

.stat-label {
    font-size: .8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .03em;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    margin-top: .25rem;
}

@media (max-width: 768px) {
    .admin-sidebar { position: fixed; z-index: 200; height: 100%; transform: translateX(-100%); }
    .admin-wrapper.sidebar-open .admin-sidebar { transform: translateX(0); }
    .admin-content { padding: 1rem; }
}
