/* Design system global pentru aplicația de pontaj INBIT */
*, *::before, *::after {
    box-sizing: border-box;
}

:root {
    --primary-color: #145ea8;
    --primary-light: #2f7fd0;
    --primary-dark: #0d2f4f;
    --industrial-dark: #111827;
    --industrial-surface: #172033;
    --accent-color: #f7b731;
    --secondary-color: #f4f7fb;
    --surface-color: #ffffff;
    --surface-muted: #f8fafc;
    --text-color: #1f2937;
    --text-muted: #64748b;
    --text-light: #e5eefb;
    --success-color: #198754;
    --warning-color: #f59f00;
    --danger-color: #dc3545;
    --info-color: #0ea5e9;
    --border-color: #dbe4ef;
    --border-strong: #b8c4d4;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 10px 28px rgba(15, 23, 42, 0.12);
    --shadow-lg: 0 22px 55px rgba(15, 23, 42, 0.18);
    --radius-sm: 0.5rem;
    --radius-md: 0.85rem;
    --radius-lg: 1.15rem;
    --header-height: 64px;
    --sidebar-width: 280px;
    --sidebar-width-collapsed: 72px;
    --sidebar-ease: cubic-bezier(.22, 1, .36, 1);
    --sidebar-duration: 0.55s;
    --sidebar-label-duration: 0.45s;
    --sidebar-pad-x: 16px;
    --sidebar-pad-x-collapsed: 10px;
    --sidebar-item-h: 42px;
    --sidebar-item-w-collapsed: 52px;
    --sidebar-hover: rgba(255, 255, 255, 0.08);
    --sidebar-active-fill: linear-gradient(90deg, rgba(20, 94, 168, 0.28) 0%, rgba(23, 32, 51, 0.55) 62%, rgba(247, 183, 49, 0.22) 100%);
    --sidebar-glow: #f7b731;
    --sidebar-glow-soft: rgba(247, 183, 49, 0.22);
    --sidebar-border: rgba(255, 255, 255, 0.08);
    --transition-speed: 0.22s;
    --container-width-xl: min(94%, 1600px);
    --container-width-xxl: min(92%, 1880px);
}

html {
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--text-color);
    background:
        radial-gradient(circle at top left, rgba(20, 94, 168, 0.12), transparent 30rem),
        linear-gradient(180deg, #eef3f8 0%, #f8fafc 52%, #edf2f7 100%);
    font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    width: 100%;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--primary-color);
    text-underline-offset: 0.18em;
}

a:hover {
    color: var(--primary-dark);
}

:focus-visible {
    outline: 3px solid rgba(247, 183, 49, 0.78);
    outline-offset: 3px;
}

/* Header */
.header {
    position: fixed;
    inset: 0 0 auto 0;
    width: 100%;
    height: var(--header-height);
    color: #ffffff;
    background:
        linear-gradient(90deg, rgba(247, 183, 49, 0.95) 0 5px, transparent 5px),
        linear-gradient(135deg, #0b1220 0%, #182235 54%, #22324a 100%);
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.18);
    z-index: 1030;
}

.navbar {
    height: 100%;
    padding: 0.45rem 0.75rem;
}

.navbar .container-fluid {
    height: 100%;
    width: 100%;
    max-width: none;
    margin: 0;
    gap: 0.75rem;
}

.navbar-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    margin: 0 auto;
    padding: 0.32rem 0.85rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
}

.logo-img {
    display: block;
    width: auto;
    max-height: 38px;
    filter: none;
}

.navbar-toggler {
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.9rem;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
    transition: background var(--transition-speed) ease, transform var(--transition-speed) ease;
}

.navbar-toggler:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-1px);
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.22rem rgba(247, 183, 49, 0.35);
}

.user-header-info {
    display: flex;
    align-items: center;
    margin-left: auto;
    color: white;
    font-size: 0.92rem;
}

.language-flags {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-left: 0;
}

.flag-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    min-height: 42px;
    padding: 0.4rem 0.55rem;
    color: #ffffff;
    font-size: 1.15rem;
    line-height: 1;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 0.8rem;
    background: rgba(255, 255, 255, 0.1);
    transition: background var(--transition-speed) ease, border-color var(--transition-speed) ease, transform var(--transition-speed) ease;
}

.flag-btn:hover,
.flag-btn.active {
    color: #ffffff;
    border-color: rgba(247, 183, 49, 0.85);
    background: rgba(247, 183, 49, 0.18);
    transform: translateY(-1px);
}

.flag-btn.active::after {
    content: "";
    position: absolute;
    right: 0.45rem;
    bottom: 0.35rem;
    width: 0.42rem;
    height: 0.42rem;
    border-radius: 50%;
    background: var(--accent-color);
}

/* Layout */
.wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: calc(100vh - var(--header-height));
    margin-top: var(--header-height);
}

.content {
    flex: 1;
    width: 100%;
    padding: clamp(0.75rem, 2vw, 1.75rem);
    transition: margin-left var(--sidebar-duration) var(--sidebar-ease);
}

.container,
.container-fluid {
    width: 100%;
    margin-inline: auto;
}

.content > .container,
.content > .container-fluid {
    width: 100%;
    max-width: none;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
}

.content > .container {
    padding: clamp(1rem, 2.5vw, 1.75rem);
}

.content > .container-fluid {
    padding: clamp(0.75rem, 2vw, 1.25rem);
}

/* Sidebar collapsabil — pattern Nazia-99, branding INBIT */
.sidebar {
    position: fixed;
    top: var(--header-height);
    left: 0;
    z-index: 1020;
    display: flex;
    flex-direction: column;
    width: var(--sidebar-width);
    height: calc(100vh - var(--header-height));
    height: calc(100dvh - var(--header-height));
    max-height: calc(100dvh - var(--header-height));
    padding: 12px var(--sidebar-pad-x) 14px;
    color: var(--text-light);
    background:
        linear-gradient(180deg, rgba(247, 183, 49, 0.9) 0 4px, transparent 4px),
        linear-gradient(180deg, var(--industrial-dark) 0%, var(--industrial-surface) 58%, var(--primary-dark) 100%);
    border-right: 1px solid var(--sidebar-border);
    box-shadow: 10px 0 40px rgba(0, 0, 0, 0.28);
    overflow: hidden;
    overscroll-behavior: contain;
    transform: translateX(calc(-100% - 16px));
    transition: transform var(--sidebar-duration) var(--sidebar-ease);
}

.sidebar.show {
    transform: translateX(0);
}

.sidebar-close-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.12);
    cursor: pointer;
}

.sidebar-close-btn:hover,
.sidebar-close-btn:focus {
    background: rgba(255, 255, 255, 0.2);
}

.sidebar-logo-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    gap: 0.4rem;
    padding: 4px 2.75rem 12px 4px;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--text-light);
    cursor: pointer;
}

.sidebar-logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}

.sidebar-logo-mark {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.sidebar-logo-text {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.sidebar-collapse-btn {
    display: none;
}

.sidebar-nav-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-gutter: stable;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.sidebar-nav-scroll::-webkit-scrollbar {
    width: 0.45rem;
}

.sidebar-nav-scroll::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.24);
}

.sidebar-section {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-section-label {
    margin: 0;
    padding: 0 10px 8px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(229, 238, 251, 0.52);
}

.sidebar-divider {
    height: 1px;
    margin: 12px 4px;
    background: var(--sidebar-border);
}

.sidebar-overlay {
    position: fixed;
    inset: var(--header-height) 0 0 0;
    z-index: 1010;
    background: rgba(15, 23, 42, 0.46);
    backdrop-filter: blur(2px);
}

.sidebar-overlay[hidden] {
    display: none;
}

.sidebar-open {
    overflow: hidden;
}

.sidebar .nav {
    padding: 0;
}

.sidebar .nav-item {
    --i: 0;
}

.sidebar .nav-item:nth-child(1) { --i: 0; }
.sidebar .nav-item:nth-child(2) { --i: 1; }
.sidebar .nav-item:nth-child(3) { --i: 2; }
.sidebar .nav-item:nth-child(4) { --i: 3; }
.sidebar .nav-item:nth-child(5) { --i: 4; }
.sidebar .nav-item:nth-child(6) { --i: 5; }
.sidebar .nav-item:nth-child(7) { --i: 6; }
.sidebar .nav-item:nth-child(8) { --i: 7; }

.sidebar .nav-link,
.sidebar .sidebar-locked-hint {
    position: relative;
    isolation: isolate;
    min-height: var(--sidebar-item-h);
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0.12rem 0;
    padding: 9px 10px;
    color: rgba(229, 238, 251, 0.86);
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.005em;
    overflow: visible;
    transition:
        color 0.15s ease,
        background 0.15s ease,
        width var(--sidebar-duration) var(--sidebar-ease),
        height var(--sidebar-duration) var(--sidebar-ease),
        padding var(--sidebar-duration) var(--sidebar-ease),
        margin var(--sidebar-duration) var(--sidebar-ease);
}

.sidebar-icon-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 1.25rem;
    width: 1.25rem;
}

.sidebar .nav-link i {
    margin-right: 0;
    text-align: center;
    color: rgba(247, 183, 49, 0.92);
}

.sidebar .nav-link:hover {
    color: #ffffff;
    background: var(--sidebar-hover);
}

.sidebar .nav-link.active {
    color: #ffffff;
    background: var(--sidebar-active-fill);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.sidebar .nav-link.active::before {
    content: "";
    position: absolute;
    top: 50%;
    right: -6px;
    width: 10px;
    height: 22px;
    border-radius: 10px;
    transform: translateY(-50%);
    background: var(--sidebar-glow);
    box-shadow: 0 0 28px 8px var(--sidebar-glow-soft);
    pointer-events: none;
    z-index: 1;
}

.sidebar .badge {
    margin-left: auto;
}

.sidebar-logo-text,
.nav-label,
.sidebar-section-label,
.sidebar-user-meta,
.sidebar-impersonate-text {
    display: inline-block;
    white-space: nowrap;
    transition:
        opacity var(--sidebar-label-duration) ease,
        transform var(--sidebar-duration) var(--sidebar-ease),
        width var(--sidebar-duration) var(--sidebar-ease),
        margin var(--sidebar-duration) var(--sidebar-ease);
}

.sidebar.show .sidebar-logo-text {
    transition-delay: 0.1s;
}

.sidebar.show .nav-label {
    transition-delay: calc(0.16s + (var(--i, 0) * 0.045s));
}

.sidebar.show .sidebar-section-label {
    transition-delay: 0.14s;
}

.sidebar.show .sidebar-user-meta,
.sidebar.show .sidebar-impersonate-text {
    transition-delay: 0.28s;
}

.sidebar-user-row {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    gap: 10px;
    margin-top: 10px;
    padding: 10px 4px 0;
    border-top: 1px solid var(--sidebar-border);
}

.sidebar-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    color: var(--accent-color);
    font-size: 1.7rem;
}

.sidebar-user-meta {
    flex: 1;
    min-width: 0;
}

.sidebar-user-name,
.sidebar-user-role {
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-name {
    font-size: 13.5px;
    font-weight: 700;
    color: #ffffff;
}

.sidebar-user-role {
    font-size: 12px;
    color: rgba(229, 238, 251, 0.62);
}

.sidebar-logout {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    color: rgba(229, 238, 251, 0.86);
    text-decoration: none;
}

.sidebar-logout:hover {
    color: var(--accent-color);
    background: var(--sidebar-hover);
}

.sidebar-impersonate {
    flex-shrink: 0;
    margin-top: 8px;
}

.sidebar-impersonate-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    color: #111827;
    background: #f7b731;
    text-decoration: none;
    font-size: 12px;
}

.sidebar-impersonate-link:hover {
    color: #111827;
    background: #ffc94a;
}

.sidebar-impersonate-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.25;
}

@keyframes blinkBadge {
    50% {
        opacity: 0.35;
    }
}

#unread-badge.blink,
#transfers-badge.blink {
    animation: blinkBadge 1s linear infinite;
}

body.page-login .sidebar,
body.page-login .sidebar-overlay {
    display: none !important;
}

body.page-login .content,
body.page-login .site-footer {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: none !important;
}

@media (prefers-reduced-motion: reduce) {
    .sidebar,
    .sidebar-logo-text,
    .nav-label,
    .sidebar-section-label,
    .sidebar-user-meta,
    .content,
    .site-footer {
        transition-duration: 0.01ms !important;
        transition-delay: 0s !important;
    }
}

/* Footer */
.site-footer {
    width: 100%;
    margin-top: auto;
    color: rgba(229, 238, 251, 0.9);
    text-align: center;
    background: linear-gradient(135deg, var(--industrial-dark), var(--primary-dark));
    border-top: 4px solid var(--accent-color);
}

.footer-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 1rem;
}

.site-footer p {
    margin: 0;
    font-size: 0.9rem;
}

.footer-credit {
    margin-top: 0.25rem !important;
    color: rgba(229, 238, 251, 0.78);
    font-size: 0.82rem !important;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.2rem 0.5rem;
    line-height: 1.45;
}

.footer-credit-line {
    display: inline-block;
    white-space: nowrap;
}

.footer-credit a {
    color: #ffffff;
    font-weight: 700;
}

.footer-credit a:hover {
    color: var(--accent-color);
}

.footer-credit-separator {
    margin: 0 0.45rem;
    opacity: 0.55;
}

.footer-funding {
    max-width: 980px;
    margin: 0.85rem auto 0;
    padding: 0.85rem;
    color: #334155;
    background: rgba(255, 255, 255, 0.92);
    border-radius: var(--radius-md);
}

.footer-funding img {
    width: auto;
    max-height: 76px;
    object-fit: contain;
}

.footer-funding p {
    margin-top: 0.6rem;
    color: #334155;
    font-size: 0.82rem;
}

.footer-funding a {
    color: var(--primary-dark);
    font-weight: 700;
}

/* Componente Bootstrap armonizate */
.card {
    border: 1px solid rgba(219, 228, 239, 0.95);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    background: var(--surface-color);
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease, border-color var(--transition-speed) ease;
}

.card:hover {
    border-color: rgba(20, 94, 168, 0.24);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.card.card-main:hover,
.modal .card:hover {
    transform: none;
}

.card-body {
    padding: clamp(1rem, 2vw, 1.35rem);
}

.card-title {
    color: var(--industrial-dark);
    font-size: 1.12rem;
    font-weight: 700;
    margin-bottom: 0.65rem;
    text-align: center;
}

.card-text {
    color: var(--text-muted);
}

.display-4 {
    filter: drop-shadow(0 8px 18px rgba(15, 23, 42, 0.12));
}

.alert {
    border: 0;
    border-left: 5px solid currentColor;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.table {
    vertical-align: middle;
}

.table thead th {
    color: #334155;
    background: #eef4fb;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.035em;
}

.table tbody tr {
    transition: background var(--transition-speed) ease;
}

.table tbody tr:hover {
    background: #f8fbff;
}

.form-control,
.form-select {
    min-height: 44px;
    border-color: var(--border-color);
    border-radius: 0.8rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 0.22rem rgba(20, 94, 168, 0.16);
}

.btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.58rem 1rem;
    border-radius: 0.8rem;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease, background var(--transition-speed) ease, border-color var(--transition-speed) ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn-sm {
    min-height: 38px;
    border-radius: 0.65rem;
}

.btn-lg {
    min-height: 52px;
    padding-inline: 1.25rem;
    border-radius: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-color: var(--primary-color);
    color: white;
    box-shadow: 0 10px 22px rgba(20, 94, 168, 0.22);
}

.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    border-color: var(--primary-dark);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, #16794f, var(--success-color));
    border-color: #16794f;
    color: white;
    box-shadow: 0 10px 22px rgba(25, 135, 84, 0.2);
}

.btn-success:hover,
.btn-success:focus {
    background: linear-gradient(135deg, #0f5f3d, #16794f);
    border-color: #0f5f3d;
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #b42331, var(--danger-color));
    border-color: #b42331;
    color: white;
    box-shadow: 0 10px 22px rgba(220, 53, 69, 0.2);
}

.btn-danger:hover,
.btn-danger:focus {
    background: linear-gradient(135deg, #8f1c28, #b42331);
    border-color: #8f1c28;
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, var(--accent-color), #ffd166);
    border-color: var(--accent-color);
    color: #1f2937;
}

.btn-info {
    background: linear-gradient(135deg, #0284c7, var(--info-color));
    border-color: #0284c7;
    color: white;
}

.btn-secondary {
    background: linear-gradient(135deg, #475569, #64748b);
    border-color: #475569;
    color: white;
}

.btn-outline-primary {
    border-color: rgba(20, 94, 168, 0.55);
    color: var(--primary-color);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.badge {
    border-radius: 999px;
    font-weight: 800;
}

.alert-link {
    text-decoration: underline;
}

.invalid-feedback {
    font-size: 0.75rem;
}

.text-muted.small {
    font-size: 0.8rem;
}

/* Pontaj / QR */
.qr-container,
.qr-container-mobile {
    position: relative;
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
}

.qr-container-mobile {
    max-width: 100%;
}

.qr-video {
    width: 100%;
    height: auto;
    max-height: 360px;
    display: none;
    border: 3px solid rgba(20, 94, 168, 0.7);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    background: #020617;
}

.cod-display {
    max-width: 360px;
    margin: 0 auto;
    padding: 0.85rem 1rem;
    color: var(--industrial-dark);
    text-align: center;
    background: #f8fbff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1.05rem;
    font-weight: 700;
}

.timer,
.timer-mobile,
.timer-desktop {
    color: var(--primary-dark) !important;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.timer {
    font-size: clamp(2rem, 8vw, 2.8rem);
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.035);
    }
}

.pulse,
.timer {
    animation: pulse 1.5s ease-in-out infinite;
}

.scan-btn {
    margin-top: 0.65rem;
    white-space: normal;
}

.scan-btn:disabled {
    cursor: not-allowed;
    transform: none;
    opacity: 0.72;
}

.inventar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

/* Autentificare */
.login-page {
    min-height: calc(100vh - var(--header-height));
    min-height: calc(100dvh - var(--header-height));
}

.login-page > .container,
.login-page > .login-container {
    max-width: 1120px;
    background: transparent;
}

.login-card {
    border: 0;
    border-radius: var(--radius-lg);
    background: #ffffff;
    box-shadow: var(--shadow-md);
}

.login-logo {
    width: auto;
    max-width: 150px;
    height: auto;
}

.password-toggle {
    top: 2.35rem;
    right: 0.65rem;
    min-width: 34px;
    min-height: 34px;
    padding: 0;
    line-height: 1;
    border: 0;
    background: transparent;
    box-shadow: none;
}

/* Login: ascunde hamburger pe guest (păstrează spațiul pentru logo centrat) */
body.page-login .login-hide-toggler {
    visibility: hidden;
    pointer-events: none;
}

/* Iconițe animate — login profesional */
.login-hero-icon {
    display: flex;
    justify-content: center;
    margin: 0 auto 0.85rem;
}

.login-hero-icon-ring {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4.25rem;
    height: 4.25rem;
    border-radius: 1.15rem;
    color: #145ea8;
    background: linear-gradient(160deg, rgba(20, 94, 168, 0.12) 0%, rgba(247, 183, 49, 0.14) 100%);
    box-shadow: 0 10px 24px rgba(20, 94, 168, 0.12);
    position: relative;
}

.login-hero-icon-ring::after {
    content: "";
    position: absolute;
    inset: -4px;
    border-radius: 1.35rem;
    border: 1px solid rgba(20, 94, 168, 0.18);
    animation: login-ring-pulse 2.8s ease-in-out infinite;
    pointer-events: none;
}

.login-hero-icon-ring .bi {
    font-size: 1.85rem;
    line-height: 1;
}

.login-icon-float {
    display: inline-block;
    animation: login-icon-float 2.6s ease-in-out infinite;
}

.login-icon-pulse {
    display: inline-block;
    animation: login-icon-pulse 2.2s ease-in-out infinite;
}

.login-field-icon {
    display: inline-block;
    color: #145ea8;
    transition: transform 0.25s ease, color 0.25s ease;
}

.login-field:focus-within .login-field-icon {
    color: #0f4a86;
    animation: login-icon-nudge 0.55s ease;
}

.login-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.login-submit-icon {
    display: inline-block;
    transition: transform 0.25s ease;
}

.login-submit-btn:hover .login-submit-icon,
.login-submit-btn:focus-visible .login-submit-icon {
    transform: translateX(3px);
}

.login-link-icon {
    display: inline-block;
    transition: transform 0.25s ease;
}

.login-secondary-actions a:hover .login-link-icon,
.login-secondary-actions a:focus-visible .login-link-icon {
    transform: translateX(-2px);
}

.login-lockout-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 0.65rem;
}

.login-lockout-icon .bi {
    font-size: 2.35rem;
    color: #dc3545;
}

.login-icon-alert {
    display: inline-block;
    animation: login-icon-alert 1.8s ease-in-out infinite;
}

.login-icon-wiggle {
    display: inline-block;
    animation: login-icon-wiggle 1.6s ease-in-out infinite;
}

.password-toggle .bi {
    display: inline-block;
    transition: transform 0.2s ease;
}

.password-toggle:hover .bi,
.password-toggle:focus-visible .bi {
    transform: scale(1.12);
}

/* Text animat — titlu, etichete, buton */
.login-text-motion {
    display: inline-block;
    animation: login-text-shimmer 3.2s ease-in-out infinite;
    background: linear-gradient(90deg, #0f4a86 0%, #145ea8 35%, #f7b731 50%, #145ea8 65%, #0f4a86 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

.login-label-motion {
    display: inline-block;
    animation: login-label-float 2.8s ease-in-out infinite;
}

.login-label-motion-delay {
    animation-delay: 0.45s;
}

.login-btn-text-motion {
    display: inline-block;
    animation: login-btn-text-nudge 2.4s ease-in-out infinite;
}

@keyframes login-icon-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@keyframes login-icon-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.08); opacity: 0.85; }
}

@keyframes login-ring-pulse {
    0%, 100% { opacity: 0.55; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.04); }
}

@keyframes login-icon-nudge {
    0% { transform: translateY(0) scale(1); }
    40% { transform: translateY(-2px) scale(1.12); }
    100% { transform: translateY(0) scale(1); }
}

@keyframes login-icon-alert {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.06); }
}

@keyframes login-icon-wiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-8deg); }
    75% { transform: rotate(8deg); }
}

@keyframes login-text-shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes login-label-float {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(3px); }
}

@keyframes login-btn-text-nudge {
    0%, 100% { transform: translateX(0); letter-spacing: normal; }
    50% { transform: translateX(1px); letter-spacing: 0.02em; }
}

/* Reset password — contact compact (același shell ca login) */
.contact-info {
    background: var(--surface-muted, #f8fafc);
    border-radius: var(--radius-md);
    padding: 0.85rem 0.9rem;
    border-left: 4px solid var(--primary-color, #145ea8);
    text-align: left;
}

.contact-info-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.65rem !important;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.contact-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.contact-item:first-of-type {
    padding-top: 0.15rem;
}

.contact-item-icon {
    flex: 0 0 auto;
    margin-top: 0.15rem;
    color: #145ea8;
    font-size: 1rem;
    animation: login-label-float 2.8s ease-in-out infinite;
}

.contact-item:nth-child(3) .contact-item-icon { animation-delay: 0.15s; }
.contact-item:nth-child(4) .contact-item-icon { animation-delay: 0.3s; }
.contact-item:nth-child(5) .contact-item-icon { animation-delay: 0.45s; }

.contact-item-body {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.contact-item-body strong {
    color: #475569;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.contact-item-body span,
.contact-item-body a {
    color: #0f172a;
    font-size: 0.95rem;
    font-weight: 600;
    word-break: break-word;
}

.contact-item-body a {
    color: #145ea8;
    text-decoration: none;
}

.contact-item-body a:hover,
.contact-item-body a:focus-visible {
    color: #0f4a86;
    text-decoration: underline;
}

/* Reset parolă — pași + OTP (același shell ca login, nu pagină de contact) */
.reset-password-page .login-card-body {
    text-align: left;
}

.reset-password-page .login-hero-icon,
.reset-password-page .login-title {
    text-align: center;
}

.reset-steps {
    display: flex;
    align-items: flex-start;
    list-style: none;
    margin: 0 0 0.9rem;
    padding: 0;
}

.reset-steps > li {
    flex: 1 1 0;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.28rem;
    padding: 0 0.4rem;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.25;
    color: var(--text-muted, #64748b);
    text-align: center;
}

.reset-steps > li:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 0.72rem;
    left: calc(50% + 1.05rem);
    right: calc(-50% + 1.05rem);
    height: 2px;
    background: var(--border-color, #dbe4ef);
    pointer-events: none;
}

.reset-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    z-index: 1;
    border: 2px solid var(--border-strong, #b8c4d4);
    border-radius: 50%;
    background: #fff;
    color: var(--text-muted, #64748b);
    font-size: 0.75rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.reset-steps > li.is-active {
    color: var(--primary-color, #145ea8);
}

.reset-steps > li.is-active .reset-step-num {
    border-color: var(--primary-color, #145ea8);
    background: var(--primary-color, #145ea8);
    color: #fff;
    box-shadow: 0 0 0 3px rgba(20, 94, 168, 0.16);
}

.reset-steps > li.is-done {
    color: var(--text-muted, #64748b);
}

.reset-steps > li.is-done .reset-step-num {
    border-color: var(--success-color, #198754);
    background: var(--success-color, #198754);
    color: #fff;
    font-size: 0;
}

.reset-steps > li.is-done .reset-step-num::after {
    content: "\2713";
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1;
}

.reset-steps > li.is-done:not(:last-child)::after {
    background: var(--primary-color, #145ea8);
}

.reset-code-input {
    text-align: center;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.38em;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
    padding-left: 0.7rem;
    padding-right: 0.32rem;
    caret-color: var(--primary-color, #145ea8);
}

.reset-code-input:focus {
    border-color: var(--primary-color, #145ea8);
    box-shadow: 0 0 0 0.2rem rgba(20, 94, 168, 0.18);
}

.reset-password-page .contact-info {
    margin-top: 0.25rem;
}

/* 2FA — verificare / setup (același shell ca login) */
.totp-code-input {
    font-size: 1.45rem !important;
    letter-spacing: 0.35em;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.verify-2fa-intro {
    text-align: center;
}

.verify-2fa-intro p {
    margin-bottom: 0.35rem;
}

.verify-2fa-hint {
    line-height: 1.35;
}

.setup-2fa-step-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #145ea8;
}

.setup-2fa-qr {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.setup-2fa-qr-img {
    max-width: 220px;
    height: auto;
    display: block;
}

.setup-2fa-secret {
    font-size: 1.05rem;
    font-weight: 700;
    word-break: break-all;
    background: var(--surface-muted, #f8fafc);
    border-radius: var(--radius-sm);
    padding: 0.55rem 0.7rem;
    border: 1px dashed rgba(20, 94, 168, 0.35);
    color: #0f172a;
}

@media (prefers-reduced-motion: reduce) {
    .login-icon-float,
    .login-icon-pulse,
    .login-hero-icon-ring::after,
    .login-icon-alert,
    .login-icon-wiggle,
    .login-field:focus-within .login-field-icon,
    .login-text-motion,
    .login-label-motion,
    .login-btn-text-motion,
    .contact-item-icon {
        animation: none !important;
    }

    .login-text-motion {
        background: none;
        color: inherit;
        -webkit-text-fill-color: currentColor;
    }

    .login-submit-icon,
    .login-link-icon,
    .password-toggle .bi {
        transition: none !important;
        transform: none !important;
    }
}

/* Modale */
.modal {
    z-index: 1050;
}

.modal-content {
    border: 0;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.modal-backdrop {
    z-index: 1040;
}

/* Responsive */
@media (min-width: 768px) {
    .content {
        padding: 1.4rem;
    }

    .content > .container {
        padding: 1.5rem;
    }
}

@media (min-width: 1200px) {
    .content > .container,
    .content > .container-fluid {
        width: 100%;
    }
}

@media (min-width: 1600px) {
    .content > .container,
    .content > .container-fluid {
        width: 100%;
        max-width: none;
    }
}

@media (max-width: 767.98px) {
    :root {
        --header-height: 58px;
        --sidebar-width: min(88vw, 320px);
    }

    .sidebar {
        top: var(--header-height);
        width: var(--sidebar-width);
        max-width: 100vw;
        padding: 12px 14px 14px;
        overflow: hidden;
        transform: translateX(calc(-100% - 12px));
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .sidebar-collapse-btn {
        display: none;
    }

    .sidebar-logo-row {
        padding-right: 2.6rem;
    }

    .sidebar .nav-link {
        min-height: 42px;
        padding: 0.55rem 0.7rem;
        font-size: 0.9rem;
        gap: 0.55rem;
    }

    .sidebar .nav-link i {
        font-size: 0.95rem;
    }

    .navbar {
        padding-inline: 0.55rem;
    }

    .navbar-toggler {
        position: relative;
        z-index: 2;
        flex-shrink: 0;
    }

    .navbar-brand {
        padding-inline: 0.55rem;
    }

    .logo-img {
        max-height: 32px;
    }

    .navbar-toggler {
        width: 42px;
        height: 42px;
        border-radius: 0.75rem;
    }

    .language-flags {
        gap: 0.3rem;
    }

    .flag-btn {
        min-width: 38px;
        min-height: 38px;
        padding: 0.34rem 0.45rem;
        font-size: 1rem;
    }

    .content {
        padding: 0.65rem;
    }

    .content > .container,
    .content > .container-fluid {
        border-radius: var(--radius-md);
        padding: 0.75rem;
    }

    .card {
        border-radius: var(--radius-md);
    }

    .card:hover {
        transform: none;
    }

    .card-body {
        padding: 0.9rem;
    }

    .btn {
        width: auto;
        min-height: 46px;
    }

    .scan-btn,
    .btn.w-100 {
        width: 100%;
    }

    .table-responsive,
    .dataTables_wrapper {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .site-footer {
        text-align: center;
    }

    .footer-container {
        padding: 0.85rem 0.75rem;
    }

    .footer-credit {
        flex-direction: column;
        gap: 0.15rem;
    }

    .footer-credit-separator {
        display: none;
    }

    .footer-credit-line {
        white-space: normal;
        text-align: center;
    }

    .footer-funding {
        padding: 0.75rem;
    }

    .login-logo {
        max-width: 124px;
    }

    .password-toggle {
        top: 2.05rem;
        right: 0.4rem;
        min-width: 40px;
        min-height: 40px;
    }

    /* ========== Login mobil — ecran stabil, fără scroll inutil ========== */
    html.page-login-html {
        height: 100%;
        overflow: hidden;
    }

    body.page-login {
        height: 100dvh;
        max-height: 100dvh;
        overflow: hidden;
        background: var(--surface-muted, #f8fafc);
        display: flex;
        flex-direction: column;
    }

    body.page-login .wrapper {
        flex: 1 1 auto;
        min-height: 0;
        margin-top: var(--header-height);
        height: auto;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }

    body.page-login .content.login-page {
        display: flex;
        flex-direction: column;
        justify-content: flex-start; /* ridică chenarul login mai sus */
        flex: 1 1 auto;
        min-height: 0 !important;
        height: 100%;
        padding: 0.25rem 0.7rem 0.15rem;
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    body.page-login .login-page > .container,
    body.page-login .login-page .login-container {
        display: flex;
        flex: 0 1 auto;
        flex-direction: column;
        justify-content: flex-start;
        max-width: none;
        width: 100%;
        max-height: none;
        padding: 0 !important;
        margin-top: 0;
        background: transparent;
        border-radius: 0;
        box-shadow: none;
        overflow: visible;
    }

    body.page-login .login-page .row {
        flex: 0 1 auto;
        margin: 0;
        align-items: flex-start;
        width: 100%;
        max-height: none;
    }

    body.page-login .login-page .row > [class*="col-"] {
        display: flex;
        padding: 0;
        max-width: 100%;
        flex: 0 0 100%;
        max-height: none;
    }

    body.page-login .login-card {
        display: flex;
        flex-direction: column;
        flex: 0 1 auto;
        width: 100%;
        max-height: none;
        margin: 0;
        border-radius: var(--radius-md);
        box-shadow: var(--shadow-sm);
        background: var(--surface-color, #ffffff);
        overflow: visible;
    }

    body.page-login .login-card-body,
    body.page-login .login-page .card-body {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        flex: 0 1 auto;
        padding: 0.55rem 0.8rem 0.5rem !important;
        text-align: left !important;
        overflow: visible;
    }

    body.page-login .login-title,
    body.page-login .login-page .card-body > h2 {
        margin: 0 0 0.4rem !important;
        font-size: 1.08rem;
        font-weight: 700;
        line-height: 1.2;
        text-align: center;
        letter-spacing: -0.01em;
    }

    body.page-login .login-hero-icon {
        margin-bottom: 0.25rem;
    }

    body.page-login .login-hero-icon-ring {
        width: 2.6rem;
        height: 2.6rem;
        border-radius: 0.75rem;
        box-shadow: 0 4px 10px rgba(20, 94, 168, 0.12);
    }

    body.page-login .login-hero-icon-ring .bi {
        font-size: 1.15rem;
    }

    body.page-login #login-form {
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    body.page-login .login-page .mb-3 {
        margin-bottom: 0.4rem !important;
    }

    body.page-login .login-page .mb-4 {
        margin-bottom: 0.45rem !important;
    }

    body.page-login .login-page .form-label {
        margin-bottom: 0.15rem;
        font-size: 0.8rem;
        font-weight: 600;
        color: #334155;
    }

    body.page-login .login-page .form-control {
        min-height: 40px;
        max-height: 42px;
        padding: 0.4rem 2.4rem 0.4rem 0.7rem;
        font-size: 16px; /* previne zoom automat pe iOS */
        border-radius: 0.65rem;
        background-color: #ffffff;
    }

    body.page-login .login-page .form-control:focus {
        box-shadow: 0 0 0 0.2rem rgba(20, 94, 168, 0.18);
    }

    body.page-login .password-toggle {
        top: 1.7rem;
    }

    body.page-login .login-page .btn-primary.w-100 {
        min-height: 42px;
        font-size: 0.92rem;
        font-weight: 600;
        border-radius: 0.65rem;
        box-shadow: 0 5px 12px rgba(20, 94, 168, 0.16);
    }

    body.page-login .login-page .btn-outline-secondary.w-100 {
        min-height: 38px;
        font-size: 0.85rem;
        border-radius: 0.65rem;
    }

    body.page-login .login-page .alert {
        margin-bottom: 0.5rem;
        padding: 0.45rem 0.65rem;
        font-size: 0.8rem;
        text-align: left;
        border-radius: 0.65rem;
    }

    body.page-login .login-secondary-actions {
        margin-top: 0.1rem;
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 0.35rem 0.85rem;
    }

    body.page-login .login-secondary-actions a {
        text-decoration: none;
        font-size: 0.78rem;
    }

    body.page-login .login-back-link {
        font-weight: 600;
        margin-top: 0 !important;
    }

    body.page-login .login-oauth-divider {
        margin-top: 0.2rem !important;
        margin-bottom: 0.35rem !important;
    }

    /* Lockout compact pe mobil */
    body.page-login .login-lockout {
        padding: 0.25rem 0.1rem !important;
        text-align: center;
    }

    body.page-login .login-lockout h5 {
        font-size: 0.98rem;
        margin-bottom: 0.4rem !important;
    }

    body.page-login .login-lockout-text,
    body.page-login .login-lockout-contact {
        font-size: 0.8rem;
        margin-bottom: 0.35rem;
    }

    body.page-login .login-lockout-icon .bi {
        font-size: 1.85rem;
    }

    body.page-login #lock-countdown,
    body.page-login .login-page .display-6 {
        font-size: 1.5rem !important;
        line-height: 1.2;
    }

    /* Footer complet vizibil pe login mobil */
    body.page-login .site-footer {
        flex-shrink: 0;
        margin-top: 0;
        padding-bottom: max(0.2rem, env(safe-area-inset-bottom, 0px));
        border-top-width: 2px;
        z-index: 5;
    }

    body.page-login .footer-container {
        padding: 0.3rem 0.5rem 0.35rem;
    }

    body.page-login .footer-credit {
        display: flex !important;
        flex-direction: column;
        flex-wrap: nowrap;
        justify-content: center;
        align-items: center;
        gap: 0.05rem;
        margin-top: 0.15rem !important;
        font-size: 0.62rem !important;
        line-height: 1.25;
    }

    body.page-login .footer-credit-separator {
        display: none;
    }

    body.page-login .footer-credit-line {
        white-space: normal;
        text-align: center;
    }

    body.page-login .site-footer > .footer-container > p:first-child {
        margin-bottom: 0;
        font-size: 0.68rem;
        line-height: 1.25;
    }

    body.page-login .site-footer p {
        margin-bottom: 0;
        font-size: 0.62rem;
        line-height: 1.25;
    }

    /* Reset password — densitate extra pe mobil */
    body.page-login .reset-password-page .contact-info {
        padding: 0.55rem 0.65rem;
        border-radius: 0.7rem;
        margin-bottom: 0.5rem !important;
    }

    body.page-login .reset-password-page .contact-info-title {
        font-size: 0.88rem;
        margin-bottom: 0.4rem !important;
    }

    body.page-login .reset-password-page .contact-item {
        padding: 0.35rem 0;
        gap: 0.5rem;
    }

    body.page-login .reset-password-page .contact-item-icon {
        font-size: 0.9rem;
        margin-top: 0.1rem;
    }

    body.page-login .reset-password-page .contact-item-body strong {
        font-size: 0.68rem;
    }

    body.page-login .reset-password-page .contact-item-body span,
    body.page-login .reset-password-page .contact-item-body a {
        font-size: 0.86rem;
    }

    body.page-login .reset-password-page .alert {
        margin-bottom: 0.45rem !important;
        padding: 0.4rem 0.55rem;
        font-size: 0.76rem;
        line-height: 1.35;
    }

    body.page-login .reset-password-page .reset-steps {
        margin-bottom: 0.55rem;
    }

    body.page-login .reset-password-page .reset-steps > li {
        font-size: 0.64rem;
        gap: 0.18rem;
        padding: 0 0.25rem;
    }

    body.page-login .reset-password-page .reset-step-num {
        width: 1.35rem;
        height: 1.35rem;
        font-size: 0.68rem;
    }

    body.page-login .reset-password-page .reset-steps > li:not(:last-child)::after {
        top: 0.62rem;
        left: calc(50% + 0.9rem);
        right: calc(-50% + 0.9rem);
    }

    body.page-login .reset-password-page .reset-code-input {
        min-height: 48px !important;
        max-height: none !important;
        font-size: 1.28rem !important;
        letter-spacing: 0.32em;
        padding-left: 0.55rem !important;
        padding-right: 0.2rem !important;
    }

    /* 2FA mobil */
    body.page-login .verify-2fa-page .totp-code-input,
    body.page-login .setup-2fa-page .totp-code-input {
        min-height: 48px !important;
        max-height: none !important;
        font-size: 1.35rem !important;
        letter-spacing: 0.3em;
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }

    body.page-login .verify-2fa-intro {
        margin-bottom: 0.45rem !important;
    }

    body.page-login .verify-2fa-intro p {
        font-size: 0.82rem;
        margin-bottom: 0.25rem;
    }

    body.page-login .verify-2fa-hint {
        font-size: 0.72rem;
    }

    body.page-login .setup-2fa-page .setup-2fa-qr-img {
        max-width: 160px;
    }

    body.page-login .setup-2fa-page .setup-2fa-secret {
        font-size: 0.88rem;
        padding: 0.4rem 0.5rem;
    }

    body.page-login .setup-2fa-page .setup-2fa-step-title {
        font-size: 0.86rem;
    }

    body.page-login .setup-2fa-page.login-page {
        justify-content: flex-start;
    }
}

@media (max-width: 420px) {
    .navbar-brand {
        max-width: 48vw;
    }

    .logo-img {
        max-width: 100%;
    }

    .flag-btn {
        min-width: 34px;
        min-height: 34px;
        border-radius: 0.65rem;
    }

    body.page-login .login-card-body,
    body.page-login .login-page .card-body {
        padding: 0.45rem 0.65rem 0.4rem !important;
    }

    body.page-login .login-title,
    body.page-login .login-page .card-body > h2 {
        font-size: 1rem;
    }

    body.page-login .login-hero-icon-ring {
        width: 2.35rem;
        height: 2.35rem;
    }

    body.page-login .login-hero-icon-ring .bi {
        font-size: 1.05rem;
    }

    body.page-login .content.login-page {
        padding: 0.15rem 0.55rem 0.1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Parc Auto — limbaj vizual vf-* (hero navy + accent galben INBIT) */
.vf-page {
    --vf-navy: var(--primary-dark);
    font-family: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
    color: var(--text-color);
    width: 100%;
}

.content.vf-page > .container,
.content.vf-page > .container-fluid {
    max-width: none !important;
    width: 100%;
}

.vf-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem 1.25rem;
    margin-bottom: 1.35rem;
    padding: 1.15rem 1.35rem 1.2rem;
    background:
        linear-gradient(90deg, var(--accent-color) 0 5px, transparent 5px),
        linear-gradient(135deg, #0d2f4f 0%, #163a5c 58%, #1b4a73 100%);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    color: #fff;
}

.vf-hero__title {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    min-width: 0;
}

.vf-hero__icon {
    width: 2.75rem;
    height: 2.75rem;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: var(--radius-sm);
    background: rgba(247, 183, 49, 0.18);
    color: var(--accent-color);
    font-size: 1.25rem;
}

.vf-hero h1 {
    margin: 0;
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: #fff;
}

.vf-hero__kicker {
    margin: 0.2rem 0 0;
    font-size: 0.82rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.68);
}

.vf-hero__aside {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
    flex: 1 1 16rem;
    min-width: 0;
}

.vf-hero__search {
    display: flex;
    align-items: stretch;
    gap: 0.4rem;
    width: 100%;
}

.vf-hero__search .form-control,
.vf-hero__search .form-select {
    font-family: inherit;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.22);
    color: #fff;
    min-height: 2.15rem;
}

.vf-hero__search .form-control::placeholder {
    color: rgba(255, 255, 255, 0.52);
}

.vf-hero__search .form-select option {
    color: #212529;
    background: #fff;
}

.vf-hero__search .form-control:focus,
.vf-hero__search .form-select:focus {
    background: rgba(255, 255, 255, 0.16);
    border-color: var(--accent-color);
    color: #fff;
    box-shadow: 0 0 0 0.2rem rgba(247, 183, 49, 0.28);
}

.vf-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.vf-hero__actions .btn,
.vf-hero__search .btn {
    font-family: inherit;
    font-weight: 600;
    border-radius: var(--radius-sm);
}

.vf-hero__actions .btn-outline-light {
    border-color: rgba(255, 255, 255, 0.28);
    color: #fff;
}

.vf-hero__actions .btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.45);
}

.vf-hero__actions .btn-accent,
.vf-hero__search .btn-accent {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: #1a1304;
}

.vf-hero__actions .btn-accent:hover,
.vf-hero__search .btn-accent:hover {
    background: #e5a61f;
    border-color: #e5a61f;
    color: #1a1304;
}

.vf-plate {
    display: inline-flex;
    align-items: center;
    margin-top: 0.55rem;
    padding: 0.22rem 0.65rem 0.22rem 0.4rem;
    border-radius: 0.28rem;
    background: #f4f1e8;
    color: #111827;
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    white-space: nowrap;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.12);
}

.vf-plate::before {
    content: "RO";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.5rem;
    padding: 0.18rem 0.32rem;
    border-radius: 0.16rem;
    background: #145ea8;
    color: #fff;
    font-size: 0.62rem;
    letter-spacing: 0.08em;
}

.vf-plate.vf-plate--sm,
.vf-plate--sm {
    margin-top: 0;
    padding: 0.1rem 0.42rem 0.1rem 0.26rem;
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    vertical-align: middle;
}

.vf-plate--sm::before {
    margin-right: 0.32rem;
    padding: 0.08rem 0.2rem;
    font-size: 0.5rem;
}

.vf-plate-cell {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.vf-leasing-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    padding: 0.14rem 0.5rem;
    border-radius: 999px;
    background: #fff4d4;
    color: #8a6208;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    white-space: nowrap;
    box-shadow: inset 0 0 0 1px rgba(138, 98, 8, 0.22);
}

.vf-leasing-badge .bi {
    font-size: 0.72rem;
    line-height: 1;
}

.vf-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 1.2rem 1.3rem 1.35rem;
    width: 100%;
}

.vf-card__head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.8rem;
    margin-bottom: 1.05rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--border-color);
}

.vf-card__icon {
    width: 2.35rem;
    height: 2.35rem;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: var(--radius-sm);
    background: rgba(20, 94, 168, 0.1);
    color: var(--primary-color);
    font-size: 1.05rem;
}

.vf-card__head h2 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--primary-dark);
}

.vf-card__hint {
    margin: 0.15rem 0 0;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 400;
}

.vf-stack {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    width: 100%;
}

.vf-alert {
    border: 0;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.vf-page .vf-lead {
    margin: -0.35rem 0 1.15rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.vf-page .vf-section {
    margin: 0 0 0.85rem;
    padding-bottom: 0.55rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--primary-dark);
}

.vf-page .vf-section .bi {
    color: var(--primary-color);
}

.vf-page .card {
    border-color: var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.vf-page .kpi-card {
    background: var(--surface-color);
    transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.vf-page .kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.vf-page .kpi-card .card-title {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.vf-page .kpi-card .display-6 {
    font-size: 1.7rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--primary-dark);
    line-height: 1.15;
}

.vf-page .kpi-card .bi.display-6 {
    font-size: 1.45rem;
    letter-spacing: 0;
}

.vf-page .row.g-3 .card.h-100 {
    background: var(--surface-color);
    transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.vf-page .row.g-3 .card.h-100:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.vf-page .row.g-3 .card.h-100 .card-title {
    font-weight: 700;
    color: var(--primary-dark);
}

.vf-page .table {
    font-size: 0.9rem;
}

.vf-page .table thead th {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
    background: var(--surface-muted);
    border-bottom-color: var(--border-color);
}

.vf-page .form-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
}

.vf-page .form-control,
.vf-page .form-select {
    font-family: inherit;
    border-color: var(--border-color);
    border-radius: var(--radius-sm);
}

.vf-page .form-control:focus,
.vf-page .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(20, 94, 168, 0.18);
}

.vf-page .form-check-label {
    font-size: 0.86rem;
    color: var(--text-color);
}

.vf-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.vf-table {
    margin: 0;
    font-size: 0.88rem;
}

.vf-table thead th {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
    background: var(--surface-muted);
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
    vertical-align: middle;
}

.vf-table tbody td {
    vertical-align: middle;
    border-color: var(--border-color);
    color: var(--text-color);
}

.vf-table tbody tr:hover {
    background: rgba(20, 94, 168, 0.04);
}

.vf-table .vf-num {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.vf-table tbody tr.border-success { box-shadow: inset 3px 0 0 var(--success-color); }
.vf-table tbody tr.border-primary { box-shadow: inset 3px 0 0 var(--primary-color); }
.vf-table tbody tr.border-warning { box-shadow: inset 3px 0 0 var(--warning-color); }
.vf-table tbody tr.border-danger { box-shadow: inset 3px 0 0 var(--danger-color); }
.vf-table tbody tr.border-secondary { box-shadow: inset 3px 0 0 #6c757d; }
.vf-table tbody tr.border-info { box-shadow: inset 3px 0 0 var(--info-color); }
.vf-table tbody tr.border-dark { box-shadow: inset 3px 0 0 var(--industrial-dark); }

.vf-row-actions {
    display: inline-flex;
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: 0.28rem;
}

.vf-row-actions .btn {
    width: 2rem;
    height: 2rem;
    padding: 0;
    display: inline-grid;
    place-items: center;
    border-radius: var(--radius-sm);
}

.vf-empty {
    text-align: center;
    padding: 2.2rem 1rem !important;
    color: var(--text-muted);
}

.vf-empty .bi {
    display: block;
    font-size: 1.65rem;
    margin-bottom: 0.45rem;
    color: var(--border-strong);
}

.vf-empty p {
    margin: 0;
    font-size: 0.9rem;
}

@media (min-width: 768px) {
    .vf-hero__aside {
        align-items: flex-end;
        max-width: 38rem;
    }

    .vf-hero__actions {
        justify-content: flex-end;
    }
}

@media (max-width: 767.98px) {
    .vf-hero {
        padding: 1rem;
    }

    .vf-hero h1 {
        font-size: 1.22rem;
    }

    .vf-page .kpi-card .display-6 {
        font-size: 1.45rem;
    }
}

/* Magazie — densitate compactă + tabele → carduri pe mobil */
.vf-page.magazie-page {
    --magazie-gap: 1.1rem;
}

.vf-page.magazie-page .vf-stack {
    gap: var(--magazie-gap);
}

.vf-page.magazie-page .magazie-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem 0.55rem;
}

.vf-page.magazie-page .magazie-toolbar .btn {
    font-weight: 600;
}

.vf-page.magazie-page .magazie-nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr));
    gap: 0.65rem;
}

.vf-page.magazie-page .magazie-nav-grid .btn {
    width: 100%;
    justify-content: flex-start;
    text-align: left;
    font-weight: 600;
    white-space: normal;
}

.vf-page.magazie-page .magazie-mobile-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--surface-color);
    padding: 0.7rem 0.8rem;
    margin-bottom: 0.55rem;
    box-shadow: none;
}

.vf-page.magazie-page .magazie-mobile-card.border-warning {
    border-color: #f0c36d;
    box-shadow: inset 3px 0 0 var(--warning-color);
}

.vf-page.magazie-page .magazie-scan-wrap,
.vf-page.magazie-page .magazie-sign-wrap,
.vf-page.magazie-page #reader,
.vf-page.magazie-page canvas.signature-pad,
.vf-page.magazie-page .signature-pad {
    max-width: 100%;
}

/* Pattern data-label: tabel → carduri pe ≤767px */
@media (max-width: 767.98px) {
    .vf-page.magazie-page {
        --magazie-gap: 0.75rem;
        padding-top: 0.85rem !important;
        padding-bottom: 0.85rem !important;
    }

    .vf-page.magazie-page .vf-hero {
        padding: 0.75rem 0.85rem;
        margin-bottom: 0.85rem;
        gap: 0.65rem;
    }

    .vf-page.magazie-page .vf-hero__icon {
        width: 2.25rem;
        height: 2.25rem;
        font-size: 1.05rem;
    }

    .vf-page.magazie-page .vf-hero h1 {
        font-size: 1.12rem;
    }

    .vf-page.magazie-page .vf-hero__kicker {
        font-size: 0.72rem;
    }

    .vf-page.magazie-page .vf-hero__actions {
        width: 100%;
    }

    .vf-page.magazie-page .vf-hero__actions .btn {
        flex: 1 1 calc(50% - 0.25rem);
        min-width: 0;
        justify-content: center;
    }

    .vf-page.magazie-page .vf-lead {
        font-size: 0.82rem;
        margin-bottom: 0.85rem;
    }

    .vf-page.magazie-page .vf-card {
        padding: 0.75rem 0.8rem 0.9rem;
        border-radius: var(--radius-md);
    }

    .vf-page.magazie-page .vf-card__head {
        margin-bottom: 0.7rem;
        padding-bottom: 0.55rem;
        gap: 0.55rem;
    }

    .vf-page.magazie-page .vf-card__head h2,
    .vf-page.magazie-page .vf-section {
        font-size: 0.95rem;
    }

    .vf-page.magazie-page .magazie-toolbar .btn,
    .vf-page.magazie-page .magazie-btn-block-sm {
        width: 100%;
    }

    .vf-page.magazie-page .magazie-nav-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.45rem;
    }

    .vf-page.magazie-page .magazie-mobile-card {
        padding: 0.55rem 0.65rem;
        margin-bottom: 0.45rem;
    }

    .vf-page.magazie-page .form-label {
        font-size: 0.74rem;
        margin-bottom: 0.2rem;
    }

    .vf-page.magazie-page .form-control,
    .vf-page.magazie-page .form-select {
        font-size: 0.88rem;
        min-height: 2.15rem;
        padding-top: 0.35rem;
        padding-bottom: 0.35rem;
    }

    .vf-page.magazie-page .alert {
        padding: 0.55rem 0.75rem;
        font-size: 0.86rem;
    }

    .vf-page.magazie-page .vf-table-wrap.magazie-cards-mobile {
        overflow-x: visible;
    }

    .vf-page.magazie-page .magazie-cards-mobile .vf-table thead {
        display: none;
    }

    .vf-page.magazie-page .magazie-cards-mobile .vf-table,
    .vf-page.magazie-page .magazie-cards-mobile .vf-table tbody {
        display: block;
        width: 100%;
    }

    .vf-page.magazie-page .magazie-cards-mobile .vf-table tbody tr {
        display: block;
        width: 100%;
        margin-bottom: 0.55rem;
        padding: 0.55rem 0.65rem;
        border: 1px solid var(--border-color);
        border-radius: var(--radius-md);
        background: var(--surface-color);
        box-shadow: none;
    }

    .vf-page.magazie-page .magazie-cards-mobile .vf-table tbody tr:hover {
        background: var(--surface-color);
    }

    .vf-page.magazie-page .magazie-cards-mobile .vf-table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 0.55rem;
        width: 100%;
        border: 0;
        border-bottom: 1px solid rgba(15, 23, 42, 0.06);
        padding: 0.32rem 0;
        white-space: normal;
        word-break: break-word;
        font-size: 0.86rem;
    }

    .vf-page.magazie-page .magazie-cards-mobile .vf-table tbody td:last-child {
        border-bottom: 0;
        padding-bottom: 0;
    }

    .vf-page.magazie-page .magazie-cards-mobile .vf-table tbody td::before {
        content: attr(data-label);
        flex: 0 0 36%;
        max-width: 36%;
        font-size: 0.68rem;
        font-weight: 700;
        letter-spacing: 0.03em;
        text-transform: uppercase;
        color: var(--text-muted);
        padding-top: 0.12rem;
    }

    .vf-page.magazie-page .magazie-cards-mobile .vf-table tbody td.magazie-td-actions {
        display: block;
    }

    .vf-page.magazie-page .magazie-cards-mobile .vf-table tbody td.magazie-td-actions::before {
        display: block;
        max-width: none;
        margin-bottom: 0.35rem;
    }

    .vf-page.magazie-page .magazie-cards-mobile .vf-table tbody td.magazie-td-actions .btn,
    .vf-page.magazie-page .magazie-cards-mobile .vf-table tbody td.magazie-td-actions .btn-group {
        width: 100%;
    }

    .vf-page.magazie-page .magazie-cards-mobile .vf-table tbody td.magazie-td-check {
        justify-content: flex-start;
        gap: 0.5rem;
    }

    .vf-page.magazie-page .magazie-cards-mobile .vf-table tbody td.magazie-td-check::before {
        flex: 0 0 auto;
        max-width: none;
    }
}