:root {
    --bg-primary: #0f1117;
    --bg-secondary: #171b24;
    --bg-card: #202532;
    --bg-hover: #292f3f;
    --border: #2d3348;
    --accent: #f05d23;
    --accent-soft: rgba(240, 93, 35, 0.14);
    --text-primary: #e8eaf0;
    --text-secondary: #99a0b3;
    --text-muted: #697086;
    --success: #22c55e;
    --shadow: 0 16px 48px rgba(0, 0, 0, 0.34);
    --radius: 14px;
    --radius-sm: 10px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    height: 100%;
    font-family: "Inter", "Segoe UI", sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
}

body {
    display: flex;
    flex-direction: column;
}

.shell-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-card));
    border-bottom: 1px solid var(--border);
}

.shell-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.shell-logo {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #f0ece6;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex: none;
}

.shell-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.shell-brand-text h1 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
}

.shell-brand-text p {
    margin: 4px 0 0;
    font-size: 12px;
    color: var(--text-secondary);
}

.shell-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    font-size: 12px;
    color: var(--text-secondary);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
}

.shell-button {
    appearance: none;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg-card);
    color: var(--text-primary);
    padding: 9px 14px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.shell-button:hover {
    background: var(--bg-hover);
}

.shell-admin-btn {
    appearance: none;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--bg-card);
    color: var(--text-secondary);
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.shell-admin-btn:hover {
    background: var(--bg-hover);
    color: var(--accent);
    border-color: var(--accent);
}

.shell-admin-btn.active {
    background: var(--accent-soft);
    color: var(--accent);
    border-color: var(--accent);
}

.shell-nav {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 0 16px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-secondary);
    overflow-x: auto;
}

.shell-tab {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--text-secondary);
    padding: 14px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
}

.shell-tab:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.03);
}

.shell-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.shell-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.shell-module-frame {
    flex: 1;
    width: 100%;
    border: 0;
    background: var(--bg-primary);
}

.shell-loading {
    padding: 14px 24px;
    font-size: 12px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
}

.shell-loading.hidden {
    display: none;
}

@media (max-width: 760px) {
    .shell-header {
        padding: 14px 16px;
        flex-direction: column;
        align-items: flex-start;
    }

    .shell-actions {
        width: 100%;
    }
}
