/* GenesisBot — dark + green theme (matches reference UI) */
:root {
    --bg: #0a1118;
    --bg-elev: #0f1922;
    --bg-card: #132130;
    --border: #1f3142;
    --text: #e8eef2;
    --text-dim: #95a3ad;
    --accent: #6fe6a3;
    --accent-strong: #3acf81;
    --danger: #ff7a7a;
    --radius: 14px;
    --shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: radial-gradient(circle at 20% -10%, #16344a 0%, var(--bg) 55%) no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
    font-size: 15px;
    line-height: 1.5;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-strong); }

.topbar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;
    padding: 18px 32px;
    background: #f6f7f9;
    border-bottom: 1px solid #e6e8eb;
    box-shadow: 0 1px 0 rgba(15, 23, 32, 0.04);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #15233a;
    font-weight: 600;
    justify-self: start;
}

.brand-logo {
    height: 48px;
    width: auto;
    max-height: 48px;
    max-width: 220px;
    display: block;
    object-fit: contain;
}

.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-title { font-size: 20px; font-weight: 700; color: #0b1220; letter-spacing: -0.01em; }
.brand-tag { font-size: 12px; color: #5d6c7c; font-weight: 500; }
.brand-sub { font-size: 11px; color: #8a96a3; font-weight: 500; }

.topbar nav {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 10px;
    background: #ffffff;
    border: 1px solid #e6e8eb;
    border-radius: 999px;
    box-shadow: 0 1px 2px rgba(15, 23, 32, 0.04);
    justify-self: center;
}

.topbar nav .nav-link {
    display: inline-flex;
    align-items: center;
    padding: 10px 18px;
    border-radius: 999px;
    color: #45525f;
    font-size: 15px;
    font-weight: 500;
    transition: background 0.15s ease, color 0.15s ease;
}
.topbar nav .nav-link:hover { color: #0b1220; background: #f3f5f7; }
.topbar nav .nav-link.is-active {
    background: #0b1220;
    color: #ffffff;
}

.topbar .nav-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    justify-self: end;
}

.user-pill {
    color: #5d6c7c;
    font-size: 13px;
    padding: 6px 10px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid #e6e8eb;
}

.btn-cta {
    background: #0b1220;
    color: #ffffff;
    border-color: #0b1220;
    padding: 12px 22px;
    font-weight: 600;
    gap: 8px;
}
.btn-cta:hover { background: #1a2740; color: #ffffff; }
.btn-cta .arrow { display: inline-block; transition: transform 0.15s ease; }
.btn-cta:hover .arrow { transform: translateX(3px); }

@media (max-width: 900px) {
    .topbar { grid-template-columns: 1fr auto; }
    .topbar nav { grid-column: 1 / -1; order: 3; overflow-x: auto; max-width: 100%; }
}

.inline-form { display: inline; margin: 0; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-radius: 999px;
    font-weight: 500;
    font-size: 14px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.06s ease, background 0.15s ease, color 0.15s ease;
    font-family: inherit;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
    background: var(--accent);
    color: #0a1a12;
    border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-strong); color: #051208; }

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

.btn-block { width: 100%; }

.main {
    max-width: 980px;
    margin: 0 auto;
    padding: 48px 24px 80px;
}

.messages { list-style: none; padding: 0; margin: 0 0 16px; }
.message {
    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(111, 230, 163, 0.08);
    border: 1px solid rgba(111, 230, 163, 0.2);
    margin-bottom: 8px;
}

/* Auth pages */
.auth-shell {
    display: flex;
    justify-content: center;
    padding: 32px 0;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 36px 32px 28px;
}

.auth-title {
    margin: 0 0 6px;
    font-size: 26px;
    letter-spacing: -0.2px;
}

.auth-sub {
    margin: 0 0 26px;
    color: var(--text-dim);
}

.field {
    display: block;
    margin-bottom: 16px;
}

.field-label {
    display: block;
    font-size: 13px;
    color: var(--text-dim);
    margin-bottom: 6px;
}

.input,
input[type="email"],
input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 11px 14px;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input:focus,
input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(111, 230, 163, 0.15);
}

.field-error {
    display: block;
    margin-top: 6px;
    color: var(--danger);
    font-size: 12px;
}

.field-help {
    display: block;
    margin-top: 6px;
    color: var(--text-dim);
    font-size: 12px;
    line-height: 1.45;
}

.form-error {
    background: rgba(255, 122, 122, 0.08);
    border: 1px solid rgba(255, 122, 122, 0.3);
    color: var(--danger);
    padding: 10px 12px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 13px;
}

.auth-foot {
    margin-top: 18px;
    text-align: center;
    color: var(--text-dim);
    font-size: 13px;
}

/* Authenticated home */
.hero {
    text-align: center;
    padding: 64px 16px 24px;
}
.eyebrow {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(111, 230, 163, 0.1);
    color: var(--accent);
    font-size: 12px;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    margin-bottom: 14px;
}
.hero h1 {
    margin: 0 0 8px;
    font-size: 32px;
    letter-spacing: -0.4px;
}
.hero-sub {
    color: var(--text-dim);
    margin: 0 auto;
    max-width: 480px;
}

.hero-actions {
    margin-top: 22px;
}

/* Topbar nav link */
.nav-link {
    color: #2c3a52;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
}
.nav-link:hover { color: var(--accent-strong); background: rgba(58, 207, 129, 0.08); }

/* Topbar buttons override (sit on white) */
.topbar .btn-ghost {
    color: #2c3a52;
    border-color: #d8dde2;
    background: transparent;
}
.topbar .btn-ghost:hover {
    border-color: var(--accent-strong);
    color: var(--accent-strong);
}

/* Page head */
.page-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.page-head > div:first-child { min-width: 0; }

.page-title {
    margin: 0 0 6px;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.4px;
}

.page-sub {
    margin: 0;
    color: var(--text-dim);
    font-size: 14px;
}

.page-head .btn { flex-shrink: 0; }

.back-link {
    display: inline-block;
    margin-bottom: 8px;
    color: var(--text-dim);
    font-size: 13px;
}
.back-link:hover { color: var(--accent); }

/* Bot list */
.bot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.bot-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, var(--bg-card) 0%, rgba(15, 25, 34, 0.6) 100%);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 22px 22px 18px;
    color: var(--text);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.02) inset, 0 8px 24px rgba(0, 0, 0, 0.25);
    transition: border-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    min-height: 200px;
}
.bot-card:hover {
    border-color: var(--accent);
    color: var(--text);
    transform: translateY(-2px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 14px 32px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(111, 230, 163, 0.15);
}

.bot-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 10px;
}
.bot-card-head h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.2px;
    line-height: 1.3;
}

.status-pill {
    font-size: 10px;
    padding: 4px 10px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-weight: 600;
    border: 1px solid var(--border);
    flex-shrink: 0;
}
.status-on {
    color: var(--accent);
    background: rgba(111, 230, 163, 0.1);
    border-color: rgba(111, 230, 163, 0.3);
}
.status-off {
    color: var(--text-dim);
    background: rgba(149, 163, 173, 0.06);
}

.bot-desc {
    margin: 4px 0 16px;
    color: var(--text-dim);
    font-size: 13px;
    line-height: 1.55;
    flex: 1;
}

.bot-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: var(--text-dim);
    font-size: 12px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}
.bot-meta .dot { opacity: 0.4; }

.empty {
    text-align: center;
    padding: 64px 16px;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.01);
}
.empty h2 { margin: 0 0 6px; font-size: 20px; }
.empty p { margin: 0 0 18px; color: var(--text-dim); }

/* Bot form */
.bot-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 24px 18px;
}

.section-title {
    margin: 0 0 16px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-dim);
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
@media (max-width: 640px) {
    .grid-2 { grid-template-columns: 1fr; }
}

textarea.input,
textarea {
    width: 100%;
    padding: 11px 14px;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    min-height: 64px;
}
textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(111, 230, 163, 0.15);
}

select.input,
select {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, var(--text-dim) 50%),
                      linear-gradient(135deg, var(--text-dim) 50%, transparent 50%);
    background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}

input[type="number"].input,
input[type="number"] {
    -moz-appearance: textfield;
}

.checkbox-row {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
}
.checkbox {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
}
.muted { color: var(--text-dim); font-size: 13px; }

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 4px;
}

.btn-danger {
    background: rgba(255, 122, 122, 0.12);
    color: var(--danger);
    border: 1px solid rgba(255, 122, 122, 0.4);
}
.btn-danger:hover {
    background: rgba(255, 122, 122, 0.2);
    color: #ffb0b0;
}

.danger-zone {
    margin-top: 32px;
    padding: 18px 22px;
    border: 1px solid rgba(255, 122, 122, 0.25);
    border-radius: var(--radius);
    background: rgba(255, 122, 122, 0.04);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}
.danger-zone h3 {
    margin: 0 0 4px;
    font-size: 15px;
    color: #ffc7c7;
}
.danger-zone p { margin: 0; }

/* Bot tabs */
.bot-tabs {
    display: inline-flex;
    gap: 4px;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 4px;
}
.tab {
    padding: 7px 14px;
    border-radius: 999px;
    color: var(--text-dim);
    font-size: 13px;
    transition: background 0.15s ease, color 0.15s ease;
}
.tab:hover { color: var(--text); background: rgba(255, 255, 255, 0.03); }
.tab-active {
    background: var(--accent);
    color: #051208;
}
.tab-active:hover { background: var(--accent); color: #051208; }

/* Upload card */
.upload-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 22px;
    margin-bottom: 24px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: center;
}
.upload-card h3 { margin: 0 0 4px; font-size: 15px; }
.upload-row {
    display: inline-flex;
    gap: 10px;
    align-items: center;
}
.upload-row input[type="file"] {
    color: var(--text-dim);
    font-size: 13px;
}

/* Data table */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.data-table th, .data-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}
.data-table th {
    background: var(--bg-elev);
    color: var(--text-dim);
    font-weight: 500;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table a { color: var(--text); }
.data-table a:hover { color: var(--accent); }

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

.status-fail {
    color: var(--danger);
    background: rgba(255, 122, 122, 0.1);
    border-color: rgba(255, 122, 122, 0.3);
}

.row-error {
    margin-top: 4px;
    color: var(--danger);
    font-size: 12px;
}

/* Chat */
.chat-shell {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    height: 65vh;
    min-height: 460px;
    overflow: hidden;
}

.chat-log {
    flex: 1;
    overflow-y: auto;
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.chat-log.static { height: auto; min-height: auto; padding: 0; background: transparent; border: none; }

.bubble {
    max-width: 75%;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.55;
    border: 1px solid var(--border);
}
.bubble-role {
    font-size: 11px;
    color: var(--text-dim);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.voice-tag {
    text-transform: none;
    letter-spacing: 0;
    color: var(--accent, #6fe6a3);
    margin-left: 6px;
}
.bubble-text { color: var(--text); white-space: pre-wrap; word-wrap: break-word; }
.bubble-meta {
    margin-top: 6px;
    font-size: 11px;
    color: var(--text-dim);
}

.bubble-user {
    align-self: flex-end;
    background: rgba(111, 230, 163, 0.1);
    border-color: rgba(111, 230, 163, 0.3);
}
.bubble-bot {
    align-self: flex-start;
    background: var(--bg-elev);
}
.bubble-error .bubble-text { color: var(--danger); }

.chat-log.static .bubble { max-width: 100%; }

.chat-input {
    display: flex;
    gap: 10px;
    padding: 14px;
    border-top: 1px solid var(--border);
    background: var(--bg-elev);
}
.chat-input textarea {
    flex: 1;
    min-height: 44px;
    max-height: 160px;
    resize: none;
}

/* API key reveal */
.key-reveal {
    background: rgba(111, 230, 163, 0.06);
    border: 1px solid rgba(111, 230, 163, 0.3);
    border-radius: var(--radius);
    padding: 18px 22px;
    margin-bottom: 24px;
}
.key-reveal h3 { margin: 0 0 4px; font-size: 15px; color: var(--accent); }
.key-reveal p { margin: 0 0 12px; }

.key-code {
    display: block;
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 13px;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
    word-break: break-all;
    user-select: all;
    flex: 1;
    margin: 0;
}

.key-row {
    display: flex;
    align-items: stretch;
    gap: 8px;
}

.key-copy-btn {
    flex-shrink: 0;
    min-width: 86px;
    padding: 0 16px;
}

.code-block {
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px 16px;
    color: var(--text);
    font-size: 13px;
    overflow-x: auto;
    white-space: pre;
    margin: 0 0 12px;
}

.info-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

/* Billing */
.info-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: rgba(255, 200, 100, 0.08);
    border: 1px solid rgba(255, 200, 100, 0.25);
    color: #f0d9b1;
    padding: 14px 18px;
    border-radius: var(--radius);
    margin-bottom: 24px;
}
.info-card code { font-size: 13px; }

.usage-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}
.usage-row:last-child { border-bottom: none; }

.plan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.plan-card {
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 22px 18px;
    display: flex;
    flex-direction: column;
}
.plan-card .muted { flex-shrink: 0; }
.plan-card form { margin-top: auto; }

.plan-current {
    border-color: var(--accent);
    background: rgba(111, 230, 163, 0.04);
}

.plan-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}
.plan-head h3 { margin: 0; font-size: 18px; }
.plan-price {
    color: var(--accent);
    font-weight: 600;
    font-size: 14px;
}

.plan-features {
    list-style: none;
    padding: 0;
    margin: 14px 0;
    flex-grow: 1;
}
.plan-features li {
    padding: 5px 0;
    font-size: 13px;
    color: var(--text-dim);
    border-bottom: 1px dashed var(--border);
}
.plan-features li:last-child { border-bottom: none; }

/* =====================================================================
   Cloud-style Chatbots dashboard (light, scoped under .cloud-app)
   Full-bleed: breaks out of the centered .main container.
   ===================================================================== */
.cloud-app {
    --cl-bg: #e8eaef;
    --cl-surface: #ffffff;
    --cl-text: #1d2330;
    --cl-muted: #8990a3;
    --cl-border: #eceef3;
    --cl-border-strong: #e0e3ea;
    --cl-accent: #2f6bff;
    --cl-accent-soft: #eef3ff;
    --cl-on: #16a34a;
    --cl-off: #94a3b8;

    width: 100vw;
    margin-left: calc(50% - 50vw);
    min-height: calc(100vh - 96px);
    box-sizing: border-box;
    padding: 28px clamp(16px, 4vw, 48px);
    background: var(--cl-bg);
    color: var(--cl-text);
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr) 320px;
    gap: 20px;
    align-items: start;
    font-size: 14px;
    line-height: 1.5;
    border-radius: 18px 18px 0 0;
}
.cloud-app *, .cloud-app *::before, .cloud-app *::after { box-sizing: border-box; }
.cloud-app a { color: inherit; text-decoration: none; }

/* ---------- Sidebar ---------- */
.cl-sidebar {
    background: var(--cl-surface);
    border-radius: 16px;
    padding: 14px;
    position: sticky;
    top: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.cl-nav { display: flex; flex-direction: column; gap: 2px; }
.cl-nav-secondary { border-top: 1px solid var(--cl-border); padding-top: 12px; }
.cl-nav-item {
    display: flex; align-items: center; gap: 10px;
    width: 100%; text-align: left;
    padding: 10px 12px; border-radius: 10px;
    background: none; border: 0; cursor: pointer;
    font: inherit; color: var(--cl-text);
}
.cl-nav-item:hover { background: #f4f6fa; }
.cl-nav-item.is-active { background: var(--cl-accent-soft); color: var(--cl-accent); font-weight: 600; }
.cl-ic { width: 18px; text-align: center; opacity: .85; font-size: 13px; }

.cl-storage {
    margin-top: auto;
    border: 1px solid var(--cl-border-strong);
    border-radius: 12px;
    padding: 12px;
}
.cl-storage-head { display: flex; align-items: center; gap: 8px; font-weight: 600; margin-bottom: 10px; }
.cl-storage-bar { height: 6px; border-radius: 99px; background: #edeff4; overflow: hidden; }
.cl-storage-bar span { display: block; height: 100%; background: var(--cl-accent); border-radius: 99px; }
.cl-storage-text { margin: 8px 0 4px; color: var(--cl-muted); font-size: 12px; }
.cl-storage-link { color: var(--cl-accent); font-size: 12px; font-weight: 600; }

/* ---------- Main column ---------- */
.cl-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.cl-section-head h2 { margin: 0 0 12px; font-size: 16px; font-weight: 700; }

.cl-quick { background: var(--cl-surface); border-radius: 16px; padding: 18px; }
.cl-quick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.cl-quick-card {
    border: 1px solid var(--cl-border-strong);
    border-radius: 12px; padding: 14px;
    display: flex; flex-direction: column; gap: 6px;
    transition: border-color .15s, box-shadow .15s;
}
.cl-quick-card:hover { border-color: var(--cl-accent); box-shadow: 0 6px 18px rgba(47,107,255,.10); }
.cl-quick-icon {
    width: 40px; height: 40px; border-radius: 10px;
    display: grid; place-items: center; font-size: 18px;
    background: #f1f4fb;
}
.cl-quick-icon.is-on { background: #e7f7ee; }
.cl-quick-name { font-weight: 600; }
.cl-quick-meta { color: var(--cl-muted); font-size: 12px; }
.cl-quick-empty { align-items: flex-start; }

/* ---------- File-table panel ---------- */
.cl-panel { background: var(--cl-surface); border-radius: 16px; padding: 18px; }
.cl-panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cl-crumbs { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.cl-crumbs a { color: var(--cl-muted); }
.cl-crumbs a:hover { color: var(--cl-text); }
.cl-crumb-sep { color: var(--cl-muted); }
.cl-crumb-current { color: var(--cl-text); }
.cl-add {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--cl-accent); color: #fff;
    padding: 9px 16px; border-radius: 10px; font-weight: 600;
}
.cl-add:hover { background: #2257e0; }

.cl-table { width: 100%; border-collapse: collapse; }
.cl-table th {
    text-align: left; font-size: 12px; font-weight: 600; color: var(--cl-muted);
    padding: 10px 12px; border-bottom: 1px solid var(--cl-border);
}
.cl-table td { padding: 12px; border-bottom: 1px solid var(--cl-border); vertical-align: middle; }
.cl-row { cursor: pointer; transition: background .12s; }
.cl-row:hover { background: #f7f9fd; }
.cl-row.is-selected { background: var(--cl-accent-soft); box-shadow: inset 3px 0 0 var(--cl-accent); }
.cl-row:last-child td { border-bottom: 0; }
.cl-cell-name { font-weight: 600; }
.cl-row-icon {
    display: inline-grid; place-items: center;
    width: 28px; height: 28px; border-radius: 8px; margin-right: 10px;
    background: #f1f4fb; font-size: 14px; vertical-align: middle;
}
.cl-row-icon.is-on { background: #e7f7ee; }
.cl-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; color: #46506a; }
.cl-muted { color: var(--cl-muted); }
.cl-status { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 99px; }
.cl-status-on { background: #e7f7ee; color: var(--cl-on); }
.cl-status-off { background: #eef0f4; color: var(--cl-off); }
.cl-th-menu { width: 36px; text-align: center; }
.cl-menu-btn { color: var(--cl-muted); font-size: 18px; padding: 0 6px; border-radius: 6px; }
.cl-menu-btn:hover { background: #eef0f4; color: var(--cl-text); }
.cl-empty-filter { color: var(--cl-muted); text-align: center; padding: 28px 0; }

.cl-empty { text-align: center; padding: 48px 16px; }
.cl-empty-icon { font-size: 32px; }
.cl-empty h3 { margin: 12px 0 4px; }
.cl-empty p { color: var(--cl-muted); margin: 0 0 18px; }

/* ---------- Right detail panel ---------- */
.cl-detail {
    background: var(--cl-surface);
    border-radius: 16px;
    padding: 18px;
    position: sticky;
    top: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 480px;
}
.cl-detail-head { display: flex; align-items: flex-start; justify-content: space-between; }
.cl-detail-avatar {
    width: 56px; height: 56px; border-radius: 14px;
    display: grid; place-items: center; font-size: 24px; background: #eef3ff;
}
.cl-detail-close { background: none; border: 0; cursor: pointer; color: var(--cl-muted); font-size: 14px; padding: 4px; }
.cl-detail-close:hover { color: var(--cl-text); }
.cl-detail-name { margin: 0; font-size: 18px; font-weight: 700; }
.cl-detail-sub { margin: -8px 0 0; color: var(--cl-muted); font-size: 12.5px; }
.cl-detail-section { border-top: 1px solid var(--cl-border); padding-top: 14px; }
.cl-detail-section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; font-weight: 600; }
.cl-detail-link { color: var(--cl-accent); font-size: 12.5px; font-weight: 600; }
.cl-detail-line { margin: 0; }
.cl-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.cl-tag { background: var(--cl-accent-soft); color: var(--cl-accent); font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 7px; }
.cl-detail-grow { flex: 1; }
.cl-detail-tabs { display: flex; gap: 16px; margin-bottom: 12px; }
.cl-detail-tab { font-weight: 600; color: var(--cl-muted); padding-bottom: 8px; }
.cl-detail-tab.is-active { color: var(--cl-text); box-shadow: inset 0 -2px 0 var(--cl-accent); }
.cl-activity { list-style: none; margin: 0; padding: 0 0 0 16px; position: relative; }
.cl-activity::before { content: ""; position: absolute; left: 4px; top: 6px; bottom: 6px; width: 2px; background: var(--cl-border); }
.cl-activity li { position: relative; padding: 0 0 16px; }
.cl-activity li::before { content: ""; position: absolute; left: -16px; top: 5px; width: 8px; height: 8px; border-radius: 50%; background: var(--cl-accent); box-shadow: 0 0 0 3px #fff; }
.cl-activity-date { color: var(--cl-muted); font-size: 11.5px; }
.cl-activity p { margin: 2px 0 0; }
.cl-detail-open { margin-top: auto; color: var(--cl-accent); font-weight: 600; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
    .cloud-app { grid-template-columns: 200px minmax(0, 1fr); }
    .cl-detail { grid-column: 1 / -1; position: static; min-height: 0; }
}
@media (max-width: 720px) {
    .cloud-app { grid-template-columns: 1fr; }
    .cl-sidebar { position: static; flex-direction: row; flex-wrap: wrap; }
    .cl-storage { width: 100%; }
    .cl-table thead { display: none; }
    .cl-table, .cl-table tbody, .cl-table tr, .cl-table td { display: block; width: 100%; }
    .cl-table tr { border: 1px solid var(--cl-border); border-radius: 12px; margin-bottom: 10px; padding: 6px; }
    .cl-table td { border: 0; padding: 6px 10px; }
}
