/* ==========================================================================
   Registru de Plăți - stylesheet
   Aesthetic: editorial, warm paper, ink black, oxblood accent
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Instrument+Sans:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    /* Paleta */
    --ink:           #1a1814;
    --ink-soft:      #3a342a;
    --paper:         #faf7f1;
    --paper-shade:   #f3efe5;
    --paper-deeper:  #eae5d7;
    --rule:          #d9d2c2;
    --rule-soft:     #e8e2d2;
    --muted:         #857d6e;
    --muted-soft:    #a9a190;

    --accent:        #7a2018;
    --accent-hover:  #5e1812;
    --accent-soft:   #f6e4df;

    --ok:            #2d6a4f;
    --ok-soft:       #dfeee5;
    --danger:        #8b1e1e;
    --warn-soft:     #faf0d7;
    --warn-border:   #d4b775;

    /* Typography */
    --font-display:  'Fraunces', Georgia, serif;
    --font-body:     'Instrument Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono:     'JetBrains Mono', ui-monospace, Menlo, monospace;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(26, 24, 20, 0.06);
    --shadow-md: 0 4px 12px rgba(26, 24, 20, 0.08);
    --shadow-lg: 0 12px 32px rgba(26, 24, 20, 0.12);

    /* Dimensiuni */
    --radius:    6px;
    --radius-lg: 10px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Textura subtila de hartie */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        radial-gradient(circle at 20% 10%, rgba(122, 32, 24, 0.02) 0%, transparent 50%),
        radial-gradient(circle at 80% 60%, rgba(45, 106, 79, 0.015) 0%, transparent 40%);
    z-index: 0;
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 500;
    letter-spacing: -0.015em;
    margin: 0;
    color: var(--ink);
}

h1 { font-size: 1.3rem; line-height: 1.2; }
h2 { font-size: 1.15rem; font-weight: 500; }

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

code, .mono { font-family: var(--font-mono); font-size: 0.92em; }
kbd {
    display: inline-block;
    padding: 1px 6px;
    font-family: var(--font-mono);
    font-size: 0.78em;
    color: var(--ink);
    background: var(--paper-shade);
    border: 1px solid var(--rule);
    border-bottom-width: 2px;
    border-radius: 4px;
}

/* ==========================================================================
   Auth layout (login + install)
   ========================================================================== */
.auth-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background:
        radial-gradient(ellipse at top, rgba(122, 32, 24, 0.06) 0%, transparent 50%),
        var(--paper);
    padding: 2rem 1rem;
}

.auth-shell {
    width: 100%;
    max-width: 440px;
    position: relative;
    z-index: 1;
}

.auth-card {
    background: #fffcf5;
    border: 1px solid var(--rule);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2.25rem 2.25rem;
    box-shadow: var(--shadow-lg);
}

.foot-hint {
    text-align: center;
    font-size: 0.82rem;
    color: var(--muted);
    margin: 1.25rem 0 0;
}

/* ==========================================================================
   Branding
   ========================================================================== */
.brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin-bottom: 1.75rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--rule-soft);
}

.brand-sm {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: 0;
}

.brand-mark {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 400;
    line-height: 1;
    width: 48px; height: 48px;
    display: grid;
    place-items: center;
    background: var(--ink);
    color: var(--paper);
    border-radius: var(--radius);
    font-style: italic;
}

.brand-sm .brand-mark {
    width: 36px; height: 36px;
    font-size: 1.5rem;
}

.brand h1 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.brand-sm h1 { font-size: 1.1rem; }

.brand-sub {
    font-size: 0.8rem;
    color: var(--muted);
    margin: 2px 0 0;
    letter-spacing: 0.01em;
}

/* ==========================================================================
   Topbar
   ========================================================================== */
.topbar {
    background: #fffcf5;
    border-bottom: 1px solid var(--rule);
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(8px);
}

.topbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.9rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.topnav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.topnav a {
    color: var(--ink-soft);
    font-weight: 500;
    font-size: 0.92rem;
    padding: 6px 2px;
    border-bottom: 2px solid transparent;
    transition: border-color 0.15s, color 0.15s;
    text-decoration: none;
}

.topnav a:hover { color: var(--accent); text-decoration: none; }
.topnav a.active { color: var(--ink); border-bottom-color: var(--accent); }

.user-chip {
    font-size: 0.85rem;
    color: var(--muted);
    padding-left: 0.75rem;
    border-left: 1px solid var(--rule);
    margin-left: 0.25rem;
}

/* ==========================================================================
   Main content
   ========================================================================== */
.main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.75rem 1.5rem 3rem;
    position: relative;
    z-index: 1;
}

/* ==========================================================================
   Stats
   ========================================================================== */
.stat-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat {
    background: #fffcf5;
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    padding: 1.1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-label {
    font-size: 0.78rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 500;
}

.stat-value {
    font-family: var(--font-display);
    font-size: 1.9rem;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.stat-unit {
    font-size: 0.82rem;
    color: var(--muted);
}

/* ==========================================================================
   Cards
   ========================================================================== */
.card {
    background: #fffcf5;
    border: 1px solid var(--rule);
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.card-head {
    padding: 1.1rem 1.5rem;
    border-bottom: 1px solid var(--rule-soft);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.list-head { padding: 0.9rem 1.25rem; }

.form-card .quick-form,
.form-card .bulk-form { padding: 1.25rem 1.5rem 1.4rem; }

/* ==========================================================================
   Forms
   ========================================================================== */
.field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.field > span {
    font-size: 0.82rem;
    color: var(--ink-soft);
    font-weight: 500;
}

.field-note .note {
    font-size: 0.82rem;
    color: var(--muted);
    margin: 0;
    line-height: 1.4;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="search"],
input[type="date"],
select,
textarea {
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--ink);
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    padding: 0.58rem 0.75rem;
    width: 100%;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
    background: #fffcf5;
    box-shadow: 0 0 0 3px var(--accent-soft);
}

textarea {
    resize: vertical;
    font-family: var(--font-mono);
    font-size: 0.88rem;
    line-height: 1.6;
}

.grid-2 { display: grid; grid-template-columns: 2fr 1fr; gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: 2fr 1fr 0.8fr; gap: 1rem; }

.form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 0.5rem;
}

.kbd-hint { color: var(--muted); font-size: 0.82rem; }
.bulk-count { color: var(--muted); font-size: 0.85rem; font-family: var(--font-mono); }

.bulk-help {
    font-size: 0.86rem;
    color: var(--muted);
    background: var(--paper-shade);
    border-left: 3px solid var(--rule);
    padding: 0.7rem 0.9rem;
    margin: 0 0 0.8rem;
    line-height: 1.55;
}

.bulk-help code {
    background: var(--paper);
    padding: 1px 5px;
    border-radius: 3px;
    border: 1px solid var(--rule);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 500;
    line-height: 1.2;
    padding: 0.6rem 1.15rem;
    border-radius: var(--radius);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.05s;
    white-space: nowrap;
}

.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }

.btn-primary {
    background: var(--ink);
    color: var(--paper);
    border-color: var(--ink);
}
.btn-primary:hover { background: var(--accent); border-color: var(--accent); color: var(--paper); }

.btn-ghost {
    background: transparent;
    color: var(--ink-soft);
    border-color: var(--rule);
}
.btn-ghost:hover { background: var(--paper-shade); color: var(--ink); }

.btn-danger {
    background: transparent;
    color: var(--danger);
    border-color: var(--rule);
}
.btn-danger:hover { background: var(--danger); color: var(--paper); border-color: var(--danger); }

.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.82rem; }

.btn-block { width: 100%; display: block; text-align: center; justify-content: center; }

/* ==========================================================================
   Alerts
   ========================================================================== */
.alert {
    padding: 0.8rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1.25rem;
    font-size: 0.92rem;
    line-height: 1.5;
    border: 1px solid;
}

.alert-error {
    background: var(--accent-soft);
    border-color: #e0b8b0;
    color: var(--accent-hover);
}

.alert-success {
    background: var(--ok-soft);
    border-color: #a8cfb8;
    color: var(--ok);
}

.alert-warning {
    background: var(--warn-soft);
    border-color: var(--warn-border);
    color: #6b4e10;
}

.alert code { background: rgba(0,0,0,0.06); padding: 1px 5px; border-radius: 3px; }

.lead { font-size: 0.98rem; color: var(--ink-soft); margin: 0 0 1.5rem; }

/* ==========================================================================
   Tabs de filtrare
   ========================================================================== */
.filter-tabs {
    display: flex;
    gap: 0;
    background: var(--paper-shade);
    border-radius: var(--radius);
    padding: 3px;
}

.filter-tabs a {
    padding: 0.45rem 1rem;
    font-size: 0.86rem;
    font-weight: 500;
    color: var(--muted);
    border-radius: 4px;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.filter-tabs a:hover { color: var(--ink); text-decoration: none; }
.filter-tabs a.active {
    background: #fffcf5;
    color: var(--ink);
    box-shadow: var(--shadow-sm);
}

.search-form {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.search-form input[type="search"] {
    width: 240px;
    padding: 0.45rem 0.75rem;
    font-size: 0.88rem;
}

/* ==========================================================================
   Tabel plati
   ========================================================================== */
.table-wrap { overflow-x: auto; }

.payments-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.payments-table thead th {
    text-align: left;
    padding: 0.7rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    background: var(--paper-shade);
    border-bottom: 1px solid var(--rule);
    white-space: nowrap;
}

.payments-table tbody td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--rule-soft);
    vertical-align: middle;
}

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

.payments-table tbody tr:hover td { background: rgba(26, 24, 20, 0.02); }

.row-paid td { color: var(--muted); }
.row-paid .supplier-name,
.row-paid .cell-details .copyable,
.row-paid .col-amount .copyable { text-decoration: line-through; text-decoration-color: var(--muted-soft); }
.row-paid .supplier-desc,
.row-paid .supplier-iban { opacity: 0.6; }

.field-hint {
    font-weight: 400;
    font-size: 0.76rem;
    color: var(--muted);
    margin-left: 0.3rem;
    font-style: italic;
}

.col-status-wide {
    width: 170px;
    text-align: left;
}
.col-amount {
    text-align: right;
    font-family: var(--font-mono);
    font-size: 0.92rem;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.col-amount .currency {
    color: var(--muted);
    font-size: 0.76rem;
    margin-left: 0.4rem;
    letter-spacing: 0.04em;
}
.col-date {
    white-space: nowrap;
    color: var(--muted);
    font-size: 0.86rem;
    width: 110px;
}
.col-actions { width: 50px; white-space: nowrap; text-align: right; }

.muted { color: var(--muted-soft); }
.muted-small { color: var(--muted); font-size: 0.86rem; }

.cell-supplier { line-height: 1.4; }
.supplier-name { font-weight: 500; display: inline-block; }

.supplier-desc {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 0.84rem;
    color: var(--muted);
    margin-top: 2px;
    letter-spacing: 0.005em;
}

.supplier-iban {
    margin-top: 4px;
    font-size: 0.78rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}
.iban-label {
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.7rem;
    font-weight: 600;
}
.supplier-iban .mono {
    color: var(--ink-soft);
    background: var(--paper-shade);
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 0.78rem;
    letter-spacing: 0.01em;
}

/* Buton Finalizeaza plata / Platita */
.status-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.42rem 0.7rem 0.42rem 0.55rem;
    border-radius: var(--radius);
    border: 1.5px solid transparent;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: 0.005em;
    transition: all 0.15s;
    white-space: nowrap;
}

.status-btn .status-icon {
    display: inline-grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 0.85rem;
    line-height: 1;
}

/* Stare: de platit (pending) */
.status-btn-pending {
    color: var(--accent);
    border-color: var(--accent);
    background: #fff;
}
.status-btn-pending .status-icon {
    border: 1.5px solid var(--accent);
    color: var(--accent);
    font-size: 0.7rem;
}
.status-btn-pending:hover {
    background: var(--accent);
    color: var(--paper);
}
.status-btn-pending:hover .status-icon {
    background: var(--paper);
    color: var(--accent);
    border-color: var(--paper);
}

/* Stare: platita */
.status-btn-paid {
    color: var(--ok);
    border-color: var(--ok-soft);
    background: var(--ok-soft);
}
.status-btn-paid .status-icon {
    background: var(--ok);
    color: #fff;
    font-weight: 700;
}
.status-btn-paid:hover {
    background: transparent;
    border-color: var(--muted-soft);
    color: var(--muted);
}
.status-btn-paid:hover .status-icon {
    background: var(--muted);
}

/* Icon buttons (copy, delete) */
.icon-btn {
    width: 28px; height: 28px;
    border-radius: 4px;
    border: 1px solid var(--rule);
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    transition: all 0.15s;
    margin-left: 2px;
    display: inline-grid;
    place-items: center;
}
.icon-btn:hover { border-color: var(--ink); color: var(--ink); background: var(--paper-shade); }
.btn-delete:hover { border-color: var(--danger); color: var(--danger); }

.copyable { cursor: pointer; border-bottom: 1px dashed transparent; transition: border-color 0.15s; }
.copyable:hover { border-bottom-color: var(--muted-soft); }
.copyable.copied { border-bottom-color: var(--ok); color: var(--ok); }

/* Empty state */
.empty {
    padding: 3rem 1.5rem;
    text-align: center;
    color: var(--muted);
}
.empty p { margin: 0 0 1rem; font-style: italic; }

/* Tags */
.tag {
    display: inline-block;
    padding: 2px 8px;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 500;
    background: var(--paper-shade);
    color: var(--muted);
    border-radius: 3px;
    margin-left: 6px;
    vertical-align: middle;
}
.tag-admin { background: var(--accent-soft); color: var(--accent); }

/* Inline forms on users page */
.inline-details {
    display: inline-block;
    vertical-align: middle;
    margin-right: 0.4rem;
}
.inline-form {
    display: inline-flex;
    gap: 0.3rem;
    margin-top: 0.4rem;
    align-items: center;
    vertical-align: middle;
}
.inline-form input[type="text"],
.inline-form input[type="password"] {
    width: 180px;
    padding: 0.3rem 0.55rem;
    font-size: 0.82rem;
}

/* ==========================================================================
   Toast notifications
   ========================================================================== */
.toast {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--ink);
    color: var(--paper);
    padding: 0.7rem 1.3rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s;
    z-index: 100;
    pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.toast-error { background: var(--accent); }
.toast.toast-success { background: var(--ok); }

/* ==========================================================================
   Tag boss (rol director/sef)
   ========================================================================== */
.tag-boss {
    background: #ecdfc8;
    color: #6b4e10;
}

/* ==========================================================================
   Clopotel notificari (bell)
   ========================================================================== */
.bell-wrap {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--paper-shade);
    cursor: default;
    transition: background 0.15s;
}
.bell-wrap:hover { background: var(--paper-deeper); }
.bell-icon {
    font-size: 1.05rem;
    line-height: 1;
    filter: grayscale(0.2);
}
.bell-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 10px;
    background: var(--accent);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    display: grid;
    place-items: center;
    line-height: 1;
    letter-spacing: 0.01em;
    box-shadow: 0 2px 6px rgba(122, 32, 24, 0.35);
    animation: bell-pulse 2.4s ease-in-out infinite;
}
@keyframes bell-pulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.08); }
}

/* ==========================================================================
   BOSS VIEW - interfata sefului
   Floating cards cu focus pe actiune unica (marcarea ca platit)
   ========================================================================== */
.boss-body {
    background:
        radial-gradient(ellipse 80% 50% at 50% 0%, rgba(122, 32, 24, 0.04) 0%, transparent 70%),
        var(--paper);
}

.boss-main {
    max-width: 820px;
    padding-top: 2rem;
}

/* --- Sumar (bandou cu total si numar) ----------------------------------- */
.boss-summary {
    margin-bottom: 2rem;
}
.boss-summary-inner {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
    padding: 1.5rem 1.75rem;
    background: #fffcf5;
    border: 1px solid var(--rule);
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--accent);
    box-shadow: var(--shadow-md);
    flex-wrap: wrap;
}
.summary-label {
    display: block;
    font-size: 0.72rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    margin-bottom: 0.3rem;
}
.summary-count {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 500;
    line-height: 1;
    color: var(--ink);
    letter-spacing: -0.03em;
}
.summary-count-label {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--muted);
    font-style: italic;
    margin-left: 0.4rem;
}
.summary-totals {
    text-align: right;
}
.summary-amount {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 500;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
}

/* --- Starea "gol" (nimic de platit) ------------------------------------- */
.boss-zero {
    background: #fffcf5;
    border: 1px solid var(--rule);
    border-radius: var(--radius-lg);
    padding: 3.5rem 2rem;
    text-align: center;
    box-shadow: var(--shadow-md);
}
.boss-zero-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 1.25rem;
    border-radius: 50%;
    background: var(--ok-soft);
    color: var(--ok);
    display: grid;
    place-items: center;
    font-size: 2rem;
    font-weight: 700;
}
.boss-zero h2 {
    font-family: var(--font-display);
    font-size: 1.9rem;
    margin-bottom: 0.6rem;
    font-weight: 500;
}
.boss-zero p {
    color: var(--muted);
    max-width: 360px;
    margin: 0 auto;
    line-height: 1.55;
}

/* --- Lista de carduri (plati) - FLOATING ------------------------------ */
.boss-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 0.25rem 0;
}

.boss-card {
    background: #fffcf5;
    border: 1px solid var(--rule-soft);
    border-radius: 14px;
    padding: 1.4rem 1.6rem 1.25rem;
    box-shadow:
        0 1px 2px rgba(26, 24, 20, 0.04),
        0 8px 24px -8px rgba(26, 24, 20, 0.12),
        0 16px 40px -20px rgba(26, 24, 20, 0.1);
    transition: box-shadow 0.25s, transform 0.25s, border-color 0.25s;
    position: relative;
}
.boss-card:hover {
    transform: translateY(-2px);
    box-shadow:
        0 2px 4px rgba(26, 24, 20, 0.05),
        0 14px 32px -8px rgba(26, 24, 20, 0.16),
        0 24px 60px -24px rgba(26, 24, 20, 0.14);
    border-color: var(--rule);
}

/* Cardurile pentru plati intarziate - accent rosu vizibil */
.boss-card-overdue {
    border-left: 4px solid var(--accent);
    background: linear-gradient(180deg, rgba(246, 228, 223, 0.35) 0%, #fffcf5 70%);
}

/* Cardurile pentru plati scadente azi - accent galben */
.boss-card-today {
    border-left: 4px solid var(--warn-border);
}

/* Cardurile arhivate (deja platite) */
.boss-card-done {
    background: #faf7f1;
    box-shadow:
        0 1px 2px rgba(26, 24, 20, 0.03),
        0 4px 12px -6px rgba(26, 24, 20, 0.06);
    opacity: 0.92;
}
.boss-card-done:hover { opacity: 1; }

.boss-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.boss-card-supplier { flex: 1; min-width: 0; }
.boss-card-supplier h3 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 500;
    letter-spacing: -0.015em;
    line-height: 1.2;
}
.boss-card-desc {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 0.95rem;
    color: var(--muted);
    margin: 0.35rem 0 0;
    line-height: 1.4;
}

.boss-card-amount {
    text-align: right;
    white-space: nowrap;
}
.amount-wrap {
    line-height: 1 !important;
    align-items: baseline !important;
}
.amount-big {
    font-family: var(--font-display);
    font-size: 1.95rem;
    font-weight: 500;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}
.amount-currency {
    display: inline-block;
    margin-left: 0.3rem;
    font-size: 0.8rem;
    color: var(--muted);
    letter-spacing: 0.06em;
    font-weight: 500;
}

.boss-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    padding: 1rem 0 1.1rem;
    border-top: 1px dashed var(--rule-soft);
    border-bottom: 1px dashed var(--rule-soft);
    margin-bottom: 1rem;
}

.boss-field {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 1rem;
    align-items: center;
    min-height: 30px;
}
.boss-field-label {
    font-size: 0.72rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}

/* ==========================================================================
   Copy buttons (toate elementele copiabile din boss view)
   ========================================================================== */

/* Butonul-wrapper care contine text + iconita copy. Arata CA UN BUTON. */
.copy-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 4px 8px;
    margin: -4px -8px;
    cursor: pointer;
    font: inherit;
    color: inherit;
    text-align: left;
    transition: background 0.15s, border-color 0.15s;
    max-width: 100%;
}
.copy-wrap:hover {
    background: var(--paper-shade);
    border-color: var(--rule);
}
.copy-wrap:hover .copy-icon {
    opacity: 1;
    color: var(--accent);
}
.copy-wrap.copied {
    background: var(--ok-soft);
    border-color: #a8cfb8;
}
.copy-wrap.copied .copy-icon {
    opacity: 1;
    color: var(--ok);
}

.copy-text {
    flex: 1;
    min-width: 0;
    word-break: break-word;
}

/* Iconita de copy - vizibila dar discreta, devine clara la hover */
.copy-icon {
    flex-shrink: 0;
    opacity: 0.4;
    color: var(--muted);
    transition: opacity 0.15s, color 0.15s;
}

/* Pentru nume furnizor (mai mare) */
.boss-card-supplier .copy-wrap {
    padding: 4px 10px;
    margin-left: -10px;
}
.boss-card-supplier .copy-icon {
    margin-top: 3px;
}

/* Pentru suma */
.boss-card-amount .copy-wrap {
    padding: 4px 10px;
}
.boss-card-amount .copy-icon {
    margin-bottom: 0;
    align-self: center;
}

/* Valori in formular (iban, detalii) */
.boss-field-value.copy-wrap {
    font-size: 0.96rem;
    color: var(--ink);
}
.boss-field-mono .copy-text {
    font-family: var(--font-mono);
    font-size: 0.88rem;
    background: var(--paper-shade);
    padding: 3px 8px;
    border-radius: 4px;
    display: inline-block;
    letter-spacing: 0.015em;
    word-break: break-all;
}
.boss-field-mono:hover .copy-text {
    background: #fff;
}

/* Data scadenta - plain text, nu copiabil */
.boss-field-value.is-overdue {
    color: var(--accent);
    font-weight: 600;
}
.boss-field-value.is-overdue em {
    font-style: normal;
    background: var(--accent-soft);
    padding: 1px 7px;
    border-radius: 3px;
    font-size: 0.78rem;
    margin-left: 0.3rem;
    letter-spacing: 0.02em;
}
.boss-field-value.is-today {
    color: #6b4e10;
    font-weight: 600;
}
.boss-field-value.is-today em {
    font-style: normal;
    background: var(--warn-soft);
    padding: 1px 7px;
    border-radius: 3px;
    font-size: 0.78rem;
    margin-left: 0.3rem;
    letter-spacing: 0.02em;
}

.boss-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.boss-card-meta {
    font-size: 0.82rem;
    color: var(--muted);
}

/* ==========================================================================
   Butonul "Am facut plata" - principal pe fiecare card
   ========================================================================== */
.btn-done {
    display: inline-flex !important;
    align-items: center;
    gap: 0.55rem;
    padding: 0.7rem 1.35rem !important;
    background: var(--ok) !important;
    color: #fff !important;
    border: 1.5px solid var(--ok) !important;
    border-radius: 8px !important;
    font-family: inherit;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    line-height: 1.2;
    letter-spacing: 0.01em;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(45, 106, 79, 0.25);
    transition: background 0.15s, border-color 0.15s, transform 0.1s, box-shadow 0.15s;
}
.btn-done:hover {
    background: #245a42 !important;
    border-color: #245a42 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(45, 106, 79, 0.35);
}
.btn-done:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(45, 106, 79, 0.3);
}
.btn-done svg {
    flex-shrink: 0;
}

/* ==========================================================================
   Butonul "Nu am platit" (arhiva) si "Vezi istoricul"
   ========================================================================== */
.btn-undo {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.9rem;
    background: transparent;
    color: var(--muted);
    border: 1px solid var(--rule);
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}
.btn-undo:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: var(--accent-soft);
}

.btn-archive {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.2rem;
    background: #fffcf5;
    color: var(--ink-soft);
    border: 1px solid var(--rule);
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
    transition: all 0.15s;
}
.btn-archive:hover {
    color: var(--ink);
    border-color: var(--muted);
    background: #fff;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.boss-footnote {
    margin-top: 2.5rem;
    text-align: center;
}

/* ==========================================================================
   AGENDA IBAN (suppliers.php)
   ========================================================================== */
.suppliers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.2rem;
    padding: 1.5rem 1.5rem 1.75rem;
}

.supplier-card {
    background: #fffcf5;
    border: 1px solid var(--rule-soft);
    border-radius: 12px;
    padding: 1.1rem 1.2rem 1.2rem;
    transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    box-shadow:
        0 1px 2px rgba(26, 24, 20, 0.04),
        0 4px 12px -4px rgba(26, 24, 20, 0.08);
}
.supplier-card:hover {
    border-color: var(--rule);
    transform: translateY(-1px);
    box-shadow:
        0 2px 4px rgba(26, 24, 20, 0.05),
        0 8px 20px -6px rgba(26, 24, 20, 0.12);
}

.supplier-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}
.supplier-card-head h3 {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    line-height: 1.3;
    margin: 0;
    flex: 1;
    min-width: 0;
}
.supplier-card-head .copy-wrap {
    padding: 3px 7px;
    margin: -3px -7px;
}

.supplier-card-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}
.supplier-card-actions .icon-btn {
    text-decoration: none;
}

.supplier-card-desc {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 0.88rem;
    color: var(--muted);
    margin: 0;
    line-height: 1.4;
}

.supplier-card-iban {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0.55rem 0.7rem;
    background: var(--paper-shade);
    border-radius: 6px;
    border-left: 2px solid var(--rule);
}
.supplier-card-iban .copy-wrap {
    padding: 2px 4px;
    margin: -2px -4px;
}
.supplier-card-iban .copy-text.mono {
    font-size: 0.82rem;
    font-family: var(--font-mono);
    color: var(--ink-soft);
    letter-spacing: 0.015em;
    word-break: break-all;
}

.supplier-card-notes {
    font-size: 0.82rem;
    color: var(--muted);
    margin: 0;
    padding-top: 0.4rem;
    border-top: 1px dashed var(--rule-soft);
    line-height: 1.45;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 720px) {
    .topbar-inner { padding: 0.75rem 1rem; flex-wrap: wrap; }
    .topnav { gap: 0.75rem; font-size: 0.9rem; }
    .user-chip { display: none; }
    .main { padding: 1rem; }
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .list-head { flex-direction: column; align-items: stretch; }
    .search-form { width: 100%; }
    .search-form input[type="search"] { flex: 1; width: auto; }
    .payments-table thead { display: none; }
    .payments-table, .payments-table tbody, .payments-table tr, .payments-table td { display: block; width: 100%; }
    .payments-table tr { padding: 0.9rem 1rem; border-bottom: 1px solid var(--rule-soft); }
    .payments-table td {
        padding: 0.2rem 0;
        border: 0;
    }
    .payments-table td.col-status-wide { width: auto; margin-bottom: 0.7rem; }
    .status-btn { width: 100%; justify-content: center; padding: 0.6rem; font-size: 0.9rem; }
    .payments-table td.col-actions { text-align: right; margin-top: 0.5rem; position: absolute; right: 1rem; top: 0.9rem; width: auto; }
    .payments-table tr { position: relative; }
    .col-amount { text-align: left; font-size: 1.1rem; margin: 0.25rem 0; }
    .col-date { width: auto; display: inline-block; margin-right: 1rem; }
    .supplier-iban .mono { font-size: 0.72rem; word-break: break-all; }
    .form-actions { flex-direction: column-reverse; align-items: stretch; }
    .form-actions .btn { width: 100%; justify-content: center; }
    .kbd-hint { text-align: center; }

    /* --- Boss view responsive --- */
    .boss-main { padding-top: 1rem; }
    .boss-summary-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        padding: 1.25rem 1.25rem;
    }
    .summary-totals { text-align: left; }
    .summary-count { font-size: 2.4rem; }
    .summary-amount { font-size: 1.3rem; }

    .boss-card { padding: 1.15rem 1.1rem 1rem; border-radius: 12px; }
    .boss-card-head {
        flex-direction: column;
        align-items: stretch;
        gap: 0.6rem;
        margin-bottom: 0.8rem;
    }
    .boss-card-supplier { width: 100%; }
    .boss-card-supplier h3 { font-size: 1.15rem; }

    /* Pe mobile, butonul de copy pentru numele furnizorului ocupa toata latimea
       cardului, cu iconita la dreapta, ca numele sa nu cada pe mai multe randuri */
    .boss-card-supplier .copy-wrap,
    .boss-card-amount .copy-wrap {
        display: flex;
        width: 100%;
        justify-content: space-between;
        align-items: center;
        padding: 6px 10px;
        margin-left: -10px;
        margin-right: -10px;
        box-sizing: border-box;
    }
    .boss-card-supplier .copy-text,
    .boss-card-amount .copy-wrap .amount-big {
        flex: 1;
        min-width: 0;
    }
    .boss-card-supplier .copy-icon,
    .boss-card-amount .copy-icon {
        flex-shrink: 0;
        margin-left: 0.5rem;
        margin-top: 0;
    }
    .amount-big { font-size: 1.6rem; }
    .boss-card-amount { text-align: left; width: 100%; }

    .boss-field {
        grid-template-columns: 1fr;
        gap: 0.25rem;
        align-items: flex-start;
    }
    .boss-field-label { margin-bottom: 0.1rem; }
    .boss-field-mono .copy-text {
        font-size: 0.8rem;
        padding: 4px 7px;
        word-break: break-all;
    }
    .copy-wrap { padding: 6px 8px; margin: -6px -8px; }

    .boss-card-foot {
        flex-direction: column;
        align-items: stretch;
        gap: 0.7rem;
    }
    .btn-done {
        width: 100%;
        justify-content: center;
        padding: 0.85rem !important;
        font-size: 1rem !important;
    }
    .btn-archive { width: 100%; justify-content: center; }
    .boss-zero { padding: 2.5rem 1.25rem; }
    .boss-zero h2 { font-size: 1.5rem; }

    /* --- Bell --- */
    .bell-wrap { width: 34px; height: 34px; }

    /* --- Agenda suppliers --- */
    .suppliers-grid {
        grid-template-columns: 1fr;
        padding: 1rem;
        gap: 0.75rem;
    }
}
