/* ==========================================================================
   Mahacakra overrides on top of Metronic's style.bundle.css.

   Loaded last, so everything here wins. Kept deliberately small: the further
   this file drifts from stock Metronic, the harder a theme upgrade becomes.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Sidebar section headings (FSS2 / Asset Management / Access Management).
   Metronic's .menu-heading is sized for a light aside; on the dark aside it
   is close to invisible.
   -------------------------------------------------------------------------- */
.aside-dark .menu-heading {
    color: #6d6d80 !important;
    letter-spacing: 0.08em;
}

.aside-dark .menu-item .menu-heading {
    padding-left: 1.5rem;
}

/* Keeps the icon column aligned between flat entries and grouped entries,
   which use a bullet instead of an icon. */
.aside .menu-icon {
    width: 1.75rem;
    justify-content: flex-start;
}

/* --------------------------------------------------------------------------
   List screens
   -------------------------------------------------------------------------- */

/* The document and terminal lists run to a dozen columns; without this the
   table forces the whole page to scroll sideways instead of scrolling inside
   its own card. */
.table-responsive {
    overflow-x: auto;
}

/* Row action buttons sit in a fixed-width final column so the icons line up
   down the page regardless of how many actions a row's status allows. */
.table td.actions-cell {
    white-space: nowrap;
    width: 1%;
}

/* Status pills reuse Metronic's badge colours but are declared here so every
   module spells the same status the same way. */
.badge-status-active {
    background-color: #e8fff3;
    color: #50cd89;
}

.badge-status-inactive {
    background-color: #f9f9f9;
    color: #a1a5b7;
}

.badge-status-open {
    background-color: #fff8dd;
    color: #ffc700;
}

.badge-status-finalized {
    background-color: #e8fff3;
    color: #50cd89;
}

.badge-status-cancelled {
    background-color: #fff5f8;
    color: #f1416c;
}

/* --------------------------------------------------------------------------
   htmx
   -------------------------------------------------------------------------- */

/* Dims the swapped region while a request is in flight. htmx sets
   .htmx-request on the element carrying hx-indicator. */
.htmx-request.mc-indicator,
.htmx-request .mc-indicator {
    opacity: 0.45;
    pointer-events: none;
    transition: opacity 120ms linear;
}

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */

/* Marks a required field without adding an asterisk to every label by hand. */
.form-label.required::after {
    content: " *";
    color: #f1416c;
}

/* Read-only detail views reuse the form template with inputs disabled;
   without this they render greyed out and look like a validation failure. */
.form-control:disabled.mc-readonly,
.form-select:disabled.mc-readonly {
    background-color: #ffffff;
    color: #181c32;
    opacity: 1;
}
