/* Inter is loaded via a non-blocking <link rel="stylesheet"> in partials/head.php
   (a render-blocking @import here caused an icon-font FOUT on cold page loads). */

/* ============================================================================
   Mahir EMS — modern admin theme layer
   Loaded LAST, admin/staff pages only (see partials/head.php). Two parts:
     (1) TOP MENU   — a global restyle of the two Limitless navbars
                      (main_navbar.php + secondary_navbar_main.php).
     (2) .ems-ui    — modern components (cards / tables / forms / buttons /
                      DataTables). Applied APP-WIDE: the admin content wrapper
                      (<div class="content ems-ui"> in template/header.php)
                      carries the class, so every admin page is themed. Colour
                      overrides are guarded with :not([class*="bg-"]) so coloured
                      Limitless tiles/headers keep their look. The CEO dashboard
                      keeps its own .ems-bi / .ems-dash layers; no collision
                      (it uses .bi-card, not a bare .card).
   Presentation only — relies solely on Limitless class names already in the
   markup; no JS hooks, data-* attributes or mobile toggles are changed.
   ============================================================================ */
:root {
    --ems-ink:#0f172a; --ems-muted:#64748b; --ems-soft:#94a3b8;
    --ems-line:#e8edf3; --ems-line2:#eef2f7; --ems-bg:#f5f7fb;
    /* primary accent is BLUE everywhere now (was indigo #4f46e5 — user wants NO purple) */
    --ems-indigo:#2563eb; --ems-indigo-d:#1d4ed8; --ems-accent:#4f79c7;
    --ems-tint:rgba(37,99,235,.08);
    /* top-menu accent = blue (NO purple in the navbar) */
    --ems-nav:#2563eb; --ems-nav-d:#1d4ed8; --ems-nav-tint:rgba(37,99,235,.10);
}

/* ============================ (1) TOP MENU ============================ */
/* Both navbars carry .navbar-light .navbar-sm; the top bar adds .navbar-static,
   the module bar is .navbar-expand (+ .main-header when it's sticky). */
.navbar-light { font-family:'Inter','Segoe UI',system-ui,-apple-system,Arial,sans-serif; }
.navbar.navbar-static { background:#fff; border-bottom:1px solid var(--ems-line); box-shadow:0 1px 2px rgba(16,24,40,.03); }
.navbar.navbar-expand.navbar-light { background:#fff; border-bottom:1px solid var(--ems-line); }
.navbar.navbar-expand.navbar-light.main-header { box-shadow:0 2px 10px rgba(16,24,40,.05); }

/* nav links: quieter default, BLUE on hover/active, pill hover */
.navbar-light .navbar-nav-link { color:#475569; font-weight:600; font-size:13px; border-radius:9px;
    padding-top:.5rem; padding-bottom:.5rem; transition:background .15s ease, color .15s ease; }
.navbar-light .navbar-nav-link:hover,
.navbar-light .navbar-nav-link:focus { color:var(--ems-nav); background:var(--ems-nav-tint); }
.navbar-light .navbar-nav-link.active,
.navbar-light .navbar-nav-link.active:hover,
.navbar-light .navbar-nav-link.active:focus,
.navbar-light .nav-item.active > .navbar-nav-link,
.navbar-light .nav-item.show > .navbar-nav-link { color:var(--ems-nav); background:transparent; }
.navbar-light .navbar-nav-link i { color:inherit; }

/* dropdowns + mega-menus: rounded, soft-shadowed, BLUE hover items */
.navbar .dropdown-menu { border:1px solid var(--ems-line); border-radius:12px;
    box-shadow:0 14px 34px rgba(16,24,40,.13); padding:6px; margin-top:6px; }
.navbar .dropdown-menu .dropdown-item { border-radius:8px; font-size:13px; color:#475569; padding:.5rem .75rem; }
.navbar .dropdown-menu .dropdown-item:hover,
.navbar .dropdown-menu .dropdown-item:focus { background:var(--ems-nav-tint); color:var(--ems-nav); }
.navbar .dropdown-menu .dropdown-item.active,
.navbar .dropdown-menu .dropdown-item:active { background:var(--ems-nav); color:#fff; }
.navbar .dropdown-divider { border-color:var(--ems-line2); }
.navbar .dropdown-content, .navbar .mega-menu-full .dropdown-menu { border-radius:12px; }
.navbar .dropdown-content-body { padding:6px; }

/* mobile toggler stays crisp */
.navbar-toggler { color:var(--ems-ink); border-radius:9px; }

/* ============================ (2) .ems-ui components ============================ */
/*.ems-ui { font-family:'Inter','Segoe UI',system-ui,-apple-system,Arial,sans-serif; color:var(--ems-ink); }*/

/* cards — rounding for ALL; the white / border / shadow / transparent-header
   treatment is applied ONLY to non-coloured cards & headers, so Limitless stat
   tiles (.card.bg-primary etc.) and coloured headers (.card-header.bg-*) keep
   their intended colour when the theme is applied app-wide. */
.ems-ui .card { border-radius:16px; margin-bottom:20px; }
.ems-ui .card:not([class*="bg-"]) { background:#fff; border:1px solid var(--ems-line);
    box-shadow:0 1px 2px rgba(16,24,40,.04),0 6px 18px rgba(16,24,40,.04); }
.ems-ui .card.card-primary { border-top-color:var(--ems-line); }
.ems-ui .card-header { padding:15px 18px; }
.ems-ui .card-header:not([class*="bg-"]) { background:transparent; border-bottom:1px solid var(--ems-line2); }
.ems-ui .card-title,
.ems-ui .card-title.titlefix { font-size:15px; font-weight:700; letter-spacing:0; text-transform:none; margin:0; }
.ems-ui .card-header:not([class*="bg-"]) .card-title { color:var(--ems-ink); }
.ems-ui .card-title > i, .ems-ui .card-title > .la, .ems-ui .card-title > [class^="icon-"] { color:var(--ems-accent); }
.ems-ui .card-body { padding:18px; }
.ems-ui .card-footer { background:transparent; border-top:1px solid var(--ems-line2); padding:14px 18px; }

/* tables */
/*.ems-ui .table { color:var(--ems-muted); font-size:13px; margin-bottom:0; }*/
/*.ems-ui .table thead th { background:#f8fafc; border-top:0; border-bottom:1px solid var(--ems-line);*/
/*    color:#475569; font-weight:700; font-size:11.5px; letter-spacing:.03em; text-transform:uppercase;*/
/*    padding:11px 12px; white-space:nowrap; vertical-align:middle; }*/
/*.ems-ui .table td { padding:11px 12px; border-top:1px solid var(--ems-line2); vertical-align:middle; color:#334155; }*/
/*.ems-ui .table.table-hover tbody tr:hover td { background:#f8fafc; }*/
/*.ems-ui .table.table-bordered,*/
/*.ems-ui .table.table-bordered td,*/
/*.ems-ui .table.table-bordered th { border-color:var(--ems-line2); }*/
/*.ems-ui .table.table-striped tbody tr:nth-of-type(odd) td { background:#fcfdfe; }*/
/*.ems-ui .table td .btn { margin:1px; }*/

/* buttons */
.ems-ui .btn { border-radius:9px; font-weight:600; font-size:13px; }
.ems-ui .btn-primary, .ems-ui .btn-info { background:var(--ems-indigo); border-color:var(--ems-indigo);
    box-shadow:0 2px 6px rgba(37,99,235,.22); }
.ems-ui .btn-primary:hover, .ems-ui .btn-info:hover,
.ems-ui .btn-primary:focus, .ems-ui .btn-info:focus { background:var(--ems-indigo-d); border-color:var(--ems-indigo-d); }
.ems-ui .btn-xs { border-radius:7px; }

/* form controls */
.ems-ui .form-control,
.ems-ui select.form-control { border:1px solid #e2e8f0; border-radius:9px; color:#475569; font-size:13px; }
.ems-ui .form-control:focus { border-color:var(--ems-accent); box-shadow:0 0 0 3px rgba(79,121,199,.12); }
.ems-ui label, .ems-ui .col-form-label { color:#475569; font-weight:600; font-size:12.5px; }

/* DataTables chrome (search / length / pagination) */
.ems-ui .dataTables_wrapper .dataTables_filter input,
.ems-ui .dataTables_wrapper .dataTables_length select { border:1px solid #e2e8f0; border-radius:8px; }
.ems-ui .dataTables_wrapper .dataTables_paginate .paginate_button { border-radius:7px; }
.ems-ui .dataTables_wrapper .dataTables_paginate .paginate_button.current,
.ems-ui .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover { background:var(--ems-indigo) !important;
    border-color:var(--ems-indigo) !important; color:#fff !important; }

/* modals (Front Office detail / edit popups render their content under .ems-ui) */
.ems-ui .modal-content { border:0; border-radius:16px; box-shadow:0 24px 60px rgba(16,24,40,.22); overflow:hidden; }
.ems-ui .modal-header { background:transparent; border-bottom:1px solid var(--ems-line2); padding:16px 20px; }
.ems-ui .modal-title { font-weight:700; color:var(--ems-ink); font-size:16px; }
.ems-ui .modal-body { padding:20px; }
.ems-ui .modal-footer { background:transparent; border-top:1px solid var(--ems-line2); padding:14px 20px; }

/* alerts a touch softer */
.ems-ui .alert { border:0; border-radius:10px; font-size:13.5px; }
