/* ============================================
   VidRelay - Gemini Design System
   Light Theme with TailwindCSS-inspired Styles
   ============================================ */

/* ============================================
   CSS Variables - Design Tokens
   ============================================ */
:root {
    /* Primary Colors */
    --primary: #2563eb;
    --primary-light: #3b82f6;
    --primary-dark: #1d4ed8;
    --primary-50: #eff6ff;
    --primary-100: #dbeafe;
    --primary-200: #bfdbfe;

    /* Slate Colors (Background & Text) */
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;

    /* Status Colors */
    --emerald-50: #ecfdf5;
    --emerald-100: #d1fae5;
    --emerald-500: #10b981;
    --emerald-600: #059669;

    --amber-50: #fffbeb;
    --amber-100: #fef3c7;
    --amber-500: #f59e0b;
    --amber-600: #d97706;

    --rose-50: #fff1f2;
    --rose-100: #ffe4e6;
    --rose-500: #f43f5e;
    --rose-600: #e11d48;

    --sky-50: #f0f9ff;
    --sky-500: #0ea5e9;
    --sky-600: #0284c7;

    --violet-50: #f5f3ff;
    --violet-500: #8b5cf6;
    --violet-600: #7c3aed;

    /* Background */
    --bg-page: var(--slate-50);
    --bg-card: #ffffff;
    --bg-input: var(--slate-50);

    /* Text */
    --text-primary: var(--slate-900);
    --text-secondary: var(--slate-500);
    --text-muted: var(--slate-400);

    /* Border */
    --border-default: var(--slate-200);
    --border-light: var(--slate-100);

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
    --shadow-blue: 0 10px 15px -3px rgb(37 99 235 / 0.2);

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
    --radius-3xl: 40px;
    --radius-full: 9999px;

    /* Spacing */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 300ms ease;

    /* Layout */
    --sidebar-width: 256px;
    --header-height: 64px;
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-page);
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

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

input,
textarea,
select {
    font-family: inherit;
    font-size: inherit;
}

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

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}


/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--slate-100);
}

::-webkit-scrollbar-thumb {
    background: var(--slate-300);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--slate-400);
}

/* ============================================
   Animation Keyframes
   ============================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes bounce {

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

    50% {
        transform: translateY(5%);
    }
}

.animate-fadeIn {
    animation: fadeIn 0.3s ease;
}

.animate-spin {
    animation: spin 1s linear infinite;
}

.animate-bounce {
    animation: bounce 1s infinite;
}

/* ============================================
   Button Components
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    white-space: nowrap;
    user-select: none;
    border: 1px solid transparent;
}

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

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: var(--shadow-blue);
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-dark);
}

.btn-secondary {
    background: white;
    color: var(--slate-600);
    border-color: var(--border-default);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--slate-50);
}

.btn-dark {
    background: var(--slate-900);
    color: white;
    box-shadow: var(--shadow-lg);
}

.btn-dark:hover:not(:disabled) {
    background: var(--slate-800);
}

.btn-ghost {
    background: transparent;
    color: var(--slate-500);
}

.btn-ghost:hover:not(:disabled) {
    color: var(--primary);
    background: var(--primary-50);
}

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

.btn-lg {
    padding: 12px 24px;
    font-size: 14px;
}

.btn-block {
    width: 100%;
}

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

/* ============================================
   Form Components
   ============================================ */
.form-group {
    margin-bottom: var(--space-5);
}

.form-label {
    display: block;
    margin-bottom: var(--space-2);
    font-size: 11px;
    font-weight: 800;
    color: var(--slate-400);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-left: 4px;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    color: var(--text-primary);
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    transition: all var(--transition-fast);
    outline: none;
}

.form-input:hover,
.form-textarea:hover,
.form-select:hover {
    border-color: var(--primary-200);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 3px var(--primary-100);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--slate-400);
}

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

.form-input-icon .icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--slate-300);
    transition: color var(--transition-fast);
    pointer-events: none;
}

.form-input-icon:focus-within .icon {
    color: var(--primary);
}

.form-input-icon input {
    padding-left: 48px;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
    cursor: pointer;
}

.form-checkbox {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    cursor: pointer;
}

.form-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1px solid var(--slate-200);
    accent-color: var(--primary);
    cursor: pointer;
}

/* ============================================
   Card Component
   ============================================ */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: box-shadow var(--transition-base);
}

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

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4) var(--space-6);
    background: rgba(248, 250, 252, 0.5);
    border-bottom: 1px solid var(--border-light);
}

.card-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--slate-700);
}

.card-body {
    padding: var(--space-6);
}

/* ============================================
   Stat Card Component
   ============================================ */
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
}

.stat-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    margin-bottom: var(--space-4);
}

.stat-card-icon.blue {
    background: var(--primary-50);
    color: var(--primary);
}

.stat-card-icon.sky {
    background: var(--sky-50);
    color: var(--sky-600);
}

.stat-card-icon.violet {
    background: var(--violet-50);
    color: var(--violet-600);
}

.stat-card-icon.rose {
    background: var(--rose-50);
    color: var(--rose-500);
}

.stat-card-icon.emerald {
    background: var(--emerald-50);
    color: var(--emerald-600);
}

.stat-card-icon.amber {
    background: var(--amber-50);
    color: var(--amber-600);
}

.stat-card-value {
    font-size: 30px;
    font-weight: 700;
    color: var(--slate-900);
    line-height: 1.2;
}

.stat-card-label {
    font-size: 14px;
    color: var(--slate-500);
    margin-top: var(--space-1);
}

/* ============================================
   Status Badge Component
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: var(--radius-full);
    border: 1px solid transparent;
}

.badge-active {
    background: var(--emerald-50);
    color: var(--emerald-600);
    border-color: var(--emerald-100);
}

.badge-syncing {
    background: var(--amber-50);
    color: var(--amber-600);
    border-color: var(--amber-100);
}

.badge-error {
    background: var(--rose-50);
    color: var(--rose-500);
    border-color: var(--rose-100);
}

.badge-pending {
    background: var(--primary-50);
    color: var(--primary);
    border-color: var(--primary-100);
}

/* ============================================
   Status Pill (Quick Stats Bar)
   ============================================ */
.stat-pill {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: 8px 16px;
    background: white;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-sm);
}

.stat-pill-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.stat-pill-dot.blue {
    background: var(--primary);
}

.stat-pill-dot.emerald {
    background: var(--emerald-500);
}

.stat-pill-dot.amber {
    background: var(--amber-500);
}

.stat-pill-dot.rose {
    background: var(--rose-500);
}

.stat-pill-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--slate-600);
}

.stat-pill-value {
    font-size: 12px;
    font-weight: 900;
    color: var(--slate-900);
}

/* ============================================
   Dashboard Layout
   ============================================ */
.dashboard {
    display: flex;
    min-height: 100vh;
}

/* ============================================
   Sidebar Navigation
   ============================================ */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: white;
    border-right: 1px solid var(--border-default);
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-6);
    margin-bottom: var(--space-4);
}

.sidebar-logo {
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-blue);
    position: relative;
    overflow: hidden;
}

.sidebar-logo svg {
    color: white;
    width: 24px;
    height: 24px;
}

.sidebar-title {
    font-size: 20px;
    font-weight: 900;
    color: var(--slate-900);
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

.sidebar-nav {
    flex: 1;
    padding: 0 var(--space-4);
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    margin-bottom: 4px;
    font-size: 14px;
    font-weight: 500;
    color: var(--slate-500);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.nav-item:hover {
    background: var(--slate-50);
    color: var(--slate-900);
}

.nav-item.active {
    background: var(--primary-50);
    color: var(--primary);
}

.nav-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.nav-item.active svg {
    color: var(--primary);
}

.sidebar-footer {
    padding: var(--space-6);
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2);
    background: var(--slate-50);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
}

.sidebar-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: var(--shadow-sm);
    object-fit: cover;
}

.sidebar-user-email {
    font-size: 12px;
    font-weight: 600;
    color: var(--slate-900);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

/* ============================================
   Header
   ============================================ */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4) var(--space-8);
    background: white;
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-left {
    display: flex;
    flex-direction: column;
}

.header-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--slate-900);
}

.header-subtitle {
    font-size: 13px;
    color: var(--slate-500);
    margin-top: 2px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

/* ============================================
   Page Container
   ============================================ */
.page-container {
    flex: 1;
    padding: var(--space-8);
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.page {
    display: none;
}

.page.active {
    display: block;
    animation: fadeIn var(--transition-base);
}

/* ============================================
   Grid Layouts
   ============================================ */
.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-6);
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-6);
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-6);
}

.grid-1-2 {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: var(--space-8);
}

.grid-2-1 {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--space-8);
}

/* ============================================
   Quick Actions Grid
   ============================================ */
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
}

.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-4);
    background: white;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.quick-action-btn:hover {
    border-color: var(--primary-200);
}

.quick-action-btn .icon-wrapper {
    padding: var(--space-2);
    border-radius: var(--radius-sm);
}

.quick-action-btn .icon-wrapper.amber {
    background: var(--amber-50);
    color: var(--amber-600);
}

.quick-action-btn .icon-wrapper.blue {
    background: var(--primary-50);
    color: var(--primary);
}

.quick-action-btn .icon-wrapper.sky {
    background: var(--sky-50);
    color: var(--sky-600);
}

.quick-action-btn .icon-wrapper.violet {
    background: var(--violet-50);
    color: var(--violet-600);
}

.quick-action-btn span {
    font-size: 11px;
    font-weight: 600;
    color: var(--slate-600);
    text-align: center;
}

/* ============================================
   Upgrade Banner
   ============================================ */
.upgrade-banner {
    background: linear-gradient(135deg, var(--primary) 0%, var(--sky-500) 100%);
    padding: var(--space-6);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.upgrade-banner h3 {
    color: white;
    font-weight: 700;
    font-size: 18px;
    margin-bottom: var(--space-2);
}

.upgrade-banner .btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
}

.upgrade-banner .btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ============================================
   Account Table
   ============================================ */
.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.data-table thead tr {
    background: rgba(248, 250, 252, 0.5);
    border-bottom: 1px solid var(--border-light);
}

.data-table th {
    padding: var(--space-4) var(--space-6);
    font-size: 11px;
    font-weight: 700;
    color: var(--slate-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.data-table tbody tr {
    border-bottom: 1px solid var(--slate-50);
    transition: background var(--transition-fast);
}

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

.data-table tbody tr:hover {
    background: rgba(248, 250, 252, 0.8);
}

.data-table td {
    padding: var(--space-4) var(--space-6);
    font-size: 14px;
}

.table-account-info {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.table-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border-default);
    position: relative;
}

.table-avatar-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    color: white;
    font-weight: 700;
}

.table-avatar-badge.success {
    background: var(--emerald-500);
}

.table-avatar-badge.error {
    background: var(--rose-500);
}

.table-account-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--slate-800);
}

.table-account-handle {
    font-size: 11px;
    color: var(--slate-500);
}

.table-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--space-1);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.data-table tbody tr:hover .table-actions {
    opacity: 1;
}

.table-action-btn {
    padding: 6px;
    color: var(--slate-400);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.table-action-btn:hover {
    color: var(--primary);
    background: var(--primary-50);
}

/* ============================================
   Pagination
   ============================================ */
.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-6);
    background: rgba(248, 250, 252, 0.5);
    border-top: 1px solid var(--border-light);
}

.pagination-info {
    font-size: 12px;
    color: var(--slate-500);
}

.pagination-buttons {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.pagination-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-default);
    color: var(--slate-400);
    font-size: 12px;
    font-weight: 700;
    transition: all var(--transition-fast);
}

.pagination-btn:hover:not(:disabled) {
    background: white;
}

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

.pagination-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: var(--shadow-blue);
}

/* ============================================
   Upload Area
   ============================================ */
.upload-area {
    border: 2px dashed var(--border-default);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-base);
    background: var(--slate-50);
}

.upload-area:hover {
    border-color: var(--primary-200);
    background: rgba(37, 99, 235, 0.02);
}

.upload-area-icon {
    width: 56px;
    height: 56px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    color: var(--slate-400);
    margin-bottom: var(--space-4);
    transition: color var(--transition-fast);
}

.upload-area:hover .upload-area-icon {
    color: var(--primary);
}

.upload-area-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--slate-700);
}

.upload-area-hint {
    font-size: 12px;
    color: var(--slate-400);
    margin-top: var(--space-1);
}

/* ============================================
   Task List Item
   ============================================ */
.task-item {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-4);
    transition: background var(--transition-fast);
}

.task-item:hover {
    background: rgba(248, 250, 252, 0.5);
}

.task-thumbnail {
    width: 64px;
    height: 80px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--slate-100);
    position: relative;
}

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

.task-thumbnail-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-fast);
    color: white;
}

.task-item:hover .task-thumbnail-overlay {
    opacity: 1;
}

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

.task-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--slate-800);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.task-account {
    font-size: 11px;
    color: var(--slate-500);
    margin-top: 2px;
}

.task-time {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-top: var(--space-2);
    font-size: 10px;
    font-weight: 500;
    color: var(--slate-400);
}

.task-actions {
    text-align: right;
}

/* ============================================
   AI Lab Banner
   ============================================ */
.ai-lab-banner {
    background: linear-gradient(135deg, var(--primary) 0%, var(--sky-500) 100%);
    padding: var(--space-6);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.ai-lab-banner-tag {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    color: rgba(255, 255, 255, 0.8);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-2);
}

.ai-lab-banner h3 {
    color: white;
    font-weight: 700;
    font-size: 18px;
    margin-bottom: var(--space-2);
}

.ai-lab-banner p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    margin-bottom: var(--space-4);
}

/* ============================================
   Auth Page (Login/Register)
   ============================================ */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-6);
    background: var(--bg-page);
    background-image: radial-gradient(circle at top right, var(--primary-50) 0%, var(--slate-50) 50%);
}

.auth-card {
    width: 100%;
    max-width: 420px;
}

.auth-header {
    text-align: center;
    margin-bottom: var(--space-10);
}

.auth-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: var(--primary);
    border-radius: 28px;
    box-shadow: var(--shadow-2xl);
    margin-bottom: var(--space-6);
    position: relative;
    overflow: hidden;
}

.auth-logo svg {
    color: white;
    width: 40px;
    height: 40px;
}

.auth-title {
    font-size: 36px;
    font-weight: 900;
    color: var(--slate-900);
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

.auth-subtitle {
    font-size: 14px;
    color: var(--slate-500);
    margin-top: var(--space-2);
    font-weight: 500;
}

.auth-form-card {
    background: white;
    padding: var(--space-10);
    border-radius: var(--radius-3xl);
    box-shadow: var(--shadow-2xl);
    border: 1px solid white;
    position: relative;
    overflow: hidden;
}

.auth-form-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: var(--primary);
}

.auth-footer {
    text-align: center;
    margin-top: var(--space-6);
    font-size: 14px;
    color: var(--slate-500);
}

.auth-footer a {
    color: var(--primary);
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* ============================================
   Modal Component
   ============================================ */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: var(--space-6);
}

.modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 480px;
    background: white;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-2xl);
    animation: fadeIn var(--transition-base);
}

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

.modal-title {
    font-size: 18px;
    font-weight: 700;
}

.modal-close {
    color: var(--slate-400);
}

.modal-close:hover {
    color: var(--slate-600);
}

.modal-body {
    padding: var(--space-6);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-6);
    border-top: 1px solid var(--border-light);
}

/* ============================================
   Toast Notifications
   ============================================ */
.toast-container {
    position: fixed;
    top: var(--space-5);
    right: var(--space-5);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-5);
    min-width: 300px;
    max-width: 450px;
    background: white;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    pointer-events: auto;
    animation: fadeIn var(--transition-base);
}

.toast-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
    font-size: 14px;
    color: var(--text-primary);
}

.toast.success {
    border-left: 3px solid var(--emerald-500);
}

.toast.success .toast-icon {
    color: var(--emerald-500);
}

.toast.error {
    border-left: 3px solid var(--rose-500);
}

.toast.error .toast-icon {
    color: var(--rose-500);
}

.toast.info {
    border-left: 3px solid var(--primary);
}

.toast.info .toast-icon {
    color: var(--primary);
}

/* ============================================
   Empty State
   ============================================ */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-12);
    text-align: center;
}

.empty-state-icon {
    width: 64px;
    height: 64px;
    color: var(--slate-300);
    margin-bottom: var(--space-4);
}

.empty-state-text {
    font-size: 14px;
    color: var(--slate-500);
    margin-bottom: var(--space-6);
}

/* ============================================
   Loading Spinner
   ============================================ */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.spinner-dark {
    border-color: var(--slate-200);
    border-top-color: var(--primary);
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1200px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .sidebar {
        display: none;
    }

    .main-content {
        margin-left: 0;
    }

    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-2-1,
    .grid-1-2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {

    .grid-4,
    .grid-3,
    .grid-2 {
        grid-template-columns: 1fr;
    }

    .page-container {
        padding: var(--space-4);
    }

    .header {
        padding: var(--space-4);
    }
}

/* ============================================
   Landing Page Specific Styles (Light Theme)
   ============================================ */

/* Navbar - Clean Light Style */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 72px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--slate-100);
    z-index: 1000;
}

.navbar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    text-decoration: none;
    color: var(--slate-900);
}

.navbar-logo {
    width: 32px;
    height: 32px;
}

.navbar-title {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.025em;
    background: linear-gradient(135deg, var(--primary) 0%, var(--violet-600) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.navbar-links {
    display: flex;
    gap: var(--space-8);
}

.navbar-links a {
    font-size: 14px;
    font-weight: 500;
    color: var(--slate-600);
    text-decoration: none;
    transition: var(--transition-base);
}

.navbar-links a:hover {
    color: var(--primary);
}

.navbar-actions {
    display: flex;
    gap: var(--space-3);
}

/* Hero Section - Clean & Airy */
.hero {
    padding: 160px 0 100px;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, var(--primary-50) 0%, transparent 70%);
    opacity: 0.5;
    z-index: 0;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 48px;
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -0.025em;
    color: var(--slate-900);
    margin-bottom: var(--space-6);
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--violet-600) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 20px;
    line-height: 1.6;
    color: var(--slate-500);
    margin-bottom: var(--space-10);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
    margin-bottom: var(--space-12);
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: var(--space-12);
    padding-top: var(--space-8);
    border-top: 1px solid var(--slate-100);
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-size: 24px;
    font-weight: 700;
    color: var(--slate-900);
    margin-bottom: var(--space-1);
}

.stat-label {
    font-size: 14px;
    color: var(--slate-500);
}

/* Features Section - Minimal Cards */
.features {
    padding: 100px 0;
    background: #ffffff;
}

.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 60px;
}

.section-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--slate-900);
    letter-spacing: -0.025em;
    margin-bottom: var(--space-4);
}

.section-subtitle {
    font-size: 18px;
    color: var(--slate-500);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--space-8);
}

.feature-card {
    background: #ffffff;
    border: 1px solid var(--slate-100);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    transition: var(--transition-base);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-100);
}

.feature-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-lg);
    background: var(--primary-50);
    color: var(--primary);
    margin-bottom: var(--space-6);
}

.feature-card h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--slate-900);
    margin-bottom: var(--space-3);
}

.feature-card p {
    color: var(--slate-500);
    line-height: 1.6;
}


/* CTA Section */
.cta-section {
    padding: var(--space-16) 0;
    background: var(--primary-gradient);
    text-align: center;
    color: var(--text-inverse);
}

.cta-title {
    font-size: var(--text-3xl);
    font-weight: 700;
    margin-bottom: var(--space-4);
    color: var(--text-inverse);
}

.cta-subtitle {
    margin-bottom: var(--space-6);
    color: rgba(255, 255, 255, 0.9);
    font-size: var(--text-lg);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-button {
    background: white;
    color: var(--primary);
    border: none;
    padding: 12px 32px;
    font-weight: 600;
    border-radius: var(--radius-full);
}

.cta-button:hover {
    background: var(--slate-50);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Footer - Clean Dark */
.footer {
    background: var(--slate-900);
    padding: 80px 0 40px;
    color: var(--slate-50);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}


.footer-brand {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    align-items: flex-start;
}

.footer-logo {
    height: 48px;
    width: auto;
    display: block;
}


.footer-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--slate-50);
}

.footer-desc {
    color: var(--slate-400);
    line-height: 1.6;
    max-width: 300px;
}

.footer-links h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--slate-50);
    margin-bottom: 24px;
}

.footer-links a {
    display: block;
    color: var(--slate-400);
    text-decoration: none;
    margin-bottom: 12px;
    font-size: 14px;
    transition: opacity 0.2s;
}

.footer-links a:hover {
    color: var(--slate-50);
}

.footer-bottom {
    padding-top: 40px;
    border-top: 1px solid var(--slate-800);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--slate-500);
    font-size: 14px;
}

.footer-legal {
    display: flex;
    gap: 24px;
}

.footer-legal a {
    color: var(--slate-500);
    text-decoration: none;
}

.footer-legal a:hover {
    color: var(--slate-400);
}

/* Quick Start Steps */
.quick-start-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-8);
    position: relative;
    padding-top: var(--space-8);
}

.quick-start-step {
    text-align: center;
    position: relative;
    z-index: 1;
}

.step-number {
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    margin: 0 auto 24px;
    box-shadow: var(--shadow-blue);
}

.quick-start-step h4 {
    font-size: 18px;
    font-weight: 600;
    color: var(--slate-900);
    margin-bottom: 8px;
}

.quick-start-step p {
    color: var(--slate-500);
    font-size: 14px;
}

/* Authentication Pages (Light) */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--slate-50);
    padding: var(--space-4);
}

.auth-card {
    width: 100%;
    max-width: 420px;
}

.auth-header {
    text-align: center;
    margin-bottom: var(--space-8);
}

.auth-logo {
    width: 48px;
    height: 48px;
    margin: 0 auto var(--space-4);
    color: var(--primary);
}

.auth-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--slate-900);
    margin-bottom: var(--space-2);
}

.auth-subtitle {
    color: var(--slate-500);
    font-size: 14px;
}

.auth-form-card {
    background: white;
    padding: var(--space-8);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--slate-200);
}

.form-group {
    margin-bottom: var(--space-5);
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--slate-700);
    margin-bottom: var(--space-2);
}

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

.form-input-icon .icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--slate-400);
    pointer-events: none;
}

.form-input {
    width: 100%;
    padding: 10px 12px 10px 40px;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-lg);
    font-size: 14px;
    color: var(--slate-900);
    background: var(--slate-50);
    transition: var(--transition-base);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-100);
    background: white;
}

.form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-6);
}

.agree-text {
    font-size: 13px;
    color: var(--slate-500);
}

.agree-text a,
.forgot-password {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.auth-footer {
    text-align: center;
    margin-top: var(--space-6);
    font-size: 14px;
    color: var(--slate-500);
}

.auth-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

/* Mobile Menu Components */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: var(--slate-900);
}

.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(4px);
}

.mobile-menu.active {
    opacity: 1;
    pointer-events: auto;
}

.mobile-menu-container {
    position: absolute;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 320px;
    height: 100%;
    background: white;
    padding: 24px;
    transition: right 0.3s ease;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.mobile-menu.active .mobile-menu-container {
    right: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.mobile-menu-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--slate-900);
}

.mobile-menu-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--slate-500);
}

.mobile-menu-links {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 32px;
}

.mobile-menu-links a {
    font-size: 18px;
    font-weight: 500;
    color: var(--slate-700);
    text-decoration: none;
}

.mobile-menu-actions {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Auth Enhancements */
.auth-back-link {
    position: absolute;
    top: 24px;
    left: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--slate-600);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
    z-index: 10;
}

.auth-back-link:hover {
    color: var(--primary);
}

.form-input-icon {
    position: relative;
    /* Ensure existing styles are compatible */
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--slate-400);
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle:hover {
    color: var(--slate-600);
}

/* Trust Strip */
.trust-strip {
    padding: 40px 0;
    background: var(--slate-50);
    border-bottom: 1px solid var(--slate-100);
    text-align: center;
}

.trust-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--slate-500);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 24px;
    display: block;
}

.trust-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 48px;
    flex-wrap: wrap;
    opacity: 0.6;
}

.trust-logo {
    height: 32px;
    filter: grayscale(100%);
    transition: filter 0.3s, opacity 0.3s;
}

.trust-logo:hover {
    filter: grayscale(0%);
    opacity: 1;
}

/* Security Badges */
.security-badges {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-top: 48px;
    flex-wrap: wrap;
}

.security-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    background: white;
    padding: 12px 20px;
    border-radius: 9999px;
    border: 1px solid var(--slate-200);
    box-shadow: var(--shadow-sm);
}

.security-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--slate-700);
}

/* Pricing Enhancements */
.pricing-card.popular {
    border: 2px solid var(--primary);
    transform: scale(1.05);
    z-index: 10;
    position: relative;
    box-shadow: var(--shadow-xl);
}

.popular-badge {
    position: absolute;
    top: -16px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    padding: 4px 16px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.money-back-guarantee {
    text-align: center;
    margin-top: 48px;
    color: var(--slate-600);
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Visual Polish (Phase 3) */

/* Typography Tweaks */
h1,
h2,
h3,
h4,
h5,
h6 {
    letter-spacing: -0.02em;
    /* Modern, tight heading tracking */
}

/* Micro-interactions */
.btn {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

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

.feature-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.form-input:focus {
    transform: translateY(-1px);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
    /* var(--primary) with opacity */
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--primary);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Trust Logo Grayscale Animation */
.trust-logo {
    opacity: 0.5;
    filter: grayscale(100%);
    transition: all 0.4s ease;
}

.trust-logo:hover {
    opacity: 1;
    filter: grayscale(0%);
    transform: scale(1.05);
}

/* ============================================
   Responsive Design (Homepage)
   ============================================ */
@media (max-width: 768px) {

    .navbar-links,
    .navbar-actions {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }


    .hero-title {
        font-size: 32px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .quick-start-grid,
    .features-grid,
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer-links,
    .footer-brand {
        text-align: center;
        align-items: center;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    /* Ensure footer logo doesn't stretch */
    .footer-logo {
        margin: 0 auto;
    }

    .container {
        padding: 0 16px;
    }

    .auth-card {
        width: 100%;
        padding: 0;
    }

    .auth-form-card {
        padding: 24px;
    }
}

/* ============================================
   Phase 5: Dashboard Transformation
   ============================================ */

/* Mobile Dashboard Layout */
@media (max-width: 1024px) {
    .dashboard {
        flex-direction: column;
    }

    .sidebar {
        position: fixed;
        left: -280px;
        /* Hide by default */
        top: 0;
        bottom: 0;
        z-index: 1000;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: none;
        display: flex;
        flex-direction: column;
        background: white;
    }

    .sidebar.active {
        transform: translateX(280px);
        /* Slide in */
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.1);
    }

    /* Mobile Header */
    .header {
        padding: 0 16px;
        height: 64px;
        position: sticky;
        top: 0;
        z-index: 900;
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(8px);
    }

    .header-left {
        gap: 12px;
    }

    .header-title {
        font-size: 18px;
    }

    .header-subtitle {
        display: none;
        /* Hide subtitle on mobile to save space */
    }

    .main-content {
        width: 100%;
        margin-left: 0;
    }

    .page-container {
        padding: 16px;
    }

    /* Grid Adjustments */
    .grid-4,
    .grid-2-1 {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .stat-card {
        padding: 16px;
    }
}

/* Dashboard Sandwich Button (Mobile) */
.dashboard-menu-btn {
    display: none;
    background: none;
    border: none;
    padding: 8px;
    margin-left: -8px;
    color: var(--slate-700);
    cursor: pointer;
}

@media (max-width: 1024px) {
    .dashboard-menu-btn {
        display: block;
    }
}

/* Sidebar Overlay */
.dashboard-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 990;
    display: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.dashboard-overlay.active {
    display: block;
    opacity: 1;
}

/* Visual Polish: Professional Selects */
.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
    cursor: pointer;
}

/* Visual Polish: Skeleton Loaders */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.skeleton {
    background: linear-gradient(90deg, var(--slate-100) 25%, var(--slate-200) 50%, var(--slate-100) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
    color: transparent !important;
}

.skeleton-text {
    width: 100%;
    height: 1em;
    display: inline-block;
}

.skeleton-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.skeleton-row td {
    border: none;
    padding: 16px;
}

.skeleton-row .skeleton-bar {
    height: 20px;
    width: 100%;
    border-radius: 4px;
}

/* Visual Polish: Improved Empty State */
.empty-state-pro {
    text-align: center;
    padding: 64px 24px;
    background: var(--slate-50);
    border-radius: 12px;
    border: 1px dashed var(--slate-300);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.empty-state-pro-icon {
    width: 64px;
    height: 64px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    color: var(--slate-400);
    margin-bottom: 8px;
}

.empty-state-pro-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--slate-900);
}

.empty-state-pro-desc {
    font-size: 14px;
    color: var(--slate-500);
    max-width: 300px;
    line-height: 1.5;
}

/* ============================================
   Platform Selection Button
   ============================================ */
.platform-select-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px;
    background: var(--slate-50);
    border: 2px solid var(--border-default);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-base);
    color: var(--slate-500);
}

.platform-select-btn:hover {
    background: var(--slate-100);
    border-color: var(--slate-300);
}

.platform-select-btn.active {
    background: var(--primary-50);
    border-color: var(--primary);
    color: var(--primary);
}

.platform-select-btn span {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Platform Badge in Account Table */
.platform-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    margin-right: 8px;
}

.platform-badge.tiktok {
    background: #000000;
    color: white;
}

.platform-badge.youtube {
    background: #FF0000;
    color: white;
}

/* ============================================
   Toggle Switch Component
   ============================================ */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--slate-300);
    transition: 0.3s;
    border-radius: 22px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked+.toggle-slider {
    background-color: var(--primary);
}

.toggle-switch input:checked+.toggle-slider:before {
    transform: translateX(18px);
}

.toggle-switch input:focus+.toggle-slider {
    box-shadow: 0 0 1px var(--primary);
}

/* ============================================
   Dropdown Menu Component
   ============================================ */
.dropdown-menu {
    min-width: 160px;
    padding: var(--space-2) 0;
    background: white;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    width: 100%;
    padding: var(--space-2) var(--space-3);
    font-size: 13px;
    font-weight: 500;
    color: var(--slate-700);
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: background var(--transition-fast);
}

.dropdown-item:hover {
    background: var(--slate-50);
}

.dropdown-item svg {
    flex-shrink: 0;
}

/* ============================================
   Accounts Page Stats Grid (Mobile Responsive)
   ============================================ */
@media (max-width: 1024px) {
    .accounts-stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 640px) {
    .accounts-stats-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ============================================
   Analytics Deep Page
   ============================================ */
.analytics-shell {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

.analytics-filter-wrap {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.analytics-platform-row {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.analytics-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--slate-700);
}

.analytics-filter-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-5);
}

.analytics-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.analytics-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    color: var(--slate-700);
    border: 1px solid var(--border-default);
    background: white;
    border-radius: var(--radius-full);
    padding: 4px 10px;
    cursor: pointer;
}

.analytics-chip input {
    width: 14px;
    height: 14px;
}

.analytics-date-row {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-2);
}

.analytics-date-row .form-input {
    min-width: 150px;
}

.analytics-quick-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.analytics-quick-link {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    padding: 0;
}

.analytics-actions-row {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.analytics-range-text {
    font-size: 12px;
    color: var(--slate-500);
}

.analytics-summary-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: var(--space-4);
}

.analytics-summary-card {
    padding: var(--space-4);
}

.analytics-summary-label {
    font-size: 12px;
    color: var(--slate-500);
    margin-bottom: 6px;
}

.analytics-summary-value {
    font-size: 36px;
    line-height: 1.1;
    font-weight: 800;
    color: var(--slate-900);
}

.analytics-bars {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.analytics-bar-row {
    display: grid;
    grid-template-columns: 96px 1fr 64px;
    align-items: center;
    gap: var(--space-3);
}

.analytics-bar-label {
    font-size: 12px;
    color: var(--slate-600);
}

.analytics-bar-track {
    height: 10px;
    background: var(--slate-100);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.analytics-bar-fill {
    height: 100%;
    border-radius: var(--radius-full);
    background: linear-gradient(90deg, var(--primary-light), var(--primary));
}

.analytics-bar-value {
    text-align: right;
    font-size: 12px;
    color: var(--slate-700);
    font-weight: 600;
}

.analytics-legend {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-bottom: var(--space-3);
    font-size: 12px;
    color: var(--slate-600);
}

.analytics-legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 4px;
}

.analytics-legend-dot.blue {
    background: var(--primary);
}

.analytics-legend-dot.rose {
    background: var(--rose-500);
}

.analytics-trend-scroll {
    overflow-x: auto;
    display: flex;
    align-items: flex-end;
    gap: var(--space-2);
    padding-bottom: var(--space-2);
}

.analytics-trend-item {
    min-width: 26px;
}

.analytics-trend-bars {
    height: 90px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 2px;
}

.analytics-trend-bar {
    width: 9px;
    border-radius: 4px 4px 0 0;
}

.analytics-trend-bar.blue {
    background: rgba(37, 99, 235, 0.8);
}

.analytics-trend-bar.rose {
    background: rgba(244, 63, 94, 0.75);
}

.analytics-trend-label {
    text-align: center;
    font-size: 10px;
    color: var(--slate-500);
    transform: rotate(-30deg);
    transform-origin: left top;
    margin-top: 2px;
}

.analytics-hour-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 8px;
}

.analytics-hour-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    min-height: 112px;
}

.analytics-hour-bar {
    width: 12px;
    background: rgba(37, 99, 235, 0.7);
    border-radius: 5px 5px 0 0;
}

.analytics-hour-label {
    font-size: 10px;
    color: var(--slate-500);
}

.analytics-muted {
    color: var(--slate-500);
    font-size: 12px;
}

.analytics-empty {
    color: var(--slate-500);
    font-size: 13px;
    padding: var(--space-4) 0;
}

.analytics-loading {
    min-height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    color: var(--slate-600);
    font-weight: 600;
}

@media (max-width: 1400px) {
    .analytics-summary-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1024px) {
    .analytics-filter-grid,
    .analytics-summary-grid {
        grid-template-columns: 1fr;
    }

    .analytics-date-row {
        flex-wrap: wrap;
    }

    .analytics-hour-grid {
        grid-template-columns: repeat(8, minmax(0, 1fr));
    }
}

/* ============================================
   Comments Page
   ============================================ */
.comments-shell {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.comments-top-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--space-3);
}

.comments-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--space-4);
}

.comments-stat-card {
    border-radius: var(--radius-lg);
    color: white;
    padding: var(--space-4);
    box-shadow: var(--shadow-md);
}

.comments-stat-card .label {
    font-size: 13px;
    opacity: 0.95;
    margin-bottom: var(--space-2);
}

.comments-stat-card .value {
    font-size: 42px;
    line-height: 1;
    font-weight: 800;
}

.comments-stat-card.pink {
    background: linear-gradient(135deg, #e11d8a, #ec4899);
}

.comments-stat-card.green {
    background: linear-gradient(135deg, #16a34a, #22c55e);
}

.comments-stat-card.orange {
    background: linear-gradient(135deg, #ea580c, #f97316);
}

.comments-stat-card.purple {
    background: linear-gradient(135deg, #7c3aed, #a855f7);
}

.comments-actions {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.comments-header-meta {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    font-size: 13px;
    color: var(--slate-500);
}

.comments-page-size {
    width: auto;
    margin-left: var(--space-2);
    min-width: 92px;
}

.comments-search {
    max-width: 520px;
}

.comments-list-wrap {
    margin-top: var(--space-4);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.comments-item {
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: var(--space-4);
    background: white;
}

.comments-item.unread {
    background: #eef6ff;
    border-left: 4px solid var(--primary);
}

.comments-item.read {
    background: white;
    border-left: 4px solid transparent;
}

.comments-item-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-3);
    margin-bottom: var(--space-2);
}

.comments-author {
    font-size: 18px;
    font-weight: 700;
    color: var(--slate-900);
}

.comments-handle {
    color: var(--slate-500);
    font-size: 13px;
}

.comments-time {
    color: var(--slate-400);
    font-size: 13px;
    white-space: nowrap;
}

.comments-content {
    color: var(--slate-800);
    font-size: 16px;
    margin: var(--space-2) 0;
    white-space: pre-wrap;
    word-break: break-word;
}

.comments-video-row {
    margin-bottom: var(--space-3);
}

.comments-video-link {
    font-size: 15px;
    color: var(--primary);
    text-decoration: none;
}

.comments-video-link:hover {
    text-decoration: underline;
}

.comments-video-link.disabled {
    color: var(--slate-500);
    cursor: default;
    text-decoration: none;
}

.comments-actions-row {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.comments-unread-badge {
    font-size: 12px;
    color: var(--primary);
    background: var(--primary-50);
    border: 1px solid var(--primary-100);
    border-radius: var(--radius-sm);
    padding: 4px 8px;
}

.comments-inline-btn {
    padding: 6px 10px;
    font-size: 13px;
}

.comments-empty {
    min-height: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--slate-500);
}

.comments-empty-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--slate-700);
    margin-bottom: var(--space-2);
}

.comments-empty-desc {
    font-size: 14px;
}

.comments-reply-target {
    border: 1px solid var(--border-default);
    border-left: 3px solid var(--primary);
    background: var(--slate-50);
    border-radius: var(--radius-md);
    padding: var(--space-3);
    margin-bottom: var(--space-4);
}

@media (max-width: 1200px) {
    .comments-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .comments-author {
        font-size: 24px;
    }
}

@media (max-width: 768px) {
    .comments-stat-grid {
        grid-template-columns: 1fr;
    }

    .comments-actions {
        flex-wrap: wrap;
    }

    .comments-header-meta {
        flex-direction: column;
        align-items: flex-end;
        gap: var(--space-2);
    }

    .comments-item-head {
        flex-direction: column;
    }

    .comments-time {
        white-space: normal;
    }
}
