/* =============================================================================
   File        : assets/css/style.css
   Purpose     : Main application stylesheet for all authenticated pages.
                 Covers: layout/sidebar, dashboard cards, media kit table,
                 lightbox modal, category filter tabs, badges, and responsive
                 behaviour. Auth pages use auth.css instead.
   ============================================================================= */

/* -----------------------------------------------------------------------------
   CSS Variables — same palette as auth.css for consistency
   ----------------------------------------------------------------------------- */
:root {
    /* Brand */
    --color-primary:        #00C896;
    --color-primary-dark:   #00A87E;
    --color-primary-light:  #E6FBF5;
    --color-primary-glow:   rgba(0, 200, 150, 0.15);

    /* Backgrounds */
    --color-bg:             #0D1117;
    --color-surface:        #161B22;
    --color-surface-2:      #1C2330;
    --color-surface-3:      #212A37;
    --color-sidebar:        #0F1620;

    /* Borders */
    --color-border:         #2A3340;
    --color-border-light:   #1E2733;

    /* Text */
    --color-text:           #E6EDF3;
    --color-text-muted:     #8B949E;
    --color-text-faint:     #3D444D;

    /* Feedback */
    --color-success:        #00C896;
    --color-success-bg:     #0D2A22;
    --color-error:          #FF6B6B;
    --color-error-bg:       #2A1515;
    --color-warning:        #F0A500;
    --color-warning-bg:     #2A2000;
    --color-info:           #58A6FF;
    --color-info-bg:        #0D1F33;

    /* File type badge colours */
    --badge-png:    #1A8CFF;
    --badge-jpg:    #00A87E;
    --badge-pdf:    #E05252;
    --badge-psd:    #31A8FF;
    --badge-ai:     #FF9A00;
    --badge-cdr:    #6E4C9E;
    --badge-other:  #5A6680;

    /* Layout */
    --sidebar-width:        240px;
    --header-height:        60px;
    --radius-sm:            6px;
    --radius-md:            12px;
    --radius-lg:            18px;
    --shadow-card:          0 4px 24px rgba(0,0,0,0.4);
    --shadow-modal:         0 20px 80px rgba(0,0,0,0.7);

    /* Typography */
    --font-display:         'Syne', sans-serif;
    --font-body:            'DM Sans', sans-serif;
    --font-mono:            'JetBrains Mono', monospace;
}

/* -----------------------------------------------------------------------------
   Reset & Base
   ----------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; -webkit-font-smoothing: antialiased; }

body {
    font-family: var(--font-body);
    background: var(--color-bg);
    color: var(--color-text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

/* -----------------------------------------------------------------------------
   App Shell
   ----------------------------------------------------------------------------- */
.app-shell {
    display: flex;
    min-height: 100vh;
}

/* ---- Sidebar ---- */
.sidebar {
    width: var(--sidebar-width);
    background: var(--color-sidebar);
    border-right: 1px solid var(--color-border-light);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 100;
    transition: transform 0.3s ease;
}

.sidebar-logo {
    padding: 20px 20px 16px;
    border-bottom: 1px solid var(--color-border-light);
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--color-text);
}
.sidebar-logo:hover { text-decoration: none; }

.sidebar-logo-mark {
    width: 34px;
    height: 34px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    flex-shrink: 0;
    box-shadow: 0 3px 12px rgba(0,200,150,0.25);
}

.sidebar-logo-name {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.3px;
}
.sidebar-logo-name span { color: var(--color-primary); }

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.sidebar-section-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--color-text-faint);
    padding: 0 8px;
    margin: 16px 0 6px;
}
.sidebar-section-label:first-child { margin-top: 0; }

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: var(--radius-sm);
    color: var(--color-text-muted);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    text-decoration: none;
    margin-bottom: 2px;
}
.nav-item:hover { background: var(--color-surface-2); color: var(--color-text); text-decoration: none; }
.nav-item.active { background: var(--color-primary-glow); color: var(--color-primary); }
.nav-item svg { flex-shrink: 0; opacity: 0.75; }
.nav-item.active svg { opacity: 1; }
.nav-lock { margin-left: auto; font-size: 11px; opacity: 0.4; }

.sidebar-footer {
    padding: 14px 12px;
    border-top: 1px solid var(--color-border-light);
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    background: var(--color-surface-2);
    margin-bottom: 8px;
}

.user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: #0D1117;
    flex-shrink: 0;
    text-transform: uppercase;
}

.user-chip-info { overflow: hidden; flex: 1; }

.user-chip-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-chip-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 99px;
    margin-top: 2px;
}

.badge-paid {
    background: var(--color-success-bg);
    color: var(--color-success);
    border: 1px solid rgba(0,200,150,0.25);
}
.badge-free {
    background: var(--color-surface-3);
    color: var(--color-text-muted);
    border: 1px solid var(--color-border);
}

/* ---- Main Content Area ---- */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ---- Top Header Bar ---- */
.topbar {
    height: var(--header-height);
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border-light);
    display: flex;
    align-items: center;
    padding: 0 28px;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-title {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    color: var(--color-text);
    flex: 1;
}

.topbar-title .topbar-sub {
    font-size: 12px;
    color: var(--color-text-muted);
    font-weight: 400;
    font-family: var(--font-body);
    margin-left: 8px;
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-muted);
    padding: 4px;
    align-items: center;
    justify-content: center;
}

/* ---- Page Content ---- */
.page-content {
    padding: 28px;
    flex: 1;
}

/* -----------------------------------------------------------------------------
   Alert / Flash Messages
   ----------------------------------------------------------------------------- */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border: 1px solid transparent;
    animation: alertIn 0.25s ease;
}
@keyframes alertIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.alert-icon { flex-shrink: 0; margin-top: 1px; }
.alert--success { background: var(--color-success-bg); border-color: rgba(0,200,150,0.3);  color: var(--color-success); }
.alert--error   { background: var(--color-error-bg);   border-color: rgba(255,107,107,0.3); color: var(--color-error); }
.alert--warning { background: var(--color-warning-bg); border-color: rgba(240,165,0,0.3);   color: var(--color-warning); }
.alert--info    { background: var(--color-info-bg);    border-color: rgba(88,166,255,0.3);  color: var(--color-info); }

/* -----------------------------------------------------------------------------
   Stat Cards
   ----------------------------------------------------------------------------- */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 20px 22px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    transition: border-color 0.2s, transform 0.2s;
}
.stat-card:hover { border-color: rgba(0,200,150,0.4); transform: translateY(-1px); }

.stat-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}
.stat-icon--green  { background: var(--color-success-bg); }
.stat-icon--blue   { background: var(--color-info-bg); }
.stat-icon--yellow { background: var(--color-warning-bg); }

.stat-label { font-size: 12px; color: var(--color-text-muted); margin-bottom: 4px; }
.stat-value { font-family: var(--font-display); font-size: 22px; font-weight: 700; color: var(--color-text); }

/* -----------------------------------------------------------------------------
   Section Card
   ----------------------------------------------------------------------------- */
.section-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
}
.section-card + .section-card { margin-top: 20px; }

.section-header {
    padding: 18px 22px;
    border-bottom: 1px solid var(--color-border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.section-title {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    color: var(--color-text);
}
.section-subtitle {
    font-size: 13px;
    color: var(--color-text-muted);
    margin-top: 2px;
}

.section-body { padding: 22px; }

/* -----------------------------------------------------------------------------
   Welcome Banner
   ----------------------------------------------------------------------------- */
.welcome-banner {
    background: linear-gradient(135deg, var(--color-surface) 0%, var(--color-surface-2) 100%);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 24px 28px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    position: relative;
    overflow: hidden;
}
.welcome-banner::after {
    content: '';
    position: absolute;
    top: -40px; right: -40px;
    width: 140px; height: 140px;
    background: radial-gradient(circle, rgba(0,200,150,0.1) 0%, transparent 70%);
    pointer-events: none;
}

.welcome-text h2 {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 4px;
}
.welcome-text p { font-size: 14px; color: var(--color-text-muted); }

/* -----------------------------------------------------------------------------
   Buttons
   ----------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    text-decoration: none;
    padding: 9px 18px;
    white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(0.97); }

.btn-primary {
    background: var(--color-primary);
    color: #0D1117;
    box-shadow: 0 3px 16px rgba(0,200,150,0.25);
}
.btn-primary:hover { background: var(--color-primary-dark); box-shadow: 0 4px 20px rgba(0,200,150,0.35); }

.btn-primary-lg {
    font-size: 15px;
    padding: 13px 28px;
    box-shadow: 0 4px 24px rgba(0,200,150,0.3);
}

.btn-outline {
    background: transparent;
    color: var(--color-text-muted);
    border: 1px solid var(--color-border);
}
.btn-outline:hover { background: var(--color-surface-2); color: var(--color-text); }

.btn-preview {
    background: var(--color-info-bg);
    color: var(--color-info);
    border: 1px solid rgba(88,166,255,0.2);
    font-size: 12px;
    padding: 5px 12px;
}
.btn-preview:hover { background: rgba(88,166,255,0.15); }

.btn-download {
    background: var(--color-primary-glow);
    color: var(--color-primary);
    border: 1px solid rgba(0,200,150,0.25);
    font-size: 12px;
    padding: 5px 12px;
}
.btn-download:hover { background: rgba(0,200,150,0.2); }

.btn-download-locked {
    background: var(--color-surface-2);
    color: var(--color-text-faint);
    border: 1px solid var(--color-border);
    font-size: 12px;
    padding: 5px 12px;
    cursor: not-allowed;
    opacity: 0.6;
}

/* -----------------------------------------------------------------------------
   Locked State — blurred table for free users
   ----------------------------------------------------------------------------- */
.locked-wrapper { position: relative; }

.locked-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(13, 17, 23, 0.55) 25%,
        rgba(13, 17, 23, 0.92) 58%,
        rgba(13, 17, 23, 0.99) 100%
    );
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding-bottom: 40px;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.locked-table-blur {
    filter: blur(4px);
    pointer-events: none;
    user-select: none;
}

.locked-cta {
    text-align: center;
    padding: 0 20px;
}

.locked-cta-icon { font-size: 34px; margin-bottom: 10px; }

.locked-cta h3 {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 8px;
}

.locked-cta p {
    font-size: 14px;
    color: var(--color-text-muted);
    margin-bottom: 22px;
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* -----------------------------------------------------------------------------
   Category Filter Tabs
   ----------------------------------------------------------------------------- */
.filter-tabs {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    padding: 14px 22px;
    border-bottom: 1px solid var(--color-border-light);
    align-items: center;
}

.filter-tab {
    padding: 6px 14px;
    border-radius: 99px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid var(--color-border);
    background: transparent;
    color: var(--color-text-muted);
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    font-family: var(--font-body);
}
.filter-tab:hover { background: var(--color-surface-2); color: var(--color-text); }
.filter-tab.active { background: var(--color-primary-glow); color: var(--color-primary); border-color: rgba(0,200,150,0.3); }

.tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    border-radius: 99px;
    font-size: 10px;
    font-weight: 700;
    background: var(--color-surface-3);
    color: var(--color-text-muted);
    margin-left: 5px;
    padding: 0 4px;
}
.filter-tab.active .tab-count { background: rgba(0,200,150,0.2); color: var(--color-primary); }

/* Search box alongside tabs */
.filter-search {
    margin-left: auto;
    position: relative;
}

.filter-search input {
    background: var(--color-surface-2);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 6px 12px 6px 32px;
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--color-text);
    outline: none;
    width: 180px;
    transition: border-color 0.2s, width 0.2s;
}
.filter-search input:focus { border-color: var(--color-primary); width: 220px; }
.filter-search input::placeholder { color: var(--color-text-faint); }

.filter-search svg {
    position: absolute;
    left: 9px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--color-text-faint);
}

/* -----------------------------------------------------------------------------
   Media Kit Table
   ----------------------------------------------------------------------------- */
.table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.media-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.media-table thead th {
    padding: 11px 16px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--color-text-faint);
    background: var(--color-surface-2);
    border-bottom: 1px solid var(--color-border);
    white-space: nowrap;
}
.media-table thead th:first-child { padding-left: 22px; }
.media-table thead th:last-child  { padding-right: 22px; text-align: right; }

.media-table tbody tr {
    border-bottom: 1px solid var(--color-border-light);
    transition: background 0.12s;
}
.media-table tbody tr:last-child { border-bottom: none; }
.media-table tbody tr:hover { background: var(--color-surface-2); }
.media-table tbody tr.row-hidden { display: none; }

.media-table tbody td {
    padding: 13px 16px;
    vertical-align: middle;
    color: var(--color-text);
}
.media-table tbody td:first-child { padding-left: 22px; }
.media-table tbody td:last-child  { padding-right: 22px; }

.col-srno {
    font-size: 12px;
    color: var(--color-text-faint);
    width: 48px;
    font-family: var(--font-mono), monospace;
}

.col-name { font-weight: 500; min-width: 180px; }

/* File type badges */
.file-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.badge-png  { background: rgba(26,140,255,0.15);  color: var(--badge-png);  }
.badge-jpg,
.badge-jpeg { background: rgba(0,168,126,0.15);   color: var(--badge-jpg);  }
.badge-pdf  { background: rgba(224,82,82,0.15);   color: var(--badge-pdf);  }
.badge-psd  { background: rgba(49,168,255,0.15);  color: var(--badge-psd);  }
.badge-ai   { background: rgba(255,154,0,0.15);   color: var(--badge-ai);   }
.badge-cdr  { background: rgba(110,76,158,0.15);  color: var(--badge-cdr);  }
.badge-other{ background: rgba(90,102,128,0.15);  color: var(--badge-other);}

.col-category { font-size: 13px; color: var(--color-text-muted); }

.col-size {
    font-size: 12px;
    color: var(--color-text-muted);
    font-family: var(--font-mono), monospace;
    white-space: nowrap;
}

.col-downloads {
    font-size: 13px;
    color: var(--color-text-muted);
    white-space: nowrap;
}

.col-actions {
    white-space: nowrap;
    text-align: right;
    display: flex;
    gap: 6px;
    justify-content: flex-end;
    align-items: center;
}

/* Empty state */
.table-empty {
    text-align: center;
    padding: 48px 20px;
    color: var(--color-text-muted);
}
.table-empty svg { margin: 0 auto 12px; opacity: 0.3; }
.table-empty p { font-size: 14px; }

/* -----------------------------------------------------------------------------
   Lightbox Modal
   ----------------------------------------------------------------------------- */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.lightbox-overlay.is-open { opacity: 1; visibility: visible; }

.lightbox-box {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    max-width: 760px;
    width: 100%;
    max-height: 92vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: scale(0.94) translateY(10px);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: var(--shadow-modal);
}
.lightbox-overlay.is-open .lightbox-box { transform: scale(1) translateY(0); }

.lightbox-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--color-border-light);
    flex-shrink: 0;
}

.lightbox-title {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 700;
    color: var(--color-text);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 12px;
}

.lightbox-close {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--color-surface-2);
    border: 1px solid var(--color-border);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
    font-size: 18px;
    line-height: 1;
    font-family: monospace;
}
.lightbox-close:hover { background: var(--color-error-bg); color: var(--color-error); border-color: rgba(255,107,107,0.3); }

.lightbox-image-wrap {
    flex: 1;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg);
    min-height: 200px;
    max-height: 58vh;
    position: relative;
}

.lightbox-image-wrap img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

.lightbox-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--color-text-faint);
    font-size: 13px;
    padding: 40px;
    text-align: center;
}
.lightbox-placeholder svg { opacity: 0.3; }

.lightbox-loader {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg);
}

.spinner {
    width: 28px;
    height: 28px;
    border: 2px solid var(--color-border);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.lightbox-footer {
    padding: 14px 20px;
    border-top: 1px solid var(--color-border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.lightbox-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lightbox-meta-name { font-size: 14px; color: var(--color-text); font-weight: 500; }
.lightbox-meta-detail { font-size: 12px; color: var(--color-text-muted); }

/* -----------------------------------------------------------------------------
   Tooltip (locked download buttons)
   ----------------------------------------------------------------------------- */
.tooltip-wrap { position: relative; display: inline-flex; }

.tooltip-wrap .tooltip-text {
    position: absolute;
    bottom: calc(100% + 6px);
    right: 0;
    background: var(--color-surface-3);
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
    font-size: 12px;
    padding: 5px 10px;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.15s, transform 0.15s;
    z-index: 20;
}
.tooltip-wrap:hover .tooltip-text { opacity: 1; transform: translateY(0); }

/* -----------------------------------------------------------------------------
   Toast Notifications
   ----------------------------------------------------------------------------- */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 500;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    font-size: 13px;
    color: var(--color-text);
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow-card);
    animation: toastIn 0.25s ease;
    min-width: 240px;
    max-width: 320px;
}
.toast--success { border-left: 3px solid var(--color-success); }
.toast--error   { border-left: 3px solid var(--color-error); }
.toast--info    { border-left: 3px solid var(--color-info); }

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

/* -----------------------------------------------------------------------------
   Responsive
   ----------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.is-open { transform: translateX(0); box-shadow: 4px 0 40px rgba(0,0,0,0.5); }
    .main-content { margin-left: 0; }
    .topbar { padding: 0 16px; }
    .sidebar-toggle { display: flex; }
    .page-content { padding: 16px; }
    .stat-grid { grid-template-columns: 1fr 1fr; }
    .welcome-banner { flex-direction: column; align-items: flex-start; }
    .filter-tabs { padding: 12px 16px; }
    .filter-search { display: none; }
    .col-actions { flex-direction: column; gap: 4px; }
    .media-table thead th, .media-table tbody td { padding: 10px 12px; }
    .media-table thead th:first-child, .media-table tbody td:first-child { padding-left: 16px; }
}

@media (max-width: 480px) {
    .stat-grid { grid-template-columns: 1fr; }
    .col-srno, .col-size { display: none; }
}

.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 99;
}
.sidebar-backdrop.is-visible { display: block; }

/* Page fade-in */
.page-content {
    animation: pageFadeIn 0.3s ease;
}
@keyframes pageFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
