/*
 * MRT Theme — Bootstrap 5.3 overrides
 * Load order: Bootstrap CSS → Bootstrap Icons → this file
 *
 * Sections
 *  1. CSS custom properties (brand palette + Bootstrap token overrides)
 *  2. Layout shell
 *  3. Sidebar navigation  (nav-sidebar-outer, nav-brand, nav-link, …)
 *  4. Breadcrumb
 *  5. Buttons            (btn-primary / secondary / success / danger)
 *  6. Cards              (card, stat-card, content-card)
 *  7. Form elements      (input-field, label)
 *  8. Tables             (table-header, table-cell)
 *  9. Badges             (badge, badge-success / danger / warning / info / gray)
 * 10. Alerts             (alert, alert-success / error / warning / info)
 * 11. Pagination         (pagination-btn, pagination-active, pagination-disabled)
 * 12. Utilities & misc
 * 13. Keyframe animations
 */


/* ═══════════════════════════════════════════════════════════════════════
   1. CSS CUSTOM PROPERTIES
   ═══════════════════════════════════════════════════════════════════════ */

:root {
    /* EPR brand palette (sky / cyan scale, mirrors tailwind.config.js) */
    --mrt-primary-50:  #f0f9ff;
    --mrt-primary-100: #e0f2fe;
    --mrt-primary-200: #bae6fd;
    --mrt-primary-300: #7dd3fc;
    --mrt-primary-400: #38bdf8;
    --mrt-primary-500: #0ea5e9;
    --mrt-primary-600: #0284c7;
    --mrt-primary-700: #0369a1;
    --mrt-primary-800: #075985;
    --mrt-primary-900: #0c4a6e;

    /* Sidebar chrome */
    --mrt-sidebar-bg-start:  #0b1426;
    --mrt-sidebar-bg-mid:    #0d1b38;
    --mrt-sidebar-accent:    #38bdf8;   /* sky-400  */
    --mrt-sidebar-accent-2:  #818cf8;   /* indigo-400 */
    --mrt-sidebar-text:      rgba(203, 213, 225, 0.75);

    /* Page chrome */
    --mrt-body-bg:      #F8F8F8;
    --mrt-card-bg:      #ffffff;
    --mrt-footer-bg:    #1e293b;
    --mrt-footer-text:  #94a3b8;
}

/* Override Bootstrap 5 semantic tokens so .btn-primary / .bg-primary /
   .text-primary etc. all resolve to the EPR cyan colour. */
[data-bs-theme="light"] {
    --bs-primary:           var(--mrt-primary-600);
    --bs-primary-rgb:       2, 132, 199;
    --bs-link-color:        var(--mrt-primary-600);
    --bs-link-hover-color:  var(--mrt-primary-700);
    --bs-body-bg:           var(--mrt-body-bg);
    --bs-body-color:        #1e293b;
    --bs-border-color:      #e2e8f0;
}


/* ═══════════════════════════════════════════════════════════════════════
   1b. FOCUS STYLES — keyboard-only indicator
   ═══════════════════════════════════════════════════════════════════════ */

:focus-visible {
    outline: 2px solid var(--mrt-primary-500);
    outline-offset: 2px;
}


/* ═══════════════════════════════════════════════════════════════════════
   2. LAYOUT SHELL
   ═══════════════════════════════════════════════════════════════════════ */

html {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    background-color: var(--mrt-body-bg);
}


/* ═══════════════════════════════════════════════════════════════════════
   3. SIDEBAR NAVIGATION
   ═══════════════════════════════════════════════════════════════════════ */

/* Sidebar wrapper */
.sidebar-wrapper {
    flex-shrink: 0;
    height: 100%;
}

.nav-sidebar-outer {
    height: 100%;
    overflow: visible;
    background: #ffffff;
    width: 16rem;
    min-width: 16rem;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #e2e8f0;
    transition: none;
}


.nav-sidebar {
    position: relative;
}

/* Subtle top accent line */
.nav-sidebar::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(
        to right,
        transparent,
        rgba(21, 75, 127, 0.4),
        transparent
    );
}

/* Brand area at top of sidebar */
.nav-brand {
    background: #154b7f;
    border-bottom: 1px solid rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    height: 3.5rem;
    padding: 0 1rem;
    flex-shrink: 0;
    color: #fff;
    overflow: hidden;
}

.nav-logo-ring {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(
        135deg,
        rgba(56, 189, 248, 0.25),
        rgba(99, 102, 241, 0.25)
    );
    border: 1px solid rgba(56, 189, 248, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.15);
    flex-shrink: 0;
    animation: logoGlow 4s ease-in-out infinite;
}

.nav-app-name {
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: #fff;
    background-clip: text;
    font-weight: 700;
    font-size: 0.875rem;
    letter-spacing: 0.025em;
}

/* Section labels */
.nav-section-label {
    padding: 0 0.75rem;
    margin-bottom: 0.25rem;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #64748b;
}

/* Nav links */
.nav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 10px;
    font-size: 0.84rem;
    font-weight: 500;
    color: #1e293b;
    text-decoration: none;
    transition: color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    overflow: hidden;
    border: 1px solid transparent;
}

.nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%) scaleY(0);
    width: 4px;
    height: 65%;
    background: #154b7f;
    border-radius: 0 3px 3px 0;
    transition: transform 0.2s ease;
}

.nav-link:hover {
    color: #154b7f;
    background: #f0f5fb;
}

.nav-link:hover .nav-icon-wrap {
    color: #154b7f;
    transform: scale(1.08);
}

/* Active state */
.nav-link.nav-active {
    color: #154b7f;
    background: #e8f0fa;
    border-color: rgba(21, 75, 127, 0.2);
    box-shadow: 0 1px 4px rgba(21, 75, 127, 0.1);
}

.nav-link.nav-active::before {
    transform: translateY(-50%) scaleY(1);
}

.nav-link.nav-active .nav-icon-wrap {
    color: #154b7f;
}

/* Icon wrapper */
.nav-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    color: #64748b;
    transition: all 0.18s ease;
    flex-shrink: 0;
}

.nav-label {
    flex: 1;
    line-height: 1;
}

/* Scrollbar (colour overridden by section 7 definition below) */

/* Mobile offcanvas — matches desktop sidebar styling */
.nav-mobile-offcanvas {
    width: 16rem !important;
    background: #ffffff;
    box-shadow: 4px 0 12px rgba(0, 0, 0, 0.15);
}

/* Mobile top bar — shown only on < lg */
.nav-mobile-topbar {
    height: 3.5rem;
    background: linear-gradient(to right, var(--mrt-sidebar-bg-start), var(--mrt-sidebar-bg-mid));
    border-bottom: 1px solid rgba(56, 189, 248, 0.1);
    flex-shrink: 0;
}


/* Page wrapper fills space between mobile topbar and footer */
.app-page-wrapper {
    flex: 1 1 0;
    overflow: hidden;
    min-height: 0;
}

/* Content column: flex column so footer pins to bottom parallel to nav-user-section */
.app-content-col {
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.app-content-col > main {
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* Content topbar — min-height lets it expand when complex headers wrap on narrow screens */
.content-topbar {
    min-height: 3.5rem;
    flex-shrink: 0;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding-block: 0.5rem;
}

.content-topbar .page-title {
    font-size: 1.0625rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.content-topbar .page-subtitle {
    font-size: 0.75rem;
    color: #64748b;
    margin: 0;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* ═══════════════════════════════════════════════════════════════════════
   4. BREADCRUMB
   ═══════════════════════════════════════════════════════════════════════ */

.breadcrumb-nav {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
    margin-bottom: 1.25rem;
    padding: 5px 10px;
    border-radius: 10px;
    background: linear-gradient(to right, var(--mrt-primary-50), #f8fafc);
    border: 1px solid var(--mrt-primary-200);
    box-shadow: 0 1px 4px rgba(14, 165, 233, 0.07);
    max-width: 100%;
    align-self: flex-start;
}

.breadcrumb-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    border-radius: 7px;
    font-size: 0.78rem;
    font-weight: 500;
    color: #475569;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.15s ease, background 0.15s ease;
}

a.breadcrumb-item:hover,
a.breadcrumb-home:hover {
    color: var(--mrt-primary-600);
    background: rgba(14, 165, 233, 0.1);
}

.breadcrumb-home {
    color: var(--mrt-primary-700);
    font-weight: 600;
}

.breadcrumb-home svg,
.breadcrumb-home i {
    flex-shrink: 0;
    color: var(--mrt-primary-400);
    filter: drop-shadow(0 0 4px rgba(56, 189, 248, 0.35));
    transition: filter 0.15s ease, transform 0.15s ease;
}

a.breadcrumb-home:hover svg,
a.breadcrumb-home:hover i {
    filter: drop-shadow(0 0 7px rgba(56, 189, 248, 0.6));
    transform: scale(1.12);
}

.breadcrumb-sep {
    display: flex;
    align-items: center;
    color: #94a3b8;
    margin: 0 1px;
    flex-shrink: 0;
    pointer-events: none;
}

.breadcrumb-current {
    position: relative;
    color: #0f172a;
    font-weight: 600;
    background: rgba(14, 165, 233, 0.08);
    cursor: default;
    padding-left: 22px;
}

.breadcrumb-current::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--mrt-primary-400);
    box-shadow: 0 0 6px rgba(56, 189, 248, 0.7);
}



/* ═══════════════════════════════════════════════════════════════════════
   6. CARDS
   ═══════════════════════════════════════════════════════════════════════ */

.card {
    background-color: var(--mrt-card-bg);
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06),
                0 1px 2px rgba(0, 0, 0, 0.04);
    padding: 1.5rem;
    border: none;
}

/* Inline toolbar row inside table cards */
.card-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    background-color: #e2e8f0;
}

/* Filter chip hover — prevent Bootstrap's white-text-on-fill hover */
.card-toolbar .btn-outline-warning.rounded-pill:hover  { background-color: rgba(255,193,7,0.18);  color: #664d03; }
.card-toolbar .btn-outline-secondary.rounded-pill:hover { background-color: rgba(108,117,125,0.15); color: #343a40; }
.card-toolbar .btn-outline-danger.rounded-pill:hover   { background-color: rgba(220,53,69,0.12);  color: #b02a37; }
/* Standard smelter custom amber chip hover (inactive state) */
.card-toolbar .rounded-pill:not([style*="background-color:#d97706"]):hover { filter: brightness(0.95); }

.filter-search-wrap {
    position: relative;
    flex-shrink: 0;
    margin-left: auto;
}

.filter-search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.8125rem;
    pointer-events: none;
    z-index: 1;
}

.filter-search-input {
    padding-left: 2rem !important;
    width: 15rem;
    max-width: 100%;
    background-color: #f8fafc;
    border-color: #e2e8f0;
    border-radius: 2rem !important;
    transition: border-color 0.15s ease, background-color 0.15s ease;
    color: #0f172a;
}

.filter-search-input:hover {
    border-color: var(--mrt-primary-300);
}

.filter-search-input:focus {
    background-color: #ffffff;
    border-color: var(--mrt-primary-400);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.12);
}

.filter-select {
    width: auto;
    min-width: 7.5rem;
    max-width: 12rem;
    background-color: #f8fafc;
    border-color: #e2e8f0;
    border-radius: 2rem !important;
    color: #374151;
    transition: border-color 0.15s ease;
}

.filter-select:hover {
    border-color: var(--mrt-primary-300);
}

.filter-select:focus {
    background-color: #ffffff;
    border-color: var(--mrt-primary-400);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.12);
}

.stat-card {
    background-color: #f0f9ff;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
                0 2px 4px -1px rgba(0, 0, 0, 0.06);
    padding: 1.5rem;
    transition: box-shadow 0.2s ease, background-color 0.15s ease, border-left-width 0.15s ease;
    border: none;
    border-left: 3px solid var(--mrt-primary-600);
}

.stat-card:hover {
    box-shadow: var(--bs-box-shadow-lg) !important;
}

.stat-card-clickable:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

.stat-card .stat-value { color: var(--mrt-primary-600); }

/* Semantic colour variants */
.stat-card-success { background-color: #f0fdf4; border-left-color: #16a34a; }
.stat-card-success .stat-value { color: #16a34a; }

.stat-card-warning { background-color: #fffbeb; border-left-color: #d97706; }
.stat-card-warning .stat-value { color: #d97706; }

.stat-card-info { background-color: #eff6ff; border-left-color: #2563eb; }
.stat-card-info .stat-value { color: #2563eb; }

.stat-card-indigo { background-color: #eef2ff; border-left-color: #4f46e5; }
.stat-card-indigo .stat-value { color: #4f46e5; }

.stat-card-gray { background-color: #f9fafb; border-left-color: #6b7280; }
.stat-card-gray .stat-value { color: #6b7280; }

.stat-card-violet  { background-color: #f5f3ff; border-left-color: #7c3aed; }
.stat-card-violet  .stat-value { color: #7c3aed; }

.stat-card-sky     { background-color: #f0f9ff; border-left-color: #0284c7; }
.stat-card-sky     .stat-value { color: #0284c7; }

.stat-card-emerald { background-color: #ecfdf5; border-left-color: #059669; }
.stat-card-emerald .stat-value { color: #059669; }

.stat-card-danger  { background-color: #fff1f2; border-left-color: #dc2626; }
.stat-card-danger  .stat-value { color: #dc2626; }

/* Mineral grid card light border colors */
.mineral-border-violet  { border: 2px solid #c7d2fe !important; }
.mineral-border-sky     { border: 2px solid #93c5fd !important; }
.mineral-border-emerald { border: 2px solid #a7f3d0 !important; }

/* Active/selected state for clickable stat cards */
.stat-card-active                      { outline: 2px solid currentColor; outline-offset: 1px; border-left-width: 4px; }
.stat-card.stat-card-active            { outline-color: #0284c7; background-color: #e0f2fe; }
.stat-card-violet.stat-card-active     { outline-color: #7c3aed; background-color: #ede9fe; }
.stat-card-sky.stat-card-active        { outline-color: #0284c7; background-color: #e0f2fe; }
.stat-card-emerald.stat-card-active    { outline-color: #059669; background-color: #d1fae5; }
.stat-card-warning.stat-card-active    { outline-color: #d97706; background-color: #fef3c7; }
.stat-card-danger.stat-card-active     { outline-color: #dc2626; background-color: #fee2e2; }
.stat-card-indigo.stat-card-active     { outline-color: #4f46e5; background-color: #e0e7ff; }
.stat-card-info.stat-card-active       { outline-color: #2563eb; background-color: #dbeafe; }
.stat-card-success.stat-card-active    { outline-color: #16a34a; }


/* ═══════════════════════════════════════════════════════════════════════
   7. FORM ELEMENTS
   ═══════════════════════════════════════════════════════════════════════ */


/* ═══════════════════════════════════════════════════════════════════════
   8. TABLES
   ═══════════════════════════════════════════════════════════════════════ */

.table-header {
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.table-cell {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: #1e293b;
}


/* ═══════════════════════════════════════════════════════════════════════
   9. BADGES
   ═══════════════════════════════════════════════════════════════════════ */

.badge {
    display: inline-flex !important;
    align-items: center !important;
    padding: 0.25em 0.65em !important;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1 !important;
}

.badge-success  { background-color: #dcfce7; color: #166534; }
.badge-danger   { background-color: #fee2e2; color: #991b1b; }
.badge-warning  { background-color: #fef9c3; color: #854d0e; }
.badge-info     { background-color: #dbeafe; color: #1e40af; }
.badge-indigo   { background-color: #eef2ff; color: #4f46e5; }
.badge-violet   { background-color: #ede9fe; color: #6d28d9; }
.badge-sky      { background-color: #e0f2fe; color: #0369a1; }
.badge-emerald  { background-color: #d1fae5; color: #047857; }
.badge-gray     { background-color: #f3f4f6; color: #1f2937; }


/* ═══════════════════════════════════════════════════════════════════════
   10. ALERTS
   ═══════════════════════════════════════════════════════════════════════ */

.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.alert-warning {
    background-color: #fefce8;
    border: 1px solid #fef08a;
    color: #854d0e;
}



/* ═══════════════════════════════════════════════════════════════════════
   12. UTILITIES & MISC
   ═══════════════════════════════════════════════════════════════════════ */

/* Underline indicator tab nav */
.nav-epr-underline {
    display: flex;
    flex-wrap: wrap;
    border-bottom: 1px solid #e2e8f0;
    padding: 0;
    margin: 0;
    list-style: none;
}

.nav-epr-underline .nav-item {
    display: flex;
    align-items: stretch;
}

.nav-epr-underline .nav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    border: none;
    border-radius: 0;
    padding: 0.625rem 1.125rem;
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 500;
    background: none;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.15s ease;
}

.nav-epr-underline .nav-link::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 3px;
    background-color: transparent;
    transition: background-color 0.15s ease;
}

.nav-epr-underline .nav-link:hover {
    color: #1e293b;
}

.nav-epr-underline .nav-link:hover::after {
    background-color: #cbd5e1;
}

.nav-epr-underline .nav-link.active {
    color: var(--mrt-primary-700);
    font-weight: 600;
}

.nav-epr-underline .nav-link.active::after {
    background-color: var(--mrt-primary-500);
}

.nav-epr-underline ~ [x-show] {
    padding-top: 1.25rem;
}

.min-w-0 { min-width: 0; }
.rotate-90 { transform: rotate(90deg); }
.label-xs { font-size: 10px; letter-spacing: .05em; }
.section-xs { font-size: 10px; letter-spacing: .08em; white-space: nowrap; }

/* Generic transform transition for sortable-header / expand chevrons */
.transition-transform { transition: transform 0.2s ease; }

/* Footer */
.app-footer {
    background-color: #ffffff;
    color: #64748b;
    font-size: 0.875rem;
    height: 3.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 1rem;
    border-top: 1px solid #e2e8f0;
    flex-shrink: 0;
}


/* ═══════════════════════════════════════════════════════════════════════
   13. KEYFRAME ANIMATIONS
   ═══════════════════════════════════════════════════════════════════════ */

@keyframes logoGlow {
    0%, 100% { box-shadow: 0 0 16px rgba(56, 189, 248, 0.15); }
    50%       { box-shadow: 0 0 24px rgba(56, 189, 248, 0.28); }
}


/* ═══════════════════════════════════════════════════════════════════════
   14. UTILITY SUPPLEMENTS
   ═══════════════════════════════════════════════════════════════════════ */

/* Bootstrap omits min-height:0; needed on flex children that must shrink */
.min-h-0 { min-height: 0; }

/* Font-size supplements not covered by Bootstrap's fs-1…fs-6 scale */
.fs-xs  { font-size: 0.75rem; }
.fs-2xs { font-size: 0.72rem; }

/* Max-width helpers (rem-based, not covered by Bootstrap mw-*) */
.mw-10rem { max-width: 10rem; }
.mw-14rem { max-width: 14rem; }

/* SVG fill helper */
.fill-current { fill: currentColor; }


/* ═══════════════════════════════════════════════════════════════════════
   15. NAV COMPONENT SUPPLEMENTS
   ═══════════════════════════════════════════════════════════════════════ */

.nav-logo-img {
    width: 1.5rem;
    height: 1.5rem;
}

.nav-sub-brand {
    font-size: 10px;
    color: #ffffff;
    letter-spacing: 0.1em;
}

.nav-user-email {
    font-size: 10px;
    color: rgba(147, 197, 253, 0.6);
    line-height: 1.3;
}

.nav-signout-icon {
    width: 0.875rem;
    height: 0.875rem;
    flex-shrink: 0;
}



/* ═══════════════════════════════════════════════════════════════════════
   24. BOM UPLOAD COMPONENT
   ═══════════════════════════════════════════════════════════════════════ */



/* ═══════════════════════════════════════════════════════════════════════
   22. DASHBOARD
   ═══════════════════════════════════════════════════════════════════════ */

/* Stat card icon container — 3 rem × 3 rem centred */
.stat-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon-indigo { background-color: #eef2ff; color: #4f46e5; }
.stat-icon-amber  { background-color: #fffbeb; color: #d97706; }
.stat-icon-gray   { background-color: #f3f4f6; color: #6b7280; }

/* Empty-state icon circle (no-selection state) */
.empty-state-icon {
    width: 4rem;
    height: 4rem;
    border-radius: 1rem;
    background-color: var(--bs-secondary-bg);
    display: flex;
    align-items: center;
    justify-content: center;
}


/* ═══════════════════════════════════════════════════════════════════════
   25. SIDEBAR COLLAPSE
   ═══════════════════════════════════════════════════════════════════════ */

/* Transition active only while the toggle button is being clicked */
.sidebar-toggling .nav-sidebar-outer {
    overflow: hidden;
    transition: width 0.25s ease, min-width 0.25s ease;
}

/* Collapsed sidebar width */
.sidebar-collapsed .nav-sidebar-outer {
    width: 3.5rem;
    min-width: 3.5rem;
}

/* Hide text elements in collapsed state — !important overrides Bootstrap d-flex/d-block utilities */
.sidebar-collapsed .nav-label,
.sidebar-collapsed .nav-section-label,
.sidebar-collapsed .nav-brand-text,
.sidebar-collapsed .nav-user-text,
.sidebar-collapsed .nav-user-chevron,
.sidebar-collapsed .nav-user-name,
.sidebar-collapsed .nav-user-email-sm {
    display: none !important;
}

/* Center nav link icons when collapsed */
.sidebar-collapsed .nav-link {
    justify-content: center;
    padding: 9px 0;
}

/* Collapsed brand: hide logo, center the toggle */
.sidebar-collapsed .nav-logo-ring {
    display: none !important;
}

.sidebar-collapsed .nav-brand {
    justify-content: center;
    padding: 0;
}

/* Center user avatar when collapsed */
.sidebar-collapsed .nav-user-trigger {
    justify-content: center;
    padding: 8px 0;
}

/* Collapsed sidebar nav-link tooltip — Bootstrap Tooltip override */
.nav-tooltip .tooltip-inner {
    background: #1e293b;
    color: #f1f5f9;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.3rem 0.65rem;
    border-radius: 6px;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    line-height: 1;
    max-width: none;
}

.nav-tooltip.bs-tooltip-end .tooltip-arrow::before {
    border-right-color: #1e293b;
}

/* Collapse toggle button — lives inside .nav-brand */
.nav-brand-toggle {
    width: 2rem;
    height: 2rem;
    background: transparent;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1rem;
    line-height: 1;
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
}

.nav-brand-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

/* User section at sidebar bottom */
.nav-user-section {
    position: relative;
    border-top: 1px solid #e2e8f0;
    flex-shrink: 0;
    height: 3.5rem;
    display: flex;
    align-items: center;
}

/* User trigger button — matches white-sidebar nav-link style */
.nav-user-trigger {
    display: flex;
    align-items: center;
    background: none;
    border: none;
    cursor: pointer;
    transition: background 0.15s ease;
    border-radius: 0.5rem;
    width: 100%;
}

.nav-user-trigger:hover {
    background: #f0f5fb;
}

/* User avatar — brand blue on white sidebar */
.nav-user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: #154b7f;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
}

.nav-user-name  { color: #1e293b; line-height: 1.3; }
.nav-user-email-sm { font-size: 10px; color: #64748b; line-height: 1.3; }

.nav-user-chevron {
    font-size: 0.6rem;
    color: #94a3b8;
}

/* User popup — Alpine x-show controls visibility; CSS handles position above the trigger */
.nav-user-popup {
    position: absolute;
    bottom: calc(100% + 0.25rem);
    left: 0;
    width: 100%;
    min-width: 13rem;
    z-index: 1000;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12), 0 1px 4px rgba(0, 0, 0, 0.06);
}

/* Chevron rotates via Alpine :aria-expanded binding */
.nav-user-trigger[aria-expanded="false"] .nav-user-chevron {
    transform: rotate(180deg);
}

.nav-user-popup-header {
    background: #154b7f;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-user-popup-signout {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    color: #dc2626;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s, color 0.15s;
}

.nav-user-popup-signout:hover {
    background: #fef2f2;
    color: #b91c1c;
}




/* ═══════════════════════════════════════════════════════════════════════
   MRT APPLICATION STYLES (custom utilities, login, components)
   ═══════════════════════════════════════════════════════════════════════ */

/* ── 2. Typography Utilities (missing from Bootstrap) ──── */
.fs-7         { font-size: 0.75rem   !important; }  /* ~text-xs      */
.fs-8         { font-size: 0.6875rem !important; }  /* ~text-[11px]  */
.fs-9         { font-size: 0.625rem  !important; }  /* ~text-[10px]  */
.fs-10        { font-size: 0.5rem    !important; }  /* badge close btn */
.fw-extrabold { font-weight: 800     !important; }
.lh-1         { line-height: 1       !important; }
.lh-tight     { line-height: 1.25    !important; }
.leading-relaxed { line-height: 1.625 !important; }
.tabular-nums { font-variant-numeric: tabular-nums !important; }

.letter-spacing-tight   { letter-spacing: -0.025em !important; }
.letter-spacing-wide    { letter-spacing: 0.025em  !important; }
.letter-spacing-wider   { letter-spacing: 0.05em   !important; }
.letter-spacing-widest  { letter-spacing: 0.1em    !important; }

/* ── 2b. Size & Max-width Utilities ──────────────────────  */
.size-9  { width: 2.25rem !important; height: 2.25rem !important; }
.size-10 { width: 2.5rem  !important; height: 2.5rem  !important; }
.size-12 { width: 3rem    !important; height: 3rem    !important; }

.icon-xs { width: 1rem    !important; height: 1rem    !important; font-size: 1rem    !important; }
.icon-sm { width: 1.25rem !important; height: 1.25rem !important; font-size: 1.25rem !important; }
.icon-md { width: 1.5rem  !important; height: 1.5rem  !important; font-size: 1.5rem  !important; }
.icon-lg { width: 2rem    !important; height: 2rem    !important; font-size: 2rem    !important; }

.mw-xs { max-width: 20rem; }   /* ~max-w-xs  320px */
.mw-sm { max-width: 24rem; }   /* ~max-w-sm  384px */

/* Vertical positioning helper */
.bottom-6 { bottom: 1.5rem !important; }

/* ── 2c. Login Panel Text Colours (opacity variants) ─────  */
.text-login-blue-dim   { color: rgba(147, 197, 253, 0.6); }
.text-login-blue-muted { color: rgba(147, 197, 253, 0.5); }
.text-login-blue-soft  { color: rgba(191, 219, 254, 0.6); }
.text-login-footer     { color: rgba(147, 197, 253, 0.3); }

/* ── 2d. Layout Helpers ───────────────────────────────────  */
.sidebar-width   { width: 16rem; }       /* fixed sidebar — matches Tailwind w-64 */
.size-7          { width: 1.75rem !important; height: 1.75rem !important; }
.size-icon-nav   { width: 18px   !important; height: 18px   !important; }
.app-header      { height: 70px; }
.text-yellow-300 { color: #fde047; }     /* active nav item in top-header */

/* ── 3. Hover & Transition Utilities ─────────────────────  */
.hover-lift            { transition: transform 0.2s ease, box-shadow 0.2s ease; }
.hover-lift:hover      { transform: translateY(-4px); box-shadow: var(--bs-box-shadow-lg) !important; }

.transition-all        { transition: all 0.2s ease; }

/* ── 5. Gradient Text ─────────────────────────────────────  */
.gradient-text-sky-indigo {
    background: linear-gradient(135deg, #38bdf8, #818cf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
/* ── 7. Scrollbar ─────────────────────────────────────────  */
.scrollbar-thin {
    scrollbar-width: thin;
    scrollbar-color: rgba(56, 189, 248, 0.15) transparent;
}

/* ── 8. Dashboard Dynamic Stat-Icon Colours ──────────────
   Replaces Tailwind's dynamic bg-{{ $color }}-50 / text-{{ $color }}-500
   classes that are generated in PHP loops.
   Usage: <div class="stat-icon-wrap" data-color="indigo">
   ──────────────────────────────────────────────────────── */
.stat-icon-wrap {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0;
    background-color: #f1f5f9;
    color: #64748b;
    line-height: 1;
}
.stat-icon-wrap[data-color="indigo"]  { background-color: #eef2ff; color: #6366f1; }
.stat-icon-wrap[data-color="emerald"] { background-color: #d1fae5; color: #10b981; }
.stat-icon-wrap[data-color="green"]   { background-color: #d1fae5; color: #10b981; }
.stat-icon-wrap[data-color="amber"]   { background-color: #fef3c7; color: #f59e0b; }
.stat-icon-wrap[data-color="rose"]    { background-color: #ffe4e6; color: #f43f5e; }
.stat-icon-wrap[data-color="blue"]    { background-color: #dbeafe; color: #3b82f6; }
.stat-icon-wrap[data-color="slate"]   { background-color: #f1f5f9; color: #64748b; }
.stat-icon-wrap[data-color="red"]     { background-color: #fee2e2; color: #ef4444; }

.stat-card-border[data-color="indigo"]  { border-color: #c7d2fe !important; }
.stat-card-border[data-color="emerald"] { border-color: #a7f3d0 !important; }
.stat-card-border[data-color="amber"]   { border-color: #fde68a !important; }
.stat-card-border[data-color="rose"]    { border-color: #fecdd3 !important; }

.stat-card-label[data-color="indigo"]  { color: #6366f1; }
.stat-card-label[data-color="emerald"] { color: #10b981; }
.stat-card-label[data-color="amber"]   { color: #f59e0b; }
.stat-card-label[data-color="rose"]    { color: #f43f5e; }

/* ── 9. Mobile Nav Link ───────────────────────────────────  */
.mobile-nav-link {
    display: block;
    padding: 0.5rem 1rem 0.5rem 0.75rem;
    border-left: 4px solid transparent;
    font-size: 1rem;
    font-weight: 500;
    color: #4b5563;
    text-decoration: none;
    transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.mobile-nav-link:hover {
    color: #1f2937;
    background-color: #f9fafb;
    border-left-color: #d1d5db;
}

/* ── 11. Wave-Dot Page Loader ─────────────────────────────  */
.page-loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: rgba(249, 250, 251, 0.72);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.page-loader.active {
    opacity: 1;
    pointer-events: all;
}

.wave-dot-loader {
    display: flex;
    align-items: center;
    gap: 9px;
}

.wave-dot-loader .dot {
    display: block;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, #38bdf8, #0284c7);
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.35);
    animation: waveDot 1.2s ease-in-out infinite;
}

.wave-dot-loader .dot:nth-child(1) { animation-delay: 0s;    }
.wave-dot-loader .dot:nth-child(2) { animation-delay: 0.12s; }
.wave-dot-loader .dot:nth-child(3) { animation-delay: 0.24s; }
.wave-dot-loader .dot:nth-child(4) { animation-delay: 0.36s; }
.wave-dot-loader .dot:nth-child(5) { animation-delay: 0.48s; }

@keyframes waveDot {
    0%, 55%, 100% { transform: translateY(0)     scale(1);   opacity: 0.35; }
    27%           { transform: translateY(-14px) scale(1.2); opacity: 1;    }
}

.loader-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #0369a1;
    animation: labelPulse 1.2s ease-in-out infinite;
    margin: 0;
}

@keyframes labelPulse {
    0%, 100% { opacity: 0.5; }
    50%       { opacity: 1;   }
}

/* ── 11b. Flash Toast Positioning ────────────────────────  */
.flash-toast {
    position: fixed;
    top: 3.5rem;
    right: 1.5rem;
    z-index: 9999;
    min-width: 320px;
    max-width: 28rem;
}

/* ── 12. Login Page Special Styles ───────────────────────
   Extracted from login.blade.php's inline <style> block.
   ──────────────────────────────────────────────────────── */
.login-bg {
    background: linear-gradient(135deg, #0B1426 0%, #0F2044 40%, #0a1628 70%, #071020 100%);
    position: relative;
    overflow: hidden;
}

.login-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 50% at 20% 30%, rgba(56, 189, 248, 0.12) 0%, transparent 70%),
        radial-gradient(ellipse 40% 40% at 80% 70%, rgba(99, 102, 241, 0.10) 0%, transparent 60%),
        radial-gradient(ellipse 30% 30% at 60% 20%, rgba(14, 165, 233, 0.08) 0%, transparent 50%);
    animation: bgPulse 8s ease-in-out infinite alternate;
}

@keyframes bgPulse {
    0%   { opacity: 0.7; transform: scale(1);    }
    100% { opacity: 1;   transform: scale(1.05); }
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    animation: orbFloat 12s ease-in-out infinite;
    pointer-events: none;
}

.orb-1 {
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.15), transparent 70%);
    top: -80px; left: -60px;
    animation-delay: 0s;
}

.orb-2 {
    width: 250px; height: 250px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.12), transparent 70%);
    bottom: -60px; right: 40px;
    animation-delay: -4s;
}

.orb-3 {
    width: 180px; height: 180px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.10), transparent 70%);
    top: 50%; left: 30%;
    animation-delay: -8s;
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0)       scale(1);    }
    33%       { transform: translate(20px, -30px) scale(1.05); }
    66%       { transform: translate(-15px, 20px) scale(0.97); }
}

.grid-overlay {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(56, 189, 248, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(56, 189, 248, 0.04) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 40%, transparent 100%);
}

.login-card {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.1),
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 80px rgba(56, 189, 248, 0.08);
}

.brand-panel {
    position: relative;
    z-index: 1;
}

.brand-logo-ring {
    width: 72px; height: 72px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.3), rgba(99, 102, 241, 0.3));
    border: 1px solid rgba(56, 189, 248, 0.4);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 0 0 8px rgba(56, 189, 248, 0.06), 0 0 40px rgba(56, 189, 248, 0.2);
    animation: logoPulse 3s ease-in-out infinite;
}

@keyframes logoPulse {
    0%, 100% { box-shadow: 0 0 0 8px  rgba(56, 189, 248, 0.06), 0 0 40px rgba(56, 189, 248, 0.2); }
    50%       { box-shadow: 0 0 0 12px rgba(56, 189, 248, 0.04), 0 0 60px rgba(56, 189, 248, 0.3); }
}

.stat-strip {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    backdrop-filter: blur(10px);
}

.stat-divider {
    width: 1px;
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.15), transparent);
}

.brand-line {
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(56, 189, 248, 0.5), rgba(99, 102, 241, 0.5), transparent);
}

.login-form-input {
    width: 100%;
    padding: 13px 16px;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.9rem;
    color: #1e293b;
    background: #f8fafc;
    transition: all 0.2s ease;
    outline: none;
}

.login-form-input:focus {
    border-color: #38bdf8;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.1);
}

.login-form-input.is-invalid {
    border-color: #f87171;
    background: #fff5f5;
    box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.1);
}

.login-form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 6px;
    letter-spacing: 0.025em;
    text-transform: uppercase;
}

.btn-signin {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.35);
    letter-spacing: 0.025em;
}

.btn-signin::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), transparent);
    opacity: 0;
    transition: opacity 0.2s;
}

.btn-signin:hover         { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(14, 165, 233, 0.45); }
.btn-signin:hover::before { opacity: 1; }
.btn-signin:active        { transform: translateY(0);    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.3);   }
.btn-signin:disabled      { opacity: 0.7; cursor: not-allowed; transform: none; }

.login-spinner {
    width: 18px; height: 18px;
    border: 2.5px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    display: inline-block;
}

@keyframes spin { to { transform: rotate(360deg); } }

.login-error-alert {
    background: #fff5f5;
    border: 1.5px solid #fecaca;
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0);    }
}

.input-wrapper {
    position: relative;
}

.toggle-pw {
    position: absolute;
    right: 14px; top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px;
    color: #94a3b8;
    transition: color 0.15s;
}

.toggle-pw:hover { color: #475569; }

/* ── 13. Alpine x-cloak ───────────────────────────────────  */
[x-cloak] { display: none !important; }

/* ── 14. Dark-gradient table header ──────────────────────
   Used on list pages — dark thead without full .table-dark
   ──────────────────────────────────────────────────────── */
.thead-dark-gradient {
    background: linear-gradient(to right, #1e293b, #334155);
    color: #fff;
}

.thead-dark-gradient th {
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.75rem 1rem;
    border-color: transparent;
}

/* Sortable column — works in any thead */
th.sortable {
    white-space: nowrap;
    padding: 0 !important;
}
th.sortable:hover {
    background: rgba(0, 0, 0, 0.04);
}
.sort-btn {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background: none;
    border: none;
    padding: 0.75rem 1rem;
    margin: 0;
    line-height: 1;
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
    text-transform: inherit;
    letter-spacing: inherit;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    width: 100%;
    outline: none;
    box-shadow: none;
}
.sort-btn:focus,
.sort-btn:active,
.sort-btn:focus-visible {
    outline: none;
    box-shadow: none;
}
/* Sortable column hover within dark thead */
.thead-dark-gradient th.sortable:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* ── 15. Misc Utilities ───────────────────────────────────  */
.resize-none    { resize: none !important; }
.rotate-180     { transform: rotate(180deg); }
.overflow-y-auto { overflow-y: auto !important; }
.border-dashed  { border-style: dashed !important; }
.cursor-pointer { cursor: pointer !important; }

/* ── 16. Slate Gradient (used as dark card/section headers) ─ */
.bg-slate-gradient {
    background: linear-gradient(to right, #1e293b, #334155);
}

/* ── 16c. File Upload Drop Zone ──────────────────────────── */
.upload-drop-zone {
    transition: border-color 0.2s ease, background-color 0.2s ease;
}
.upload-drop-zone:hover {
    border-color: var(--bs-primary) !important;
    background-color: rgba(2, 132, 199, 0.04) !important;
}

.upload-disabled-overlay {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(2px);
    z-index: 5;
}

/* stat-card-border and stat-card-label additional colors */
.stat-card-border[data-color="blue"]    { border-color: #93c5fd !important; }
.stat-card-border[data-color="green"]   { border-color: #a7f3d0 !important; }
.stat-card-border[data-color="red"]     { border-color: #fca5a5 !important; }
.stat-card-border[data-color="slate"]   { border-color: #cbd5e1 !important; }

.stat-card-label[data-color="blue"]    { color: #3b82f6; }
.stat-card-label[data-color="green"]   { color: #10b981; }
.stat-card-label[data-color="red"]     { color: #ef4444; }
.stat-card-label[data-color="slate"]   { color: #64748b; }

/* ── 17. Livewire Modal Overlay ──────────────────────────── */
.modal-overlay {
    z-index: 1050;
    background: rgba(0, 0, 0, 0.4);
}

/* ── 18. Stat Card Label Typography ──────────────────────── */
.text-stat-label {
    font-size: 0.65rem !important;
    letter-spacing: 0.06em !important;
}

/* ── 19. Dashboard Gradient Bars ─────────────────────────── */
.gradient-bar                { height: 4px; }
.gradient-bar-cyan-blue      { background: linear-gradient(to right, #06b6d4, #2563eb); }
.gradient-bar-violet-indigo  { background: linear-gradient(to right, #8b5cf6, #6366f1); }
.gradient-bar-blue-violet    { background: linear-gradient(to right, #3b82f6, #9333ea); }

/* ── 21. Dot Swatch ──────────────────────────────────────── */
.dot-xs { display: inline-block; width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; background-color: var(--dot-bg, #94a3b8); }

/* ── 22. Max-width & Max-height Utilities ────────────────── */
.mw-md   { max-width: 28rem; }   /* ~448px — small modal */
.mw-lg   { max-width: 32rem; }   /* ~512px */
.mw-xl   { max-width: 40rem; }   /* ~640px — medium modal */
.mw-2xl  { max-width: 42rem; }   /* ~672px — wide modal */
.mw-4xl  { max-width: 72rem; }   /* ~1152px — import modal */
.mw-10r  { max-width: 10rem; }
.mw-200  { max-width: 200px; }
.mh-85vh { max-height: 85vh; }
.mh-90vh { max-height: 90vh; }

/* ── 23. Progress Bar Heights ────────────────────────────── */
.progress-xs  { height: 0.375rem; }
.progress-sm2 { height: 0.5rem; }

/* ── 24. Brand Palette Extras ────────────────────────────── */
.text-indigo   { color: #6366f1 !important; }
.text-violet   { color: #7c3aed !important; }
.text-teal     { color: #0d9488 !important; }
.text-orange   { color: #ea580c !important; }
.text-cyan-700 { color: #0891b2 !important; }
.text-fuchsia  { color: #a21caf !important; }
.bg-orange     { background-color: #ea580c !important; color: #fff !important; }

/* ── 25. Table Column Width Helpers ──────────────────────── */
.col-w-40 { width: 40%; }
.col-w-60 { width: 60%; }

/* ── 26. Chart Donut Container ───────────────────────────── */
.chart-donut { width: 9rem; height: 9rem; }

/* ── 27. Misc Width Utilities ────────────────────────────── */
.w-2r  { width: 2rem; }
.w-16r { width: 16rem; }

/* ── 28. Max-height Extras ───────────────────────────────── */
.mh-14r { max-height: 14rem; }

/* ── 29. Size (width + height) Utilities ─────────────────── */
.size-1r   { width: 1rem;   height: 1rem; }
.size-3-5r { width: 3.5rem; height: 3.5rem; }
.size-11r  { width: 11rem;  height: 11rem; }
.size-16r  { width: 16rem;  height: 16rem; }

/* ── 31. Fixed-width, Min-width & Gap Utilities ──────────── */
.w-3r     { width: 3rem; }
.mw-60pct { max-width: 60%; }
.min-w-200 { min-width: 200px; }
.gap-2px  { gap: 2px !important; }

/* ── 32. Letter-spacing Utilities ───────────────────────── */
.ls-wide  { letter-spacing: 0.5em !important; }

/* ── New Utility Classes from inline-style conversion ── */
.anim-delay-0  { animation-delay: 0s; }
.anim-delay-1  { animation-delay: .02s; }
.anim-delay-2  { animation-delay: .04s; }
.anim-delay-3  { animation-delay: .06s; }
.anim-delay-4  { animation-delay: .08s; }
.anim-delay-5  { animation-delay: .10s; }
.anim-delay-6  { animation-delay: .12s; }
.anim-delay-7  { animation-delay: .14s; }
.anim-delay-8  { animation-delay: .16s; }
.anim-delay-9  { animation-delay: .18s; }
.anim-delay-10 { animation-delay: .20s; }
.header-gradient-dark { background: linear-gradient(to right, #0f172a, #1e293b, #0f172a); }
.header-icon-box { width: 2.5rem; height: 2.5rem; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); }
.header-meta-text { color: #94a3b8; font-size: 0.7rem; }
.icon-xxs { font-size: 0.55rem; }
.glass-pill { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); }
.status-dot { width: 0.4rem; height: 0.4rem; display: inline-block; }
.label-muted-xs { color: #94a3b8; font-size: 0.65rem; letter-spacing: 0.1em; }
.stat-label { font-size: 0.65rem; letter-spacing: 0.05em; }
.step-num-circle { width: 1.5rem; height: 1.5rem; display: flex; align-items: center; justify-content: center; font-size: 0.65rem; border-radius: 50%; }
.step-violet    { background-color: #7c3aed; color: #fff; }
.step-amber     { background-color: #f59e0b; color: #fff; }
.step-cyan      { background-color: #0891b2; color: #fff; }
.step-teal      { background-color: #0d9488; color: #fff; }
.badge-sm { font-size: 0.7rem; }
.badge-cahra-area { font-size: 0.7rem; background-color: #fffbeb; color: #b45309; border-color: #fde68a; }
.mh-13r { max-height: 13rem; overflow-y: auto; }
.mh-16r { max-height: 16rem; overflow-y: auto; }
.table-text-sm { font-size: 0.75rem; }
.th-label { font-size: 0.65rem; letter-spacing: 0.05em; }
.th-col-num    { width: 2.5rem; }
.th-col-answer { width: 5rem; }
.badge-lsm-type { font-size: 0.65rem; background-color: #fff7ed; color: #c2410c; border-color: #fed7aa; }
.row-num-badge { width: 1.25rem; height: 1.25rem; font-size: 0.65rem; display: flex; align-items: center; justify-content: center; border-radius: 50%; }
.stepper-line { height: 2px; border-radius: 1px; margin-bottom: 1.2rem; }
.radio-input-bordered { border-color: #6b7280 !important; border-width: 2px !important; }
.col-w-20 { width: 20%; }
.checkbox-md { width: 1.1rem; height: 1.1rem; }
.w-5r { width: 5rem; }
.select-h-12r { height: 12rem; }
.btn-close-xs { font-size: 0.6rem; }
.gradient-divider { height: 1px; background: linear-gradient(to right, #e2e8f0, transparent); }
.stat-card-clickable { cursor: pointer; }
.text-truncate-200 { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge-mineral-type { font-size: 0.6rem; }
.shadow-card { box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04); }
.supplier-list-scroll { max-height: 14rem; overflow-y: auto; }
.col-checkbox { width: 2.5rem; }
.icon-color-blue    { color: #3b82f6; }
.icon-color-indigo  { color: #6366f1; }
.icon-color-red     { color: #ef4444; }
.icon-color-emerald { color: #10b981; }
.icon-color-amber   { color: #f59e0b; }
.icon-color-sky     { color: #0ea5e9; }
.icon-color-rose    { color: #f43f5e; }
.icon-color-violet  { color: #8b5cf6; }
.icon-color-teal    { color: #14b8a6; }
.icon-color-green   { color: #16a34a; }
.icon-color-orange  { color: #f97316; }
.icon-color-fuchsia { color: #d946ef; }
.icon-color-cyan    { color: #06b6d4; }
.text-amber-600  { color: #d97706; }
.text-emerald-600 { color: #059669; }

/* ── Additional utility classes ── */
.col-w-120          { width: 120px; }
.mw-120             { max-width: 120px; }
.mw-180             { max-width: 180px; }
.progress-h-xs      { height: 6px; }
.text-slate-400     { color: #94a3b8; }
.icon-color-amber-500 { color: #f59e0b; }
.step-amber-500     { background-color: #f59e0b; }
.badge-teal-light   { background-color: #ccfbf1; color: #0f766e; }
.col-w-2-5r { width: 2.5rem; }
.col-w-5r   { width: 5rem; }
.w-1-6      { width: 16.666%; }
.w-1-12     { width: 8.333%; }

/* ── Final inline-style conversion classes ── */
.fw-110               { width: 110px; }
.checkbox-item-selected   { border-color: #0d6efd !important; background: #eff6ff; }
.checkbox-item-unselected { background: #fff; }
.stepper-line-done    { height:2px; background:#4f46e5; border-radius:1px; margin-bottom:1.2rem; flex-grow:1; }
.stepper-line-todo    { height:2px; background:#e5e7eb; border-radius:1px; margin-bottom:1.2rem; flex-grow:1; }
.progress-dot-done    { height:6px; width:24px; background:#4f46e5; border-radius:50rem; transition:all .3s; }
.progress-dot-todo    { height:6px; width:12px; background:#e5e7eb; border-radius:50rem; transition:all .3s; }
.step-circle-done     { width:2rem; height:2rem; font-size:0.75rem; background:#4f46e5; color:#fff; border:2px solid #4f46e5; }
.step-circle-active   { width:2rem; height:2rem; font-size:0.75rem; background:#fff; color:#4f46e5; border:2px solid #4f46e5; }
.step-circle-todo     { width:2rem; height:2rem; font-size:0.75rem; background:#f3f4f6; color:#9ca3af; border:2px solid #e5e7eb; }
.text-risk-at-risk    { color: #fca5a5; }
.text-risk-clear      { color: #6ee7b7; }
.btn-filter-amber        { background-color: #fff !important; border: 1px solid #d97706 !important; color: #d97706 !important; }
.btn-filter-amber-active { background-color: #d97706 !important; border-color: #d97706 !important; color: #fff !important; }
/* ── Enumerated dot-xs color classes ── */
.dot-green-800  { background-color: #047857; }
.dot-red-700    { background-color: #b91c1c; }
.dot-amber-700  { background-color: #b45309; }
.dot-slate-500  { background-color: #64748b; }
.dot-navy       { background-color: #1e3a5f; }
.dot-steel      { background-color: #5b7c99; }
.dot-gold       { background-color: #c9942e; }
.dot-purple-700 { background-color: #6b21a8; }
.dot-indigo     { background-color: #6366f1; }
.dot-xs-cmrt    { background-color: #7c3aed; }
.dot-xs-emrt    { background-color: #0284c7; }
.dot-xs-amrt    { background-color: #059669; }
.dot-xs-default { background-color: #6b7280; }
/* ── Progress bar segment colors ── */
.bar-cmrt { background-color: #3b82f6 !important; }
.bar-emrt { background-color: #8b5cf6 !important; }
.bar-amrt { background-color: #14b8a6 !important; }

progress.progress-sm2 { appearance: none; height: 0.5rem; border-radius: 0.375rem; border: none; overflow: hidden; display: block; }
progress.progress-sm2::-webkit-progress-bar { background-color: #e9ecef; border-radius: 0.375rem; }
progress.progress-sm2::-webkit-progress-value { background-color: #0d6efd; border-radius: 0.375rem; }
progress.progress-sm2::-moz-progress-bar { background-color: #0d6efd; border-radius: 0.375rem; }

.fw-semibold { font-weight: 600 !important; }
.btn-xs { padding: 0.125rem 0.5rem; font-size: 0.75rem; border-radius: 0.2rem; }

.thead-inprogress th { background-color: #ffc107 !important; color: #000; }

/* ── Page Loader (moved from app.blade.php) ── */
#mrt-page-loader {
    position: fixed; inset: 0; z-index: 99999;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
    background: rgba(249, 250, 251, 0.72);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0; pointer-events: none;
    transition: opacity 0.2s ease;
}
#mrt-page-loader.visible { opacity: 1; pointer-events: all; }
#mrt-progress-bar {
    position: fixed; top: 0; left: 0; height: 2px; width: 0%;
    background: #0ea5e9; z-index: 100000;
    transition: width 0.3s ease, opacity 0.4s ease; opacity: 0;
    pointer-events: none;
}

/* ── Login page (moved from login.blade.php) ── */
.btn-content { display: flex; align-items: center; justify-content: center; gap: 0.5rem; }

/* ── Final Summary (moved from final-summary.blade.php) ── */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes slideRight {
    from { width: 0; }
    to { width: 100%; }
}
.report-section { animation: fadeIn .45s ease-out both; }
.report-section:hover { box-shadow: 0 8px 30px -6px rgba(0,0,0,.08); }
.data-table { border-collapse: separate; border-spacing: 0; }
.data-table thead th { position: sticky; top: 0; z-index: 1; }
.data-table tbody tr { transition: background .15s ease; }
.step-num { font-variant-numeric: tabular-nums; }
.risk-badge { transition: transform .15s ease; }
.risk-badge:hover { transform: scale(1.05); }
.glass-header { backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
