/* ==========================================================================
   White Silence Design System — Complete Standalone CSS
   Replaces Bootstrap CSS entirely across all pages.
   ========================================================================== */

/* ==========================================================================
   1. CSS Variables — White Silence light palette (contrast-boosted)
   ========================================================================== */
:root {
    --bg-body: #F5F6F9;
    --bg-surface: #FFFFFF;
    --bg-elevated: #EDF0F4;
    --bg-input: #FFFFFF;
    --bg-hover: rgba(107, 123, 152, 0.10);
    --bg-active: rgba(107, 123, 152, 0.15);
    --text-primary: #2C3345;
    --text-secondary: #536178;
    --text-muted: #7B8BA0;
    --accent: #6B7B98;
    --accent-hover: #5A6A85;
    --accent-glow: rgba(107, 123, 152, 0.15);
    --accent-glow-strong: rgba(107, 123, 152, 0.25);
    --border: rgba(44, 51, 69, 0.14);
    --border-subtle: rgba(44, 51, 69, 0.08);
    --border-focus: rgba(107, 123, 152, 0.4);
    --success: #6B987E;
    --success-bg: #e8f0eb;
    --danger: #986B6B;
    --danger-bg: #f0e8e8;
    --warning: #98906B;
    --warning-bg: #f0eee8;
    --info: #6B8598;
    --info-bg: #e8eef0;
    --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    --font-mono: "SF Mono", "Fira Code", "Fira Mono", "Roboto Mono", "SFMono-Regular", Menlo, Consolas, monospace;
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --shadow-card: 0 0 0 1px rgba(44, 51, 69, 0.05), 0 2px 8px rgba(44, 51, 69, 0.06);
    --shadow-glow: 0 0 40px rgba(211, 215, 226, 0.3);
    --transition: 150ms ease;
}

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

html {
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-stack);
    color: var(--text-primary);
    background: var(--bg-body);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition);
}

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

table {
    border-collapse: collapse;
    width: 100%;
}

button {
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
}

select {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
}

/* ==========================================================================
   3. Top Navigation Bar
   ========================================================================== */
.top-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(245, 246, 249, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 15px;
    letter-spacing: -0.01em;
}

.nav-brand i {
    font-size: 22px;
    color: var(--accent);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-links a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--radius);
    font-size: 14px;
    color: var(--text-secondary);
    transition: background var(--transition), color var(--transition);
}

.nav-links a:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.nav-links a.active {
    background: var(--bg-active);
    color: var(--text-primary);
}

.nav-links a i {
    font-size: 17px;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

#user-info {
    font-size: 13px;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
}

#logout-btn {
    font-size: 13px;
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: background var(--transition), color var(--transition), border-color var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

#logout-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: rgba(44, 51, 69, 0.12);
}

/* --- Mobile Navigation --- */

.nav-hamburger {
    display: none;
    padding: 6px 8px;
    font-size: 22px;
    color: var(--text-secondary);
    border-radius: var(--radius);
    border: none;
    background: none;
    cursor: pointer;
    transition: background var(--transition), color var(--transition);
}

.nav-hamburger:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.nav-hamburger.active {
    background: var(--bg-active);
    color: var(--text-primary);
}

.nav-mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(245, 246, 249, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 8px 16px;
    box-shadow: 0 4px 16px rgba(44, 51, 69, 0.08);
}

.nav-mobile-menu.active {
    display: block;
}

.nav-mobile-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 15px;
    color: var(--text-secondary);
    transition: background var(--transition), color var(--transition);
}

.nav-mobile-menu a:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.nav-mobile-menu a.active {
    background: var(--bg-active);
    color: var(--text-primary);
}

.nav-mobile-menu a i {
    font-size: 20px;
}

/* ==========================================================================
   4. Main Content Container
   ========================================================================== */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px 48px;
    width: 100%;
}

.page-header {
    margin-bottom: 28px;
}

.page-header h1 {
    font-size: 28px;
    font-weight: 300;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.page-header p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* ==========================================================================
   5. Stats Cards — Frosted Glass
   ========================================================================== */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 2fr;
    gap: 16px;
    margin-bottom: 28px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    position: relative;
    overflow: hidden;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(107, 123, 152, 0.3), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-card:hover {
    border-color: rgba(44, 51, 69, 0.08);
    box-shadow: var(--shadow-glow);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-card-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius);
    background: rgba(211, 215, 226, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.stat-card-icon i {
    font-size: 18px;
    color: var(--accent);
}

.stat-card-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 4px;
}

.stat-card-value {
    font-size: 32px;
    font-weight: 300;
    color: var(--text-primary);
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.stat-card-sublabel {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.stat-max-storage {
    font-size: 0.45em;
    font-weight: 400;
    color: var(--text-muted);
}

.stat-card.upload-card {
    padding: 0;
    display: flex;
    align-items: stretch;
}

.stat-card.upload-card .upload-drop-zone {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-lg);
}

.stat-card.upload-card::before {
    display: none;
}

.stat-card.upload-card:hover {
    box-shadow: none;
    border-color: var(--border);
}

/* ==========================================================================
   6. Search Section
   ========================================================================== */
.search-section {
    margin-bottom: 16px;
}

.search-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-input-group {
    position: relative;
    flex: 1;
}

.search-input-group .search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: var(--text-muted);
    pointer-events: none;
    transition: color var(--transition);
}

#search-input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    font-size: 14px;
    color: var(--text-primary);
    background: var(--bg-input);
    outline: none;
    font-family: var(--font-stack);
    transition: border-color var(--transition), box-shadow var(--transition);
}

#search-input::placeholder {
    color: var(--text-muted);
}

#search-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow), 0 0 20px rgba(107, 123, 152, 0.08);
}

#search-input:focus + .search-icon,
#search-input:focus ~ .search-icon {
    color: var(--accent);
}

.search-actions {
    display: flex;
    gap: 8px;
}

.btn-search {
    padding: 12px 20px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 500;
    transition: background var(--transition), color var(--transition), border-color var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.btn-search-primary {
    background: var(--accent);
    color: #fff;
}

.btn-search-primary:hover {
    background: var(--accent-hover);
}

.btn-search-ghost {
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.btn-search-ghost:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: rgba(44, 51, 69, 0.12);
}

/* ==========================================================================
   7. Files Section — Info-Dense Design
   ========================================================================== */
.files-section {
    margin-top: 8px;
}

.design-section-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-subtle);
}

.design-title-group h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.design-title-group p {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
}

.page-size-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
}

#page-size-select {
    padding: 4px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 13px;
    color: var(--text-primary);
    background: var(--bg-elevated);
    outline: none;
    cursor: pointer;
    font-family: var(--font-stack);
    transition: border-color var(--transition);
}

#page-size-select:focus {
    border-color: var(--accent);
}

.files-table {
    width: 100%;
}

.files-table thead th {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    white-space: nowrap;
    user-select: none;
    background: rgba(230, 236, 244, 0.5);
}

.files-table tbody td {
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 14px;
    color: var(--text-primary);
    vertical-align: middle;
}

.files-table tbody tr {
    transition: background var(--transition);
}

.files-table tbody tr:hover {
    background: var(--bg-hover);
}

.files-table tbody tr:last-child td {
    border-bottom: none;
}

/* ==========================================================================
   7b. File Cards Section — Variation 3 (Info-Dense)
   ========================================================================== */
.file-cards-list {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.file-card {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-subtle);
    transition: background var(--transition);
}

.file-card:last-child {
    border-bottom: none;
}

.file-card:hover {
    background: var(--bg-hover);
}

.file-card.file-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* 3px vertical colored strip */
.file-strip {
    width: 3px;
    height: 40px;
    border-radius: 2px;
    margin-right: 12px;
    flex-shrink: 0;
}

.file-strip.pdf {
    background: #dc2626;
}

.file-strip.image {
    background: #2563eb;
}

.file-strip.csv {
    background: #16a34a;
}

.file-strip.default {
    background: var(--text-muted);
}

.file-strip.audio {
    background: #7c3aed;
}

.file-strip.video {
    background: #ea580c;
}

.file-strip.code {
    background: #ca8a04;
}

/* Container for icon + badge */
.file-icon-wrap {
    position: relative;
    margin-right: 12px;
    flex-shrink: 0;
}

/* 40x40 icon container */
.file-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    font-size: 20px;
}

.file-icon.pdf {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    color: #dc2626;
}

.file-icon.pdf i {
    color: #dc2626;
}

.file-icon.image {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    color: #2563eb;
}

.file-icon.image i {
    color: #2563eb;
}

.file-icon.csv {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    color: #16a34a;
}

.file-icon.csv i {
    color: #16a34a;
}

.file-icon.default {
    background: linear-gradient(135deg, var(--bg-elevated), var(--bg-hover));
    color: var(--text-secondary);
}

.file-icon.default i {
    color: var(--text-secondary);
}

.file-icon.audio {
    background: linear-gradient(135deg, #faf5ff, #f3e8ff);
    color: #7c3aed;
}

.file-icon.audio i {
    color: #7c3aed;
}

.file-icon.video {
    background: linear-gradient(135deg, #fff7ed, #ffedd5);
    color: #ea580c;
}

.file-icon.video i {
    color: #ea580c;
}

.file-icon.code {
    background: linear-gradient(135deg, #fefce8, #fef9c3);
    color: #ca8a04;
}

.file-icon.code i {
    color: #ca8a04;
}

/* Small overlay badge for file type */
.file-type-badge {
    position: absolute;
    bottom: -4px;
    right: -4px;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    background: var(--bg-surface);
    border: 1px solid var(--border);
}

.file-type-badge.pdf {
    color: #dc2626;
}

.file-type-badge.image {
    color: #2563eb;
}

.file-type-badge.csv {
    color: #16a34a;
}

.file-type-badge.default {
    color: var(--text-secondary);
}

.file-type-badge.audio {
    color: #7c3aed;
}

.file-type-badge.video {
    color: #ea580c;
}

.file-type-badge.code {
    color: #ca8a04;
}

/* User card status colors */
.user-strip.active {
    background: var(--success);
}

.user-strip.inactive {
    background: var(--text-muted);
}

.user-icon.active {
    background: linear-gradient(135deg, #e8f0eb, #dcf0e2);
    color: var(--success);
}

.user-icon.active i {
    color: var(--success);
}

.user-icon.inactive {
    background: linear-gradient(135deg, var(--bg-elevated), var(--bg-hover));
    color: var(--text-muted);
}

.user-icon.inactive i {
    color: var(--text-muted);
}

.user-type-badge.active {
    color: var(--success);
}

.user-type-badge.inactive {
    color: var(--text-muted);
}

/* Main info container (flex: 1) */
.file-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Filename in row */
.file-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Clickable filename link */
.file-name-link {
    display: block;
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition);
}

.file-name-link:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* Inline metadata row */
.file-meta {
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.file-meta .meta-separator {
    color: var(--text-muted);
}

/* Expiry section */
.file-expiry {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-right: 16px;
    flex-shrink: 0;
}

.expiry-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.expiry-date {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.expiry-date.warning {
    color: #ea580c;
}

/* Action buttons container */
.file-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.file-action-btn {
    padding: 6px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-surface);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
}

.file-action-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--accent);
}

.file-action-btn.btn-extend:hover {
    color: #2563eb;
    background: #eff6ff;
    border-color: #bfdbfe;
}

.file-action-btn.btn-delete:hover {
    color: #dc2626;
    background: #fef2f2;
    border-color: #fecaca;
}

/* Legacy card layout classes (deprecated, kept for backward compatibility) */
.file-card-header {
    display: none;
}

.file-card-ext-badge {
    display: none;
}

.file-card-divider {
    display: none;
}

.file-card-specs {
    display: none;
}

.file-card-spec-label {
    display: none;
}

.file-card-spec-value {
    display: none;
}

.file-card-spec-value.mono {
    display: none;
}

.file-card-copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 4px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    vertical-align: middle;
    margin-left: 6px;
}

.file-card-copy-btn:hover {
    background: var(--bg-hover);
    color: var(--accent);
    border-color: var(--border);
}

.file-card-actions {
    display: none;
}

.file-card-action-btn {
    display: none;
}

.file-card-action-btn.btn-extend:hover {
    display: none;
}

.file-card-action-btn.btn-delete:hover {
    display: none;
}

.file-card-owner {
    display: none;
}

.file-card-owner.admin-only {
    display: none;
}

.file-card-empty {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
    font-size: 14px;
}

.file-card-url-link {
    color: var(--accent);
    text-decoration: none;
    word-break: break-all;
}

.file-card-url-link:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* ==========================================================================
   8. Pagination
   ========================================================================== */
.pagination-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    margin-top: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.pagination-right-group {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

#pagination-info {
    font-size: 13px;
    color: var(--text-muted);
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

#page-indicator {
    font-size: 13px;
    color: var(--text-secondary);
}

.btn-page {
    font-size: 13px;
    color: var(--text-secondary);
    padding: 6px 14px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: background var(--transition), color var(--transition), border-color var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-page:hover:not(:disabled) {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: rgba(44, 51, 69, 0.12);
}

.btn-page:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* ==========================================================================
   9. Alert / Toast System — Light theme
   ========================================================================== */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 14px;
    line-height: 1.5;
    border: 1px solid transparent;
    position: relative;
    color: var(--text-primary);
}

.alert-dismissible {
    padding-right: 40px;
}

.alert-success {
    background: var(--success-bg);
    color: var(--success);
    border-color: rgba(107, 152, 126, 0.2);
}

.alert-danger {
    background: var(--danger-bg);
    color: var(--danger);
    border-color: rgba(152, 107, 107, 0.2);
}

.alert-warning {
    background: var(--warning-bg);
    color: var(--warning);
    border-color: rgba(152, 144, 107, 0.2);
}

.alert-info {
    background: var(--info-bg);
    color: var(--info);
    border-color: rgba(107, 133, 152, 0.2);
}

.alert-secondary {
    background: var(--bg-elevated);
    color: var(--text-secondary);
    border-color: var(--border);
}

/* Fade animation */
.fade {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.fade.show {
    opacity: 1;
}

.fade.hide {
    opacity: 0;
}

/* Toast positioning */
.toast-container {
    z-index: 9999;
}

/* Close button */
.btn-close {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.5;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: inherit;
}

.btn-close::before {
    content: "\00D7";
    font-size: 18px;
    line-height: 1;
}

.btn-close:hover {
    opacity: 0.9;
}

.btn-close-sm {
    width: 16px;
    height: 16px;
}

/* ==========================================================================
   10. Spinner
   ========================================================================== */
.spinner-border {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-right-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.spinner-border-sm {
    width: 14px;
    height: 14px;
    border-width: 2px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==========================================================================
   11. Badge System
   ========================================================================== */
.badge {
    display: inline-block;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 6px;
    line-height: 1.4;
    letter-spacing: 0.03em;
    vertical-align: middle;
    white-space: nowrap;
}

.badge.bg-success {
    background: var(--success);
    color: #fff;
}

.badge.bg-secondary {
    background: var(--text-muted);
    color: #fff;
}

.badge.bg-danger {
    background: var(--danger);
    color: #fff;
}

.badge.bg-primary {
    background: var(--accent);
    color: #fff;
}

.badge.bg-warning {
    background: var(--warning);
    color: #fff;
}

.badge.bg-info {
    background: var(--info);
    color: #fff;
}

/* ==========================================================================
   12. Button System
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    font-family: var(--font-stack);
    line-height: 1.5;
    border-radius: var(--radius);
    border: 1px solid transparent;
    cursor: pointer;
    transition: background var(--transition), color var(--transition), border-color var(--transition), box-shadow var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.btn-primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

.btn-secondary {
    background: var(--bg-elevated);
    color: var(--text-secondary);
    border-color: var(--border);
}

.btn-secondary:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: rgba(44, 51, 69, 0.12);
}

.btn-warning {
    background: var(--warning);
    color: #fff;
    border-color: var(--warning);
}

.btn-warning:hover {
    opacity: 0.9;
}

.btn-sm {
    padding: 4px 10px;
    font-size: 12px;
    border-radius: 6px;
}

.btn-outline-secondary {
    background: transparent;
    color: var(--text-secondary);
    border-color: var(--border);
}

.btn-outline-secondary:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: rgba(44, 51, 69, 0.12);
}

.btn-outline-light {
    background: transparent;
    color: var(--bg-surface);
    border-color: rgba(255, 255, 255, 0.4);
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.6);
}

.btn-outline-warning {
    background: transparent;
    color: var(--warning);
    border-color: var(--warning);
}

.btn-outline-warning:hover {
    background: var(--warning-bg);
    color: var(--warning);
}

.btn-outline-info {
    background: transparent;
    color: var(--info);
    border-color: var(--info);
}

.btn-outline-info:hover {
    background: var(--info-bg);
    color: var(--info);
}

.btn-outline-primary {
    background: transparent;
    color: var(--accent);
    border-color: var(--accent);
}

.btn-outline-primary:hover {
    background: var(--accent-glow);
    color: var(--accent);
}

.btn-outline-danger {
    background: transparent;
    color: var(--danger);
    border-color: var(--danger);
}

.btn-outline-danger:hover {
    background: var(--danger-bg);
    color: var(--danger);
}

/* ==========================================================================
   13. Form System
   ========================================================================== */
.form-label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-control {
    display: block;
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    font-family: var(--font-stack);
    line-height: 1.5;
    color: var(--text-primary);
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-control:disabled {
    background: var(--bg-elevated);
    opacity: 0.65;
    cursor: not-allowed;
}

.form-text {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: var(--text-muted);
}

.form-select {
    display: block;
    width: 100%;
    padding: 10px 36px 10px 14px;
    font-size: 14px;
    font-family: var(--font-stack);
    line-height: 1.5;
    color: var(--text-primary);
    background: var(--bg-input) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%237B8BA0' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center / 14px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    outline: none;
    cursor: pointer;
    appearance: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.input-group {
    display: flex;
    align-items: stretch;
    width: 100%;
}

.input-group .form-control {
    border-radius: 0;
    flex: 1 1 auto;
}

.input-group .form-control:first-child {
    border-top-left-radius: var(--radius);
    border-bottom-left-radius: var(--radius);
}

.input-group .form-control:last-child {
    border-top-right-radius: var(--radius);
    border-bottom-right-radius: var(--radius);
}

.input-group-text {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    color: var(--text-secondary);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    white-space: nowrap;
}

.input-group-text:first-child {
    border-top-left-radius: var(--radius);
    border-bottom-left-radius: var(--radius);
    border-right: none;
}

.input-group-text:last-child {
    border-top-right-radius: var(--radius);
    border-bottom-right-radius: var(--radius);
    border-left: none;
}

.form-check {
    display: block;
    min-height: 1.5rem;
    padding-left: 1.5em;
    margin-bottom: 0.5rem;
}

.form-check-input {
    float: left;
    width: 1em;
    height: 1em;
    margin-left: -1.5em;
    margin-top: 0.25em;
    appearance: none;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition);
}

.form-check-input[type="checkbox"] {
    border-radius: 4px;
}

.form-check-input[type="radio"] {
    border-radius: 50%;
}

.form-check-input:checked {
    background: var(--accent);
    border-color: var(--accent);
}

.form-check-input:checked[type="checkbox"] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='white' d='M13.485 3.929a.5.5 0 0 1 .058.638l-.058.07-6.5 6.5a.5.5 0 0 1-.638.058l-.07-.058-3-3a.5.5 0 0 1 .638-.765l.07.058L6.5 10.293l6.146-6.147a.5.5 0 0 1 .638-.058l.07.058z'/%3E%3C/svg%3E");
    background-size: contain;
}

.form-check-input:focus {
    box-shadow: 0 0 0 3px var(--accent-glow);
    border-color: var(--accent);
}

.form-check-label {
    cursor: pointer;
}

/* ==========================================================================
   14. Card System
   ========================================================================== */
.card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.card-body {
    padding: 24px;
}

.card-header {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    background: rgba(230, 236, 244, 0.3);
}

.card-footer {
    padding: 12px 24px;
    border-top: 1px solid var(--border);
    background: rgba(230, 236, 244, 0.2);
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.shadow-sm {
    box-shadow: var(--shadow-card);
}

/* ==========================================================================
   15. Table System
   ========================================================================== */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table thead th {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    white-space: nowrap;
    user-select: none;
    background: rgba(230, 236, 244, 0.5);
}

.table tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 14px;
    color: var(--text-primary);
    vertical-align: middle;
}

.table tbody tr {
    transition: background var(--transition);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table-hover tbody tr:hover {
    background: var(--bg-hover);
}

.table-light {
    background: rgba(230, 236, 244, 0.3);
}

.table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.align-middle {
    vertical-align: middle;
}

/* ==========================================================================
   16. Modal System
   ========================================================================== */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(44, 51, 69, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1050;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.modal-backdrop.show {
    opacity: 1;
    pointer-events: auto;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1055;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modal.show {
    display: flex;
}

.modal-dialog {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    transform: translateY(-20px);
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.modal.show .modal-dialog {
    transform: translateY(0);
    opacity: 1;
}

.modal-dialog-centered {
    display: flex;
    align-items: center;
    min-height: calc(100% - 48px);
}

.modal-content {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px rgba(44, 51, 69, 0.12);
    width: 100%;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.modal-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.modal-header .btn-close {
    position: relative;
    top: auto;
    right: auto;
    transform: none;
    flex-shrink: 0;
    margin-left: 12px;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 16px 24px;
    border-top: 1px solid var(--border);
}

/* ==========================================================================
   17. Login Page Styles
   ========================================================================== */
.authentication-bg {
    position: relative;
    background: var(--bg-body);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.authentication-bg .container-fluid {
    max-width: 100%;
    padding: 0;
}

.login-branding-panel {
    background: linear-gradient(135deg, #4A5A73 0%, #5A6A85 50%, #6B7B98 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px;
    color: #fff;
    min-height: 100vh;
}

.login-branding-panel h2 {
    font-size: 28px;
    font-weight: 300;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.login-branding-panel p {
    font-size: 14px;
    opacity: 0.8;
    line-height: 1.6;
    margin-bottom: 32px;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 24px;
}

.feature-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 18px;
}

.feature-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}

.feature-desc {
    font-size: 13px;
    opacity: 0.7;
    line-height: 1.5;
}

.authentication-bg .card {
    border: 1px solid var(--border);
    box-shadow: var(--shadow-card);
    border-radius: var(--radius-lg);
}

.authentication-bg .card-body {
    padding: 32px;
}

.authentication-bg .btn-primary {
    padding: 10px 16px;
    font-weight: 500;
    width: 100%;
}

.authentication-bg .spinner-border-sm {
    width: 14px;
    height: 14px;
    border-width: 2px;
}

.auth-logo img {
    max-height: 60px;
    object-fit: contain;
}

.input-custom-icon {
    position: relative;
}

.input-custom-icon input.form-control {
    padding-left: 40px;
}

.input-custom-icon .bx {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: var(--text-muted);
    z-index: 4;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--text-muted);
    z-index: 4;
    font-size: 18px;
    padding: 0;
    line-height: 1;
    background: none;
    border: none;
}

.password-toggle:hover {
    color: var(--text-primary);
}

/* ==========================================================================
   18. Profile Page Styles — Two-Column Split Layout
   ========================================================================== */

/* --- Two-Column Layout --- */
.profile-layout {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 24px;
}

/* --- Left Sidebar --- */
.profile-sidebar {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 32px 24px;
    height: fit-content;
}

.sidebar-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.sidebar-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 500;
    margin-bottom: 16px;
}

.sidebar-name {
    font-size: 20px;
    font-weight: 500;
    color: var(--text-primary);
    margin: 0 0 4px;
}

.sidebar-email {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0 0 20px;
    word-break: break-all;
}

.sidebar-divider {
    width: 100%;
    height: 1px;
    background: var(--border-subtle);
    margin: 0 0 20px;
}

.info-list {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: left;
    padding: 0 8px;
}

.info-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.info-value {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.info-value.status-active {
    color: var(--success);
}

/* --- Right Column --- */
.profile-main {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

#profile-main-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

#profile-main-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* --- Main Cards --- */
.main-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.main-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-subtle);
    background: rgba(230, 236, 244, 0.3);
}

.main-card-header i {
    font-size: 18px;
    color: var(--accent);
}

.main-card-header h6 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
}

.main-card-body {
    padding: 24px;
}

/* --- Premium Card (Variation 05 - Executive Premium) --- */
.premium-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px 32px;
    position: relative;
    overflow: hidden;
}

.premium-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(107, 123, 152, 0.3), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.premium-card:hover {
    border-color: rgba(44, 51, 69, 0.08);
    box-shadow: var(--shadow-glow);
}

.premium-card:hover::before {
    opacity: 1;
}

.card-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 12px;
}

.api-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.api-input-group {
    display: flex;
    align-items: stretch;
}

.api-input {
    flex: 1;
    padding: 12px 16px;
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--text-primary);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-right: none;
    border-radius: var(--radius) 0 0 var(--radius);
    outline: none;
}

.api-copy-btn {
    padding: 12px 20px;
    border: 1px solid var(--accent);
    border-radius: 0 var(--radius) var(--radius) 0;
    background: var(--accent);
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.api-copy-btn:hover:not(:disabled) {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

.api-copy-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.helper-text {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
}

/* --- Dashboard Stats Section Header (Variation 02) --- */
.section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 4px;
}

.section-header i {
    font-size: 16px;
    color: var(--accent);
}

.section-header h6 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
}

/* --- Profile Card (Variation 02 style) --- */
.profile-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
}

.profile-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(107, 123, 152, 0.3), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.profile-card:hover {
    border-color: rgba(44, 51, 69, 0.08);
    box-shadow: var(--shadow-glow);
}

.profile-card:hover::before {
    opacity: 1;
}

.profile-card:last-child {
    margin-bottom: 0;
}

/* --- Settings Row --- */
.setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
}

.setting-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.setting-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    background: var(--bg-elevated);
    color: var(--text-muted);
    font-size: 20px;
}

.setting-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.setting-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

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

.setting-btn {
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-surface);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.setting-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--accent);
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .profile-layout {
        grid-template-columns: 1fr;
    }

    .profile-sidebar {
        padding: 24px 20px;
    }

    .main-card-body {
        padding: 20px;
    }

    .setting-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .api-input-group {
        flex-direction: column;
    }

    .api-input {
        border-right: 1px solid var(--border);
        border-radius: var(--radius) var(--radius) 0 0;
    }

    .api-copy-btn {
        border-radius: 0 0 var(--radius) var(--radius);
        border-top: none;
        justify-content: center;
    }
}

/* ==========================================================================
   19. Users Page Styles
   ========================================================================== */
.api-key-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.api-key-group .form-control {
    font-family: var(--font-mono);
    font-size: 12px;
    background: var(--bg-elevated);
}

.action-btn-group {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

/* ==========================================================================
   20. Bootstrap Utility Shims — Display
   ========================================================================== */
.d-none { display: none !important; }
.d-flex { display: flex !important; }

@media (min-width: 992px) {
    .d-lg-none { display: none !important; }
    .d-none.d-lg-flex,
    .d-lg-flex.d-none { display: flex !important; }
}

/* ==========================================================================
   21. Bootstrap Utility Shims — Flex
   ========================================================================== */
.align-items-center { align-items: center !important; }
.flex-grow-1 { flex-grow: 1 !important; }
.flex-wrap { flex-wrap: wrap !important; }
.gap-1 { gap: 4px !important; }
.gap-2 { gap: 8px !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-center { justify-content: center !important; }

/* ==========================================================================
   22. Bootstrap Utility Shims — Spacing
   ========================================================================== */
.me-1 { margin-right: 4px !important; }
.me-2 { margin-right: 8px !important; }
.ms-1 { margin-left: 4px !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 4px !important; }
.mb-2 { margin-bottom: 8px !important; }
.mb-3 { margin-bottom: 16px !important; }
.mb-4 { margin-bottom: 24px !important; }
.mt-3 { margin-top: 16px !important; }
.py-2 { padding-top: 8px !important; padding-bottom: 8px !important; }
.py-4 { padding-top: 24px !important; padding-bottom: 24px !important; }
.p-3 { padding: 16px !important; }
.p-4 { padding: 24px !important; }
.p-5 { padding: 32px !important; }

@media (min-width: 768px) {
    .px-md-4 { padding-left: 24px !important; padding-right: 24px !important; }
}

/* ==========================================================================
   23. Bootstrap Utility Shims — Text
   ========================================================================== */
.text-center { text-align: center !important; }
.text-muted { color: var(--text-muted) !important; }
.text-dark { color: var(--text-primary) !important; }
.text-light { color: var(--text-muted) !important; }
.text-white { color: #fff !important; }
.text-uppercase { text-transform: uppercase !important; }
.small { font-size: 12px !important; }
.fw-bold { font-weight: 700 !important; }
.fw-semibold { font-weight: 600 !important; }
.font-monospace { font-family: var(--font-mono) !important; }

/* ==========================================================================
   24. Bootstrap Utility Shims — Background
   ========================================================================== */
.bg-white { background: var(--bg-surface) !important; }
.bg-light { background: rgba(211, 215, 226, 0.3) !important; }
.bg-success { background: var(--success) !important; }
.bg-secondary { background: var(--text-muted) !important; }
.bg-danger { background: var(--danger) !important; }
.bg-primary { background: var(--accent) !important; }
.bg-warning { background: var(--warning) !important; }
.bg-info { background: var(--info) !important; }
.bg-dark { background: var(--text-primary) !important; }
.bg-opacity-10 { opacity: 0.1; }

/* ==========================================================================
   25. Bootstrap Utility Shims — Position
   ========================================================================== */
.position-fixed { position: fixed !important; }
.position-absolute { position: absolute !important; }
.position-relative { position: relative !important; }
.top-0 { top: 0 !important; }
.end-0 { right: 0 !important; }
.top-50 { top: 50% !important; }
.translate-middle-y { transform: translateY(-50%) !important; }

/* ==========================================================================
   26. Bootstrap Utility Shims — Layout
   ========================================================================== */
.container-fluid {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.row {
    display: flex;
    flex-wrap: wrap;
}

.g-2 { gap: 8px; }
.g-3 { gap: 16px; }

.col-md-2 { flex: 0 0 16.6667%; max-width: 16.6667%; }
.col-md-4 { flex: 0 0 33.3333%; max-width: 33.3333%; }
.col-md-6 { flex: 0 0 50%; max-width: 50%; }
.col-md-9 { flex: 0 0 75%; max-width: 75%; }
.col-lg-6 { flex: 0 0 50%; max-width: 50%; }
.col-lg-10 { flex: 0 0 83.3333%; max-width: 83.3333%; }
.col-sm-4 { flex: 0 0 33.3333%; max-width: 33.3333%; }
.col-sm-8 { flex: 0 0 66.6667%; max-width: 66.6667%; }
.col-auto { flex: 0 0 auto; width: auto; }

.min-vh-100 { min-height: 100vh !important; }
.h-100 { height: 100% !important; }
.w-100 { width: 100% !important; }

/* ==========================================================================
   27. Bootstrap Utility Shims — Borders
   ========================================================================== */
.border-0 { border: 0 !important; }
.border-top { border-top: 1px solid var(--border) !important; }
.border-bottom { border-bottom: 1px solid var(--border) !important; }
.rounded-3 { border-radius: var(--radius-lg) !important; }
.rounded { border-radius: var(--radius) !important; }

/* ==========================================================================
   28. Bootstrap Utility Shims — Misc
   ========================================================================== */
.overflow-hidden { overflow: hidden !important; }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ==========================================================================
   29. Responsive Breakpoints
   ========================================================================== */
@media (max-width: 768px) {
    .nav-inner {
        padding: 0 16px;
        height: 52px;
    }

    .nav-links {
        display: none;
    }

    .nav-hamburger {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .nav-left {
        gap: 16px;
    }

    .main-content {
        padding: 20px 16px 32px;
    }

    .page-header h1 {
        font-size: 22px;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .upload-card {
        grid-column: 1 / -1;
    }

    .stat-card.upload-card {
        padding: 0;
    }

    .stat-card {
        padding: 20px;
    }

    .stat-card-value {
        font-size: 26px;
    }

    .search-wrapper {
        flex-wrap: wrap;
    }

    .search-input-group {
        flex-basis: 100%;
    }

    .search-actions {
        width: 100%;
    }

    .search-actions .btn-search {
        flex: 1;
        justify-content: center;
    }

    /* Design section header responsive */
    .design-section-header {
        flex-direction: column;
        gap: 12px;
    }

    .files-table thead th,
    .files-table tbody td {
        padding: 10px 12px;
        font-size: 12px;
    }

    .pagination-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .pagination-right-group {
        width: 100%;
        justify-content: space-between;
    }

    #user-info {
        display: none;
    }

    /* Stack grid columns on mobile */
    .row {
        flex-direction: column;
    }

    [class^="col-md-"],
    [class^="col-lg-"],
    [class^="col-sm-"] {
        flex: 0 0 100%;
        max-width: 100%;
    }

    /* Login page stacking */
    .login-branding-panel {
        display: none;
    }

    /* Modal full width on mobile */
    .modal {
        padding: 16px;
    }

    .modal-dialog {
        max-width: 100%;
    }

    .modal-body {
        padding: 16px;
    }

    .modal-header,
    .modal-footer {
        padding: 12px 16px;
    }

    /* Table responsive */
    .table-responsive {
        margin: 0 -16px;
        padding: 0 16px;
    }

    /* Card adjustments */
    .card-body {
        padding: 16px;
    }

    /* Form full width */
    .form-control,
    .form-select {
        font-size: 16px; /* Prevent iOS zoom */
    }

    /* File Cards responsive */
    .file-card-specs {
        grid-template-columns: 1fr;
    }

    .file-card-header {
        padding: 16px 16px 0 16px;
    }

    .file-card-divider {
        margin: 12px 16px;
    }

    .file-card-specs {
        padding: 0 16px;
    }

    .file-card-actions {
        padding: 12px 16px 16px 16px;
    }

    /* File Row Layout - Mobile Responsive */
    .file-card.file-row {
        flex-wrap: wrap;
        gap: 12px;
        padding: 12px 16px;
    }

    .file-card.file-row .file-strip {
        height: 32px;
    }

    .file-card.file-row .file-icon {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }

    .file-card.file-row .file-info {
        width: 100%;
        order: 1;
        min-width: 0;
    }

    .file-card.file-row .file-expiry {
        order: 2;
        align-items: flex-start;
        margin-right: 0;
        margin-left: auto;
    }

    .file-card.file-row .file-actions {
        width: 100%;
        justify-content: flex-end;
        order: 3;
        padding-top: 8px;
        border-top: 1px solid var(--border-subtle);
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr 2fr;
        gap: 12px;
    }

    .stat-card {
        padding: 20px;
    }

    .stat-card-value {
        font-size: 28px;
    }
}

@media (min-width: 1025px) {
    /* Login page side-by-side layout */
    .authentication-bg {
        display: flex;
    }
}

/* ==========================================================================
   30. Upload Drop Zone & Result Modal
   ========================================================================== */

.upload-drop-zone {
    position: relative;
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 40px 24px;
    text-align: center;
    cursor: pointer;
    transition: border-color var(--transition), background var(--transition);
    background: rgba(255, 255, 255, 0.5);
}

.upload-drop-zone:hover {
    border-color: var(--accent);
    background: var(--accent-glow);
}

.upload-drop-zone.drag-over {
    border-color: var(--accent);
    background: var(--accent-glow-strong);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.upload-drop-zone.uploading {
    pointer-events: none;
    opacity: 0.7;
}

.upload-drop-zone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.upload-drop-zone-icon {
    font-size: 48px;
    color: var(--accent);
    margin-bottom: 8px;
}

.upload-drop-zone-text {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
    margin: 0;
}

.upload-drop-zone-subtext {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
}

.upload-drop-zone-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 12px;
}

.upload-result-summary {
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
}

.upload-result-summary.result-success {
    color: var(--success);
}

.upload-result-summary.result-error {
    color: var(--danger);
}

.upload-result-json-wrapper {
    margin-top: 8px;
}

.upload-result-json-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}

.upload-result-json {
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.5;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    padding: 16px;
    margin: 0;
    overflow-x: auto;
    max-height: 300px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-all;
    color: var(--text-primary);
}

@media (max-width: 768px) {
    .upload-drop-zone {
        padding: 24px 16px;
    }

    .upload-drop-zone-icon {
        font-size: 36px;
    }
}

/* ===== File Action Buttons ===== */

.action-buttons {
    white-space: nowrap;
    text-align: center;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 16px;
    vertical-align: middle;
    margin: 0 2px;
}

.btn-action:hover {
    background: #f1f5f9;
    border-color: #e2e8f0;
}

.btn-action:active {
    transform: scale(0.95);
}

.btn-extend:hover {
    color: #2563eb;
    background: #eff6ff;
    border-color: #bfdbfe;
}

.btn-delete:hover {
    color: #dc2626;
    background: #fef2f2;
    border-color: #fecaca;
}

.btn-action i {
    font-size: 16px;
    line-height: 1;
}

/* ==========================================================================
   Site Footer
   ========================================================================== */

.site-footer {
    border-top: 1px solid var(--border);
    background: var(--bg-surface);
    padding: 16px 32px;
    margin-top: auto;
}

.site-footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    font-size: 13px;
    color: var(--text-muted);
}

.site-footer-inner span {
    display: inline-block;
}

@media (max-width: 768px) {
    .site-footer {
        padding: 12px 16px;
    }

    .site-footer-inner {
        flex-direction: column;
        text-align: center;
        gap: 4px;
    }
}

/* ==========================================================================
   31. Dark Mode — [data-theme="dark"] overrides
   ========================================================================== */

/* --- 31a. Custom Property Overrides --- */
[data-theme="dark"] {
    --bg-body: #0f1117;
    --bg-surface: #1a1d27;
    --bg-elevated: #22252f;
    --bg-input: #1a1d27;
    --bg-hover: rgba(255, 255, 255, 0.06);
    --bg-active: rgba(255, 255, 255, 0.10);
    --text-primary: #e2e4e9;
    --text-secondary: #a0a6b4;
    --text-muted: #6b7280;
    --accent: #8b9cc5;
    --accent-hover: #9dadc8;
    --accent-glow: rgba(139, 156, 197, 0.15);
    --accent-glow-strong: rgba(139, 156, 197, 0.25);
    --border: rgba(255, 255, 255, 0.10);
    --border-subtle: rgba(255, 255, 255, 0.05);
    --border-focus: rgba(139, 156, 197, 0.50);
    --success: #7dbd95;
    --success-bg: rgba(125, 189, 149, 0.12);
    --danger: #c47d7d;
    --danger-bg: rgba(196, 125, 125, 0.12);
    --warning: #c4b67d;
    --warning-bg: rgba(196, 182, 125, 0.12);
    --info: #7d9dbd;
    --info-bg: rgba(125, 157, 189, 0.12);
    --shadow-card: 0 0 0 1px rgba(255, 255, 255, 0.04), 0 2px 8px rgba(0, 0, 0, 0.30);
    --shadow-glow: 0 0 40px rgba(139, 156, 197, 0.08);
}

/* --- 31b. Navigation Dark Overrides --- */
[data-theme="dark"] .top-nav {
    background: rgba(15, 17, 23, 0.92);
}

[data-theme="dark"] .nav-mobile-menu {
    background: rgba(15, 17, 23, 0.98);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.30);
}

/* --- 31c. Stat Cards & Frosted Glass Dark --- */
[data-theme="dark"] .stat-card {
    background: rgba(26, 29, 39, 0.80);
}

[data-theme="dark"] .stat-card::before {
    background: linear-gradient(90deg, transparent, rgba(139, 156, 197, 0.25), transparent);
}

[data-theme="dark"] .stat-card:hover {
    border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .stat-card-icon {
    background: rgba(255, 255, 255, 0.06);
}

/* --- 31d. Search Input Dark --- */
[data-theme="dark"] #search-input:focus {
    box-shadow: 0 0 0 3px var(--accent-glow), 0 0 20px rgba(139, 156, 197, 0.06);
}

/* --- 31e. Table Dark Overrides --- */
[data-theme="dark"] .files-table thead th,
[data-theme="dark"] .table thead th {
    background: rgba(255, 255, 255, 0.04);
}

[data-theme="dark"] .table-light {
    background: rgba(255, 255, 255, 0.04);
}

/* --- 31f. File Type Icon Backgrounds (hardcoded light tints) --- */
[data-theme="dark"] .file-icon.pdf {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.15), rgba(220, 38, 38, 0.25));
}

[data-theme="dark"] .file-icon.image {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.15), rgba(37, 99, 235, 0.25));
}

[data-theme="dark"] .file-icon.csv {
    background: linear-gradient(135deg, rgba(22, 163, 74, 0.15), rgba(22, 163, 74, 0.25));
}

[data-theme="dark"] .file-icon.audio {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.15), rgba(124, 58, 237, 0.25));
}

[data-theme="dark"] .file-icon.video {
    background: linear-gradient(135deg, rgba(234, 88, 12, 0.15), rgba(234, 88, 12, 0.25));
}

[data-theme="dark"] .file-icon.code {
    background: linear-gradient(135deg, rgba(202, 138, 4, 0.15), rgba(202, 138, 4, 0.25));
}

[data-theme="dark"] .file-icon.default {
    background: linear-gradient(135deg, var(--bg-elevated), rgba(255, 255, 255, 0.06));
}

/* --- 31g. User Icon Dark --- */
[data-theme="dark"] .user-icon.active {
    background: linear-gradient(135deg, rgba(125, 189, 149, 0.15), rgba(125, 189, 149, 0.25));
}

[data-theme="dark"] .user-icon.inactive {
    background: linear-gradient(135deg, var(--bg-elevated), rgba(255, 255, 255, 0.06));
}

/* --- 31h. File Action Button Hover Dark --- */
[data-theme="dark"] .file-action-btn.btn-extend:hover {
    background: rgba(37, 99, 235, 0.15);
    border-color: rgba(37, 99, 235, 0.35);
}

[data-theme="dark"] .file-action-btn.btn-delete:hover {
    background: rgba(220, 38, 38, 0.15);
    border-color: rgba(220, 38, 38, 0.35);
}

/* --- 31i. Card Header / Footer Dark --- */
[data-theme="dark"] .card-header {
    background: rgba(255, 255, 255, 0.04);
}

[data-theme="dark"] .card-footer {
    background: rgba(255, 255, 255, 0.03);
}

/* --- 31j. Main Card Header Dark --- */
[data-theme="dark"] .main-card-header {
    background: rgba(255, 255, 255, 0.04);
}

/* --- 31k. Modal Dark --- */
[data-theme="dark"] .modal-backdrop {
    background: rgba(0, 0, 0, 0.60);
}

[data-theme="dark"] .modal-content {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.40);
}

/* --- 31l. Profile Sidebar & Premium Cards Dark --- */
[data-theme="dark"] .profile-sidebar {
    background: rgba(26, 29, 39, 0.80);
}

[data-theme="dark"] .premium-card {
    background: rgba(26, 29, 39, 0.80);
}

[data-theme="dark"] .premium-card:hover {
    border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .profile-card {
    background: rgba(26, 29, 39, 0.80);
}

[data-theme="dark"] .profile-card:hover {
    border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .premium-card::before,
[data-theme="dark"] .profile-card::before {
    background: linear-gradient(90deg, transparent, rgba(139, 156, 197, 0.25), transparent);
}

/* --- 31m. Upload Drop Zone Dark --- */
[data-theme="dark"] .upload-drop-zone {
    background: rgba(26, 29, 39, 0.50);
}

/* --- 31n. Action Buttons Dark (hardcoded colors) --- */
[data-theme="dark"] .btn-action {
    color: #8b95a5;
}

[data-theme="dark"] .btn-action:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .btn-extend:hover {
    background: rgba(37, 99, 235, 0.15);
    border-color: rgba(37, 99, 235, 0.35);
}

[data-theme="dark"] .btn-delete:hover {
    background: rgba(220, 38, 38, 0.15);
    border-color: rgba(220, 38, 38, 0.35);
}

/* --- 31o. Form Select Dropdown Arrow Dark --- */
[data-theme="dark"] .form-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3E%3C/svg%3E");
}

/* --- 31p. Code / Pre Block Dark --- */
[data-theme="dark"] .upload-result-json {
    background: var(--bg-elevated);
    border-color: rgba(255, 255, 255, 0.06);
}

/* --- 31q. Site Footer Dark --- */
[data-theme="dark"] .site-footer {
    background: var(--bg-surface);
}

/* --- 31r. Login Branding Panel (dark-mode gradient adjustment) --- */
[data-theme="dark"] .login-branding-panel {
    background: linear-gradient(135deg, #1a2030 0%, #222838 50%, #2a3040 100%);
}

/* --- 31s. Expiry Warning Dark --- */
[data-theme="dark"] .expiry-date.warning {
    color: #f59e0b;
}

/* --- 31t. API Input Dark --- */
[data-theme="dark"] .api-input {
    background: var(--bg-elevated);
}

/* --- 31u. Setting Icon Dark --- */
[data-theme="dark"] .setting-icon {
    background: rgba(255, 255, 255, 0.06);
}

/* --- 31v. Background Utility Dark --- */
[data-theme="dark"] .bg-light {
    background: rgba(255, 255, 255, 0.04) !important;
}

/* ==========================================================================
     32. Theme Toggle Switch (flex layout: sun | track | moon)
     ========================================================================== */

/* --- Button wrapper --- */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    vertical-align: middle;
}

.theme-toggle:focus-visible {
    outline: 2px solid var(--border-focus);
    outline-offset: 2px;
    border-radius: var(--radius);
}

/* --- Track (pill background) --- */
.theme-toggle-track {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
    border-radius: 10px;
    background: #e8d5a3;
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: background 0.3s ease, box-shadow 0.3s ease;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* --- Thumb (sliding circle) --- */
.theme-toggle-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, background 0.3s ease;
}

/* --- Sun icon (visible in light mode) --- */
.theme-icon-sun {
    font-size: 12px;
    color: #a08030;
    opacity: 1;
    transition: opacity 0.3s ease, color 0.3s ease;
    pointer-events: none;
}

/* --- Moon icon (hidden in light mode) --- */
.theme-icon-moon {
    font-size: 12px;
    color: #d0d5e8;
    opacity: 0;
    transition: opacity 0.3s ease, color 0.3s ease;
    pointer-events: none;
}

/* --- Hover / Active states (light mode) --- */
.theme-toggle:hover .theme-toggle-track {
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.08), 0 0 0 3px rgba(232, 213, 163, 0.25);
}

.theme-toggle:active .theme-toggle-thumb {
    transform: scale(0.95);
}

/* --- Dark mode overrides --- */
[data-theme="dark"] .theme-toggle-track {
    background: #4a5578;
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.25), 0 0 12px rgba(74, 85, 120, 0.25);
}

[data-theme="dark"] .theme-toggle-thumb {
    transform: translateX(16px);
    background: #d8dce8;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3), 0 0 8px rgba(139, 156, 197, 0.3);
}

[data-theme="dark"] .theme-icon-sun {
    opacity: 0;
}

[data-theme="dark"] .theme-icon-moon {
    opacity: 1;
    color: #d0d5e8;
}

/* --- Hover / Active states (dark mode) --- */
[data-theme="dark"] .theme-toggle:hover .theme-toggle-track {
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.25), 0 0 12px rgba(74, 85, 120, 0.25), 0 0 0 3px rgba(74, 85, 120, 0.25);
}

[data-theme="dark"] .theme-toggle:active .theme-toggle-thumb {
    transform: translateX(16px) scale(0.95);
}

/* ==========================================================================
   33. System Preference Fallback — prefers-color-scheme: dark
   Applies only when html has no data-theme attribute set.
   ========================================================================== */
@media (prefers-color-scheme: dark) {
    html:not([data-theme]) {
        --bg-body: #0f1117;
        --bg-surface: #1a1d27;
        --bg-elevated: #22252f;
        --bg-input: #1a1d27;
        --bg-hover: rgba(255, 255, 255, 0.06);
        --bg-active: rgba(255, 255, 255, 0.10);
        --text-primary: #e2e4e9;
        --text-secondary: #a0a6b4;
        --text-muted: #6b7280;
        --accent: #8b9cc5;
        --accent-hover: #9dadc8;
        --accent-glow: rgba(139, 156, 197, 0.15);
        --accent-glow-strong: rgba(139, 156, 197, 0.25);
        --border: rgba(255, 255, 255, 0.10);
        --border-subtle: rgba(255, 255, 255, 0.05);
        --border-focus: rgba(139, 156, 197, 0.50);
        --success: #7dbd95;
        --success-bg: rgba(125, 189, 149, 0.12);
        --danger: #c47d7d;
        --danger-bg: rgba(196, 125, 125, 0.12);
        --warning: #c4b67d;
        --warning-bg: rgba(196, 182, 125, 0.12);
        --info: #7d9dbd;
        --info-bg: rgba(125, 157, 189, 0.12);
        --shadow-card: 0 0 0 1px rgba(255, 255, 255, 0.04), 0 2px 8px rgba(0, 0, 0, 0.30);
        --shadow-glow: 0 0 40px rgba(139, 156, 197, 0.08);
    }

    html:not([data-theme]) .top-nav {
        background: rgba(15, 17, 23, 0.92);
    }

    html:not([data-theme]) .nav-mobile-menu {
        background: rgba(15, 17, 23, 0.98);
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.30);
    }

    html:not([data-theme]) .stat-card {
        background: rgba(26, 29, 39, 0.80);
    }

    html:not([data-theme]) .stat-card::before {
        background: linear-gradient(90deg, transparent, rgba(139, 156, 197, 0.25), transparent);
    }

    html:not([data-theme]) .stat-card:hover {
        border-color: rgba(255, 255, 255, 0.08);
    }

    html:not([data-theme]) .stat-card-icon {
        background: rgba(255, 255, 255, 0.06);
    }

    html:not([data-theme]) #search-input:focus {
        box-shadow: 0 0 0 3px var(--accent-glow), 0 0 20px rgba(139, 156, 197, 0.06);
    }

    html:not([data-theme]) .files-table thead th,
    html:not([data-theme]) .table thead th {
        background: rgba(255, 255, 255, 0.04);
    }

    html:not([data-theme]) .table-light {
        background: rgba(255, 255, 255, 0.04);
    }

    html:not([data-theme]) .file-icon.pdf {
        background: linear-gradient(135deg, rgba(220, 38, 38, 0.15), rgba(220, 38, 38, 0.25));
    }

    html:not([data-theme]) .file-icon.image {
        background: linear-gradient(135deg, rgba(37, 99, 235, 0.15), rgba(37, 99, 235, 0.25));
    }

    html:not([data-theme]) .file-icon.csv {
        background: linear-gradient(135deg, rgba(22, 163, 74, 0.15), rgba(22, 163, 74, 0.25));
    }

    html:not([data-theme]) .file-icon.audio {
        background: linear-gradient(135deg, rgba(124, 58, 237, 0.15), rgba(124, 58, 237, 0.25));
    }

    html:not([data-theme]) .file-icon.video {
        background: linear-gradient(135deg, rgba(234, 88, 12, 0.15), rgba(234, 88, 12, 0.25));
    }

    html:not([data-theme]) .file-icon.code {
        background: linear-gradient(135deg, rgba(202, 138, 4, 0.15), rgba(202, 138, 4, 0.25));
    }

    html:not([data-theme]) .file-icon.default {
        background: linear-gradient(135deg, var(--bg-elevated), rgba(255, 255, 255, 0.06));
    }

    html:not([data-theme]) .user-icon.active {
        background: linear-gradient(135deg, rgba(125, 189, 149, 0.15), rgba(125, 189, 149, 0.25));
    }

    html:not([data-theme]) .user-icon.inactive {
        background: linear-gradient(135deg, var(--bg-elevated), rgba(255, 255, 255, 0.06));
    }

    html:not([data-theme]) .file-action-btn.btn-extend:hover {
        background: rgba(37, 99, 235, 0.15);
        border-color: rgba(37, 99, 235, 0.35);
    }

    html:not([data-theme]) .file-action-btn.btn-delete:hover {
        background: rgba(220, 38, 38, 0.15);
        border-color: rgba(220, 38, 38, 0.35);
    }

    html:not([data-theme]) .card-header {
        background: rgba(255, 255, 255, 0.04);
    }

    html:not([data-theme]) .card-footer {
        background: rgba(255, 255, 255, 0.03);
    }

    html:not([data-theme]) .main-card-header {
        background: rgba(255, 255, 255, 0.04);
    }

    html:not([data-theme]) .modal-backdrop {
        background: rgba(0, 0, 0, 0.60);
    }

    html:not([data-theme]) .modal-content {
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.40);
    }

    html:not([data-theme]) .profile-sidebar {
        background: rgba(26, 29, 39, 0.80);
    }

    html:not([data-theme]) .premium-card {
        background: rgba(26, 29, 39, 0.80);
    }

    html:not([data-theme]) .premium-card:hover {
        border-color: rgba(255, 255, 255, 0.08);
    }

    html:not([data-theme]) .profile-card {
        background: rgba(26, 29, 39, 0.80);
    }

    html:not([data-theme]) .profile-card:hover {
        border-color: rgba(255, 255, 255, 0.08);
    }

    html:not([data-theme]) .premium-card::before,
    html:not([data-theme]) .profile-card::before {
        background: linear-gradient(90deg, transparent, rgba(139, 156, 197, 0.25), transparent);
    }

    html:not([data-theme]) .upload-drop-zone {
        background: rgba(26, 29, 39, 0.50);
    }

    html:not([data-theme]) .btn-action {
        color: #8b95a5;
    }

    html:not([data-theme]) .btn-action:hover {
        background: rgba(255, 255, 255, 0.08);
        border-color: rgba(255, 255, 255, 0.12);
    }

    html:not([data-theme]) .btn-extend:hover {
        background: rgba(37, 99, 235, 0.15);
        border-color: rgba(37, 99, 235, 0.35);
    }

    html:not([data-theme]) .btn-delete:hover {
        background: rgba(220, 38, 38, 0.15);
        border-color: rgba(220, 38, 38, 0.35);
    }

    html:not([data-theme]) .form-select {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3E%3C/svg%3E");
    }

    html:not([data-theme]) .upload-result-json {
        background: var(--bg-elevated);
        border-color: rgba(255, 255, 255, 0.06);
    }

    html:not([data-theme]) .site-footer {
        background: var(--bg-surface);
    }

    html:not([data-theme]) .login-branding-panel {
        background: linear-gradient(135deg, #1a2030 0%, #222838 50%, #2a3040 100%);
    }

    html:not([data-theme]) .expiry-date.warning {
        color: #f59e0b;
    }

    html:not([data-theme]) .api-input {
        background: var(--bg-elevated);
    }

    html:not([data-theme]) .setting-icon {
        background: rgba(255, 255, 255, 0.06);
    }

    html:not([data-theme]) .bg-light {
        background: rgba(255, 255, 255, 0.04) !important;
    }
}
