/* ── Base ────────────────────────────────────────────────────────────────── */
html, body {
    margin: 0; padding: 0;
    background-color: #F5F2EB;
    color: #2A2320;
    min-height: 100vh;
}

/* ── Scrollbar ───────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #F5F2EB; }
::-webkit-scrollbar-thumb { background: #D4C4B1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #A38F7A; }
* { scrollbar-width: thin; scrollbar-color: #D4C4B1 #F5F2EB; }

/* ── Interactive elements ────────────────────────────────────────────────── */
.interactive-el {
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), 
                background-color 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                color 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
    backface-visibility: hidden;
    transform: translateZ(0);
}
.interactive-el:hover {
    transform: scale(1.03) translateZ(0);
}

/* ── Admin form inputs ───────────────────────────────────────────────────── */
.admin-input {
    width: 100%;
    background-color: transparent;
    border: none;
    border-bottom: 1px solid #D4C4B1;
    padding: 0.75rem 0;
    font-size: 0.875rem;
    font-family: inherit;
    color: #2A2320;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}
.admin-input:focus {
    outline: none;
    border-color: #3A2E2A;
}
.admin-input option {
    background: #F5F2EB;
    color: #2A2320;
}

.admin-label {
    display: block;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #A38F7A;
    margin-bottom: 0.25rem;
}

/* ── Toast notification ──────────────────────────────────────────────────── */
#toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 9999;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(42,35,32,0.15);
    transition: opacity 0.4s ease, transform 0.4s ease;
    pointer-events: none;
}
#toast.toast-success { background: #3A2E2A; color: #F5F2EB; }
#toast.toast-error   { background: #c0392b; color: #fff; }
#toast.toast-hidden  { opacity: 0; transform: translateY(8px); }

/* ── Page fade-in ────────────────────────────────────────────────────────── */
.page-enter {
    animation: pageFadeIn 0.5s ease forwards;
}
@keyframes pageFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Loader overlay (pro async operace) ──────────────────────────────────── */
.btn-loading { position: relative; pointer-events: none; }
.btn-loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.2);
    border-radius: inherit;
}

/* ── Finance filter indicator animation ──────────────────────────────────── */
#filter-indicator {
    transition: width 0.4s cubic-bezier(0.25, 1, 0.5, 1),
                transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

/* ── Accounts table ──────────────────────────────────────────────────────── */
.accounts-table th {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #A38F7A;
    font-weight: 700;
    padding: 0 0 0.75rem 0;
    border-bottom: 1px solid #EBE4D5;
}
.accounts-table td {
    padding: 0.85rem 0;
    border-bottom: 1px solid #EBE4D5;
    font-size: 0.875rem;
    vertical-align: middle;
}
.accounts-table tr:last-child td { border-bottom: none; }

/* ── Badge ───────────────────────────────────────────────────────────────── */
.badge {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    border-radius: 9999px;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
/* ── Client autocomplete styles ───────────────────────────────────────────── */
.autocomplete-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #F5F2EB;
}
.autocomplete-item:last-child { border-bottom: none; }
.autocomplete-item:hover { background-color: #F5F2EB; }

/* ── Small admin input for detail views ───────────────────────────────────── */
.admin-input-small {
    width: 100%;
    background-color: #fff;
    border: 1px solid #EBE4D5;
    padding: 0.6rem 0.75rem;
    font-size: 0.8125rem;
    border-radius: 0.375rem;
    color: #2A2320;
    transition: border-color 0.2s ease;
}
.admin-input-small:focus {
    outline: none;
    border-color: #A38F7A;
}

.badge-1 { background: #EBE4D5; color: #4A3B35; }
.badge-2 { background: #3A2E2A; color: #F5F2EB; }
