* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #f5f7fb;
    color: #111827;
    font-family: Arial, Helvetica, sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 270px;
    background: #081f3d;
    color: #ffffff;
    padding: 28px 20px;
}

.sidebar-brand {
    margin-bottom: 32px;
}

.sidebar-brand strong {
    display: block;
    font-size: 26px;
    letter-spacing: .03em;
}

.sidebar-brand span {
    color: rgba(255,255,255,.65);
}

.sidebar-nav {
    display: grid;
    gap: 6px;
}

.sidebar-nav a {
    padding: 13px 14px;
    border-radius: 12px;
    color: rgba(255,255,255,.78);
    font-weight: 700;
}

.sidebar-nav a:hover {
    background: rgba(255,255,255,.10);
    color: #fff;
}

.main {
    margin-left: 270px;
    min-height: 100vh;
}

.topbar {
    min-height: 92px;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 34px;
}

.topbar h1 {
    margin: 0;
    color: #081f3d;
    font-size: 30px;
}

.topbar p {
    margin: 4px 0 0;
    color: #6b7280;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-user a {
    color: #081f3d;
    font-weight: 900;
}

.content {
    padding: 34px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.panel-card,
.table-card,
.form-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 22px;
    box-shadow: 0 14px 40px rgba(15,23,42,.04);
}

.panel-card {
    padding: 26px;
    transition: .2s ease;
}

.panel-card:hover {
    transform: translateY(-3px);
    border-color: #081f3d;
    box-shadow: 0 20px 60px rgba(15,23,42,.09);
}

.panel-card h2 {
    margin: 0 0 8px;
    color: #081f3d;
}

.panel-card p {
    margin: 0;
    color: #6b7280;
    line-height: 1.5;
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.section-title h2 {
    margin: 0;
    color: #081f3d;
    font-size: 28px;
}

.section-title p {
    margin: 6px 0 0;
    color: #6b7280;
}

.btn {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    background: #081f3d;
    color: #ffffff;
    border: 0;
    border-radius: 999px;
    padding: 0 18px;
    font-weight: 900;
    cursor: pointer;
}

.btn.secondary {
    background: #ffffff;
    color: #081f3d;
    border: 1px solid #cbd5e1;
}

.btn.small {
    min-height: 34px;
    padding: 0 14px;
    font-size: 13px;
}

.table-card {
    overflow: hidden;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: #f8fafc;
    color: #374151;
    text-align: left;
    padding: 16px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .05em;
}

td {
    padding: 16px;
    border-top: 1px solid #e5e7eb;
    vertical-align: middle;
}

td small {
    display: block;
    color: #6b7280;
    margin-top: 4px;
}

.badge {
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.badge.yes {
    background: #d1fae5;
    color: #065f46;
}

.badge.no {
    background: #fee2e2;
    color: #991b1b;
}

.badge.warn {
    background: #fef3c7;
    color: #92400e;
}

.form-card {
    padding: 28px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.field {
    display: grid;
    gap: 8px;
}

.field.full {
    grid-column: 1 / -1;
}

.field.check {
    align-content: center;
}

label {
    font-weight: 900;
    color: #374151;
}

input,
textarea,
select {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 14px;
    padding: 12px 14px;
    font: inherit;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #081f3d;
    box-shadow: 0 0 0 4px rgba(8,31,61,.08);
}

.alert {
    padding: 14px 16px;
    border-radius: 16px;
    margin-bottom: 18px;
    font-weight: 800;
}

.alert.success {
    background: #ccfbf1;
    color: #115e59;
}

.alert.error {
    background: #fee2e2;
    color: #991b1b;
}

.login-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: #f5f7fb;
}

.login-card {
    width: min(420px, calc(100% - 32px));
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 24px;
    padding: 34px;
    box-shadow: 0 24px 70px rgba(15,23,42,.08);
}

.login-card h1 {
    margin: 0 0 8px;
    color: #081f3d;
    font-size: 34px;
}

.login-card p {
    margin: 0 0 24px;
    color: #6b7280;
}

.login-card form {
    display: grid;
    gap: 14px;
}

.login-card button {
    min-height: 46px;
    border: 0;
    border-radius: 999px;
    background: #081f3d;
    color: #fff;
    font-weight: 900;
    cursor: pointer;
}

@media (max-width: 980px) {
    .sidebar {
        position: relative;
        width: 100%;
    }

    .main {
        margin-left: 0;
    }

    .dashboard-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .section-title {
        align-items: flex-start;
        flex-direction: column;
    }
}

.sidebar-nav a.active {
    background: rgba(255,255,255,.16);
    color: #ffffff;
}