/* ============================================
   CuberWeb Panel — Design System v2
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700;800&family=Geist+Mono:wght@400;500&display=swap');

:root {
    /* Core palette */
    --bg:              #f0f2f7;
    --surface:         #ffffff;
    --surface-2:       #f7f8fc;
    --surface-3:       #edf0f7;
    --border:          #e2e6ef;
    --border-strong:   #cdd3e0;

    /* Sidebar */
    --sb-bg:           #0e1018;
    --sb-bg-2:         #151820;
    --sb-border:       rgba(255,255,255,0.07);
    --sb-text:         #f4f6fa;
    --sb-muted:        #8892a4;
    --sb-hover:        rgba(255,255,255,0.06);
    --sb-active:       rgba(99,152,255,0.18);
    --sb-active-text:  #6398ff;

    /* Text */
    --text:            #111827;
    --text-2:          #374151;
    --text-3:          #6b7280;
    --text-4:          #9ca3af;

    /* Accent */
    --blue:            #3b6ff0;
    --blue-h:          #2d5fd8;
    --blue-soft:       #eff3ff;
    --blue-mid:        #c7d7fd;

    /* Status */
    --green:           #0e9f5e;
    --green-soft:      #ecfdf5;
    --green-mid:       #a7f3d0;
    --yellow:          #c27c0e;
    --yellow-soft:     #fffbeb;
    --yellow-mid:      #fde68a;
    --red:             #dc2626;
    --red-soft:        #fef2f2;
    --red-mid:         #fecaca;
    --purple:          #7c3aed;
    --purple-soft:     #f5f3ff;
    --purple-mid:      #ddd6fe;
    --teal:            #0d9488;
    --teal-soft:       #f0fdfa;

    /* Sizes */
    --r:               14px;
    --r-sm:            10px;
    --r-lg:            20px;
    --shadow:          0 1px 3px rgba(0,0,0,0.07), 0 4px 16px rgba(0,0,0,0.05);
    --shadow-lg:       0 8px 32px rgba(0,0,0,0.10), 0 2px 8px rgba(0,0,0,0.06);
    --shadow-xl:       0 20px 60px rgba(0,0,0,0.13);
    --t:               160ms cubic-bezier(.4,0,.2,1);

    /* Typography */
    --font:            'Geist', 'Plus Jakarta Sans', system-ui, sans-serif;
    --mono:            'Geist Mono', 'Fira Code', monospace;

    /* Layout */
    --sidebar-w:       248px;
}

/* ============================================ Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; -webkit-font-smoothing: antialiased; }
body {
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    min-height: 100vh;
    line-height: 1.5;
}
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-h); }
img { display: block; max-width: 100%; }

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

/* ============================================ Sidebar */
.sidebar {
    width: var(--sidebar-w);
    background: var(--sb-bg);
    color: var(--sb-text);
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 50;
    border-right: 1px solid var(--sb-border);
}

.sidebar-header {
    padding: 22px 18px 16px;
    border-bottom: 1px solid var(--sb-border);
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 11px;
}
.logo-img {
    width: 38px;
    height: 38px;
    object-fit: cover;
}
.logo-text {
    font-family: var(--font);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--sb-text);
    letter-spacing: -0.01em;
}

.sidebar-nav {
    flex: 1;
    padding: 14px 12px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    overflow-y: auto;
}

.nav-section-label {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--sb-muted);
    padding: 14px 10px 6px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 11px;
    border-radius: 9px;
    color: var(--sb-muted);
    font-size: 0.88rem;
    font-weight: 500;
    transition: background var(--t), color var(--t);
    cursor: pointer;
}
.nav-item:hover { background: var(--sb-hover); color: var(--sb-text); }
.nav-item.active { background: var(--sb-active); color: var(--sb-active-text); }
.nav-item.active .nav-icon { color: var(--sb-active-text); }
.nav-icon { width: 17px; height: 17px; flex-shrink: 0; }

.sidebar-footer {
    padding: 14px 14px 18px;
    border-top: 1px solid var(--sb-border);
    display: flex;
    align-items: center;
    gap: 10px;
}
.user-avatar {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--blue), #6c63ff);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.82rem; font-weight: 700;
    color: white; flex-shrink: 0;
}
.user-details { flex: 1; min-width: 0; }
.user-name { display: block; font-size: 0.84rem; font-weight: 600; color: var(--sb-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-email { display: block; font-size: 0.75rem; color: var(--sb-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.logout-btn {
    width: 32px; height: 32px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: var(--sb-muted);
    transition: background var(--t), color var(--t);
    flex-shrink: 0;
}
.logout-btn svg { width: 16px; height: 16px; }
.logout-btn:hover { background: rgba(220,38,38,0.15); color: #f87171; }

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

.top-navbar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0 28px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 40;
    width: 100%;
}

.page-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.01em;
}

.navbar-actions { display: flex; align-items: center; gap: 12px; }
.nav-user-name { font-size: 0.84rem; font-weight: 500; color: var(--text-3); }

.content {
    padding: 24px 28px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 18px;
    box-sizing: border-box;
}

/* ============================================ Cards */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 22px 24px;
    box-shadow: var(--shadow);
    width: 100%;
    box-sizing: border-box;
}

.card h3 {
    font-size: 0.94rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 14px;
    letter-spacing: -0.01em;
}

.section-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.section-header-row h3 { margin-bottom: 0; }

/* ============================================ Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 16px;
    border-radius: 9px;
    font-family: var(--font);
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all var(--t);
    white-space: nowrap;
    text-decoration: none;
    letter-spacing: -0.01em;
}
.btn svg { width: 15px; height: 15px; flex-shrink: 0; }

.btn-primary { background: var(--blue); color: white; box-shadow: 0 2px 8px rgba(59,111,240,0.28); }
.btn-primary:hover { background: var(--blue-h); color: white; transform: translateY(-1px); box-shadow: 0 4px 14px rgba(59,111,240,0.36); }

.btn-secondary { background: var(--surface); color: var(--text-2); border: 1px solid var(--border-strong); }
.btn-secondary:hover { background: var(--surface-2); border-color: var(--blue-mid); color: var(--text); }

.btn-danger { background: var(--red-soft); color: var(--red); border: 1px solid var(--red-mid); }
.btn-danger:hover { background: var(--red); color: white; border-color: var(--red); }

.btn-ghost { background: transparent; color: var(--text-3); }
.btn-ghost:hover { background: var(--surface-3); color: var(--text); }

.btn-full { width: 100%; justify-content: center; padding: 11px 20px; }
.btn-sm { padding: 6px 12px; font-size: 0.8rem; }
.btn-lg { padding: 11px 22px; font-size: 0.93rem; }

.btn-icon {
    width: 32px; height: 32px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--text-3);
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: all var(--t);
    flex-shrink: 0;
}
.btn-icon svg { width: 15px; height: 15px; }
.btn-icon:hover { background: var(--surface-3); color: var(--text); }
.btn-icon.btn-edit:hover { background: var(--blue-soft); color: var(--blue); }
.btn-icon.btn-danger { color: var(--text-4); }
.btn-icon.btn-danger:hover { background: var(--red-soft); color: var(--red); }
.btn-icon.btn-dl:hover { background: var(--teal-soft); color: var(--teal); }

/* ============================================ Forms */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 0.84rem; font-weight: 500; color: var(--text-2); }
.form-hint { font-size: 0.79rem; color: var(--text-3); line-height: 1.5; }

.form-input {
    font-family: var(--font);
    font-size: 0.88rem;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: 9px;
    padding: 9px 13px;
    outline: none;
    transition: border-color var(--t), box-shadow var(--t);
    width: 100%;
}
.form-input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(59,111,240,0.12); }
.form-input::placeholder { color: var(--text-4); }

select.form-input { appearance: none; background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e"); background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; padding-right: 36px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 18px; border-top: 1px solid var(--border); margin-top: 4px; }

/* ============================================ Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}
.status-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.status-active { background: var(--green-soft); color: var(--green); border: 1px solid var(--green-mid); }
.status-active::before { background: var(--green); animation: pulse-green 2s infinite; }
.status-pending { background: var(--yellow-soft); color: var(--yellow); border: 1px solid var(--yellow-mid); }
.status-pending::before { background: var(--yellow); animation: pulse-yellow 1.5s infinite; }
.status-error { background: var(--red-soft); color: var(--red); border: 1px solid var(--red-mid); }
.status-error::before { background: var(--red); }
.status-dns_verified { background: var(--blue-soft); color: var(--blue); border: 1px solid var(--blue-mid); }
.status-dns_verified::before { background: var(--blue); }
.status-ssl_provisioned { background: var(--purple-soft); color: var(--purple); border: 1px solid var(--purple-mid); }
.status-ssl_provisioned::before { background: var(--purple); }

@keyframes pulse-green {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}
@keyframes pulse-yellow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* ============================================ Flash Messages */
.flash-messages { padding: 0 28px; margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.flash-message {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--r-sm);
    font-size: 0.86rem;
    font-weight: 500;
}
.flash-error { background: var(--red-soft); color: var(--red); border: 1px solid var(--red-mid); }
.flash-success { background: var(--green-soft); color: var(--green); border: 1px solid var(--green-mid); }
.flash-icon { width: 16px; height: 16px; flex-shrink: 0; }

/* ============================================ Inline Alerts */
.inline-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 18px;
    border-radius: var(--r-sm);
    font-size: 0.86rem;
    font-weight: 500;
}
.inline-alert-error { background: var(--red-soft); color: var(--red); border: 1px solid var(--red-mid); }
.inline-alert-info { background: var(--blue-soft); color: var(--blue); border: 1px solid var(--blue-mid); }
.inline-alert-warning { background: var(--yellow-soft); color: var(--yellow); border: 1px solid var(--yellow-mid); }

/* ============================================ Tables */
.file-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.86rem;
}
.file-table th {
    text-align: left;
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0 12px 10px;
    border-bottom: 1px solid var(--border);
}
.file-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    color: var(--text-2);
    vertical-align: middle;
}
.file-table tr:last-child td { border-bottom: none; }
.file-table tbody tr { transition: background var(--t); }
.file-table tbody tr:hover { background: var(--surface-2); }

.file-name-cell {
    display: flex;
    align-items: center;
    gap: 9px;
    font-weight: 500;
    color: var(--text);
}
.file-link { display: flex; align-items: center; gap: 9px; color: var(--text); font-weight: 500; }
.file-link:hover { color: var(--blue); }
.file-link svg { flex-shrink: 0; }
.item-count { font-size: 0.78rem; color: var(--text-4); font-weight: 400; }
.col-check { width: 38px; }
.text-right { text-align: right; }
.actions-cell { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.muted { color: var(--text-3); font-size: 0.84rem; }
.small { font-size: 0.8rem; }

/* ============================================ Auth Pages */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(ellipse at top, rgba(59,111,240,0.1) 0%, transparent 60%),
        radial-gradient(ellipse at bottom right, rgba(108,99,255,0.07) 0%, transparent 50%),
        var(--bg);
    padding: 24px;
}

.auth-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 36px 38px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-xl);
}

.auth-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
}
.auth-logo { display: inline-flex; align-items: center; gap: 10px; }
.auth-brand { font-size: 1.2rem; font-weight: 700; color: var(--text); letter-spacing: -0.02em; }

.auth-page-header { margin-bottom: 24px; }
.auth-page-header h2 { font-size: 1.4rem; font-weight: 700; letter-spacing: -0.03em; margin-bottom: 4px; }
.auth-page-header p { color: var(--text-3); font-size: 0.9rem; }

.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-footer { margin-top: 20px; text-align: center; font-size: 0.86rem; color: var(--text-3); }

/* ============================================ Dashboard */
.hero-panel {
    background: linear-gradient(135deg, #0e1220 0%, #1a2040 50%, #141b35 100%);
    border-radius: var(--r-lg);
    padding: 30px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(59,111,240,0.25);
    width: 100%;
    box-sizing: border-box;
}
.hero-panel::before {
    content: '';
    position: absolute;
    top: -60px; right: -60px;
    width: 240px; height: 240px;
    background: radial-gradient(circle, rgba(59,111,240,0.2) 0%, transparent 70%);
    pointer-events: none;
}
.eyebrow {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #6398ff;
    margin-bottom: 8px;
    background: rgba(99,152,255,0.12);
    border: 1px solid rgba(99,152,255,0.25);
    padding: 3px 10px;
    border-radius: 20px;
}
.hero-panel h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    letter-spacing: -0.03em;
    line-height: 1.25;
    margin-bottom: 8px;
}
.hero-panel p { color: rgba(255,255,255,0.55); font-size: 0.88rem; max-width: 420px; }

.website-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; width: 100%; }
.website-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: transform var(--t), box-shadow var(--t);
}
.website-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.website-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.website-card-top h3 { font-size: 0.95rem; font-weight: 600; letter-spacing: -0.01em; }
.website-domain { font-size: 0.82rem; color: var(--text-3); margin-top: 2px; font-family: var(--mono); }
.card-actions { display: flex; gap: 8px; margin-top: 4px; }

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 56px 24px;
    text-align: center;
}
.empty-state-icon {
    width: 56px; height: 56px;
    border-radius: 16px;
    background: var(--blue-soft);
    display: flex; align-items: center; justify-content: center;
    color: var(--blue);
    font-weight: 800;
    font-size: 1.1rem;
}
.empty-state h3 { font-size: 1.05rem; font-weight: 600; }
.empty-state p { color: var(--text-3); font-size: 0.88rem; max-width: 320px; }

/* ============================================ Tab Bar */
.tab-bar-wrapper {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 6px;
    display: flex;
    gap: 3px;
    box-shadow: var(--shadow);
}

.tab-item {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 14px;
    border-radius: 9px;
    font-size: 0.84rem;
    font-weight: 500;
    color: var(--text-3);
    transition: all var(--t);
    cursor: pointer;
    white-space: nowrap;
}
.tab-item svg { width: 15px; height: 15px; }
.tab-item:hover { color: var(--text); background: var(--surface-2); }
.tab-item.active { background: var(--blue); color: white; font-weight: 600; box-shadow: 0 2px 8px rgba(59,111,240,0.3); }
.tab-item.danger-tab:hover { color: var(--red); background: var(--red-soft); }
.tab-item.danger-tab.active { background: var(--red); box-shadow: 0 2px 8px rgba(220,38,38,0.3); }

/* ============================================ Website Header Card */
.page-header-grid { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.page-header-top { display: flex; align-items: center; gap: 10px; margin-bottom: 5px; }
.page-header-top h2 { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.02em; }

/* ============================================ File Manager — VS Code Style */
.fm-layout {
    display: flex;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
    box-shadow: var(--shadow);
    min-height: 520px;
    overflow: hidden;
}

.fm-tree {
    width: 220px;
    flex-shrink: 0;
    border-right: 1px solid var(--border);
    background: var(--surface-2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.fm-tree-header {
    padding: 11px 14px 10px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-3);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.fm-tree-actions { display: flex; gap: 3px; }
.fm-tree-actions .btn-icon { width: 26px; height: 26px; }
.fm-tree-actions .btn-icon svg { width: 13px; height: 13px; }

.fm-tree-body {
    flex: 1;
    overflow-y: auto;
    padding: 6px 0;
}

.fm-tree-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    font-size: 0.83rem;
    color: var(--text-2);
    cursor: pointer;
    transition: background var(--t);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.fm-tree-item:hover { background: var(--surface-3); }
.fm-tree-item.active { background: var(--blue-soft); color: var(--blue); font-weight: 500; }
.fm-tree-item svg { width: 14px; height: 14px; flex-shrink: 0; }
.fm-tree-item span { overflow: hidden; text-overflow: ellipsis; }

.fm-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.fm-toolbar {
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: var(--surface);
    flex-shrink: 0;
}

.fm-breadcrumb {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.82rem;
    font-family: var(--mono);
    color: var(--text-3);
    min-width: 0;
    overflow: hidden;
}
.fm-breadcrumb a { color: var(--text-2); font-weight: 500; white-space: nowrap; }
.fm-breadcrumb a:hover { color: var(--blue); }
.fm-breadcrumb .sep { color: var(--text-4); }
.fm-breadcrumb .cur { color: var(--text); font-weight: 600; white-space: nowrap; }

.fm-toolbar-right { display: flex; gap: 6px; flex-shrink: 0; }

.fm-table-wrap { flex: 1; overflow-y: auto; }

/* ============================================ File Type Icons */
.fi { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 5px; flex-shrink: 0; font-size: 0.58rem; font-weight: 700; letter-spacing: 0; font-family: var(--mono); }
.fi-html { background: #fde8d4; color: #c2460d; }
.fi-css  { background: #d4e6fd; color: #1a5fb4; }
.fi-js   { background: #fef9c3; color: #a16207; }
.fi-ts   { background: #dbeafe; color: #1d4ed8; }
.fi-json { background: #f0fdf4; color: #166534; }
.fi-md   { background: #f3e8ff; color: #6b21a8; }
.fi-img  { background: #fdf4ff; color: #86198f; }
.fi-zip  { background: #fff7ed; color: #c2410c; }
.fi-pdf  { background: #fef2f2; color: #dc2626; }
.fi-dir  { background: #fef3c7; color: #b45309; }
.fi-file { background: var(--surface-3); color: var(--text-3); }

/* ============================================ Drop Zone */
.drop-zone-section { padding: 18px; border-top: 1px solid var(--border); background: var(--surface-2); }

.drop-zone {
    border: 2px dashed var(--border-strong);
    border-radius: var(--r-sm);
    padding: 28px 20px;
    text-align: center;
    transition: all var(--t);
    cursor: pointer;
    background: var(--surface);
}
.drop-zone.dragover {
    border-color: var(--blue);
    background: var(--blue-soft);
    transform: scale(1.01);
}
.drop-zone-icon { color: var(--blue); margin: 0 auto 10px; }
.drop-zone p { font-size: 0.88rem; font-weight: 600; color: var(--text-2); margin-bottom: 4px; }
.drop-zone .sub { font-size: 0.8rem; color: var(--text-3); font-weight: 400; }
.drop-zone label { color: var(--blue); cursor: pointer; font-weight: 600; }
.drop-zone label:hover { text-decoration: underline; }

.staging-area { margin-top: 14px; }
.staging-area h4 { font-size: 0.83rem; font-weight: 600; color: var(--text-2); margin-bottom: 10px; }
.staging-list { display: flex; flex-direction: column; gap: 5px; max-height: 180px; overflow-y: auto; }
.staging-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
.staging-item .fi { flex-shrink: 0; }
.staging-name { flex: 1; font-family: var(--mono); font-size: 0.8rem; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.staging-size { font-size: 0.75rem; color: var(--text-3); white-space: nowrap; }
.staging-remove { width: 22px; height: 22px; border-radius: 6px; border: none; background: none; color: var(--text-4); cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.staging-remove:hover { background: var(--red-soft); color: var(--red); }
.staging-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }

.upload-progress { margin-top: 12px; }
.progress-bar { height: 6px; background: var(--surface-3); border-radius: 4px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--blue), #6c63ff); width: 0%; transition: width 200ms ease; }
.progress-text { display: block; margin-top: 6px; font-size: 0.8rem; color: var(--text-3); }

/* ============================================ Bulk Action Bar */
.bulk-action-bar {
    display: none;
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--sb-bg);
    padding: 12px 20px;
    border-radius: 12px;
    box-shadow: var(--shadow-xl);
    gap: 14px;
    align-items: center;
    z-index: 200;
    border: 1px solid var(--sb-border);
    color: var(--sb-text);
    font-size: 0.86rem;
    font-weight: 500;
}
.bulk-action-bar.active { display: flex; animation: slideUp 180ms ease; }
@keyframes slideUp {
    from { opacity: 0; transform: translateX(-50%) translateY(16px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ============================================ File Editor */
.editor-layout {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.editor-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 18px;
    border-bottom: 1px solid var(--border);
    background: var(--surface-2);
    gap: 16px;
    flex-wrap: wrap;
}

.editor-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.editor-breadcrumb {
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: var(--mono);
    font-size: 0.8rem;
    color: var(--text-3);
}
.editor-breadcrumb a { color: var(--text-2); }
.editor-breadcrumb a:hover { color: var(--blue); }
.editor-breadcrumb .sep { color: var(--text-4); }

.filename-pill {
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    overflow: hidden;
    transition: border-color var(--t), box-shadow var(--t);
}
.filename-pill:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(59,111,240,0.12); }
.filename-label {
    padding: 6px 10px;
    font-size: 0.77rem;
    font-weight: 600;
    color: var(--text-3);
    background: var(--surface-2);
    border-right: 1px solid var(--border);
    white-space: nowrap;
}
.filename-input {
    font-family: var(--mono);
    font-size: 0.83rem;
    color: var(--text);
    background: transparent;
    border: none;
    outline: none;
    padding: 6px 12px;
    min-width: 200px;
    max-width: 340px;
}

.lang-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 6px;
    font-size: 0.74rem;
    font-weight: 600;
    font-family: var(--mono);
    background: var(--surface-3);
    color: var(--text-3);
    border: 1px solid var(--border);
}

.editor-actions { display: flex; align-items: center; gap: 8px; }

.unsaved-chip {
    display: none;
    align-items: center;
    gap: 5px;
    font-size: 0.77rem;
    font-weight: 600;
    color: var(--yellow);
    background: var(--yellow-soft);
    border: 1px solid var(--yellow-mid);
    padding: 3px 10px;
    border-radius: 20px;
}
.unsaved-chip.active { display: flex; }
.unsaved-chip::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--yellow); }

.editor-wrapper { position: relative; height: calc(100vh - 260px); min-height: 400px; }
#monaco-editor { height: 100%; }

.editor-statusbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 16px;
    background: var(--sb-bg);
    border-top: 1px solid var(--sb-border);
    font-size: 0.76rem;
    color: var(--sb-muted);
    font-family: var(--mono);
    gap: 16px;
}
.statusbar-info { display: flex; align-items: center; gap: 16px; }
.statusbar-actions { display: flex; gap: 8px; }

/* ============================================ Configuration Page */
.config-grid { display: flex; flex-direction: column; gap: 16px; width: 100%; }
.config-section-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}
.config-section-icon { width: 28px; height: 28px; border-radius: 8px; background: var(--blue-soft); display: flex; align-items: center; justify-content: center; color: var(--blue); flex-shrink: 0; }
.config-section-icon svg { width: 14px; height: 14px; }
.config-desc { font-size: 0.82rem; color: var(--text-3); margin-bottom: 16px; line-height: 1.5; }

.toggle-row { display: flex; align-items: flex-start; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.toggle-row:last-of-type { border-bottom: none; }
.toggle { position: relative; width: 44px; height: 24px; flex-shrink: 0; margin-top: 1px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute; inset: 0;
    background: #d1d5db;
    border-radius: 24px;
    cursor: pointer;
    transition: all var(--t);
}
.toggle-slider::before {
    content: '';
    position: absolute;
    left: 3px; top: 3px;
    width: 18px; height: 18px;
    background: white;
    border-radius: 50%;
    transition: transform var(--t);
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}
.toggle input:checked + .toggle-slider { background: var(--blue); }
.toggle input:checked + .toggle-slider::before { transform: translateX(20px); }
.toggle-body { flex: 1; }
.toggle-label { font-size: 0.88rem; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.toggle-desc { font-size: 0.8rem; color: var(--text-3); line-height: 1.5; }
.toggle-warning { font-size: 0.79rem; color: var(--yellow); margin-top: 3px; }

.dynamic-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.dynamic-row { display: flex; gap: 8px; align-items: center; }
.dynamic-row .form-input { flex: 1; }
.dynamic-row .form-input:first-child { max-width: 180px; }
.dynamic-row select.form-input { max-width: 130px; }

/* ============================================ Modals */
.modal-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 500;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(3px);
}
.modal-overlay.active { display: flex; animation: fadeIn 150ms ease; }
.modal {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 28px;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-xl);
    animation: scaleIn 150ms ease;
}
.modal h3 { font-size: 1rem; font-weight: 700; margin-bottom: 18px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: scale(1); } }

/* ============================================ Toast */
.toast-container { position: fixed; bottom: 24px; right: 24px; display: flex; flex-direction: column; gap: 8px; z-index: 1000; pointer-events: none; }
.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 11px;
    font-size: 0.86rem;
    font-weight: 600;
    pointer-events: auto;
    opacity: 0;
    transform: translateY(16px) scale(0.95);
    transition: all 250ms cubic-bezier(.4,0,.2,1);
    box-shadow: var(--shadow-lg);
    max-width: 320px;
}
.toast.show { opacity: 1; transform: translateY(0) scale(1); }
.toast-success { background: #0e1a14; color: #4ade80; border: 1px solid rgba(74,222,128,0.2); }
.toast-error { background: #1a0e0e; color: #f87171; border: 1px solid rgba(248,113,113,0.2); }
.toast-info { background: #0e1220; color: #60a5fa; border: 1px solid rgba(96,165,250,0.2); }
.toast svg { width: 16px; height: 16px; flex-shrink: 0; }

/* ============================================ Spinner */
.spinner { width: 36px; height: 36px; border: 3px solid var(--border); border-top-color: var(--blue); border-radius: 50%; animation: spin 0.7s linear infinite; margin: 0 auto; }
.spinner-small { width: 16px; height: 16px; border: 2px solid rgba(59,111,240,0.25); border-top-color: var(--blue); border-radius: 50%; animation: spin 0.7s linear infinite; flex-shrink: 0; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================ Account Page */
.account-form { display: flex; flex-direction: column; gap: 14px; }

.billing-placeholder {
    background: var(--surface-2);
    border: 1px dashed var(--border-strong);
    border-radius: var(--r-sm);
    padding: 28px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.billing-icon { color: var(--text-4); }
.billing-placeholder h4 { font-size: 0.95rem; font-weight: 600; }
.billing-placeholder p { font-size: 0.84rem; color: var(--text-3); max-width: 280px; }

.billing-meta { display: flex; gap: 28px; flex-wrap: wrap; }
.billing-item { display: flex; flex-direction: column; gap: 3px; }
.billing-item .label { font-size: 0.77rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-3); font-weight: 600; }
.billing-item .value { font-size: 0.9rem; font-weight: 600; }

.danger-zone-card { border-color: var(--red-mid); }
.danger-zone-card .card-inner { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.danger-zone-card h3 { color: var(--red); }

/* ============================================ New Website Form */
.new-website-form { display: flex; flex-direction: column; gap: 20px; }
.info-box { background: var(--blue-soft); border: 1px solid var(--blue-mid); border-radius: var(--r-sm); padding: 14px 16px; display: flex; gap: 10px; }
.info-box svg { width: 16px; height: 16px; color: var(--blue); flex-shrink: 0; margin-top: 1px; }
.info-box p { font-size: 0.84rem; color: var(--blue-h); line-height: 1.6; }
.info-box strong { font-weight: 700; font-family: var(--mono); }

/* ============================================ Danger Zone */
.danger-stat-row { display: flex; gap: 24px; margin: 14px 0; flex-wrap: wrap; }
.stat-block { display: flex; flex-direction: column; gap: 3px; }
.stat-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-3); font-weight: 600; }
.stat-value { font-size: 0.95rem; font-weight: 700; font-family: var(--mono); }

/* ============================================ Scrollbars */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #b0bccf; }

/* ============================================ Sticky Save Bar */
.sticky-save-bar {
	position: sticky;
    bottom: 0;
    z-index: 30;
    /* background: rgba(255, 255, 255, 0.95); */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    /* border-top: 1px solid var(--border); */
    padding: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    /* box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.07); */
    width: 100%;
    border-radius: 20px;
}
.sticky-save-bar.at-bottom {
    position: relative;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
    border-top: 1px solid var(--border);
    padding: 18px 0 0;
}
.sticky-save-bar-info {
    font-size: 0.83rem;
    color: var(--text-3);
}
.sticky-save-bar-info strong {
    color: var(--text-2);
    font-weight: 600;
}

/* ============================================ Sticky Save Bar */
.hidden { display: none !important; }
.inline-form { display: inline; }
code { font-family: var(--mono); font-size: 0.85em; background: var(--surface-3); padding: 2px 6px; border-radius: 4px; color: var(--text-2); }

