:root {
    --app-bg: #eef3f9;
    --surface: rgba(255, 255, 255, 0.94);
    --surface-strong: #ffffff;
    --surface-soft: #f6f9fc;
    --text-main: #1b2a3a;
    --text-muted: #64748b;
    --line-soft: #d9e3ef;
    --line-strong: #bfd0e3;
    --brand-1: #295d9b;
    --brand-2: #4a6cf7;
    --brand-3: #7aa8ff;
    --success-soft: #e8f8ee;
    --danger-soft: #fff0f1;
    --warning-soft: #fff6df;
    --shadow-soft: 0 14px 36px rgba(15, 39, 74, 0.10);
    --shadow-card: 0 10px 26px rgba(22, 48, 86, 0.08);
    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 12px;
}

body.theme-modern {
    background:
        radial-gradient(circle at top right, rgba(122, 168, 255, 0.16), transparent 30%),
        radial-gradient(circle at top left, rgba(74, 108, 247, 0.12), transparent 24%),
        linear-gradient(180deg, #f6f9fc 0%, var(--app-bg) 100%);
    color: var(--text-main);
}

body.theme-modern::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(255,255,255,0.45) 0%, rgba(255,255,255,0.08) 100%);
    z-index: 0;
}

body.theme-modern > * {
    position: relative;
}

body.theme-modern .top-navbar {
    z-index: 5000;
    backdrop-filter: blur(14px);
    background: linear-gradient(135deg, rgba(24, 49, 87, 0.97) 0%, rgba(39, 83, 140, 0.94) 55%, rgba(74, 108, 247, 0.88) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 10px 30px rgba(13, 31, 59, 0.22);
}

body.theme-modern .app-container {
    position: relative;
    z-index: 1;
}

body.theme-modern .tn-brand,
body.theme-modern .tn-link,
body.theme-modern .tn-dropdown a {
    letter-spacing: 0.2px;
}

body.theme-modern .tn-link {
    border-radius: 12px;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

body.theme-modern .tn-link:hover {
    background: rgba(255,255,255,0.12);
    transform: translateY(-1px);
}

body.theme-modern .tn-dropdown {
    border: 1px solid rgba(191, 208, 227, 0.6);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(15, 39, 74, 0.18);
    backdrop-filter: blur(14px);
}

body.theme-modern .header {
    background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(247,250,254,0.95) 100%);
    border-bottom: 1px solid rgba(191, 208, 227, 0.65);
    box-shadow: 0 8px 28px rgba(15, 39, 74, 0.08);
}

body.theme-modern .header-title {
    color: #17304d;
    letter-spacing: 0.2px;
}

body.theme-modern .user-info-header {
    border-color: rgba(191, 208, 227, 0.85);
}

body.theme-modern .user-role-badge {
    background: linear-gradient(135deg, var(--brand-2) 0%, var(--brand-1) 100%);
    box-shadow: 0 8px 18px rgba(74, 108, 247, 0.25);
}

body.theme-modern .content {
    padding: 28px;
}

/* Elimina spatiul de sus pentru pagina Actualizare persoane fizice */
body:has(#topnav-section-actualizare-pf) .content {
    padding-top: 0;
}

body.theme-modern .content-section.active {
    animation: fadeSlideIn 0.24s ease;
}

body.theme-modern .stats-grid,
body.theme-modern .table-container,
body.theme-modern .stat-card,
body.theme-modern .form-tabs,
body.theme-modern .form-tab.active,
body.theme-modern .card,
body.theme-modern .content-card {
    border-radius: var(--radius-md);
}

body.theme-modern .stat-card,
body.theme-modern .table-container,
body.theme-modern .form-tab.active,
body.theme-modern .content-card,
body.theme-modern .card {
    background: var(--surface);
    border: 1px solid rgba(191, 208, 227, 0.72);
    box-shadow: var(--shadow-card);
}

body.theme-modern .table-container {
    overflow: hidden;
}

body.theme-modern th {
    background: linear-gradient(180deg, #f7faff 0%, #edf3fa 100%);
    color: #27415f;
    border-bottom-color: #d5e0ec;
}

body.theme-modern td {
    border-bottom-color: #e5edf5;
}

body.theme-modern tbody tr:hover {
    background: #f3f8ff;
}

body.theme-modern .btn {
    border-radius: 12px;
}

body.theme-modern .btn-secondary {
    background: linear-gradient(135deg, #8895a4 0%, #6c757d 100%);
}

body.theme-modern .logout-btn {
    background: linear-gradient(135deg, #ef5b68 0%, #d63545 100%);
    box-shadow: 0 8px 16px rgba(220, 53, 69, 0.22);
}

body.theme-modern .logout-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 22px rgba(220, 53, 69, 0.28);
}

body.theme-modern .form-group input,
body.theme-modern .form-group select,
body.theme-modern .form-group textarea,
body.theme-modern input,
body.theme-modern select,
body.theme-modern textarea {
    border-color: #cfdae7;
    border-radius: 10px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

body.theme-modern .form-group input:focus,
body.theme-modern .form-group select:focus,
body.theme-modern .form-group textarea:focus,
body.theme-modern input:focus,
body.theme-modern select:focus,
body.theme-modern textarea:focus {
    border-color: #7aa8ff;
    box-shadow: 0 0 0 4px rgba(122, 168, 255, 0.18);
    background: #ffffff;
}

body.theme-modern .badge-info {
    background: #eaf3ff;
    color: #23508c;
}

body.theme-modern .badge-warning {
    background: var(--warning-soft);
    color: #916500;
}

body.theme-modern .badge-danger {
    background: var(--danger-soft);
    color: #bf3441;
}

body.theme-modern .app-placeholder-card {
    background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(246,250,254,0.96) 100%);
    border: 1px solid rgba(191, 208, 227, 0.72);
    border-radius: 24px;
    padding: 44px 28px;
    box-shadow: var(--shadow-card);
    text-align: center;
}

body.theme-modern .app-placeholder-icon {
    display: block;
    margin-bottom: 18px;
    font-size: 48px;
    color: var(--brand-2);
}

body.theme-modern .app-placeholder-title {
    margin-bottom: 10px;
    color: #17304d;
    font-size: 28px;
}

body.theme-modern .app-placeholder-text {
    color: var(--text-muted);
    font-size: 15px;
}

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 900px) {
    body.theme-modern .content {
        padding: 18px;
    }
}
