/* ==========================================================================
   SME CFO SERVICES - LUXURY ADMIN DASHBOARD & CMS DESIGN SYSTEM
   Brand Colors: Royal Navy (#23378D) & Crimson Umbrella Red (#E31E24)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
    /* Brand Navy Palette */
    --admin-brand-navy: #23378D;
    --admin-brand-navy-dark: #121F54;
    --admin-brand-navy-deep: #0B1333;
    --admin-brand-navy-light: #324CB8;
    --admin-brand-navy-subtle: #EEF2FF;
    --admin-brand-navy-border: #C7D2FE;
    
    /* Brand Red Palette */
    --admin-brand-red: #E31E24;
    --admin-brand-red-dark: #B81419;
    --admin-brand-red-light: #F87171;
    --admin-brand-red-subtle: #FEF2F2;
    --admin-brand-red-border: #FECACA;

    /* Theme Layout Defaults */
    --admin-sidebar-bg: #0B1333;
    --admin-sidebar-hover: rgba(255, 255, 255, 0.08);
    --admin-sidebar-active: #23378D;
    --admin-header-bg: #FFFFFF;
    --admin-body-bg: #F8FAFC;
    --admin-card-bg: #FFFFFF;
    --admin-border-color: #E2E8F0;
    --admin-text-dark: #0F172A;
    --admin-text-muted: #64748B;

    /* Shadows & Radii */
    --admin-shadow-sm: 0 1px 3px 0 rgba(15, 23, 42, 0.06);
    --admin-shadow-md: 0 4px 12px -2px rgba(35, 55, 141, 0.08), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
    --admin-shadow-lg: 0 12px 28px -4px rgba(18, 31, 84, 0.12), 0 4px 10px -2px rgba(15, 23, 42, 0.04);
    --admin-radius-sm: 8px;
    --admin-radius-md: 12px;
    --admin-radius-lg: 18px;
    --admin-radius-xl: 24px;
}

*, *::before, *::after {
    box-sizing: border-box;
}

body.admin-body {
    background-color: var(--admin-body-bg);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--admin-text-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

.admin-wrapper {
    display: flex;
    flex: 1;
    min-height: 100vh;
    width: 100%;
}

/* ==========================================================================
   Admin Sidebar
   ========================================================================== */
.admin-sidebar {
    width: 270px;
    background: linear-gradient(180deg, #0B1333 0%, #121F54 100%);
    color: #94A3B8;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: relative;
    z-index: 1000;
    border-right: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.admin-sidebar-brand {
    padding: 1.5rem 1.4rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0, 0, 0, 0.15);
}

.admin-sidebar-brand .brand-logo-box {
    width: 42px;
    height: 42px;
    background: #FFFFFF;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.admin-sidebar-brand h5 {
    color: #FFFFFF;
    font-size: 1rem;
    margin: 0;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.admin-sidebar-brand .admin-badge {
    background: linear-gradient(135deg, var(--admin-brand-red) 0%, #F43F5E 100%);
    color: #FFFFFF;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.admin-nav {
    padding: 1.25rem 0.85rem;
    flex-grow: 1;
    list-style: none;
    margin: 0;
}

.admin-nav-header {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #64748B;
    letter-spacing: 0.08em;
    padding: 0.6rem 0.85rem 0.35rem;
}

.admin-nav-item {
    margin-bottom: 5px;
}

.admin-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.75rem 1rem;
    color: #94A3B8;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.2s ease;
    position: relative;
}

.admin-nav-link i {
    font-size: 1.15rem;
    transition: transform 0.2s ease;
}

.admin-nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #FFFFFF;
}

.admin-nav-link:hover i {
    transform: translateX(2px);
    color: var(--admin-brand-red-light);
}

.admin-nav-link.active {
    background: linear-gradient(135deg, var(--admin-brand-navy) 0%, #1A2E80 100%);
    color: #FFFFFF;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(35, 55, 141, 0.4);
}

.admin-nav-link.active::after {
    content: '';
    position: absolute;
    right: 12px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--admin-brand-red);
    box-shadow: 0 0 8px var(--admin-brand-red);
}

.admin-sidebar-footer {
    padding: 1.2rem 1.4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.2);
}

.admin-user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--admin-brand-navy-light) 0%, var(--admin-brand-red) 100%);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* ==========================================================================
   Admin Main & Topbar
   ========================================================================== */
.admin-main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    min-width: 0;
}

.admin-topbar {
    background-color: #FFFFFF;
    border-bottom: 1px solid var(--admin-border-color);
    padding: 0.85rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    position: sticky;
    top: 0;
    z-index: 900;
}

.topbar-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--admin-text-muted);
}

.topbar-breadcrumb span.current {
    font-weight: 700;
    color: var(--admin-brand-navy);
    font-size: 1.1rem;
}

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

/* ==========================================================================
   KPI Stat Cards (Luxury Fintech Style)
   ========================================================================== */
.stat-card-luxury {
    background: #FFFFFF;
    border-radius: 16px;
    padding: 1.5rem 1.6rem;
    border: 1px solid var(--admin-border-color);
    box-shadow: var(--admin-shadow-sm);
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.stat-card-luxury::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background-color: var(--admin-brand-navy);
}

.stat-card-luxury.card-danger::before {
    background-color: var(--admin-brand-red);
}

.stat-card-luxury.card-success::before {
    background-color: #10B981;
}

.stat-card-luxury.card-info::before {
    background-color: #0284C7;
}

.stat-card-luxury:hover {
    transform: translateY(-4px);
    box-shadow: var(--admin-shadow-lg);
    border-color: #CBD5E1;
}

.stat-card-luxury .stat-num {
    font-size: 2.1rem;
    font-weight: 800;
    color: #0F172A;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.stat-card-luxury .stat-title {
    font-size: 0.82rem;
    color: var(--admin-text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 4px;
}

.stat-card-luxury .stat-badge {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
}

.stat-card-luxury .stat-icon-wrapper {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    transition: all 0.3s ease;
}

.stat-card-luxury:hover .stat-icon-wrapper {
    transform: scale(1.08);
}

/* ==========================================================================
   Admin Cards & Tables
   ========================================================================== */
.admin-card {
    background: #FFFFFF;
    border-radius: 16px;
    border: 1px solid var(--admin-border-color);
    box-shadow: var(--admin-shadow-sm);
    overflow: hidden;
    margin-bottom: 1.75rem;
    transition: box-shadow 0.25s ease;
}

.admin-card:hover {
    box-shadow: var(--admin-shadow-md);
}

.admin-card-header {
    padding: 1.25rem 1.6rem;
    border-bottom: 1px solid var(--admin-border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #FFFFFF;
}

.admin-card-header h5,
.admin-card-header h6 {
    margin: 0;
    font-weight: 700;
    color: var(--admin-brand-navy-dark);
}

.admin-table {
    margin-bottom: 0;
    width: 100%;
}

.admin-table thead th {
    background-color: #F8FAFC;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #475569;
    padding: 0.95rem 1.25rem;
    border-bottom: 1px solid var(--admin-border-color);
    white-space: nowrap;
}

.admin-table tbody td {
    padding: 1rem 1.25rem;
    vertical-align: middle;
    font-size: 0.9rem;
    border-bottom: 1px solid #F1F5F9;
    color: #334155;
}

.admin-table tbody tr {
    transition: background-color 0.15s ease;
}

.admin-table tbody tr:hover {
    background-color: #F8FAFC;
}

/* Status Badges */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.35rem 0.85rem;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 50px;
}

.status-New {
    background-color: #FEF2F2;
    color: #DC2626;
    border: 1px solid #FECACA;
}

.status-Contacted {
    background-color: #FFFBEB;
    color: #D97706;
    border: 1px solid #FDE68A;
}

.status-Qualified {
    background-color: #EEF2FF;
    color: #23378D;
    border: 1px solid #C7D2FE;
}

.status-Converted {
    background-color: #ECFDF5;
    color: #059669;
    border: 1px solid #A7F3D0;
}

.status-Closed {
    background-color: #F1F5F9;
    color: #64748B;
    border: 1px solid #E2E8F0;
}

/* Blog Article Status Toggle Buttons */
.blog-status-btn-published {
    background-color: #ECFDF5 !important;
    color: #047857 !important;
    border: 1px solid #A7F3D0 !important;
    font-size: 0.8rem !important;
    font-weight: 700 !important;
    padding: 0.35rem 0.85rem !important;
    border-radius: 50px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    transition: all 0.2s ease !important;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(16, 185, 129, 0.1);
}

.blog-status-btn-published:hover {
    background-color: #D1FAE5 !important;
    border-color: #6EE7B7 !important;
    color: #065F46 !important;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(16, 185, 129, 0.2);
}

.blog-status-btn-published .status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: #10B981;
    display: inline-block;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
}

.blog-status-btn-draft {
    background-color: #FFFBEB !important;
    color: #B45309 !important;
    border: 1px solid #FDE68A !important;
    font-size: 0.8rem !important;
    font-weight: 700 !important;
    padding: 0.35rem 0.85rem !important;
    border-radius: 50px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    transition: all 0.2s ease !important;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(245, 158, 11, 0.1);
}

.blog-status-btn-draft:hover {
    background-color: #FEF3C7 !important;
    border-color: #FCD34D !important;
    color: #92400E !important;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(245, 158, 11, 0.2);
}

.blog-status-btn-draft .status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: #F59E0B;
    display: inline-block;
}

/* ==========================================================================
   Buttons & Actions
   ========================================================================== */
.btn-primary {
    background: linear-gradient(135deg, var(--admin-brand-navy) 0%, #162463 100%);
    border-color: var(--admin-brand-navy);
    font-weight: 600;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(35, 55, 141, 0.25);
    transition: all 0.2s ease;
}

.btn-primary:hover, .btn-primary:focus {
    background: linear-gradient(135deg, #1A2C7B 0%, #0F1A47 100%);
    border-color: #1A2C7B;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(35, 55, 141, 0.35);
}

.btn-danger {
    background: linear-gradient(135deg, var(--admin-brand-red) 0%, #C51319 100%);
    border-color: var(--admin-brand-red);
    font-weight: 600;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(227, 30, 36, 0.25);
    transition: all 0.2s ease;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #B81419 0%, #900D12 100%);
    border-color: #B81419;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(227, 30, 36, 0.35);
}

.btn-outline-primary {
    color: var(--admin-brand-navy);
    border-color: var(--admin-brand-navy);
    font-weight: 600;
    border-radius: 8px;
}

.btn-outline-primary:hover {
    background-color: var(--admin-brand-navy);
    border-color: var(--admin-brand-navy);
    color: #FFFFFF;
}

/* ==========================================================================
   Form Controls
   ========================================================================== */
.form-label {
    font-weight: 600;
    font-size: 0.85rem;
    color: #1E293B;
    margin-bottom: 0.35rem;
}

.form-control, .form-select {
    border: 1px solid #CBD5E1;
    border-radius: 8px;
    padding: 0.65rem 0.95rem;
    font-size: 0.9rem;
    color: #0F172A;
    background-color: #FFFFFF;
    transition: all 0.2s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--admin-brand-navy);
    box-shadow: 0 0 0 3px rgba(35, 55, 141, 0.12);
    background-color: #FFFFFF;
}

/* ==========================================================================
   Admin Login Screen (State of the Art)
   ========================================================================== */
.admin-login-body {
    background: radial-gradient(circle at 50% 20%, #1A2A6C 0%, #121F54 50%, #0A1128 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 2rem 1rem;
}

.login-ambient-red {
    position: absolute;
    top: -150px;
    right: -100px;
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(227, 30, 36, 0.2) 0%, transparent 70%);
    filter: blur(50px);
    pointer-events: none;
}

.login-ambient-blue {
    position: absolute;
    bottom: -150px;
    left: -100px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(50, 76, 184, 0.35) 0%, transparent 70%);
    filter: blur(60px);
    pointer-events: none;
}

.login-box-luxury {
    max-width: 440px;
    width: 100%;
    background: #FFFFFF;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.2);
    padding: 2.75rem 2.25rem;
    position: relative;
    z-index: 10;
}

.login-box-luxury::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--admin-brand-navy) 0%, var(--admin-brand-red) 100%);
    border-radius: 20px 20px 0 0;
}

/* ==========================================================================
   Modals & Toast Notifications
   ========================================================================== */
.modal-content {
    border-radius: 16px;
    border: 1px solid var(--admin-border-color);
    box-shadow: var(--admin-shadow-lg);
    overflow: hidden;
}

.modal-header {
    border-bottom: 1px solid var(--admin-border-color);
    padding: 1.25rem 1.6rem;
    background-color: #F8FAFC;
}

.modal-footer {
    border-top: 1px solid var(--admin-border-color);
    padding: 1rem 1.6rem;
    background-color: #F8FAFC;
}

/* Quick Action Banner */
.admin-hero-banner {
    background: linear-gradient(135deg, var(--admin-brand-navy-dark) 0%, var(--admin-brand-navy) 100%);
    color: #FFFFFF;
    border-radius: 16px;
    padding: 1.75rem 2rem;
    margin-bottom: 1.75rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--admin-shadow-md);
}

.admin-hero-banner::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(227, 30, 36, 0.25) 0%, transparent 70%);
    pointer-events: none;
}
