:root {
    --brand-900: #0f1d2e;
    --brand-700: #1f3a5f;
    --brand-500: #2f5f8f;
    --brand-300: #8fb5d9;
    --accent-500: #e37a3f;
    --paper: #ffffff;
    --ink: #101622;
    --muted: #5b6b7a;
    --bg: #f2f5f9;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Space Grotesk", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    color: var(--ink);
    background: radial-gradient(1200px 600px at 10% -10%, #e6eef7 0%, rgba(230, 238, 247, 0) 60%),
        radial-gradient(900px 500px at 90% -20%, #fde9dc 0%, rgba(253, 233, 220, 0) 55%),
        var(--bg);
}

header {
    background: linear-gradient(120deg, var(--brand-900), var(--brand-700));
    color: #f6f8fb;
    padding: 1.5rem 1rem 3rem;
    text-align: center;
    box-shadow: 0 8px 24px rgba(15, 29, 46, 0.18);
    position: relative;
}

header h1 {
    margin: 0 0 0.5rem 0;
    font-weight: 600;
    letter-spacing: 0.4px;
}

header nav {
    margin-top: 0.5rem;
}

header nav a {
    color: #f6f8fb;
    text-decoration: none;
    display: inline-block;
    margin: 0.15rem 0.35rem;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    transition: transform 0.2s ease, background 0.2s ease;
}

header nav a:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: translateY(-1px);
}

main.container {
    max-width: 1100px;
}

main.container > div {
    background: var(--paper);
    border-radius: 18px;
    padding: 1.5rem;
    box-shadow: 0 16px 40px rgba(15, 29, 46, 0.08);
}

h2 {
    color: var(--brand-900);
    margin-top: 0;
}

p {
    color: var(--muted);
}

table.table {
    margin-top: 1rem;
    border-radius: 12px;
    overflow: hidden;
}

.table thead {
    background: rgba(47, 95, 143, 0.12);
}

.table thead th {
    font-weight: 600;
    color: var(--brand-900);
}

.table tbody tr:hover {
    background: rgba(227, 122, 63, 0.08);
}

.table tbody tr.text-secondary > td,
.table tbody tr.text-warning > td,
.table tbody tr.text-danger > td {
    color: inherit;
}

.table tbody tr.text-secondary > td {
    background-color: rgba(108, 117, 125, 0.14) !important;
}

.table tbody tr.text-warning > td {
    background-color: rgba(255, 193, 7, 0.2) !important;
}

.table tbody tr.text-danger > td {
    background-color: rgba(220, 53, 69, 0.18) !important;
}

.table tbody tr.text-secondary {
    color: var(--bs-secondary-color) !important;
}

.table tbody tr.text-warning {
    color: var(--bs-warning-text-emphasis, #664d03) !important;
}

.table tbody tr.text-danger {
    color: var(--bs-danger-text-emphasis, #58151c) !important;
}

.table tbody tr.text-secondary a,
.table tbody tr.text-warning a,
.table tbody tr.text-danger a {
    color: inherit;
}

.table tbody tr.text-secondary:hover > td {
    background-color: rgba(108, 117, 125, 0.2) !important;
}

.table tbody tr.text-warning:hover > td {
    background-color: rgba(255, 193, 7, 0.28) !important;
}

.table tbody tr.text-danger:hover > td {
    background-color: rgba(220, 53, 69, 0.24) !important;
}

button.btn {
    border-radius: 999px;
    padding: 0.4rem 1.1rem;
    font-weight: 600;
}

.quick-filters {
    margin: 0.75rem 0 1rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.45rem;
}

.quick-filters .btn {
    padding: 0.3rem 0.8rem;
    font-size: 0.88rem;
}

.table .btn {
    padding: 0.25rem 0.75rem;
    font-size: 0.85rem;
}

input, select, textarea {
    width: 100%;
    max-width: 420px;
    padding: 0.5rem 0.75rem;
    border-radius: 10px;
    border: 1px solid #d7dee6;
}

label {
    display: block;
    margin: 0.6rem 0 0.3rem;
    font-weight: 600;
    color: var(--brand-900);
}

footer {
    text-align: center;
    color: var(--muted);
    padding: 1.5rem 1rem 2.5rem;
}

.breadcrumbs {
    position: absolute;
    left: 1rem;
    bottom: 0.75rem;
    margin-top: 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

.breadcrumbs a {
    color: rgba(255, 255, 255, 0.9);
    background: none;
    padding: 0;
    margin: 0;
}

.breadcrumbs span {
    color: rgba(255, 255, 255, 0.6);
}

#user-info {
    position: absolute;
    right: 1rem;
    bottom: 0.6rem;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}

#user-name {
    margin-right: 0.6rem;
}

.dashboard-wrap {
    text-align: center;
}

.dashboard-grid {
    margin-top: 0.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.dashboard-card {
    border: 1px solid #d8e1ea;
    border-radius: 14px;
    padding: 1rem;
    background: linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
    min-height: 190px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.dashboard-card h2 {
    font-size: 1.1rem;
    margin-bottom: 0.35rem;
}

.dashboard-card p {
    margin-bottom: 0.9rem;
}

.mobile-dashboard-menu {
    display: none;
}

.dashboard-menu-btn {
    width: 100%;
    max-width: 320px;
}

.dashboard-menu-list {
    margin: 0.75rem auto 0;
    width: 100%;
    max-width: 320px;
    border: 1px solid #d8e1ea;
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
}

.dashboard-menu-item {
    display: block;
    text-decoration: none;
    padding: 0.8rem 1rem;
    color: var(--brand-900);
    border-bottom: 1px solid #eef2f7;
    font-weight: 600;
}

.dashboard-menu-item:last-child {
    border-bottom: 0;
}

.dashboard-menu-item:hover {
    background: #f5f8fc;
}

.menu-desktop-inline {
    display: block;
}

.side-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 1rem;
    margin-top: 0.5rem;
}

.side-nav-desktop {
    border: 1px solid #d8e1ea;
    border-radius: 12px;
    padding: 1rem;
    background: #ffffff;
}

.side-nav-desktop h3 {
    margin-top: 0;
}

.side-nav-desktop ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.side-nav-desktop li + li {
    margin-top: 0.45rem;
}

.side-nav-desktop a {
    color: var(--brand-900);
    text-decoration: none;
    font-weight: 600;
}

.side-content {
    border: 1px solid #d8e1ea;
    border-radius: 12px;
    padding: 1rem 1.2rem;
    background: #ffffff;
    text-align: left;
}

html.is-mobile-layout header {
    padding: 1rem 0.75rem 4.4rem;
}

html.is-mobile-layout header h1 {
    font-size: 1.25rem;
    line-height: 1.3;
}

html.is-mobile-layout main.container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

html.is-mobile-layout main.container > div {
    border-radius: 14px;
    padding: 1rem;
}

html.is-mobile-layout .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

html.is-mobile-layout .dashboard-card {
    min-height: 0;
}

html.is-mobile-layout .table {
    display: block;
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
}

html.is-mobile-layout .table th,
html.is-mobile-layout .table td {
    font-size: 0.9rem;
    vertical-align: middle;
}

html.is-mobile-layout form input,
html.is-mobile-layout form select,
html.is-mobile-layout form textarea {
    max-width: 100%;
}

html.is-mobile-layout form button.btn,
html.is-mobile-layout form .btn {
    width: 100%;
    max-width: 100%;
}

html.is-mobile-layout .quick-filters {
    justify-content: flex-start;
}

html.is-mobile-layout .quick-filters .btn {
    width: auto;
}

html.is-mobile-layout #user-info {
    right: 0.75rem;
    bottom: 2rem;
}

html.is-mobile-layout #user-name {
    max-width: 140px;
    display: inline-block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

html.is-mobile-layout .breadcrumbs {
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.5rem;
    text-align: left;
}

@media (max-width: 768px) {
    header {
        padding-bottom: 4.2rem;
    }

    .breadcrumbs {
        left: 0.8rem;
        right: 0.8rem;
        bottom: 0.5rem;
        text-align: left;
    }

    #user-info {
        right: 0.8rem;
        bottom: 2.1rem;
        gap: 0.35rem;
    }

    #user-name {
        max-width: 150px;
        display: inline-block;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .mobile-dashboard-menu {
        display: block;
        margin-bottom: 1rem;
    }

    .menu-desktop-inline,
    .side-nav-desktop {
        display: none;
    }

    .side-layout {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .side-content {
        text-align: left;
    }
}
