:root {
    color-scheme: light;
    --bg: #f4f7fb;
    --surface: #ffffff;
    --surface-alt: #eef3f8;
    --line: #d7e0ea;
    --text: #152033;
    --muted: #627084;
    --primary: #0f7b6c;
    --primary-dark: #0b5d52;
    --accent: #d89614;
    --danger: #c24141;
    --shadow: 0 16px 40px rgba(19, 40, 72, 0.08);
    font-family: Arial, Helvetica, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
}

button,
input,
select,
textarea {
    font: inherit;
}

.shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 320px 1fr;
}

.sidebar {
    background: #132034;
    color: #f8fbff;
    padding: 24px;
    display: grid;
    gap: 18px;
    align-content: start;
}

.main,
.public-shell {
    padding: 24px;
}

.topbar,
.public-header,
.card-head,
.toolbar,
.form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.toolbar {
    flex-wrap: wrap;
}

.card,
.metrics article {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.card {
    padding: 18px;
}

.card.compact {
    padding: 16px;
}

.grid {
    display: grid;
    gap: 18px;
    margin-bottom: 18px;
}

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

.metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin: 18px 0;
}

.metrics article {
    padding: 18px;
}

.eyebrow {
    margin: 0 0 6px;
    font-size: 12px;
    text-transform: uppercase;
    color: var(--muted);
}

.sidebar .eyebrow,
.sidebar .muted,
.sidebar h1,
.sidebar h2,
.sidebar label,
.sidebar .hint,
.sidebar .ghost-link {
    color: #f8fbff;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

.muted,
.hint {
    color: var(--muted);
}

.hint {
    font-size: 13px;
}

.selection-note {
    margin: 0;
    color: var(--primary-dark);
    font-size: 13px;
    font-weight: 700;
}

.avatar {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid var(--line);
    background: var(--surface-alt);
}

.status-list {
    color: red;
    list-style: none;
    padding: 0;
    margin: 0 0 14px;
    display: grid;
    gap: 10px;
}

.status-list li {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #9ca3af;
}

.dot.online {
    background: #1fb36b;
}

.dot.sync {
    background: var(--accent);
}

.stack,
.form-grid {
    display: grid;
    gap: 12px;
}

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

.form-grid .full,
.form-actions {
    grid-column: 1 / -1;
}

label {
    display: grid;
    gap: 6px;
    font-size: 14px;
    color: var(--muted);
}

input,
select,
textarea,
button,
.ghost-link {
    border-radius: 8px;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--text);
    padding: 11px 12px;
}

button,
.ghost-link {
    border: none;
    background: var(--primary);
    color: #fff;
    padding: 11px 16px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

button.secondary {
    background: var(--surface-alt);
    color: var(--text);
    border: 1px solid var(--line);
}

button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.table-wrap {
    overflow: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 12px 10px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    white-space: nowrap;
}

th {
    font-size: 13px;
    color: var(--muted);
}

.badge {
    background: #fff7e6;
    color: #946200;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.toast {
    position: fixed;
    right: 20px;
    bottom: 20px;
    background: #132034;
    color: #fff;
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(10px);
    transition: 0.2s ease;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.public-page {
    background: linear-gradient(180deg, #e9f4f1 0%, #f4f7fb 100%);
}

.public-header {
    margin-bottom: 18px;
}

@media (max-width: 1080px) {
    .shell {
        grid-template-columns: 1fr;
    }

    .metrics,
    .grid.two,
    .form-grid {
        grid-template-columns: 1fr;
    }
}
