body {
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(34, 197, 94, .18), transparent 34%),
        linear-gradient(135deg, #f7fee7, #eef6ff 46%, #fff7ed);
    color: #10233a;
}

.cashbook-top {
    max-width: 1280px;
    margin: 0 auto;
    padding: 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.cashbook-top p,
.cashbook-top h1,
.cashbook-top span {
    margin: 0;
}

.cashbook-top p {
    color: #0f766e;
    text-transform: uppercase;
    letter-spacing: .16em;
    font-weight: 900;
    font-size: .78rem;
}

.cashbook-top h1 {
    font-size: clamp(2rem, 5vw, 4rem);
}

.cashbook-top span {
    color: #52647a;
    font-weight: 600;
}

.cashbook-shell {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 22px 28px;
    display: grid;
    gap: 18px;
}

.cashbook-card {
    background: rgba(255, 255, 255, .86);
    border: 1px solid rgba(148, 163, 184, .28);
    border-radius: 24px;
    padding: 20px;
    box-shadow: 0 22px 55px rgba(15, 23, 42, .1);
}

.cashbook-card h2,
.cashbook-card p {
    margin: 0;
}

.cashbook-card h2 {
    margin: 0 0 14px;
}

.cashbook-card-title {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 14px;
}

.cashbook-card-title p {
    color: #64748b;
    font-weight: 600;
    line-height: 1.45;
}

.cashbook-chip,
.cashbook-type {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-size: .72rem;
}

.cashbook-chip {
    color: #92400e;
    background: #fef3c7;
    border: 1px solid #fde68a;
}

.cashbook-type.income {
    color: #047857;
    background: #d1fae5;
}

.cashbook-type.expense {
    color: #be123c;
    background: #ffe4e6;
}

.cashbook-form,
.cashbook-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.cashbook-form label,
.cashbook-filters input,
.cashbook-filters select {
    display: grid;
    gap: 6px;
    font-weight: 800;
    color: #334155;
}

.cashbook-form input,
.cashbook-form select,
.cashbook-form textarea,
.cashbook-filters input,
.cashbook-filters select {
    border: 1px solid #d8e2ef;
    border-radius: 14px;
    padding: 11px 12px;
    background: #fff;
    color: #0f172a;
}

.span-all {
    grid-column: 1 / -1;
}

.entry-card .btn {
    margin-top: 14px;
}

.cashbook-form-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.cashbook-form-actions .btn {
    margin-top: 0;
}

.cashbook-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    align-items: end;
}

.cashbook-head > div:first-child {
    min-width: 240px;
}

.cashbook-head p {
    color: #64748b;
    font-weight: 600;
    margin: 4px 0 0;
}

.cashbook-quick-filters {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.cashbook-quick-filters button,
.cashbook-row-actions button {
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #fff;
    color: #334155;
    min-height: 36px;
    padding: 0 10px;
    cursor: pointer;
    font-weight: 800;
}

.cashbook-quick-filters button:hover,
.cashbook-row-actions button:hover {
    border-color: #10b981;
    background: #ecfdf5;
    color: #047857;
}

.cashbook-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 16px 0;
}

.cashbook-kpis article {
    border-radius: 18px;
    padding: 16px;
    background: linear-gradient(135deg, #ffffff, #f1f5f9);
    border: 1px solid #e2e8f0;
}

.cashbook-kpis span {
    display: block;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: .78rem;
    font-weight: 900;
}

.cashbook-kpis strong {
    display: block;
    margin-top: 8px;
    font-size: 1.7rem;
}

.cashbook-breakdowns {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.cashbook-breakdowns section {
    border: 1px solid #d8e2ef;
    border-radius: 18px;
    padding: 14px;
    background: rgba(255, 255, 255, .72);
}

.cashbook-breakdowns h3 {
    margin: 0 0 10px;
    display: flex;
    align-items: center;
    gap: 7px;
    color: #334155;
    font-size: .95rem;
}

.cashbook-mini-list {
    display: grid;
    gap: 8px;
    max-height: 220px;
    overflow: auto;
}

.cashbook-mini-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 10px;
    padding: 9px 10px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.cashbook-mini-row strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cashbook-mini-row span {
    font-weight: 900;
}

.cashbook-mini-row small {
    grid-column: 1 / -1;
    color: #64748b;
    font-weight: 700;
}

.cashbook-empty {
    margin: 0;
    color: #64748b;
    font-weight: 700;
}

.cashbook-table-wrap {
    overflow: auto;
    border-radius: 18px;
    border: 1px solid #d8e2ef;
}

.cashbook-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 980px;
    background: #fff;
}

.cashbook-table th,
.cashbook-table td {
    padding: 11px 12px;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
}

.cashbook-table th {
    background: #f8fafc;
    color: #475569;
    text-transform: uppercase;
    font-size: .76rem;
    letter-spacing: .08em;
}

.cashbook-row-actions {
    display: flex;
    gap: 6px;
}

.cashbook-row-actions button {
    min-width: 34px;
    width: 34px;
    padding: 0;
}

.cashbook-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.cashbook-detail-grid div {
    border: 1px solid #d8e2ef;
    border-radius: 14px;
    background: #fff;
    padding: 12px;
}

.cashbook-detail-grid span {
    display: block;
    color: #64748b;
    font-size: .76rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 900;
}

.cashbook-detail-grid strong {
    display: block;
    margin-top: 5px;
    color: #0f172a;
    overflow-wrap: anywhere;
}

@media (max-width: 760px) {
    .cashbook-card-title,
    .cashbook-top,
    .cashbook-head {
        align-items: stretch;
        flex-direction: column;
    }

    .cashbook-kpis,
    .cashbook-breakdowns {
        grid-template-columns: 1fr;
    }
}
