/**
 * KalWi HQ - Command Center Stylesheet
 * Mobile First Responsive Design
 */

/* ========================================
   CSS Variables
   ======================================== */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-tertiary: #1a1a25;
    --bg-card: #16161f;
    --bg-hover: #1e1e2a;
    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --accent-glow: rgba(99, 102, 241, 0.3);
    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.1);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.1);
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.1);
    --info: #3b82f6;
    --info-bg: rgba(59, 130, 246, 0.1);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border-color: #2a2a3a;
    --border-light: #3a3a4a;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.15);
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 350ms ease;
    --sidebar-width: 260px;
    --header-height: 56px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
}

/* ========================================
   RESET & BASE - Mobile First
   ======================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 14px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    min-height: 100dvh;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
}

h1 { font-size: 1.375rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.125rem; }
h4 { font-size: 1rem; }

p { color: var(--text-secondary); }

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
    -webkit-tap-highlight-color: transparent;
}

/* ========================================
   LAYOUT - Mobile First (Sidebar Hidden)
   ======================================== */
.app-container {
    display: flex;
    min-height: 100vh;
    min-height: 100dvh;
}

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    height: 100dvh;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform var(--transition-normal);
}

.sidebar.active {
    transform: translateX(0);
    box-shadow: 4px 0 25px rgba(0, 0, 0, 0.5);
}

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    -webkit-tap-highlight-color: transparent;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.sidebar-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.logo i {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    font-size: 0.625rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-top: 0.25rem;
}

.sidebar-nav {
    flex: 1;
    padding: 0.75rem 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.sidebar-nav ul { list-style: none; }

.sidebar-nav li { margin: 0.25rem 0.5rem; }

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    font-weight: 500;
    font-size: 0.9375rem;
}

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

.sidebar-nav li.active a {
    background: var(--accent-gradient);
    color: white;
    box-shadow: var(--shadow-glow);
}

.sidebar-nav a i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

.sidebar-footer {
    padding: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.user-info-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    flex: 1;
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: var(--bg-tertiary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
    border: 2px solid var(--border-color);
    flex-shrink: 0;
}

.user-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.user-name {
    font-weight: 600;
    font-size: 0.8125rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 0.6875rem;
    color: var(--text-muted);
}

.user-actions-footer {
    display: flex;
    gap: 0.5rem;
}

.footer-action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem;
    background: var(--bg-tertiary);
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    transition: all var(--transition-fast);
    min-height: 44px;
}

.footer-action-btn:hover,
.footer-action-btn:active {
    background: var(--accent-primary);
    color: white;
}

.footer-action-btn.logout {
    background: var(--danger-bg);
    color: var(--danger);
}

.footer-action-btn.logout:hover,
.footer-action-btn.logout:active {
    background: var(--danger);
    color: white;
}

/* Main Content - Full width on mobile */
.main-content {
    flex: 1;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.content-header {
    position: sticky;
    top: 0;
    height: var(--header-height);
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 0.75rem;
    z-index: 100;
    gap: 0.5rem;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    flex: 1;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 1.125rem;
    cursor: pointer;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}

.sidebar-toggle:active {
    background: var(--bg-hover);
}

.page-title {
    font-size: 1rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.page-title i { display: none; }

.header-right { display: none; }

.header-time {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
}

.content-body {
    flex: 1;
    padding: 0.75rem;
}

/* ========================================
   CARDS - Mobile First
   ======================================== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.card-header {
    padding: 0.875rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.card-title {
    font-size: 0.9375rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-title i { color: var(--accent-primary); }

.card-body { padding: 0.875rem; }

.card-footer {
    padding: 0.75rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

/* ========================================
   STATS - Mobile First
   ======================================== */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.625rem;
    margin-bottom: 0.875rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.stat-icon.purple { background: rgba(99, 102, 241, 0.15); color: var(--accent-primary); }
.stat-icon.green { background: var(--success-bg); color: var(--success); }
.stat-icon.yellow { background: var(--warning-bg); color: var(--warning); }
.stat-icon.red { background: var(--danger-bg); color: var(--danger); }
.stat-icon.blue { background: var(--info-bg); color: var(--info); }

.stat-content { flex: 1; min-width: 0; }

.stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ========================================
   BUTTONS - Mobile First (Touch-friendly 44px)
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    font-family: inherit;
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
}

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

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:active:not(:disabled) { transform: scale(0.98); }

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:active:not(:disabled) { background: var(--bg-hover); }

.btn-success { background: var(--success); color: white; }
.btn-danger { background: var(--danger); color: white; }
.btn-warning { background: var(--warning); color: #1a1a25; }

.btn-sm {
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
    min-height: 36px;
}

.btn-lg { padding: 1rem 1.5rem; font-size: 1rem; }

.btn-icon {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: var(--radius-sm);
}

.btn-icon.sm { width: 36px; height: 36px; }

/* ========================================
   FORMS - Mobile First
   ======================================== */
.form-group { margin-bottom: 1rem; }

.form-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.375rem;
}

.form-label.required::after {
    content: '*';
    color: var(--danger);
    margin-left: 0.25rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-family: inherit;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    transition: all var(--transition-fast);
    min-height: 48px;
    -webkit-appearance: none;
}

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

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

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

select.form-control {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M8 10.5l-5-5h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.form-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

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

.form-check {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    cursor: pointer;
    min-height: 44px;
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
    width: 20px;
    height: 20px;
    accent-color: var(--accent-primary);
    cursor: pointer;
}

.form-check-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    cursor: pointer;
}

/* ========================================
   TABLES - Mobile First (Scrollable)
   ======================================== */
.table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: -0.875rem;
    padding: 0.875rem;
}

.table {
    width: 100%;
    min-width: 500px;
    border-collapse: collapse;
    font-size: 0.8125rem;
}

.table th,
.table td {
    padding: 0.625rem 0.5rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.6875rem;
    letter-spacing: 0.5px;
    background: var(--bg-secondary);
    white-space: nowrap;
}

.table td { color: var(--text-secondary); }

/* ========================================
   BADGES
   ======================================== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    font-size: 0.6875rem;
    font-weight: 500;
    border-radius: 9999px;
    white-space: nowrap;
}

.badge-primary { background: rgba(99, 102, 241, 0.15); color: var(--accent-primary); }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-info { background: var(--info-bg); color: var(--info); }

/* ========================================
   ALERTS
   ======================================== */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    margin-bottom: 0.875rem;
    font-size: 0.8125rem;
}

.alert i { margin-top: 0.125rem; flex-shrink: 0; }

.alert-success { background: var(--success-bg); color: var(--success); border: 1px solid rgba(16, 185, 129, 0.2); }
.alert-error { background: var(--danger-bg); color: var(--danger); border: 1px solid rgba(239, 68, 68, 0.2); }
.alert-warning { background: var(--warning-bg); color: var(--warning); border: 1px solid rgba(245, 158, 11, 0.2); }
.alert-info { background: var(--info-bg); color: var(--info); border: 1px solid rgba(59, 130, 246, 0.2); }

.alert-close {
    margin-left: auto;
    background: none;
    border: none;
    color: inherit;
    font-size: 1.25rem;
    cursor: pointer;
    opacity: 0.7;
    padding: 0;
    min-width: 24px;
    min-height: 24px;
}

/* ========================================
   MODAL - Mobile First (Full Screen)
   ======================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.modal-overlay.active { opacity: 1; visibility: visible; }

.modal {
    position: fixed;
    inset: 0;
    background: var(--bg-card);
    z-index: 2001;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    display: flex;
    flex-direction: column;
    transform: translateY(20px);
}

.modal.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

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

.modal-title { font-size: 1rem; font-weight: 600; white-space: pre-wrap; }

.modal-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 1.25rem;
    cursor: pointer;
}

.modal-body {
    flex: 1;
    padding: 0.875rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.modal-body .table-container {
    margin: -0.875rem;
    padding: 0.875rem;
}

.modal-footer {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.875rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
    flex-shrink: 0;
}

.modal-footer .btn { width: 100%; }

/* ========================================
   PROGRESS BAR
   ======================================== */
.progress {
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 9999px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: 9999px;
    transition: width var(--transition-slow);
}

.progress-bar.success { background: var(--success); }
.progress-bar.warning { background: var(--warning); }
.progress-bar.danger { background: var(--danger); }

/* ========================================
   EMPTY STATE
   ======================================== */
.empty-state {
    text-align: center;
    padding: 2rem 1rem;
}

.empty-state i {
    font-size: 2.5rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.empty-state h3 {
    color: var(--text-secondary);
    margin-bottom: 0.375rem;
    font-size: 1rem;
}

.empty-state p {
    color: var(--text-muted);
    font-size: 0.8125rem;
    max-width: 280px;
    margin: 0 auto 1rem;
}

/* ========================================
   QUICK LINKS - Mobile First (2 cols, vertical)
   ======================================== */
.quick-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.quick-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 0.625rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    text-align: center;
    -webkit-tap-highlight-color: transparent;
}

.quick-link:active {
    background: var(--bg-hover);
    border-color: var(--accent-primary);
}

.quick-link i {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-gradient);
    border-radius: var(--radius-sm);
    color: white;
    font-size: 0.9375rem;
}

.quick-link span {
    font-weight: 500;
    font-size: 0.75rem;
    color: var(--text-primary);
    line-height: 1.25;
}

/* ========================================
   TABS
   ======================================== */
.tabs {
    display: flex;
    gap: 0.25rem;
    background: var(--bg-tertiary);
    padding: 0.25rem;
    border-radius: var(--radius-md);
    margin-bottom: 0.875rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.tab {
    flex: 1;
    padding: 0.625rem 0.75rem;
    background: none;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.8125rem;
    cursor: pointer;
    white-space: nowrap;
    min-height: 40px;
}

.tab.active {
    background: var(--accent-gradient);
    color: white;
}

.tab-content { display: none; }
.tab-content.active { display: block; }

/* ========================================
   STREAMER CARD
   ======================================== */
.streamer-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.streamer-card-header {
    padding: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
}

.streamer-avatar {
    width: 36px;
    height: 36px;
    background: var(--bg-tertiary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
    font-size: 0.875rem;
    border: 2px solid var(--accent-primary);
    flex-shrink: 0;
}

.streamer-info { flex: 1; min-width: 0; }

.streamer-info h4 {
    font-size: 0.875rem;
    margin-bottom: 0.125rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.streamer-info span {
    font-size: 0.6875rem;
    color: var(--text-muted);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.streamer-card-body { padding: 0.75rem; }

.quota-display { margin-bottom: 0.625rem; }

.quota-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.375rem;
    font-size: 0.75rem;
}

.quota-label { color: var(--text-muted); }
.quota-value { color: var(--text-primary); font-weight: 600; }

.streamer-actions {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.25rem;
    margin-top: 0.625rem;
    padding-top: 0.625rem;
    border-top: 1px solid var(--border-color);
}

.streamer-actions .btn {
    padding: 0.5rem;
    min-height: 36px;
    font-size: 0.8125rem;
}

.streamer-actions .btn i { margin: 0; }
.streamer-actions .btn span { display: none; }

/* ========================================
   ACTIONS GROUP
   ======================================== */
.actions {
    display: flex;
    gap: 0.375rem;
}

/* ========================================
   VAULT CARD
   ======================================== */
.vault-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.625rem;
}

.vault-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.875rem;
}

.vault-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 0.625rem;
    gap: 0.5rem;
}

.vault-card-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    flex: 1;
}

.vault-card-title i {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-gradient);
    border-radius: var(--radius-sm);
    color: white;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.vault-card-title h4 {
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vault-card-title span {
    font-size: 0.625rem;
    color: var(--text-muted);
}

.vault-card-body { font-size: 0.75rem; }

.vault-field {
    display: flex;
    align-items: center;
    padding: 0.375rem 0;
    border-bottom: 1px solid var(--border-color);
    gap: 0.5rem;
}

.vault-field:last-child { border-bottom: none; }

.vault-field-label {
    width: 60px;
    color: var(--text-muted);
    font-size: 0.6875rem;
    flex-shrink: 0;
}

.vault-field-value {
    flex: 1;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6875rem;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vault-field-value.hidden { color: var(--text-muted); }

/* ========================================
   CONTENT GRID
   ======================================== */
.content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.625rem;
}

.content-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.content-box-thumbnail {
    height: 100px;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.75rem;
}

.content-box-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.content-box-body { padding: 0.75rem; }

.content-box-title {
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.375rem;
    color: var(--text-primary);
}

.content-box-footer {
    padding: 0.5rem 0.75rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ========================================
   PASSWORD FIELD
   ======================================== */
.password-field { position: relative; }

.password-field .form-control {
    padding-right: 3rem;
    font-family: 'JetBrains Mono', monospace;
}

.password-toggle {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.5rem;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========================================
   REPORT BOX
   ======================================== */
.report-box {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.75rem;
    margin-top: 0.625rem;
}

.report-box-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.report-date {
    font-weight: 500;
    font-size: 0.8125rem;
    color: var(--text-primary);
}

.report-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.375rem;
    margin-bottom: 0.375rem;
}

.report-stat { text-align: center; }

.report-stat-value {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
}

.report-stat-label {
    font-size: 0.625rem;
    color: var(--text-muted);
}

.status-indicators {
    display: flex;
    gap: 0.375rem;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--bg-tertiary);
}

.status-dot.published { background: var(--success); box-shadow: 0 0 6px rgba(16, 185, 129, 0.5); }
.status-dot.ready { background: var(--warning); box-shadow: 0 0 6px rgba(245, 158, 11, 0.5); }
.status-dot.scheduled { background: var(--accent-primary); box-shadow: 0 0 6px var(--accent-glow); }
.status-dot.draft { background: var(--text-muted); }

/* ========================================
   AUTH PAGE
   ======================================== */
.auth-container {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem;
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
}

.auth-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 30%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 70% 70%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 100%;
    padding: 1.25rem;
    position: relative;
    z-index: 1;
}

.auth-header {
    text-align: center;
    margin-bottom: 1.25rem;
}

.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1.375rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.auth-logo i {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-tagline {
    color: var(--text-muted);
    font-size: 0.6875rem;
}

.auth-title {
    font-size: 1rem;
    font-weight: 600;
    margin-top: 1rem;
}

.auth-form .btn {
    width: 100%;
    margin-top: 0.5rem;
}

/* ========================================
   UTILITIES
   ======================================== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }

.d-flex.justify-between {
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Scrollbar */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 2px; }

/* Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn var(--transition-normal) ease forwards;
}

/* ========================================
   TABLET (min-width: 576px)
   ======================================== */
@media (min-width: 576px) {
    html { font-size: 15px; }
    
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
    
    .quick-links { gap: 0.75rem; }
    .quick-link { padding: 1rem; }
    .quick-link i { width: 40px; height: 40px; font-size: 1rem; }
    .quick-link span { font-size: 0.8125rem; }
    
    .form-row { grid-template-columns: repeat(2, 1fr); }
    
    .vault-grid { grid-template-columns: repeat(2, 1fr); }
    .content-grid { grid-template-columns: repeat(2, 1fr); }
    
    .auth-card { max-width: 380px; padding: 1.75rem; }
    
    .modal-footer { flex-direction: row; justify-content: flex-end; }
    .modal-footer .btn { width: auto; }
    
    .streamer-avatar { width: 40px; height: 40px; }
    .streamer-info h4 { font-size: 0.9375rem; }
}

/* ========================================
   TABLET LANDSCAPE (min-width: 768px)
   ======================================== */
@media (min-width: 768px) {
    html { font-size: 16px; }
    :root { --header-height: 64px; }
    
    h1 { font-size: 1.5rem; }
    
    .content-body { padding: 1.25rem; }
    .content-header { padding: 0 1.25rem; }
    .page-title { font-size: 1.125rem; }
    .page-title i { display: inline; }
    .header-right { display: flex; }
    
    .card-header { flex-direction: row; align-items: center; padding: 1rem 1.25rem; }
    .card-body { padding: 1.25rem; }
    .card-title { font-size: 1rem; }
    
    .stats-grid { gap: 1rem; margin-bottom: 1.25rem; }
    .stat-card { padding: 1.125rem; }
    .stat-icon { width: 44px; height: 44px; }
    .stat-value { font-size: 1.375rem; }
    
    .quick-links { grid-template-columns: repeat(3, 1fr); gap: 1rem; }
    .quick-link { flex-direction: row; text-align: left; padding: 1rem 1.25rem; }
    .quick-link i { width: 44px; height: 44px; font-size: 1.125rem; }
    
    .modal {
        inset: auto;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) scale(0.95);
        border-radius: var(--radius-xl);
        width: 90%;
        max-width: 500px;
        max-height: 85vh;
    }
    .modal.active { transform: translate(-50%, -50%) scale(1); }
    .modal.lg { max-width: 650px; }
    
    .table { font-size: 0.875rem; }
    .table th, .table td { padding: 0.875rem 0.75rem; }
    
    .streamer-card-header { padding: 1rem; }
    .streamer-avatar { width: 44px; height: 44px; font-size: 1rem; }
    .streamer-info h4 { font-size: 1rem; }
    .streamer-card-body { padding: 1rem; }
    .streamer-actions { gap: 0.5rem; }
    
    .vault-card { padding: 1.125rem; }
    .vault-card-title i { width: 32px; height: 32px; }
    .vault-card-title h4 { font-size: 0.9375rem; }
    
    .content-box-thumbnail { height: 130px; }
    
    .empty-state { padding: 2.5rem 1.5rem; }
    .empty-state i { font-size: 3rem; }
    
    .auth-card { max-width: 400px; padding: 2rem; box-shadow: var(--shadow-lg), var(--shadow-glow); }
    .auth-logo { font-size: 1.5rem; }
}

/* ========================================
   DESKTOP (min-width: 1024px)
   ======================================== */
@media (min-width: 1024px) {
    :root { --header-height: 70px; }
    
    .sidebar { transform: translateX(0); }
    .sidebar-overlay { display: none !important; }
    .sidebar-header { padding: 1.5rem; }
    .logo { font-size: 1.5rem; gap: 0.75rem; }
    .tagline { font-size: 0.75rem; letter-spacing: 2px; }
    .sidebar-nav { padding: 1rem 0; }
    .sidebar-nav li { margin: 0.25rem 0.75rem; }
    .sidebar-footer { padding: 1rem; }
    .user-avatar { width: 40px; height: 40px; }
    
    .main-content { margin-left: var(--sidebar-width); }
    .sidebar-toggle { display: none; }
    .content-header { padding: 0 2rem; }
    .content-body { padding: 2rem; }
    .page-title { font-size: 1.375rem; }
    
    .stats-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; margin-bottom: 2rem; }
    .stat-card { padding: 1.5rem; }
    .stat-card:hover { transform: translateY(-2px); border-color: var(--accent-primary); box-shadow: var(--shadow-glow); }
    .stat-icon { width: 48px; height: 48px; font-size: 1.25rem; }
    .stat-value { font-size: 1.75rem; }
    .stat-label { font-size: 0.875rem; }
    
    .card { border-radius: var(--radius-lg); }
    .card:hover { border-color: var(--border-light); box-shadow: var(--shadow-lg); }
    .card-header { padding: 1.25rem 1.5rem; }
    .card-title { font-size: 1.125rem; gap: 0.75rem; }
    .card-body { padding: 1.5rem; }
    
    .quick-links { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
    .quick-link { padding: 1.25rem; }
    .quick-link:hover { transform: translateY(-2px); border-color: var(--accent-primary); box-shadow: var(--shadow-glow); }
    
    .table-container { margin: 0; padding: 0; }
    .table { min-width: auto; }
    .table tr:hover td { background: var(--bg-hover); }
    
    .btn-primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4); }
    .btn-secondary:hover:not(:disabled) { background: var(--bg-hover); border-color: var(--border-light); }
    .btn-success:hover:not(:disabled) { background: #0d9668; }
    .btn-danger:hover:not(:disabled) { background: #dc2626; }
    
    .modal { max-width: 500px; }
    .modal.lg { max-width: 700px; }
    .modal.xl { max-width: 900px; }
    
    .vault-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.25rem; }
    .vault-card:hover { border-color: var(--accent-primary); box-shadow: var(--shadow-glow); }
    
    .content-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
    .content-box:hover { transform: translateY(-4px); border-color: var(--accent-primary); box-shadow: var(--shadow-glow); }
    
    .streamer-card-header { padding: 1.25rem; }
    .streamer-avatar { width: 48px; height: 48px; font-size: 1.25rem; }
    .streamer-card-body { padding: 1.25rem; }
    .quota-header { font-size: 0.875rem; }
    
    ::-webkit-scrollbar { width: 8px; height: 8px; }
}

/* ========================================
   LARGE DESKTOP (min-width: 1280px)
   ======================================== */
@media (min-width: 1280px) {
    .stats-grid { grid-template-columns: repeat(4, 1fr); }
    .quick-links { grid-template-columns: repeat(4, 1fr); }
}
