/**
 * Lom — Shared component styles (dashboard cards, files upload/modals)
 * Requires global.css design tokens
 */

/* ── Dashboard — unified icon size & stroke ── */
/* Unified icon size & stroke (card headers + stat cards + lucide) */
.emp-dashboard--modern .emp-dash-detail svg.lucide-icon,
.emp-dashboard--modern .emp-dash-detail svg.lucide,
.emp-dashboard--modern .dw-card-icon svg,
.emp-dashboard--modern .dw-stat-card__icon svg {
    width: var(--dw-icon-size) !important;
    height: var(--dw-icon-size) !important;
}

.emp-dashboard--modern .emp-dash-detail svg.lucide-icon,
.emp-dashboard--modern .emp-dash-detail svg.lucide,
.emp-dashboard--modern .dw-card-icon svg:not(.dw-sidebar-match-icon),
.emp-dashboard--modern .dw-stat-card__icon svg:not(.dw-sidebar-match-icon) {
    stroke-width: var(--dw-icon-stroke) !important;
}

.emp-dashboard--modern .emp-dash-detail svg.lucide-icon [stroke]:not([stroke="none"]),
.emp-dashboard--modern .emp-dash-detail svg.lucide [stroke]:not([stroke="none"]),
.emp-dashboard--modern .dw-card-icon svg:not(.dw-sidebar-match-icon) [stroke]:not([stroke="none"]),
.emp-dashboard--modern .dw-stat-card__icon svg:not(.dw-sidebar-match-icon) [stroke]:not([stroke="none"]) {
    stroke-width: var(--dw-icon-stroke) !important;
}

.emp-dashboard--modern .dw-sidebar-match-icon,
.emp-dashboard--modern .dw-sidebar-match-icon [stroke]:not([stroke="none"]) {
    stroke-width: var(--dw-icon-stroke-16) !important;
}

/* ── Dashboard — grid spacing ── */
/* ── Grid spacing ── */
.emp-dashboard--modern .emp-dash-detail {
    margin-top: 0;
    margin-left: 0;
    margin-right: 0;
    width: 100%;
    max-width: 100%;
}

.emp-dashboard--modern .emp-dash-detail > [class*="col-"] {
    padding-left: 6px;
    padding-right: 6px;
}

.emp-dashboard--modern .emp-dash-detail .row {
    margin-left: -6px;
    margin-right: -6px;
}

.emp-dashboard--modern .emp-dash-detail .row > [class*="col-"] {
    padding-left: 6px;
    padding-right: 6px;
}

.emp-dashboard--modern .emp-dash-detail .card,
.emp-dashboard--modern .emp-dash-detail .dw-stat-card,
.emp-dashboard--modern .emp-dash-detail .dh {
    max-width: 100%;
}

/* ── Dashboard — cards & card header icons ── */
/* ── Cards (all widgets) ── */
.emp-dashboard--modern .emp-dash-detail .card,
.emp-dashboard--modern .emp-dash-detail .card.bg-white {
    background: var(--dw-surface) !important;
    border: 1px solid var(--dw-border) !important;
    border-radius: var(--dw-radius) !important;
    box-shadow: none !important;
    margin-bottom: 10px !important;
    overflow: hidden;
}

.emp-dashboard--modern .emp-dash-detail .card.ph-item,
.emp-dashboard--modern .emp-dash-detail .ph-item {
    display: block !important;
    flex-wrap: nowrap !important;
    padding: 0 !important;
    margin-bottom: 10px !important;
    background: var(--dw-surface) !important;
}

.emp-dashboard--modern .emp-dash-detail .card.ph-item::before,
.emp-dashboard--modern .emp-dash-detail .ph-item::before {
    display: none !important;
}

.emp-dashboard--modern .emp-dash-detail .card-header {
    background: var(--dw-surface) !important;
    border-bottom: none !important;
    padding: 14px 18px 10px !important;
}

.emp-dashboard--modern .emp-dash-detail .card-header .dw-card-header__lead {
    align-items: center;
    gap: 12px;
    min-height: 37px;
}

.emp-dashboard--modern .emp-dash-detail .card-header .dw-card-header__title {
    line-height: 1.35;
}

/* ── Card header icon (all widgets and cards) ── */
.dw-card-icon,
.emp-dashboard--modern .dw-card-icon,
.emp-dashboard--modern .emp-dash-detail .dw-card-icon,
.dw-stat-card__icon,
.emp-dashboard--modern .dw-stat-card__icon {
    --dw-icon-tone: var(--dw-accent, #3b82f6);
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    border-radius: 50% !important;
    margin: 0 !important;
    flex-shrink: 0;
    line-height: 1;
    font-size: 15px;
    color: var(--dw-icon-tone);
    background: color-mix(in srgb, var(--dw-icon-tone) 12%, transparent) !important;
}

.dw-stat-card__icon i,
.dw-stat-card__icon .fa,
.dw-card-icon i,
.dw-card-icon .fa {
    font-size: 15px;
    line-height: 1;
    color: var(--dw-icon-tone);
}

.dw-card-icon svg,
.emp-dashboard--modern .dw-card-icon svg,
.dw-stat-card__icon svg,
.emp-dashboard--modern .dw-stat-card__icon svg {
    width: var(--dw-icon-size, 18px) !important;
    height: var(--dw-icon-size, 18px) !important;
    display: block;
    flex-shrink: 0;
    stroke: currentColor;
    color: inherit;
}

.dw-card-icon svg path[fill]:not([fill="none"]):not([fill="transparent"]),
.dw-stat-card__icon svg path[fill]:not([fill="none"]):not([fill="transparent"]),
.dw-card-icon svg circle[fill]:not([fill="none"]),
.dw-stat-card__icon svg circle[fill]:not([fill="none"]) {
    fill: none !important;
}

.dw-card-icon svg path[stroke]:not([stroke="none"]),
.dw-stat-card__icon svg path[stroke]:not([stroke="none"]),
.dw-card-icon svg circle[stroke]:not([stroke="none"]),
.dw-stat-card__icon svg circle[stroke]:not([stroke="none"]) {
    stroke: currentColor !important;
}

.dw-card-icon--green,
.emp-dashboard--modern .dw-card-icon--green,
.emp-dashboard--modern .emp-dash-detail .dw-card-icon--green,
.dw-stat-card__icon--green,
.emp-dashboard--modern .dw-stat-card__icon--green {
    --dw-icon-tone: #22c55e;
}

.dw-card-icon--blue,
.emp-dashboard--modern .dw-card-icon--blue,
.emp-dashboard--modern .emp-dash-detail .dw-card-icon--blue,
.dw-stat-card__icon--blue,
.emp-dashboard--modern .dw-stat-card__icon--blue {
    --dw-icon-tone: #3b82f6;
}

.dw-card-icon--purple,
.emp-dashboard--modern .dw-card-icon--purple,
.emp-dashboard--modern .emp-dash-detail .dw-card-icon--purple,
.dw-stat-card__icon--purple,
.emp-dashboard--modern .dw-stat-card__icon--purple {
    --dw-icon-tone: #8b5cf6;
}

.dw-card-icon--amber,
.emp-dashboard--modern .dw-card-icon--amber,
.emp-dashboard--modern .emp-dash-detail .dw-card-icon--amber,
.dw-stat-card__icon--amber,
.emp-dashboard--modern .dw-stat-card__icon--amber {
    --dw-icon-tone: #f59e0b;
}

.dw-card-icon--orange,
.emp-dashboard--modern .dw-card-icon--orange,
.emp-dashboard--modern .emp-dash-detail .dw-card-icon--orange,
.dw-stat-card__icon--orange,
.emp-dashboard--modern .dw-stat-card__icon--orange {
    --dw-icon-tone: #fb6340;
}

.dw-card-icon--red,
.emp-dashboard--modern .dw-card-icon--red,
.emp-dashboard--modern .emp-dash-detail .dw-card-icon--red,
.dw-stat-card__icon--red,
.emp-dashboard--modern .dw-stat-card__icon--red {
    --dw-icon-tone: #ef4444;
}

.emp-dashboard--modern .emp-dash-detail .card-header .mx-2:not(.dw-card-icon),
.emp-dashboard--modern .emp-dash-detail .card-header > .d-flex > span:first-child:not(.dw-card-icon) {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: auto;
    height: auto;
    min-width: 0;
    margin-left: 0 !important;
    margin-right: 0 !important;
    border-radius: 0;
    background: transparent !important;
}

.emp-dashboard--modern .emp-dash-detail .card-header h4,
.emp-dashboard--modern .emp-dash-detail .card-header .f-18,
.emp-dashboard--modern .emp-dash-detail .card-header .dw-card-header__title {
    font-size: 15px !important;
    font-weight: 600 !important;
    color: var(--dw-text) !important;
    margin: 0 !important;
}

.emp-dashboard--modern .emp-dash-detail .card-body {
    padding: 14px 18px 18px !important;
}

.emp-dashboard--modern .emp-dash-detail .card-body.p-0 {
    padding: 0 !important;
}

.emp-dashboard--modern .emp-dash-detail .card-body.pt-2 {
    padding-top: 0 !important;
}

/* ── Reports pages — Metric & Stats icon containers (border-radius: 50%) ── */
.case-report-metric-icon,
.case-report-metric-card__badge,
.case-report-metric-card .icon,
.case-report-metric-card i.rounded-circle,
.stats-section .case-report-metric-card__badge,
.stats-section .case-report-metric-icon,
.stats-section .rounded-circle,
.app-report-shell .stat-icon,
.app-report-shell .dw-stat-card__icon,
.app-report-shell .stat-card__icon,
.app-report-shell .metric-icon,
.case-report-shell .stat-icon,
.case-report-shell .dw-stat-card__icon,
.case-report-shell .stat-card__icon,
.case-report-shell .metric-icon,
.case-report-shell .case-report-metric-card__badge,
.case-report-shell .case-report-metric-icon {
    border-radius: 50% !important;
}

/* ── Modern Report Metric Stat Cards ── */
.case-report-metric-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: auto !important;
    padding: 16px 20px !important;
    border-radius: 12px !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: none !important;
    transition: border-color 0.2s ease;
}

.case-report-metric-card::before {
    display: none !important;
    content: none !important;
}

.case-report-metric-card:hover {
    border-color: #cbd5e1 !important;
    transform: none !important;
    box-shadow: none !important;
}

.case-report-metric-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

body.rtl .case-report-metric-card__header {
    flex-direction: row-reverse;
}

.case-report-metric-card__title {
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #64748b !important;
    line-height: 1.4;
    margin: 0;
}

body.rtl .case-report-metric-card__title {
    text-align: left;
    margin-inline-end: auto;
}

.case-report-metric-card__badge,
.case-report-metric-icon {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 22px !important;
    flex-shrink: 0;
    line-height: 1 !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.case-report-metric-card__badge i,
.case-report-metric-card__badge svg,
.case-report-metric-icon i,
.case-report-metric-icon svg {
    font-size: 22px !important;
    line-height: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    width: 1em !important;
    height: 1em !important;
    margin: 0 !important;
    padding: 0 !important;
    color: inherit !important;
}

.case-report-metric-card__badge i::before,
.case-report-metric-icon i::before {
    display: block !important;
    line-height: 1 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.case-report-metric-card__value {
    font-size: 24px !important;
    font-weight: 700 !important;
    line-height: 1.25;
    color: #0f172a !important;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    white-space: nowrap;
    word-break: keep-all;
    overflow-wrap: normal;
    flex-shrink: 0;
}

body.rtl .case-report-metric-card__value {
    text-align: left;
}

/* ── Card Variants: Clean neutral background and borders ── */
.case-report-metric-card--primary,
.case-report-metric-card--success,
.case-report-metric-card--danger,
.case-report-metric-card--warning,
.case-report-metric-card--info {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: none !important;
}

.case-report-metric-card--primary::before,
.case-report-metric-card--success::before,
.case-report-metric-card--danger::before,
.case-report-metric-card--warning::before,
.case-report-metric-card--info::before {
    display: none !important;
    content: none !important;
}

/* ── Badges: colored icon with soft low-opacity background as it was ── */
.case-report-metric-card--primary .case-report-metric-card__badge,
.case-report-metric-icon--primary {
    background: #eff6ff !important;
    color: #2563eb !important;
}
.case-report-metric-card--primary .case-report-metric-card__badge i,
.case-report-metric-card--primary .case-report-metric-card__badge svg {
    color: #2563eb !important;
}

.case-report-metric-card--success .case-report-metric-card__badge,
.case-report-metric-icon--success {
    background: #ecfdf5 !important;
    color: #059669 !important;
}
.case-report-metric-card--success .case-report-metric-card__badge i,
.case-report-metric-card--success .case-report-metric-card__badge svg {
    color: #059669 !important;
}

.case-report-metric-card--danger .case-report-metric-card__badge,
.case-report-metric-icon--danger {
    background: #fef2f2 !important;
    color: #dc2626 !important;
}
.case-report-metric-card--danger .case-report-metric-card__badge i,
.case-report-metric-card--danger .case-report-metric-card__badge svg {
    color: #dc2626 !important;
}

.case-report-metric-card--warning .case-report-metric-card__badge,
.case-report-metric-icon--warning {
    background: #fffbeb !important;
    color: #d97706 !important;
}
.case-report-metric-card--warning .case-report-metric-card__badge i,
.case-report-metric-card--warning .case-report-metric-card__badge svg {
    color: #d97706 !important;
}

.case-report-metric-card--info .case-report-metric-card__badge,
.case-report-metric-icon--info {
    background: #f0f9ff !important;
    color: #0284c7 !important;
}
.case-report-metric-card--info .case-report-metric-card__badge i,
.case-report-metric-card--info .case-report-metric-card__badge svg {
    color: #0284c7 !important;
}

/* ── Dark Theme Overrides ── */
body.dark-theme .case-report-metric-card {
    background: #181c34 !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

body.dark-theme .case-report-metric-card__title {
    color: #94a3b8 !important;
}

body.dark-theme .case-report-metric-card__value {
    color: #f1f5f9 !important;
}

body.dark-theme .case-report-metric-card--primary .case-report-metric-card__badge,
body.dark-theme .case-report-metric-icon--primary {
    background: rgba(37, 99, 235, 0.16) !important;
    color: #60a5fa !important;
}

body.dark-theme .case-report-metric-card--success .case-report-metric-card__badge,
body.dark-theme .case-report-metric-icon--success {
    background: rgba(16, 185, 129, 0.16) !important;
    color: #34d399 !important;
}

body.dark-theme .case-report-metric-card--danger .case-report-metric-card__badge,
body.dark-theme .case-report-metric-icon--danger {
    background: rgba(239, 68, 68, 0.16) !important;
    color: #f87171 !important;
}

body.dark-theme .case-report-metric-card--warning .case-report-metric-card__badge,
body.dark-theme .case-report-metric-icon--warning {
    background: rgba(245, 158, 11, 0.16) !important;
    color: #fbbf24 !important;
}

body.dark-theme .case-report-metric-card--info .case-report-metric-card__badge,
body.dark-theme .case-report-metric-icon--info {
    background: rgba(14, 165, 233, 0.16) !important;
    color: #38bdf8 !important;
}

/* ── Dashboard — KPI stat cards ── */
/* ── KPI stat cards ── */
.emp-dashboard--modern .dw-stat-card,
.notifications-page .dw-stat-card,
.dw-stat-card {
    background: var(--dw-surface, #ffffff);
    border: 1px solid var(--dw-border, #e2e8f0);
    border-radius: var(--dw-radius, 12px);
    box-shadow: none;
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    height: 100%;
    min-height: 96px;
    transition: border-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    text-decoration: none !important;
    color: inherit;
}

.emp-dashboard--modern .dw-stat-card:hover,
.notifications-page .dw-stat-card:hover,
.dw-stat-card:hover {
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

.dw-stat-card--active {
    border-color: #3b82f6 !important;
    background: #f8faff !important;
}

.emp-dashboard--modern .dw-stat-card__head,
.notifications-page .dw-stat-card__head,
.dw-stat-card__head {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin-bottom: 12px;
}

.emp-dashboard--modern .dw-stat-card__title,
.notifications-page .dw-stat-card__title,
.dw-stat-card__title {
    font-size: 15px;
    font-weight: 600;
    color: var(--dw-text, #1e293b);
    margin: 0;
    width: auto;
    flex: 1;
    line-height: 1.35;
}

.emp-dashboard--modern .dw-stat-card__metrics,
.notifications-page .dw-stat-card__metrics,
.dw-stat-card__metrics {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    width: 100%;
}

.emp-dashboard--modern .dw-stat-card__metrics:has(.dw-stat-card__metric:nth-child(2):last-child),
.emp-dashboard--modern .dw-stat-card__metrics--spread,
.notifications-page .dw-stat-card__metrics:has(.dw-stat-card__metric:nth-child(2):last-child),
.notifications-page .dw-stat-card__metrics--spread,
.dw-stat-card__metrics:has(.dw-stat-card__metric:nth-child(2):last-child),
.dw-stat-card__metrics--spread {
    justify-content: space-between;
    align-items: flex-start;
    gap: 32px;
}

.emp-dashboard--modern .dw-stat-card__metrics:has(.dw-stat-card__metric:nth-child(2):last-child) .dw-stat-card__metric,
.emp-dashboard--modern .dw-stat-card__metrics--spread .dw-stat-card__metric,
.notifications-page .dw-stat-card__metrics:has(.dw-stat-card__metric:nth-child(2):last-child) .dw-stat-card__metric,
.notifications-page .dw-stat-card__metrics--spread .dw-stat-card__metric,
.dw-stat-card__metrics:has(.dw-stat-card__metric:nth-child(2):last-child) .dw-stat-card__metric,
.dw-stat-card__metrics--spread .dw-stat-card__metric {
    flex: 0 0 auto;
    min-width: 72px;
}

.emp-dashboard--modern .dw-stat-card__metric,
.notifications-page .dw-stat-card__metric,
.dw-stat-card__metric {
    margin: 0;
}

.emp-dashboard--modern .dw-stat-card__value,
.notifications-page .dw-stat-card__value,
.dw-stat-card__value {
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.1;
    margin: 0;
}

.emp-dashboard--modern .dw-stat-card__label,
.notifications-page .dw-stat-card__label,
.dw-stat-card__label {
    display: block;
    font-size: 11.5px;
    font-weight: 500;
    color: #94a3b8;
    margin-top: 3px;
}

.dw-stat-card .text-blue { color: #3b82f6 !important; }
.dw-stat-card .text-red { color: #ef4444 !important; }
.dw-stat-card .text-success { color: #22c55e !important; }
.dw-stat-card .text-purple { color: #8b5cf6 !important; }
.dw-stat-card .text-amber { color: #f59e0b !important; }

.emp-dashboard--modern .dw-stat-card--wide,
.notifications-page .dw-stat-card--wide,
.dw-stat-card--wide {
    min-height: auto;
}

/* ── Files manager — upload panel & folder modal ── */
/* Upload panel */
.lom-files-upload {
    margin-bottom: 20px;
    border: 1px solid var(--lfm-border);
    border-radius: var(--lfm-radius-sm);
    background: #fff;
    overflow: hidden;
}

.lom-files-upload__head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--lfm-border);
    background: var(--lfm-bg-soft);
}

.lom-files-upload__head-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--lfm-control-radius);
    background: rgba(251, 99, 64, 0.12);
    color: var(--lfm-accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.lom-files-upload__head-text {
    flex: 1;
    min-width: 0;
}

.lom-files-upload__title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--lfm-text);
}

.lom-files-upload__hint {
    margin: 2px 0 0;
    font-size: 12px;
    color: var(--lfm-muted);
}

.lom-files-upload__close {
    width: 34px;
    height: 34px;
    border: 1px solid var(--lfm-border);
    border-radius: var(--lfm-control-radius);
    background: #fff;
    color: var(--lfm-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.lom-files-upload__close:hover {
    color: var(--lfm-text);
    border-color: #cbd5e1;
}

.lom-files-upload__form {
    padding: 16px;
}

.lom-files-upload__field {
    margin-bottom: 14px;
}

.lom-files-upload__field .form-group {
    margin-bottom: 0 !important;
}

.lom-files-upload__dropzone-wrap {
    margin-bottom: 14px;
}

.lom-files-upload__dropzone-field.form-group {
    margin: 0 !important;
}

.lom-files-upload__dropzone-field > label {
    display: none;
}

.lom-files-upload .dropzone {
    min-height: 168px;
    border: 2px dashed #dbe3ec !important;
    border-radius: var(--lfm-control-radius) !important;
    background: var(--lfm-bg-soft) !important;
    padding: 20px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.lom-files-upload .dropzone.dz-drag-hover,
.lom-files-upload .dropzone:hover {
    border-color: var(--lfm-accent) !important;
    background: #fff !important;
}

.lom-files-upload .dropzone .dz-message {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--lfm-muted);
}

.lom-files-upload .dropzone .dz-preview {
    margin: 8px;
}

.lom-files-upload__file-wrap .form-group {
    margin-bottom: 0 !important;
}

.lom-files-upload__file-wrap .dropify-wrapper {
    border: 2px dashed #dbe3ec;
    border-radius: var(--lfm-control-radius);
    background: var(--lfm-bg-soft);
}

.lom-files-upload__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 4px;
}

.lom-files-upload__cancel {
    font-weight: 600;
    color: var(--lfm-muted) !important;
}

.lom-files-upload__submit.btn-primary {
    background: var(--lfm-accent) !important;
    border-color: var(--lfm-accent) !important;
    border-radius: var(--lfm-control-radius) !important;
    font-weight: 600;
    padding: 8px 18px;
}

.lom-files-upload__submit.btn-primary:hover {
    background: var(--lfm-accent-hover) !important;
    border-color: var(--lfm-accent-hover) !important;
}

/* Folder modal */
.lom-folder-modal .modal-header,
.modal-header.lom-folder-modal__header {
    border-bottom: 1px solid var(--lfm-border);
    padding: 16px 20px;
}

.lom-folder-modal .modal-title,
.modal-header.lom-folder-modal__header .modal-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--lfm-text);
}

.lom-folder-modal,
.modal-body.lom-folder-modal {
    padding: 16px 20px;
}

.lom-folder-modal__section + .lom-folder-modal__section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--lfm-border);
}

.lom-folder-modal__section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    font-size: 13px;
    font-weight: 700;
    color: var(--lfm-text);
}

.lom-folder-modal__section-title svg {
    color: var(--lfm-accent);
}

.lom-folder-modal__table .table {
    margin-bottom: 0;
    border-radius: var(--lfm-control-radius);
    overflow: hidden;
}

.lom-folder-modal__table .thead-light th {
    background: var(--lfm-bg-soft);
    border-color: var(--lfm-border);
    font-size: 12px;
    font-weight: 700;
    color: var(--lfm-muted);
}

.lom-folder-modal__create .form-group {
    margin-bottom: 14px;
}

.lom-folder-modal__create .row {
    margin-left: 0;
    margin-right: 0;
}

.lom-folder-modal__footer,
.modal-footer.lom-folder-modal__footer {
    border-top: 1px solid var(--lfm-border);
    padding: 12px 20px;
}

.lom-folder-modal__footer .btn-primary,
.modal-footer.lom-folder-modal__footer .btn-primary {
    background: var(--lfm-accent);
    border-color: var(--lfm-accent);
    border-radius: var(--lfm-control-radius);
    font-weight: 600;
}

.lom-folder-modal__footer .btn-primary:hover,
.modal-footer.lom-folder-modal__footer .btn-primary:hover {
    background: var(--lfm-accent-hover);
    border-color: var(--lfm-accent-hover);
}

.lom-folder-modal__edit {
    padding: 4px 0;
}

.lom-folder-modal__edit .form-group {
    margin-bottom: 14px;
}

/* ── Dark theme — dashboard card components ── */
body.dark-theme .emp-dashboard--modern .emp-dash-detail .card-header h4,
body.dark-theme .emp-dashboard--modern .emp-dash-detail .card-header .dw-card-header__title {
    color: var(--dw-text) !important;
}

body.dark-theme .emp-dashboard--modern .dw-stat-card:hover {
    border-color: rgba(148, 163, 184, 0.35);
}

body.dark-theme .emp-dashboard--modern .dw-stat-card__label {
    color: var(--dw-muted);
}

body.dark-theme .emp-dashboard--modern .dw-card-icon svg [stroke]:not([stroke="none"]),
body.dark-theme .emp-dashboard--modern .dw-stat-card__icon svg [stroke]:not([stroke="none"]),
body.dark-theme .emp-dashboard--modern .dw-card-icon svg,
body.dark-theme .emp-dashboard--modern .dw-stat-card__icon svg {
    stroke-width: var(--dw-icon-stroke) !important;
}

/* ── Dropdown z-index safety ── */
/* Ensure dropdown menus always appear above sticky headers/positioned elements */
.dropdown-menu,
.dropdown-menu.show,
.dropdown-menu[aria-expanded="true"],
.user-menu,
[role="menu"].dropdown-menu {
    z-index: 1060 !important;
}

/* Ensure sidebar flyout panels are above dropdowns if needed */
.sidebar-flyout-panel {
    z-index: 1070 !important;
}

/* ── Modal & Drawer z-index safety ── */
/* Ensure modals (e.g. Add Tax, Bank Account) always appear above right-side drawers and panels */
.modal-backdrop,
.modal-backdrop.show {
    z-index: 10690 !important;
}

.modal,
.modal.show,
#myModal,
#myModalDefault,
#myModalXl {
    z-index: 10700 !important;
}

/* Datepicker and Select2 popups inside or outside modals */
.datepicker,
.datepicker-dropdown,
.ui-datepicker,
.qs-datepicker-container,
.bootstrap-datetimepicker-widget {
    z-index: 10750 !important;
}

.select2-container--open {
    z-index: 10760 !important;
}

/* Ensure modal bodies and containers don't clip datepicker / select popups */
.modal-body {
    overflow: visible;
}

.modal-open .modal.overflow-auto .modal-body {
    overflow: visible;
}

