.page {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}
.card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 10px rgba(0,0,0,.08);
}
.grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.accounting-action + .accounting-action {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

.accounting-action h3 {
    margin-bottom: 8px;
}

.accounting-action p {
    color: #4b5563;
}

.accounting-action .btn {
    margin-top: 12px;
}

button:disabled {
    cursor: not-allowed;
    opacity: .6;
}

.channel {
    font-weight: bold;
}

.btn {
    display: inline-block;
    padding: 10px 16px;
    border-radius: 8px;
    text-decoration: none;
    cursor: pointer;
    border: none;
    font-weight: bold;
}

.btn-primary {
    display: inline-block;
    border:5px;
    padding: 10px 16px;
    border-radius: 8px;
    text-decoration: none;
    cursor: pointer;
    border: none;
    font-weight: bold;
    background: #2d6cdf;
    color: white;
}

.btn-secondary {
    background: #efefef;
    color: #222;
}
.form-group {
    margin-bottom: 18px;
}

.period-filter {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    margin: 20px 0;
}

.period-filter-field {
    width: clamp(110px, 12.5vw, 160px);
}

.period-filter .btn {
    align-items: center;
    box-sizing: border-box;
    display: inline-flex;
    height: 41px;
    justify-content: center;
}

label {
    display: block;
    font-weight: bold;
    margin-bottom: 6px;
}

input,
select {
    width: 100%;
    padding: 10px;
    box-sizing: border-box;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap:16px;
}

.status-card {
    background:#f8f8f8;
    border-radius:10px;
    padding:16px;
}

.status-title {
    color:#777;
    font-size:13px;
}

.status-value {
    font-size:24px;
    font-weight:bold;
}
.nav {
    display: flex;
    align-items: center;
    gap: 12px;

    background: white;
    padding: 14px 24px;

    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 2px 6px rgba(0,0,0,.05);
}

.nav a {
    display: flex;
    align-items: center;
    gap: 8px;

    padding: 10px 18px;

    border-radius: 8px;

    text-decoration: none;
    color: #374151;
    font-weight: 600;

    transition: all .15s ease;
}

.nav a:hover {
    background: #eef5ff;
    color: #2d6cdf;
}

.nav a.active {
    background: #2d6cdf;
    color: white;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: rgb(18, 181, 251);
    border: 1px solid #ddd;
}
.table th {
    background: #c5ebfd;
    padding: 12px;
    text-align: left;
}
.table tbody tr:nth-child(even) {
    background: rgb(148, 222, 248);
}


.table th[data-sort] {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.table th[data-sort]::after {
    content: " ⇅";
    color: #bb3d3d;
    font-size: 12px;
    margin-left: 6px;
}

.table th[data-direction="asc"]::after {
    content: " ▲";
    color: #2d6cdf;
}

.table th[data-direction="desc"]::after {
    content: " ▼";
    color: #2d6cdf;
}


.table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
}

.table td.number {
    text-align: left;
    font-variant-numeric: tabular-nums;
}
.table tfoot {
    font-weight: bold;
    background: #fafafa;
}
.period {
    display: flex;
    gap: 12px;
    margin: 0 0 24px;
}

.period a {
    display: inline-block;
    padding: 8px 18px;
    background: #f6f8fa;
    border: 1px solid #d0d7de;
    border-radius: 6px;
    color: #333;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.15s ease;
}

.period a:hover {
    background: #2d6cdf;
    border-color: #2d6cdf;
    color: white;
}

.period a.active {
    background: #2d6cdf;
    border-color: #2d6cdf;
    color: white;
}

.summary-grid {
    display: flex;
    background: white;
    gap: 20px;
    margin: 24px 0;
}

.summary-card {
    flex: 1;
    background: rgb(47, 212, 253);
    border-radius: 14px;
    padding: 22px 24px;
    box-shadow: 0 2px 10px rgba(0,0,0,.08);
    border: 1px solid #eee;
}
.summary_card th {
    font-size: 1.5rem;
    color: #036ead;
    font-weight: 600;
}

.summary_card .card-value td {
    font-size: 1.5rem;
    font-weight: 700;
    color: #036ead;
}

.summary-card-highlight {
    border-left: 6px solid #2d6cdf;
}

.summary-card-highlight .summary-value {
    color: #2d6cdf;
}

.summary-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #777;
    font-weight: 700;
    margin-bottom: 10px;
}

.summary-value {
    font-size: 1.7rem;
    font-weight: 800;
    color: #1f2937;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}


@media (max-width: 900px) {
    .summary-grid {
        flex-direction: column;
    }
}

.flash {
    padding: 14px 18px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-weight: 600;
}

.flash-success {
    background: #ecfdf5;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.flash-info {
    background: #ecfdf5;
    color: #75f9a8;
    border: 1px solid #bbf7d0;
}

.flash-warning {
    background: #ecfdf5;
    color: #ebb80e;
    border: 1px solid #bbf7d0;
}

.flash-error,
.flash-danger {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.report-filter {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: nowrap;
}

.report-filter input[type="text"] {
    width: 180px;
    min-width: 180px;
    padding: 8px 12px;
}

.report-filter .btn {
    width: auto;
    display: inline-flex;
    padding: 8px 18px;
    white-space: nowrap;
}

.report-card {
    background: #ffffff;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.report-card canvas {
    width: 100%;
    height: 360px;
}
.chart-container {
    height: 360px;
    width: 100%;
}

.chart-container-small {
    height: 280px;
}

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

.logout-form {
    margin-right: 1rem;
}

.login-page {
    display: grid;
    min-height: 65vh;
    place-items: center;
}

.login-card {
    background: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 0.75rem 2.5rem rgb(0 0 0 / 18%);
    display: grid;
    gap: 0.75rem;
    max-width: 24rem;
    padding: 2rem;
    width: calc(100% - 4rem);
}

.login-card input,
.login-card button {
    box-sizing: border-box;
    font: inherit;
    padding: 0.7rem;
    width: 100%;
}

.login-error {
    background: #fee2e2;
    border: 1px solid #ef4444;
    color: #991b1b;
    padding: 0.75rem;
}
