/* ============================================
   DOWN2TOP ADMIN CMS — Premium Glassmorphism UI
   ============================================ */

:root {
    --admin-purple: #482D8F;
    --admin-purple-light: #6D53B5;
    --admin-purple-glow: rgba(72, 45, 143, 0.25);
    --admin-accent: #E63946;
    --admin-accent-light: #FF5A66;
    --admin-accent-glow: rgba(230, 57, 70, 0.2);
    --admin-dark: #2B1654;
    --admin-bg: #F5F0FF;
    --admin-sidebar: #FFFFFF;
    --admin-text-main: #3D2C5A;
    --admin-text-muted: #796696;
    --admin-card-bg: rgba(255, 255, 255, 0.55);
    --glass-border: rgba(255, 255, 255, 0.6);
    --glass-shadow: 0 8px 32px rgba(72, 45, 143, 0.12);
    --success: #28A745;
    --success-bg: #E8F5E9;
    --warning: #FFC107;
    --warning-bg: #FFF8E1;
    --danger: #DC3545;
    --danger-bg: #FFEBEE;
    --info: #1976D2;
    --info-bg: #E3F2FD;
    --shadow: 0 4px 20px rgba(72, 45, 143, 0.08);
    --shadow-lg: 0 16px 48px rgba(72, 45, 143, 0.15);
    --radius: 16px;
    --radius-sm: 10px;
    --radius-lg: 22px;
    --transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background:
        radial-gradient(ellipse at 20% 0%, rgba(72, 45, 143, 0.15) 0%, transparent 55%),
        radial-gradient(ellipse at 80% 100%, rgba(230, 57, 70, 0.15) 0%, transparent 55%),
        radial-gradient(ellipse at 60% 40%, rgba(109, 83, 181, 0.1) 0%, transparent 50%),
        linear-gradient(135deg, #F9F7FF 0%, #FFF0F2 50%, #ECE5FF 100%);
    background-attachment: fixed;
    color: var(--admin-text-main);
    min-height: 100vh;
}

/* ============ LOGIN PAGE ============ */
.login-screen {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1C0A42 0%, #482D8F 50%, #E63946 100%);
    position: relative;
    overflow: hidden;
}

.login-screen::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(109, 83, 181, 0.4) 0%, transparent 70%);
    top: -150px;
    right: -150px;
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.login-screen::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(230, 57, 70, 0.35) 0%, transparent 70%);
    bottom: -100px;
    left: -100px;
    border-radius: 50%;
    animation: float 8s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-20px) scale(1.05); }
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 3rem;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 450px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.login-logo {
    width: 220px;
    margin-bottom: 2rem;
}

.login-card h2 {
    margin-bottom: 0.5rem;
    font-size: 1.8rem;
    color: var(--admin-dark);
}

.login-card p {
    color: var(--admin-text-muted);
    margin-bottom: 2.5rem;
    font-size: 0.9rem;
}

.form-group {
    text-align: left;
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.85rem;
    color: #555;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
    border: 1.5px solid #E0E0E0;
    outline: none;
    font-family: inherit;
    font-size: 0.9rem;
    transition: var(--transition);
    background: #FAFAFA;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--admin-purple);
    box-shadow: 0 0 0 4px var(--admin-purple-glow);
    background: #FFF;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.login-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--admin-purple) 0%, var(--admin-accent) 100%);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 1rem;
    position: relative;
    overflow: hidden;
}

.login-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.5s ease;
}

.login-btn:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, var(--admin-purple-light) 0%, var(--admin-accent-light) 100%);
    box-shadow: 0 8px 25px var(--admin-accent-glow);
}

.login-btn:hover::after {
    left: 100%;
}

/* ============ ADMIN LAYOUT ============ */
.admin-layout {
    display: block;
    min-height: 100vh;
}

/* ============ SIDEBAR ============ */
.admin-sidebar {
    background: linear-gradient(180deg,
        rgba(255, 255, 255, 0.6) 0%,
        rgba(255, 255, 255, 0.4) 100%);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border-right: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 4px 0 40px rgba(72, 45, 143, 0.08), inset 1px 0 0 rgba(255,255,255,0.6);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    perspective: 900px;
    position: fixed;
    top: 0;
    left: 0;
    width: 270px;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
    transition: width 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Collapsed sidebar (compact icons only) */
body.sidebar-collapsed .admin-sidebar {
    width: 72px;
}

body.sidebar-collapsed .sidebar-brand span,
body.sidebar-collapsed .nav-section-label {
    display: none;
}

body.sidebar-collapsed .sidebar-brand img {
    width: 72px;
}

body.sidebar-collapsed .nav-item {
    justify-content: center;
    padding: 0.6rem;
    font-size: 0; /* hide label text */
}

body.sidebar-collapsed .nav-item i {
    font-size: 1.2rem;
}

body.sidebar-collapsed .nav-badge { display: none; }

/* Ensure main content expands to use freed space */
body.sidebar-collapsed .admin-main {
    margin-left: 72px;
    width: calc(100% - 72px);
}

/* Small adjustment for collapse button alignment */
#collapseSidebarBtn { display: inline-flex; align-items: center; justify-content: center; }

.admin-sidebar::-webkit-scrollbar { width: 4px; }
.admin-sidebar::-webkit-scrollbar-track { background: transparent; }
.admin-sidebar::-webkit-scrollbar-thumb { background: rgba(72,45,143,0.15); border-radius: 10px; }

.sidebar-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    margin-bottom: 1rem;
}

.sidebar-brand img {
    width: 200px;
    margin-bottom: 0.5rem;
    filter: drop-shadow(0 2px 8px rgba(230,57,70,0.25));
}

.sidebar-brand span {
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--admin-purple);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.admin-nav {
    flex: 1;
    transform-style: preserve-3d;
}

.nav-section-label {
    font-size: 0.6rem;
    font-weight: 800;
    color: var(--admin-text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 1.2rem 0.8rem 0.5rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    color: var(--admin-text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.88rem;
    margin-bottom: 3px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    transform-style: preserve-3d;
    /* 3D depth effect */
    box-shadow: 0 1px 0 rgba(255,255,255,0.6);
}

.nav-item i {
    font-size: 1rem;
    width: 22px;
    text-align: center;
    transition: color 0.2s ease, transform 0.25s ease;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    color: var(--admin-purple);
    border-color: rgba(255, 255, 255, 0.9);
    /* 3D depth on hover */
    transform: translateX(4px) translateZ(4px);
    box-shadow:
        0 4px 16px rgba(72,45,143,0.08),
        0 1px 0 rgba(255,255,255,0.8) inset,
        0 -1px 0 rgba(0,0,0,0.02) inset;
}

.nav-item:hover i {
    transform: translateX(2px) scale(1.1);
    color: var(--admin-purple-light);
}

.nav-item.active {
    background: linear-gradient(135deg,
        rgba(72, 45, 143, 0.55) 0%,
        rgba(230, 57, 70, 0.35) 100%);
    backdrop-filter: blur(16px);
    color: white;
    border-color: rgba(255, 255, 255, 0.25);
    position: relative;
    font-weight: 700;
    /* Strong 3D raised effect */
    transform: translateX(6px) translateZ(8px);
    box-shadow:
        0 6px 20px rgba(72, 45, 143, 0.4),
        0 1px 0 rgba(255,255,255,0.2) inset,
        0 -2px 0 rgba(0,0,0,0.25) inset,
        2px 0 0 rgba(255,255,255,0.1) inset;
}

.nav-item.active i {
    transform: translateX(2px) scale(1.1);
    color: var(--admin-accent-light);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: -1px;
    top: 10%;
    height: 80%;
    width: 4px;
    background: linear-gradient(180deg, #FF5A66 0%, #E63946 50%, #482D8F 100%);
    border-radius: 0 4px 4px 0;
    box-shadow: 0 0 14px rgba(230, 57, 70, 0.7), 0 0 4px rgba(255,255,255,0.3);
}

.nav-item.active::after {
    content: '';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: var(--admin-purple);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(72, 45, 143, 0.5);
    opacity: 0.7;
}

.nav-badge {
    background: linear-gradient(135deg, var(--admin-accent), var(--admin-accent-light));
    color: white;
    padding: 2px 8px;
    border-radius: 50px;
    font-size: 0.6rem;
    margin-left: auto;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(230,57,70,0.4);
}

.nav-divider {
    margin: 1rem 0;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* ============ MAIN CONTENT ============ */
.admin-main {
    margin-left: 270px;
    padding: 2rem 2.5rem;
    min-height: 100vh;
    width: calc(100% - 270px);
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: margin-left 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), width 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.header-row h1 {
    font-size: 1.8rem;
    color: var(--admin-dark);
}

.header-row p {
    color: var(--admin-text-muted);
    font-size: 0.9rem;
    margin-top: 0.2rem;
}

.header-actions {
    display: flex;
    gap: 0.8rem;
    align-items: center;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--admin-purple) 0%, var(--admin-accent) 100%);
    color: white;
    border: none;
    border-top: 1px solid rgba(255,255,255,0.25);
    border-left: 1px solid rgba(255,255,255,0.15);
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    box-shadow: 0 4px 16px rgba(72,45,143,0.35), 0 1px 0 rgba(255,255,255,0.2) inset;
    backdrop-filter: blur(10px);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(230,57,70,0.4), 0 1px 0 rgba(255,255,255,0.3) inset;
    background: linear-gradient(135deg, var(--admin-purple-light) 0%, var(--admin-accent-light) 100%);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    color: var(--admin-text-main);
    border: 1px solid rgba(255,255,255,0.9);
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    box-shadow: 0 2px 8px rgba(72,45,143,0.08), 0 1px 0 rgba(255,255,255,0.6) inset;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(255,255,255,1);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(72,45,143,0.12);
}

.btn-danger {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--danger);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.btn-danger:hover {
    background: #C62828;
    transform: translateY(-1px);
}

.btn-success {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--success);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.btn-success:hover {
    background: #1B8A34;
    transform: translateY(-1px);
}

.btn-sm {
    padding: 0.45rem 0.9rem;
    font-size: 0.8rem;
}

.admin-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    overflow: hidden;
    border: 2.5px solid white;
    box-shadow: var(--shadow);
    cursor: pointer;
}

.admin-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ============ STATS GRID ============ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.2rem;
    margin-bottom: 2rem;
    width: 100%;
}

.stat-card {
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-top: 1px solid rgba(255, 255, 255, 0.95);
    border-left: 1px solid rgba(255, 255, 255, 0.9);
    padding: 1.4rem;
    border-radius: var(--radius);
    box-shadow: var(--glass-shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.75);
    box-shadow: 0 20px 50px rgba(72, 45, 143, 0.12);
    border-color: rgba(255, 255, 255, 1);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.stat-card h2 {
    font-size: 1.4rem;
    color: var(--admin-dark);
    font-weight: 800;
}

.stat-card p {
    font-size: 0.72rem;
    color: var(--admin-text-muted);
    margin-top: 2px;
}

/* ============ CONTENT CARD ============ */
.content-card {
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-top: 1px solid rgba(255, 255, 255, 0.95);
    border-radius: var(--radius-lg);
    padding: 1.4rem;
    box-shadow: var(--glass-shadow);
    margin-bottom: 1rem;
    width: 100%;
}

.content-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.content-card-header h3 {
    font-size: 1.1rem;
    color: var(--admin-dark);
    font-weight: 700;
}

/* ============ TABLE ============ */
.table-row {
    display: grid;
    align-items: center;
    padding: 0.6rem 0.5rem;
    border-bottom: 1px solid rgba(0,0,0,0.04);
    font-size: 0.88rem;
    transition: background 0.2s ease;
    width: 100%;
}

.table-row:hover {
    background: rgba(72, 45, 143, 0.03);
}

/* Make table columns more generous so content isn't squeezed */
.table-row,
.table-header.table-row {
    grid-template-columns: 60px 3fr 1fr 4fr 120px;
    column-gap: 0.7rem;
    padding: 0.7rem 0.5rem;
}

/* Per-view table grid templates for better responsive sizing */
#view-services .table-row,
#view-services .table-header.table-row {
    grid-template-columns: 60px 3fr 1fr 4fr 120px;
}
#view-resources .table-row,
#view-resources .table-header.table-row {
    grid-template-columns: 60px 3fr 1fr 1fr 120px;
}
#view-blog .table-row,
#view-blog .table-header.table-row {
    grid-template-columns: 60px 3fr 1fr 1fr 120px;
}
#view-cases .table-row,
#view-cases .table-header.table-row {
    grid-template-columns: 60px 3fr 1fr 1fr 120px;
}
#view-testimonials .table-row,
#view-testimonials .table-header.table-row {
    grid-template-columns: 60px 1fr 1fr 2.5fr 120px;
}

.table-header {
    font-weight: 700;
    color: var(--admin-text-muted);
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 1px;
    border-bottom: 2px solid rgba(0,0,0,0.06);
}

.table-header:hover { background: none; }

.table-thumb {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid rgba(0,0,0,0.06);
}

.table-thumb-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    background: rgba(72,45,143,0.08);
    color: var(--admin-purple);
}

.badge-cat {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 700;
    background: rgba(72,45,143,0.08);
    color: var(--admin-purple);
}

.action-btn {
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    margin-right: 0.3rem;
    transition: var(--transition);
}

.action-btn:hover { transform: scale(1.1); }

.btn-edit { background: var(--info-bg); color: var(--info); }
.btn-delete { background: var(--danger-bg); color: var(--danger); }
.btn-view { background: var(--success-bg); color: var(--success); }

/* ============ VIEW TOGGLE ============ */
@keyframes aosFadeUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.admin-view {
    display: none;
    opacity: 0;
    will-change: transform, opacity;
    width: 100%;
}

.admin-view.active {
    display: block;
    animation: aosFadeUp 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    width: 100%;
}

/* ============ MODAL ============ */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(11, 14, 42, 0.5);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-overlay.show { display: flex; }

.modal-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 25px 80px rgba(11, 14, 42, 0.2);
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: translateY(30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-card::-webkit-scrollbar { width: 4px; }
.modal-card::-webkit-scrollbar-track { background: transparent; }
.modal-card::-webkit-scrollbar-thumb { background: rgba(72,45,143,0.15); border-radius: 10px; }

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

.modal-header h3 {
    font-size: 1.3rem;
    color: var(--admin-dark);
}

.close-modal-btn {
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--admin-text-muted);
    transition: var(--transition);
    line-height: 1;
}

.close-modal-btn:hover {
    color: var(--danger);
    transform: rotate(90deg);
}

.form-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.form-row .form-group {
    flex: 1;
    min-width: 200px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.8rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0,0,0,0.06);
}

/* ============ IMAGE UPLOAD ZONE ============ */
.image-upload-zone {
    border: 2px dashed rgba(72, 45, 143, 0.25);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: rgba(250, 249, 255, 0.5);
    position: relative;
    overflow: hidden;
}

.image-upload-zone:hover {
    border-color: var(--admin-purple);
    background: rgba(250, 249, 255, 0.9);
    transform: translateY(-2px);
}

.image-upload-zone.dragover {
    border-color: var(--admin-purple);
    background: rgba(72, 45, 143, 0.05);
    box-shadow: 0 0 0 4px var(--admin-purple-glow);
}

.image-upload-zone .upload-icon {
    font-size: 2rem;
    color: var(--admin-purple);
    margin-bottom: 0.5rem;
    opacity: 0.6;
}

.image-upload-zone .upload-text {
    font-size: 0.85rem;
    color: var(--admin-text-muted);
}

.image-upload-zone .upload-text strong {
    color: var(--admin-purple);
}

.image-upload-zone input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.image-preview-container {
    margin-top: 1rem;
    position: relative;
    display: inline-block;
}

.image-preview {
    max-width: 100%;
    max-height: 200px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(0,0,0,0.08);
    object-fit: cover;
}

.image-preview-remove {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    background: var(--danger);
    color: white;
    border: 2px solid white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    cursor: pointer;
    transition: var(--transition);
}

.image-preview-remove:hover { transform: scale(1.2); }

/* ============ PAGE EDITOR ACCORDION ============ */
.page-accordion {
    margin-bottom: 1rem;
}

.page-accordion-item {
    background: var(--admin-card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: var(--radius);
    margin-bottom: 0.8rem;
    overflow: hidden;
    transition: var(--transition);
}

.page-accordion-item:hover {
    box-shadow: 0 4px 20px rgba(72, 45, 143, 0.06);
}

.page-accordion-trigger {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 1.3rem;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--admin-dark);
    transition: var(--transition);
    width: 100%;
    background: none;
    border: none;
    text-align: left;
    font-family: inherit;
}

.page-accordion-trigger i {
    color: var(--admin-purple);
    width: 24px;
    text-align: center;
}

.page-accordion-trigger .chevron {
    margin-left: auto;
    transition: transform 0.3s ease;
    color: var(--admin-text-muted);
    font-size: 0.8rem;
}

.page-accordion-item.open .page-accordion-trigger .chevron {
    transform: rotate(180deg);
}

.page-accordion-trigger:hover {
    background: rgba(72, 45, 143, 0.04);
}

.page-accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.page-accordion-item.open .page-accordion-body {
    max-height: 3000px;
}

.page-accordion-content {
    padding: 0 1.3rem 1.5rem;
}

.field-group {
    margin-bottom: 1.2rem;
}

.field-group label {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.4rem;
}

.field-group input,
.field-group textarea {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1.5px solid #E8E8E8;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.88rem;
    transition: var(--transition);
    background: rgba(255,255,255,0.7);
}

.field-group input:focus,
.field-group textarea:focus {
    border-color: var(--admin-purple);
    box-shadow: 0 0 0 3px var(--admin-purple-glow);
    outline: none;
    background: #FFF;
}

.field-group textarea {
    resize: vertical;
    min-height: 80px;
}

.field-group-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.save-section-btn {
    margin-top: 1rem;
}

/* ============ MEDIA LIBRARY ============ */
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.2rem;
}

.media-card {
    background: var(--admin-card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
}

.media-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.media-card-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    background: #F5F5F5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #CCC;
    font-size: 2.5rem;
    border-bottom: 1px solid rgba(0,0,0,0.04);
}

.media-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-card-body {
    padding: 1rem;
}

.media-card-body h4 {
    font-size: 0.85rem;
    margin-bottom: 0.3rem;
    color: var(--admin-dark);
}

.media-card-body p {
    font-size: 0.75rem;
    color: var(--admin-text-muted);
    margin-bottom: 0.8rem;
}

.media-card-actions {
    display: flex;
    gap: 0.4rem;
}

/* ============ MESSAGES ============ */
.message-card {
    background: var(--admin-card-bg);
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: var(--radius);
    padding: 1.2rem;
    margin-bottom: 0.8rem;
    transition: var(--transition);
    cursor: pointer;
}

.message-card:hover {
    background: rgba(255,255,255,0.8);
    box-shadow: var(--shadow);
}

.message-card.unread {
    border-left: 3px solid var(--admin-purple);
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.message-header h4 {
    font-size: 0.9rem;
    color: var(--admin-dark);
}

.message-header .message-date {
    font-size: 0.75rem;
    color: var(--admin-text-muted);
}

.message-body {
    font-size: 0.85rem;
    color: #555;
    line-height: 1.5;
}

.message-sender {
    font-size: 0.78rem;
    color: var(--admin-purple);
    font-weight: 600;
    margin-bottom: 0.3rem;
}

/* ============ TOAST NOTIFICATIONS ============ */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    animation: toastIn 0.3s ease;
    min-width: 280px;
    max-width: 420px;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(100px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(100px); }
}

.toast.removing { animation: toastOut 0.3s ease forwards; }

.toast-success { background: #2E7D32; color: white; }
.toast-error { background: #C62828; color: white; }
.toast-warning { background: #E65100; color: white; }
.toast-info { background: #1565C0; color: white; }

/* ============ STORAGE METER ============ */
.storage-meter {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(255,255,255,0.3);
    border-radius: var(--radius-sm);
}

.storage-bar-bg {
    width: 100%;
    height: 8px;
    background: #E8E8E8;
    border-radius: 10px;
    overflow: hidden;
    margin: 0.5rem 0;
}

.storage-bar-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.5s ease;
    background: linear-gradient(90deg, var(--admin-purple), var(--admin-purple-light));
}

.storage-bar-fill.warning { background: linear-gradient(90deg, #F57C00, #FF9800); }
.storage-bar-fill.danger { background: linear-gradient(90deg, #C62828, #EF5350); }

.storage-text {
    font-size: 0.75rem;
    color: var(--admin-text-muted);
    display: flex;
    justify-content: space-between;
}

/* ============ EMPTY STATE ============ */
.empty-state {
    padding: 3rem;
    text-align: center;
    color: var(--admin-text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.empty-state h4 {
    margin-bottom: 0.5rem;
    color: #777;
}

.empty-state p {
    font-size: 0.85rem;
}

/* ============ MOBILE HAMBURGER ============ */
.admin-mobile-toggle {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 200;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0,0,0,0.08);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--admin-purple);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.admin-mobile-toggle:hover {
    background: white;
    transform: scale(1.05);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    z-index: 90;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.show {
    display: block;
    opacity: 1;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1200px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
    .admin-layout {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        transform: translateX(-100%);
        box-shadow: none;
    }

    .admin-sidebar.open {
        transform: translateX(0);
        box-shadow: 4px 0 30px rgba(0,0,0,0.15);
    }

    .admin-main {
        margin-left: 0;
        padding: 1.5rem;
        padding-top: 4.5rem;
    }

    .admin-mobile-toggle {
        display: flex;
    }

    .table-row {
        grid-template-columns: 40px 1fr 100px;
    }

    .table-row > *:nth-child(3),
    .table-row > *:nth-child(4) {
        display: none;
    }

    .table-header > *:nth-child(3),
    .table-header > *:nth-child(4) {
        display: none;
    }

    .header-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .modal-card {
        width: 95%;
        padding: 1.5rem;
    }

    .field-group-row {
        grid-template-columns: 1fr;
    }

    .media-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
}

@media (max-width: 600px) {
    .stats-grid { grid-template-columns: 1fr; }

    .form-row {
        flex-direction: column;
    }

    .form-row .form-group {
        min-width: 100%;
    }

    .header-row h1 {
        font-size: 1.4rem;
    }

    .content-card {
        padding: 1.2rem;
    }

    .media-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* ============ SCROLLBAR ============ */
.admin-main::-webkit-scrollbar { width: 6px; }
.admin-main::-webkit-scrollbar-track { background: transparent; }
.admin-main::-webkit-scrollbar-thumb { background: rgba(72,45,143,0.1); border-radius: 10px; }

/* ============ CATALOGUE SECTION ============ */
.catalogue-upload-area {
    background: rgba(250, 249, 255, 0.5);
    padding: 2rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    border: 1px solid rgba(0,0,0,0.04);
}

.catalogue-upload-area h4 {
    margin-bottom: 0.8rem;
    color: var(--admin-dark);
}

.catalogue-file-input {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.catalogue-file-input input[type="file"] {
    flex: 1;
    min-width: 200px;
    padding: 0.7rem;
    border: 1.5px solid #E0E0E0;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.85rem;
    background: rgba(255,255,255,0.7);
}

.catalogue-status {
    padding: 1.2rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    font-weight: 600;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.catalogue-info {
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.catalogue-info-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.04);
    font-size: 0.88rem;
}

.catalogue-info-row:last-child { border-bottom: none; }

.catalogue-info-row strong {
    color: var(--admin-dark);
}

/* ============ SETTINGS ============ */
.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .settings-grid {
        grid-template-columns: 1fr;
    }
}

.settings-card {
    background: var(--admin-card-bg);
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: var(--radius);
    padding: 1.8rem;
}

.settings-card h4 {
    margin-bottom: 0.5rem;
    color: var(--admin-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.settings-card h4 i {
    color: var(--admin-purple);
}

.settings-card > p {
    font-size: 0.82rem;
    color: var(--admin-text-muted);
    margin-bottom: 1.5rem;
}

/* ============ TESTIMONIAL CARDS ============ */
.testimonial-edit-card {
    background: rgba(255,255,255,0.4);
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: var(--radius);
    padding: 1.2rem;
    margin-bottom: 1rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    transition: var(--transition);
}

.testimonial-edit-card:hover {
    background: rgba(255,255,255,0.7);
}

.testimonial-photo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: #EEE;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #CCC;
    font-size: 1.5rem;
    overflow: hidden;
}

.testimonial-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.testimonial-info {
    flex: 1;
}

.testimonial-info h4 {
    font-size: 0.9rem;
    color: var(--admin-dark);
    margin-bottom: 0.2rem;
}

.testimonial-info .role {
    font-size: 0.78rem;
    color: var(--admin-purple);
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.testimonial-info .quote-preview {
    font-size: 0.82rem;
    color: #666;
    font-style: italic;
}
