

/* ============================================
   CSS CUSTOM PROPERTIES
============================================ */
:root {
    /* Exact logo colours */
    --brand-red: #ff0000;
    --brand-blue: #0000ff;
    --brand-charcoal: #202020;

    /*
     * Accessible versions for buttons, links and text.
     * The exact logo blue is too dark for normal text on charcoal.
     */
    --brand-red-ui: #ff4747;
    --brand-blue-ui: #6f7cff;

    /* Primary Colours - Moss, Bark & Forest Mist */
    --emerald: #3f5143;
    --emerald-light: #6f8272;

    --gold: #805b46;
    --gold-light: #ad826b;

    --amber: #633d2d;
    --cream: #dce3e5;

    /* Accent Colours */
    --coral: var(--brand-red-ui);
    --slate: #50626b;

    /* Glass Colours - Cool, Misty Tint */
    --glass-bg: rgba(80, 98, 107, 0.10);
    --glass-border: rgba(220, 227, 229, 0.14);
    --glass-shadow: rgba(0, 0, 0, 0.45);
    --glass-hover: rgba(103, 126, 137, 0.17);

    /* Background - Charcoal into Foggy Forest */
    --bg-dark: #202020;
    --bg-gradient-1: #252929;
    --bg-gradient-2: #364049;
    --bg-gradient-3: #47545b;

    /* Text */
    --text-primary: #e5eaec;
    --text-secondary: rgba(229, 234, 236, 0.72);
    --text-muted: rgba(229, 234, 236, 0.46);

    /* Status Colours */
    --success: #6f9a79;
    --warning: #c58a57;
    --danger: #e5484d;
    --info: var(--brand-blue-ui);
    
    /* Spacing */
    --sidebar-width: 280px;
    --navbar-height: 70px;
    --border-radius: 20px;
    --card-padding: 24px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
	
	/* Dark-mode wallpaper */
	--wallpaper-image: url("../images/wp-dark.webp");
	--wallpaper-overlay: rgba(0, 0, 0, 0.75);
	
    --logo-square-bg: linear-gradient(
        135deg,
        var(--brand-blue-ui),
        var(--brand-red-ui)
    );

    --logo-square-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
	
	--user-menu-bg: rgba(25, 27, 29, 0.96);
	
	--navigation-text-colour: rgba(229, 234, 236, 0.72);
	
	--faq-separator-colour: rgba(229, 234, 236, 0.4);
}

/* Light Mode - Forest Mist */
[data-theme="light"] {
    /*
     * Accessible UI versions of the logo colours.
     * Exact logo colours remain unchanged in --brand-red and --brand-blue.
     */
    --brand-red-ui: #c91919;
    --brand-blue-ui: #2536c7;

    /* Primary Colours - Moss, Bark & Stone */
    --emerald: #405c47;
    --emerald-light: #68806e;

    --gold: #76513e;
    --gold-light: #a3765e;

    --amber: #82502f;
    --cream: #f0f2f1;

    /* Accent Colours */
    --coral: var(--brand-red-ui);
    --slate: #52656e;

    /* Glass Colours - Frosted Forest Mist */
    --glass-bg: rgba(255, 255, 255, 0.62);
    --glass-border: rgba(49, 65, 70, 0.14);
    --glass-shadow: rgba(27, 35, 38, 0.14);
    --glass-hover: rgba(255, 255, 255, 0.82);

    /* Background - Pale Mist and Weathered Stone */
    --bg-dark: #e4e9e8;
    --bg-gradient-1: #edf1f0;
    --bg-gradient-2: #dce4e5;
    --bg-gradient-3: #f6f7f5;

    /* Text - Charcoal */
    --text-primary: #202424;
    --text-secondary: rgba(32, 36, 36, 0.72);
    --text-muted: rgba(32, 36, 36, 0.50);

    /* Status Colours - Adjusted for Light Backgrounds */
    --success: #39764a;
    --warning: #9a6223;
    --danger: #c72e35;
    --info: var(--brand-blue-ui);
	
	/* Light-mode wallpaper */
	--wallpaper-image: url("../images/wp-light.webp");
	--wallpaper-overlay: rgba(255, 255, 255, 0.80);
	
	/*
    --logo-square-bg: linear-gradient(
        135deg,
        #eef3f8 0%,
        #d6e2ef 65%,
        #f0d2d7 100%
    );
	*/
	--logo-square-bg: linear-gradient(
        135deg,
        var(--cream),
        var(--amber)
    );

    --logo-square-shadow: 0 8px 24px rgba(24, 40, 65, 0.18);
	
	--user-menu-bg: rgba(255, 255, 255, 0.97);
	
	--navigation-text-colour: rgba(30, 30, 30, 0.72);
	
	--faq-separator-colour: rgba(30, 30, 30, 0.4);
}

[data-theme="light"] .orb {
    opacity: 0.10;
}

[data-theme="light"] .glass-card::before {
    background: linear-gradient(
        90deg,
        transparent,
        rgba(54, 64, 73, 0.07),
        transparent
    );
}

[data-theme="light"] .stat-value {
    background: linear-gradient(
        135deg,
        var(--text-primary),
        var(--slate)
    );
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

[data-theme="light"] .table-wrapper::-webkit-scrollbar-track,
[data-theme="light"] .chart-wrapper::-webkit-scrollbar-track {
    background: rgba(49, 65, 70, 0.06);
}

[data-theme="light"] .table-wrapper::-webkit-scrollbar-thumb,
[data-theme="light"] .chart-wrapper::-webkit-scrollbar-thumb,
[data-theme="light"] .activity-list::-webkit-scrollbar-thumb {
    background: rgba(49, 65, 70, 0.22);
}

[data-theme="light"] .table-wrapper::-webkit-scrollbar-thumb:hover,
[data-theme="light"] .chart-wrapper::-webkit-scrollbar-thumb:hover,
[data-theme="light"] .activity-list::-webkit-scrollbar-thumb:hover {
    background: rgba(49, 65, 70, 0.34);
}

/* ============================================
   RESET & BASE STYLES
============================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ============================================
   ANIMATED BACKGROUND
============================================ */
/* ============================================
   WALLPAPER BACKGROUND
============================================ */
.background {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -2;

    background-image:
        linear-gradient(
            var(--wallpaper-overlay),
            var(--wallpaper-overlay)
        ),
        var(--wallpaper-image);

    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

/* Floating Orbs */
.orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    z-index: -1;
    animation: float 20s ease-in-out infinite;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: var(--emerald);
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.orb-2 {
    width: 350px;
    height: 350px;
    background: var(--gold);
    top: 60%;
    right: 10%;
    animation-delay: -5s;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: var(--coral);
    bottom: 10%;
    left: 30%;
    animation-delay: -10s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -30px) scale(1.05); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
    75% { transform: translate(20px, 10px) scale(1.02); }
}

/* ============================================
   LAYOUT STRUCTURE
============================================ */
.sitepage {
    display: flex;
    min-height: 100vh;
}

/* ============================================
   SIDEBAR
============================================ */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--glass-border);
    padding: 24px;
    z-index: 100;
    transition: all var(--transition-normal);
    overflow-y: auto;
	
    display: flex;
    flex-direction: column;
}

/* Custom Scrollbar for Sidebar */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--emerald-light);
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 30px;
}

.logo {
    width: 45px;
    height: 45px;
    flex-shrink: 0;

    background: var(--logo-square-bg);
    box-shadow: var(--logo-square-shadow);

    border-radius: 12px;
    padding: 5px;
    overflow: hidden;

    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.sidebar-logo-image {
    display: block;
    width: auto;
    height: 40px;
    max-width: 165px;
    object-fit: contain;
}

.logo-text {
    font-size: 22px;
    font-weight: 600;
    background: linear-gradient(135deg, var(--emerald-light), var(--gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    list-style: none;
    flex: 1;
}

.nav-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-section {
    margin-bottom: 25px;
    list-style: none;
}

.nav-section-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-bottom: 12px;
    padding-left: 15px;
}

.nav-item {
    margin-bottom: 5px;
    list-style: none;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 12px;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.nav-link:hover {
    background: var(--glass-hover);
    color: var(--text-primary);
}

.nav-link.active {
    background: var(--glass-hover);
    color: var(--text-primary);
}

.nav-icon {
    width: 22px;
    height: 22px;
    opacity: 0.8;
}

.nav-icon-large {
    width: 28px;
    height: 28px;
    margin-left: -3px;
    margin-right: -3px;
}

.nav-link.active .nav-icon,
.nav-link:hover .nav-icon {
    opacity: 1;
}

.nav-badge {
    margin-left: auto;
    background: linear-gradient(135deg, var(--gold), var(--amber));
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 20px;
}

/* Sidebar User Profile */

/* Make the footer capable of positioning the dropdown */
.sidebar-footer {
    position: relative;
    flex-shrink: 0;
    padding-top: 20px;
    border-top: 1px solid var(--glass-border);
}

/* The profile row is now a real button */
.user-profile {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;

    padding: 12px;
    border: 0;
    border-radius: 12px;

    background: transparent;
    color: var(--text-primary);

    font: inherit;
    text-align: left;

    cursor: pointer;
    transition: background var(--transition-fast);
}

.user-profile:hover {
    background: var(--glass-hover);
}

.user-profile:focus-visible {
    outline: 2px solid var(--brand-blue-ui);
    outline-offset: 2px;
}

.user-info {
    flex: 1;
    min-width: 0;
}

.profile-chevron {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: var(--text-secondary);
    transition: transform var(--transition-fast);
}

.user-profile[aria-expanded="true"] .profile-chevron {
    transform: rotate(180deg);
}

/* Dropdown panel */
.user-dropdown {
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(100% + 10px);

    padding: 8px;

    background: var(--user-menu-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);

    border: 1px solid var(--glass-border);
    border-radius: 14px;

    box-shadow: 0 16px 40px var(--glass-shadow);
    z-index: 200;
}

.user-dropdown-link {
    display: flex;
    align-items: center;
    gap: 12px;

    width: 100%;
    padding: 11px 12px;

    border-radius: 9px;

    color: var(--text-secondary);
    text-decoration: none;

    transition:
        color var(--transition-fast),
        background var(--transition-fast);
}

.user-dropdown-link:hover,
.user-dropdown-link:focus-visible {
    background: var(--glass-hover);
    color: var(--text-primary);
}

.user-dropdown-link:focus-visible {
    outline: 2px solid var(--brand-blue-ui);
    outline-offset: -2px;
}

.user-dropdown-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.user-dropdown-logout {
    margin-top: 6px;
    padding-top: 12px;
    border: 1px solid var(--glass-border);
    color: var(--danger);
}

.user-avatar {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;

    display: flex;
    align-items: center;
    justify-content: center;
}

.user-avatar-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-info {
    flex: 1;
}

.user-name {
    font-weight: 500;
    font-size: 14px;
}

.user-role {
    font-size: 12px;
    color: var(--text-muted);
}

/* ============================================
   MAIN CONTENT
============================================ */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 30px;
    min-height: 100vh;
}

/* ============================================
   TOP NAVBAR
============================================ */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    gap: 20px;
}

.page-title {
    font-size: 28px;
    font-weight: 600;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.search-box {
    position: relative;
}

.search-input {
    width: 280px;
    padding: 12px 20px 12px 48px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    transition: all var(--transition-fast);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-input:focus {
    outline: none;
    border-color: var(--emerald-light);
    box-shadow: 0 0 20px rgba(52, 211, 153, 0.2);
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--text-muted);
}

.nav-btn {
    width: 45px;
    height: 45px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: all var(--transition-fast);
}

.nav-btn:hover {
    background: var(--glass-hover);
    border-color: var(--emerald-light);
}

.nav-btn svg {
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
}

.notification-dot {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 8px;
    height: 8px;
    background: var(--coral);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--coral);
}

/* ============================================
   GLASS CARD BASE
============================================ */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: var(--card-padding);
    position: relative;
    overflow: hidden;
    transition: all var(--transition-normal);
    transform-style: preserve-3d;
    perspective: 1000px;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
}

.glass-card:hover {
    background: var(--glass-hover);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 
        0 25px 50px -12px var(--glass-shadow),
        0 0 40px rgba(52, 211, 153, 0.1);
}

/* 3D Tilt Effect */
.glass-card-3d {
    transition: transform 0.4s cubic-bezier(0.03, 0.98, 0.52, 0.99);
}

.glass-card-3d:hover {
    transform: rotateX(5deg) rotateY(-5deg) translateZ(10px);
}

/* ============================================
   STATS CARDS
============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

/* Medium desktop */
@media (max-width: 1500px) {
    .stats-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Tablet */
@media (max-width: 900px) {
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Mobile */
@media (max-width: 600px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

.stat-card {
    position: relative;
}

.stat-card-inner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.stat-info h3 {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-family: 'Space Mono', monospace;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-change {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 20px;
}

.stat-change.positive {
    color: var(--success);
    background: rgba(34, 197, 94, 0.15);
}

.stat-change.negative {
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.15);
}

.stat-icon {
    width: 55px;
    height: 55px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon.cyan {
    background: linear-gradient(135deg, rgba(52, 211, 153, 0.2), rgba(52, 211, 153, 0.05));
    box-shadow: 0 8px 32px rgba(52, 211, 153, 0.2);
}

.stat-icon.magenta {
    background: linear-gradient(135deg, rgba(212, 165, 116, 0.2), rgba(212, 165, 116, 0.05));
    box-shadow: 0 8px 32px rgba(212, 165, 116, 0.2);
}

.stat-icon.purple {
    background: linear-gradient(135deg, rgba(224, 122, 95, 0.2), rgba(224, 122, 95, 0.05));
    box-shadow: 0 8px 32px rgba(224, 122, 95, 0.2);
}

.stat-icon.success {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(34, 197, 94, 0.05));
    box-shadow: 0 8px 32px rgba(34, 197, 94, 0.2);
}

.stat-icon svg {
    width: 26px;
    height: 26px;
}

/* Sparkline in stat card */
.stat-sparkline {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    opacity: 0.3;
}

/* ============================================
   CONTENT GRID
============================================ */
.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-bottom: 30px;
}

/* ============================================
   CHART CARD
============================================ */
.chart-card {
    min-height: 380px;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
}

.card-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

.card-actions {
    display: flex;
    gap: 8px;
}

.card-btn {
    padding: 8px 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.card-btn:hover,
.card-btn.active {
    background: var(--glass-hover);
    border-color: var(--emerald-light);
    color: var(--text-primary);
}

/* Chart Container */
.chart-wrapper {
    overflow-x: auto;
    margin: 0 -10px;
    padding: 0 10px;
}

.chart-wrapper::-webkit-scrollbar {
    height: 8px;
}

.chart-wrapper::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.chart-wrapper::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, var(--emerald), var(--gold));
    border-radius: 4px;
}

.chart-wrapper::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(90deg, var(--emerald-light), var(--gold-light));
}

.chart-container {
    height: 250px;
    position: relative;
    display: flex;
    min-width: 500px;
}

.chart-y-axis {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px 0;
    padding-right: 12px;
    text-align: right;
}

.y-value {
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    color: var(--text-muted);
}

.chart-placeholder {
    flex: 1;
    height: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 8px;
    padding: 20px 0;
    border-left: 1px solid var(--glass-border);
    padding-left: 12px;
}

.chart-bar-group {
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.chart-bar {
    width: 100%;
    max-width: 40px;
    border-radius: 8px 8px 0 0;
    background: linear-gradient(180deg, var(--emerald-light), var(--emerald));
    transition: all var(--transition-normal);
    position: relative;
    min-height: 10px;
}

.chart-bar.bar-emerald {
    background: linear-gradient(180deg, #6db897, #3d8b6e);
}

.chart-bar.bar-gold {
    background: linear-gradient(180deg, #c9b896, #a89068);
}

.chart-bar.bar-coral {
    background: linear-gradient(180deg, #d4a090, #b87a68);
}

.chart-bar.bar-teal {
    background: linear-gradient(180deg, #7ac4b8, #4a9e92);
}

.chart-bar.bar-amber {
    background: linear-gradient(180deg, #d4b06a, #a88542);
}

.chart-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255,255,255,0.2), transparent);
    border-radius: 8px 8px 0 0;
}

.chart-bar:hover {
    filter: brightness(1.15);
    transform: scaleY(1.02);
    transform-origin: bottom;
}

.chart-bar.bar-emerald:hover {
    box-shadow: 0 0 16px rgba(61, 139, 110, 0.4);
}

.chart-bar.bar-gold:hover {
    box-shadow: 0 0 16px rgba(168, 144, 104, 0.4);
}

.chart-bar.bar-coral:hover {
    box-shadow: 0 0 16px rgba(184, 122, 104, 0.4);
}

.chart-bar.bar-teal:hover {
    box-shadow: 0 0 16px rgba(74, 158, 146, 0.4);
}

.chart-bar.bar-amber:hover {
    box-shadow: 0 0 16px rgba(168, 133, 66, 0.4);
}

.chart-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

/* ============================================
   ACTIVITY FEED
============================================ */
.activity-card {
    max-height: 380px;
    display: flex;
    flex-direction: column;
}

.activity-list {
    flex: 1;
    overflow-y: auto;
    margin: 0 -10px;
    padding: 0 10px;
}

.activity-list::-webkit-scrollbar {
    width: 4px;
}

.activity-list::-webkit-scrollbar-track {
    background: transparent;
}

.activity-list::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 2px;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--glass-border);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-avatar {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
    overflow: hidden;
}

.activity-avatar-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.activity-content {
    flex: 1;
    min-width: 0;
}

.activity-text {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.activity-text strong {
    color: var(--text-primary);
    font-weight: 500;
}

.activity-time {
    font-size: 12px;
    color: var(--text-muted);
}

/* ============================================
   DATA TABLE
============================================ */
.table-card {
    grid-column: span 2;
}

.table-wrapper {
    overflow-x: auto;
    margin: 0 -10px;
    padding: 0 10px;
}

.table-wrapper::-webkit-scrollbar {
    height: 8px;
}

.table-wrapper::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.table-wrapper::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, var(--emerald), var(--gold));
    border-radius: 4px;
}

.table-wrapper::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(90deg, var(--emerald-light), var(--gold-light));
}

.data-table {
    width: 100%;
    min-width: 700px;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 16px;
    text-align: left;
}

.data-table th {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--glass-border);
}

.data-table tr {
    transition: background var(--transition-fast);
}

.data-table tbody tr:hover {
    background: var(--glass-hover);
}

.data-table td {
    font-size: 14px;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.table-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.table-avatar {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 13px;
}

.table-user-info {
    display: flex;
    flex-direction: column;
}

.table-user-name {
    color: var(--text-primary);
    font-weight: 500;
}

.table-user-email {
    font-size: 12px;
    color: var(--text-muted);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.status-badge.completed {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.status-badge.completed::before {
    background: var(--success);
    box-shadow: 0 0 8px var(--success);
}

.status-badge.pending {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.status-badge.pending::before {
    background: var(--warning);
    box-shadow: 0 0 8px var(--warning);
}

.status-badge.processing {
    background: rgba(59, 130, 246, 0.15);
    color: var(--info);
}

.status-badge.processing::before {
    background: var(--info);
    box-shadow: 0 0 8px var(--info);
}

.table-amount {
    font-family: 'Space Mono', monospace;
    font-weight: 600;
    color: var(--text-primary);
}

/* ============================================
   PROGRESS BARS
============================================ */
.progress-card {
    padding: var(--card-padding);
}

.progress-item {
    margin-bottom: 24px;
}

.progress-item:last-child {
    margin-bottom: 0;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.progress-label {
    font-size: 14px;
    font-weight: 500;
}

.progress-value {
    font-family: 'Space Mono', monospace;
    font-size: 14px;
    color: var(--text-secondary);
}

.progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 1s ease-out;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255,255,255,0.3), transparent);
}

.progress-fill.cyan {
    background: linear-gradient(90deg, var(--emerald-light), var(--emerald));
    box-shadow: 0 0 20px rgba(52, 211, 153, 0.4);
}

.progress-fill.magenta {
    background: linear-gradient(90deg, var(--gold-light), var(--gold));
    box-shadow: 0 0 20px rgba(212, 165, 116, 0.4);
}

.progress-fill.purple {
    background: linear-gradient(90deg, var(--coral), var(--amber));
    box-shadow: 0 0 20px rgba(224, 122, 95, 0.4);
}

/* ============================================
   BOTTOM GRID
============================================ */
.bottom-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* ============================================
   CALENDAR WIDGET
============================================ */
.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.calendar-nav {
    display: flex;
    gap: 8px;
}

.calendar-nav-btn {
    width: 32px;
    height: 32px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.calendar-nav-btn:hover {
    background: var(--glass-hover);
    border-color: var(--emerald-light);
}

.calendar-nav-btn svg {
    width: 16px;
    height: 16px;
    color: var(--text-secondary);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    text-align: center;
}

.calendar-day-name {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    padding: 8px 0;
    text-transform: uppercase;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.calendar-day:hover {
    background: var(--glass-hover);
}

.calendar-day.other-month {
    color: var(--text-muted);
}

.calendar-day.today {
    background: linear-gradient(135deg, var(--emerald), var(--emerald-light));
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(5, 150, 105, 0.3);
}

.calendar-day.has-event::after {
    content: '';
    position: absolute;
    bottom: 4px;
    width: 4px;
    height: 4px;
    background: var(--gold);
    border-radius: 50%;
}

/* ============================================
   DONUT CHART
============================================ */
.donut-container {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-top: 20px;
}

.donut-chart {
    width: 140px;
    height: 140px;
    position: relative;
}

.donut-chart svg {
    transform: rotate(-90deg);
}

.donut-chart circle {
    fill: none;
    stroke-width: 20;
}

.donut-bg {
    stroke: rgba(255, 255, 255, 0.1);
}

.donut-segment {
    stroke-linecap: round;
    transition: stroke-dashoffset 1s ease-out;
}

.donut-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.donut-value {
    font-family: 'Space Mono', monospace;
    font-size: 28px;
    font-weight: 700;
}

.donut-label {
    font-size: 12px;
    color: var(--text-muted);
}

.donut-legend {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 4px;
}

.legend-color.cyan { background: var(--emerald-light); }
.legend-color.magenta { background: var(--gold); }
.legend-color.purple { background: var(--coral); }

/* ============================================
   WEATHER WIDGET
============================================ */
.weather-main {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}

.weather-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(52, 211, 153, 0.2), rgba(212, 165, 116, 0.2));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.weather-icon svg {
    width: 45px;
    height: 45px;
    color: var(--emerald-light);
}

.weather-temp {
    font-family: 'Space Mono', monospace;
    font-size: 48px;
    font-weight: 700;
    line-height: 1;
}

.weather-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.weather-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.weather-detail {
    text-align: center;
    padding: 12px;
    background: var(--glass-bg);
    border-radius: 12px;
}

.weather-detail-value {
    font-family: 'Space Mono', monospace;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}

.weather-detail-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
}

/* ============================================
   MOBILE MENU TOGGLE
============================================ */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--emerald), var(--gold));
    border: none;
    border-radius: 16px;
    cursor: pointer;
    z-index: 200;
    box-shadow: 0 8px 32px rgba(5, 150, 105, 0.3);
}

.mobile-menu-toggle svg {
    width: 24px;
    height: 24px;
    color: white;
}

/* ============================================
   LOGIN PAGE STYLES
============================================ */
.login-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.login-container {
    width: 100%;
    max-width: 440px;
}

.login-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: 48px 40px;
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.login-logo {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--emerald), var(--gold));
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 28px;
    margin: 0 auto 20px;
    box-shadow: 0 12px 40px rgba(5, 150, 105, 0.3);
}

.login-title {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 8px;
}

.login-subtitle {
    font-size: 14px;
    color: var(--text-muted);
}

.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 14px 18px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 15px;
    transition: all var(--transition-fast);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-input:focus {
    outline: none;
    border-color: var(--emerald-light);
    box-shadow: 0 0 20px rgba(52, 211, 153, 0.2);
}

.form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
}

.checkbox-label input {
    width: 18px;
    height: 18px;
    accent-color: var(--emerald);
}

.forgot-link {
    font-size: 14px;
    color: var(--emerald-light);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.forgot-link:hover {
    color: var(--gold);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    border: none;
    border-radius: 12px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-primary {
    width: 100%;
    background: linear-gradient(135deg, var(--emerald), var(--emerald-light));
    color: white;
    box-shadow: 0 8px 24px rgba(5, 150, 105, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(5, 150, 105, 0.4);
}

.btn-secondary {
    width: 100%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--glass-hover);
    border-color: var(--emerald-light);
}

.btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 28px 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--glass-border);
}

.divider span {
    font-size: 13px;
    color: var(--text-muted);
}

.social-login {
    display: flex;
    gap: 12px;
    margin-bottom: 28px;
}

.social-btn {
    flex: 1;
    padding: 12px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.social-btn:hover {
    background: var(--glass-hover);
    border-color: var(--emerald-light);
}

.social-btn svg {
    width: 22px;
    height: 22px;
}

.login-footer {
    text-align: center;
    font-size: 14px;
    color: var(--text-muted);
}

.login-footer a {
    color: var(--emerald-light);
    text-decoration: none;
}

.login-footer a:hover {
    color: var(--gold);
}

/* ============================================
   PAGE HEADER (for inner pages)
============================================ */
.page-header {
    margin-bottom: 30px;
}

.page-header .page-title {
    margin-bottom: 8px;
}

.page-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
}

.page-breadcrumb a {
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.page-breadcrumb a:hover {
    color: var(--emerald-light);
}

.page-breadcrumb span {
    color: var(--text-muted);
}

/* ============================================
   FOOTER
============================================ */
.site-footer {
    text-align: center;
    padding: 20px;
    margin-left: var(--sidebar-width);
    color: var(--text-muted);
    font-size: 14px;
}

.site-footer a {
    color: var(--emerald-light);
    transition: color var(--transition-fast);
}

.site-footer a:hover {
    color: var(--gold);
}

/* Login/Register page footer */
.login-page .site-footer {
    margin-left: 0;
    position: relative;
    padding: 30px 20px;
    text-align: center;
    margin-top: 30px;
}

/* Floating Theme Toggle for Login/Register */
.theme-toggle-float {
    position: fixed;
    top: 24px;
    right: 24px;
    width: 45px;
    height: 45px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    transition: all var(--transition-fast);
}

.theme-toggle-float:hover {
    background: var(--glass-hover);
    border-color: var(--emerald-light);
}

.theme-toggle-float svg {
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
}

/* ============================================
   SETTINGS PAGE
============================================ */
.settings-grid {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 24px;
}

.settings-nav {
    list-style: none;
}

.settings-nav-item {
    margin-bottom: 8px;
}

.settings-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    color: var(--text-secondary);
    border-radius: 12px;
    transition: all var(--transition-fast);
}

.settings-nav-link:hover {
    background: var(--glass-hover);
    color: var(--text-primary);
}

.settings-nav-link.active {
    background: var(--glass-hover);
    color: var(--text-primary);
}

.settings-nav-link svg {
    width: 20px;
    height: 20px;
    opacity: 0.7;
}

.settings-nav-link.active svg,
.settings-nav-link:hover svg {
    opacity: 1;
}

.settings-section {
    margin-bottom: 32px;
}

.settings-section:last-child {
    margin-bottom: 0;
}

.settings-section-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--glass-border);
}

.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.settings-row:last-child {
    border-bottom: none;
}

.settings-label {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.settings-label-title {
    font-weight: 500;
    color: var(--text-primary);
}

.settings-label-desc {
    font-size: 13px;
    color: var(--text-muted);
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    width: 50px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 26px;
    transition: all var(--transition-fast);
}

.toggle-slider::before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: var(--text-secondary);
    border-radius: 50%;
    transition: all var(--transition-fast);
}

.toggle-switch input:checked + .toggle-slider {
    background: linear-gradient(135deg, var(--emerald), var(--emerald-light));
    border-color: var(--emerald);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(24px);
    background: white;
}

/* Settings Select Dropdown */
.settings-select {
    padding: 10px 16px;
    background: rgba(19, 36, 25, 0.95);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
    min-width: 150px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2334d399' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.settings-select:focus {
    outline: none;
    border-color: var(--emerald-light);
    box-shadow: 0 0 15px rgba(52, 211, 153, 0.15);
}

.settings-select option {
    background: rgba(19, 36, 25, 0.98);
    color: var(--text-primary);
    padding: 10px;
}

[data-theme="light"] .settings-select {
    background-color: rgba(245, 245, 240, 0.95);
}

[data-theme="light"] .settings-select option {
    background: rgba(245, 245, 240, 0.98);
    color: #1a1a1a;
}

/* Profile Header */
.profile-header {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 32px;
}

.profile-avatar-large {
    width: 100px;
    height: 100px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--emerald), var(--gold));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 36px;
    position: relative;
}

.profile-avatar-edit {
    position: absolute;
    bottom: -8px;
    right: -8px;
    width: 32px;
    height: 32px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.profile-avatar-edit:hover {
    background: var(--glass-hover);
    border-color: var(--emerald-light);
}

.profile-avatar-edit svg {
    width: 16px;
    height: 16px;
    color: var(--text-secondary);
}

.profile-info h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 4px;
}

.profile-info p {
    color: var(--text-muted);
    font-size: 14px;
}

/* Settings Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group-settings {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group-settings.full-width {
    grid-column: span 2;
}

.form-group-settings label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group-settings input,
.form-group-settings textarea {
    padding: 12px 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    transition: all var(--transition-fast);
}

.form-group-settings input:focus,
.form-group-settings textarea:focus {
    outline: none;
    border-color: var(--emerald-light);
    box-shadow: 0 0 20px rgba(52, 211, 153, 0.15);
}

.form-group-settings textarea {
    resize: vertical;
    min-height: 100px;
}

.btn-group {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

/* Settings Tab Content */
.settings-tab-content {
    display: none;
}

.settings-tab-content.active {
    display: block;
    animation: settingsFadeIn 0.3s ease;
}

@keyframes settingsFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   RESPONSIVE DESIGN
============================================ */
@media (max-width: 1400px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .bottom-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1200px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .table-card {
        grid-column: span 1;
    }
}

@media (max-width: 992px) {
    :root {
        --sidebar-width: 0px;
    }
    
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .bottom-grid {
        grid-template-columns: 1fr;
    }

    .site-footer {
        margin-left: 0;
    }

    .settings-grid {
        grid-template-columns: 1fr;
    }

    .settings-nav-card {
        display: none;
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .navbar {
        flex-wrap: wrap;
    }
    
    .search-box {
        order: 3;
        width: 100%;
    }
    
    .search-input {
        width: 100%;
    }
    
    .page-title {
        font-size: 22px;
    }
    
    .donut-container {
        flex-direction: column;
    }

    .login-card {
        padding: 36px 24px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-group-settings.full-width {
        grid-column: span 1;
    }

    .profile-header {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 20px 15px;
    }
    
    .glass-card {
        padding: 18px;
    }
    
    .stat-value {
        font-size: 26px;
    }
    
    .data-table {
        font-size: 13px;
    }
    
    .data-table th,
    .data-table td {
        padding: 12px 8px;
    }

    .social-login {
        flex-direction: column;
    }
}

/* ============================================
   ANIMATIONS
============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.glass-card {
    animation: fadeInUp 0.6s ease-out backwards;
}

.stats-grid .glass-card:nth-child(1) { animation-delay: 0.1s; }
.stats-grid .glass-card:nth-child(2) { animation-delay: 0.2s; }
.stats-grid .glass-card:nth-child(3) { animation-delay: 0.3s; }
.stats-grid .glass-card:nth-child(4) { animation-delay: 0.4s; }

.content-grid .glass-card:nth-child(1) { animation-delay: 0.5s; }
.content-grid .glass-card:nth-child(2) { animation-delay: 0.6s; }
.content-grid .glass-card:nth-child(3) { animation-delay: 0.7s; }

.bottom-grid .glass-card:nth-child(1) { animation-delay: 0.8s; }
.bottom-grid .glass-card:nth-child(2) { animation-delay: 0.9s; }
.bottom-grid .glass-card:nth-child(3) { animation-delay: 1s; }

.login-card {
    animation: fadeInUp 0.6s ease-out;
}

/* ============================================
   MASONRY PHOTO GALLERY
============================================ */

.gallery-card {
    margin-bottom: 30px;
}

.photo-masonry {
    column-count: 4;
    column-gap: 16px;
}

.photo-tile {
    position: relative;
    display: block;

    width: 100%;
    margin: 0 0 16px;

    break-inside: avoid;
    -webkit-column-break-inside: avoid;
    page-break-inside: avoid;

    overflow: hidden;
    border: 1px solid var(--glass-border);
    border-radius: 14px;

    background: var(--glass-bg);
    color: var(--text-primary);

    transition:
        transform var(--transition-normal),
        border-color var(--transition-fast),
        box-shadow var(--transition-normal);
}

.photo-tile img {
    display: block;
    width: 100%;
    height: auto;

    transition: transform var(--transition-normal);
}

.photo-tile:hover {
    transform: translateY(-3px);
    border-color: var(--emerald-light);
    box-shadow: 0 14px 32px var(--glass-shadow);
}

.photo-tile:hover img {
    transform: scale(1.03);
}

.photo-caption {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;

    padding: 28px 14px 12px;

    background: linear-gradient(
        to bottom,
        transparent,
        rgba(0, 0, 0, 0.78)
    );

    color: #ffffff;
    font-size: 14px;
    font-weight: 500;

    opacity: 0;
    transform: translateY(6px);

    transition:
        opacity var(--transition-fast),
        transform var(--transition-fast);
}

.photo-tile:hover .photo-caption,
.photo-tile:focus-visible .photo-caption {
    opacity: 1;
    transform: translateY(0);
}

/* Medium desktop */
@media (max-width: 1400px) {
    .photo-masonry {
        column-count: 3;
    }
}

/* Tablet */
@media (max-width: 992px) {
    .photo-masonry {
        column-count: 2;
    }
}

/* Mobile */
@media (max-width: 600px) {
    .photo-masonry {
        column-count: 1;
    }
}

.faq {
	padding-top: 30px;
	padding-bottom: 50px;
	color: var(--navigation-text-colour);
}

.faq__title,
.faq__intro,
.faq__category-title,
.faq__question,
.faq__answer {
    color: inherit;
}

.faq__header {
	margin-bottom: 35px;
}

.faq__title {
	margin-bottom: 10px;
}

.faq__intro {
	margin-bottom: 0;
}

.faq__category + .faq__category {
	margin-top: 45px;
}

.faq__category-title {
	margin-bottom: 15px;
}

.faq__item {
	border-bottom: 1px solid var(--faq-separator-colour);
}

.faq__item:first-of-type {
	border-top: 1px solid var(--faq-separator-colour);
}

.faq__question {
	position: relative;
	padding: 8px 45px 8px 0;
	font-weight: 700;
	cursor: pointer;
	list-style: none;
}

/*
 * Removes the browser's default disclosure arrow so that
 * we can use our own consistent icon.
 */
.faq__question::-webkit-details-marker {
	display: none;
}

.faq__question::after {
	content: "+";
	position: absolute;
	top: 50%;
	right: 10px;
	font-size: 1.5rem;
	font-weight: 400;
	line-height: 1;
	transform: translateY(-50%);
}

.faq__item[open] .faq__question::after {
	content: "−";
}

.faq__question:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 4px;
}

.faq__answer {
	padding: 0 45px 18px 0;
}

.faq__answer p:last-child {
	margin-bottom: 0;
}

/* FAQ entrance animation */
.faq__header,
.faq__category {
    animation: fadeInUp 0.6s ease-out backwards;
}

.faq__header {
    animation-delay: 0.1s;
}

.faq__category:nth-of-type(1) {
    animation-delay: 0.2s;
}

.faq__category:nth-of-type(2) {
    animation-delay: 0.3s;
}

.faq__category:nth-of-type(3) {
    animation-delay: 0.4s;
}

.faq__category:nth-of-type(4) {
    animation-delay: 0.5s;
}




/* ============================================
   MESSAGES PAGE
============================================ */

.messages-card {
    padding: 0;
    margin-bottom: 30px;
}

.messages-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;

    padding: 22px 24px;
    border-bottom: 1px solid var(--glass-border);
}

.messages-tabs {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    padding: 5px;

    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
}

.messages-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    min-height: 40px;
    padding: 8px 14px;

    background: transparent;
    border: 1px solid transparent;
    border-radius: 9px;

    color: var(--text-secondary);
    font: inherit;
    font-size: 14px;
    font-weight: 500;

    cursor: pointer;

    transition:
        color var(--transition-fast),
        background var(--transition-fast),
        border-color var(--transition-fast);
}

.messages-tab:hover {
    background: var(--glass-hover);
    color: var(--text-primary);
}

.messages-tab.active {
    background: var(--glass-hover);
    border-color: var(--emerald-light);
    color: var(--text-primary);
}

.messages-tab:focus-visible {
    outline: 2px solid var(--brand-blue-ui);
    outline-offset: 2px;
}

.messages-tab-count {
    min-width: 22px;
    padding: 1px 7px;

    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;

    color: var(--text-muted);
    font-size: 11px;
    text-align: center;
}

.messages-tab.active .messages-tab-count {
    color: var(--text-primary);
}

.messages-panel {
    padding: 10px 24px 24px;
}

.messages-panel.active {
    animation: messagesPanelFade 0.3s ease;
}

.messages-panel[hidden] {
    display: none;
}

@keyframes messagesPanelFade {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.messages-table-wrapper {
    margin-top: 4px;
}

.messages-table {
    width: 100%;
    min-width: 1000px;
    table-layout: fixed;
}

.messages-table th,
.messages-table td {
    vertical-align: middle;
}

.messages-table td {
    border-bottom-color: var(--glass-border);
}

.messages-table tbody tr:last-child td {
    border-bottom: none;
}

.messages-column-avatar {
    width: 72px;
}

.messages-column-person {
    width: 190px;
}

.messages-column-date {
    width: 135px;
}

.messages-column-subject {
    width: 210px;
}

.messages-column-message {
    width: auto;
}

.messages-column-action {
    width: 92px;
}

.message-row.is-unread .message-person-name,
.message-row.is-unread .message-subject {
    font-weight: 600;
    color: var(--text-primary);
}

.message-row.is-unread td:first-child {
    box-shadow: inset 3px 0 0 var(--brand-blue-ui);
}

.message-avatar {
    display: block;
    width: 42px;
    height: 42px;

    overflow: hidden;

    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 11px;
}

.message-avatar-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.message-person {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.message-direction {
    margin-bottom: 1px;

    color: var(--text-muted);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.7px;
    text-transform: uppercase;
}

.message-person-name {
    overflow: hidden;

    color: var(--text-primary);
    font-weight: 500;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.message-person-email {
    overflow: hidden;

    color: var(--text-muted);
    font-size: 12px;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.message-date,
.message-time {
    display: block;
}

.message-date {
    color: var(--text-secondary);
    white-space: nowrap;
}

.message-time {
    color: var(--text-muted);
    font-size: 12px;
}

.message-subject {
    display: block;

    overflow: hidden;

    color: var(--text-primary);
    font-weight: 500;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.message-preview {
    display: -webkit-box;
    overflow: hidden;

    color: var(--text-secondary);
    line-height: 1.45;

    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.message-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    min-height: 34px;
    padding: 6px 10px;

    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 8px;

    color: var(--text-secondary);
    font: inherit;
    font-size: 12px;
    font-weight: 500;

    cursor: pointer;

    transition:
        color var(--transition-fast),
        background var(--transition-fast),
        border-color var(--transition-fast),
        transform var(--transition-fast);
}

.message-action:hover {
    background: var(--glass-hover);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.message-action:focus-visible {
    outline: 2px solid var(--brand-blue-ui);
    outline-offset: 2px;
}

.message-action-reply:hover {
    border-color: var(--emerald-light);
}

.message-action-archive {
    color: var(--warning);
}

.message-action-archive:hover {
    border-color: var(--warning);
    color: var(--warning);
}

.message-action-delete {
    color: var(--danger);
}

.message-action-delete:hover {
    border-color: var(--danger);
    color: var(--danger);
}

/* Hide captions visually while retaining them for screen readers */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.messages-column-actions {
    width: 245px;
}

.message-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}


@media (max-width: 1250px) {

    .messages-table,
    .messages-table tbody {
        display: block;
        width: 100%;
        min-width: 0;
    }

    .messages-table thead {
        display: none;
    }

    .messages-table tbody {
        display: grid;
        gap: 14px;
    }

    .messages-table .message-row {
        display: grid;

        grid-template-columns: 52px minmax(0, 1fr) auto;

        grid-template-areas:
            "avatar person date"
            "subject subject subject"
            "message message message"
            "actions actions actions";

        gap: 10px 14px;

        padding: 16px;

        background: var(--glass-bg);
        border: 1px solid var(--glass-border);
        border-radius: 14px;
    }

    .messages-table .message-row > td {
        display: block;
        padding: 0;
        border: 0;
    }

    .message-cell-avatar {
        grid-area: avatar;
    }

    .message-cell-person {
        grid-area: person;
    }

    .message-cell-date {
        grid-area: date;
        text-align: right;
    }

    .message-cell-subject {
        grid-area: subject;

        padding-top: 10px !important;
        border-top: 1px solid var(--glass-border) !important;
    }

    .message-cell-message {
        grid-area: message;
    }

    .message-cell-actions {
        grid-area: actions;
    }
}


@media (max-width: 600px) {

    .messages-table .message-row {
        grid-template-columns: 44px minmax(0, 1fr);

        grid-template-areas:
            "avatar person"
            "avatar date"
            "subject subject"
            "message message"
            "actions actions";
    }

    .message-cell-date {
        text-align: left;
    }

    .message-actions {
        grid-template-columns: 1fr 1fr;
    }

    .message-action-reply {
        grid-column: 1 / -1;
    }
}

/* ============================================
   PROFILE OPTION DROPDOWNS
============================================ */

.profile-choice-dropdown {
    position: relative;
    width: 100%;
}

.profile-choice-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    width: 100%;
    padding: 12px 14px;

    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;

    color: var(--text-primary);
    font-size: 14px;

    cursor: pointer;

    transition:
        background var(--transition-fast),
        border-color var(--transition-fast);
}

.profile-choice-summary::-webkit-details-marker {
    display: none;
}

.profile-choice-summary::marker {
    content: "";
}

.profile-choice-summary:hover,
.profile-choice-dropdown[open] .profile-choice-summary {
    background: var(--glass-hover);
    border-color: var(--emerald-light);
}

.profile-choice-summary:focus-visible {
    outline: 2px solid var(--brand-blue-ui);
    outline-offset: 2px;
}

.profile-choice-summary svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;

    color: var(--text-muted);

    transition: transform var(--transition-fast);
}

.profile-choice-dropdown[open] .profile-choice-summary svg {
    transform: rotate(180deg);
}

.profile-choice-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;

    z-index: 50;

    padding: 6px;

    background: var(--user-menu-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);

    border: 1px solid var(--glass-border);
    border-radius: 12px;

    box-shadow: 0 14px 35px var(--glass-shadow);
}

.profile-choice-option {
    display: flex;
    align-items: center;
    gap: 10px;

    padding: 9px 10px;

    border-radius: 8px;

    color: var(--text-secondary);
    font-size: 14px;

    cursor: pointer;

    transition:
        background var(--transition-fast),
        color var(--transition-fast);
}

.profile-choice-option:hover {
    background: var(--glass-hover);
    color: var(--text-primary);
}

.profile-choice-option input[type="radio"] {
    flex-shrink: 0;
    accent-color: var(--emerald);
}


/* Location enable option */

.profile-enable-option {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    margin-top: 10px;

    color: var(--text-secondary);
    font-size: 13px;

    cursor: pointer;
}

.profile-enable-option input[type="checkbox"] {
    flex-shrink: 0;
    accent-color: var(--emerald);
}

.profile-location-select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Location select */

.profile-location-select {
    width: 100%;
}


/* ============================================
   PROFILE ACTION BUTTONS
============================================ */

.profile-action-buttons {
    display: grid;
    grid-template-columns: repeat(4, minmax(110px, 150px));
    justify-content: center;

    gap: 18px;

    margin-top: 30px;
}

.profile-action-buttons .btn {
    width: 100%;
}


/* Intermediate widths */

@media (max-width: 850px) {

    .profile-action-buttons {
        grid-template-columns: repeat(2, minmax(120px, 180px));
    }

}


/* Mobile */

@media (max-width: 480px) {

    .profile-action-buttons {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

}

/* ============================================
   FRIENDS
============================================ */

.friends-card {
    padding: 0;
    margin-bottom: 30px;
}


/* Header */

.friends-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;

    padding: 22px 24px;

    border-bottom: 1px solid var(--glass-border);
}

.friends-card-header h2 {
    margin: 0;
    color: var(--text-primary);
    font-size: 20px;
    font-weight: 600;
}

.friends-card-description {
    margin: 4px 0 0;
    color: var(--text-muted);
    font-size: 13px;
}


/* Table */

.friends-table-wrapper {
    padding: 10px 24px 24px;
}

.friends-table {
    min-width: 700px;
    table-layout: fixed;
}

.friends-table th,
.friends-table td {
    vertical-align: middle;
}

.friends-table td {
    border-bottom-color: var(--glass-border);
}

.friends-table tbody tr:last-child td {
    border-bottom: none;
}


/* Columns */

.friends-column-avatar {
    width: 90px;
}

.friends-column-user {
    width: 240px;
}

.friends-column-actions {
    width: auto;
}


/* Avatar */

.friend-avatar {
    display: block;

    width: 48px;
    height: 48px;

    overflow: hidden;

    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
}

.friend-avatar-image {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;
}


/* User */

.friend-user-name {
    display: block;

    overflow: hidden;

    color: var(--text-primary);
    font-weight: 500;

    text-overflow: ellipsis;
    white-space: nowrap;
}


/* Actions */

.friend-actions {
    display: grid;
    grid-template-columns: repeat(5, minmax(60px, 1fr));
    gap: 8px;

    width: 100%;
}

.friend-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 36px;
    padding: 7px 12px;

    background: var(--glass-bg);

    border: 1px solid var(--glass-border);
    border-radius: 8px;

    color: var(--text-secondary);

    font: inherit;
    font-size: 13px;
    font-weight: 500;

    cursor: pointer;

    transition:
        color var(--transition-fast),
        background var(--transition-fast),
        border-color var(--transition-fast),
        transform var(--transition-fast);
}

.friend-action:hover {
    background: var(--glass-hover);
    border-color: var(--emerald-light);

    color: var(--text-primary);

    transform: translateY(-1px);
}

.friend-action:focus-visible {
    outline: 2px solid var(--brand-blue-ui);
    outline-offset: 2px;
}


/* ============================================
   RESPONSIVE - TABLE BECOMES CARDS
============================================ */

@media (max-width: 1100px) {

    .friends-table,
    .friends-table tbody {
        display: block;

        width: 100%;
        min-width: 0;
    }

    .friends-table thead {
        display: none;
    }

    .friends-table tbody {
        display: grid;
        gap: 14px;
    }

    .friends-table .friend-row {
        display: grid;

        grid-template-columns: 58px minmax(0, 1fr);
        grid-template-areas:
            "avatar user"
            "actions actions";

        align-items: center;

        gap: 14px;

        padding: 16px;

        background: var(--glass-bg);

        border: 1px solid var(--glass-border);
        border-radius: 14px;
    }

    .friends-table .friend-row > td {
        display: block;

        padding: 0;

        border: 0;
    }

    .friend-cell-avatar {
        grid-area: avatar;
    }

    .friend-cell-user {
        grid-area: user;
    }

    .friend-cell-actions {
        grid-area: actions;

        padding-top: 12px !important;

        border-top: 1px solid var(--glass-border) !important;
    }

    .friends-table-wrapper {
        overflow-x: visible;
    }

}


/* ============================================
   TABLET
============================================ */

@media (max-width: 768px) {

    .friends-card-header {
        padding: 18px;
    }

    .friends-table-wrapper {
        padding: 12px 18px 20px;
    }

    .friend-actions {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

}


/* ============================================
   MOBILE
============================================ */

@media (max-width: 600px) {

    .friends-table-wrapper {
        padding: 10px 12px 16px;
    }

    .friends-table .friend-row {
        grid-template-columns: 48px minmax(0, 1fr);

        gap: 10px 12px;

        padding: 14px;
    }

    .friend-avatar {
        width: 44px;
        height: 44px;

        border-radius: 11px;
    }

    .friend-user-name {
        font-size: 14px;
    }

    .friend-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    /*
     * Five buttons don't divide evenly into two columns,
     * so centre the final button by making it full width.
     */
    .friend-action:nth-child(5) {
        grid-column: 1 / -1;
    }

}


/* Very small screens */

@media (max-width: 380px) {

    .friends-card-header {
        padding: 16px;
    }

    .friends-table-wrapper {
        padding: 10px;
    }

    .friend-actions {
        gap: 6px;
    }

    .friend-action {
        min-height: 38px;
        padding: 7px 8px;
    }

}

/* ============================================
   PHOTOS PAGE
============================================ */

.photos-card {
    padding: 0;
    margin-bottom: 30px;
}


/* ============================================
   UPLOAD AREA
============================================ */

.photos-upload-section {
    padding: 24px;
    border-bottom: 1px solid var(--glass-border);
}

.photos-drop-area {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;

    min-height: 220px;
    padding: 30px;

    background: var(--glass-bg);

    border: 2px dashed var(--glass-border);
    border-radius: 16px;

    text-align: center;

    transition:
        background var(--transition-fast),
        border-color var(--transition-fast),
        transform var(--transition-fast);
}

.photos-drop-area:hover {
    background: var(--glass-hover);
    border-color: var(--emerald-light);
}

.photos-drop-area.is-dragging {
    background: var(--glass-hover);
    border-color: var(--emerald-light);

    transform: scale(1.005);
}

.photos-upload-icon {
    width: 42px;
    height: 42px;

    margin-bottom: 14px;

    color: var(--emerald-light);
}

.photos-drop-title {
    color: var(--text-primary);

    font-size: 18px;
    font-weight: 600;
}

.photos-drop-text {
    margin: 8px 0;

    color: var(--text-muted);
    font-size: 13px;
}

.photos-file-button {
    width: auto;
    min-width: 150px;
}

.photos-upload-status {
    min-height: 18px;

    margin-top: 12px;

    color: var(--text-muted);
    font-size: 12px;
}


/* ============================================
   CATEGORY BAR
============================================ */

.photos-category-section {
    padding: 18px 24px;

    border-bottom: 1px solid var(--glass-border);
}

.photos-category-bar {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));

    gap: 7px;

    padding: 5px;

    background: var(--glass-bg);

    border: 1px solid var(--glass-border);
    border-radius: 13px;
}

.photo-category {
    display: flex;
    align-items: center;
    justify-content: center;

    min-height: 40px;
    padding: 8px 10px;

    background: transparent;

    border: 1px solid transparent;
    border-radius: 9px;

    color: var(--text-secondary);

    font: inherit;
    font-size: 13px;
    font-weight: 500;

    cursor: pointer;

    transition:
        background var(--transition-fast),
        border-color var(--transition-fast),
        color var(--transition-fast);
}

.photo-category:hover {
    background: var(--glass-hover);
    color: var(--text-primary);
}

.photo-category.active {
    background: var(--glass-hover);
    border-color: var(--emerald-light);

    color: var(--text-primary);
}

.photo-category:focus-visible {
    outline: 2px solid var(--brand-blue-ui);
    outline-offset: 2px;
}


/* ============================================
   PHOTO GRID
============================================ */

.photos-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));

    gap: 18px;

    padding: 24px;
}

.photo-grid-item {
    position: relative;

    overflow: hidden;

    aspect-ratio: 4 / 3;

    background: var(--glass-bg);

    border: 1px solid var(--glass-border);
    border-radius: 14px;

    animation: fadeInUp 0.35s ease;
}

.photo-grid-image {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;

    transition: transform 0.3s ease;
}

.photo-grid-item:hover .photo-grid-image {
    transform: scale(1.025);
}

.photo-grid-item[hidden] {
    display: none;
}


/* ============================================
   EMPTY CATEGORY MESSAGE
============================================ */

.photos-empty {
    margin: 0 24px 24px;
    padding: 30px;

    background: var(--glass-bg);

    border: 1px solid var(--glass-border);
    border-radius: 14px;

    color: var(--text-muted);

    text-align: center;
}


/* ============================================
   INTERMEDIATE WIDTH
============================================ */

@media (max-width: 1000px) {

    .photos-category-bar {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .photos-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}


/* ============================================
   MOBILE
============================================ */

@media (max-width: 600px) {

    .photos-upload-section {
        padding: 16px;
    }

    .photos-drop-area {
        min-height: 190px;

        padding: 24px 16px;
    }

    .photos-upload-icon {
        width: 36px;
        height: 36px;
    }

    .photos-drop-title {
        font-size: 16px;
    }


    .photos-category-section {
        padding: 14px 16px;
    }

    .photos-category-bar {
        grid-template-columns: repeat(2, minmax(0, 1fr));

        gap: 5px;
    }

    .photo-category {
        min-height: 38px;

        padding: 7px 6px;

        font-size: 12px;
    }


    .photos-grid {
        grid-template-columns: 1fr;

        gap: 14px;

        padding: 16px;
    }

    .photos-empty {
        margin: 0 16px 16px;
    }

}


/* ============================================
   VERY SMALL MOBILE
============================================ */

@media (max-width: 380px) {

    .photos-upload-section {
        padding: 12px;
    }

    .photos-category-section {
        padding: 12px;
    }

    .photos-grid {
        padding: 12px;
    }

}

/* ============================================
   ADMIN PAGE
============================================ */

.admin-card {
    padding: 24px;
    margin-bottom: 30px;
}


/* ============================================
   ADMIN CONTROLS
============================================ */

.admin-controls {
    display: flex;
    justify-content: center;

    width: 100%;
}

.admin-impersonate {
    width: 100%;
    max-width: 500px;
}

.admin-impersonate .settings-select {
    width: 100%;
}


/* ============================================
   ADMIN ACTION BUTTONS
============================================ */

.admin-action-buttons {
    display: grid;
    grid-template-columns: repeat(2, minmax(120px, 180px));
    justify-content: center;

    gap: 20px;

    margin-top: 30px;
    padding-top: 24px;

    border-top: 1px solid var(--glass-border);
}

.admin-action-buttons .btn {
    width: 100%;
}


/* ============================================
   MOBILE
============================================ */

@media (max-width: 600px) {

    .admin-card {
        padding: 18px;
    }

    .admin-action-buttons {
        grid-template-columns: repeat(2, minmax(0, 1fr));

        gap: 10px;

        margin-top: 24px;
        padding-top: 20px;
    }

}


/* ============================================
   VERY SMALL MOBILE
============================================ */

@media (max-width: 380px) {

    .admin-card {
        padding: 16px;
    }

}

/* ============================================
   COOKIE POLICY
============================================ */

.cookie-policy-card {
    padding: 0;
    margin-bottom: 30px;
}


/* Header */

.cookie-policy-header {
    padding: 24px;

    border-bottom: 1px solid var(--glass-border);
}

.cookie-policy-header h2 {
    margin: 0;

    color: var(--text-primary);

    font-size: 22px;
    font-weight: 600;
}

.cookie-policy-updated {
    margin: 5px 0 0;

    color: var(--text-muted);

    font-size: 13px;
}


/* Main content */

.cookie-policy-content {
    padding: 24px;
}

.cookie-policy-content > p:first-child {
    margin-top: 0;
}

.cookie-policy-content p {
    margin: 0 0 14px;

    color: var(--text-secondary);

    line-height: 1.65;
}

.cookie-policy-content strong {
    color: var(--text-primary);
    font-weight: 600;
}

.cookie-policy-content a {
    color: var(--emerald-light);

    text-decoration: none;

    transition: color var(--transition-fast);
}

.cookie-policy-content a:hover {
    color: var(--text-primary);
    text-decoration: underline;
}


/* Sections */

.cookie-policy-section {
    margin-top: 30px;
    padding-top: 26px;

    border-top: 1px solid var(--glass-border);
}

.cookie-policy-section h3 {
    margin: 0 0 14px;

    color: var(--text-primary);

    font-size: 17px;
    font-weight: 600;
}

.cookie-policy-section p:last-child {
    margin-bottom: 0;
}


/* ============================================
   COOKIE INFORMATION CARDS
============================================ */

.cookie-details-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 18px;

    margin-top: 20px;
}

.cookie-details-card {
    overflow: hidden;

    background: var(--glass-bg);

    border: 1px solid var(--glass-border);
    border-radius: 14px;
}

.cookie-details-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 12px;

    padding: 15px 16px;

    border-bottom: 1px solid var(--glass-border);
}

.cookie-details-name {
    color: var(--text-primary);

    font-weight: 600;

    word-break: break-word;
}

.cookie-details-badge {
    flex-shrink: 0;

    padding: 3px 8px;

    background: var(--glass-hover);

    border: 1px solid var(--emerald-light);
    border-radius: 20px;

    color: var(--text-secondary);

    font-size: 10px;
    font-weight: 600;

    letter-spacing: 0.5px;
    text-transform: uppercase;
}


/* Definition list */

.cookie-details-list {
    margin: 0;
}

.cookie-detail-row {
    display: grid;
    grid-template-columns: 95px minmax(0, 1fr);

    gap: 14px;

    padding: 12px 16px;

    border-bottom: 1px solid var(--glass-border);
}

.cookie-detail-row:last-child {
    border-bottom: none;
}

.cookie-detail-row dt {
    color: var(--text-muted);

    font-size: 12px;
    font-weight: 600;
}

.cookie-detail-row dd {
    min-width: 0;
    margin: 0;

    color: var(--text-secondary);

    font-size: 13px;
    line-height: 1.5;

    overflow-wrap: anywhere;
}

.cookie-detail-row dd a {
    display: block;

    margin-top: 4px;

    font-size: 12px;
}


/* ============================================
   BROWSER LINKS
============================================ */

.cookie-browser-links {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));

    gap: 10px;

    margin-top: 16px;
}

.cookie-browser-links a {
    display: flex;
    align-items: center;
    justify-content: center;

    min-height: 42px;
    padding: 9px 12px;

    background: var(--glass-bg);

    border: 1px solid var(--glass-border);
    border-radius: 9px;

    color: var(--text-secondary);

    font-size: 13px;
    font-weight: 500;

    text-align: center;

    transition:
        background var(--transition-fast),
        border-color var(--transition-fast),
        color var(--transition-fast);
}

.cookie-browser-links a:hover {
    background: var(--glass-hover);

    border-color: var(--emerald-light);

    color: var(--text-primary);

    text-decoration: none;
}


/* Contact section */

.cookie-policy-contact {
    margin-bottom: 0;
}


/* ============================================
   TABLET
============================================ */

@media (max-width: 800px) {

    .cookie-details-grid {
        grid-template-columns: 1fr;
    }

    .cookie-browser-links {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}


/* ============================================
   MOBILE
============================================ */

@media (max-width: 600px) {

    .cookie-policy-header {
        padding: 18px;
    }

    .cookie-policy-header h2 {
        font-size: 20px;
    }

    .cookie-policy-content {
        padding: 18px;
    }

    .cookie-policy-section {
        margin-top: 24px;
        padding-top: 22px;
    }

    .cookie-details-grid {
        gap: 14px;
    }

    .cookie-detail-row {
        grid-template-columns: 82px minmax(0, 1fr);

        gap: 10px;

        padding: 11px 13px;
    }

}


/* ============================================
   SMALL MOBILE
============================================ */

@media (max-width: 420px) {

    .cookie-policy-header,
    .cookie-policy-content {
        padding-left: 16px;
        padding-right: 16px;
    }

    .cookie-browser-links {
        grid-template-columns: 1fr;
    }

    .cookie-detail-row {
        grid-template-columns: 1fr;

        gap: 3px;
    }

    .cookie-detail-row dt {
        font-size: 11px;
        text-transform: uppercase;
        letter-spacing: 0.4px;
    }

}

/* ============================================
   PRIVACY POLICY
============================================ */

.privacy-policy-card {
    padding: 0;
    margin-bottom: 30px;
}


/* ============================================
   HEADER
============================================ */

.privacy-policy-header {
    padding: 24px;

    border-bottom: 1px solid var(--glass-border);
}

.privacy-policy-header h2 {
    margin: 0;

    color: var(--text-primary);

    font-size: 22px;
    font-weight: 600;
}

.privacy-policy-updated {
    margin: 5px 0 0;

    color: var(--text-muted);

    font-size: 13px;
}


/* ============================================
   CONTENT
============================================ */

.privacy-policy-content {
    padding: 24px;
}

.privacy-policy-content > p:first-child {
    margin-top: 0;
}

.privacy-policy-content p {
    margin: 0 0 14px;

    color: var(--text-secondary);

    line-height: 1.65;
}

.privacy-policy-content strong {
    color: var(--text-primary);
    font-weight: 600;
}

.privacy-policy-content a {
    color: var(--emerald-light);

    text-decoration: none;

    transition: color var(--transition-fast);
}

.privacy-policy-content a:hover {
    color: var(--text-primary);
    text-decoration: underline;
}


/* ============================================
   SECTIONS
============================================ */

.privacy-policy-section {
    margin-top: 30px;
    padding-top: 26px;

    border-top: 1px solid var(--glass-border);
}

.privacy-policy-section h3 {
    margin: 0 0 14px;

    color: var(--text-primary);

    font-size: 17px;
    font-weight: 600;
}

.privacy-policy-section p:last-child {
    margin-bottom: 0;
}


/* ============================================
   LISTS
============================================ */

.privacy-policy-list {
    display: grid;
    gap: 10px;

    margin: 14px 0 0;
    padding: 0;

    list-style: none;
}

.privacy-policy-list li {
    position: relative;

    padding: 12px 14px 12px 38px;

    background: var(--glass-bg);

    border: 1px solid var(--glass-border);
    border-radius: 10px;

    color: var(--text-secondary);

    line-height: 1.55;
}

.privacy-policy-list li::before {
    content: "";

    position: absolute;

    top: 18px;
    left: 17px;

    width: 7px;
    height: 7px;

    background: var(--emerald-light);

    border-radius: 50%;
}


/* ============================================
   CONTACT DETAILS
============================================ */

.privacy-contact-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 12px;

    margin-top: 16px;
}

.privacy-contact-item {
    display: flex;
    align-items: center;

    gap: 11px;

    min-width: 0;
    min-height: 48px;

    padding: 11px 14px;

    background: var(--glass-bg);

    border: 1px solid var(--glass-border);
    border-radius: 10px;

    color: var(--text-secondary) !important;

    transition:
        background var(--transition-fast),
        border-color var(--transition-fast),
        color var(--transition-fast);
}

.privacy-contact-item:hover {
    background: var(--glass-hover);

    border-color: var(--emerald-light);

    color: var(--text-primary) !important;

    text-decoration: none !important;
}

.privacy-contact-item svg {
    flex-shrink: 0;

    width: 19px;
    height: 19px;

    color: var(--emerald-light);
}

.privacy-contact-item span {
    min-width: 0;

    overflow-wrap: anywhere;
}


/* ============================================
   MOBILE
============================================ */

@media (max-width: 600px) {

    .privacy-policy-header {
        padding: 18px;
    }

    .privacy-policy-header h2 {
        font-size: 20px;
    }

    .privacy-policy-content {
        padding: 18px;
    }

    .privacy-policy-section {
        margin-top: 24px;
        padding-top: 22px;
    }

    .privacy-contact-details {
        grid-template-columns: 1fr;
    }

}


/* ============================================
   SMALL MOBILE
============================================ */

@media (max-width: 420px) {

    .privacy-policy-header,
    .privacy-policy-content {
        padding-left: 16px;
        padding-right: 16px;
    }

    .privacy-policy-list li {
        padding: 11px 12px 11px 34px;
    }

    .privacy-policy-list li::before {
        left: 14px;
    }

}

/* ============================================
   SETTINGS - SINGLE PAGE LAYOUT
============================================ */

.settings-page-card {
    padding: 0;
    margin-bottom: 30px;
}


/* Former tabs are now permanent page sections */

.settings-page-group {
    padding: 28px 24px;
}

.settings-page-group + .settings-page-group {
    border-top: 1px solid var(--glass-border);
}


/* Major section heading */

.settings-page-group-header {
    margin-bottom: 24px;
}

.settings-page-group-title {
    margin: 0;

    color: var(--text-primary);

    font-size: 22px;
    font-weight: 600;
}


/* Prevent first inner section from creating
   unnecessary extra spacing */

.settings-page-group > .settings-section:first-of-type {
    margin-top: 0;
}


/* ============================================
   BILLING
============================================ */

.billing-plan-card {
    padding: 24px;

    background: var(--glass-bg);

    border: 1px solid var(--glass-border);
    border-radius: 16px;
}

.billing-plan-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 18px;
}

.billing-plan-header h4 {
    margin: 0 0 4px;

    color: var(--text-primary);

    font-size: 20px;
    font-weight: 600;
}

.billing-plan-header p {
    margin: 0;

    color: var(--text-muted);

    font-size: 14px;
}

.billing-plan-price {
    flex-shrink: 0;

    text-align: right;
}

.billing-plan-price strong {
    color: var(--text-primary);

    font-family: 'Space Mono', monospace;
    font-size: 30px;
    font-weight: 700;
}

.billing-plan-price span {
    color: var(--text-muted);
}

.billing-plan-actions {
    display: flex;
    flex-wrap: wrap;

    gap: 12px;
}

.billing-plan-actions .btn {
    width: auto;
}


.billing-payment-label {
    display: flex;
    align-items: center;

    gap: 16px;
}

.billing-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    width: 48px;
    height: 32px;

    background: var(--glass-hover);

    border: 1px solid var(--glass-border);
    border-radius: 6px;

    color: var(--text-primary);

    font-size: 10px;
    font-weight: 700;
}

.billing-add-payment {
    margin-top: 16px;
}

.billing-add-payment .btn {
    width: auto;
}

.settings-page-group .data-table a {
    color: var(--emerald-light);
    text-decoration: none;
}

.settings-page-group .data-table a:hover {
    color: var(--text-primary);
    text-decoration: underline;
}


/* ============================================
   TABLET / MOBILE
============================================ */

@media (max-width: 768px) {

    .settings-page-group {
        padding: 24px 18px;
    }

    .settings-page-group-title {
        font-size: 20px;
    }

    .billing-plan-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .billing-plan-price {
        text-align: left;
    }

}


/* ============================================
   MOBILE
============================================ */

@media (max-width: 600px) {

    .settings-page-group {
        padding: 22px 16px;
    }

    .settings-page-group-header {
        margin-bottom: 20px;
    }

    .billing-plan-card {
        padding: 18px;
    }

    .billing-plan-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .billing-plan-actions .btn {
        width: 100%;
    }

    .billing-payment-label {
        gap: 12px;
    }

}


/* ============================================
   SMALL MOBILE
============================================ */

@media (max-width: 420px) {

    .settings-page-group {
        padding-left: 14px;
        padding-right: 14px;
    }

}