:root {
    --bg: #f2f5f9;
    --bg-accent: radial-gradient(circle at 5% 5%, #c2f0e4 0%, #f2f5f9 45%), radial-gradient(circle at 95% 95%, #ffe4bf 0%, #f2f5f9 40%);
    --panel: #ffffff;
    --ink: #1a2433;
    --muted: #556272;
    --brand: #0d7f7b;
    --brand-dark: #085f5c;
    --danger: #bf2f3f;
    --success: #117a4a;
    --border: #dbe2ea;
    --shadow: 0 20px 40px rgba(20, 38, 59, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Manrope', sans-serif;
    color: var(--ink);
    background: var(--bg-accent);
    min-height: 100vh;
}

h1, h2, h3, strong {
    font-family: 'Space Grotesk', sans-serif;
}

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

.sidebar {
    background: linear-gradient(180deg, #06272d 0%, #0a4651 100%);
    color: #fff;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(145deg, #49d6af, #d0ff74);
    color: #03212a;
    display: grid;
    place-items: center;
    font-weight: 800;
}

.brand small {
    color: #b9d9dc;
}

.menu {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.menu a {
    text-decoration: none;
    color: #d6edf1;
    padding: 10px 12px;
    border-radius: 8px;
}

.menu a.active,
.menu a:hover {
    background: rgba(255, 255, 255, 0.16);
}

.logout-form {
    margin-top: auto;
}

.logout-form button {
    width: 100%;
    border: 0;
    background: #ffd166;
    color: #1c2b35;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
}

.content-area {
    padding: 24px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.user-chip {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 8px 14px;
    box-shadow: var(--shadow);
}

.page-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
}

.stat-card,
.panel {
    background: var(--panel);
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    padding: 18px;
    animation: rise 0.5s ease;
}

.stat-card strong {
    font-size: 1.35rem;
}

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

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

label {
    display: grid;
    gap: 6px;
    font-weight: 600;
}

input,
select,
button,
.button-link {
    font: inherit;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: #fff;
}

button,
.button-link {
    border: 0;
    background: var(--brand);
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    display: inline-block;
}

button:hover,
.button-link:hover {
    background: var(--brand-dark);
}

.drop-zone {
    border: 2px dashed #8fc6d5;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    background: #f6fcff;
}

.drop-zone.dragover {
    border-color: var(--brand);
    background: #eafff8;
}

.drop-zone input {
    display: none;
}

.alert {
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 12px;
}

.alert-error {
    background: #fee8eb;
    color: var(--danger);
}

.alert-success {
    background: #e6f8ef;
    color: var(--success);
}

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

th,
td {
    border-bottom: 1px solid #edf2f6;
    padding: 10px;
    text-align: left;
}

.toolbar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.helper-text {
    margin-top: 0;
    color: var(--muted);
}

.helper-text a {
    color: var(--brand-dark);
    font-weight: 700;
}

.feature-list {
    margin: 0;
    padding-left: 18px;
    color: var(--muted);
    display: grid;
    gap: 8px;
}

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

.guided-grid p {
    margin: 0;
}

.login-wrapper {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-card {
    width: min(500px, 100%);
    background: #fff;
    padding: 28px;
    border-radius: 20px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

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

    .sidebar {
        position: sticky;
        top: 0;
        z-index: 20;
    }
}
