:root {
    --bg: #0f1419;
    --sidebar: #1a2332;
    --panel: #ffffff;
    --border: #e2e8f0;
    --text: #1e293b;
    --muted: #64748b;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --danger: #dc2626;
    --success: #059669;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: var(--text);
    background: #f1f5f9;
}
body.app-shell {
    display: flex;
    min-height: 100vh;
    background: #f1f5f9;
}

.login-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a2332 0%, #0f1419 100%);
}
.login-card {
    background: var(--panel);
    padding: 2.5rem;
    border-radius: 12px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,.4);
}
.login-card h1 { margin: 0 0 .25rem; font-size: 1.5rem; }
.subtitle { color: var(--muted); margin: 0 0 1.5rem; }

.app-shell { display: flex; min-height: 100vh; }
.sidebar {
    width: 240px;
    background: var(--sidebar);
    color: #e2e8f0;
    flex-shrink: 0;
}
.sidebar-brand {
    padding: 1.25rem 1.5rem;
    font-weight: 700;
    font-size: 1.1rem;
    border-bottom: 1px solid rgba(255,255,255,.08);
    display: flex;
    align-items: center;
    gap: .75rem;
}
.sidebar-logo {
    max-height: 36px;
    max-width: 56px;
    object-fit: contain;
    background: #fff;
    border-radius: 6px;
    padding: 2px;
}
.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.user-avatar--empty {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    background: #e2e8f0;
    color: #64748b;
    font-size: 16px;
    line-height: 1;
}
.user-avatar--empty .fa {
    display: block;
    width: 1em;
    text-align: center;
    margin: 0;
}
.panel-box {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 1.25rem;
    overflow: hidden;
}
.panel-box-header {
    padding: .75rem 1rem;
    font-weight: 600;
    border-bottom: 1px solid var(--border);
    background: #f8fafc;
}
.panel-box-body { padding: 1rem; }
.user-photo-thumb {
    line-height: 0;
    cursor: zoom-in;
}
.user-photo-thumb img {
    display: block;
    transition: transform .15s ease, box-shadow .15s ease;
}
.user-photo-thumb:hover img {
    transform: scale(1.08);
    box-shadow: 0 0 0 2px #2563eb;
}
.sidebar nav { display: flex; flex-direction: column; padding: 1rem 0; }
.sidebar a {
    color: #94a3b8;
    text-decoration: none;
    padding: .65rem 1.5rem;
    font-size: .95rem;
}
.sidebar a:hover, .sidebar a.active { color: #fff; background: rgba(255,255,255,.06); }
.sidebar a.logout { margin-top: auto; color: #f87171; }

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
    background: var(--panel);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.topbar h1 { margin: 0; font-size: 1.25rem; }
.user-chip {
    display: inline-flex;
    align-items: center;
    gap: .65rem;
    text-align: right;
    font-size: .875rem;
    color: inherit;
    text-decoration: none;
    border-radius: 8px;
    padding: .25rem .35rem;
}
a.user-chip:hover {
    background: #f1f5f9;
    color: inherit;
}
.user-chip-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: .15rem;
    line-height: 1.2;
}
.user-chip-name {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    color: var(--text);
    font-weight: 500;
}
.user-chip-name .badge {
    display: inline-block;
    font-size: .65rem;
    vertical-align: middle;
}
.user-chip-partner {
    display: block;
    color: var(--muted);
    font-size: .8rem;
}
.content { padding: 1.5rem; flex: 1; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.card {
    background: var(--panel);
    border-radius: 10px;
    padding: 1.25rem;
    border: 1px solid var(--border);
}
.card-label { color: var(--muted); font-size: .85rem; display: block; }
.card-value { font-size: 2rem; display: block; margin-top: .25rem; }
.card-value-sm { font-size: 1rem; font-weight: 600; }

.panel {
    background: var(--panel);
    border-radius: 10px;
    border: 1px solid var(--border);
    padding: 1.25rem 1.5rem;
}
.panel-narrow { max-width: 520px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.panel h2 { margin: 0 0 1rem; font-size: 1.1rem; }

label { display: block; margin: .75rem 0 .35rem; font-size: .875rem; font-weight: 500; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], select {
    width: 100%;
    padding: .55rem .75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: .95rem;
}
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.checkbox { display: flex; align-items: center; gap: .5rem; font-weight: 400; }
.checkbox input { width: auto; }

.btn {
    display: inline-block;
    padding: .5rem 1rem;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text);
    text-decoration: none;
    font-size: .875rem;
    cursor: pointer;
}
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-sm { padding: .35rem .65rem; font-size: .8rem; }
.btn-danger { color: var(--danger); border-color: #fecaca; }
.inline-form { display: inline; }

.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.data-table thead { position: sticky; top: 0; background: #f8fafc; z-index: 1; }
.data-table th, .data-table td { padding: .65rem .75rem; text-align: left; border-bottom: 1px solid var(--border); }
.data-table tbody tr:hover { background: #f8fafc; }
.data-table .empty { text-align: center; color: var(--muted); }
.actions { white-space: nowrap; }
.badge {
    background: #e0e7ff;
    color: #3730a3;
    padding: .15rem .5rem;
    border-radius: 4px;
    font-size: .75rem;
}
.search-input { max-width: 260px; padding: .45rem .75rem; border: 1px solid var(--border); border-radius: 6px; }

.alert { padding: .75rem 1rem; border-radius: 6px; margin-bottom: 1rem; font-size: .875rem; }
.alert-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.hint { color: var(--muted); font-size: .8rem; margin-top: 1rem; }
.log-preview { background: #f8fafc; padding: 1rem; border-radius: 6px; font-size: .8rem; overflow-x: auto; }

@media (max-width: 768px) {
    .app-shell { flex-direction: column; }
    .sidebar { width: 100%; }
    .sidebar nav { flex-direction: row; flex-wrap: wrap; }
    .punct-form-grid { grid-template-columns: 1fr; }
    .cif-search-row { flex-direction: column; }
}

/* --- ticketcrm-like client search --- */
.cif-search-card {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
}
.cif-label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
    margin: 0 0 0.35rem;
    display: block;
}
.cif-search-row {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
}
.client-search-wrap {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
}
.cif-input {
    width: 100%;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.5rem 0.875rem;
    font-size: 0.95rem;
    background: #fff;
    transition: all 0.2s ease;
}
.cif-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
    outline: none;
}
.cif-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: none;
    border-radius: 10px;
    padding: 0.5rem 1.25rem;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.35);
}
.cif-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}
#client-suggestion-box {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    z-index: 2000;
    display: none;
}
#client-suggestion-box.is-open {
    display: block;
}
#client-suggestion-box .client-suggestion-list,
ul.client-suggestion-list {
    list-style: none !important;
    list-style-type: none !important;
    margin: 0 !important;
    padding: 0.35rem 0 !important;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
    max-height: 320px;
    overflow-y: auto;
}
#client-suggestion-box .client-suggestion-list li,
ul.client-suggestion-list li {
    list-style: none !important;
    margin: 0;
    padding: 0;
    border-bottom: 1px solid #f1f5f9;
}
#client-suggestion-box .client-suggestion-list li:last-child,
ul.client-suggestion-list li:last-child {
    border-bottom: none;
}
#client-suggestion-box .client-suggestion-list a,
ul.client-suggestion-list a {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.7rem 1rem;
    color: #334155 !important;
    text-decoration: none !important;
    font-size: 0.9rem;
    line-height: 1.35;
}
#client-suggestion-box .client-suggestion-list a:hover,
ul.client-suggestion-list a:hover {
    background: #eff6ff;
    color: #1e40af !important;
}
#client-suggestion-box .client-suggestion-list a .sug-name,
ul.client-suggestion-list a .sug-name {
    font-weight: 700;
    color: #0f172a;
}
#client-suggestion-box .client-suggestion-list a:hover .sug-name,
ul.client-suggestion-list a:hover .sug-name {
    color: #1e40af;
}
#client-suggestion-box .client-suggestion-list a .sug-meta,
ul.client-suggestion-list a .sug-meta {
    font-size: 0.8rem;
    font-weight: 500;
    color: #64748b;
}
#client-suggestion-box .client-suggestion-list a[data-action="add-new"],
ul.client-suggestion-list a[data-action="add-new"] {
    color: #2563eb !important;
    font-weight: 600;
    flex-direction: row;
    align-items: center;
}
#client-suggestion-box .client-suggestion-hint,
ul.client-suggestion-list .client-suggestion-hint {
    padding: 0.75rem 1rem;
    color: #64748b;
    font-size: 0.85rem;
}

/* --- ticketcrm-like client card + puncte --- */
.client-card {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.25rem;
}
.client-card-title {
    font-weight: 700;
    color: #1e40af;
    font-size: 1.1rem;
    margin: 0 0 0.35rem;
}
.client-card-cif {
    font-weight: 700;
    color: #2563eb;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}
.client-card-text {
    color: #475569;
    font-size: 0.9rem;
    margin: 0.15rem 0;
}
.btn-punct-lucru {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    border: none;
    border-radius: 10px;
    padding: 0.5rem 1.25rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: #fff;
    text-decoration: none;
    display: inline-block;
    margin-top: 0.75rem;
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.35);
}
.btn-punct-lucru:hover {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #fff;
}

.puncte-section-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
    margin: 0 0 0.65rem;
}
.puncte-table-shell {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 6px 28px rgba(54, 48, 74, 0.14);
    background: #fff;
}
.puncte-empty {
    padding: 1.5rem;
    color: #64748b;
    font-size: 0.875rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}
.puncte-table {
    width: 100%;
    border-collapse: collapse;
    border: none;
    margin: 0;
    background: #fff;
}
.puncte-table th,
.puncte-table td {
    border: none;
    padding: 1rem 1.35rem;
    vertical-align: middle;
    text-align: left;
}
.puncte-table thead th {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #fff;
    background: #36304a;
    padding-top: 1.15rem;
    padding-bottom: 1.15rem;
}
.puncte-table tbody td {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.45;
}
.puncte-table tbody tr:nth-child(even) { background: #f8f6ff; }
.puncte-table tbody tr:nth-child(odd) { background: #fff; }
.puncte-table tbody tr:hover { background: #efecf7; }
.puncte-actions-cell {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
/* Bootstrap-like icon buttons — 1:1 ticketcrm */
.btn.btn-sm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.5rem;
    min-width: 32px;
    height: 31px;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    background: #fff;
    border: 1px solid #ced4da;
    color: #212529;
    box-sizing: border-box;
}
.btn.btn-sm:hover { filter: brightness(0.98); }
.btn-outline-primary { color: #0d6efd; border-color: #0d6efd; }
.btn-outline-primary:hover { background: #0d6efd; color: #fff; }
.btn-outline-secondary { color: #6c757d; border-color: #6c757d; }
.btn-outline-secondary:hover { background: #6c757d; color: #fff; }
.btn-outline-info { color: #0dcaf0; border-color: #0dcaf0; }
.btn-outline-info:hover { background: #0dcaf0; color: #fff; }
.btn-outline-success { color: #198754; border-color: #198754; }
.btn-outline-success:hover { background: #198754; color: #fff; }
.btn-outline-danger { color: #dc3545; border-color: #dc3545; }
.btn-outline-danger:hover { background: #dc3545; color: #fff; }
.btn-warning {
    background: #ffc107;
    border: 1px solid #ffc107;
    color: #212529;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    cursor: pointer;
}
.btn-warning:hover { filter: brightness(0.95); }
.btn-warning:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-danger {
    background: #dc3545;
    border: 1px solid #dc3545;
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    cursor: pointer;
}
.btn-danger:hover { filter: brightness(0.95); color: #fff; }
.btn-danger:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-punct-edit, .btn-punct-view, .btn-punct-copy, .btn-punct-abo-add, .btn-punct-abo-extend,
.btn-punct-soft-toggle, .btn-punct-punct-toggle, .btn-punct-message {
    padding: 0.35rem 0.5rem;
    min-width: 32px;
    white-space: nowrap;
}
.btn-toggle-on {
    background: #22c55e !important;
    border-color: #22c55e !important;
    color: #fff !important;
}
.btn-toggle-on:hover {
    background: #16a34a !important;
    border-color: #16a34a !important;
    color: #fff !important;
}
.btn-toggle-off {
    background: #ef4444 !important;
    border-color: #ef4444 !important;
    color: #fff !important;
}
.btn-toggle-off:hover {
    background: #dc2626 !important;
    border-color: #dc2626 !important;
    color: #fff !important;
}
.suspend-soft-item,
.reactivate-soft-item {
    cursor: pointer;
}
.suspend-soft-item.active {
    background: #fee2e2;
    border-color: #dc3545;
    color: #991b1b;
}
.reactivate-soft-item.active {
    background: #dcfce7;
    border-color: #198754;
    color: #166534;
}
.btn-success {
    background: #198754;
    border: 1px solid #198754;
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    cursor: pointer;
}
.btn-success:hover { filter: brightness(0.95); color: #fff; }
.btn-success:disabled { opacity: 0.55; cursor: not-allowed; }
#modalPunctMesaj .modal-header.bg-dark {
    background: #212529 !important;
}
.btn-abo-label {
    font-size: 0.95rem;
    padding: 0.35rem 0.5rem;
    min-width: 32px;
    border: none;
    border-radius: 6px;
    white-space: nowrap;
    color: #fff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.btn-abo-label.btn-abo-ok { background: #22c55e; color: #fff; }
.btn-abo-label.btn-abo-bad { background: #ef4444; color: #fff; }
.btn-abo-label:hover { filter: brightness(0.93); color: #fff; }
.btn.btn-sm.is-disabled,
.btn-abo-label.is-disabled {
    opacity: 0.4;
    pointer-events: none;
}
.punct-guid {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.78rem;
    color: #334155;
    background: #f1f5f9;
    padding: 0.2rem 0.45rem;
    border-radius: 4px;
    letter-spacing: 0.02em;
}
.punct-guid-empty { color: #94a3b8; font-size: 0.8rem; }

.punct-form-grid {
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: 1.25rem;
}
.row-3 {
    display: grid;
    grid-template-columns: 1.2fr 1fr 0.8fr;
    gap: 0.75rem;
}
.punct-field-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
    margin: 0.65rem 0 0.3rem;
    display: block;
}
.punct-add-panel .form-control,
.punct-add-panel textarea.form-control {
    width: 100%;
    padding: 0.45rem 0.65rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.9rem;
}
.punct-add-header {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e2e8f0;
}
.punct-add-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}
.text-end { text-align: right; }
.text-muted { color: #94a3b8; font-size: 0.8rem; }

#modalPunctView .modal-content,
#modalAbonamentPunct .modal-content {
    border: none;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 20px 40px -12px rgba(15, 23, 42, 0.22);
}
#modalPunctView .modal-header,
#modalAbonamentPunct .modal-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #f8fafc;
    border: none;
}
#modalPunctView .btn-close,
#modalAbonamentPunct .btn-close { filter: invert(1); opacity: 0.75; }
#modalPunctView .modal-body { background: #f8fafc; }
.punct-view-sec-title {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 0.4rem;
}
.punct-view-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.65rem 0.75rem;
    border-left: 3px solid #2563eb;
}
.punct-view-card--punct { border-left-color: #7c3aed; }
.punct-view-table th {
    width: 38%;
    color: #64748b;
    font-weight: 500;
    font-size: 0.8rem;
    padding: 0.28rem 0.4rem 0.28rem 0;
    vertical-align: top;
}
.punct-view-table td {
    font-size: 0.85rem;
    padding: 0.28rem 0;
    color: #0f172a;
    word-break: break-word;
}
.punct-view-guid-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}
.punct-view-guid-wrap code {
    background: #f1f5f9;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
}
@media (max-width: 900px) {
    .punct-form-grid, .row-3 { grid-template-columns: 1fr; }
}

/* Flatpickr — afișare zz.ll.aaaa */
.flatpickr-input[readonly],
input.js-datepicker,
.flatpickr-input.form-control,
.flatpickr-input.input {
    background: #fff;
}
.flatpickr-calendar {
    font-family: inherit;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

/* Abonamente — filtre + tabel modern */
.abo-filters-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto auto;
    gap: 0.75rem;
    align-items: end;
}
.abo-filters-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}
.abo-filters-check {
    display: flex;
    align-items: center;
    padding-bottom: 0.35rem;
}
.abo-check-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    cursor: pointer;
    font-size: 0.92rem;
    font-weight: 600;
    color: #334155;
    user-select: none;
    white-space: nowrap;
}
.abo-check-label input {
    width: 1.05rem;
    height: 1.05rem;
    accent-color: #0f766e;
    cursor: pointer;
}
.abo-filters .form-select,
.abo-filters .form-control {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    font-size: 0.95rem;
}

.abo-section {
    margin-top: 1.35rem;
}
.abo-section-head {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.7rem;
}
.abo-section-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.01em;
}
.abo-section-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.6rem;
    height: 1.6rem;
    padding: 0 0.45rem;
    border-radius: 999px;
    background: #e2e8f0;
    color: #334155;
    font-size: 0.78rem;
    font-weight: 700;
}
.abo-empty {
    padding: 1.25rem 1.1rem;
    border: 1px dashed #cbd5e1;
    border-radius: 14px;
    background: #f8fafc;
    color: #64748b;
    font-size: 0.95rem;
}

.abo-table-shell {
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.04);
}
.abo-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}
.abo-table thead th {
    padding: 0.85rem 1rem;
    text-align: left;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}
.abo-table tbody td {
    padding: 0.95rem 1rem;
    font-size: 0.94rem;
    color: #0f172a;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}
.abo-table tbody tr:last-child td {
    border-bottom: none;
}
.abo-table tbody tr:nth-child(odd) td {
    background: #ffffff;
}
.abo-table tbody tr:nth-child(even) td {
    background: #f8fafc;
}
.abo-table tbody tr:hover td {
    background: #eef2ff;
}
.abo-cell-client {
    font-weight: 650;
}
.abo-cell-muted {
    color: #64748b !important;
}
.abo-cell-date {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    white-space: nowrap;
}
.abo-col-actions {
    width: 1%;
    white-space: nowrap;
    text-align: right;
}
.abo-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.22rem 0.55rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    background: #e2e8f0;
    color: #334155;
    white-space: nowrap;
}
.abo-btn-extend {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.75rem;
    border: 1px solid #99f6e4;
    border-radius: 999px;
    background: #f0fdfa;
    color: #0f766e;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.abo-btn-extend:hover {
    background: #ccfbf1;
    border-color: #5eead4;
    transform: translateY(-1px);
}
.abo-actions-row {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.abo-hide-form { display: inline; margin: 0; }
.abo-btn-hide {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.75rem;
    border: 1px solid #fecaca;
    background: #fff;
    color: #b91c1c;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    cursor: pointer;
}
.abo-btn-hide:hover {
    background: #fee2e2;
    border-color: #f87171;
}

/* Urgenta: accent stanga + badge, pastreaza zebra */
.abo-table tbody tr.abo-urg-red td:first-child {
    box-shadow: inset 3px 0 0 #ef4444;
}
.abo-table tbody tr.abo-urg-red .abo-badge {
    background: #fee2e2;
    color: #b91c1c;
}
.abo-table tbody tr.abo-urg-blue td:first-child {
    box-shadow: inset 3px 0 0 #3b82f6;
}
.abo-table tbody tr.abo-urg-blue .abo-badge {
    background: #dbeafe;
    color: #1d4ed8;
}
.abo-table tbody tr.abo-urg-green td:first-child {
    box-shadow: inset 3px 0 0 #10b981;
}
.abo-table tbody tr.abo-urg-green .abo-badge {
    background: #d1fae5;
    color: #047857;
}
.abo-table tbody tr.abo-urg-expired td {
    color: #64748b;
}
.abo-table tbody tr.abo-urg-expired td:first-child {
    box-shadow: inset 3px 0 0 #94a3b8;
}
.abo-table tbody tr.abo-urg-expired .abo-cell-client {
    font-weight: 500;
}

@media (max-width: 900px) {
    .abo-filters-grid { grid-template-columns: 1fr; }
    .abo-btn-extend span,
    .abo-btn-hide span { display: none; }
}
.table-softuri {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}
.table-softuri th {
    background: #36304a;
    color: #fff;
    text-align: left;
    padding: 0.65rem 0.75rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.table-softuri td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid #f1f5f9;
}
.table-softuri tbody tr:nth-child(even) { background: #f8f6ff; }
.softuri-shell {
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    max-height: 420px;
    overflow-y: auto;
}
.mb-1 { margin-bottom: 1rem; }
.mt-1 { margin-top: 1rem; }
.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Partner dashboard (inspirat ticketcrm) */
.pdash { display: flex; flex-direction: column; gap: 0.85rem; }
.pdash-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    flex-wrap: wrap;
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 50%, #2563eb 100%);
    color: #fff;
    border-radius: 14px;
    padding: 1.1rem 1.25rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}
.pdash-hello {
    margin: 0 0 0.2rem;
    font-size: 0.82rem;
    opacity: 0.85;
}
.pdash-hero-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
}
.pdash-hero-sub {
    margin: 0.25rem 0 0;
    font-size: 0.8rem;
    opacity: 0.8;
}
.pdash-hero-actions {
    display: flex;
    gap: 0.55rem;
    flex-wrap: wrap;
    align-items: center;
}
.pdash-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 0.95rem;
    border-radius: 999px;
    font-size: 0.86rem;
    font-weight: 700;
    line-height: 1.1;
    text-decoration: none !important;
    border: 0;
    color: #fff !important;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.18);
    transition: transform 0.12s ease, filter 0.12s ease, box-shadow 0.12s ease;
    white-space: nowrap;
}
.pdash-btn i { font-size: 0.95rem; }
.pdash-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
    color: #fff !important;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.22);
}
.pdash-btn-emerald {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
}
.pdash-btn-amber {
    background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
}
.pdash-btn-sky {
    background: linear-gradient(135deg, #0284c7 0%, #38bdf8 100%);
}

.pdash-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
}
.pdash-kpi {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.85rem 1rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
.pdash-kpi.accent-primary { border-left: 3px solid #2563eb; }
.pdash-kpi.accent-success { border-left: 3px solid #16a34a; }
.pdash-kpi.accent-warning { border-left: 3px solid #d97706; }
.pdash-kpi.accent-info { border-left: 3px solid #0891b2; }
.pdash-kpi-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    font-weight: 700;
}
.pdash-kpi-value {
    font-size: 1.55rem;
    font-weight: 750;
    color: #0f172a;
    line-height: 1.1;
}
.pdash-kpi-sub {
    font-size: 0.78rem;
    color: #64748b;
}
.pdash-kpi-sub a { color: #2563eb; text-decoration: none; font-weight: 600; }

.pdash-row { display: grid; gap: 0.85rem; }
.pdash-row-2 { grid-template-columns: 1fr 1fr; }

.pdash-section {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    overflow: hidden;
}
.pdash-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding: 0.8rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    background: #f8fafc;
}
.pdash-section-header h2 {
    margin: 0;
    font-size: 0.98rem;
    font-weight: 700;
    color: #0f172a;
}
.pdash-section-body { padding: 0.9rem 1rem 1rem; }
.pdash-mini-row {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}
.pdash-mini-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: #e2e8f0;
    color: #334155;
    font-size: 0.72rem;
    font-weight: 700;
}
.pdash-mini-pill.success {
    background: #dcfce7;
    color: #166534;
}

.pdash-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.55rem;
    margin-bottom: 0.85rem;
}
.pdash-mini-stat {
    background: #f8fafc;
    border: 1px solid #eef2f7;
    border-radius: 10px;
    padding: 0.55rem 0.65rem;
    min-height: 64px;
}
.pdash-mini-stat .val {
    display: block;
    font-size: 1.05rem;
    font-weight: 750;
    color: #0f172a;
    line-height: 1.2;
}
.pdash-mini-stat .lbl {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.72rem;
    color: #64748b;
    font-weight: 600;
}
.pdash-chart-wrap {
    position: relative;
    height: 240px;
}
.pdash-chart-lg { height: 280px; }

@media (max-width: 1100px) {
    .pdash-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pdash-row-2 { grid-template-columns: 1fr; }
    .pdash-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .pdash-kpi-grid { grid-template-columns: 1fr; }
}
