/* ===================================================
 * THEME.CSS - Aspect actualizat (noiembrie 2026)
 * ===================================================
 * Se aplică PESTE stilurile existente ale fiecărei pagini, fără să schimbe
 * structura, meniul sau așezarea elementelor. Doar culori, fonturi, colțuri,
 * umbre și spațiere.
 *
 * Selectoarele încep cu "html body" ca să aibă prioritate față de stilurile
 * definite în <style> în fiecare pagină (care vin după acest fișier).
 * Pentru a reveni la aspectul vechi: scoateți linia cu theme.css din includes/header.php.
 */

:root {
    /* Brand: același portocaliu, puțin mai cald și mai calm */
    --t-brand: #E67E22;
    --t-brand-dark: #C8691A;
    --t-brand-soft: #FDF1E6;
    --t-brand-text: #A4520F;

    /* Neutre */
    --t-page: #F5F4F1;
    --t-surface: #FFFFFF;
    --t-surface-alt: #FAF9F7;
    --t-border: #E7E4DE;
    --t-border-strong: #D6D2CA;
    --t-text: #24262B;
    --t-text-2: #5C6068;
    --t-text-3: #8B8F96;

    /* Statusuri */
    --t-success: #2E9E5B;  --t-success-dark: #23804A;  --t-success-soft: #E7F5EC;  --t-success-text: #1D6B3E;
    --t-info: #2F7FC8;     --t-info-dark: #2468A6;     --t-info-soft: #E8F1FA;     --t-info-text: #1F5A8F;
    --t-warning: #E3A21A;  --t-warning-dark: #C38812;  --t-warning-soft: #FDF4DF;  --t-warning-text: #85590A;
    --t-danger: #D64545;   --t-danger-dark: #B83838;   --t-danger-soft: #FCEBEB;   --t-danger-text: #9A2E2E;
    --t-neutral-soft: #F0EEEA; --t-neutral-text: #4B4F56;

    --t-radius-sm: 6px;
    --t-radius: 10px;
    --t-radius-lg: 14px;
    --t-shadow-sm: 0 1px 2px rgba(30, 28, 24, 0.05);
    --t-shadow: 0 1px 3px rgba(30, 28, 24, 0.06), 0 4px 12px rgba(30, 28, 24, 0.04);
    --t-shadow-lg: 0 12px 32px rgba(30, 28, 24, 0.14);
    --t-font: 'Inter', 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;

    /* Variabilele vechi din global.css, aliniate la noua paletă */
    --primary-color: var(--t-brand);
    --primary-dark: var(--t-brand-dark);
    --secondary-color: var(--t-text);
    --success-color: var(--t-success);
    --info-color: var(--t-info);
    --warning-color: var(--t-warning);
    --danger-color: var(--t-danger);
    --bg-gradient: var(--t-page);
}

/* ---------- Bază ---------- */
html body {
    font-family: var(--t-font);
    background: var(--t-page);
    background-attachment: initial;
    color: var(--t-text);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

html body input,
html body select,
html body textarea,
html body button {
    font-family: inherit;
}

html body h1, html body h2, html body h3, html body h4 {
    color: var(--t-text);
    letter-spacing: -0.01em;
}

html body a { color: var(--t-brand-dark); }
html body a.btn, html body .nav-item, html body .dropdown-item,
html body .mobile-nav-item { color: inherit; }

/* ---------- Bara de sus (aceeași structură, fundal alb) ---------- */
html body .main-header {
    background: var(--t-surface);
    border-bottom: 1px solid var(--t-border);
    box-shadow: var(--t-shadow-sm);
    height: 72px;
}

html body .header-brand { color: var(--t-text); }

html body .brand-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--t-radius);
    background: var(--t-brand);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

html body .brand-text h1 {
    color: var(--t-text);
    font-size: 16px;
    font-weight: 700;
}

html body .brand-subtitle {
    color: var(--t-text-3);
    opacity: 1;
    font-size: 12px;
}

html body .nav-item {
    color: var(--t-text-2);
    border-radius: var(--t-radius);
    padding: 8px 14px;
    min-width: 76px;
    transition: background-color .15s ease, color .15s ease;
}

html body .nav-item:hover {
    background: var(--t-neutral-soft);
    color: var(--t-text);
    transform: none;
}

html body .nav-item.active {
    background: var(--t-brand-soft);
    color: var(--t-brand-text);
    box-shadow: inset 0 -2px 0 var(--t-brand);
}

html body .nav-item i { font-size: 17px; }
html body .nav-item span { font-size: 12px; font-weight: 600; }

html body .nav-badge {
    background: var(--t-danger);
    color: #fff;
    border: 2px solid var(--t-surface);
    box-shadow: none;
}
html body .nav-badge.payment-badge { background: var(--t-warning); }

html body .user-avatar {
    background: var(--t-brand-soft);
    color: var(--t-brand-text);
    box-shadow: none;
}
html body .user-name { color: var(--t-text); }
html body .user-role { color: var(--t-text-3); opacity: 1; }

html body .user-role-badge {
    background: var(--t-neutral-soft);
    color: var(--t-neutral-text);
    font-size: 10px;
    letter-spacing: .02em;
}
html body .user-role-badge.role-admin { background: var(--t-danger-soft); color: var(--t-danger-text); }
html body .user-role-badge.role-manager { background: var(--t-warning-soft); color: var(--t-warning-text); }
html body .user-role-badge.role-operator { background: var(--t-info-soft); color: var(--t-info-text); }

html body .user-menu-toggle {
    color: var(--t-text-2);
    background: transparent;
    border: 1px solid var(--t-border);
}
html body .user-menu-toggle:hover { background: var(--t-neutral-soft); }

html body .user-dropdown {
    background: var(--t-surface);
    border: 1px solid var(--t-border);
    border-radius: var(--t-radius);
    box-shadow: var(--t-shadow-lg);
}
html body .dropdown-item { color: var(--t-text); }
html body .dropdown-item:hover { background: var(--t-surface-alt); }
html body .dropdown-item.text-danger { color: var(--t-danger); }

html body .mobile-menu-toggle span { background: var(--t-text); }
html body .mobile-nav {
    background: var(--t-surface);
    border-bottom: 1px solid var(--t-border);
    box-shadow: var(--t-shadow);
}
html body .mobile-nav-item { color: var(--t-text); }
html body .mobile-nav-item.active { background: var(--t-brand-soft); color: var(--t-brand-text); }

html body .permission-notice {
    border-radius: var(--t-radius);
    margin: 12px auto;
    max-width: 1400px;
}

/* ---------- Containere, carduri, antete de pagină ---------- */
html body .header,
html body .page-header,
html body .card,
html body .section,
html body .filters,
html body .table-container,
html body .stat-card,
html body .info-card,
html body .content-card,
html body .settings-section,
html body .tab-content {
    background: var(--t-surface);
    border: 1px solid var(--t-border);
    border-radius: var(--t-radius-lg);
    box-shadow: var(--t-shadow);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

html body .header h1,
html body .page-header h1 {
    color: var(--t-text);
    font-weight: 700;
}

html body .header h1 i,
html body .page-header h1 i,
html body .section-title i {
    color: var(--t-brand);
}

html body .section-title { color: var(--t-text); }

html body .back-link { color: var(--t-brand-dark); }
html body .back-link:hover { color: var(--t-brand-text); }

/* ---------- Statistici ---------- */
html body .stat-card:hover { transform: none; box-shadow: var(--t-shadow); }
html body .stat-value,
html body .stat-number { color: var(--t-text); font-weight: 700; }
html body .stat-label { color: var(--t-text-2); letter-spacing: .02em; }

/* ---------- Butoane: culori plate, fără gradient și fără "săritură" ---------- */
html body .btn {
    border-radius: var(--t-radius);
    font-weight: 600;
    font-size: 13.5px;
    box-shadow: var(--t-shadow-sm);
    border: 1px solid transparent;
    transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
    line-height: 1.3;
}

html body .btn:hover {
    transform: none;
    box-shadow: 0 2px 6px rgba(30, 28, 24, 0.12);
}

html body .btn:active { transform: translateY(1px); }

html body .btn-primary { background: var(--t-brand); color: #fff; }
html body .btn-primary:hover { background: var(--t-brand-dark); color: #fff; }
html body .btn-success { background: var(--t-success); color: #fff; }
html body .btn-success:hover { background: var(--t-success-dark); color: #fff; }
html body .btn-info { background: var(--t-info); color: #fff; }
html body .btn-info:hover { background: var(--t-info-dark); color: #fff; }
html body .btn-warning { background: var(--t-warning); color: #fff; }
html body .btn-warning:hover { background: var(--t-warning-dark); color: #fff; }
html body .btn-danger { background: var(--t-danger); color: #fff; }
html body .btn-danger:hover { background: var(--t-danger-dark); color: #fff; }
html body .btn-secondary {
    background: var(--t-surface);
    color: var(--t-text);
    border-color: var(--t-border-strong);
}
html body .btn-secondary:hover { background: var(--t-surface-alt); color: var(--t-text); }

html body .btn-outline-primary { background: transparent; border: 1px solid var(--t-brand); color: var(--t-brand-dark); }
html body .btn-outline-secondary { background: transparent; border: 1px solid var(--t-border-strong); color: var(--t-text-2); }

html body .btn-sm { border-radius: var(--t-radius-sm); font-size: 12.5px; }

/* ---------- Formulare ---------- */
html body .form-group label,
html body .form-label {
    color: var(--t-text);
    font-weight: 600;
    font-size: 13px;
}

html body .form-control,
html body .form-group input:not([type=checkbox]):not([type=radio]),
html body .form-group select,
html body .form-group textarea,
html body .filters input:not([type=checkbox]):not([type=radio]),
html body .filters select,
html body .modal input:not([type=checkbox]):not([type=radio]):not([type=file]),
html body .modal select,
html body .modal textarea {
    background: var(--t-surface);
    border: 1px solid var(--t-border-strong);
    border-radius: var(--t-radius);
    color: var(--t-text);
    font-size: 14px;
    transition: border-color .15s ease, box-shadow .15s ease;
}

html body .form-control:focus,
html body .form-group input:focus,
html body .form-group select:focus,
html body .form-group textarea:focus,
html body .filters input:focus,
html body .filters select:focus,
html body .modal input:focus,
html body .modal select:focus,
html body .modal textarea:focus {
    outline: none;
    border-color: var(--t-brand);
    box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.18);
}

html body ::placeholder { color: var(--t-text-3); }

/* ---------- Tabele ---------- */
html body .table,
html body table.data-table {
    background: var(--t-surface);
    border-collapse: separate;
    border-spacing: 0;
}

html body .table th,
html body .table thead th,
html body .table-container th {
    background: var(--t-surface-alt);
    color: var(--t-text-2);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    border-bottom: 1px solid var(--t-border);
}

html body .table td,
html body .table-container td {
    border-bottom: 1px solid var(--t-border);
    color: var(--t-text);
}

html body .table tbody tr:hover,
html body .table tr:hover,
html body .table-container tbody tr:hover {
    background: #FBF8F4;
}

/* ---------- Etichete de status: fundal deschis, text închis ---------- */
html body .status-badge,
html body .badge,
html body .business-type-badge {
    border-radius: 999px;
    font-weight: 600;
    font-size: 11.5px;
    letter-spacing: .01em;
    box-shadow: none;
    text-transform: none;
}

html body .status-active,
html body .status-confirmed,
html body .status-completed,
html body .status-paid,
html body .status-printed,
html body .payment-paid,
html body .badge-success { background: var(--t-success-soft); color: var(--t-success-text); }

html body .status-pending,
html body .status-draft,
html body .status-pending_approval,
html body .payment-pending,
html body .payment-partial,
html body .badge-warning { background: var(--t-warning-soft); color: var(--t-warning-text); }

html body .status-cancelled,
html body .status-failed,
html body .status-expired,
html body .badge-danger { background: var(--t-danger-soft); color: var(--t-danger-text); }

html body .status-inactive,
html body .status-suspended,
html body .badge-secondary { background: var(--t-neutral-soft); color: var(--t-neutral-text); }

html body .status-sent,
html body .badge-info { background: var(--t-info-soft); color: var(--t-info-text); }

html body .badge-primary { background: var(--t-brand-soft); color: var(--t-brand-text); }

html body .type-pfa,
html body .type-srl,
html body .type-ii,
html body .type-persoana_fizica,
html body .type-intreprindere_familiala {
    background: var(--t-neutral-soft);
    color: var(--t-neutral-text);
}

/* ---------- Mesaje / alerte ---------- */
html body .alert {
    border-radius: var(--t-radius);
    border: 1px solid transparent;
    box-shadow: none;
}
html body .alert-success { background: var(--t-success-soft); border-color: #CDE9D6; color: var(--t-success-text); }
html body .alert-info { background: var(--t-info-soft); border-color: #CFE0F3; color: var(--t-info-text); }
html body .alert-warning { background: var(--t-warning-soft); border-color: #F5E2B0; color: var(--t-warning-text); }
html body .alert-danger,
html body .alert-error { background: var(--t-danger-soft); border-color: #F3CACA; color: var(--t-danger-text); }

/* ---------- Ferestre modale ---------- */
html body .modal { background: rgba(28, 26, 22, 0.45); }
html body .modal-content {
    border-radius: var(--t-radius-lg);
    border: 1px solid var(--t-border);
    box-shadow: var(--t-shadow-lg);
}
html body .modal-header {
    background: var(--t-surface);
    color: var(--t-text);
    border-bottom: 1px solid var(--t-border);
}
html body .modal-header h2,
html body .modal-header h3 { color: var(--t-text); }
html body .close-modal,
html body .modal-header .close { color: var(--t-text-3); }
html body .close-modal:hover { color: var(--t-text); background: var(--t-neutral-soft); }

/* ---------- Taburi ---------- */
html body .tab-button {
    border-radius: var(--t-radius);
    color: var(--t-text-2);
    font-weight: 600;
}
html body .tab-button.active {
    background: var(--t-brand);
    color: #fff;
    box-shadow: var(--t-shadow-sm);
}

/* ---------- Stare goală ---------- */
html body .empty-state { color: var(--t-text-2); }
html body .empty-state i { color: var(--t-border-strong); }

/* ---------- Subsol simplificat ---------- */
html body .main-footer {
    background: transparent;
    color: var(--t-text-3);
    border-top: 1px solid var(--t-border);
    box-shadow: none;
    margin-top: 32px;
}
html body .footer-slim {
    max-width: 1400px;
    margin: 0 auto;
    padding: 16px 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    justify-content: space-between;
    align-items: center;
    font-size: 12.5px;
}
html body .footer-slim strong { color: var(--t-text-2); font-weight: 600; }
html body .footer-slim .footer-stats-inline span + span::before {
    content: "·";
    margin: 0 8px;
    color: var(--t-border-strong);
}

/* ---------- Bara de derulare discretă ---------- */
html body ::-webkit-scrollbar { width: 10px; height: 10px; }
html body ::-webkit-scrollbar-thumb { background: #D9D5CD; border-radius: 10px; border: 2px solid var(--t-page); }
html body ::-webkit-scrollbar-track { background: transparent; }

/* ---------- Mobil ---------- */
@media (max-width: 768px) {
    html body { font-size: 15px; }
    html body .header,
    html body .page-header { border-radius: var(--t-radius); }
}

html body .user-role { text-transform: none; letter-spacing: 0; }

/* ---------- Bara de titlu a paginilor (ex. Rezervări) ---------- */
html body .header-nav {
    background: var(--t-surface);
    color: var(--t-text);
    border-bottom: 1px solid var(--t-border);
    box-shadow: var(--t-shadow-sm);
}
html body .header-nav h1 { color: var(--t-text); font-weight: 700; }
html body .header-nav h1 i { color: var(--t-brand); }

/* ---------- Selector de dată și taburi spații ---------- */
html body .date-selector {
    background: var(--t-surface);
    border: 1px solid var(--t-border);
    border-radius: var(--t-radius-lg);
    box-shadow: var(--t-shadow);
    backdrop-filter: none;
}
html body .date-controls input[type="date"] {
    border: 1px solid var(--t-border-strong);
    border-radius: var(--t-radius);
}
html body .tab-navigation {
    background: var(--t-surface);
    border: 1px solid var(--t-border);
    border-radius: var(--t-radius-lg);
    box-shadow: var(--t-shadow);
    backdrop-filter: none;
}
html body .tab-nav {
    background: var(--t-surface-alt);
    border-bottom: 1px solid var(--t-border);
}
html body .tab-nav .tab-button { color: var(--t-text-2); border-radius: 0; }
html body .tab-nav .tab-button:hover { background: var(--t-neutral-soft); color: var(--t-text); transform: none; }
html body .tab-nav .tab-button.active {
    background: var(--t-surface);
    color: var(--t-brand-text);
    box-shadow: inset 0 -3px 0 var(--t-brand);
}
html body .tab-nav .tab-button.active::after { display: none; }
html body .tab-navigation + .tab-content,
html body .tab-navigation .tab-content { border: none; box-shadow: none; border-radius: 0 0 var(--t-radius-lg) var(--t-radius-lg); }

/* ---------- Carduri statistice colorate inline -> carduri albe cu cifra colorată ---------- */
html body .stat-card[style*="gradient"] {
    background: var(--t-surface) !important;
    color: var(--t-text) !important;
}
html body .stat-card[style*="#27ae60"] .stat-value,
html body .stat-card[style*="#27ae60"] .stat-number { color: var(--t-success-text); }
html body .stat-card[style*="#3498db"] .stat-value,
html body .stat-card[style*="#3498db"] .stat-number { color: var(--t-info-text); }
html body .stat-card[style*="#9b59b6"] .stat-value,
html body .stat-card[style*="#9b59b6"] .stat-number { color: #6E4A9E; }
html body .stat-card[style*="#e74c3c"] .stat-value,
html body .stat-card[style*="#e74c3c"] .stat-number { color: var(--t-danger-text); }
html body .stat-card[style*="#f39c12"] .stat-value,
html body .stat-card[style*="#e67e22"] .stat-value { color: var(--t-brand-text); }

/* ---------- Ajustări telefon ---------- */
@media (max-width: 768px) {
    html body .header,
    html body .page-header,
    html body .header-nav { flex-wrap: wrap; gap: 12px; }
    html body .header h1,
    html body .page-header h1,
    html body .header-nav h1 { font-size: 20px; line-height: 1.25; }
    html body .header .btn,
    html body .page-header .btn { padding: 8px 12px; }
    html body .brand-subtitle { display: none; }
    html body .brand-text h1 { font-size: 14px; }
    html body .table-container { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}
