/* ==========================================================================
   MINE HOLTER DESIGN SYSTEM - COMPONENT LIBRARY WIDGETS
   Chacón Partners - Operational Readiness Management System (ORMS)
   ========================================================================== */

/* ---------------------------------------------------------
   0. FEATHER ICONS BASE LAYOUTS
   --------------------------------------------------------- */
.feather {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
    vertical-align: middle;
}

.btn .feather {
    width: 16px;
    height: 16px;
}

.search-icon.feather {
    width: 16px;
    height: 16px;
}

/* ---------------------------------------------------------
   1. BUTTONS (Perfect rectangles, solid backgrounds)
   --------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 48px;
    padding: 0 24px;
    font-size: 14px;
    font-weight: var(--font-weight-bold);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border: none;
    border-radius: 6px; /* Rounded corners as per Figma Spec */
    cursor: pointer;
    transition: all 150ms ease;
    user-select: none;
    white-space: nowrap;
}

.btn:focus-visible {
    outline: 3px solid rgba(65, 116, 246, 0.4);
    outline-offset: 1px;
}

.btn-sm {
    height: 30px;
    padding: 0 12px;
    font-size: 12px;
}

.btn-primary {
    background-color: var(--color-blue-primary);
    color: var(--color-text-white);
}

.btn-primary:hover, .btn-primary.hover-sim {
    background-color: var(--color-blue-hover);
}

.btn-primary:active, .btn-primary.active-sim {
    background-color: var(--color-blue-pressed);
    color: var(--color-text-white);
}

.btn-primary:disabled {
    background-color: var(--color-gray-30);
    color: var(--color-gray-50);
    cursor: not-allowed;
}

.btn-secondary {
    background-color: var(--color-blue-secondary); /* Primary/80 light blue */
    color: var(--color-text-white);
}

.btn-secondary:hover, .btn-secondary.hover-sim {
    background-color: #609adc; /* Lighter blue hover */
}

.btn-secondary:active, .btn-secondary.active-sim {
    background-color: #4d82c2; /* Pressed state */
}

.btn-secondary:disabled {
    background-color: var(--color-gray-30);
    color: var(--color-gray-50);
    cursor: not-allowed;
}

/* ---------------------------------------------------------
   2. LEFT SIDEBAR (Two Modes: Compact [Default] vs Expanded)
   --------------------------------------------------------- */
#app-sidebar {
    grid-area: sidebar;
    background-color: var(--color-light-bg);
    border-right: 1px solid var(--color-gray-30);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    z-index: 200;
    width: var(--sidebar-width-compact);
    transition: width 250ms cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 2px 0 8px rgba(0,0,0,0.02);
}

#app-layout-wrapper.sidebar-expanded #app-sidebar {
    width: var(--sidebar-width-expanded);
}

/* Brand area logo/title */
.sidebar-brand-area {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 18px;
    border-bottom: 1px solid var(--color-gray-30);
    overflow: hidden;
    gap: 12px;
}

.brand-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.brand-name-container {
    display: flex;
    flex-direction: column;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(-10px);
    transition: opacity 150ms ease, transform 150ms ease;
}

#app-layout-wrapper.sidebar-expanded .brand-name-container {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 100ms;
}

.brand-title {
    font-size: 15px;
    font-weight: var(--font-weight-extrabold);
    color: var(--color-text-primary);
    letter-spacing: 0.05em;
}

.brand-subtitle {
    font-size: 10px;
    color: var(--color-blue-primary);
    font-weight: var(--font-weight-bold);
    text-transform: uppercase;
}

/* Sidebar navigation links */
.sidebar-navigation-items {
    display: flex;
    flex-direction: column;
    padding: 16px 0;
    gap: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    height: 56px;
    color: var(--color-text-secondary);
    text-decoration: none;
    padding: 0 14px;
    position: relative;
    gap: 12px;
    transition: all 150ms ease;
}

.nav-item:hover {
    color: var(--color-text-primary);
    background-color: transparent;
}

.nav-item:hover .nav-icon {
    background-color: var(--color-gray-40);
    color: var(--color-text-primary);
}

.nav-item.active {
    color: var(--color-text-primary);
    background-color: transparent;
}

.nav-item.active .nav-icon {
    background-color: var(--color-gray-50);
    color: var(--color-text-primary);
}

.nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 6px;
    background-color: var(--color-gray-30);
    color: var(--color-text-secondary);
    transition: all 150ms ease;
}

.nav-label-wrapper {
    display: flex;
    flex-direction: column;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(-10px);
    transition: opacity 150ms ease, transform 150ms ease;
}

#app-layout-wrapper.sidebar-expanded .nav-label-wrapper {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 80ms;
}

.nav-title {
    font-size: 14px;
    font-weight: var(--font-weight-bold);
}

.nav-desc {
    font-size: 10px;
    color: var(--color-text-secondary);
    font-weight: var(--font-weight-medium);
    margin-top: 1px;
}

/* Sidebar Spacer pushes items down */
.sidebar-spacer {
    flex-grow: 1;
}

/* Collapsed tooltips (slide left-to-right) */
.nav-tooltip {
    position: absolute;
    left: 60px;
    background-color: var(--color-dark-bg);
    color: var(--color-text-white);
    padding: 6px 12px;
    font-size: 12px;
    font-weight: var(--font-weight-bold);
    border-left: 2px solid var(--color-blue-primary);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-15px);
    transition: opacity 200ms ease, transform 200ms ease;
    box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.25);
    z-index: 1000;
}

/* Show tooltips only in compact mode */
#app-sidebar:not(.sidebar-expanded) .nav-item:hover .nav-tooltip {
    opacity: 1;
    transform: translateX(5px);
}

#app-layout-wrapper.sidebar-expanded .nav-tooltip {
    display: none !important;
}

/* Toggle Menu item chevron rotations */
.chevron-expand-icon {
    transition: transform 250ms ease;
}

#app-layout-wrapper.sidebar-expanded .chevron-expand-icon {
    transform: rotate(180deg);
}

.toggle-btn {
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

/* ---------------------------------------------------------
   3. RIGHT DRAWER (40% width, sliding from right, list behind visible)
   --------------------------------------------------------- */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 500;
    display: flex;
    justify-content: flex-end;
    visibility: hidden;
    transition: visibility 300ms ease;
}

.drawer-overlay.active {
    visibility: visible;
}

.drawer-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity 300ms ease;
}

.drawer-overlay.active .drawer-backdrop {
    opacity: 1;
}

.drawer-content-pane {
    position: relative;
    width: 40%;
    min-width: 450px;
    height: 100%;
    background-color: var(--color-content-bg);
    box-shadow: -4px 0 25px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1);
}

.drawer-overlay.active .drawer-content-pane {
    transform: translateX(0);
}

.drawer-header {
    padding: 32px 40px;
    border-bottom: 1px solid var(--color-gray-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.drawer-heading {
    font-size: var(--font-size-h3);
    line-height: var(--line-height-h3);
    font-weight: var(--font-weight-medium);
    text-transform: uppercase;
}

.drawer-close-icon {
    background: none;
    border: none;
    color: var(--color-text-secondary);
    cursor: pointer;
}

.drawer-body {
    padding: 40px;
    overflow-y: auto;
    flex-grow: 1;
}

.drawer-footer-actions {
    padding: 24px 40px;
    border-top: 1px solid var(--color-gray-border);
    display: flex;
    justify-content: flex-end;
    gap: 16px;
}

/* ---------------------------------------------------------
   4. MODALS (Centered, Scale + Fade, Dark overlay)
   --------------------------------------------------------- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    transition: visibility 250ms ease;
}

.modal-overlay.active {
    visibility: visible;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
    opacity: 0;
    transition: opacity 250ms ease;
}

.modal-overlay.active .modal-backdrop {
    opacity: 1;
}

.modal-content-wrapper {
    position: relative;
    background-color: var(--color-content-bg);
    width: 500px;
    max-width: 90vw;
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    transform: scale(0.95);
    opacity: 0;
    transition: transform 250ms cubic-bezier(0.34, 1.56, 0.64, 1), opacity 250ms ease;
    z-index: 610;
}

.modal-overlay.active .modal-content-wrapper {
    transform: scale(1);
    opacity: 1;
}

.modal-header {
    padding: 28px 40px;
    border-bottom: 1px solid var(--color-gray-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-heading {
    font-size: var(--font-size-h3);
    line-height: var(--line-height-h3);
    font-weight: var(--font-weight-medium);
    text-transform: uppercase;
}

.modal-close-icon {
    background: none;
    border: none;
    color: var(--color-text-secondary);
    cursor: pointer;
}

.modal-body {
    padding: 40px;
    font-size: 15px;
    line-height: 1.6;
}

.modal-footer-actions {
    padding: 24px 40px;
    border-top: 1px solid var(--color-gray-border);
    display: flex;
    justify-content: flex-end;
    gap: 16px;
}

/* ---------------------------------------------------------
   5. BOTTOM NOTIFICATION BAR (Slides from bottom, 100% width)
   --------------------------------------------------------- */
.notification-bar-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70px;
    background-color: var(--color-dark-bg);
    color: var(--color-text-white);
    display: flex;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.15);
    transform: translateY(100%);
    transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1);
}

.notification-bar-container.active {
    transform: translateY(0);
}

.notification-bar-content {
    width: 100%;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.notification-info-side {
    display: flex;
    align-items: center;
    gap: 16px;
}

.notification-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: var(--color-text-white);
}

.notification-message-wrapper {
    display: flex;
    flex-direction: column;
}

.notification-title {
    font-size: 14px;
    font-weight: var(--font-weight-extrabold);
    text-transform: uppercase;
}

.notification-desc {
    font-size: 13px;
    color: var(--color-text-light);
}

.notification-close-btn {
    background: none;
    border: none;
    color: var(--color-text-light);
    cursor: pointer;
    transition: color 150ms ease;
}

.notification-close-btn:hover {
    color: var(--color-text-white);
}

/* Bar state color codes */
.notification-bar-container.success {
    background-color: var(--color-success) !important;
}
.notification-bar-container.warning {
    background-color: var(--color-warning) !important;
}
.notification-bar-container.info {
    background-color: var(--color-info) !important;
}
.notification-bar-container.error {
    background-color: var(--color-error) !important;
}

/* Ensure child elements are white inside the bar */
.notification-bar-container .notification-title {
    color: #FFFFFF !important;
}
.notification-bar-container .notification-desc {
    color: rgba(255, 255, 255, 0.9) !important;
}
.notification-bar-container .notification-close-btn {
    color: rgba(255, 255, 255, 0.8) !important;
}
.notification-bar-container .notification-close-btn:hover {
    color: #FFFFFF !important;
}
.notification-bar-container .notification-icon-wrapper {
    color: #FFFFFF !important;
}

/* ---------------------------------------------------------
   6. FORMS & INPUTS (Label above, rectangle input, focus ring)
   --------------------------------------------------------- */
.enterprise-form {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 12px;
    font-weight: var(--font-weight-extrabold);
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-control {
    width: 100%;
    height: 48px;
    border: 1px solid var(--color-gray-30);
    border-radius: 6px !important; /* Rounded corners to match buttons */
    background-color: var(--color-content-bg);
    padding: 0 16px;
    font-size: 14px;
    color: var(--color-text-primary);
    outline: none;
    transition: all 150ms ease;
}

.form-control:focus {
    border-color: var(--color-blue-primary);
    box-shadow: 0 0 0 1px var(--color-blue-primary);
}

textarea.form-control {
    height: auto;
    padding: 14px 16px;
}

.form-row {
    display: flex;
    gap: 16px;
}

.form-row.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.col-6 {
    width: calc(50% - 8px);
}

.col-span-2 {
    grid-column: span 2;
}

.section-divider {
    font-size: 11px;
    font-weight: var(--font-weight-extrabold);
    color: var(--color-gray-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--color-gray-border);
    padding-bottom: 8px;
    margin-top: 10px;
}

/* Custom Select, Checkboxes, Toggles, Multi-selects */
.checkbox-container {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 28px;
    margin-bottom: 12px;
    cursor: pointer;
    font-size: 14px;
    user-select: none;
    font-weight: var(--font-weight-medium);
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 0;
    height: 18px;
    width: 18px;
    background-color: #FFF;
    border: 1px solid var(--color-gray-primary);
    border-radius: 0; /* Strict rectangles */
}

.checkbox-container:hover input ~ .checkmark {
    background-color: #F3F4F6;
}

.checkbox-container input:checked ~ .checkmark {
    background-color: var(--color-blue-primary);
    border-color: var(--color-blue-primary);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Custom Radio */
.radio-container {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 28px;
    margin-bottom: 12px;
    cursor: pointer;
    font-size: 14px;
    user-select: none;
}

.radio-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.radiomark {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 0;
    height: 18px;
    width: 18px;
    background-color: #FFF;
    border: 1px solid var(--color-gray-primary);
    border-radius: 50%;
}

.radio-container input:checked ~ .radiomark {
    background-color: var(--color-blue-primary);
    border-color: var(--color-blue-primary);
}

.radiomark:after {
    content: "";
    position: absolute;
    display: none;
}

.radio-container input:checked ~ .radiomark:after {
    display: block;
}

.radio-container .radiomark:after {
    top: 5px;
    left: 5px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: white;
}

/* Toggle Switch */
.toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toggle-container {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 22px;
}

.toggle-container input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #CCC;
    transition: .2s;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .2s;
}

.toggle-container input:checked ~ .toggle-slider {
    background-color: var(--color-blue-primary);
}

.toggle-container input:checked ~ .toggle-slider:before {
    transform: translateX(20px);
}

.toggle-label {
    font-size: 14px;
    font-weight: var(--font-weight-semibold);
}

/* Custom Multi-select Dropdown */
.multi-select-custom-wrapper {
    position: relative;
}

.multi-select-trigger {
    height: 38px;
    border: 1px solid var(--color-gray-border);
    padding: 0 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--color-content-bg);
    cursor: pointer;
    font-size: 14px;
}

.multi-select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--color-content-bg);
    border: 1px solid var(--color-gray-border);
    box-shadow: var(--shadow-medium);
    display: none;
    z-index: 10;
    padding: 8px;
}

.multi-select-dropdown.active {
    display: block;
}

.multi-select-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    cursor: pointer;
    font-size: 13px;
}

.multi-select-option:hover {
    background-color: #F3F4F6;
}

.chevron-select-icon {
    color: var(--color-text-secondary);
}

/* Inline Validation style errors */
.border-error {
    border-color: var(--color-error) !important;
}

.focus-error:focus {
    box-shadow: 0 0 0 1px var(--color-error) !important;
}

.error-feedback {
    display: none;
    font-size: 12px;
    font-weight: var(--font-weight-bold);
    color: var(--color-error);
}

.error-feedback.display-block {
    display: block;
}

/* ---------------------------------------------------------
   7. KPI CARDS & PROGRESS BARS
   --------------------------------------------------------- */
.kpi-card {
    background-color: var(--color-content-bg);
    border: 1px solid var(--color-gray-border);
    border-radius: 4px;
    padding: 24px;
    box-shadow: var(--shadow-subtle);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 140px;
}

.kpi-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.kpi-title {
    font-size: 12px;
    font-weight: var(--font-weight-extrabold);
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.kpi-value {
    font-size: 28px;
    font-weight: var(--font-weight-extrabold);
    color: var(--color-text-primary);
    line-height: 1.1;
    margin-top: 8px;
}

.kpi-trend {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: var(--font-weight-bold);
    margin-top: 4px;
}

.progress-bar-container {
    height: 6px;
    background-color: #E5E7EB;
    width: 100%;
    overflow: hidden;
}

.progress-bar-container.mini {
    height: 4px;
    margin-top: 12px;
}

.progress-bar-fill {
    height: 100%;
    background-color: var(--color-blue-primary);
    transition: width 400ms ease;
}

.progress-bar-fill.success { background-color: var(--color-success); }
.progress-bar-fill.warning { background-color: var(--color-warning); }
.progress-bar-fill.error { background-color: var(--color-error); }
.progress-bar-fill.info { background-color: var(--color-info); }

/* ---------------------------------------------------------
   8. GAUGES & SVG CHARTS
   --------------------------------------------------------- */
.gauge-chart-panel {
    display: grid;
    grid-template-columns: 4fr 6fr;
    gap: 32px;
    align-items: center;
}

.gauge-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.svg-gauge-container {
    position: relative;
    width: 180px;
    height: 180px;
}

.gauge-ring-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.gauge-bar-circle {
    transition: stroke-dashoffset 400ms ease;
}

.gauge-labels {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.gauge-number {
    font-size: 36px;
    font-weight: var(--font-weight-extrabold);
    color: var(--color-text-primary);
    line-height: 1;
}

.gauge-title {
    font-size: 9px;
    font-weight: var(--font-weight-extrabold);
    color: var(--color-text-secondary);
    letter-spacing: 0.1em;
    margin-top: 2px;
}

/* Dimensions scores horizontal grid */
.dimensions-bars-column {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.section-title-sm {
    font-size: 12px;
    font-weight: var(--font-weight-extrabold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-secondary);
}

.dimension-score-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dim-info {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: var(--font-weight-bold);
}

.dim-pct {
    font-size: 13px;
    font-weight: var(--font-weight-extrabold);
}

/* Circular SVGs inside panel checklist headers */
.header-circular-gauge {
    width: 52px;
    height: 52px;
}

.circular-svg {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
}

.circle-bg {
    stroke: #374151;
}

.circle-progress {
    transition: stroke-dasharray 300ms ease;
}

.circle-text {
    fill: #FFF;
    font-size: 10px;
    font-family: var(--font-family-body);
    font-weight: var(--font-weight-extrabold);
    text-anchor: middle;
    transform: rotate(90deg);
    transform-origin: center;
}

/* ---------------------------------------------------------
   9. RISK MATRIX GRID (Heat map probability vs impact)
   --------------------------------------------------------- */
.risk-matrix-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.matrix-grid-5x5 {
    display: flex;
}

.matrix-y-axis-label-wrapper {
    writing-mode: vertical-lr;
    transform: rotate(180deg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
}

.matrix-y-axis-label-wrapper .y-label,
.matrix-x-axis-label-wrapper .x-label {
    font-size: 9px;
    font-weight: var(--font-weight-extrabold);
    color: var(--color-text-secondary);
    letter-spacing: 0.05em;
}

.matrix-outer-box {
    display: flex;
}

.matrix-y-numbers {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 200px;
    padding-right: 8px;
    font-size: 11px;
    font-weight: var(--font-weight-extrabold);
    color: var(--color-text-secondary);
}

.matrix-body-grid {
    display: grid;
    grid-template-columns: repeat(5, 40px);
    grid-template-rows: repeat(5, 40px);
    gap: 2px;
    border: 1px solid var(--color-gray-border);
    background-color: var(--color-gray-border);
}

.matrix-cell {
    width: 40px;
    height: 40px;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    transition: filter 150ms ease;
}

.matrix-cell:hover {
    filter: brightness(0.92);
}

/* Color weights for risk index */
.heat-success { background-color: #dcfce7; } /* Soft green - Success tinted */
.heat-info { background-color: #e0f2fe; }    /* Soft blue - Info tinted */
.heat-warning { background-color: #fef08a; } /* Soft yellow - Warning tinted */
.heat-error { background-color: #fee2e2; }   /* Soft red - Error tinted */

/* Risk dots inside matrix cells */
.risk-dot-indicator {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background-color: var(--color-blue-primary);
    color: white;
    font-size: 11px;
    font-weight: var(--font-weight-extrabold);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.matrix-x-axis-label-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-left: 20px;
    margin-top: 6px;
    width: 200px;
}

.matrix-x-numbers {
    display: flex;
    justify-content: space-between;
    width: 100%;
    padding: 0 14px;
    font-size: 11px;
    font-weight: var(--font-weight-extrabold);
    color: var(--color-text-secondary);
    margin-bottom: 4px;
}

/* ---------------------------------------------------------
   10. TIMELINE, ACCORDIONS, TABS & TREES
   --------------------------------------------------------- */
/* Timeline */
.milestones-vertical-list, .activities-vertical-list {
    list-style: none;
    display: flex;
    flex-direction: column;
}

.milestone-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid var(--color-gray-border);
}

.milestone-item:last-child {
    border-bottom: none;
}

.milestone-item.border-left-critical { border-left: 4px solid var(--color-error); }
.milestone-item.border-left-pending { border-left: 4px solid var(--color-blue-primary); }
.milestone-item.border-left-warning { border-left: 4px solid var(--color-warning); }

.ms-details {
    display: flex;
    flex-direction: column;
}

.ms-name {
    font-size: 14px;
}

.badge-outline-critical { border: 1px solid var(--color-error); color: var(--color-error); }
.badge-outline-pending { border: 1px solid var(--color-blue-primary); color: var(--color-blue-primary); }
.badge-outline-warning { border: 1px solid var(--color-warning); color: var(--color-warning); }
.badge-outline-success { border: 1px solid var(--color-success); color: var(--color-success); }
.badge-outline-primary { border: 1px solid var(--color-blue-primary); color: var(--color-blue-primary); }

.badge-date {
    font-size: 11px;
    font-weight: var(--font-weight-bold);
    padding: 2px 8px;
    background: transparent;
}

/* Activities */
.activity-item {
    display: flex;
    gap: 16px;
    padding: 16px 24px;
    border-bottom: 1px solid var(--color-gray-border);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon-bullet {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.activity-body {
    display: flex;
    flex-direction: column;
}

.activity-text {
    font-size: 13.5px;
}

.activity-time {
    font-size: 11px;
    color: var(--color-text-secondary);
    margin-top: 2px;
}

/* Timeline component */
.timeline-container {
    list-style: none;
}

.timeline-milestone-item {
    position: relative;
    padding-bottom: 24px;
}

.timeline-milestone-item::before {
    content: "";
    position: absolute;
    left: -17px;
    top: 6px;
    bottom: 0;
    width: 2px;
    background-color: var(--color-gray-border);
}

.timeline-milestone-item:last-child::before {
    display: none;
}

.timeline-marker {
    position: absolute;
    left: -22px;
    top: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--color-gray-primary);
    border: 2px solid white;
}

.timeline-milestone-item.active-node .timeline-marker {
    background-color: var(--color-blue-primary);
}

.timeline-info {
    display: flex;
    flex-direction: column;
}

.timeline-date {
    font-size: 11px;
    font-weight: var(--font-weight-bold);
    color: var(--color-blue-primary);
}

.timeline-item-title {
    font-size: 14px;
    font-weight: var(--font-weight-bold);
    margin-top: 2px;
}

/* Accordion */
.accordion-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.accordion-item {
    border: 1px solid var(--color-gray-border);
    background-color: var(--color-content-bg);
}

.accordion-trigger {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    background: none;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: var(--font-weight-bold);
    font-size: 14px;
    cursor: pointer;
}

.accordion-chevron {
    transition: transform 150ms ease;
}

.accordion-item.active .accordion-chevron {
    transform: rotate(180deg);
}

.accordion-content {
    padding: 0 16px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 200ms ease;
}

.accordion-item.active .accordion-content {
    max-height: 100px;
}

/* Tree View */
.tree-container {
    font-size: 14px;
}

.tree-node {
    margin-left: 16px;
}

.tree-node.parent {
    cursor: pointer;
}

.tree-toggle-icon {
    font-size: 10px;
    display: inline-block;
    width: 12px;
}

.tree-children {
    padding-left: 8px;
}

.tree-label {
    font-weight: var(--font-weight-semibold);
}

.tree-node.leaf {
    padding-left: 12px;
    color: var(--color-text-secondary);
}

/* Tabs */
.tabs-nav-container {
    display: flex;
    border-bottom: 2px solid var(--color-gray-border);
}

.tab-nav-btn {
    height: 42px;
    padding: 0 16px;
    font-weight: var(--font-weight-bold);
    font-size: 13.5px;
    border: none;
    background: none;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    color: var(--color-text-secondary);
    transition: all 150ms ease;
}

.tab-nav-btn:hover {
    color: var(--color-text-primary);
}

.tab-nav-btn.active {
    color: var(--color-blue-primary);
    border-bottom-color: var(--color-blue-primary);
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

.tab-pane-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    margin-top: 16px;
}

.dimension-heading {
    font-size: 14px;
    font-weight: var(--font-weight-extrabold);
    text-transform: uppercase;
}

/* ---------------------------------------------------------
   11. KANBAN WIDGET (Execution vs Trial stage layouts)
   --------------------------------------------------------- */
.kanban-board-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 12px;
}

.kanban-column {
    background-color: var(--color-light-bg);
    border: 1px solid var(--color-gray-border);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 250px;
}

.kanban-column-header {
    font-size: 12px;
    font-weight: var(--font-weight-extrabold);
    text-transform: uppercase;
    color: var(--color-text-secondary);
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--color-gray-border);
    padding-bottom: 6px;
}

.kanban-cards-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.kanban-item-card {
    background-color: var(--color-content-bg);
    border: 1px solid var(--color-gray-border);
    padding: 12px;
    cursor: grab;
    box-shadow: var(--shadow-subtle);
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: transform 150ms ease;
}

.kanban-item-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.kanban-item-title {
    font-size: 13.5px;
    font-weight: var(--font-weight-bold);
}

/* ---------------------------------------------------------
   12. FILE UPLOADER & COMMENTS
   --------------------------------------------------------- */
.file-uploader-dropzone {
    border: 2px dashed var(--color-gray-primary);
    background-color: #F9FAFB;
    padding: 32px;
    text-align: center;
    cursor: pointer;
    transition: all 150ms ease;
}

.file-uploader-dropzone:hover, .file-uploader-dropzone.dragover {
    border-color: var(--color-blue-primary);
    background-color: #EFF6FF;
}

.dropzone-text {
    font-size: 14px;
    font-weight: var(--font-weight-semibold);
}

.dropzone-subtext {
    font-size: 11px;
    color: var(--color-text-secondary);
    margin-top: 4px;
}

/* Discussion Comments */
.comments-widget-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.comment-item {
    display: flex;
    gap: 12px;
}

.comment-body {
    background-color: #F9FAFB;
    padding: 12px;
    border: 1px solid var(--color-gray-border);
    flex-grow: 1;
}

.comment-header-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}

.comment-author {
    font-size: 13px;
    font-weight: var(--font-weight-extrabold);
}

.comment-time {
    font-size: 11px;
    color: var(--color-text-secondary);
}

.comment-text {
    font-size: 13.5px;
}

/* ---------------------------------------------------------
   13. FEEDBACKS: NOTIFICATIONS, BADGES, SPIN-LOADERS & SKELETONS
   --------------------------------------------------------- */
.avatar {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: var(--font-weight-extrabold);
    color: white;
    font-size: 13px;
}

.avatar-initials {
    background-color: var(--color-blue-primary);
}

.header-profile-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-details {
    display: flex;
    flex-direction: column;
}

.profile-name {
    font-size: 13.5px;
    font-weight: var(--font-weight-extrabold);
}

.profile-role {
    font-size: 11px;
    color: var(--color-text-secondary);
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: var(--font-weight-extrabold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background-color: #E5E7EB;
    color: var(--color-text-primary);
}

.badge-stage {
    font-weight: var(--font-weight-extrabold);
}

.badge-dim-status {
    background-color: var(--color-blue-primary);
    color: white;
}

/* Spinner Loading */
.loading-spinner {
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: var(--color-blue-primary);
    animation: spin-anim 1s ease-in-out infinite;
}

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

/* Skeleton Load Wave styling */
.skeleton-loader-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.skeleton-row {
    height: 12px;
    background: linear-gradient(90deg, #F3F4F6 25%, #E5E7EB 50%, #F3F4F6 75%);
    background-size: 200% 100%;
    animation: skeleton-pulse 1.5s infinite;
}

.bar-large { width: 100%; }
.bar-medium { width: 75%; }
.bar-small { width: 50%; }

@keyframes skeleton-pulse {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Empty State visual */
.empty-state-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 48px;
    height: 48px;
    background-color: #F3F4F6;
    border-radius: 50%;
}

.text-xxs {
    font-size: 11px;
}

/* Dropdown layout notifications in header */
.header-action-icon-wrapper {
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    transition: background-color 150ms ease;
}

.header-action-icon-wrapper:hover {
    background-color: #F3F4F6;
}

.notification-badge-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    background-color: var(--color-error);
    border-radius: 50%;
}

.notifications-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    width: 320px;
    background-color: var(--color-content-bg);
    border: 1px solid var(--color-gray-border);
    box-shadow: var(--shadow-medium);
    display: none;
    z-index: 1000;
}

.notifications-dropdown-menu.active {
    display: block;
}

.dropdown-header {
    display: flex;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--color-gray-border);
    font-weight: var(--font-weight-extrabold);
    font-size: 13px;
}

.mark-all-read {
    color: var(--color-blue-primary);
    text-decoration: none;
}

.dropdown-list {
    display: flex;
    flex-direction: column;
}

.dropdown-item {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--color-gray-border);
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background-color: #F9FAFB;
}

.notification-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 6px;
    flex-shrink: 0;
}

.notification-dot.warning { background-color: var(--color-warning); }
.notification-dot.success { background-color: var(--color-success); }
.notification-dot.info { background-color: var(--color-info); }

.item-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.notification-msg {
    font-size: 12.5px;
    line-height: 1.4;
}

.notification-time {
    font-size: 10px;
    color: var(--color-text-secondary);
}

/* ---------------------------------------------------------
   14. COMPONENT SHOWCASE VIEW LAYOUT
   --------------------------------------------------------- */
.components-layout-wrapper {
    display: grid;
    grid-template-columns: 2.2fr 7.8fr;
    gap: 32px;
}

.components-nav-sidebar {
    position: sticky;
    top: 80px;
    height: fit-content;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.nav-sidebar-title {
    font-size: 11px;
    font-weight: var(--font-weight-extrabold);
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nav-sidebar-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.comp-nav-link {
    display: block;
    padding: 8px 12px;
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: var(--font-weight-bold);
    border-left: 2px solid transparent;
}

.comp-nav-link:hover {
    color: var(--color-text-primary);
}

.comp-nav-link.active {
    color: var(--color-blue-primary);
    border-left-color: var(--color-blue-primary);
    background-color: rgba(37, 99, 235, 0.04);
}

.components-main-pane {
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.component-section {
    border-bottom: 1px solid var(--color-gray-border);
    padding-bottom: 32px;
}

.component-section:last-child {
    border-bottom: none;
}

.section-title {
    font-size: var(--font-size-h2);
    line-height: var(--line-height-h2);
    font-weight: var(--font-weight-medium);
    text-transform: uppercase;
    margin-bottom: 8px;
}

.section-desc {
    font-size: 14px;
    color: var(--color-text-secondary);
    margin-bottom: 24px;
}

.comp-demo-card {
    background-color: var(--color-content-bg);
    border: 1px solid var(--color-gray-border);
    border-radius: 4px;
    padding: 24px;
    box-shadow: var(--shadow-subtle);
}

.comp-demo-title {
    font-size: 13px;
    font-weight: var(--font-weight-extrabold);
    color: var(--color-text-secondary);
    text-transform: uppercase;
    margin-bottom: 16px;
    letter-spacing: 0.05em;
}

.comp-state-label {
    font-size: 11px;
    font-weight: var(--font-weight-extrabold);
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.comp-row {
    display: flex;
    align-items: flex-end;
}

.comp-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.comp-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.comp-grid-2x2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

/* ---------------------------------------------------------
   15. ACTIVE SELECTION/CHECKLIST HOVER HIGHLIGHT STYLING
   --------------------------------------------------------- */
.selection-highlight-table tbody tr {
    cursor: pointer;
}

.selection-highlight-table tbody tr.row-selected td {
    font-weight: var(--font-weight-bold);
}

.tracker-left-panel .enterprise-card, 
.tracker-right-panel .enterprise-card {
    height: 100%;
}

.scrollable-panel {
    overflow-y: auto;
    flex-grow: 1;
    max-height: calc(100vh - var(--header-height) - 250px);
}

.checklist-items {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

.checklist-items li {
    padding: 12px;
    background-color: white;
    border: 1px solid var(--color-gray-border);
}

.meta-tag {
    display: inline-block;
    font-size: 9px;
    font-weight: var(--font-weight-extrabold);
    text-transform: uppercase;
    background-color: var(--color-light-bg);
    color: var(--color-text-secondary);
    padding: 1px 4px;
    margin-left: 8px;
}
