:root {
    --brand: #0f4c81;
    --brand-dark: #0a355f;
    --surface: #ffffff;
    --soft: #f6f8fb;
    --text: #1f2937;
    --muted: #64748b;
    --border: rgba(15, 76, 129, 0.14);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f6f8fb 0%, #eef4fb 100%);
    color: var(--text);
    min-height: 100vh;
}

main {
    padding-top: 0.5rem;
}

.app-shell {
    display: flex;
    flex: 1;
    min-height: 0;
}

.content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.sidebar {
    width: 260px;
    min-width: 260px;
    background: linear-gradient(180deg, var(--brand-dark) 0%, var(--brand) 100%);
    color: #ffffff;
    padding: 1.25rem 1rem;
    position: sticky;
    top: 0;
    height: calc(100vh - 56px);
    overflow-y: auto;
    box-shadow: 0 12px 30px rgba(10, 53, 95, 0.2);
}

.sidebar .brand {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.sidebar .brand span {
    color: #d7e8fb;
}

.sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-radius: 12px;
    padding: 0.8rem 0.9rem;
    margin-bottom: 0.35rem;
    transition: all 0.2s ease;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    transform: translateX(2px);
}

.sidebar i {
    font-size: 1rem;
}

.page-shell {
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 16px 40px rgba(15, 76, 129, 0.08);
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.page-title {
    font-size: 1.55rem;
    font-weight: 700;
    color: var(--brand-dark);
    margin: 0;
}

.page-subtitle {
    color: var(--muted);
    font-size: 0.95rem;
    margin-top: 0.25rem;
}

.page-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    background: rgba(15, 76, 129, 0.12);
    color: var(--brand-dark);
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
}

.content-stack > * + * {
    margin-top: 1rem;
}

.card {
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(15, 76, 129, 0.06);
}

.card-header {
    border-bottom: 1px solid var(--border);
    background: transparent;
}

.btn {
    border-radius: 10px;
}

.form-control,
.form-select {
    border-radius: 10px;
    border: 1px solid #dbe4ef;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 0.2rem rgba(15, 76, 129, 0.12);
}

.table th {
    color: #475569;
    font-weight: 600;
}

.table td {
    vertical-align: middle;
}

@media (max-width: 992px) {
    .app-shell {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        min-width: 100%;
        height: auto;
        position: static;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 0.5rem;
    }

    .sidebar .brand {
        grid-column: 1 / -1;
        margin-bottom: 0.4rem;
    }

    .sidebar a {
        margin-bottom: 0;
    }
}

@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
    }

    .page-shell {
        padding: 1rem;
    }
}
