/* =============================================
   TechCadd CMS - Professional Admin Dashboard
   Clean, Modern, Pixel-Perfect UI
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

/* ---------- Design Tokens ---------- */
:root {
    --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --sidebar-w: 260px;
    --header-h: 60px;

    /* Colors */
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: #eef2ff;
    --primary-border: #c7d2fe;

    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;

    --green: #059669;
    --green-light: #d1fae5;
    --red: #dc2626;
    --red-light: #fee2e2;
    --amber: #d97706;
    --amber-light: #fef3c7;
    --cyan: #0891b2;
    --cyan-light: #cffafe;
    --violet: #7c3aed;
    --violet-light: #ede9fe;
    --rose: #e11d48;
    --rose-light: #ffe4e6;
    --blue: #2563eb;
    --blue-light: #dbeafe;

    --bg: #f1f5f9;
    --surface: #ffffff;
    --border: #e2e8f0;
    --text: #0f172a;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;

    --radius: 10px;
    --radius-sm: 6px;
    --radius-lg: 14px;
    --shadow-xs: 0 1px 2px rgba(0,0,0,.05);
    --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    --shadow: 0 4px 6px -1px rgba(0,0,0,.07), 0 2px 4px -2px rgba(0,0,0,.05);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.08), 0 4px 6px -4px rgba(0,0,0,.04);
    --transition: .15s ease;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; }
img { max-width: 100%; }

/* Scrollbar */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }

/* ===================================================
   SIDEBAR
   =================================================== */
.admin-sidebar {
    width: var(--sidebar-w);
    height: 100vh;
    position: fixed;
    top: 0; left: 0;
    z-index: 1040;
    background: var(--gray-900);
    display: flex;
    flex-direction: column;
    transition: transform .25s cubic-bezier(.4,0,.2,1);
    overflow: hidden;
}

/* Brand */
.sidebar-brand {
    height: var(--header-h);
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255,255,255,.06);
    flex-shrink: 0;
}
.sidebar-brand-icon {
    width: 34px; height: 34px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 8px;
    display: grid; place-items: center;
    font-size: 14px; font-weight: 800; color: #fff;
    flex-shrink: 0;
}
.sidebar-brand-text {
    font-size: 16px; font-weight: 700; color: #fff;
    letter-spacing: -.02em; line-height: 1.15;
}
.sidebar-brand-text small {
    display: block;
    font-size: 10px; font-weight: 400; color: var(--gray-500);
    letter-spacing: .04em; text-transform: uppercase; margin-top: 1px;
}

/* Nav */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px;
}
.sidebar-section {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--gray-600);
    padding: 16px 12px 6px;
    font-weight: 600;
}

.admin-sidebar .nav-link {
    color: var(--gray-400);
    font-size: 13px; font-weight: 500;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    display: flex; align-items: center; gap: 10px;
    transition: all var(--transition);
    margin-bottom: 1px;
    border: 1px solid transparent;
}
.admin-sidebar .nav-link i {
    width: 18px; text-align: center;
    font-size: 14px; opacity: .6;
    transition: opacity var(--transition);
    flex-shrink: 0;
}
.admin-sidebar .nav-link:hover {
    color: var(--gray-200);
    background: rgba(255,255,255,.06);
}
.admin-sidebar .nav-link:hover i { opacity: 1; }

.admin-sidebar .nav-link.active {
    color: #fff;
    background: rgba(99,102,241,.2);
    border-color: rgba(99,102,241,.25);
}
.admin-sidebar .nav-link.active i { color: #a5b4fc; opacity: 1; }

/* Logout */
.admin-sidebar .nav-link.logout-link { color: #fca5a5 !important; margin-top: 4px; }
.admin-sidebar .nav-link.logout-link:hover { background: rgba(239,68,68,.12) !important; }

/* Group / Accordion */
.admin-group { margin-bottom: 1px; }
.admin-group .group-header { display: flex; align-items: center; }
.admin-group .group-header .nav-link { flex: 1; }

.admin-toggle {
    background: none; border: none;
    color: var(--gray-600); padding: 4px 8px;
    cursor: pointer; font-size: 10px;
    border-radius: 4px; line-height: 1;
    transition: all var(--transition);
}
.admin-toggle:hover { color: var(--gray-400); background: rgba(255,255,255,.04); }
.admin-group.open .admin-toggle { transform: rotate(180deg); color: #818cf8; }

.admin-subnav { max-height: 0; overflow: hidden; transition: max-height .25s ease; }
.admin-group.open .admin-subnav { max-height: 400px; }

.sidebar-sub .nav-link {
    font-size: 12.5px;
    padding: 6px 12px 6px 40px;
    color: var(--gray-500);
    position: relative;
}
.sidebar-sub .nav-link::before {
    content: '';
    width: 4px; height: 4px;
    background: var(--gray-600);
    border-radius: 50%;
    position: absolute; left: 26px; top: 50%;
    transform: translateY(-50%);
    transition: all var(--transition);
}
.sidebar-sub .nav-link:hover::before,
.sidebar-sub .nav-link.active::before {
    background: #818cf8;
    box-shadow: 0 0 0 3px rgba(129,140,248,.15);
}
.sidebar-sub .nav-link:hover { color: var(--gray-300); background: rgba(255,255,255,.03); }


/* ===================================================
   MAIN AREA
   =================================================== */
.admin-main {
    margin-left: var(--sidebar-w);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left .25s cubic-bezier(.4,0,.2,1);
}

/* ===================================================
   HEADER
   =================================================== */
.admin-header {
    height: var(--header-h);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    position: sticky; top: 0; z-index: 1020;
}

.header-left { display: flex; align-items: center; gap: 12px; }

.mobile-toggle {
    display: none;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    width: 36px; height: 36px;
    border-radius: var(--radius-sm);
    cursor: pointer; font-size: 15px;
    align-items: center; justify-content: center;
    transition: all var(--transition);
}
.mobile-toggle:hover { background: var(--gray-50); }

/* Breadcrumb */
.header-breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-secondary); }
.header-breadcrumb a { color: var(--text-muted); transition: color var(--transition); }
.header-breadcrumb a:hover { color: var(--primary); }
.header-breadcrumb .separator { color: var(--gray-300); font-size: 9px; }
.header-breadcrumb .current { color: var(--text); font-weight: 600; }

/* Search */
.header-right { display: flex; align-items: center; gap: 10px; }
.header-search { position: relative; }
.header-search input {
    width: 220px;
    padding: 7px 12px 7px 34px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    background: var(--gray-50);
    color: var(--text);
    transition: all var(--transition);
    outline: none;
    font-family: var(--font);
}
.header-search input:focus {
    border-color: var(--primary-border);
    box-shadow: 0 0 0 3px rgba(79,70,229,.08);
    background: #fff;
    width: 260px;
}
.header-search input::placeholder { color: var(--text-muted); }
.header-search i {
    position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
    color: var(--text-muted); font-size: 12px;
}

/* Profile */
.header-profile {
    display: flex; align-items: center; gap: 8px;
    padding: 4px 12px 4px 4px;
    border-radius: 20px;
    background: var(--gray-50);
    border: 1px solid var(--border);
}
.header-avatar {
    width: 30px; height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    display: grid; place-items: center;
    color: #fff; font-size: 12px; font-weight: 700;
}
.header-profile-name { font-size: 12.5px; font-weight: 600; color: var(--text); line-height: 1.2; }
.header-profile-role { font-size: 10.5px; color: var(--text-muted); line-height: 1; }

/* ===================================================
   CONTENT AREA
   =================================================== */
.admin-content { padding: 24px; flex: 1; }

/* ===================================================
   WELCOME BANNER
   =================================================== */
.welcome-banner {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #6366f1 100%);
    border-radius: var(--radius-lg);
    padding: 28px 32px;
    color: #fff;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}
.welcome-banner::before {
    content: '';
    position: absolute;
    right: -30px; top: -30px;
    width: 160px; height: 160px;
    background: rgba(255,255,255,.07);
    border-radius: 50%;
}
.welcome-banner::after {
    content: '';
    position: absolute;
    right: 80px; bottom: -50px;
    width: 100px; height: 100px;
    background: rgba(255,255,255,.04);
    border-radius: 50%;
}
.welcome-banner h2 {
    font-size: 20px; font-weight: 700;
    margin: 0 0 4px; position: relative; z-index: 1;
}
.welcome-banner p {
    font-size: 13px; color: rgba(255,255,255,.7);
    margin: 0; position: relative; z-index: 1;
}

/* ===================================================
   TODAY'S ACTIVITY CARD
   =================================================== */
.today-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.today-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
    background: var(--gray-50);
}
.today-card-date {
    display: flex;
    align-items: center;
    gap: 12px;
}
.today-card-date > i {
    font-size: 20px;
    color: var(--primary);
    width: 40px; height: 40px;
    background: var(--primary-light);
    border-radius: var(--radius-sm);
    display: grid; place-items: center;
}
.today-card-day {
    font-size: 15px; font-weight: 700;
    color: var(--text); line-height: 1.2;
}
.today-card-full {
    font-size: 12px; color: var(--text-secondary);
    font-weight: 500;
}
.today-card-total {
    text-align: right;
    display: flex; align-items: baseline; gap: 6px;
}
.today-total-number {
    font-size: 28px; font-weight: 800;
    color: var(--primary); line-height: 1;
    letter-spacing: -.02em;
}
.today-total-label {
    font-size: 12px; font-weight: 500;
    color: var(--text-secondary);
}
.today-card-body {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    padding: 0;
}
.today-item {
    padding: 18px 10px;
    text-align: center;
    border-right: 1px solid var(--gray-100);
    transition: background var(--transition);
}
.today-item:last-child { border-right: none; }
.today-item:hover { background: var(--gray-50); }
.today-item-icon {
    width: 36px; height: 36px;
    border-radius: 8px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 15px;
    margin-bottom: 8px;
}
.today-item-icon.blue    { background: var(--blue-light);    color: var(--blue); }
.today-item-icon.emerald { background: var(--green-light);   color: var(--green); }
.today-item-icon.indigo  { background: var(--primary-light); color: var(--primary); }
.today-item-icon.cyan    { background: var(--cyan-light);    color: var(--cyan); }
.today-item-icon.amber   { background: var(--amber-light);   color: var(--amber); }
.today-item-icon.violet  { background: var(--violet-light);  color: var(--violet); }
.today-item-icon.rose    { background: var(--rose-light);    color: var(--rose); }
.today-item-count {
    font-size: 22px; font-weight: 800;
    color: var(--text); line-height: 1;
    margin-bottom: 3px; letter-spacing: -.02em;
}
.today-item-label {
    font-size: 11px; font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: .03em;
}

/* ===================================================
   STAT CARDS
   =================================================== */
.stat-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 20px;
    border: 1px solid var(--border);
    transition: all .2s ease;
    position: relative;
}
.stat-card:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow);
    border-color: var(--gray-300);
}
.stat-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 14px;
}
.stat-card-icon {
    width: 42px; height: 42px;
    border-radius: 10px;
    display: grid; place-items: center;
    font-size: 18px;
}
.stat-card-icon.blue    { background: var(--blue-light);   color: var(--blue); }
.stat-card-icon.emerald { background: var(--green-light);  color: var(--green); }
.stat-card-icon.amber   { background: var(--amber-light);  color: var(--amber); }
.stat-card-icon.cyan    { background: var(--cyan-light);   color: var(--cyan); }
.stat-card-icon.rose    { background: var(--rose-light);   color: var(--rose); }
.stat-card-icon.indigo  { background: var(--primary-light);color: var(--primary); }
.stat-card-icon.violet  { background: var(--violet-light); color: var(--violet); }

.stat-card-badge {
    font-size: 10.5px; font-weight: 600;
    padding: 2px 8px; border-radius: 12px;
}
.stat-card-value {
    font-size: 28px; font-weight: 800;
    color: var(--text); line-height: 1;
    margin-bottom: 4px; letter-spacing: -.02em;
}
.stat-card-label {
    font-size: 12.5px; font-weight: 500;
    color: var(--text-secondary); margin-bottom: 10px;
}
.stat-card-link {
    font-size: 12.5px; font-weight: 600;
    color: var(--primary);
    display: inline-flex; align-items: center; gap: 4px;
    transition: all var(--transition);
}
.stat-card-link:hover { color: var(--primary-hover); gap: 6px; }
.stat-card-subtext { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* Highlight Card */
.stat-card.highlight {
    background: linear-gradient(135deg, #4f46e5 0%, #6d28d9 100%);
    border-color: transparent; color: #fff;
}
.stat-card.highlight .stat-card-value { color: #fff; }
.stat-card.highlight .stat-card-label { color: #c7d2fe; }
.stat-card.highlight .stat-card-link { color: #e0e7ff; }
.stat-card.highlight .stat-card-link:hover { color: #fff; }
.stat-card.highlight .stat-card-icon { background: rgba(255,255,255,.15); color: #fff; }
.stat-card.highlight .stat-card-badge { background: rgba(255,255,255,.2); color: #fff; }
.stat-card.highlight .stat-card-subtext { color: #c7d2fe; }

/* ===================================================
   QUICK ACTIONS
   =================================================== */
.quick-actions-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}
.quick-actions-title {
    font-size: 14px; font-weight: 700;
    color: var(--text); margin-bottom: 14px;
    display: flex; align-items: center; gap: 8px;
}
.quick-actions-title i { color: var(--primary); font-size: 13px; }

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.quick-action {
    padding: 14px 10px;
    background: var(--gray-50);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-weight: 600; font-size: 12px;
    color: var(--text-secondary);
    text-align: center;
    transition: all .2s ease;
    display: flex; flex-direction: column;
    align-items: center; gap: 6px;
}
.quick-action i { font-size: 18px; color: var(--primary); transition: transform .2s ease; }
.quick-action:hover {
    background: var(--primary-light);
    border-color: var(--primary-border);
    color: var(--primary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-xs);
}
.quick-action:hover i { transform: scale(1.1); }

/* ===================================================
   RECENT ITEMS
   =================================================== */
.recent-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.recent-card-header {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center;
    justify-content: space-between;
}
.recent-card-header h3 {
    font-size: 14px; font-weight: 700;
    margin: 0; display: flex;
    align-items: center; gap: 8px;
}
.recent-card-header h3 i { color: var(--primary); font-size: 13px; }
.recent-card-body { padding: 0; }

.recent-item {
    padding: 10px 18px;
    display: flex; align-items: center; gap: 12px;
    border-bottom: 1px solid var(--gray-100);
    transition: background var(--transition);
}
.recent-item:last-child { border-bottom: none; }
.recent-item:hover { background: var(--gray-50); }

.recent-item-icon {
    width: 32px; height: 32px;
    border-radius: 7px;
    display: grid; place-items: center;
    font-size: 13px; flex-shrink: 0;
}
.recent-item-info { flex: 1; min-width: 0; }
.recent-item-title {
    font-size: 13px; font-weight: 600;
    color: var(--text);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.recent-item-meta { font-size: 11px; color: var(--text-muted); }

/* ===================================================
   MODULE SECTION (cms-module.php)
   =================================================== */
.cms-module .module-title {
    font-size: 20px; font-weight: 700;
    color: var(--text); margin-bottom: 20px;
    display: flex; align-items: center; gap: 10px;
}

/* Nav Pills */
.cms-module .nav-pills { margin-bottom: 20px; gap: 4px; }
.cms-module .nav-pills .nav-link {
    font-size: 12.5px; font-weight: 600;
    padding: 7px 18px; border-radius: var(--radius-sm);
    color: var(--text-secondary);
    transition: all var(--transition);
    border: 1px solid transparent;
}
.cms-module .nav-pills .nav-link:hover {
    background: var(--primary-light);
    color: var(--primary);
}
.cms-module .nav-pills .nav-link.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* CMS Grid (form + SEO sidebar) */
.cms-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 20px;
    align-items: start;
}
.cms-grid > aside {
    position: sticky;
    top: calc(var(--header-h) + 16px);
}

/* ===================================================
   TABLES
   =================================================== */
.cms-table, .table {
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    font-size: 13px;
}
.cms-table thead th, .table thead th {
    background: var(--gray-50);
    font-weight: 600; font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-secondary);
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.cms-table tbody td, .table tbody td {
    padding: 10px 14px;
    vertical-align: middle;
    border-bottom: 1px solid var(--gray-100);
    color: var(--text);
}
.cms-table tbody tr:last-child td, .table tbody tr:last-child td { border-bottom: none; }
.cms-table tbody tr:hover td, .table tbody tr:hover td { background: var(--gray-50); }

/* ===================================================
   FORMS
   =================================================== */
.cms-form {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
}
.form-label {
    font-size: 12.5px; font-weight: 600;
    color: var(--text); margin-bottom: 5px;
}
.form-control, .form-select {
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    font-size: 13px; padding: 8px 12px;
    transition: all var(--transition);
    color: var(--text);
    font-family: var(--font);
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary-border);
    box-shadow: 0 0 0 3px rgba(79,70,229,.08);
}
.form-control::placeholder { color: var(--text-muted); font-size: 12.5px; }

/* ===================================================
   CARDS
   =================================================== */
.card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: none;
    background: var(--surface);
}

/* ===================================================
   SEO PANEL
   =================================================== */
.seo-tip {
    font-size: 11.5px;
    color: var(--text-muted);
    margin: 3px 0 6px;
    line-height: 1.4;
}

/* ===================================================
   TAGS CHECKLIST
   =================================================== */
.tags-checklist {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px 16px;
    background: var(--gray-50);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    max-height: 220px;
    overflow-y: auto;
}
.tag-check-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
    user-select: none;
}
.tag-check-item:hover {
    border-color: var(--primary-border);
    color: var(--primary);
}
.tag-check-item input[type="checkbox"] {
    width: 15px; height: 15px;
    accent-color: var(--primary);
    margin: 0;
    cursor: pointer;
}
.tag-check-item:has(input:checked) {
    background: var(--primary-light);
    border-color: var(--primary-border);
    color: var(--primary);
    font-weight: 600;
}

/* ===================================================
   REPEATER ITEMS
   =================================================== */
.repeater-item {
    background: var(--gray-50);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-bottom: 10px;
    transition: all var(--transition);
}
.repeater-item:hover {
    border-color: var(--gray-300);
}

/* ===================================================
   BUTTONS
   =================================================== */
.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    font-weight: 600; font-size: 13px;
    padding: 8px 20px;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    font-family: var(--font);
}
.btn-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    box-shadow: 0 2px 8px rgba(79,70,229,.25);
}
.btn-outline-primary {
    color: var(--primary); border-color: var(--primary-border);
    font-weight: 600; font-size: 12.5px;
    border-radius: var(--radius-sm);
    font-family: var(--font);
}
.btn-outline-primary:hover { background: var(--primary); border-color: var(--primary); color: #fff; }

.btn-outline-danger { font-weight: 600; font-size: 12.5px; border-radius: var(--radius-sm); font-family: var(--font); }
.btn-outline-success { font-weight: 600; font-size: 12.5px; border-radius: var(--radius-sm); font-family: var(--font); }
.btn-outline-warning { font-weight: 600; font-size: 12.5px; border-radius: var(--radius-sm); font-family: var(--font); }

/* ===================================================
   ALERTS
   =================================================== */
.alert {
    border-radius: var(--radius-sm);
    font-size: 13px; font-weight: 500;
    border: none; padding: 12px 16px;
}
.alert-success { background: var(--green-light); color: #065f46; }
.alert-danger { background: var(--red-light); color: #991b1b; }

/* ===================================================
   STATUS BADGES
   =================================================== */
.status-badge {
    font-size: 11px; font-weight: 600;
    padding: 3px 10px; border-radius: 12px;
    display: inline-block;
}
.status-badge.published { background: var(--green-light); color: #065f46; }
.status-badge.draft { background: var(--red-light); color: #991b1b; }

/* ===================================================
   EMPTY STATE
   =================================================== */
.empty-table-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-muted);
}
.empty-table-state i {
    font-size: 36px; margin-bottom: 10px;
    display: block; color: var(--gray-300);
}
.empty-table-state p { font-size: 13px; margin: 0; }

/* ===================================================
   FIXED SAVE BAR
   =================================================== */
.form-save-bar {
    position: fixed;
    bottom: 0;
    left: var(--sidebar-w);
    right: 0;
    z-index: 1010;
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 12px 24px;
    box-shadow: 0 -4px 12px rgba(0,0,0,.06);
}
.form-save-bar-inner {
    display: flex;
    align-items: center;
    gap: 10px;
}
.form-save-bar .btn-primary {
    padding: 9px 28px;
    font-size: 13.5px;
}
.form-save-bar .btn-outline-secondary {
    font-size: 13px;
    font-weight: 600;
    padding: 9px 20px;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    color: var(--text-secondary);
    border-color: var(--border);
}
.form-save-bar .btn-outline-secondary:hover {
    background: var(--gray-100);
    color: var(--text);
    border-color: var(--gray-300);
}

/* Add bottom padding to content so form isn't hidden behind save bar */
.cms-module form { padding-bottom: 72px; }

/* ===================================================
   LOGIN PAGE
   =================================================== */
.login-body {
    min-height: 100vh;
    background: var(--gray-900);
    display: flex; align-items: center; justify-content: center;
    position: relative; overflow: hidden;
}
.login-body::before {
    content: '';
    position: absolute;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(99,102,241,.15) 0%, transparent 70%);
    top: -100px; right: -100px;
}
.login-body::after {
    content: '';
    position: absolute;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(124,58,237,.1) 0%, transparent 70%);
    bottom: -80px; left: -80px;
}
.login-card {
    width: 400px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 36px;
    box-shadow: 0 25px 50px rgba(0,0,0,.25);
    position: relative; z-index: 1;
}
.login-brand { text-align: center; margin-bottom: 28px; }
.login-brand-icon {
    width: 48px; height: 48px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 12px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 20px; color: #fff; margin-bottom: 12px;
}
.login-brand h1 { font-size: 20px; font-weight: 700; color: var(--text); margin: 0 0 3px; }
.login-brand p { font-size: 13px; color: var(--text-secondary); margin: 0; }

.login-card .form-control {
    padding: 10px 14px 10px 38px;
    font-size: 13.5px;
}
.login-card .btn-primary {
    padding: 10px; font-size: 14px;
    font-weight: 700; width: 100%;
    border-radius: var(--radius-sm);
}
.login-card .form-label { font-size: 13px; }

/* ===================================================
   SIDEBAR OVERLAY (Mobile)
   =================================================== */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.4);
    z-index: 1035;
    backdrop-filter: blur(2px);
}
.sidebar-overlay.active { display: block; }

/* ===================================================
   RESPONSIVE
   =================================================== */
@media (max-width: 1199px) {
    .cms-grid { grid-template-columns: 1fr 280px; }
}

@media (max-width: 991px) {
    .admin-sidebar { transform: translateX(-100%); }
    .admin-sidebar.open {
        transform: translateX(0);
        box-shadow: 4px 0 24px rgba(0,0,0,.2);
    }
    .admin-main { margin-left: 0; }
    .mobile-toggle { display: flex; }

    .cms-grid { grid-template-columns: 1fr; }
    .cms-grid > aside { position: static; }

    .header-search input { width: 150px; }
    .header-search input:focus { width: 180px; }
    .header-profile-name, .header-profile-role { display: none; }
    .admin-content { padding: 16px; }
    .form-save-bar { left: 0; }
    .today-card-body { grid-template-columns: repeat(4, 1fr); }
    .today-item { border-bottom: 1px solid var(--gray-100); }
}

@media (max-width: 575px) {
    .header-search { display: none; }
    .admin-header { padding: 0 14px; }
    .admin-content { padding: 14px 10px; }
    .quick-actions-grid { grid-template-columns: repeat(2, 1fr); }
    .today-card-body { grid-template-columns: repeat(3, 1fr); }
    .today-card-header { flex-direction: column; gap: 10px; align-items: flex-start; }
    .today-card-total { align-self: flex-start; }
    .welcome-banner { padding: 20px; }
    .welcome-banner h2 { font-size: 17px; }
}
