:root {
    --ed-accent: #4f46e5;
    --ed-accent-hover: #4338ca;
    --ed-accent-soft: #eef2ff;
    --ed-success: #059669;
    --ed-success-soft: #ecfdf5;
    --ed-warning: #d97706;
    --ed-warning-soft: #fffbeb;
    --ed-danger: #dc2626;
    --ed-danger-soft: #fef2f2;
    --ed-info: #0284c7;
    --ed-info-soft: #f0f9ff;
    --ed-canvas: #f4f6fb;
    --ed-surface: #ffffff;
    --ed-border: #e5e7eb;
    --ed-text: #111827;
    --ed-muted: #6b7280;
    --ed-radius: 14px;
    --ed-radius-sm: 10px;
    --ed-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.04);
    --ed-control-h: 42px;
    --ed-sidebar-w: 272px;
    --ed-font: Inter, "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
}

html, body {
    font-family: var(--ed-font);
    background: var(--ed-canvas);
    color: var(--ed-text);
    letter-spacing: -0.01em;
}

body { animation: edFade .28s ease; }
@keyframes edFade { from { opacity: .4 } to { opacity: 1 } }

.nxl-navigation {
    background: #fff !important;
    border-right: 1px solid var(--ed-border);
    width: var(--ed-sidebar-w);
    box-shadow: none !important;
}
.nxl-navigation .m-header {
    background: #fff !important;
    border-bottom: 1px solid var(--ed-border);
    height: 72px;
    display: flex;
    align-items: center;
    padding: 0 18px;
}
.nxl-navigation .b-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nxl-navigation .logo,
.nxl-navigation .logo.logo-lg,
.nxl-navigation .logo.logo-sm { color: var(--ed-text) !important; padding: 0; }
.brand-mark {
    width: 36px; height: 36px; border-radius: 10px;
    object-fit: contain; background: var(--ed-accent-soft); padding: 4px;
}
.brand-copy { display: flex; flex-direction: column; line-height: 1.15; }
.brand-copy strong { font-size: 13px; color: var(--ed-text); }
.brand-copy span { font-size: 11px; color: var(--ed-muted); font-weight: 500; }

.nxl-navbar { padding: 12px 10px 32px; }
.nxl-item.nxl-caption label {
    color: #9ca3af !important;
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
    font-weight: 600;
    padding: 12px 14px 6px;
}
.nxl-link {
    color: #374151 !important;
    border-radius: 10px !important;
    margin: 2px 6px;
    padding: 9px 12px !important;
    font-weight: 500;
    font-size: 13.5px;
}
.nxl-link:hover { background: var(--ed-canvas) !important; color: var(--ed-text) !important; }
.nxl-item.active > .nxl-link,
.nxl-item.open > .nxl-link {
    background: var(--ed-accent-soft) !important;
    color: var(--ed-accent) !important;
    font-weight: 600;
}
.nxl-micon { color: inherit; }
.nxl-submenu { background: transparent !important; padding-left: 12px; }
.nxl-submenu .nxl-link { font-size: 13px; padding: 7px 12px !important; }
.nav-count {
    margin-left: auto;
    background: var(--ed-accent);
    color: #fff;
    font-size: 10px;
    min-width: 18px;
    height: 18px;
    border-radius: 99px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
}
.rupee-icon {
    font-style: normal;
    font-weight: 700;
    font-size: 15px;
    line-height: 1;
}

.nxl-header {
    background: rgba(255,255,255,.86) !important;
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--ed-border);
    box-shadow: none !important;
}
.nxl-container { background: var(--ed-canvas); }
.nxl-content { min-height: calc(100vh - 72px); }
.main-content { padding: 8px 8px 48px; }

.page-header {
    background: transparent !important;
    border: 0 !important;
    padding: 8px 8px 16px !important;
    margin: 0 !important;
}
.page-header-title h5, .page-header-title h1 {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -.03em;
    margin: 0;
}
.page-header-sub { color: var(--ed-muted); font-size: 13.5px; margin-top: 4px; }
.breadcrumb { background: transparent; padding: 0; margin: 4px 0 0; }
.breadcrumb-item, .breadcrumb-item a { font-size: 12.5px; color: var(--ed-muted); }

.card {
    border: 1px solid var(--ed-border) !important;
    border-radius: var(--ed-radius) !important;
    box-shadow: var(--ed-shadow) !important;
    background: var(--ed-surface);
    margin-bottom: 20px;
}
.card-header {
    background: transparent !important;
    border-bottom: 1px solid var(--ed-border) !important;
    padding: 16px 20px !important;
}
.card-title { font-size: 15px; font-weight: 650; margin: 0; }
.card-subtitle { color: var(--ed-muted); font-size: 13px; margin-top: 2px; }
.card-body { padding: 20px !important; }
.card-footer { background: transparent; border-top: 1px solid var(--ed-border); padding: 14px 20px; }

.stat-card { height: 100%; }
.stat-card .stat-label { font-size: 12.5px; font-weight: 600; color: var(--ed-muted); text-transform: none; }
.stat-card .stat-value { font-size: 26px; font-weight: 700; letter-spacing: -.03em; margin: 4px 0 0; }
.stat-card .stat-hint { font-size: 12px; color: var(--ed-muted); margin-top: 6px; }
.stat-icon {
    width: 42px; height: 42px; border-radius: 12px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 18px;
}
.stat-icon.tone-primary { background: var(--ed-accent-soft); color: var(--ed-accent); }
.stat-icon.tone-success { background: var(--ed-success-soft); color: var(--ed-success); }
.stat-icon.tone-warning { background: var(--ed-warning-soft); color: var(--ed-warning); }
.stat-icon.tone-danger { background: var(--ed-danger-soft); color: var(--ed-danger); }
.stat-icon.tone-info { background: var(--ed-info-soft); color: var(--ed-info); }

.form-control, .form-select,
.select2-container--default .select2-selection--single {
    min-height: var(--ed-control-h) !important;
    border-radius: var(--ed-radius-sm) !important;
    border-color: var(--ed-border) !important;
    font-size: 14px !important;
    box-shadow: none !important;
}
.form-control:focus, .form-select:focus {
    border-color: var(--ed-accent) !important;
    box-shadow: 0 0 0 3px rgba(79,70,229,.15) !important;
}
.form-label, .ed-field-label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}
.ed-field { margin-bottom: 16px; }
.ed-field.ed-inline {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 12px;
    align-items: start;
}
.ed-field.ed-inline .ed-field-label { padding-top: 10px; margin: 0; }
.ed-prefix {
    display: flex;
    align-items: stretch;
}
.ed-prefix span {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0 12px;
    background: var(--ed-canvas);
    border: 1px solid var(--ed-border);
    border-right: 0;
    border-radius: var(--ed-radius-sm) 0 0 var(--ed-radius-sm);
    color: var(--ed-muted);
    font-weight: 600;
    font-size: 13px;
}
.ed-prefix .form-control { border-radius: 0 var(--ed-radius-sm) var(--ed-radius-sm) 0 !important; }

.select2-container { width: 100% !important; }
.select2-container--default .select2-selection--single {
    display: flex; align-items: center; padding: 0 10px;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
    padding: 0; line-height: 40px; color: var(--ed-text);
}
.select2-container--default .select2-selection--single .select2-selection__arrow { height: 40px; }
.select2-dropdown { border-color: var(--ed-border); border-radius: 12px; overflow: hidden; box-shadow: var(--ed-shadow); }
.select2-container--default .select2-results__option--highlighted[aria-selected] { background: var(--ed-accent); }

.btn {
    border-radius: 10px !important;
    font-weight: 600;
    font-size: 13.5px;
    padding: 9px 16px;
}
.btn-primary { background: var(--ed-accent) !important; border-color: var(--ed-accent) !important; }
.btn-primary:hover { background: var(--ed-accent-hover) !important; border-color: var(--ed-accent-hover) !important; }
.btn-light, .btn-light-brand { background: #fff !important; border: 1px solid var(--ed-border) !important; color: var(--ed-text) !important; }
.btn-outline-primary { color: var(--ed-accent); border-color: #c7d2fe; }
.filter-bar {
    display: flex; flex-wrap: wrap; gap: 12px; align-items: end;
    padding: 4px 0 16px;
}
.filter-bar .ed-field { margin: 0; min-width: 180px; flex: 1 1 180px; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.filter-chip {
    background: var(--ed-accent-soft); color: var(--ed-accent);
    border-radius: 99px; padding: 4px 10px; font-size: 12px; font-weight: 600;
}

.table { --bs-table-bg: transparent; }
.table thead th {
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--ed-muted);
    font-weight: 650;
    border-bottom: 1px solid var(--ed-border);
    background: #fafbff;
    white-space: nowrap;
    position: sticky; top: 0; z-index: 2;
}
.table tbody td { vertical-align: middle; border-color: #f3f4f6; font-size: 13.5px; }
.table-hover tbody tr:hover { background: #f8fafc; }
.table-hover tbody tr[data-href] { cursor: pointer; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.ed-table-wrap { overflow: auto; border-radius: 0 0 var(--ed-radius) var(--ed-radius); }

.badge {
    border-radius: 99px !important;
    font-weight: 600;
    padding: 5px 10px;
    text-transform: capitalize;
    font-size: 11.5px;
}
.badge.bg-success { background: var(--ed-success-soft) !important; color: var(--ed-success) !important; }
.badge.bg-warning { background: var(--ed-warning-soft) !important; color: #b45309 !important; }
.badge.bg-danger { background: var(--ed-danger-soft) !important; color: var(--ed-danger) !important; }
.badge.bg-orange { background: #fff7ed !important; color: #c2410c !important; }
.badge.bg-secondary { background: #f3f4f6 !important; color: #4b5563 !important; }
.badge.bg-primary { background: var(--ed-accent-soft) !important; color: var(--ed-accent) !important; }
.badge.bg-info { background: var(--ed-info-soft) !important; color: var(--ed-info) !important; }

.nav-tabs { border: 0; gap: 4px; }
.nav-tabs .nav-link {
    border: 0 !important;
    color: var(--ed-muted);
    font-weight: 600;
    font-size: 13.5px;
    padding: 10px 14px;
    border-bottom: 2px solid transparent !important;
    background: transparent !important;
}
.nav-tabs .nav-link.active { color: var(--ed-accent); border-bottom-color: var(--ed-accent) !important; }

.pagination { gap: 4px; }
.page-link {
    border-radius: 8px !important;
    border: 1px solid var(--ed-border);
    color: var(--ed-text);
    min-width: 36px;
    text-align: center;
}
.page-item.active .page-link { background: var(--ed-accent); border-color: var(--ed-accent); }

.avatar-text, .ed-avatar {
    width: 36px; height: 36px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 13px;
    background: var(--ed-accent-soft); color: var(--ed-accent);
}
.ed-avatar.sm { width: 28px; height: 28px; font-size: 11px; }
.ed-avatar.lg { width: 64px; height: 64px; font-size: 22px; }

.kv { display: grid; grid-template-columns: 140px 1fr; gap: 8px 12px; font-size: 13.5px; }
.kv dt { color: var(--ed-muted); font-weight: 500; margin: 0; }
.kv dd { margin: 0; font-weight: 600; }

.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { position: relative; padding: 0 0 18px 22px; border-left: 2px solid var(--ed-border); }
.timeline li:last-child { border-left-color: transparent; }
.timeline li::before {
    content: ""; position: absolute; left: -6px; top: 4px;
    width: 10px; height: 10px; border-radius: 50%; background: var(--ed-accent);
}

.progress, .ed-progress { height: 8px; border-radius: 99px; background: #eef2ff; }
.progress-bar { background: var(--ed-accent); border-radius: 99px; }

.action-bar {
    position: sticky; bottom: 12px; z-index: 20;
    background: rgba(255,255,255,.95);
    border: 1px solid var(--ed-border);
    border-radius: 14px;
    padding: 10px 16px;
    display: flex; justify-content: flex-end; gap: 8px;
    box-shadow: var(--ed-shadow);
}

.check-list {
    border: 1px solid var(--ed-border);
    border-radius: 12px;
    max-height: 280px;
    overflow: auto;
    background: #fff;
}
.check-list-head {
    position: sticky; top: 0; background: #fafbff;
    display: flex; justify-content: space-between; align-items: center;
    padding: 8px 12px; border-bottom: 1px solid var(--ed-border); font-size: 12.5px;
}
.check-list-item { padding: 8px 12px; border-bottom: 1px solid #f3f4f6; }
.check-list-item:last-child { border-bottom: 0; }

.att-grid { border: 1px solid var(--ed-border); border-radius: 12px; overflow: auto; background: #fff; }
.att-grid table { margin: 0; min-width: 1100px; }
.att-grid th, .att-grid td { text-align: center; padding: 6px 4px; }
.att-grid th.sticky, .att-grid td.sticky {
    position: sticky; left: 0; background: #fff; z-index: 3; text-align: left; min-width: 180px;
}
.att-chip {
    width: 32px; height: 32px; border-radius: 8px; border: 0;
    font-weight: 700; font-size: 11px; cursor: pointer;
}
.att-chip.P { background: #d1fae5; color: #047857; }
.att-chip.A { background: #fee2e2; color: #b91c1c; }
.att-chip.L { background: #ede9fe; color: #6d28d9; }
.att-chip.HD { background: #fef3c7; color: #b45309; }
.att-chip.WO { background: #e5e7eb; color: #4b5563; }
.att-chip.H { background: #dbeafe; color: #1d4ed8; }
.att-chip.empty { background: #f8fafc; color: #9ca3af; border: 1px dashed #e5e7eb; }
.att-sun { background: #fff7ed !important; }
.wizard-steps .steps { margin-bottom: 20px; }
.wizard-steps .steps ul { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; list-style: none; }
.wizard-steps .steps a { text-decoration: none; }

.report-card { height: 100%; transition: transform .15s ease, box-shadow .15s ease; }
.report-card:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(15,23,42,.08) !important; }
.report-icon {
    width: 40px; height: 40px; border-radius: 12px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--ed-accent-soft); color: var(--ed-accent); font-size: 18px;
}

.auth-saas {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    background: var(--ed-canvas);
}
.auth-saas-brand {
    background: linear-gradient(160deg, #312e81 0%, #4f46e5 55%, #6366f1 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 64px;
}
.auth-saas-brand h1 { color: #fff !important; font-weight: 750; letter-spacing: -.04em; }
.auth-saas-panel { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-saas-card { width: 100%; max-width: 420px; background: #fff; border-radius: 20px; padding: 36px; border: 1px solid var(--ed-border); box-shadow: var(--ed-shadow); }
.demo-creds { background: var(--ed-accent-soft); border-radius: 12px; padding: 12px 14px; }

.footer { background: transparent; border-top: 0; padding: 8px 24px 24px; color: var(--ed-muted); }

.heatmap-cell { width: 28px; height: 28px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; }
.heatmap-0 { background: #ecfdf5; color: #047857; }
.heatmap-1 { background: #fef3c7; color: #b45309; }
.heatmap-2 { background: #fee2e2; color: #b91c1c; }

.empty-state { padding: 36px 16px; text-align: center; color: var(--ed-muted); }
.empty-state i { font-size: 32px; opacity: .55; }

.portal-bottom {
    display: none;
    position: fixed; left: 0; right: 0; bottom: 0;
    background: #fff; border-top: 1px solid var(--ed-border);
    padding: 8px 12px env(safe-area-inset-bottom);
    z-index: 40;
    justify-content: space-around;
}
.portal-bottom a { color: var(--ed-muted); text-align: center; font-size: 11px; text-decoration: none; }
.portal-bottom a.active { color: var(--ed-accent); }

@media (max-width: 1199px) {
    .ed-field.ed-inline { grid-template-columns: 1fr; }
}
@media (max-width: 991px) {
    .auth-saas { grid-template-columns: 1fr; }
    .auth-saas-brand { min-height: 220px; padding: 32px 24px; }
    .portal-bottom { display: flex; }
    .main-content { padding-bottom: 80px; }
}

.dataTables_wrapper .dataTables_filter input {
    border: 1px solid var(--ed-border);
    border-radius: 10px;
    min-height: 38px;
    padding: 0 12px;
}
.datepicker { z-index: 1080 !important; }

.show-layout { display: grid; grid-template-columns: 320px 1fr; gap: 20px; }
@media (max-width: 991px) { .show-layout { grid-template-columns: 1fr; } }

.form-narrow { max-width: 760px; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 767px) { .form-grid-2 { grid-template-columns: 1fr; } }

.settings-nav .list-group-item { border: 0; padding: 10px 16px; font-weight: 500; }
.settings-nav .list-group-item.active { background: var(--ed-accent-soft); color: var(--ed-accent); }
.filter-bar { flex-wrap: wrap; }
.filter-chips { width: 100%; display: flex; flex-wrap: wrap; gap: 6px; }
