/**
 * Custom Styles for LalatX Video Hosting Platform
 *
 * This file contains custom styles that extend or override theme.css
 * Move inline styles from HTML files to this file for better maintainability
 *
 * HOW TO USE PAGE NAMESPACES:
 * ---------------------------
 * Each page has a class on <body> tag for CSS namespace isolation.
 * This prevents CSS conflicts between pages.
 *
 * Example:
 *   HTML: <body class="page-dashboard">
 *   CSS:  .page-dashboard .stat-card { ... }
 *
 * This ensures .stat-card styles ONLY apply to dashboard page.
 *
 * Page Classes:
 * - page-dashboard     → Dashboard
 * - page-files         → Files Manager
 * - page-homepage      → Homepage
 * - page-player        → Video Player
 * - page-profile       → User Profile
 * - page-settings      → Settings
 * - page-upload        → Upload
 * - page-share-create  → Share Create
 * - page-admin         → Admin pages
 *
 * Migration Workflow:
 * 1. Copy inline CSS from <style> tag in HTML file
 * 2. Add page namespace prefix to selectors
 * 3. Paste to appropriate section below
 * 4. Test in browser
 * 5. Remove inline CSS from HTML file
 * 6. If same style exists in multiple pages, move to COMMON section
 */

/* ============================================
   COMMON / SHARED STYLES
   ============================================
   Styles used across multiple pages
   Only put truly universal styles here
   ============================================ */

/* Global Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: var(--text-primary);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 15px auto;
    padding: 0 10px;
    box-sizing: border-box;
}

/* ============================================
   NAVBAR (Shared Component)
   ============================================ */

.navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 10px 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 15px;
    position: relative;
}

.navbar-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    font-size: 24px;
    font-weight: 700;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar-brand:hover {
    color: white;
    opacity: 0.9;
}

.burger-menu {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.burger-menu span {
    display: block;
    width: 25px;
    height: 3px;
    background: white;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.burger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.burger-menu.active span:nth-child(2) {
    opacity: 0;
}

.burger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.navbar-nav a,
.navbar-nav button {
    color: white;
    text-decoration: none;
    font-size: 14px;
    padding: 8px 15px;
    border-radius: 6px;
    transition: background 0.3s;
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 5px;
}

.navbar-nav a:hover,
.navbar-nav button:hover {
    background: rgba(255, 255, 255, 0.2);
}

.navbar-nav a.active {
    background: rgba(255, 255, 255, 0.25);
    font-weight: 600;
}

.theme-text,
.lang-toggle span {
    color: white;
}

.user-profile {
    color: #667eea !important;
    background: white !important;
    font-weight: 600 !important;
}

.user-profile:hover {
    background: rgba(255, 255, 255, 0.9) !important;
}

.theme-toggle,
.lang-toggle {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.theme-toggle:hover,
.lang-toggle:hover {
    background: rgba(255, 255, 255, 0.25);
}

.lang-dropdown {
    position: relative;
}

.lang-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 5px;
    background: var(--card-bg, white);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    min-width: 150px;
    z-index: 1000;
}

.lang-menu.active {
    display: block;
}

.lang-menu a {
    display: block;
    padding: 10px 15px;
    color: var(--text-primary, #333);
    text-decoration: none;
    border-bottom: 1px solid var(--border-color, #eee);
    transition: background 0.3s;
}

.lang-menu a:last-child {
    border-bottom: none;
}

.lang-menu a:hover {
    background: var(--bg-hover, #f5f5f5);
}

.lang-menu a.active {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    font-weight: 600;
}

.viewing-as-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 12px;
    border-radius: 5px;
    font-size: 13px;
}

/* Global responsive — tighter on mobile */
@media (max-width: 768px) {
    .container {
        margin: 8px auto;
        padding: 0 10px;
    }
}

/* File manager — edge-to-edge on mobile */
@media (max-width: 600px) {
    .page-files .container {
        margin: 0;
        padding: 0;
        max-width: 100%;
    }

    .page-files .toolbar {
        border-radius: 0;
        margin-bottom: 0;
        padding: 10px 12px;
    }

    .page-files .file-item {
        padding: 9px 10px;
    }
}

/* Navbar Responsive */
@media (max-width: 768px) {
    .navbar {
        padding: 8px 14px;
    }

    .burger-menu {
        display: flex;
        z-index: 1001;
    }

    .navbar-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
        flex-direction: column;
        align-items: stretch;
        padding: 80px 20px 20px 20px;
        gap: 0;
        transition: right 0.3s ease;
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
        z-index: 1000;
        overflow-y: auto;
    }

    .navbar-nav.active {
        right: 0;
    }

    .navbar-nav li {
        margin: 0;
    }

    .navbar-nav a,
    .navbar-nav button {
        width: 100%;
        padding: 15px 20px;
        border-radius: 8px;
        margin-bottom: 5px;
        justify-content: flex-start;
    }

    .lang-dropdown {
        position: static;
    }

    .lang-menu {
        position: static;
        box-shadow: none;
        background: rgba(255, 255, 255, 0.1);
        margin-top: 0;
        border-radius: 0;
    }

    .lang-menu a {
        color: white;
        padding: 12px 20px;
    }

    .lang-menu a:hover {
        background: rgba(255, 255, 255, 0.1);
    }

    .lang-menu a.active {
        background: rgba(255, 255, 255, 0.2);
        color: white;
    }

    .navbar-brand {
        font-size: 20px;
        z-index: 1001;
    }
}

@media (max-width: 480px) {
    .navbar {
        padding: 10px 15px;
    }

    .navbar-brand {
        font-size: 18px;
    }
}



/* ============================================
   PAGE-SPECIFIC STYLES
   ============================================ */

/* --------------------------------------------
   DASHBOARD PAGE
   -------------------------------------------- */

/* Card */
.page-dashboard .card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 18px;
    box-shadow: var(--card-shadow);
    margin-bottom: 20px;
}

.page-dashboard .card h2 {
    color: var(--text-primary);
    margin-bottom: 20px;
    font-size: 1.3em;
}

/* Buttons */
.page-dashboard .btn {
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: transform 0.3s;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.page-dashboard .btn:hover {
    transform: translateY(-2px);
}

.page-dashboard .btn-secondary {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

/* Tables */
.page-dashboard table {
    width: 100%;
    border-collapse: collapse;
}

.page-dashboard th,
.page-dashboard td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

.page-dashboard th {
    background: var(--bg-secondary);
    font-weight: 600;
    color: var(--text-primary);
}

/* Status Badges */
.page-dashboard .status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
}

.page-dashboard .status-completed {
    background: #d1fae5;
    color: #065f46;
}

.page-dashboard .status-processing {
    background: #fef3c7;
    color: #92400e;
}

.page-dashboard .status-pending {
    background: #dbeafe;
    color: #1e40af;
}

.page-dashboard .status-failed {
    background: #fee2e2;
    color: #991b1b;
}

/* Statistics Grid */
.page-dashboard .stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* Stat Card */
.page-dashboard .stat-card {
    background: var(--card-bg);
    padding: 18px;
    border-radius: 15px;
    box-shadow: var(--card-shadow);
}

.page-dashboard .stat-card h3 {
    color: var(--text-secondary);
    font-size: 0.9em;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.page-dashboard .stat-card .value {
    font-size: 2.5em;
    font-weight: bold;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-dashboard .stat-card .subtitle {
    color: var(--text-secondary);
    font-size: 0.85em;
    margin-top: 5px;
}

/* Progress Bar */
.page-dashboard .progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 10px;
    margin-top: 15px;
    overflow: hidden;
}

.page-dashboard .progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    transition: width 0.3s;
}

/* Quick Actions */
.page-dashboard .quick-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}


/* --------------------------------------------
   HOMEPAGE PAGE
   -------------------------------------------- */

/* Body - Override with gradient background */
body.page-homepage {
    background: var(--bg-primary);
    min-height: 100vh;
    color: var(--text-primary);
}

/* Hero Section */
.page-homepage .hero {
    text-align: center;
    padding: 100px 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.page-homepage .hero h1 {
    font-size: 4em;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.page-homepage .hero p {
    font-size: 1.5em;
    margin-bottom: 40px;
    opacity: 0.95;
}

/* CTA Buttons */
.page-homepage .cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.page-homepage .btn {
    color: white;
    padding: 15px 40px;
    font-size: 1.1em;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.3s;
    display: inline-block;
}

.page-homepage .btn:hover {
    transform: translateY(-3px);
}

.page-homepage .btn-secondary {
    background: var(--bg-grads);
}

/* Features Grid */
.page-homepage .features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 50px auto;
    padding: 0 20px;
}

/* Feature Card */
.page-homepage .feature-card {
    background: var(--bg-grads);
    box-shadow: var(--card-shadow);
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    transition: transform 0.3s;
}

.page-homepage .feature-card:hover {
    transform: translateY(-5px);
    background: var(--bg-grads);
}

.page-homepage .feature-card .icon {
    font-size: 3em;
    margin-bottom: 15px;
}

.page-homepage .feature-card h3 {
    color: white;
    font-size: 1.3em;
    margin-bottom: 10px;
}

.page-homepage .feature-card p {
    color: white;
    opacity: 0.9;
    line-height: 1.6;
}

/* Footer */
.page-homepage .footer {
    text-align: center;
    padding: 40px 20px;
    margin-top: 100px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}


/* --------------------------------------------
   LOGIN PAGE
   -------------------------------------------- */

/* Body - Override with gradient background and min-height */
body.page-login {
    background: var(--bg-primary);
    min-height: 100vh;
}

/* Login Wrapper - Center the login container */
.page-login .login-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 60px);
    /* Subtract navbar height */
    padding: 20px;
}

/* Login Container - White card */
.page-login .login-container {
    background: var(--bg-primary);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 28px;
    width: 100%;
    max-width: 400px;
}

/* Logo Section */
.page-login .logo {
    text-align: center;
    margin-bottom: 30px;
}

.page-login .logo h1 {
    font-size: 2em;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-login .logo p {
    color: var(--text-primary);
    margin-top: 5px;
}

/* Form Group */
.page-login .form-group {
    margin-bottom: 20px;
}

.page-login label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 600;
}

.page-login input[type="text"],
.page-login input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.page-login input[type="text"]:focus,
.page-login input[type="password"]:focus {
    outline: none;
    border-color: #667eea;
}

/* Submit Button */
.page-login .btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s;
}

.page-login .btn:hover {
    transform: translateY(-2px);
}

/* Alert Messages */
.page-login .alert {
    padding: 12px 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
}

.page-login .alert-error {
    background: #fee;
    color: #c33;
    border: 1px solid #fcc;
}

.page-login .alert-success {
    background: #efe;
    color: #3c3;
    border: 1px solid #cfc;
}

/* Bottom Links */
.page-login .links {
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
}

.page-login .links a {
    color: #667eea;
    text-decoration: none;
}

.page-login .links a:hover {
    text-decoration: underline;
}


/* --------------------------------------------
   REGISTER PAGE
   -------------------------------------------- */

/* Body - Override with gradient background and min-height */
body.page-register {
    background: var(--bg-primary);
    min-height: 100vh;
}

/* Register Wrapper - Center the register container */
.page-register .register-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 60px);
    /* Subtract navbar height */
    padding: 20px;
}

/* Register Container - White card */
.page-register .register-container {
    background: var(--bg-primary);
    padding: 28px;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 450px;
}

/* Logo Section */
.page-register .logo {
    text-align: center;
    margin-bottom: 30px;
}

.page-register .logo h1 {
    font-size: 2em;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-register .logo p {
    color: var(--text-primary);
    font-size: 0.95em;
}

/* Form Group */
.page-register .form-group {
    margin-bottom: 20px;
}

.page-register .form-group label {
    display: block;
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
}

.page-register .form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.3s;
}

.page-register .form-group input:focus {
    outline: none;
    border-color: #667eea;
}

/* Submit Button */
.page-register .btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s;
}

.page-register .btn:hover {
    transform: translateY(-2px);
}

/* Alert Messages */
.page-register .alert {
    padding: 12px 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
}

.page-register .alert-error {
    background: #fee;
    color: #c33;
    border: 1px solid #fcc;
}

.page-register .alert-success {
    background: #efe;
    color: #3c3;
    border: 1px solid #cfc;
}

/* Bottom Links */
.page-register .links {
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
}

.page-register .links a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.page-register .links a:hover {
    text-decoration: underline;
}

/* Hint Text */
.page-register .hint {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

.page-register .links+.links {
    margin-top: 10px;
}

/* Registration Disabled state */
.page-register-disabled {
    font-family: sans-serif;
    text-align: center;
    padding: 50px;
    background: #f5f5f5;
    min-height: 100vh;
    margin: 0;
}

.page-register-disabled .message {
    background: white;
    padding: 28px;
    border-radius: 10px;
    max-width: 500px;
    margin: 0 auto;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.page-register-disabled .message h1 {
    color: #e53e3e;
}

.page-register-disabled .message a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}


/* --------------------------------------------
   FILES PAGE (File Manager)
   -------------------------------------------- */

/* Container - Override with wider width for file grid */
.page-files .container {
    max-width: 1400px;
}

/* Toolbar */
.page-files .toolbar {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 12px 16px;
    box-shadow: var(--card-shadow);
    margin: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

/* Breadcrumbs */
.page-files .breadcrumbs {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    font-size: 14px;
}

.page-files .breadcrumbs a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s;
}

.page-files .breadcrumbs a:hover {
    color: #764ba2;
}

/* Actions */
.page-files .actions {
    display: flex;
    gap: 10px;
}

/* Buttons */
.page-files .btn {
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: transform 0.3s;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.page-files .btn:hover {
    transform: translateY(-2px);
}

.page-files .btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.page-files .btn-secondary {
    background: #6b7280;
}

.page-files .btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.page-files .btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

/* Card — flat, no box, rows sit directly on page */
.page-files .card {
    background: transparent;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
}

/* File List — flat row layout (shared by .page-files and .page-share-links) */
.page-files .file-grid,
.page-share-links .file-grid {
    display: flex;
    flex-direction: column;
}

.page-files .file-item,
.page-share-links .file-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 8px;
    cursor: pointer;
    transition: background 0.12s;
    border-bottom: 1px solid var(--border-color);
    min-width: 0;
}

.page-files .file-item:last-child,
.page-share-links .file-item:last-child {
    border-bottom: none;
}

.page-files .file-item:hover,
.page-share-links .file-item:hover {
    background: var(--bg-hover);
}

/* Thumb: 44×36px */
.page-files .file-thumb,
.page-share-links .file-thumb {
    flex-shrink: 0;
    width: 44px;
    height: 36px;
    border-radius: 5px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--border-color);
    font-size: 1.4em;
    position: relative;
}

.page-files .file-thumb .thumb-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
}

.page-files .file-thumb .thumb-duration {
    position: absolute;
    bottom: 1px;
    right: 2px;
    background: rgba(0, 0, 0, 0.72);
    color: #fff;
    font-size: 9px;
    padding: 1px 3px;
    border-radius: 3px;
    line-height: 1.4;
    z-index: 1;
}

/* Name column */
.page-files .file-name,
.page-share-links .file-name {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.page-files .file-name .name-text,
.page-share-links .file-name .name-text {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.page-files .file-name .badge-shared {
    color: #10b981;
    font-size: 0.78em;
    font-weight: 600;
    margin-left: 5px;
}

.page-files .file-name .name-meta,
.page-share-links .file-name .name-meta {
    font-size: 0.78em;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Three-dot menu */
.page-files .file-actions,
.page-share-links .file-actions {
    flex-shrink: 0;
    position: relative;
}

.page-files .menu-trigger,
.page-share-links .menu-trigger {
    background: none;
    border: none;
    padding: 6px 8px;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 1.15em;
    border-radius: 6px;
    line-height: 1;
    display: flex;
    align-items: center;
}

.page-files .menu-trigger:hover,
.page-share-links .menu-trigger:hover {
    background: var(--border-color);
    color: var(--text-primary);
}

.page-files .action-menu,
.page-share-links .action-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 2px);
    min-width: 155px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    z-index: 200;
    overflow: hidden;
}

.page-files .action-menu.open,
.page-share-links .action-menu.open {
    display: block;
}

.page-files .action-menu a,
.page-files .action-menu button,
.page-share-links .action-menu a,
.page-share-links .action-menu button {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 14px;
    background: none;
    border: none;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
    font-size: 0.88em;
    color: var(--text-primary);
    cursor: pointer;
    text-decoration: none;
    transition: background 0.1s;
    box-sizing: border-box;
}

.page-files .action-menu a:last-child,
.page-files .action-menu button:last-child,
.page-share-links .action-menu a:last-child,
.page-share-links .action-menu button:last-child {
    border-bottom: none;
}

.page-files .action-menu a:hover,
.page-files .action-menu button:hover,
.page-share-links .action-menu a:hover,
.page-share-links .action-menu button:hover {
    background: var(--bg-hover);
}

.page-files .action-menu .menu-item-danger,
.page-share-links .action-menu .menu-item-danger {
    color: #ef4444;
}

/* ── Select / Batch mode ───────────────────────────────────── */

/* Checkbox wrapper — hidden inside .file-actions in normal mode */
.page-files .select-checkbox-wrap {
    display: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

/* Custom styled checkbox — hides native, shows CSS box */
.page-files .select-checkbox {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    background: var(--bg-card);
    cursor: pointer;
    position: relative;
    transition: background 0.15s, border-color 0.15s;
    flex-shrink: 0;
}
.page-files .select-checkbox:hover {
    border-color: var(--accent-color, #667eea);
}
.page-files .select-checkbox:checked {
    background: var(--accent-color, #667eea);
    border-color: var(--accent-color, #667eea);
}
.page-files .select-checkbox:checked::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 5px;
    height: 9px;
    border: 2px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
}

/* Icon-only button (e.g. 📁 new folder, 📤 upload, ☑ select, ✕ cancel) */
.btn.btn-icon-only {
    width: 40px;
    height: 40px;
    padding: 0;
    min-width: unset;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    font-size: 16px;
}

/* Inline hint replacing alert() */
.batch-select-hint {
    font-size: 0.85em;
    color: #ef4444;
    white-space: nowrap;
}

/* In select mode: show checkbox, hide ⋮ trigger */
.page-files .file-grid.select-mode .select-checkbox-wrap { display: flex; }
.page-files .file-grid.select-mode .menu-trigger         { display: none; }

/* Highlight selected items */
.page-files .file-item.item-selected {
    outline: 2px solid var(--accent-color, #667eea);
    background: color-mix(in srgb, var(--accent-color, #667eea) 8%, transparent);
    position: relative;
    z-index: 1;
}

/* Batch action dropdown (the ⋮ in toolbar select mode) */
.batch-action-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    z-index: 200;
    overflow: hidden;
}
.batch-action-menu button {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 11px 16px;
    text-align: left;
    background: none;
    border: none;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    color: var(--text-primary);
    font-size: 0.9em;
}
.batch-action-menu button:last-child { border-bottom: none; }
.batch-action-menu button:hover      { background: var(--bg-hover); }
.batch-action-menu button:first-child { color: #ef4444; }

/* Modal */
.page-files .modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.page-files .modal.active {
    display: flex;
}

.page-files .modal-content {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.page-files .modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* Form Group */
.page-files .form-group {
    margin-bottom: 15px;
}

.page-files .form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--text-primary);
}

.page-files .form-group input,
.page-files .form-group select {
    width: 100%;
    padding: 10px;
    border: 2px solid var(--input-border);
    border-radius: 8px;
    font-size: 14px;
    background: var(--input-bg);
    color: var(--text-primary);
}

.page-files .form-group input:focus,
.page-files .form-group select:focus {
    outline: none;
    border-color: #667eea;
}

/* Alert Messages */
.page-files .alert {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-weight: 500;
}

.page-files .alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.page-files .alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* Status Badges */
.page-files .status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
}

.page-files .status-completed {
    background: #d1fae5;
    color: #065f46;
}

.page-files .status-processing {
    background: #fef3c7;
    color: #92400e;
}

.page-files .status-pending {
    background: #dbeafe;
    color: #1e40af;
}

.page-files .status-failed {
    background: #fee2e2;
    color: #991b1b;
}

/* Spinner untuk file yang sedang diproses — ditampilkan di area thumbnail */
@keyframes files-spin {
    to { transform: rotate(360deg); }
}
.page-files .thumb-spinner {
    width: 20px;
    height: 20px;
    border: 2.5px solid var(--text-secondary);
    border-top-color: transparent;
    border-radius: 50%;
    animation: files-spin 0.8s linear infinite;
    opacity: 0.7;
}

/* Row disabled selama processing/pending */
.page-files .file-item--processing {
    opacity: 0.65;
    pointer-events: none;
    cursor: default;
}

/* Empty State */
.page-files .empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}


/* --------------------------------------------
   PLAYER PAGE
   -------------------------------------------- */

/* Error State - Video Suspended/Unavailable */
body.page-player-error {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
}

.page-player-error .message-box {
    text-align: center;
    padding: 40px;
    background: var(--card-bg);
    border-radius: 12px;
    max-width: 500px;
    margin: 20px;
    border: 1px solid var(--border-color);
}

.page-player-error .icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.page-player-error h1 {
    margin-bottom: 10px;
    font-size: 24px;
}

.page-player-error p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.6;
}

.page-player-error .btn {
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
}

/* Normal Player State */
.page-player body {
    background: #0f0f0f;
    color: #fff;
}

.page-player .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 10px;
}

.page-player .player-wrapper {
    max-width: 1200px;
    margin: 0 auto;
}

/* File Container */
.page-player .file-container {
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
}

.page-player video {
    width: 100%;
    height: auto;
    display: block;
}

/* File Info */
.page-player .file-info {
    background: #212121;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.page-player .file-title {
    font-size: 1.5em;
    font-weight: 600;
    margin-bottom: 10px;
}

.page-player .file-meta {
    color: #aaa;
    font-size: 0.9em;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.page-player .file-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Video Description */
.page-player .video-description {
    background: #212121;
    padding: 20px;
    border-radius: 12px;
    line-height: 1.6;
    color: #ddd;
}

/* Buttons */
.page-player .btn {
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: transform 0.3s;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.page-player .btn:hover {
    transform: translateY(-2px);
}

.page-player .btn-secondary {
    background: #3f3f3f;
}

/* Status Badges */
.page-player .status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
}

.page-player .status-completed {
    background: #10b981;
    color: white;
}

.page-player .status-processing {
    background: #f59e0b;
    color: white;
}

.page-player .status-pending {
    background: #3b82f6;
    color: white;
}

.page-player .status-failed {
    background: #ef4444;
    color: white;
}


/* --------------------------------------------
   PROFILE PAGE
   -------------------------------------------- */

/* Container - Narrower for profile info */
.page-profile .container {
    max-width: 800px;
}

/* Header */
.page-profile .header {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.page-profile .header h1 {
    color: var(--text-primary);
    font-size: 28px;
    margin-bottom: 5px;
}

.page-profile .header .subtitle {
    color: var(--text-secondary);
    font-size: 15px;
}

/* Back Link */
.page-profile .back-link {
    display: inline-block;
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 15px;
}

.page-profile .back-link:hover {
    text-decoration: underline;
}

/* Card */
.page-profile .card {
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 20px;
    margin-bottom: 20px;
}

.page-profile .card h2 {
    color: var(--text-primary);
    font-size: 20px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

/* Info Grid */
.page-profile .info-grid {
    display: grid;
    gap: 20px;
}

.page-profile .info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: var(--bg-tertiary);
    border-radius: 8px;
}

.page-profile .info-label {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
}

.page-profile .info-value {
    color: var(--text-primary);
    font-size: 15px;
}

/* Badges */
.page-profile .badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.page-profile .badge.verified {
    background: #d1fae5;
    color: #065f46;
}

.page-profile .badge.unverified {
    background: #fee2e2;
    color: #991b1b;
}

.page-profile .badge.admin {
    background: #dbeafe;
    color: #1e40af;
}

.page-profile .badge.user {
    background: var(--card-bg);
    color: var(--text-primary);
}

/* Form Group */
.page-profile .form-group {
    margin-bottom: 20px;
}

.page-profile .form-group label {
    display: block;
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
}

.page-profile .form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s;
    background: var(--input-bg);
    color: var(--text-primary);
}

.page-profile .form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Button */
.page-profile .btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.page-profile .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.page-profile .btn:active {
    transform: translateY(0);
}

/* Alert Messages */
.page-profile .alert {
    padding: 15px 18px;
    border-radius: 10px;
    margin-bottom: 25px;
    font-size: 15px;
    line-height: 1.6;
}

.page-profile .alert.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.page-profile .alert.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* Help Text */
.page-profile .help-text {
    color: var(--text-secondary);
    font-size: 13px;
    margin-top: 6px;
}

/* Security Note */
.page-profile .security-note {
    background: var(--warning-bg);
    border-left: 4px solid var(--warning-border);
    padding: 15px;
    border-radius: 6px;
    color: var(--warning-text);
    margin-top: 20px;
    font-size: 14px;
}

.page-profile .security-note strong {
    display: block;
    margin-bottom: 8px;
}


/* Settings Page */


/* --------------------------------------------
   UPLOAD PAGE
   -------------------------------------------- */

/* Container — inherits global (max-width: 1200px) */

/* Header */
.page-upload .header {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.page-upload .header h1 {
    color: var(--text-primary);
    margin-bottom: 10px;
}

.page-upload .storage-info {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Upload Card */
.page-upload .upload-card {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

/* Upload Zone */
.page-upload .upload-zone {
    border: 3px dashed #667eea;
    border-radius: 10px;
    padding: 60px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: var(--bg-tertiary);
}

.page-upload .upload-zone:hover {
    background: var(--bg-hover);
    border-color: #764ba2;
}

.page-upload .upload-zone.dragover {
    background: #e0e7ff;
    border-color: #764ba2;
    transform: scale(1.02);
}

.page-upload .upload-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.page-upload .upload-zone h2 {
    color: var(--text-primary);
    margin-bottom: 10px;
}

.page-upload .upload-zone p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

/* Button Group */
.page-upload .btn-group {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.page-upload .btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.page-upload .btn-primary {
    background: #667eea;
    color: white;
}

.page-upload .btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.page-upload .btn-primary:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
}

.page-upload .btn-secondary {
    background: #764ba2;
    color: white;
}

.page-upload .btn-secondary:hover {
    background: #63408a;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(118, 75, 162, 0.3);
}

.page-upload .btn-back {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.page-upload .btn-back:hover {
    background: var(--bg-hover);
}

.page-upload input[type="file"] {
    display: none;
}

/* Form Group */
.page-upload .form-group {
    margin-bottom: 20px;
}

.page-upload .form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 500;
}

.page-upload .form-group select,
.page-upload .form-group input[type="text"],
.page-upload .form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--input-border);
    border-radius: 6px;
    font-size: 16px;
    transition: border 0.3s;
    background: var(--input-bg);
    color: var(--text-primary);
    font-family: inherit;
}

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

.page-upload .form-group select:focus,
.page-upload .form-group input[type="text"]:focus,
.page-upload .form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

/* Alert Messages */
.page-upload .alert {
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.page-upload .alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.page-upload .alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

/* File List */
.page-upload .file-list {
    margin-top: 30px;
}

.page-upload .file-item {
    background: var(--input-bg);
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.page-upload .file-info {
    flex: 1;
}

.page-upload .file-name {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.page-upload .file-size {
    font-size: 14px;
    color: var(--text-secondary);
}

.page-upload .file-status {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Status Badges */
.page-upload .status-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.page-upload .status-pending {
    background: #fef3c7;
    color: #92400e;
}

.page-upload .status-uploading {
    background: #dbeafe;
    color: #1e40af;
}

.page-upload .status-processing {
    background: #e0e7ff;
    color: #3730a3;
}

.page-upload .status-success {
    background: #d1fae5;
    color: #065f46;
}

.page-upload .status-error {
    background: #fee2e2;
    color: #991b1b;
}

/* Progress Bar */
.page-upload .progress-bar {
    width: 200px;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
}

.page-upload .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    width: 0%;
    transition: width 0.3s;
}

/* Remove Button */
.page-upload .remove-btn {
    background: #ef4444;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.page-upload .remove-btn:hover {
    background: #dc2626;
}

/* Upload Actions */
.page-upload .upload-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* File Preview Section */
.page-upload #filePreviewSection {
    display: none;
}

/* Full-screen upload block overlay — prevents all interaction during upload */
#uploadBlockOverlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: rgba(0, 0, 0, 0.25);
    cursor: not-allowed;
}
#uploadBlockOverlay.active {
    display: block;
}
/* Cancel button floats above the overlay */
.page-upload #cancelBtn {
    position: relative;
    z-index: 9999;
}

.page-upload #filePreviewSection.active {
    display: block;
}

/* Single title form hidden by default, shown via JS when 1 file */
.page-upload #singleTitleForm {
    display: none;
    margin-top: 20px;
}

/* File Preview Grid */
.page-upload .file-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-bottom: 8px;
}

.page-upload .preview-item {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-secondary);
}

.page-upload .preview-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.page-upload .preview-no-thumb {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.page-upload .preview-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
    transition: background 0.15s;
}

.page-upload .preview-remove:hover {
    background: rgba(220, 38, 38, 0.9);
}

.page-upload .preview-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    gap: 6px;
}

.page-upload .preview-overlay-bar {
    width: 70%;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

.page-upload .preview-overlay-bar div {
    height: 100%;
    background: #fff;
    border-radius: 2px;
    transition: width 0.2s;
}

.page-upload .preview-status-badge {
    position: absolute;
    bottom: 4px;
    left: 4px;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
}

.page-upload .preview-status-success {
    background: #d1fae5;
    color: #065f46;
}

.page-upload .preview-status-error {
    background: #fee2e2;
    color: #991b1b;
}

.page-upload .preview-add-more {
    aspect-ratio: 1 / 1;
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: border-color 0.2s, color 0.2s;
    user-select: none;
}

.page-upload .preview-add-more:hover {
    border-color: #667eea;
    color: #667eea;
}

/* Mode Switch */
.page-upload .mode-switch {
    margin-bottom: 20px;
    text-align: center;
}

.page-upload .mode-switch a {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
}

.page-upload .mode-switch a:hover {
    text-decoration: underline;
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    .page-upload .upload-zone {
        padding: 40px 20px;
    }

    .page-upload .btn-group {
        flex-direction: column;
    }

    .page-upload .btn {
        width: 100%;
    }

    .page-upload .progress-bar {
        width: 100%;
        margin-top: 10px;
    }

    .page-upload .file-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .page-upload .file-status {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
    }
}


/* --------------------------------------------
   Upload Page — Toast & Modal
   -------------------------------------------- */

.page-upload .upload-toast {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: #991b1b;
    color: #fff;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 0.9em;
    z-index: 2000;
    max-width: 90%;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}
.page-upload .upload-toast.visible {
    opacity: 1;
}

.page-upload .modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}
.page-upload .modal.active {
    display: flex;
}
.page-upload .modal-content {
    background: var(--card-bg);
    padding: 24px;
    border-radius: 15px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}
.page-upload .modal-content p {
    color: var(--text-primary);
    margin-bottom: 20px;
    font-size: 1em;
}
.page-upload .modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* --------------------------------------------
   Share Create Page (.page-share-create)
   -------------------------------------------- */

.page-share-create .container {
    max-width: 800px;
}

.page-share-create .card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.page-share-create h1 {
    color: var(--text-primary);
    margin-bottom: 10px;
    font-size: 1.8em;
}

.page-share-create .item-info {
    background: var(--card-bg);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 25px;
}

.page-share-create .item-info strong {
    color: #667eea;
}

.page-share-create .form-group {
    margin-bottom: 20px;
}

.page-share-create label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
}

.page-share-create input,
.page-share-create select {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--input-border);
    border-radius: 8px;
    font-size: 14px;
    background: var(--input-bg);
    color: var(--text-primary);
}

.page-share-create input:focus,
.page-share-create select:focus {
    outline: none;
    border-color: #667eea;
}

.page-share-create .btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    width: 100%;
    transition: transform 0.2s;
}

.page-share-create .btn:hover {
    transform: translateY(-2px);
}

.page-share-create .btn-secondary {
    background: #6c757d;
}

.page-share-create .alert {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-weight: 500;
}

.page-share-create .alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 2px solid #6ee7b7;
}

.page-share-create .alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 2px solid #fca5a5;
}

.page-share-create .generated-link {
    background: #f0f9ff;
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
    border: 2px solid #0ea5e9;
}

.page-share-create .link-display {
    background: var(--card-bg);
    padding: 12px;
    border-radius: 5px;
    word-break: break-all;
    font-family: monospace;
    margin: 10px 0;
    border: 1px solid var(--border-color);
}

.page-share-create .copy-btn {
    margin-top: 10px;
    width: auto;
    padding: 8px 16px;
    font-size: 14px;
}

.page-share-create .existing-links {
    margin-top: 30px;
}

.page-share-create .link-item {
    background: var(--bg-primary);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 15px;
}

.page-share-create .link-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.page-share-create .link-url-box {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.page-share-create .link-url-box input {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    font-family: monospace;
    font-size: 14px;
    background: var(--card-bg);
}

.page-share-create .link-url-box input:focus {
    outline: none;
    border-color: #667eea;
}

.page-share-create .link-actions {
    display: flex;
    gap: 10px;
}

.page-share-create .link-stats {
    font-size: 0.9em;
    color: var(--text-secondary);
}

.page-share-create .btn-delete {
    background: #dc2626;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s;
}

.page-share-create .btn-delete:hover {
    background: #b91c1c;
}

.page-share-create .badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75em;
    font-weight: 600;
    margin-left: 5px;
}

.page-share-create .badge-active {
    background: #d1fae5;
    color: #065f46;
}

.page-share-create .badge-inactive {
    background: #fee2e2;
    color: #991b1b;
}

.page-share-create .back-link {
    display: inline-block;
    color: white;
    text-decoration: none;
    margin-bottom: 20px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    transition: background 0.3s;
}

.page-share-create .back-link:hover {
    background: rgba(255, 255, 255, 0.3);
}

.page-share-create .help-text {
    font-size: 0.85em;
    color: var(--text-secondary);
    margin-top: 5px;
}


/* Admin Pages */



/* --------------------------------------------
   Share Password Form (.page-share-password)
   -------------------------------------------- */

body.page-share-password {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.page-share-password .password-box {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 400px;
    width: 100%;
    position: relative;
}

.page-share-password .theme-toggle {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(102, 126, 234, 0.2);
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 18px;
}

.page-share-password h2 {
    color: var(--text-primary);
    margin-bottom: 20px;
    text-align: center;
}

.page-share-password input {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--input-border);
    border-radius: 8px;
    font-size: 16px;
    margin-bottom: 15px;
    background: var(--input-bg);
    color: var(--text-primary);
}

.page-share-password input:focus {
    outline: none;
    border-color: #667eea;
}

.page-share-password button {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

.page-share-password button:hover {
    opacity: 0.9;
}

.page-share-password .error {
    background: #fee2e2;
    color: #991b1b;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
}

/* --------------------------------------------
   Share File Viewer (.page-share-file)
   -------------------------------------------- */

.page-share-file .container {
    max-width: 1400px;
}

.page-share-file .player-wrapper {
    max-width: 1200px;
    margin: 0 auto;
}

.page-share-file .file-container {
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
}

.page-share-file .video-js {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
}

.page-share-file .file-info {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: 12px;
}

.page-share-file .file-title {
    font-size: 1.5em;
    margin-bottom: 15px;
}

.page-share-file .file-meta {
    color: var(--text-secondary);
    font-size: 0.9em;
    margin-bottom: 15px;
}

.page-share-file .action-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.page-share-file .download-btn,
.page-share-file .save-btn {
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: transform 0.2s;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.page-share-file .download-btn:hover,
.page-share-file .save-btn:hover {
    transform: translateY(-2px);
}

.page-share-file .save-btn.saved {
    background: #10b981;
}

.page-share-file .alert {
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-weight: 500;
}

.page-share-file .alert-success {
    background: #d1fae5;
    color: #065f46;
}

.page-share-file .share-link-box {
    background: var(--bg-secondary);
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
}

.page-share-file .share-link-box label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.9em;
    margin-bottom: 8px;
}

.page-share-file .share-link-input {
    display: flex;
    gap: 10px;
}

.page-share-file .share-link-input input {
    flex: 1;
    padding: 10px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-family: monospace;
}

.page-share-file .copy-btn {
    padding: 10px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}

.page-share-file .copy-btn:hover {
    background: #764ba2;
}

.page-share-file .back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: #374151;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: background 0.2s;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.page-share-file .back-btn:hover {
    background: #4b5563;
}

/* --------------------------------------------
   Share Folder Viewer (.page-share-folder)
   -------------------------------------------- */

/* Suspended / unavailable state */
.page-share-folder.suspended {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0f0f0f;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
}

.page-share-folder .message-box {
    text-align: center;
    padding: 40px;
    background: #212121;
    border-radius: 12px;
    max-width: 500px;
    margin: 20px;
}

.page-share-folder .message-box .icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.page-share-folder .message-box h1 {
    margin-bottom: 10px;
    font-size: 24px;
}

.page-share-folder .message-box p {
    color: #aaa;
    margin-bottom: 20px;
    line-height: 1.6;
}

.page-share-folder .container {
    max-width: 1400px;
}

.page-share-folder .toolbar {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 20px 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.page-share-folder .breadcrumbs {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 0.95em;
    flex: 1;
}

.page-share-folder .breadcrumbs a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s;
}

.page-share-folder .breadcrumbs a:hover {
    color: #764ba2;
}

.page-share-folder .save-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
}

.page-share-folder .save-btn:hover {
    opacity: 0.9;
}

.page-share-folder .save-btn.saved {
    background: #10b981;
}

.page-share-folder .alert {
    padding: 12px 20px;
    border-radius: 10px;
    margin-bottom: 15px;
    font-weight: 500;
}

.page-share-folder .alert-success {
    background: #d1fae5;
    color: #065f46;
}

.page-share-folder .share-link-box {
    background: var(--card-bg);
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.page-share-folder .share-link-box label {
    display: block;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9em;
    margin-bottom: 8px;
}

.page-share-folder .share-link-input {
    display: flex;
    gap: 10px;
}

.page-share-folder .share-link-input input {
    flex: 1;
    padding: 10px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-family: monospace;
}

.page-share-folder .copy-btn {
    padding: 10px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
    white-space: nowrap;
}

.page-share-folder .copy-btn:hover {
    background: #764ba2;
}

.page-share-folder .card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.page-share-folder .player-card {
    background: #000;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 20px;
}

.page-share-folder .video-js {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
}

.page-share-folder .file-info {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 0 0 15px 15px;
}

.page-share-folder .file-title {
    font-size: 1.3em;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.page-share-folder .file-meta {
    color: var(--text-secondary);
    font-size: 0.9em;
}

.page-share-folder .back-to-folder {
    display: inline-block;
    padding: 10px 20px;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 15px;
    transition: background 0.3s;
}

.page-share-folder .back-to-folder:hover {
    background: #764ba2;
}

.page-share-folder .file-grid {
    display: flex;
    flex-direction: column;
}

.page-share-folder .file-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 4px;
    cursor: pointer;
    transition: background 0.12s;
    border-bottom: 1px solid var(--border-color);
    min-width: 0;
}

.page-share-folder .file-item:last-child {
    border-bottom: none;
}

.page-share-folder .file-item:hover {
    background: var(--bg-hover);
}

.page-share-folder .file-thumb {
    flex-shrink: 0;
    width: 44px;
    height: 36px;
    border-radius: 5px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--border-color);
    font-size: 1.4em;
    position: relative;
}

.page-share-folder .file-thumb .thumb-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
}

.page-share-folder .file-thumb .thumb-duration {
    position: absolute;
    bottom: 1px;
    right: 2px;
    background: rgba(0, 0, 0, 0.72);
    color: #fff;
    font-size: 9px;
    padding: 1px 3px;
    border-radius: 3px;
    line-height: 1.4;
    z-index: 1;
}

.page-share-folder .file-name {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.page-share-folder .file-name .name-text {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.page-share-folder .file-name .name-meta {
    font-size: 0.78em;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.page-share-folder .empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}


/* ============================================
   COMPONENT STYLES
   ============================================ */



/* ============================================
   UTILITY CLASSES
   ============================================ */


/* ============================================
   PAGE: 404 ERROR
   ============================================ */

.page-404 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.page-404 .error-container {
    text-align: center;
    padding: 40px;
}

.page-404 .error-code {
    font-size: 120px;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.page-404 h1 {
    font-size: 2em;
    margin-bottom: 20px;
}

.page-404 p {
    font-size: 1.2em;
    margin-bottom: 30px;
    opacity: 0.9;
}

.page-404 .btn {
    display: inline-block;
    padding: 12px 30px;
    background: white;
    color: #667eea;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: transform 0.3s;
}

.page-404 .btn:hover {
    transform: translateY(-2px);
}

/* ============================================================
   PAGE: SHARE FILE VIEWER (s/index.php)
   Body class: .page-share-file
   .page-share-file.suspended → owner suspended state (centered)
   ============================================================ */

.page-share-file {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0f0f0f;
    color: #fff;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.page-share-file *,
.page-share-file *::before,
.page-share-file *::after {
    box-sizing: border-box;
}

/* Suspended / unavailable state */
.page-share-file.suspended {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.page-share-file .message-box {
    text-align: center;
    padding: 40px;
    background: #212121;
    border-radius: 12px;
    max-width: 500px;
    margin: 20px;
}

.page-share-file .message-box .icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.page-share-file .message-box h1 {
    margin-bottom: 10px;
    font-size: 24px;
}

.page-share-file .message-box p {
    color: #aaa;
    margin-bottom: 20px;
    line-height: 1.6;
}


.page-share-file .player-wrapper {
    max-width: 1200px;
    margin: 0 auto;
}

.page-share-file .file-container {
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
}

.page-share-file .video-js {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
}

.page-share-file .file-info {
    background: #212121;
    padding: 20px;
    border-radius: 12px;
}

.page-share-file .file-title {
    font-size: 1.5em;
    margin-bottom: 15px;
}

.page-share-file .file-meta {
    color: #aaa;
    font-size: 0.9em;
}

/* ============================================================
   PAGE: EMAIL VERIFICATION (verify-email.php)
   Body class: .page-verify-email
   ============================================================ */

.page-verify-email {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
}

.page-verify-email .verify-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.page-verify-email .container {
    max-width: 500px;
    width: 100%;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 32px 24px;
    text-align: center;
}

.page-verify-email .icon {
    font-size: 80px;
    margin-bottom: 20px;
}

.page-verify-email .icon.success {
    color: #10b981;
}

.page-verify-email .icon.error {
    color: #ef4444;
}

.page-verify-email .icon.info {
    color: #3b82f6;
}

.page-verify-email h1 {
    font-size: 28px;
    color: #1f2937;
    margin-bottom: 15px;
}

.page-verify-email .message {
    font-size: 16px;
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 30px;
}

.page-verify-email .message.success {
    color: #059669;
}

.page-verify-email .message.error {
    color: #dc2626;
}

.page-verify-email .message.info {
    color: #2563eb;
}

.page-verify-email .btn {
    display: inline-block;
    padding: 14px 35px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s;
    margin: 5px;
}

.page-verify-email .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.4);
}

.page-verify-email .btn-secondary {
    background: #e5e7eb;
    color: #374151;
}

.page-verify-email .btn-secondary:hover {
    background: #d1d5db;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.page-verify-email .footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
    font-size: 14px;
    color: #9ca3af;
}

.page-verify-email .footer a {
    color: #667eea;
    text-decoration: none;
}

.page-verify-email .footer a:hover {
    text-decoration: underline;
}

/* ============================================================
   PAGE: RESEND VERIFICATION EMAIL (resend-verification.php)
   Body class: .page-resend-verification
   ============================================================ */

.page-resend-verification {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
}

.page-resend-verification .resend-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.page-resend-verification .container {
    max-width: 500px;
    width: 100%;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 28px;
}

.page-resend-verification .header {
    text-align: center;
    margin-bottom: 30px;
}

.page-resend-verification .header .icon {
    font-size: 60px;
    margin-bottom: 15px;
}

.page-resend-verification h1 {
    font-size: 26px;
    color: #1f2937;
    margin-bottom: 10px;
}

.page-resend-verification .subtitle {
    color: #6b7280;
    font-size: 15px;
    line-height: 1.5;
}

.page-resend-verification .alert {
    padding: 15px 18px;
    border-radius: 10px;
    margin-bottom: 25px;
    font-size: 15px;
    line-height: 1.6;
}

.page-resend-verification .alert.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.page-resend-verification .alert.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.page-resend-verification .alert.info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

.page-resend-verification .alert a {
    color: #667eea;
    text-decoration: underline;
}

.page-resend-verification .form-group {
    margin-bottom: 20px;
}

.page-resend-verification .form-group label {
    display: block;
    color: #374151;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
}

.page-resend-verification .form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s;
}

.page-resend-verification .form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.page-resend-verification .btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.page-resend-verification .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.4);
}

.page-resend-verification .btn:active {
    transform: translateY(0);
}

.page-resend-verification .links {
    margin-top: 25px;
    text-align: center;
    font-size: 14px;
    color: #6b7280;
}

.page-resend-verification .links a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.page-resend-verification .links a:hover {
    text-decoration: underline;
}

.page-resend-verification .divider {
    margin: 20px 0;
    text-align: center;
    position: relative;
}

.page-resend-verification .divider::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    background: #e5e7eb;
}

.page-resend-verification .divider span {
    background: white;
    padding: 0 15px;
    position: relative;
    color: #9ca3af;
    font-size: 13px;
}

.page-resend-verification .info-box {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
    font-size: 14px;
    color: #4b5563;
    line-height: 1.6;
}

.page-resend-verification .info-box strong {
    color: #1f2937;
}

/* ============================================================
   PAGE: CONFIRM PASSWORD CHANGE (confirm-password-change.php)
   Body class: .page-confirm-password
   ============================================================ */

.page-confirm-password {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
}

.page-confirm-password .confirm-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.page-confirm-password .container {
    max-width: 500px;
    width: 100%;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 32px 24px;
    text-align: center;
}

.page-confirm-password .icon {
    font-size: 80px;
    margin-bottom: 20px;
}

.page-confirm-password .icon.success {
    color: #10b981;
}

.page-confirm-password .icon.error {
    color: #ef4444;
}

.page-confirm-password h1 {
    font-size: 28px;
    color: #1f2937;
    margin-bottom: 15px;
}

.page-confirm-password .message {
    font-size: 16px;
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 30px;
}

.page-confirm-password .message.success {
    color: #059669;
}

.page-confirm-password .message.error {
    color: #dc2626;
}

.page-confirm-password .btn {
    display: inline-block;
    padding: 14px 35px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s;
    margin: 5px;
}

.page-confirm-password .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.4);
}

.page-confirm-password .btn-secondary {
    background: #e5e7eb;
    color: #374151;
}

.page-confirm-password .btn-secondary:hover {
    background: #d1d5db;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.page-confirm-password .footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
    font-size: 14px;
    color: #9ca3af;
}

.page-confirm-password .footer a {
    color: #667eea;
    text-decoration: none;
}

.page-confirm-password .footer a:hover {
    text-decoration: underline;
}

/* ============================================================
   PAGE: MAINTENANCE MODE (MaintenanceMode.php)
   Body class: .page-maintenance
   ============================================================ */

.page-maintenance {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    margin: 0;
    box-sizing: border-box;
}

.page-maintenance .maintenance-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 100%;
    padding: 60px 40px;
    text-align: center;
}

.page-maintenance .icon {
    font-size: 80px;
    margin-bottom: 30px;
    animation: maintenance-float 3s ease-in-out infinite;
}

@keyframes maintenance-float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }
}

.page-maintenance h1 {
    color: #333;
    font-size: 2.5em;
    margin-bottom: 20px;
}

.page-maintenance .message {
    color: #666;
    font-size: 1.2em;
    line-height: 1.6;
    margin-bottom: 30px;
}

.page-maintenance .info {
    background: #f5f7fa;
    border-radius: 10px;
    padding: 20px;
    margin-top: 30px;
}

.page-maintenance .info p {
    color: #888;
    font-size: 0.9em;
    margin: 5px 0;
}

.page-maintenance .spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: maintenance-spin 1s linear infinite;
    margin-top: 20px;
}

@keyframes maintenance-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ============================================
   SHARE LINKS PAGE (/share-links)
   ============================================ */

.page-share-links .container {
    max-width: 1000px;
    padding: 0px;
}

.page-share-links .toolbar {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 12px 16px;
    box-shadow: var(--card-shadow);
    margin: 10px;
}

.page-share-links .toolbar-title h1 {
    font-size: 1.2em;
    color: var(--text-primary);
    margin: 0;
    font-weight: 600;
}

.page-share-links .toolbar-title p {
    font-size: 0.85em;
    color: var(--text-secondary);
    margin: 2px 0 0;
}

.page-share-links .card {
    background: transparent;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
}

.page-share-links .alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 14px;
    font-weight: 500;
    font-size: 0.93em;
}

.page-share-links .alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.page-share-links .alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* File list — shared rules are in .page-files section above */
.page-share-links .file-item {
    cursor: default;
    /* items are not clickable, override .page-files cursor:pointer */
}

.page-share-links .file-name .name-text a {
    color: inherit;
    text-decoration: none;
}

.page-share-links .file-name .name-text a:hover {
    color: #667eea;
    text-decoration: underline;
}

/* Active / Inactive badge */
.page-share-links .share-badge {
    flex-shrink: 0;
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75em;
    font-weight: 600;
    white-space: nowrap;
}

.page-share-links .share-badge.active {
    background: #d1fae5;
    color: #065f46;
}

.page-share-links .share-badge.inactive {
    background: #fee2e2;
    color: #991b1b;
}

/* Empty state */
.page-share-links .empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.page-share-links .empty-state .empty-icon {
    font-size: 3em;
    margin-bottom: 12px;
}

.page-share-links .empty-state h3 {
    color: var(--text-primary);
    margin-bottom: 8px;
    font-size: 1.1em;
}

.page-share-links .empty-state p {
    font-size: 0.9em;
    margin-bottom: 16px;
}

/* Modal */
.page-share-links .modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.page-share-links .modal.active {
    display: flex;
}

.page-share-links .modal-content {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.page-share-links .modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

.page-share-links .btn {
    display: inline-block;
    padding: 9px 18px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 600;
    text-decoration: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transition: opacity 0.2s;
}

.page-share-links .btn:hover {
    opacity: 0.88;
}

.page-share-links .btn-secondary {
    background: var(--border-color);
    color: var(--text-primary);
}

.page-share-links .btn-danger {
    background: #dc2626;
    color: white;
}

/* Toast */
#shareLinksToast {
    display: none;
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: #10b981;
    color: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.95em;
    z-index: 9999;
    pointer-events: none;
}

@media (max-width: 600px) {
    .page-share-links .share-badge {
        display: none;
    }
}