:root {
    --ink: #1c2834;
    --muted: #5d6b7a;
    --line: #e4ebf2;
    --paper: #f4f7f8;
    --card: #ffffff;
    --accent: #0e6e68;
    --accent-dark: #0a574f;
    --warn: #b45309;
}

body {
    color: var(--ink);
    font-family: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
}

.content-wrapper,
.main-footer {
    background: var(--paper);
}

.main-header.navbar {
    border-bottom: 1px solid var(--line);
    box-shadow: none;
}

.brand-link {
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.brand-link .brand-text {
    font-weight: 650;
    letter-spacing: -.02em;
}

.content-header {
    padding: 1.15rem 1.25rem .35rem;
}

.content-header h1 {
    font-size: 1.45rem;
    font-weight: 680;
    letter-spacing: -.03em;
}

.content {
    padding-bottom: 1.5rem;
}

.card {
    border: 1px solid var(--line);
    border-radius: .8rem;
    box-shadow: 0 1px 2px rgba(22, 34, 46, .04);
    overflow: hidden;
}

.card-header,
.card-footer {
    background: var(--card);
    border-color: var(--line);
}

.card-header {
    font-weight: 680;
    padding: .9rem 1.1rem;
}

.card-primary {
    border-top: 0;
}

.card-title {
    font-weight: 680;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group > label {
    display: block;
    margin-bottom: .35rem;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .02em;
}

.form-inline .form-group > label {
    display: inline-block;
    margin-bottom: 0;
}

.form-group:has([required]) > label::after {
    content: " *";
    color: var(--warn);
}

.form-control,
.custom-select {
    min-height: 2.5rem;
    border-radius: .55rem;
    border-color: #d5dee7;
    color: var(--ink);
}

.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 .16rem rgba(14, 110, 104, .16);
}

textarea.form-control {
    min-height: 5.5rem;
}

.form-text,
.field-hint {
    margin-top: .3rem;
    color: var(--muted);
    font-size: .78rem;
}

.btn {
    border-radius: .55rem;
    font-weight: 650;
}

.btn-primary {
    background: var(--accent);
    border-color: var(--accent-dark);
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
}

.btn-default,
.btn-outline-primary {
    border-color: #d5dee7;
}

.form-actions {
    position: sticky;
    bottom: 0;
    z-index: 20;
    display: flex;
    gap: .5rem;
    align-items: center;
    padding: .85rem 1.1rem;
    background: rgba(255, 255, 255, .94);
    border-top: 1px solid var(--line);
    backdrop-filter: blur(8px);
}

.form-section + .form-section {
    margin-top: 1rem;
}

.form-section-title {
    display: flex;
    align-items: baseline;
    gap: .6rem;
    margin-bottom: .85rem;
    color: var(--ink);
    font-size: .95rem;
    font-weight: 720;
}

.form-section-title span {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 550;
}

.cost-grid {
    padding: .85rem .85rem .15rem;
    background: #f7fbfb;
    border: 1px solid #d7ebe8;
    border-radius: .7rem;
}

.content .table {
    margin-bottom: 0;
    color: var(--ink);
}

.content .table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: .75rem 1rem;
    border-top: 0;
    border-bottom: 1px solid #d7e4e2;
    background: #f4f8f7;
    color: #5c736f;
    font-size: .72rem;
    font-weight: 750;
    letter-spacing: .05em;
    text-transform: uppercase;
    white-space: nowrap;
}

.content .table td {
    padding: .85rem 1rem;
    border-top: 0;
    border-bottom: 1px solid #eef3f2;
    vertical-align: middle;
}

.content .table tbody tr:last-child td {
    border-bottom: 0;
}

.content .table-sm th,
.content .table-sm td,
.content .table-bordered th,
.content .table-bordered td {
    padding: .8rem 1rem;
    border: 0;
    border-bottom: 1px solid #eef3f2;
}

.content .table-bordered {
    border: 0;
}

.content .table tbody tr:hover td {
    background: #f3faf8;
}

.content .table a {
    font-weight: 720;
}

.cell-code {
    font-weight: 750;
    white-space: nowrap;
    letter-spacing: -.01em;
}

.cell-sub {
    display: block;
    margin-top: .1rem;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 550;
}

.row-actions {
    display: inline-flex;
    gap: .35rem;
    align-items: center;
    justify-content: flex-end;
    white-space: nowrap;
}

.row-actions .btn,
.row-actions form {
    margin: 0;
}

.journal-head {
    display: flex;
    gap: .75rem;
    align-items: center;
    justify-content: space-between;
}

.journal-head form {
    margin: 0;
}

.journal-stats .h4 {
    font-weight: 600;
}

.journal-table .journal-check {
    width: 2.5rem;
    vertical-align: middle;
}

.journal-meta dt {
    font-weight: 600;
    color: #5c6b68;
}

.journal-meta dd {
    margin-bottom: .65rem;
}

.flow-secondary a,
.flow-secondary span {
    font-size: .92rem;
}

.flow-secondary .is-current {
    font-weight: 600;
}

.card-footer {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: center;
}

.card-footer .pagination {
    margin: 0 0 0 auto;
}

.page-item .page-link {
    margin-left: .2rem;
    border-color: #d7e3e1;
    border-radius: .45rem !important;
    color: var(--accent);
}

.page-item.active .page-link {
    background: var(--accent);
    border-color: var(--accent);
}

.num {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.status-pill {
    display: inline-block;
    padding: .2rem .55rem;
    border-radius: 999px;
    background: #eef2f5;
    color: #3e4c59;
    font-size: .75rem;
    font-weight: 700;
    white-space: nowrap;
}

.status-pill.is-good { background: #e5f6ef; color: #0f6b45; }
.status-pill.is-wait { background: #fff4df; color: #8a5a08; }
.status-pill.is-bad { background: #fde8e8; color: #9f2d2d; }
.status-pill.is-info { background: #e7f3f2; color: #0e6e68; }

.alert {
    border: 0;
    border-radius: .7rem;
}

.callout {
    border-radius: .7rem;
}

.app-kicker {
    margin: 0 0 1rem;
    color: var(--muted);
    font-size: .92rem;
}

.stat-link {
    display: block;
    color: inherit;
}

.stat-link:hover {
    color: inherit;
    text-decoration: none;
}

.stat-link .info-box,
.stat-link .small-box {
    transition: transform .12s ease;
}

.stat-link:hover .info-box,
.stat-link:hover .small-box {
    transform: translateY(-1px);
}

.info-box,
.small-box {
    border-radius: .8rem;
    box-shadow: none;
    border: 1px solid var(--line);
}

.small-box {
    color: var(--ink);
    background: #fff !important;
}

.small-box h3,
.small-box p {
    color: var(--ink) !important;
}

.small-box .icon {
    color: rgba(14, 110, 104, .16);
}

.info-box-number,
.small-box h3 {
    font-variant-numeric: tabular-nums;
}

.flow {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    margin-bottom: 1rem;
}

.flow a,
.flow span {
    padding: .38rem .75rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--muted);
    font-size: .8rem;
    font-weight: 700;
}

.flow a:hover {
    color: var(--accent);
    text-decoration: none;
}

.flow .is-current {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.record-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: .85rem 1.25rem;
}

.record-grid span {
    display: block;
    color: var(--muted);
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.record-grid strong {
    display: block;
    margin-top: .15rem;
    font-size: 1rem;
}

.empty-row {
    padding: 1.4rem !important;
    color: var(--muted);
    text-align: center;
}

.login-page {
    background:
        radial-gradient(circle at top left, rgba(14, 110, 104, .18), transparent 32rem),
        linear-gradient(180deg, #eef4f3, #f7f4ee);
}

.login-box {
    width: 420px;
}

.login-card {
    border: 0;
    border-radius: 1rem;
    box-shadow: 0 18px 50px rgba(22, 34, 46, .12);
}

.login-logo {
    font-weight: 720;
    letter-spacing: -.03em;
    color: var(--ink);
}

.account-chip {
    display: inline-block;
    margin: 0 .25rem .35rem 0;
    padding: .15rem .45rem;
    border-radius: 999px;
    background: #eef3f2;
    color: #3e4c59;
    font-size: .75rem;
}

.report-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: .75rem;
    margin-bottom: 1.35rem;
}

.report-card {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    min-height: 92px;
    padding: .95rem 1rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: .8rem;
    color: var(--ink);
}

.report-card:hover {
    border-color: #9ec9c4;
    color: var(--ink);
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(14, 70, 66, .06);
}

.report-code {
    color: var(--accent);
    font-size: .72rem;
    font-weight: 750;
    letter-spacing: .06em;
}

.report-scroll {
    max-height: min(70vh, 760px);
    overflow: auto;
}

.report-table thead th {
    top: 0;
    z-index: 2;
}

.report-table td {
    white-space: nowrap;
}

.report-table th:first-child,
.report-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    background: #fff;
    box-shadow: 1px 0 0 #e7eeec;
}

.report-table thead th:first-child {
    z-index: 3;
    background: #f4f8f7;
}

.report-table tbody tr:hover td:first-child {
    background: #f3faf8;
}

@media (max-width: 767.98px) {
    .content-header h1 {
        font-size: 1.2rem;
    }

    .form-actions {
        flex-wrap: wrap;
    }
}

