/* 
  Maestro v2.0 - Premium UI Overhaul 
  This stylesheet is injected globally to modernize the application layout.
*/



/* GLOBAL THEME OVERRIDES — temă întunecată plată (clară, ca versiunea clasică) */
:root {
    --bg: #0b1220;
    --panel: #0f172a;
    --card: #0f172a;
    --stroke: #1f2937;
    --line: #1f2937;
    --brand: #2563eb;
    --brand2: #1e40af;
    --brand-glow: rgba(37, 99, 235, 0.25);
    --text: #f1f5f9;
    --muted: #cbd5e1;
    --input: #0b1324;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --card-accent-border: #1f2937;
    --card-accent-glow: none;
    --card-accent-glow-strong: none;
    --card-radius: 16px;
    --card-surface: #0f172a;
}

/* ==========================================================================
   CARDURI — bordură rotunjită deasupra conținutului (::after), ca să nu fie acoperită
   ========================================================================== */
.wrap .card,
.wrap > .card,
.cereri-hr > .panel,
.panel:not(.hr-calendar-panel),
.location-edit-dropdown,
.wrap .stat-card,
.stat-card {
    position: relative;
    border: 1px solid var(--stroke) !important;
    border-radius: var(--card-radius) !important;
    background: var(--panel) !important;
    box-shadow: none !important;
    padding: 18px;
}

.tree-company,
.tree-location-item {
    position: relative;
    border: 1px solid var(--stroke) !important;
    border-radius: 10px !important;
    background: var(--panel) !important;
    box-shadow: none !important;
    padding: 0 !important;
}

.wrap .card::after,
.wrap > .card::after,
.cereri-hr > .panel::after,
.panel:not(.hr-calendar-panel)::after,
.location-edit-dropdown::after,
.wrap .stat-card::after,
.stat-card::after {
    display: none !important;
}

.wrap > .card,
.wrap .card {
    margin-bottom: 20px;
}

/* Card fără padding (ex. bară tab-uri) — colțuri rotunde; tab-urile scroll orizontal pe mobil */
.wrap .card.card--flush {
    padding: 0 !important;
    overflow: hidden;
}

.wrap .card.card--flush.fin-tabs-card,
.wrap .card.card--flush:has(.card-tabs-bar) {
    overflow: visible;
}

.wrap .card.card--flush .card-tabs-bar {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y;
}

.cereri-hr .filters {
    border: 1px solid var(--stroke) !important;
    box-shadow: none !important;
}

.wrap .card:hover,
.stat-card:hover,
.tree-company:hover,
.tree-location-item:hover,
.cereri-hr > .panel:hover {
    box-shadow: none !important;
}

.wrap .card:hover::after,
.stat-card:hover::after,
.tree-company:hover::after,
.tree-location-item:hover::after,
.cereri-hr > .panel:hover::after {
    display: none !important;
}

/* Conținut full-bleed în card */
.wrap .card > .table-wrap,
.wrap .card > .calendar-wrapper,
.wrap .card > .employee-list,
.wrap .card > .fc {
    border-radius: calc(var(--card-radius) - 4px);
}

/* Excepții — fără bordură accent */
.hr-calendar-panel,
#pwa-install-card,
.modal-backdrop {
    box-shadow: none !important;
}

.hr-calendar-panel::after,
#pwa-install-card::after,
body.admin-theme-consumption .wrap > .card::after {
    display: none !important;
}

#pwa-install-card {
    border: 2px solid rgba(139, 92, 246, 0.4) !important;
}

/* Meniu lateral — carduri principale închise; submeniuri puțin mai deschise */
.maestro-sidebar .sidebar-link,
.maestro-sidebar .sidebar-group-toggle,
#maestro-sidebar .sidebar-link,
#maestro-sidebar .sidebar-group-toggle {
    background: var(--sidebar-main-card-gradient) !important;
    background-color: var(--sidebar-main-card-bg) !important;
    border: 1px solid rgba(0, 0, 0, 0.55) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.maestro-sidebar .sidebar-sublink,
#maestro-sidebar .sidebar-sublink {
    background: var(--sidebar-sub-card-gradient) !important;
    background-color: var(--sidebar-sub-card-bg) !important;
    border: 1px solid rgba(0, 0, 0, 0.4) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.maestro-sidebar .sidebar-link:hover,
.maestro-sidebar .sidebar-group-toggle:hover,
#maestro-sidebar .sidebar-link:hover,
#maestro-sidebar .sidebar-group-toggle:hover {
    background: var(--sidebar-main-card-hover-gradient) !important;
    background-color: var(--sidebar-main-card-hover) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

.maestro-sidebar .sidebar-sublink:hover,
#maestro-sidebar .sidebar-sublink:hover {
    background: var(--sidebar-sub-card-hover-gradient) !important;
    background-color: var(--sidebar-sub-card-hover) !important;
    border-color: rgba(255, 255, 255, 0.11) !important;
}

.maestro-sidebar .sidebar-link.active,
#maestro-sidebar .sidebar-link.active,
.maestro-sidebar .sidebar-group.open > .sidebar-group-toggle,
#maestro-sidebar .sidebar-group.open > .sidebar-group-toggle {
    background: var(--sidebar-main-card-active-gradient) !important;
    background-color: var(--sidebar-main-card-active) !important;
    border: 1px solid rgba(167, 139, 250, 0.45) !important;
    overflow: visible;
}

.maestro-sidebar .sidebar-sublink.active,
#maestro-sidebar .sidebar-sublink.active {
    background: var(--sidebar-sub-card-active-gradient) !important;
    background-color: var(--sidebar-sub-card-active) !important;
    border: 1px solid color-mix(in srgb, var(--nav-accent, #8b5cf6) 45%, transparent) !important;
    overflow: visible;
}

/* ==========================================================================
   MAESTRO v2.0 - UNIVERSAL SIDEBAR
   ========================================================================== */

:root {
    --sidebar-width: 260px;
    --sidebar-bg: #1a0b2e;
    --sidebar-gradient: linear-gradient(180deg, #5b21b6 0%, #4c1d95 16%, #3b0764 38%, #2e1065 62%, #1e1b4b 100%);
    --sidebar-border: rgba(167, 139, 250, 0.22);
    --sidebar-main-card-bg: #060912;
    --sidebar-main-card-gradient: linear-gradient(to top, #020408 0%, #060912 28%, #0c1528 62%, #1a2840 100%);
    --sidebar-main-card-hover: #0a101c;
    --sidebar-main-card-hover-gradient: linear-gradient(to top, #050810 0%, #0a101c 30%, #121f35 65%, #243552 100%);
    --sidebar-main-card-active: #080d18;
    --sidebar-main-card-active-gradient: linear-gradient(to top, #060912 0%, #0a0f1c 32%, #151a32 68%, #2a1f4a 100%);
    --sidebar-sub-card-bg: #0a0f1a;
    --sidebar-sub-card-gradient: linear-gradient(to top, #040810 0%, #0a0f1a 30%, #101828 65%, #182640 100%);
    --sidebar-sub-card-hover: #0d1422;
    --sidebar-sub-card-hover-gradient: linear-gradient(to top, #060912 0%, #0d1422 32%, #141f33 68%, #1e2f48 100%);
    --sidebar-sub-card-active: #0b121c;
    --sidebar-sub-card-active-gradient: linear-gradient(to top, #050810 0%, #0b121c 35%, #162035 72%, #221838 100%);
    --page-gradient: #0b1220;
    --dashboard-widget-bg: #150d33;
    --dashboard-widget-gradient: linear-gradient(to top, #0c0618 0%, #1e1b4b 32%, #2e1065 62%, #4c1d95 100%);
    --dashboard-widget-border: rgba(167, 139, 250, 0.22);
}

html {
    min-height: 100%;
    background: #0b1220;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 15px;
    line-height: 1.55;
    font-weight: 400;
    -webkit-font-smoothing: subpixel-antialiased;
    -moz-osx-font-smoothing: auto;
    text-rendering: geometricPrecision;
    /* Content full-width — sidebar is overlay, not a permanent column */
    padding-left: 0;
}

body.no-sidebar-nav {
    padding-left: 0;
}

.maestro-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--sidebar-gradient);
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--sidebar-border);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: none;
    pointer-events: none;
}

.maestro-sidebar.open {
    transform: translateX(0);
    pointer-events: auto;
    box-shadow: 8px 0 28px rgba(0, 0, 0, 0.35);
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80px;
}

.sidebar-logo {
    max-height: 40px;
    max-width: 100%;
    object-fit: contain;
}

.sidebar-brand {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-brand i {
    color: var(--brand);
}

.sidebar-menu {
    flex: 1;
    overflow-y: auto;
    overflow-anchor: none;
    padding: 10px 10px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

/* Custom scrollbar for sidebar */
.sidebar-menu::-webkit-scrollbar { width: 4px; }
.sidebar-menu::-webkit-scrollbar-track { background: transparent; }
.sidebar-menu::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

.sidebar-link,
.sidebar-group-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    min-height: 40px;
    box-sizing: border-box;
    border-radius: 10px;
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.35;
    transition: background 0.15s ease, border-color 0.15s ease;
    border: 1px solid rgba(0, 0, 0, 0.5);
    background: var(--sidebar-main-card-gradient);
    background-color: var(--sidebar-main-card-bg);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
    scroll-margin-block: 8px;
}

.sidebar-group-toggle {
    width: 100%;
    margin: 0;
    font-family: inherit;
    cursor: pointer;
    text-align: left;
    appearance: none;
    -webkit-appearance: none;
}

.sidebar-link::after,
.sidebar-group-toggle::after {
    display: none;
}

.sidebar-link:hover,
.sidebar-group-toggle:hover {
    color: var(--text);
    background: var(--sidebar-main-card-hover-gradient);
    background-color: var(--sidebar-main-card-hover);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.sidebar-link.active,
.sidebar-group.open > .sidebar-group-toggle {
    color: #fff;
    background: var(--sidebar-main-card-active-gradient);
    background-color: var(--sidebar-main-card-active);
    border: 1px solid rgba(167, 139, 250, 0.45);
    overflow: visible;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.sidebar-link.active::after,
.sidebar-group.open > .sidebar-group-toggle::after {
    display: none;
}

.sidebar-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: transform 0.2s ease;
}

.sidebar-text {
    flex: 1;
    line-height: 1.25;
}
.sidebar-link.active .sidebar-icon {
    transform: scale(1.1);
}

.sidebar-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-group-chevron {
    margin-left: auto;
    font-size: 11px;
    opacity: 0.6;
    transition: transform 0.2s ease;
}

.sidebar-group.open .sidebar-group-chevron {
    transform: rotate(180deg);
}

.sidebar-subnav {
    display: none;
    flex-direction: column;
    gap: 3px;
    padding: 4px 0 4px 8px;
    margin-left: 14px;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-group.open .sidebar-subnav {
    display: flex;
}

.sidebar-sublink {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
    border-radius: 8px;
    color: var(--text);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.15s ease, border-color 0.15s ease;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: var(--sidebar-sub-card-gradient);
    background-color: var(--sidebar-sub-card-bg);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    position: relative;
    overflow: hidden;
    scroll-margin-block: 8px;
    box-sizing: border-box;
}

.sidebar-sublink::after {
    display: none;
}

.sidebar-sublink i {
    width: 16px;
    text-align: center;
    font-size: 13px;
    opacity: 1;
    flex-shrink: 0;
    color: var(--nav-accent, #c4b5fd);
}

.sidebar-sublink > span {
    flex: 1;
    min-width: 0;
    line-height: 1.2;
    white-space: nowrap;
}

.sidebar-sublink:hover {
    color: var(--text);
    background: var(--sidebar-sub-card-hover-gradient);
    background-color: var(--sidebar-sub-card-hover);
    border-color: rgba(255, 255, 255, 0.11);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.sidebar-sublink.active {
    color: #fff;
    background: var(--sidebar-sub-card-active-gradient);
    background-color: var(--sidebar-sub-card-active);
    border: 1px solid color-mix(in srgb, var(--nav-accent, #8b5cf6) 45%, transparent);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.sidebar-sublink.active::after {
    display: none;
}

/* Rând pagină: titlu | logo | steaguri */
.page-top-bar {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 24px 24px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 16px 24px;
    border-bottom: 1px solid var(--stroke);
    margin-bottom: 28px;
}

.page-top-bar-start {
    justify-self: start;
    min-width: 0;
}

.page-top-bar--hub {
    padding: 8px 16px 10px;
    margin-bottom: 12px;
    gap: 10px 14px;
    align-items: center;
}

.page-top-bar--hub-only,
.page-top-bar--hub-titled {
    display: flex;
    grid-template-columns: none;
    align-items: center;
    justify-content: space-between;
    gap: 12px 16px;
}

.page-top-bar--hub-titled {
    padding-top: 8px;
    overflow: visible;
}

.page-top-bar--hub-only .page-top-bar-hub,
.page-top-bar--hub-titled .page-top-bar-hub {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    flex-wrap: nowrap;
    width: auto;
    max-width: none;
    margin: 0;
    flex: 1 1 auto;
    min-width: 0;
}

.page-top-bar--hub-titled .page-top-bar-hub {
    align-items: center;
}

.page-top-bar--hub-only .page-top-bar-end,
.page-top-bar--hub-titled .page-top-bar-end {
    margin-left: auto;
    align-self: center;
    flex: 0 0 auto;
}

.page-top-bar--hub-titled .page-top-hub-clock-col {
    position: relative;
}

.page-top-hub-menu-title {
    position: static;
    left: auto;
    bottom: auto;
    transform: none;
    text-align: left;
    width: max-content;
    max-width: 220px;
    z-index: 2;
    white-space: normal;
    line-height: 1.2;
}

.page-top-hub-clock-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex-shrink: 0;
}

.page-top-hub-menu-title h1,
.page-top-hub-menu-title .page-top-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
    text-transform: capitalize;
}

.page-top-hub-menu-title .page-top-title-text {
    text-transform: capitalize;
}

.page-top-hub-menu-title .page-top-title-badge {
    justify-content: center;
    gap: 12px;
}

.page-top-hub-menu-title .page-top-title-icon {
    width: 38px;
    height: 38px;
    border-radius: 11px;
}

.page-top-hub-menu-title .page-top-title-icon i {
    font-size: 17px;
}

.page-top-hub-menu-title .page-top-subtitle {
    margin: 4px 0 0;
    font-size: 13px;
}

.page-top-bar-hub .page-top-live-clock,
.page-top-bar-hub .page-top-mini-cal {
    flex-shrink: 0;
}

.page-top-bar-hub-logo {
    flex-shrink: 0;
}

.page-top-dashboard-widgets {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 16px;
    margin-top: 14px;
}

.page-top-live-clock {
    padding: 8px 14px;
    border-radius: 12px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--dashboard-widget-gradient);
    background-color: var(--dashboard-widget-bg);
    border: 1px solid var(--dashboard-widget-border);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    position: relative;
    overflow: hidden;
    min-width: 0;
}

.page-top-live-clock::before {
    display: none;
}

.page-top-live-clock-live {
    display: none;
}

.page-top-live-clock-time {
    position: relative;
    z-index: 1;
    font-variant-numeric: tabular-nums;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1;
    color: #e8f4fc;
    text-shadow: none;
}

.page-top-mini-cal {
    padding: 8px 10px 9px;
    border-radius: 12px;
    min-width: 196px;
    background: var(--dashboard-widget-gradient);
    background-color: var(--dashboard-widget-bg);
    border: 1px solid var(--dashboard-widget-border);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    position: relative;
    overflow: hidden;
}

.page-top-mini-cal::before {
    display: none;
}

.page-top-mini-cal-head {
    position: relative;
    z-index: 1;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0;
    text-align: center;
    margin-bottom: 4px;
    color: #f1f5f9;
}

.page-top-mini-cal-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
}

.page-top-mini-cal-weekdays {
    margin-bottom: 2px;
}

.page-top-mini-cal-wd {
    font-size: 9px;
    font-weight: 600;
    text-align: center;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.page-top-mini-cal-day {
    font-size: 11px;
    font-weight: 500;
    text-align: center;
    padding: 2px 0;
    border-radius: 5px;
    color: #e2e8f0;
    line-height: 1.15;
}

.page-top-mini-cal-day.is-other {
    color: rgba(148, 163, 184, 0.35);
}

.page-top-mini-cal-day.is-today {
    font-weight: 700;
    color: #0f172a;
    background: linear-gradient(135deg, #fde68a 0%, #fbbf24 50%, #f59e0b 100%);
    box-shadow:
        0 0 16px rgba(251, 191, 36, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.page-top-title-badge {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.page-top-title-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.page-top-title-icon i {
    font-size: 18px;
}

.page-top-title-text {
    font-size: inherit;
    font-weight: inherit;
    line-height: 1.2;
}

.page-top-toolbar {
    max-width: 1400px;
    margin: -8px auto 16px;
    padding: 0 24px;
    display: block;
}

.page-top-toolbar .employees-toolbar {
    margin: 0;
}

.page-top-toolbar .employees-toolbar .head-company,
.page-top-toolbar .employees-toolbar .head-company-text {
    margin-right: 0;
}

.page-top-bar + .wrap,
.page-top-toolbar + .wrap {
    padding-top: 0;
}

/* Ascunde titluri/steaguri vechi duplicate în paginile migrate */
body.has-page-top-bar .wrap > .top:has(> h1):not(:has(.head-actions)):not(:has(button)):not(:has(a.btn)),
body.has-page-top-bar .wrap > div:has(> h1:only-child):not(:has(.head-actions)):not(:has(button)):not(:has(a.btn)) {
    display: none !important;
}

body.has-page-top-bar .head > .head-row > h1,
body.has-page-top-bar .head-row > h1:first-child,
body.has-page-top-bar .wrap > .top > h1:first-child,
body.has-page-top-bar .wrap > h1:first-child,
body.has-page-top-bar .card > h1:first-child {
    display: none !important;
}

body.has-page-top-bar head + body .pwa-lang-flags:not(.topbar-lang-flags) {
    display: none !important;
}


.page-top-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 6px 0;
    line-height: 1.2;
}

.page-top-subtitle {
    color: var(--muted);
    margin: 0;
    font-size: 15px;
    line-height: 1.35;
}

.page-top-bar-logo {
    justify-self: center;
}

.page-top-bar-end {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
}

.page-top-bar-end--with-cal {
    gap: 10px;
}

.page-top-bar-end .page-top-mini-cal {
    flex-shrink: 0;
    min-width: 248px;
    margin: 0;
}

.page-top-extra {
    text-align: right;
}

.page-top-date-day {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 2px;
}

.page-top-date-time {
    font-weight: 600;
    color: var(--text);
    font-size: 15px;
}

.page-logo-card {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 16px;
    text-decoration: none;
    border: 1px solid var(--stroke);
    background: var(--panel);
    box-shadow: none;
    position: relative;
    overflow: visible;
    transition: border-color 0.15s ease;
}

.page-logo-card::after {
    display: none;
}

.page-logo-card:hover {
    border-color: #334155;
    box-shadow: none;
    transform: none;
}

.page-logo-card:hover::after {
    display: none;
}

.page-logo-img {
    width: 128px;
    height: 128px;
    max-height: none;
    max-width: none;
    object-fit: contain;
    display: block;
    position: relative;
    z-index: 1;
    border-radius: 12px;
    filter: none;
}

.page-top-bar--hub .page-logo-img {
    width: 56px;
    height: 56px;
    border-radius: 10px;
}

.page-top-bar--hub .page-logo-card,
.page-top-bar--hub .page-top-bar-hub-logo {
    padding: 4px;
    border-radius: 12px;
}

/* Bara utilități — steaguri + delogare pe un singur rând (toate paginile except dashboard) */
.page-top-bar--utilities-only {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    padding: 10px 24px 12px;
    margin-bottom: 16px;
    max-width: 100%;
}

.page-top-bar--utilities-only .page-top-bar-start {
    margin-right: auto;
    min-width: 0;
}

.page-top-bar--utilities-only .page-top-bar-end {
    justify-self: auto;
    margin-left: auto;
    flex-shrink: 0;
}

.page-top-bar--utilities-only .page-top-title {
    font-size: 22px;
    margin: 0;
}

.page-top-bar--utilities-only .topbar-actions,
.page-top-bar--hub .topbar-actions {
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

.page-top-bar--utilities-only .topbar-lang-flags,
.page-top-bar--hub .topbar-lang-flags {
    flex-direction: row;
    align-items: center;
    gap: 6px;
}

.page-top-bar--utilities-only .topbar-lang-flags .pwa-lang-flag,
.page-top-bar--hub .topbar-lang-flags .pwa-lang-flag {
    width: auto;
    min-width: 0;
}

.page-top-bar--utilities-only .topbar-logout,
.page-top-bar--hub .topbar-logout {
    width: auto;
}

.topbar-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.topbar-lang-flags {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
}

.topbar-lang-flags .pwa-lang-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 0;
    background: rgba(255, 255, 255, 0.04);
    border: 2px solid var(--stroke);
    border-radius: 8px;
    padding: 3px;
    cursor: pointer;
    opacity: 0.65;
    transition: all 0.2s ease;
    line-height: 0;
}

.topbar-lang-flags .pwa-lang-flag img {
    display: block;
    width: 22px;
    height: auto;
    border-radius: 2px;
}

.topbar-lang-flags .pwa-lang-flag[aria-current="true"] {
    border-color: var(--brand);
    opacity: 1;
}

.topbar-lang-flags .pwa-lang-flag:hover {
    opacity: 1;
    border-color: rgba(255, 255, 255, 0.2);
}

.topbar-user {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 1px;
    max-width: min(280px, 42vw);
    padding: 4px 10px;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.06);
    border: 1px solid rgba(15, 23, 42, 0.12);
    line-height: 1.25;
    min-width: 0;
}

.topbar-user-name {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.topbar-user-email {
    font-size: 11px;
    font-weight: 500;
    color: #334155;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.topbar-logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: auto;
    min-width: 0;
    padding: 7px 14px;
    border-radius: 10px;
    color: var(--text);
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.25);
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.topbar-logout:hover {
    background: rgba(239, 68, 68, 0.22);
    border-color: rgba(239, 68, 68, 0.35);
}

.maestro-mobile-toggle,
.maestro-sidebar-toggle {
    display: flex;
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 76px;
    border-radius: 0 12px 12px 0;
    background: linear-gradient(180deg, #4c1d95 0%, #312e81 55%, #1e1b4b 100%);
    color: #e9d5ff;
    border: 1px solid rgba(167, 139, 250, 0.35);
    border-left: none;
    font-size: 13px;
    box-shadow: 4px 0 16px rgba(0, 0, 0, 0.28);
    z-index: 1002;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1), background 0.2s ease, color 0.2s ease;
}

.maestro-mobile-toggle:hover,
.maestro-sidebar-toggle:hover {
    background: linear-gradient(180deg, #6d28d9 0%, #4338ca 55%, #312e81 100%);
    color: #fff;
}

.maestro-mobile-toggle i,
.maestro-sidebar-toggle i {
    transition: transform 0.25s ease;
}

body.sidebar-nav-open .maestro-mobile-toggle,
body.sidebar-nav-open .maestro-sidebar-toggle {
    left: var(--sidebar-width);
}

body.sidebar-nav-open .maestro-mobile-toggle i,
body.sidebar-nav-open .maestro-sidebar-toggle i {
    transform: rotate(180deg);
}

.maestro-sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.48);
    z-index: 999;
    border: 0;
    padding: 0;
    margin: 0;
    cursor: pointer;
}

body.sidebar-nav-open .maestro-sidebar-backdrop {
    display: block;
}

@media (max-width: 1024px) {
    body.no-sidebar-nav {
        padding-left: 0;
    }

    body {
        padding-left: 0;
    }

    .page-top-bar {
        grid-template-columns: 1fr;
        padding: 16px;
        gap: 14px;
        text-align: center;
    }

    .page-top-bar--hub-only,
    .page-top-bar--hub-titled {
        grid-template-columns: 1fr;
    }

    .page-top-bar--hub-only .page-top-bar-hub,
    .page-top-bar--hub-only .page-top-bar-end,
    .page-top-bar--hub-titled .page-top-bar-hub,
    .page-top-bar--hub-titled .page-top-bar-end {
        grid-column: 1;
        grid-row: auto;
        width: 100%;
        max-width: none;
    }

    .page-top-bar--hub-titled .page-top-bar-hub {
        align-items: center;
        padding-top: 0;
    }

    .page-top-bar--hub {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .page-top-bar--hub .page-top-bar-start,
    .page-top-bar--hub .page-top-bar-hub,
    .page-top-bar--hub .page-top-bar-end {
        grid-column: 1;
        grid-row: auto;
        justify-self: center;
        width: 100%;
    }

    .page-top-bar--hub .page-top-bar-hub {
        flex-wrap: wrap;
        justify-content: center;
    }

    .page-top-bar-start,
    .page-top-bar-logo,
    .page-top-bar-end {
        justify-self: center;
    }

    .page-top-dashboard-widgets {
        justify-content: center;
        width: 100%;
    }

    .page-top-live-clock {
        width: 100%;
        max-width: 320px;
    }

    .page-top-bar-end .page-top-mini-cal {
        width: 100%;
        max-width: 320px;
    }

    .page-top-bar-end {
        flex-direction: column;
        flex-wrap: wrap;
        width: 100%;
    }

    .page-top-extra {
        text-align: center;
        width: 100%;
    }

    .topbar-logout span {
        display: none;
    }

    .topbar-user {
        align-items: center;
        max-width: min(200px, 48vw);
        padding: 3px 8px;
    }

    .topbar-user-name {
        font-size: 12px;
    }

    .topbar-user-email {
        font-size: 10px;
    }

    /* PWA / mobil: titlu pe un rând, steaguri + delogare dedesubt */
    .page-top-bar--utilities-only {
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        row-gap: 10px;
        padding: 10px 12px 12px;
        margin-bottom: 12px;
        text-align: left;
    }

    .page-top-bar--utilities-only .page-top-bar-start {
        flex: 1 1 100%;
        width: 100%;
        margin-right: 0;
        min-width: 0;
    }

    .page-top-bar--utilities-only .page-top-bar-end {
        flex: 1 1 100%;
        width: 100%;
        margin-left: 0;
        justify-content: flex-end;
    }

    .page-top-bar--utilities-only .page-top-title {
        font-size: 20px;
    }

    .page-top-bar--utilities-only .page-top-title-icon {
        width: 34px;
        height: 34px;
        border-radius: 10px;
    }

    .page-top-bar--utilities-only .page-top-title-icon i {
        font-size: 16px;
    }

    .page-logo-img {
        width: 104px;
        height: 104px;
        border-radius: 16px;
    }

    .page-logo-card {
        padding: 8px;
        border-radius: 20px;
    }
    
    .maestro-sidebar {
        /* already hidden by default; keep open state */
    }
    
    .maestro-sidebar.open {
        transform: translateX(0);
    }
    
    .maestro-mobile-toggle,
    .maestro-sidebar-toggle {
        display: flex;
    }

    /* Mobil / PWA admin: scroll orizontal pe tabele și liste late */
    html,
    body.has-maestro-sidebar {
        overflow-x: hidden;
        overflow-y: auto;
        height: auto;
        min-height: 100vh;
    }

    .wrap {
        max-width: 100%;
        min-width: 0;
        overflow-x: visible;
    }

    .section,
    .list-top.section {
        max-width: 100%;
        min-width: 0;
        overflow: visible;
    }

    .wrap .card,
    .wrap > .card {
        max-width: 100%;
        min-width: 0;
        overflow-x: visible;
        overflow-y: visible;
    }

    .table-wrap,
    .list-top-table-wrap,
    .reports-table-wrap,
    .daily-table-wrap,
    .calendar-wrapper,
    .fin-table-wrap,
    .card-tabs-bar,
    .consum-tabs-scroll,
    .consum-subtabs-scroll {
        display: flex !important;
        flex-wrap: nowrap;
        align-items: center;
        width: 100%;
        max-width: 100%;
        overflow-x: scroll !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-x pan-y;
        overscroll-behavior-x: contain;
        scrollbar-width: thin;
    }

    /* Foaie colectivă: UN singur scrollbar orizontal pe #collectiveScroll
       (nu pe body-wrap — altfel apar 2 bare jos) */
    .collective-scroll,
    #collectiveScroll {
        display: block !important;
        width: 100%;
        max-width: 100%;
        overflow-x: auto !important;
        overflow-y: visible !important;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-x pan-y;
        overscroll-behavior-x: contain;
        scrollbar-width: thin;
    }
    .collective-wrap,
    .collective-body-wrap,
    .collective-scroll .collective-body-wrap,
    .collective-head-wrap,
    .collective-head-scroll {
        display: block !important;
        overflow-x: visible !important;
        overflow-y: visible !important;
        max-width: none;
        width: max-content;
        min-width: 0;
    }
    table.collective-table {
        width: max-content !important;
        min-width: 0 !important;
        max-width: none !important;
    }

    .consum-tabs-scroll {
        gap: 8px;
    }

    .consum-subtabs-scroll {
        gap: 6px;
    }

    /* Sticky columns blochează swipe orizontal pe iOS */
    .emp-table .col-sticky,
    .emp-table thead th.col-sticky {
        position: static !important;
        left: auto !important;
        z-index: auto !important;
    }

    .table-wrap > table,
    .list-top-table-wrap > table,
    .reports-table-wrap > table,
    .daily-table-wrap > table,
    .fin-table-wrap > table,
    table.compact-table,
    table.excelTable,
    table.filterableTable {
        width: max-content;
        min-width: 100%;
        max-width: none;
        table-layout: auto !important;
    }

    .fin-table-wrap > table th,
    .fin-table-wrap > table td {
        white-space: nowrap;
    }

    .fin-table-wrap > table td[style*="word-wrap"],
    .fin-table-wrap > table td[style*="max-width"] {
        white-space: normal;
        min-width: 140px;
        max-width: 220px;
    }

    #maestro-table-scroll-bar,
    #emp-floating-scrollbar,
    #floating-scrollbar {
        display: none !important;
    }

    .tree-company,
    .tree-location-item {
        overflow: visible;
    }

    .tree-company-header,
    .tree-location-header {
        flex-wrap: wrap;
        align-items: flex-start;
        gap: 10px;
    }

    .tree-company-title,
    .tree-location-title {
        min-width: 0;
        flex: 1 1 160px;
    }

    .tree-company-actions {
        flex: 1 1 auto;
        flex-wrap: wrap;
        justify-content: flex-start;
        max-width: 100%;
        gap: 8px;
    }
}

/* PWA / mobil: header hub — ceas + logo + calendar pe un rând */
@media (max-width: 1024px) {
    .page-top-bar--hub {
        grid-template-columns: 1fr !important;
        padding: 12px 16px 14px !important;
    }

    .page-top-bar--hub .page-top-bar-hub {
        display: flex !important;
        flex-wrap: wrap;
        justify-content: center !important;
        align-items: center !important;
        gap: 10px 14px !important;
        width: 100% !important;
        max-width: none !important;
        grid-column: 1 !important;
    }

    .page-top-bar--hub .page-top-bar-end {
        grid-column: 1 !important;
        justify-content: center !important;
        width: 100% !important;
    }

    .page-top-bar--hub .page-top-live-clock {
        min-width: 148px;
        padding: 12px 16px;
    }

    .page-top-bar--hub .page-top-mini-cal {
        min-width: 148px;
        padding: 10px 12px 12px;
    }

    .page-top-bar--hub .page-top-live-clock-time {
        font-size: 26px;
    }

    .topbar-actions {
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important;
        flex-wrap: wrap;
        gap: 8px !important;
    }

    .topbar-lang-flags {
        flex-direction: row !important;
        align-items: center !important;
        gap: 6px !important;
    }

    .topbar-lang-flags .pwa-lang-flag {
        width: auto;
        min-width: 0;
    }
}

/* PWA instalată: header hub clasic (ceas + calendar) rămâne ascuns — se folosește pwa-portal (doar logo) */
html.maestro-pwa-standalone .page-top-bar--hub .page-top-hub-clock-col,
html.maestro-pwa-standalone .page-top-bar--hub .page-top-mini-cal,
html.maestro-pwa-standalone .page-top-bar--hub .page-top-live-clock {
    display: none !important;
}

@media (display-mode: standalone), (display-mode: fullscreen), (display-mode: minimal-ui) {
    .page-top-bar--hub .page-top-hub-clock-col,
    .page-top-bar--hub .page-top-mini-cal,
    .page-top-bar--hub .page-top-live-clock {
        display: none !important;
    }
}

html.maestro-pwa-standalone .page-top-bar--hub {
    grid-template-columns: 1fr auto !important;
}

html.maestro-pwa-standalone .page-top-bar--hub .page-top-bar-hub {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 14px !important;
    flex-wrap: wrap;
}

html.maestro-pwa-standalone .topbar-actions {
    flex-direction: row !important;
    align-items: center !important;
    gap: 8px !important;
}

html.maestro-pwa-standalone .topbar-lang-flags {
    flex-direction: row !important;
    gap: 6px !important;
}

/* Footer copyright — toate paginile */
.maestro-page-footer {
    margin-top: 40px;
    padding: 20px 16px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.maestro-page-footer p {
    margin: 0;
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.01em;
    line-height: 1.4;
}

/* ==========================================================================
   CITIBILITATE — text clar pe Windows, contrast mai bun
   ========================================================================== */
input,
select,
textarea,
button,
.btn,
label,
table th,
table td,
.small,
.tab,
.tabs a,
h1, h2, h3, h4, h5, h6,
p, span, a, li {
    -webkit-font-smoothing: subpixel-antialiased;
    -moz-osx-font-smoothing: auto;
}

body table th {
    color: #d4dce8 !important;
    font-weight: 600;
}

body table td {
    color: #f1f5f9;
}

body .small,
body label {
    color: var(--muted);
}

.sidebar-sublink i,
.sidebar-icon i {
    opacity: 1;
}

.page-top-mini-cal-wd {
    color: #b8c5d6;
}

.page-top-mini-cal-day.is-other {
    color: rgba(200, 209, 220, 0.55);
}

/* ==========================================================================
   FILTRE & CĂUTARE — font mic, spațiere strânsă (ca tabelele)
   ========================================================================== */
body.has-maestro-sidebar .wrap label,
body.has-maestro-sidebar .card label,
body.has-maestro-sidebar .filters label,
body.has-maestro-sidebar .filter-col label,
body.has-maestro-sidebar .row label,
body.has-maestro-sidebar .cereri-hr label,
body.has-maestro-sidebar .audit-filter label,
body.has-maestro-sidebar .hr-calendar-page label,
body.has-maestro-sidebar .list-top-filters label,
body.has-maestro-sidebar .form-compact label,
body.has-maestro-sidebar .collective-period-wrap > label:first-child,
body.has-maestro-sidebar .time-adjust-panel .time-adjust-label {
    font-size: 12px !important;
    font-weight: 600 !important;
    margin-bottom: 3px !important;
    line-height: 1.25 !important;
    color: #cbd5e1 !important;
}

body.has-maestro-sidebar .wrap input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]),
body.has-maestro-sidebar .wrap select,
body.has-maestro-sidebar .wrap textarea,
body.has-maestro-sidebar .card input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]),
body.has-maestro-sidebar .card select,
body.has-maestro-sidebar .card textarea,
body.has-maestro-sidebar .filters input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
body.has-maestro-sidebar .filters select,
body.has-maestro-sidebar .filters textarea,
body.has-maestro-sidebar .cereri-hr input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
body.has-maestro-sidebar .cereri-hr select,
body.has-maestro-sidebar .audit-filter input,
body.has-maestro-sidebar .audit-filter select {
    font-size: 13px !important;
    padding: 5px 8px !important;
    border-radius: 8px !important;
    line-height: 1.25 !important;
    min-height: 0;
}

body.has-maestro-sidebar .wrap .row,
body.has-maestro-sidebar .filters,
body.has-maestro-sidebar .cereri-hr .filters,
body.has-maestro-sidebar .hr-cal-filters-card .filters {
    gap: 8px !important;
}

body.has-maestro-sidebar .wrap .row {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)) !important;
}

body.has-maestro-sidebar .filters,
body.has-maestro-sidebar .hr-cal-filters-card .filters {
    padding: 10px 12px !important;
    margin-bottom: 10px !important;
}

body.has-maestro-sidebar .wrap .small,
body.has-maestro-sidebar .card .small,
body.has-maestro-sidebar .filters-hint,
body.has-maestro-sidebar .collective-period-hint {
    font-size: 13px !important;
    line-height: 1.35 !important;
}

body.has-maestro-sidebar .wrap .btn,
body.has-maestro-sidebar .card .btn,
body.has-maestro-sidebar .filters .btn {
    font-size: 13px !important;
    padding: 5px 12px !important;
    min-height: 0 !important;
    border-radius: 8px !important;
}

body.has-maestro-sidebar .employee-ac-item {
    font-size: 13px !important;
    padding: 6px 8px !important;
}

body.has-maestro-sidebar .collective-year-row select,
body.has-maestro-sidebar .collective-month-btn {
    font-size: 13px !important;
    padding: 4px 8px !important;
}

body.has-maestro-sidebar .hr-legend-item {
    font-size: 12px !important;
}

body.has-maestro-sidebar .wrap .card > form > .row {
    margin-bottom: 0;
}

body.has-maestro-sidebar .wrap form > div[style*="margin-top"] {
    margin-top: 6px !important;
    gap: 6px !important;
}

body.has-maestro-sidebar .wrap .card:has(.row),
body.has-maestro-sidebar .wrap .card:has(.filters),
body.has-maestro-sidebar .wrap .card:has(#reportsFilterForm) {
    padding: 12px 14px !important;
}

/* ==========================================================================
   TABELE — 13px uniform în admin
   ========================================================================== */
body.has-maestro-sidebar table {
    font-size: 13px !important;
}

body.has-maestro-sidebar table th,
body.has-maestro-sidebar table td {
    padding: 4px 8px !important;
    line-height: 1.35 !important;
    vertical-align: middle;
}

body.has-maestro-sidebar table th {
    font-size: 12px !important;
    font-weight: 600 !important;
}

/* ==========================================================================
   MODALE & POPUP-URI — 13px uniform (toate variantele din proiect)
   ========================================================================== */
.modal .box,
.modal .panel,
.modal-content,
.modal-inner,
.modal-backdrop > .modal,
#modal .box,
#deptModal .box,
.add-loc-modal .box,
#createModal .panel,
#editModal .panel,
#createCompanyModal .box,
#editModal .box,
#editAdvanceModal .modal-content,
#editRepaymentModal .modal-content {
    padding: 14px 16px 12px !important;
    font-size: 13px !important;
    line-height: 1.35 !important;
    border-radius: 12px !important;
}

.modal .box h3,
.modal .panel h3,
.modal-content h3,
.modal-inner h3,
.modal-header h3,
.modal-backdrop > .modal h3,
#modal .box h3,
#deptModal h3,
#createModal .panel h3,
#editModal .panel h3,
#createCompanyModal .box h3 {
    font-size: 15px !important;
    margin: 0 0 6px !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
}

.modal .box h4,
.modal .panel h4,
.modal h4,
.modal-backdrop > .modal h4,
.location-edit-dropdown h4 {
    font-size: 13px !important;
    margin: 0 0 6px !important;
    font-weight: 600 !important;
}

.modal .box label,
.modal .panel label,
.modal-content label,
.modal-inner label,
.modal-backdrop > .modal label,
#modal .box label,
#deptModal label,
.location-edit-dropdown label,
.modal-form-grid label,
.modal .grid2 label {
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #cbd5e1 !important;
    margin: 0 0 2px !important;
    line-height: 1.25 !important;
}

.modal .box input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]),
.modal .box select,
.modal .box textarea,
.modal .panel input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]),
.modal .panel select,
.modal .panel textarea,
.modal-content input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]),
.modal-content select,
.modal-content textarea,
.modal-inner input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]),
.modal-inner select,
.modal-inner textarea,
.modal-backdrop > .modal input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]),
.modal-backdrop > .modal select,
.modal-backdrop > .modal textarea,
#modal .box input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]),
#modal .box select,
#modal .box textarea,
#deptModal input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
#deptModal select,
.location-edit-dropdown input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]),
.location-edit-dropdown select,
.location-edit-dropdown textarea {
    font-size: 13px !important;
    padding: 4px 8px !important;
    border-radius: 6px !important;
    line-height: 1.25 !important;
    min-height: 0 !important;
}

.modal .grid2,
.modal .modal-form-grid,
.modal-content .grid2,
.modal-inner .grid2,
.modal-backdrop > .modal .grid,
#modal .box .row,
#modal .box .grid2,
#modal #editForm .row {
    gap: 6px 10px !important;
}

.modal .modal-check-label,
.modal .box .modal-check-label,
.modal .panel .modal-check-label,
.modal-backdrop > .modal .modal-check-label {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    margin: 0 !important;
    font-weight: 400 !important;
    font-size: 13px !important;
    color: var(--text) !important;
    cursor: pointer;
}

.modal .modal-check-label input[type="checkbox"],
.modal .modal-check-label input[type="radio"],
.modal .box .modal-check-label input[type="checkbox"],
.modal .panel .modal-check-label input[type="checkbox"] {
    width: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    transform: scale(1.05);
}

.modal .btn-sm,
.modal .btn-small,
.modal-actions .btn-sm,
.modal-actions .btn-small,
.modal-actions button,
.modal .actions .btn-sm,
.modal .actions .btn-small,
.modal .modal-actions .btn-sm,
.modal-header + form .btn-sm {
    font-size: 12px !important;
    padding: 4px 10px !important;
    border-radius: 6px !important;
    min-height: 0 !important;
}

.modal-actions,
.modal .modal-actions,
.modal .actions,
.modal-content .modal-actions {
    gap: 8px !important;
    margin-top: 10px !important;
}

.modal-subsection {
    padding: 8px 10px !important;
    gap: 6px !important;
    margin-top: 4px !important;
    border-radius: 8px !important;
}

.modal .edit-employee-id-row {
    margin: 0 0 6px !important;
    padding: 4px 8px !important;
    font-size: 12px !important;
}

.location-edit-dropdown {
    padding: 10px 12px !important;
    font-size: 13px !important;
}

#modal #eshiftRows .shift-row span,
#modal #eshiftRows .shift-row label,
#modal #eshiftRows .shift-row input,
#modal #eshiftRows .shift-row select,
#modal #eshiftRows .remove-shift {
    font-size: 13px !important;
}

#modal #eshiftRows .shift-row input,
#modal #eshiftRows .shift-row select {
    padding: 4px 8px !important;
}

/* Dashboard: ceas, logo, calendar — aceeași linie, mărime medie, grupate dreapta */
.page-top-bar.page-top-bar--compact {
    display: flex !important;
    flex-wrap: nowrap;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 10px 14px !important;
    padding: 8px 16px 10px !important;
    margin-bottom: 12px !important;
}

.page-top-bar.page-top-bar--compact .page-top-bar-hub {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    justify-content: flex-end !important;
    gap: 10px !important;
    width: auto !important;
    max-width: none !important;
    flex: 0 0 auto;
    margin-left: 0;
}

.page-top-bar.page-top-bar--compact .page-top-bar-end {
    width: auto !important;
    margin-left: 4px;
    justify-content: flex-end !important;
    align-items: center !important;
    flex: 0 0 auto;
}

.page-top-bar.page-top-bar--compact .page-logo-card,
.page-top-bar.page-top-bar--compact .page-top-bar-hub-logo {
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 6px !important;
    border-radius: 12px !important;
    box-sizing: border-box;
    align-self: stretch;
}

.page-top-bar.page-top-bar--compact .page-logo-img {
    width: auto !important;
    height: 100% !important;
    max-height: 100% !important;
    max-width: 132px;
    object-fit: contain;
}

.page-top-bar.page-top-bar--compact .page-top-live-clock {
    position: relative;
    min-width: 0 !important;
    width: auto !important;
    max-width: none !important;
    height: auto !important;
    align-self: stretch;
    padding: 10px 22px 8px !important;
    justify-content: center !important;
    overflow: hidden;
    background: linear-gradient(180deg, #252b38 0%, #151820 100%) !important;
    border: 1px solid rgba(34, 211, 238, 0.32) !important;
    box-shadow:
        0 0 22px rgba(34, 211, 238, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

.page-top-bar.page-top-bar--compact .page-top-live-clock-live {
    position: absolute;
    top: 6px;
    left: 10px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.16em;
    color: #67e8f9;
    opacity: 0.85;
    z-index: 2;
}

.page-top-bar.page-top-bar--compact .page-top-live-clock-live::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #22d3ee;
    box-shadow: 0 0 8px #22d3ee;
    animation: clkLiveDot 1.4s ease-in-out infinite;
}

.page-top-bar.page-top-bar--compact .page-top-live-clock-time {
    display: flex !important;
    align-items: baseline;
    gap: 2px;
    margin-top: 4px;
    font-size: 5.1rem !important;
    line-height: 0.9 !important;
    font-family: ui-monospace, "Cascadia Mono", "Segoe UI Variable Display", Consolas, monospace !important;
    font-weight: 700 !important;
    letter-spacing: 0.04em;
    color: #e0faff !important;
    text-shadow: 0 0 18px rgba(34, 211, 238, 0.55);
    white-space: nowrap;
}

.page-top-bar.page-top-bar--compact .clk-colon {
    color: #22d3ee;
    margin: 0 1px;
}

.page-top-bar.page-top-bar--compact .clk-colon-pulse {
    animation: clkColonPulse 1s step-end infinite;
}

.page-top-bar.page-top-bar--compact .clk-s {
    font-size: inherit;
    opacity: 1;
    color: inherit;
}

@keyframes clkColonPulse {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0.2; }
}

@keyframes clkLiveDot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.35; transform: scale(0.75); }
}

.page-top-bar.page-top-bar--compact .page-top-mini-cal {
    min-width: 200px !important;
    max-width: 228px;
    padding: 8px 10px 9px !important;
    align-self: stretch;
}

@media (max-width: 900px) {
    .page-top-bar.page-top-bar--compact {
        flex-wrap: wrap;
        justify-content: flex-end !important;
    }

    .page-top-bar.page-top-bar--compact .page-top-bar-end {
        width: auto !important;
        justify-content: flex-end !important;
    }
}
