:root {
    --srms-primary: #1E3A8A;
    --srms-primary-hover: #1D4ED8;
    --srms-primary-dark: #172554;
    --srms-primary-soft: rgba(30, 58, 138, 0.08);

    --srms-sidebar: #0F172A;
    --srms-sidebar-hover: #1E293B;

    --srms-bg: #F8FAFC;
    --srms-surface: #FFFFFF;
    --srms-surface-muted: #F1F5F9;

    --srms-border: #E2E8F0;
    --srms-border-strong: #CBD5E1;

    --srms-text: #0F172A;
    --srms-text-secondary: #475569;
    --srms-muted: #64748B;

    --srms-success: #10B981;
    --srms-success-soft: rgba(16, 185, 129, 0.12);

    --srms-warning: #F59E0B;
    --srms-warning-soft: rgba(245, 158, 11, 0.12);

    --srms-danger: #EF4444;
    --srms-danger-soft: rgba(239, 68, 68, 0.12);

    --srms-info: #3B82F6;
    --srms-info-soft: rgba(59, 130, 246, 0.12);

    --srms-purple: #8B5CF6;
    --srms-purple-soft: rgba(139, 92, 246, 0.12);

    --srms-cyan: #0EA5E9;
    --srms-cyan-soft: rgba(14, 165, 233, 0.12);

    --srms-radius-sm: 8px;
    --srms-radius-md: 12px;
    --srms-radius-lg: 16px;
    --srms-radius-xl: 20px;

    --srms-shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05);
    --srms-shadow-md: 0 8px 30px rgba(15, 23, 42, 0.08);
    --srms-shadow-lg: 0 18px 48px rgba(15, 23, 42, 0.10);

    --srms-sidebar-collapsed-width: 78px;
    --srms-sidebar-expanded-width: 260px;
    --srms-sidebar-width: var(--srms-sidebar-collapsed-width);
    --srms-background: var(--srms-bg);
}

[data-theme="dark"] {
    --srms-bg: #0F172A;
    --srms-background: var(--srms-bg);
    --srms-surface: #1E293B;
    --srms-surface-muted: #162032;

    --srms-sidebar: #020617;
    --srms-sidebar-hover: #1E293B;

    --srms-text: #F8FAFC;
    --srms-text-secondary: #E2E8F0;
    --srms-muted: #CBD5E1;

    --srms-border: #334155;
    --srms-border-strong: #475569;

    --srms-primary: #3B82F6;
    --srms-primary-hover: #60A5FA;
    --srms-primary-dark: #1D4ED8;
    --srms-primary-soft: rgba(59, 130, 246, 0.15);

    --srms-success: #34D399;
    --srms-success-soft: rgba(52, 211, 153, 0.15);

    --srms-warning: #FBBF24;
    --srms-warning-soft: rgba(251, 191, 36, 0.15);

    --srms-danger: #F87171;
    --srms-danger-soft: rgba(248, 113, 113, 0.15);

    --srms-info: #60A5FA;
    --srms-info-soft: rgba(96, 165, 250, 0.15);

    --srms-purple: #A78BFA;
    --srms-purple-soft: rgba(167, 139, 250, 0.16);

    --srms-cyan: #38BDF8;
    --srms-cyan-soft: rgba(56, 189, 248, 0.16);

    --srms-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
    --srms-shadow-md: 0 8px 30px rgba(0, 0, 0, 0.35);
    --srms-shadow-lg: 0 18px 48px rgba(2, 6, 23, 0.42);
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    background-color: var(--srms-background);
    color: var(--srms-text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

.srms-app {
    min-height: 100vh;
}

/* Sidebar */

/* Sidebar - Collapsed Default & Hover Expansion System */

.srms-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1040;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    background-color: var(--srms-surface);
    border-right: 1px solid var(--srms-border);
    transition: width 0.28s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.28s ease, transform 0.28s ease, background-color 0.25s ease;
}

/* Sidebar Brand / Logo Area */
.srms-brand {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 68px;
    padding: 10px;
    overflow: hidden;
    border-bottom: 1px solid var(--srms-border);
    transition: padding 0.28s ease;
}

.srms-brand-logo {
    display: block;
    object-fit: contain;
    object-position: center;
}

/* Shared compact page hero -------------------------------------------------
   The layout owns this header; module views must not redefine its geometry. */
.srms-topbar.srms-page-hero {
    min-height: 82px !important;
    padding: 10px 28px !important;
    align-items: center !important;
}

.srms-topbar.srms-page-hero .srms-topbar-left,
.srms-topbar.srms-page-hero .srms-topbar-actions,
.srms-topbar.srms-page-hero .srms-page-header-container {
    align-items: center !important;
}

.srms-topbar.srms-page-hero .srms-page-header-container {
    gap: 14px !important;
    min-width: 0;
}

.srms-topbar.srms-page-hero .srms-page-header-icon-box {
    width: 42px !important;
    height: 42px !important;
    flex: 0 0 42px !important;
    border-radius: 10px !important;
}

.srms-topbar.srms-page-hero .srms-page-header-icon-box i {
    font-size: 18px !important;
}

.srms-topbar.srms-page-hero .srms-page-header-icon-box svg {
    width: 20px !important;
    height: 20px !important;
}

.srms-topbar.srms-page-hero .srms-page-header-text {
    min-width: 0;
    justify-content: center;
}

.srms-topbar.srms-page-hero .srms-breadcrumb-nav {
    margin: 0 0 2px !important;
}

.srms-topbar.srms-page-hero .srms-page-title {
    margin: 0 !important;
    font-size: 30px !important;
    line-height: 1.12 !important;
}

.srms-topbar.srms-page-hero .srms-page-subtitle {
    margin: 3px 0 0 !important;
    max-width: min(58vw, 780px);
    overflow: hidden;
    font-size: 15px !important;
    line-height: 1.3 !important;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Reusable compact page-header density. Enabled per page from the shared layout. */
.srms-topbar.srms-page-hero.srms-page-hero-compact {
    min-height: 70px !important;
    padding: 9px 28px !important;
}

.srms-topbar.srms-page-hero.srms-page-hero-compact .srms-page-header-container {
    gap: 11px !important;
}

.srms-topbar.srms-page-hero.srms-page-hero-compact .srms-page-header-icon-box {
    width: 38px !important;
    height: 38px !important;
    flex-basis: 38px !important;
    border-radius: 10px !important;
}

.srms-topbar.srms-page-hero.srms-page-hero-compact .srms-page-header-icon-box svg {
    width: 18px !important;
    height: 18px !important;
}

.srms-topbar.srms-page-hero.srms-page-hero-compact .srms-breadcrumb-nav {
    margin-bottom: 1px !important;
}

.srms-topbar.srms-page-hero.srms-page-hero-compact .srms-breadcrumb {
    font-size: 10.5px !important;
    line-height: 1.15;
}

.srms-topbar.srms-page-hero.srms-page-hero-compact .srms-page-title {
    font-size: 25px !important;
    line-height: 1.08 !important;
}

.srms-topbar.srms-page-hero.srms-page-hero-compact .srms-page-subtitle {
    margin-top: 2px !important;
    padding-bottom: 1px;
    font-size: 13px !important;
    line-height: 1.4 !important;
}

.srms-topbar.srms-page-hero.srms-page-hero-compact .srms-topbar-actions {
    gap: 10px;
}

.srms-topbar.srms-page-hero.srms-page-hero-compact .srms-theme-toggle-button,
.srms-topbar.srms-page-hero.srms-page-hero-compact .srms-bell-btn,
.srms-topbar.srms-page-hero.srms-page-hero-compact .srms-user-avatar {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
}

.srms-content {
    padding-top: 18px;
}

@media (max-width: 767.98px) {
    .srms-topbar.srms-page-hero.srms-page-hero-compact .srms-theme-toggle-button,
    .srms-topbar.srms-page-hero.srms-page-hero-compact .srms-bell-btn,
    .srms-topbar.srms-page-hero.srms-page-hero-compact .srms-user-avatar {
        width: 42px !important;
        height: 42px !important;
        min-width: 42px !important;
    }
}

@media (max-width: 991.98px) {
    .srms-topbar.srms-page-hero {
        min-height: 72px !important;
        padding: 7px 18px !important;
    }

    .srms-topbar.srms-page-hero .srms-page-header-icon-box {
        width: 36px !important;
        height: 36px !important;
        flex-basis: 36px !important;
    }

    .srms-topbar.srms-page-hero .srms-page-title {
        font-size: 25px !important;
    }

    .srms-topbar.srms-page-hero .srms-page-subtitle {
        max-width: 48vw;
        font-size: 14px !important;
    }

    .srms-topbar.srms-page-hero.srms-page-hero-compact {
        min-height: 68px !important;
        padding: 8px 18px !important;
    }

    .srms-topbar.srms-page-hero.srms-page-hero-compact .srms-page-title {
        font-size: 23px !important;
    }

    .srms-topbar.srms-page-hero.srms-page-hero-compact .srms-page-subtitle {
        font-size: 12.5px !important;
    }
}

@media (max-width: 575.98px) {
    .srms-topbar.srms-page-hero {
        min-height: 64px !important;
        padding-inline: 12px !important;
    }

    .srms-topbar.srms-page-hero .srms-breadcrumb-nav {
        display: none !important;
    }

    .srms-topbar.srms-page-hero .srms-page-title {
        font-size: 22px !important;
    }

    .srms-topbar.srms-page-hero .srms-page-subtitle {
        display: block !important;
        max-width: 45vw;
        font-size: 12px !important;
    }

    .srms-topbar.srms-page-hero.srms-page-hero-compact {
        min-height: 64px !important;
        padding-block: 7px !important;
    }
}

.srms-brand-logo-full {
    width: 165px;
    max-width: 100%;
    height: 42px;
}

.srms-brand-logo-compact {
    display: none;
    width: 48px;
    height: 48px;
    max-width: 48px;
    object-fit: contain;
    clip-path: ellipse(50% 38% at 50% 50%);
}

.srms-brand-fallback {
    display: none;
    font-size: 18px;
    font-weight: 800;
    color: var(--srms-primary-dark);
    white-space: nowrap;
}

/* Sidebar Project Subtitle */
.srms-project-name {
    overflow: hidden;
    white-space: nowrap;
    transition: opacity 0.2s ease, max-height 0.2s ease, padding 0.2s ease, visibility 0.2s ease;
}

.srms-project-name strong {
    display: block;
    color: var(--srms-primary);
    font-size: 16px;
    font-weight: 700;
}

.srms-project-name span {
    display: block;
    margin-top: 2px;
    color: var(--srms-muted);
    font-size: 11.5px;
}

/* Navigation Section Titles & Links */
.srms-nav {
    padding: 10px 8px;
}

.srms-nav-section {
    color: var(--srms-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    transition: opacity 0.2s ease, max-height 0.2s ease, margin 0.2s ease, visibility 0.2s ease;
}

.srms-nav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    margin-bottom: 4px;
    padding: 6px 12px;
    border-radius: 10px;
    color: var(--srms-text-secondary);
    font-size: 13.5px;
    font-weight: 550;
    text-decoration: none;
    transition: background-color 0.18s ease, color 0.18s ease;
    overflow: hidden;
}

.srms-nav-link > span:not(.srms-nav-icon) {
    white-space: nowrap;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.srms-nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 8px;
    background-color: rgba(30, 58, 138, 0.05);
    color: var(--srms-text-secondary);
    transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.srms-nav-icon svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    transition: stroke 0.18s ease, transform 0.18s ease;
}

.srms-nav-link:hover:not(.active) {
    color: var(--srms-primary);
    background-color: var(--srms-surface-muted);
}

.srms-nav-link:hover:not(.active) .srms-nav-icon {
    background-color: var(--srms-primary-soft);
    color: var(--srms-primary);
}

.srms-nav-link:hover:not(.active) .srms-nav-icon svg {
    stroke: var(--srms-primary);
}

/* Fluent UI Active Link Styling */
.srms-nav-link.active {
    color: #1d4ed8 !important;
    background-color: #eff6ff !important;
    font-weight: 650 !important;
}

.srms-nav-link.active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 6px;
    width: 4px;
    border-radius: 0 4px 4px 0;
    background-color: #2563eb;
}

.srms-nav-link.active .srms-nav-icon {
    background-color: rgba(37, 99, 235, 0.14) !important;
    color: #1d4ed8 !important;
}

.srms-nav-link.active .srms-nav-icon svg {
    stroke: #1d4ed8 !important;
}

/* Sidebar Footer */
.srms-sidebar-footer {
    margin: 12px 8px;
    padding: 10px 12px;
    border-radius: 10px;
    background-color: var(--srms-surface-muted);
    border: 1px solid var(--srms-border);
    overflow: hidden;
    white-space: nowrap;
    transition: padding 0.28s ease;
}

.srms-sidebar-footer strong {
    display: block;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--srms-text);
}

.srms-sidebar-footer span {
    display: block;
    font-size: 11px;
    color: var(--srms-muted);
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

/* Desktop & Tablet Collapsed Default (min-width: 992px) */
@media (min-width: 992px) {
    .srms-sidebar {
        width: var(--srms-sidebar-collapsed-width);
        box-shadow: 2px 0 10px rgba(15, 23, 42, 0.03);
    }

    .srms-sidebar:hover {
        width: var(--srms-sidebar-expanded-width);
        box-shadow: 6px 0 28px rgba(15, 23, 42, 0.14);
    }

    .srms-sidebar:not(:hover) .srms-brand-logo-full {
        display: none;
    }

    .srms-sidebar:not(:hover) .srms-brand-logo-compact {
        display: block;
    }

    .srms-sidebar:hover .srms-brand-logo-full {
        display: block;
    }

    .srms-sidebar:hover .srms-brand-logo-compact {
        display: none;
    }

    .srms-sidebar:not(:hover) .srms-project-name {
        opacity: 0;
        visibility: hidden;
        max-height: 0;
        padding: 0;
    }

    .srms-sidebar:hover .srms-project-name {
        opacity: 1;
        visibility: visible;
        max-height: 80px;
        padding: 14px 20px 4px;
    }

    .srms-sidebar:not(:hover) .srms-nav-section {
        opacity: 0;
        visibility: hidden;
        max-height: 0;
        margin: 6px 0;
    }

    .srms-sidebar:hover .srms-nav-section {
        opacity: 1;
        visibility: visible;
        max-height: 30px;
        margin: 16px 14px 6px;
    }

    .srms-sidebar:not(:hover) .srms-nav-link > span:not(.srms-nav-icon) {
        opacity: 0;
        visibility: hidden;
    }

    .srms-sidebar:hover .srms-nav-link > span:not(.srms-nav-icon) {
        opacity: 1;
        visibility: visible;
    }

    .srms-sidebar:not(:hover) .srms-sidebar-footer {
        padding: 8px 4px;
        text-align: center;
    }

    .srms-sidebar:not(:hover) .srms-sidebar-footer span {
        opacity: 0;
        visibility: hidden;
        max-height: 0;
    }

    /* CSS Tooltip on Collapsed Sidebar */
    .srms-sidebar:not(:hover) .srms-nav-link[data-tooltip] {
        position: relative;
    }

    .srms-sidebar:not(:hover) .srms-nav-link[data-tooltip]::after {
        content: attr(data-tooltip);
        position: absolute;
        left: calc(100% + 12px);
        top: 50%;
        transform: translateY(-50%) translateX(-6px);
        background-color: #0f172a;
        color: #ffffff;
        font-size: 12px;
        font-weight: 600;
        white-space: nowrap;
        padding: 6px 12px;
        border-radius: 7px;
        box-shadow: 0 4px 16px rgba(15, 23, 42, 0.2);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
        z-index: 1060;
    }

    .srms-sidebar:not(:hover) .srms-nav-link[data-tooltip]::before {
        content: "";
        position: absolute;
        left: calc(100% + 6px);
        top: 50%;
        transform: translateY(-50%) translateX(-6px);
        border-width: 5px 6px 5px 0;
        border-style: solid;
        border-color: transparent #0f172a transparent transparent;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
        z-index: 1060;
    }

    .srms-sidebar:not(:hover) .srms-nav-link[data-tooltip]:hover::after,
    .srms-sidebar:not(:hover) .srms-nav-link[data-tooltip]:hover::before {
        opacity: 1;
        visibility: visible;
        transform: translateY(-50%) translateX(0);
    }
}

/* Main Area Layout */
.srms-main {
    min-height: 100vh;
    margin-left: var(--srms-sidebar-collapsed-width);
    transition: margin-left 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.srms-topbar {
    position: sticky;
    top: 0;
    z-index: 1020;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
    padding: 12px 28px;
    background-color: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--srms-border);
    backdrop-filter: blur(8px);
}

.srms-topbar-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.srms-mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid var(--srms-border);
    border-radius: 10px;
    background-color: #ffffff;
    color: var(--srms-text);
    font-size: 22px;
}

.srms-page-title {
    margin: 0;
    font-size: 21px;
    font-weight: 700;
}

.srms-page-subtitle {
    margin: 3px 0 0;
    color: var(--srms-muted);
    font-size: 12px;
}

.srms-topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.srms-notification-button {
    position: relative;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--srms-border);
    border-radius: 50%;
    background-color: #ffffff;
    color: var(--srms-text);
}

.srms-notification-count {
    position: absolute;
    top: -4px;
    right: -3px;
    display: grid;
    place-items: center;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 999px;
    background-color: #e53935;
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
}

.srms-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.srms-user-avatar {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background-color: #e9f1ff;
    color: var(--srms-primary);
    font-weight: 700;
}

.srms-user-info strong {
    display: block;
    font-size: 13px;
}

.srms-user-info span {
    display: block;
    margin-top: 2px;
    color: var(--srms-muted);
    font-size: 11px;
}

[data-theme="dark"] .srms-user .dropdown-toggle,
[data-theme="dark"] .srms-user .dropdown-toggle:hover,
[data-theme="dark"] .srms-user .dropdown-toggle:focus {
    color: var(--srms-text) !important;
}

[data-theme="dark"] .srms-user-info strong {
    color: var(--srms-text) !important;
}

[data-theme="dark"] .srms-user-info span {
    color: var(--srms-muted) !important;
}

[data-theme="dark"] .srms-user .dropdown-toggle::after {
    color: var(--srms-muted) !important;
    border-top-color: currentColor !important;
}

.srms-content {
    padding: 26px 28px 36px;
}

.srms-footer {
    padding: 18px 28px;
    color: var(--srms-muted);
    font-size: 12px;
    border-top: 1px solid var(--srms-border);
}

/* Genel kart görünümü */

.srms-card {
    border: 1px solid var(--srms-border);
    border-radius: 14px;
    background-color: #ffffff;
    box-shadow: 0 4px 18px rgba(34, 52, 84, 0.05);
}

/* Mobil arka plan */

.srms-sidebar-overlay {
    position: fixed;
    inset: 0;
    z-index: 1035;
    display: none;
    background-color: rgba(15, 23, 42, 0.48);
}

/* Tablet ve mobil */

@media (max-width: 991.98px) {
    .srms-sidebar {
        transform: translateX(-100%);
    }

        .srms-sidebar.open {
            transform: translateX(0);
        }

    .srms-sidebar.open .srms-brand-logo-full {
        display: block;
    }

    .srms-sidebar.open .srms-brand-logo-compact {
        display: none;
    }

    .srms-sidebar-overlay.show {
        display: block;
    }

    .srms-main {
        margin-left: 0;
    }

    .srms-mobile-menu-button {
        display: inline-grid;
        place-items: center;
    }

    .srms-topbar {
        padding: 12px 18px;
    }

    .srms-content {
        padding: 20px 18px 30px;
    }

    .srms-footer {
        padding: 18px;
    }
}

@media (max-width: 575.98px) {
    .srms-topbar {
        min-height: 64px;
    }

    .srms-page-title {
        font-size: 17px;
    }

    .srms-page-subtitle {
        display: none;
    }

    .srms-user-info {
        display: none;
    }

    .srms-notification-button {
        width: 38px;
        height: 38px;
    }

    .srms-user-avatar {
        width: 38px;
        height: 38px;
    }

    .srms-content {
        padding: 16px 12px 24px;
    }
}
/* Dashboard */

.dashboard-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
}

    .dashboard-heading h2 {
        margin: 0;
        font-size: 23px;
        font-weight: 750;
    }

    .dashboard-heading p {
        margin: 6px 0 0;
        color: var(--srms-muted);
        font-size: 14px;
    }

.dashboard-stat-card {
    display: flex;
    align-items: center;
    gap: 15px;
    height: 100%;
    min-height: 126px;
    padding: 20px;
    border: 1px solid var(--srms-border);
    border-radius: 15px;
    background-color: #ffffff;
    box-shadow: 0 5px 18px rgba(34, 52, 84, 0.05);
}

.dashboard-stat-icon {
    display: grid;
    place-items: center;
    width: 50px;
    height: 50px;
    flex: 0 0 50px;
    border-radius: 14px;
    font-weight: 800;
}

    .dashboard-stat-icon.blue {
        color: #1268e8;
        background-color: #eaf3ff;
    }

    .dashboard-stat-icon.orange {
        color: #e58b00;
        background-color: #fff4dd;
    }

    .dashboard-stat-icon.red {
        color: #df3b3b;
        background-color: #ffeded;
    }

    .dashboard-stat-icon.purple {
        color: #7c3aed;
        background-color: #f2eaff;
    }

    .dashboard-stat-icon.green {
        color: #179455;
        background-color: #e7f8ef;
    }

.dashboard-stat-card span {
    display: block;
    margin-bottom: 5px;
    color: #526079;
    font-size: 13px;
    font-weight: 650;
}

.dashboard-stat-card strong {
    display: block;
    margin-bottom: 4px;
    color: var(--srms-text);
    font-size: 25px;
    line-height: 1;
}

.dashboard-stat-card small {
    color: var(--srms-muted);
    font-size: 11px;
}

.dashboard-panel {
    overflow: hidden;
}

.dashboard-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
    padding: 20px 22px;
    border-bottom: 1px solid var(--srms-border);
}

    .dashboard-panel-header h3 {
        margin: 0;
        font-size: 16px;
        font-weight: 750;
    }

    .dashboard-panel-header p {
        margin: 5px 0 0;
        color: var(--srms-muted);
        font-size: 12px;
    }

.dashboard-panel-link {
    white-space: nowrap;
    color: var(--srms-primary);
    font-size: 12px;
    font-weight: 650;
    text-decoration: none;
}

.dashboard-table th {
    padding: 13px 18px;
    border-bottom-color: var(--srms-border);
    background-color: #f8fafd;
    color: #69758a;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.dashboard-table td {
    padding: 14px 18px;
    border-bottom-color: var(--srms-border);
    color: #39465d;
    font-size: 12px;
    vertical-align: middle;
}

    .dashboard-table td strong {
        display: block;
        color: var(--srms-text);
        font-size: 12px;
    }

    .dashboard-table td small {
        display: block;
        margin-top: 3px;
        color: var(--srms-muted);
        font-size: 10px;
    }

.dashboard-status {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
}

    .dashboard-status.warning {
        color: #b56800;
        background-color: #fff1d6;
    }

    .dashboard-status.danger {
        color: #c93434;
        background-color: #ffe6e6;
    }

.dashboard-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px 20px;
    text-align: center;
}

    .dashboard-empty-state strong {
        color: var(--srms-text);
        font-size: 15px;
    }

    .dashboard-empty-state span {
        margin-top: 6px;
        color: var(--srms-muted);
        font-size: 12px;
    }

.dashboard-quick-actions {
    padding: 12px;
}

.dashboard-quick-action {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 8px;
    padding: 13px;
    border: 1px solid var(--srms-border);
    border-radius: 11px;
    color: var(--srms-text);
    text-decoration: none;
    transition: 0.18s ease;
}

    .dashboard-quick-action:last-child {
        margin-bottom: 0;
    }

    .dashboard-quick-action:hover {
        border-color: #bad3f8;
        background-color: #f5f9ff;
        transform: translateY(-1px);
    }

    .dashboard-quick-action.disabled {
        pointer-events: none;
        opacity: 0.55;
    }

.dashboard-quick-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 10px;
    background-color: #edf4ff;
    color: var(--srms-primary);
    font-weight: 750;
}

.dashboard-quick-action strong {
    display: block;
    font-size: 12px;
}

.dashboard-quick-action small {
    display: block;
    margin-top: 3px;
    color: var(--srms-muted);
    font-size: 10px;
}

@media (max-width: 575.98px) {
    .dashboard-stat-card {
        min-height: 108px;
        padding: 16px;
    }

    .dashboard-panel-header {
        padding: 17px;
    }

    .dashboard-table th,
    .dashboard-table td {
        padding-left: 14px;
        padding-right: 14px;
    }
}

/* Category and form pages */

.page-action-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

    .page-action-header h2 {
        margin: 0;
        font-size: 23px;
        font-weight: 750;
    }

    .page-action-header p {
        margin: 6px 0 0;
        color: var(--srms-muted);
        font-size: 14px;
    }

.srms-primary-button {
    min-height: 42px;
    padding-left: 18px;
    padding-right: 18px;
    border-color: var(--srms-primary);
    background-color: var(--srms-primary);
    font-weight: 650;
}

    .srms-primary-button:hover {
        border-color: var(--srms-primary-dark);
        background-color: var(--srms-primary-dark);
    }

.category-card {
    overflow: hidden;
}

.category-card-header {
    padding: 20px 22px;
    border-bottom: 1px solid var(--srms-border);
}

    .category-card-header h3 {
        margin: 0;
        font-size: 16px;
        font-weight: 750;
    }

    .category-card-header span {
        display: block;
        margin-top: 5px;
        color: var(--srms-muted);
        font-size: 12px;
    }

.category-table th {
    padding: 14px 20px;
    border-bottom-color: var(--srms-border);
    background-color: #f8fafd;
    color: #6b778c;
    font-size: 11px;
    font-weight: 750;
    white-space: nowrap;
}

.category-table td {
    padding: 15px 20px;
    border-bottom-color: var(--srms-border);
    color: #425069;
    font-size: 13px;
    vertical-align: middle;
}

    .category-table td strong {
        color: var(--srms-text);
    }

.category-status {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 750;
}

    .category-status.active {
        color: #168149;
        background-color: #e5f7ed;
    }

    .category-status.passive {
        color: #687386;
        background-color: #edf0f5;
    }

.category-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 65px 20px;
    text-align: center;
}

.category-empty-icon {
    display: grid;
    place-items: center;
    width: 55px;
    height: 55px;
    margin-bottom: 16px;
    border-radius: 15px;
    background-color: #eaf3ff;
    color: var(--srms-primary);
    font-size: 19px;
    font-weight: 800;
}

.category-empty-state strong {
    color: var(--srms-text);
    font-size: 16px;
}

.category-empty-state span {
    max-width: 430px;
    margin: 7px 0 20px;
    color: var(--srms-muted);
    font-size: 12px;
}

.form-card {
    padding: 26px;
}

.form-label {
    color: #33415a;
    font-size: 13px;
    font-weight: 700;
}

.srms-input {
    min-height: 45px;
    border-color: var(--srms-border);
    border-radius: 10px;
    font-size: 13px;
}

textarea.srms-input {
    min-height: 125px;
}

.srms-input:focus {
    border-color: #8ab9fa;
    box-shadow: 0 0 0 0.2rem rgba(18, 104, 232, 0.12);
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

@media (max-width: 575.98px) {
    .page-action-header {
        flex-direction: column;
    }

        .page-action-header .btn {
            width: 100%;
        }

    .form-card {
        padding: 20px 16px;
    }

    .form-actions {
        flex-direction: column;
    }

        .form-actions .btn {
            width: 100%;
        }
}

/* Material pages */

.material-card {
    overflow: hidden;
}

.material-card-header {
    padding: 20px 22px;
    border-bottom: 1px solid var(--srms-border);
}

    .material-card-header h3 {
        margin: 0;
        font-size: 16px;
        font-weight: 750;
    }

    .material-card-header span {
        display: block;
        margin-top: 5px;
        color: var(--srms-muted);
        font-size: 12px;
    }

/* Pixel-Perfect Continuous Row Border Material Table */
.material-table {
    width: 100% !important;
    border-collapse: collapse !important;
    border-spacing: 0 !important;
}

.material-table th {
    padding: 12px 16px !important;
    border-bottom: 1px solid var(--srms-border) !important;
    background-color: var(--srms-surface-muted) !important;
    color: var(--srms-muted) !important;
    font-size: 11px !important;
    font-weight: 750 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    white-space: nowrap !important;
    vertical-align: middle !important;
    box-shadow: none !important;
}

.material-table tbody tr {
    height: 52px !important;
    border-bottom: 1px solid var(--srms-border) !important;
}

.material-table tbody tr:last-child {
    border-bottom: none !important;
}

.material-table tbody td {
    padding: 12px 16px !important;
    border-bottom: 0 !important;
    box-shadow: none !important;
    color: var(--srms-text) !important;
    font-size: 13px !important;
    vertical-align: middle !important;
    white-space: nowrap !important;
    height: 52px !important;
}

.material-table-name {
    display: inline-block;
    max-width: 250px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}

.material-table tbody tr:hover {
    background-color: var(--srms-surface-muted) !important;
}

.material-table td strong {
    color: var(--srms-text);
}

.material-status {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 750;
}

    .material-status.active {
        color: #168149;
        background-color: #e5f7ed;
    }

    .material-status.warning {
        color: #b56800;
        background-color: #fff1d6;
    }

    .material-status.danger {
        color: #c93434;
        background-color: #ffe6e6;
    }

    .material-status.passive {
        color: #687386;
        background-color: #edf0f5;
    }

.material-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 65px 20px;
    text-align: center;
}

.material-empty-icon {
    display: grid;
    place-items: center;
    width: 55px;
    height: 55px;
    margin-bottom: 16px;
    border-radius: 15px;
    background-color: #eaf3ff;
    color: var(--srms-primary);
    font-size: 19px;
    font-weight: 800;
}

.material-empty-state strong {
    color: var(--srms-text);
    font-size: 16px;
}

.material-empty-state span {
    max-width: 430px;
    margin: 7px 0 20px;
    color: var(--srms-muted);
    font-size: 12px;
}

/* Stock pages */

.stock-summary-card {
    display: flex;
    align-items: center;
    gap: 15px;
    height: 100%;
    min-height: 115px;
    padding: 19px;
    border: 1px solid var(--srms-border);
    border-radius: 15px;
    background-color: #ffffff;
    box-shadow: 0 5px 18px rgba(34, 52, 84, 0.05);
}

.stock-summary-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    border-radius: 14px;
    font-weight: 800;
}

    .stock-summary-icon.blue {
        color: #1268e8;
        background-color: #eaf3ff;
    }

    .stock-summary-icon.green {
        color: #168149;
        background-color: #e5f7ed;
    }

    .stock-summary-icon.red {
        color: #c93434;
        background-color: #ffe6e6;
    }

    .stock-summary-icon.purple {
        color: #7c3aed;
        background-color: #f2eaff;
    }

.stock-summary-card span {
    display: block;
    margin-bottom: 4px;
    color: #526079;
    font-size: 12px;
    font-weight: 650;
}

.stock-summary-card strong {
    display: block;
    margin-bottom: 4px;
    color: var(--srms-text);
    font-size: 24px;
    line-height: 1;
}

.stock-summary-card small {
    color: var(--srms-muted);
    font-size: 10px;
}

.stock-card {
    overflow: hidden;
}

.stock-card-header {
    padding: 20px 22px;
    border-bottom: 1px solid var(--srms-border);
}

    .stock-card-header h3 {
        margin: 0;
        font-size: 16px;
        font-weight: 750;
    }

    .stock-card-header span {
        display: block;
        margin-top: 5px;
        color: var(--srms-muted);
        font-size: 12px;
    }

.stock-table th {
    padding: 14px 16px;
    border-bottom-color: var(--srms-border);
    background-color: #f8fafd;
    color: #6b778c;
    font-size: 10px;
    font-weight: 750;
    white-space: nowrap;
}

.stock-table td {
    padding: 14px 16px;
    border-bottom-color: var(--srms-border);
    color: #425069;
    font-size: 12px;
    vertical-align: middle;
    white-space: nowrap;
}

.stock-table tbody tr:hover {
    background-color: #f8fbff;
}

.stock-table td strong {
    display: block;
    color: var(--srms-text);
}

.stock-table td small {
    display: block;
    margin-top: 3px;
    color: var(--srms-muted);
    font-size: 10px;
}

.stock-type {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 750;
}

    .stock-type.entry {
        color: #168149;
        background-color: #e5f7ed;
    }

    .stock-type.exit {
        color: #c93434;
        background-color: #ffe6e6;
    }

    .stock-type.correction {
        color: #7c3aed;
        background-color: #f2eaff;
    }

.stock-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 65px 20px;
    text-align: center;
}

.stock-empty-icon {
    display: grid;
    place-items: center;
    width: 55px;
    height: 55px;
    margin-bottom: 16px;
    border-radius: 15px;
    background-color: #eaf3ff;
    color: var(--srms-primary);
    font-size: 19px;
    font-weight: 800;
}

.stock-empty-state strong {
    color: var(--srms-text);
    font-size: 16px;
}

.stock-empty-state span {
    max-width: 430px;
    margin: 7px 0 20px;
    color: var(--srms-muted);
    font-size: 12px;
}

.stock-info-card {
    padding: 23px;
}

    .stock-info-card h3 {
        margin: 0 0 18px;
        font-size: 16px;
        font-weight: 750;
    }

.stock-info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 11px;
    background-color: #f5f9ff;
}

    .stock-info-row span {
        color: var(--srms-muted);
        font-size: 12px;
    }

    .stock-info-row strong {
        color: var(--srms-primary);
        font-size: 15px;
    }

.stock-info-note {
    margin-bottom: 12px;
    padding: 14px;
    border: 1px solid var(--srms-border);
    border-radius: 11px;
}

    .stock-info-note:last-child {
        margin-bottom: 0;
    }

    .stock-info-note strong {
        display: block;
        color: var(--srms-text);
        font-size: 12px;
    }

    .stock-info-note p {
        margin: 5px 0 0;
        color: var(--srms-muted);
        font-size: 11px;
        line-height: 1.5;
    }

/* Robot Model styles */
.robot-model-status {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 750;
}

.robot-model-status.active {
    color: #168149;
    background-color: #e5f7ed;
}

.robot-model-status.passive {
    color: #687386;
    background-color: #edf0f5;
}

.robot-model-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 65px 20px;
    text-align: center;
}

.robot-model-empty-icon {
    display: grid;
    place-items: center;
    width: 55px;
    height: 55px;
    margin-bottom: 16px;
    border-radius: 15px;
    background-color: #eaf3ff;
    color: var(--srms-primary);
    font-size: 19px;
    font-weight: 800;
}

.robot-model-empty-state strong {
    color: var(--srms-text);
    font-size: 16px;
}

.robot-model-empty-state span {
    max-width: 430px;
    margin: 7px 0 20px;
    color: var(--srms-muted);
    font-size: 12px;
}

/* ==========================================================================
   SRMS DESIGN SYSTEM OVERRIDES (PHASE 1 Redesign)
   ========================================================================== */

/* Typography & Global overrides */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Sidebar Styling handled by core collapsed/expanded sidebar module */

.srms-nav-icon svg {
    width: 15px;
    height: 15px;
    stroke: currentColor;
    stroke-width: 2.2;
    transition: transform 0.15s ease;
}

.srms-nav-link:hover .srms-nav-icon svg {
    transform: scale(1.08);
}

.srms-nav-link.active .srms-nav-icon {
    background-color: rgba(255, 255, 255, 0.18) !important;
}

.srms-nav-link.active .srms-nav-icon svg {
    stroke: #ffffff;
}

/* Topbar Styling */
.srms-topbar {
    border-bottom: 1px solid var(--srms-border);
}

.srms-notification-button {
    border: 1px solid var(--srms-border);
    transition: all 0.2s ease;
    color: var(--srms-text-secondary);
}

.srms-notification-button:hover {
    border-color: var(--srms-primary);
    background-color: var(--srms-primary-soft);
    color: var(--srms-primary);
}

.srms-notification-button svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

.srms-notification-count {
    background-color: var(--srms-danger);
    border: 2px solid #ffffff;
    top: -2px;
    right: -2px;
}

.srms-user-avatar {
    background-color: var(--srms-primary-soft);
    color: var(--srms-primary);
}

/* Cards & Shadows */
.srms-card {
    border-color: var(--srms-border);
    border-radius: var(--srms-radius-md);
    box-shadow: var(--srms-shadow-sm);
}

/* Dashboard Stat Cards */
.dashboard-stat-card {
    border-color: var(--srms-border);
    border-radius: var(--srms-radius-md);
    box-shadow: var(--srms-shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    padding: 22px;
    background-color: var(--srms-surface);
}

.dashboard-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--srms-shadow-md);
}

.dashboard-stat-icon {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    border-radius: var(--srms-radius-md);
}

.dashboard-stat-icon svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    stroke-width: 2;
}

.dashboard-stat-icon.blue {
    color: var(--srms-primary);
    background-color: var(--srms-primary-soft);
}

.dashboard-stat-icon.orange {
    color: var(--srms-warning);
    background-color: var(--srms-warning-soft);
}

.dashboard-stat-icon.red {
    color: var(--srms-danger);
    background-color: var(--srms-danger-soft);
}

.dashboard-stat-icon.purple {
    color: #7c3aed;
    background-color: #f2eaff;
}

.dashboard-stat-icon.green {
    color: var(--srms-success);
    background-color: var(--srms-success-soft);
}

.dashboard-stat-card strong {
    font-size: 26px;
    font-weight: 700;
    color: var(--srms-text);
}

.dashboard-stat-card span {
    color: var(--srms-text-secondary);
    font-weight: 500;
}

/* Dashboard Quick Actions */
.dashboard-quick-action {
    border-color: var(--srms-border);
    border-radius: var(--srms-radius-sm);
    transition: all 0.2s ease;
    padding: 14px;
}

.dashboard-quick-action:hover {
    border-color: var(--srms-primary);
    background-color: var(--srms-primary-soft);
    transform: translateY(-2px);
    box-shadow: var(--srms-shadow-sm);
}

.dashboard-quick-icon {
    background-color: rgba(18, 104, 232, 0.05);
    color: var(--srms-primary);
}

.dashboard-quick-icon svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    stroke-width: 2.2;
}

.dashboard-quick-action strong {
    color: var(--srms-text);
    font-weight: 600;
}

.dashboard-quick-action small {
    color: var(--srms-muted);
}

/* Dashboard Table & Badging */
.dashboard-panel-header {
    border-bottom: 1px solid var(--srms-border);
}

.dashboard-table th {
    background-color: var(--srms-surface-muted);
    border-bottom: 2px solid var(--srms-border);
    color: var(--srms-text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 12px 18px;
}

.dashboard-table td {
    border-bottom: 1px solid var(--srms-border);
}

.dashboard-status.danger {
    color: var(--srms-danger) !important;
    background-color: var(--srms-danger-soft) !important;
    border-radius: var(--srms-radius-sm);
}

.dashboard-status.warning {
    color: var(--srms-warning) !important;
    background-color: var(--srms-warning-soft) !important;
    border-radius: var(--srms-radius-sm);
}

/* Global Forms Focus glow */
.srms-input:focus, .btn:focus, .form-select:focus {
    outline: none !important;
    border-color: var(--srms-primary) !important;
    box-shadow: 0 0 0 3px rgba(18, 104, 232, 0.14) !important;
}

/* Accessibility Focus Ring visible only on keyboards */
.dashboard-quick-action:focus-visible,
.srms-nav-link:focus-visible {
    outline: 2px solid var(--srms-primary);
    outline-offset: 2px;
}

/* ==========================================================================
   ADDITIONAL UI DESIGN REFINEMENTS (Hiding local duplicate titles, compact cards, mobile sizing)
   ========================================================================== */

/* Hide local page headings inside views since they are dynamically managed in topbar */
.page-action-header > div,
.dashboard-heading {
    display: none !important;
}

.page-action-header {
    justify-content: flex-end !important;
    margin-bottom: 20px !important;
    min-height: auto !important;
}

/* Reduced logo brand area height */
.srms-brand {
    min-height: 80px !important;
    padding: 10px 12px !important;
}

.srms-brand img {
    max-height: 55px !important;
    width: auto !important;
}

.srms-project-name {
    padding: 12px 24px 8px !important;
}

/* Compact dashboard stat cards */
.dashboard-stat-card {
    min-height: 106px !important; /* ~15% reduction */
    padding: 16px 20px !important;
}

/* Notification count badge alignment */
.srms-notification-button {
    position: relative !important;
}

.srms-notification-count {
    position: absolute !important;
    top: -2px !important;
    right: -2px !important;
    transform: translate(20%, -20%) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 18px !important;
    height: 18px !important;
    border: 2px solid #ffffff !important;
    border-radius: 50% !important;
    padding: 0 !important;
    font-size: 10px !important;
    font-weight: 700 !important;
}

/* Mobile & Tablet optimizations */
@media (max-width: 991.98px) {
    .srms-topbar {
        padding: 16px 24px !important; /* increased padding */
    }
    
    .srms-mobile-menu-button {
        margin-right: 16px !important; /* space between hamburger and title */
    }
    
    /* Mobile sidebar icons (22-24px) */
    .srms-sidebar .srms-nav-icon {
        width: 36px !important;
        height: 36px !important;
        flex: 0 0 36px !important;
        border-radius: 8px !important;
    }
    
    .srms-sidebar .srms-nav-icon svg {
        width: 22px !important;
        height: 22px !important;
        stroke-width: 2.2 !important;
    }
}

/* ==========================================================================
   UNIFIED SRMS DESIGN SYSTEM (Buttons, Badges, Tables, Forms, Mobile Scroll Indicator)
   ========================================================================== */

/* Unified Button System */
.btn {
    border-radius: var(--srms-radius-sm) !important;
    font-weight: 550 !important;
    padding: 8px 16px !important;
    font-size: 13px !important;
    transition: all 0.18s ease-in-out !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
}

.btn-sm {
    padding: 4px 10px !important;
    font-size: 11px !important;
    border-radius: 6px !important;
}

.btn-primary, .srms-primary-button {
    background-color: var(--srms-primary) !important;
    border-color: var(--srms-primary) !important;
    color: #ffffff !important;
}

.btn-primary:hover, .srms-primary-button:hover {
    background-color: var(--srms-primary-hover) !important;
    border-color: var(--srms-primary-hover) !important;
}

.btn-success {
    background-color: var(--srms-success) !important;
    border-color: var(--srms-success) !important;
    color: #ffffff !important;
}

.btn-success:hover {
    background-color: #116631 !important;
    border-color: #116631 !important;
}

.btn-danger {
    background-color: var(--srms-danger) !important;
    border-color: var(--srms-danger) !important;
    color: #ffffff !important;
}

.btn-danger:hover {
    background-color: #b91c1c !important;
    border-color: #b91c1c !important;
}

.btn-warning {
    background-color: var(--srms-warning) !important;
    border-color: var(--srms-warning) !important;
    color: #ffffff !important;
}

.btn-warning:hover {
    background-color: #92400e !important;
    border-color: #92400e !important;
}

.btn-outline-primary {
    color: var(--srms-primary) !important;
    border-color: var(--srms-primary) !important;
    background-color: transparent !important;
}

.btn-outline-primary:hover {
    color: #ffffff !important;
    background-color: var(--srms-primary) !important;
    border-color: var(--srms-primary) !important;
}

.btn-outline-secondary {
    color: var(--srms-text-secondary) !important;
    border-color: var(--srms-border-strong) !important;
    background-color: transparent !important;
}

.btn-outline-secondary:hover {
    background-color: var(--srms-surface-muted) !important;
    color: var(--srms-text) !important;
}

/* Unified Status Badge System */
.category-status,
.material-status,
.srms-status-badge,
.robot-model-status,
.dashboard-status,
.stock-type {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 24px !important;
    min-height: 24px !important;
    max-height: 24px !important;
    padding: 0 10px !important;
    min-width: 82px !important;
    border-radius: 999px !important;
    font-size: 11px !important;
    font-weight: 750 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    vertical-align: middle !important;
    box-sizing: border-box !important;
    border: 1px solid transparent !important;
}

/* Status colors mapped to badges */
.category-status.active,
.material-status.active,
.robot-model-status.active,
.stock-type.entry {
    color: var(--srms-success) !important;
    background-color: var(--srms-success-soft) !important;
    border-color: rgba(21, 128, 61, 0.15) !important;
}

.category-status.passive,
.material-status.passive,
.robot-model-status.passive {
    color: var(--srms-muted) !important;
    background-color: var(--srms-surface-muted) !important;
    border-color: var(--srms-border) !important;
}

.dashboard-status.danger,
.material-status.danger,
.stock-type.exit {
    color: var(--srms-danger) !important;
    background-color: var(--srms-danger-soft) !important;
    border-color: rgba(220, 38, 38, 0.15) !important;
}

.dashboard-status.warning,
.material-status.warning {
    color: var(--srms-warning) !important;
    background-color: var(--srms-warning-soft) !important;
    border-color: rgba(180, 83, 9, 0.15) !important;
}

/* Helper mappings for dynamic in-line color configurations */
.category-status[style*="color: #b56800"] {
    color: var(--srms-warning) !important;
    background-color: var(--srms-warning-soft) !important;
    border-color: rgba(180, 83, 9, 0.15) !important;
}

.category-status[style*="background-color: #e6f7ff"],
.category-status[style*="color: #0050b3"] {
    color: var(--srms-info) !important;
    background-color: var(--srms-info-soft) !important;
    border-color: rgba(3, 105, 161, 0.15) !important;
}

/* Unified Table System */
.category-table,
.material-table,
.stock-table,
.dashboard-table,
.robot-model-table,
.bom-table,
.production-order-table,
.installation-order-table {
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
}

.category-table th,
.material-table th,
.stock-table th,
.dashboard-table th,
.robot-model-table th,
.bom-table th,
.production-order-table th,
.installation-order-table th {
    background-color: var(--srms-surface-muted) !important;
    border-bottom: 2px solid var(--srms-border) !important;
    color: var(--srms-text-secondary) !important;
    font-weight: 600 !important;
    font-size: 11px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    padding: 12px 18px !important;
}

.category-table td,
.material-table td,
.stock-table td,
.dashboard-table td,
.robot-model-table td,
.bom-table td,
.production-order-table td,
.installation-order-table td {
    padding: 14px 18px !important;
    border-bottom: 1px solid var(--srms-border) !important;
    vertical-align: middle !important;
    color: var(--srms-text) !important;
    font-size: 13px !important;
}

.category-table tbody tr,
.material-table tbody tr,
.stock-table tbody tr,
.dashboard-table tbody tr,
.robot-model-table tbody tr,
.bom-table tbody tr,
.production-order-table tbody tr,
.installation-order-table tbody tr {
    transition: background-color 0.15s ease !important;
}

.category-table tbody tr:hover,
.material-table tbody tr:hover,
.stock-table tbody tr:hover,
.dashboard-table tbody tr:hover,
.robot-model-table tbody tr:hover,
.bom-table tbody tr:hover,
.production-order-table tbody tr:hover,
.installation-order-table tbody tr:hover {
    background-color: rgba(18, 104, 232, 0.02) !important;
}

/* Unified Form Input System */
.form-control,
.form-select,
.srms-input {
    min-height: 40px !important;
    border: 1px solid var(--srms-border) !important;
    border-radius: var(--srms-radius-sm) !important;
    padding: 8px 14px !important;
    font-size: 13px !important;
    color: var(--srms-text) !important;
    background-color: #ffffff !important;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out !important;
}

.form-control:focus,
.form-select:focus,
.srms-input:focus {
    border-color: var(--srms-primary) !important;
    box-shadow: 0 0 0 3px rgba(18, 104, 232, 0.14) !important;
}

.form-label {
    font-weight: 600 !important;
    font-size: 13px !important;
    color: var(--srms-text-secondary) !important;
    margin-bottom: 6px !important;
}

.text-danger {
    font-size: 11px !important;
    margin-top: 4px !important;
    display: block !important;
    font-weight: 500 !important;
    color: var(--srms-danger) !important;
}

/* Mobile Table Scroll Indicator */
.table-responsive {
    position: relative;
}

@media (max-width: 768px) {
    .table-responsive::before {
        content: "↔ Tabloyu görmek için yana kaydırın";
        display: block;
        font-size: 10px;
        color: var(--srms-muted);
        margin-bottom: 8px;
        text-align: right;
        font-weight: 600;
        font-style: italic;
        letter-spacing: 0.02em;
    }
}

/* ==========================================================================
   DASHBOARD CRITICAL STOCKS MOBILE CARD VIEW
   ========================================================================== */

@media (min-width: 769px) {
    .dashboard-critical-desktop {
        display: block !important;
    }
    .dashboard-critical-mobile {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .dashboard-critical-desktop {
        display: none !important;
    }
    .dashboard-critical-mobile {
        display: block !important;
    }
}

.dashboard-critical-mobile-list {
    padding: 16px !important;
}

.dashboard-critical-mobile-item {
    background-color: var(--srms-surface) !important;
    border: 1px solid var(--srms-border) !important;
    border-radius: var(--srms-radius-sm) !important;
    padding: 16px !important;
    margin-bottom: 12px !important;
    box-shadow: var(--srms-shadow-sm) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

.dashboard-critical-mobile-item:hover {
    transform: translateY(-1px);
    box-shadow: var(--srms-shadow-md) !important;
}

.dashboard-critical-mobile-item:last-child {
    margin-bottom: 0 !important;
}

.dashboard-critical-mobile-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    margin-bottom: 12px !important;
    gap: 12px !important;
}

.dashboard-critical-mobile-header strong {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: var(--srms-text) !important;
    line-height: 1.3 !important;
    word-break: break-word !important;
}

.dashboard-critical-mobile-header small {
    font-size: 11px !important;
    color: var(--srms-muted) !important;
    display: block !important;
}

.dashboard-critical-mobile-grid {
    border-top: 1px dashed var(--srms-border) !important;
    padding-top: 10px !important;
}

.dashboard-critical-mobile-label {
    display: block !important;
    font-size: 10px !important;
    text-transform: uppercase !important;
    color: var(--srms-muted) !important;
    font-weight: 600 !important;
    letter-spacing: 0.02em !important;
    margin-bottom: 2px !important;
}

.dashboard-critical-mobile-value {
    display: block !important;
    font-size: 12px !important;
    color: var(--srms-text-secondary) !important;
    word-break: break-word !important;
}

/* ==========================================================================
   PHASE 2 - MODERN SYSTEM DESIGN SYSTEM OVERRIDES (Theme toggle, sidebar, cards, inputs)
   ========================================================================== */

/* Smooth Theme Transitions */
html {
    transition: background-color 250ms ease, color 250ms ease;
}

body,
aside,
main,
header,
section,
footer,
.srms-card,
.dashboard-stat-card,
.dashboard-quick-action,
.form-control,
.form-select,
.srms-input,
textarea,
th,
td {
    transition: background-color 250ms ease, border-color 250ms ease, color 250ms ease, box-shadow 250ms ease;
}

/* Sidebar Refinements */
.srms-sidebar {
    background-color: var(--srms-surface);
    border-right: 1px solid var(--srms-border);
}

.srms-brand {
    border-bottom: 1px solid var(--srms-border);
}

.srms-project-name strong {
    color: var(--srms-primary);
}

.srms-project-name span {
    color: var(--srms-muted);
}

.srms-sidebar-footer {
    border: 1px solid var(--srms-border);
    color: var(--srms-muted);
}

.srms-sidebar-footer strong {
    color: var(--srms-text);
}

/* Sidebar Custom Scrollbar */
.srms-sidebar::-webkit-scrollbar {
    width: 6px !important;
}

.srms-sidebar::-webkit-scrollbar-track {
    background: #f8fafc !important;
}

.srms-sidebar::-webkit-scrollbar-thumb {
    background: #cbd5e1 !important;
    border-radius: 3px !important;
}

.srms-sidebar::-webkit-scrollbar-thumb:hover {
    background: #94a3b8 !important;
}

/* Topbar Refinements */
.srms-topbar {
    background-color: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    border-bottom: 1px solid var(--srms-border) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02) !important;
}

[data-theme="dark"] .srms-topbar {
    background-color: rgba(30, 41, 59, 0.8) !important;
}

.srms-topbar-actions {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
}

/* Theme Toggle Button */
.srms-theme-toggle-button {
    display: grid !important;
    place-items: center !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: var(--srms-radius-sm) !important;
    border: 1px solid var(--srms-border) !important;
    background-color: var(--srms-surface) !important;
    color: var(--srms-text-secondary) !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    padding: 0 !important;
}

.srms-theme-toggle-button:hover {
    border-color: var(--srms-primary) !important;
    background-color: var(--srms-primary-soft) !important;
    color: var(--srms-primary) !important;
    transform: translateY(-1px) !important;
}

.srms-theme-toggle-button svg {
    width: 18px !important;
    height: 18px !important;
    stroke: currentColor !important;
    fill: none !important;
    transition: transform 0.25s ease !important;
}

.srms-theme-toggle-button:active svg {
    transform: rotate(30deg) scale(0.9) !important;
}

/* Premium Stat Cards */
.dashboard-stat-card {
    box-shadow: var(--srms-shadow-sm) !important;
    transition: transform 0.25s ease, box-shadow 0.25s ease !important;
}

.dashboard-stat-card:hover {
    transform: translateY(-3px) !important;
    box-shadow: var(--srms-shadow-md) !important;
}

.dashboard-stat-icon {
    width: 52px !important;
    height: 52px !important;
    flex: 0 0 52px !important;
}

.dashboard-stat-card strong {
    font-size: 28px !important;
    font-weight: 800 !important;
    color: var(--srms-text) !important;
}

.dashboard-stat-card span {
    font-size: 13px !important;
    color: var(--srms-text-secondary) !important;
    font-weight: 600 !important;
}

.dashboard-stat-card small {
    color: var(--srms-muted) !important;
}

/* Standard Buttons & Hover Transition */
.btn {
    border-radius: var(--srms-radius-sm) !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.btn:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
}

.btn:active {
    transform: translateY(0) !important;
}

.btn-primary, .srms-primary-button {
    box-shadow: 0 2px 4px rgba(30, 58, 138, 0.15) !important;
}

.btn-primary:hover, .srms-primary-button:hover {
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.25) !important;
}

/* Input, Select, Textarea */
.form-control,
.form-select,
.srms-input,
textarea {
    border-radius: var(--srms-radius-sm) !important;
    background-color: var(--srms-surface) !important;
    color: var(--srms-text) !important;
    border: 1px solid var(--srms-border) !important;
    transition: all 0.25s ease !important;
}

[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select,
[data-theme="dark"] .srms-input,
[data-theme="dark"] textarea {
    background-color: #111827 !important;
    color: var(--srms-text) !important;
    border-color: var(--srms-border) !important;
}

.form-control:focus,
.form-select:focus,
.srms-input:focus,
textarea:focus {
    border-color: var(--srms-primary) !important;
    box-shadow: 0 0 0 4px rgba(30, 58, 138, 0.15) !important;
    background-color: var(--srms-surface) !important;
}

/* Dark Mode Overrides for compatibility */
[data-theme="dark"] body {
    background-color: var(--srms-background) !important;
    color: var(--srms-text) !important;
}

[data-theme="dark"] .modal-content {
    background-color: var(--srms-surface) !important;
    border-color: var(--srms-border) !important;
    color: var(--srms-text) !important;
}

[data-theme="dark"] .modal-header,
[data-theme="dark"] .modal-footer {
    border-color: var(--srms-border) !important;
}

[data-theme="dark"] .dropdown-menu {
    background-color: var(--srms-surface) !important;
    border-color: var(--srms-border) !important;
    color: var(--srms-text) !important;
}

[data-theme="dark"] .dropdown-item {
    color: var(--srms-text) !important;
}

[data-theme="dark"] .dropdown-item:hover {
    background-color: var(--srms-sidebar-hover) !important;
    color: #ffffff !important;
}

[data-theme="dark"] .srms-card,
[data-theme="dark"] .dashboard-stat-card,
[data-theme="dark"] .dashboard-critical-mobile-item {
    background-color: var(--srms-surface) !important;
    border-color: var(--srms-border) !important;
}

[data-theme="dark"] .dashboard-table tbody tr:hover,
[data-theme="dark"] .category-table tbody tr:hover,
[data-theme="dark"] .material-table tbody tr:hover,
[data-theme="dark"] .stock-table tbody tr:hover,
[data-theme="dark"] .robot-model-table tbody tr:hover,
[data-theme="dark"] .bom-table tbody tr:hover,
[data-theme="dark"] .production-order-table tbody tr:hover,
[data-theme="dark"] .installation-order-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.02) !important;
}

[data-theme="dark"] .dashboard-table th,
[data-theme="dark"] .category-table th,
[data-theme="dark"] .material-table th,
[data-theme="dark"] .stock-table th,
[data-theme="dark"] .robot-model-table th,
[data-theme="dark"] .bom-table th,
[data-theme="dark"] .production-order-table th,
[data-theme="dark"] .installation-order-table th {
    background-color: var(--srms-surface-muted) !important;
    border-bottom-color: var(--srms-border) !important;
    color: var(--srms-text) !important;
}

[data-theme="dark"] .dashboard-table td,
[data-theme="dark"] .category-table td,
[data-theme="dark"] .material-table td,
[data-theme="dark"] .stock-table td,
[data-theme="dark"] .robot-model-table td,
[data-theme="dark"] .bom-table td,
[data-theme="dark"] .production-order-table td,
[data-theme="dark"] .installation-order-table td {
    border-bottom-color: var(--srms-border) !important;
    color: var(--srms-text-secondary) !important;
}

[data-theme="dark"] .dashboard-quick-action {
    background-color: var(--srms-surface) !important;
    border-color: var(--srms-border) !important;
}

[data-theme="dark"] .dashboard-quick-action:hover {
    background-color: var(--srms-primary-soft) !important;
    border-color: var(--srms-primary) !important;
}

[data-theme="dark"] .dashboard-quick-icon {
    background-color: rgba(59, 130, 246, 0.1) !important;
    color: var(--srms-primary) !important;
}

[data-theme="dark"] .srms-footer {
    border-top: 1px solid var(--srms-border) !important;
    color: var(--srms-muted) !important;
}

/* Card details in list views styling for dark mode */
[data-theme="dark"] .card-header,
[data-theme="dark"] .card-footer {
    background-color: var(--srms-surface-muted) !important;
    border-color: var(--srms-border) !important;
    color: var(--srms-text) !important;
}

/* Unified Card Header Styles (for RobotModel and other modules) */
.srms-card-header,
.robot-model-card-header {
    padding: 20px 24px !important;
    border-bottom: 1px solid var(--srms-border) !important;
    background-color: var(--srms-surface) !important;
}

[data-theme="dark"] .srms-card-header,
[data-theme="dark"] .robot-model-card-header {
    background-color: var(--srms-surface) !important;
}

.srms-card-header h3,
.srms-card-title,
.robot-model-card-header h3 {
    margin: 0 !important;
    font-size: 16px !important;
    font-weight: 750 !important;
    color: var(--srms-text) !important;
}

.srms-card-header span,
.srms-card-subtitle,
.robot-model-card-header span {
    display: block !important;
    margin-top: 5px !important;
    color: var(--srms-muted) !important;
    font-size: 12px !important;
}

/* ==========================================================================
   BREADCRUMB & PAGE HEADER ICON BOX STYLES
   ========================================================================== */

.srms-page-header-container {
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
}

.srms-page-header-icon-box {
    display: grid !important;
    place-items: center !important;
    width: 44px !important;
    height: 44px !important;
    flex: 0 0 44px !important;
    border-radius: 12px !important;
    background-color: var(--srms-primary-soft) !important;
    color: var(--srms-primary) !important;
    box-shadow: var(--srms-shadow-sm) !important;
    transition: all 0.25s ease !important;
}

[data-theme="dark"] .srms-page-header-icon-box {
    background-color: rgba(59, 130, 246, 0.12) !important;
    color: #60a5fa !important;
}

.srms-page-header-icon-box svg {
    width: 22px !important;
    height: 22px !important;
    stroke: currentColor !important;
    fill: none !important;
    stroke-width: 2 !important;
}

.srms-page-header-text {
    display: flex !important;
    flex-direction: column !important;
}

/* Breadcrumb Styling */
.srms-breadcrumb-nav {
    margin-bottom: 4px !important;
}

.srms-breadcrumb {
    display: flex !important;
    flex-wrap: wrap !important;
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
    font-size: 11px !important;
    font-weight: 550 !important;
    gap: 6px !important;
    align-items: center !important;
}

.srms-breadcrumb-item {
    display: inline-flex !important;
    align-items: center !important;
    color: var(--srms-muted) !important;
}

.srms-breadcrumb-item a {
    color: var(--srms-muted) !important;
    text-decoration: none !important;
    transition: color 0.15s ease !important;
}

.srms-breadcrumb-item a:hover {
    color: var(--srms-primary) !important;
}

[data-theme="dark"] .srms-breadcrumb-item a:hover {
    color: #60a5fa !important;
}

.srms-breadcrumb-item + .srms-breadcrumb-item::before {
    content: "" !important;
    display: inline-block !important;
    width: 5px !important;
    height: 5px !important;
    border-top: 1.5px solid var(--srms-border) !important;
    border-right: 1.5px solid var(--srms-border) !important;
    transform: rotate(45deg) !important;
    margin-right: 6px !important;
    opacity: 0.8 !important;
    vertical-align: middle !important;
}

.srms-breadcrumb-item.active {
    color: var(--srms-text-secondary) !important;
    font-weight: 600 !important;
}

[data-theme="dark"] .srms-breadcrumb-item.active {
    color: var(--srms-text) !important;
}

/* Spacing and alignments */
.srms-page-title {
    margin-bottom: 2px !important;
    line-height: 1.2 !important;
}

.srms-page-subtitle {
    margin-bottom: 0 !important;
    line-height: 1.3 !important;
}

/* Mobile responsive optimizations */
@media (max-width: 768px) {
    .srms-page-header-container {
        gap: 12px !important;
    }
    
    .srms-page-header-icon-box {
        width: 38px !important;
        height: 38px !important;
        flex: 0 0 38px !important;
        border-radius: 10px !important;
    }
    
    .srms-page-header-icon-box svg {
        width: 18px !important;
        height: 18px !important;
    }
}

/* ==========================================================================
   DARK MODE TEXT CONTRAST & TYPOGRAPHY ADJUSTMENTS
   ========================================================================== */
[data-theme="dark"] body {
    color: #f8fafc !important;
}

[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6 {
    color: #f8fafc !important;
}

[data-theme="dark"] p {
    color: #cbd5e1 !important;
}

[data-theme="dark"] a {
    color: #60a5fa !important;
}

[data-theme="dark"] a:hover {
    color: #93c5fd !important;
}

/* Card-specific text overrides to prevent unreadable dark text */
[data-theme="dark"] .srms-card,
[data-theme="dark"] .card {
    color: #cbd5e1 !important;
}

[data-theme="dark"] .srms-card strong,
[data-theme="dark"] .card strong,
[data-theme="dark"] .srms-card h4,
[data-theme="dark"] .card h4 {
    color: #f8fafc !important;
}

[data-theme="dark"] .srms-card .text-muted,
[data-theme="dark"] .card .text-muted,
[data-theme="dark"] .srms-card p.text-muted,
[data-theme="dark"] .card p.text-muted,
[data-theme="dark"] .srms-card span.text-muted,
[data-theme="dark"] .card span.text-muted {
    color: #cbd5e1 !important;
}

/* Detail Labels and Values specifically */
[data-theme="dark"] .detail-label,
[data-theme="dark"] .form-label,
[data-theme="dark"] label {
    color: #f8fafc !important;
}

[data-theme="dark"] .detail-value {
    color: #cbd5e1 !important;
}

/* Table Overrides for Dark Mode */
[data-theme="dark"] table,
[data-theme="dark"] .table {
    background-color: var(--srms-surface) !important;
    border-color: #334155 !important;
}

[data-theme="dark"] table th,
[data-theme="dark"] .table th {
    background-color: #172033 !important;
    color: #e2e8f0 !important;
    border-bottom: 2px solid #334155 !important;
}

[data-theme="dark"] table td,
[data-theme="dark"] .table td {
    background-color: transparent !important;
    color: #f1f5f9 !important;
    border-bottom: 1px solid #334155 !important;
}

[data-theme="dark"] table td strong {
    color: #f8fafc !important;
}

[data-theme="dark"] table td span.text-muted,
[data-theme="dark"] table td .text-muted {
    color: #cbd5e1 !important;
}

[data-theme="dark"] table tbody tr:hover,
[data-theme="dark"] .table tbody tr:hover {
    background-color: rgba(59, 130, 246, 0.08) !important;
}

/* Bootstrap background utility overrides in Dark Mode */
[data-theme="dark"] .bg-light {
    background-color: var(--srms-surface-muted) !important;
}

[data-theme="dark"] .bg-white {
    background-color: var(--srms-surface) !important;
}

/* ==========================================================================
   FORM & SELECT OVERRIDES FOR DARK MODE
   ========================================================================== */
[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select,
[data-theme="dark"] .srms-input,
[data-theme="dark"] textarea {
    background-color: #0f172a !important;
    color: #f8fafc !important;
    border-color: #334155 !important;
}

[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus,
[data-theme="dark"] .srms-input:focus,
[data-theme="dark"] textarea:focus {
    border-color: #60a5fa !important;
    box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.15) !important;
    background-color: #111827 !important;
}

[data-theme="dark"] select option {
    background-color: #1e293b !important;
    color: #f8fafc !important;
}

[data-theme="dark"] .form-control:disabled,
[data-theme="dark"] .form-select:disabled,
[data-theme="dark"] .srms-input:disabled,
[data-theme="dark"] textarea:disabled,
[data-theme="dark"] .btn.disabled,
[data-theme="dark"] .btn:disabled {
    background-color: #1e293b !important;
    color: #94a3b8 !important;
    opacity: 0.65 !important;
    cursor: not-allowed !important;
}

/* ==========================================================================
   BADGES, BUTTONS & INDICATORS FOR DARK MODE
   ========================================================================== */
[data-theme="dark"] .category-status.active,
[data-theme="dark"] .robot-model-status.active {
    color: #34d399 !important;
    background-color: rgba(52, 211, 153, 0.15) !important;
    border: 1px solid rgba(52, 211, 153, 0.25) !important;
}

[data-theme="dark"] .category-status.passive,
[data-theme="dark"] .robot-model-status.passive {
    color: #cbd5e1 !important;
    background-color: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* Override inline yellow warning badges in dark mode */
[data-theme="dark"] .category-status[style*="background-color: #fff1d6"],
[data-theme="dark"] .category-status[style*="color: #b56800"] {
    color: #fbbf24 !important;
    background-color: rgba(251, 191, 36, 0.15) !important;
    border: 1px solid rgba(251, 191, 36, 0.25) !important;
}

[data-theme="dark"] .badge.bg-primary {
    background-color: rgba(59, 130, 246, 0.2) !important;
    color: #60a5fa !important;
    border: 1px solid rgba(59, 130, 246, 0.3) !important;
}

[data-theme="dark"] .badge.bg-success {
    background-color: rgba(52, 211, 153, 0.2) !important;
    color: #34d399 !important;
    border: 1px solid rgba(52, 211, 153, 0.3) !important;
}

[data-theme="dark"] .badge.bg-danger {
    background-color: rgba(248, 113, 113, 0.2) !important;
    color: #f87171 !important;
    border: 1px solid rgba(248, 113, 113, 0.3) !important;
}

[data-theme="dark"] .badge.bg-warning {
    background-color: rgba(251, 191, 36, 0.2) !important;
    color: #fbbf24 !important;
    border: 1px solid rgba(251, 191, 36, 0.3) !important;
}

[data-theme="dark"] .btn-outline-secondary {
    border-color: #4b5563 !important;
    color: #cbd5e1 !important;
}

[data-theme="dark"] .btn-outline-secondary:hover {
    background-color: #374151 !important;
    color: #f8fafc !important;
}

[data-theme="dark"] .btn-outline-primary {
    border-color: #60a5fa !important;
    color: #60a5fa !important;
}

[data-theme="dark"] .btn-outline-primary:hover {
    background-color: rgba(96, 165, 250, 0.1) !important;
    color: #93c5fd !important;
}

/* ==========================================================================
   SIDEBAR REVISION FOR DARK MODE
   ========================================================================== */
[data-theme="dark"] .srms-sidebar {
    background-color: #0f172a !important;
    color: #f8fafc !important;
    border-right-color: #1e293b !important;
}

[data-theme="dark"] .srms-brand {
    border-bottom-color: #1e293b !important;
}

[data-theme="dark"] .srms-project-name strong {
    color: #60a5fa !important;
}

[data-theme="dark"] .srms-project-name span {
    color: #94a3b8 !important;
}

[data-theme="dark"] .srms-sidebar-footer {
    background-color: #1e293b !important;
    border-color: #334155 !important;
    color: #94a3b8 !important;
}

[data-theme="dark"] .srms-sidebar-footer strong {
    color: #f8fafc !important;
}

[data-theme="dark"] .srms-nav-section {
    color: #64748b !important;
}

[data-theme="dark"] .srms-nav-link {
    color: #cbd5e1 !important;
}

[data-theme="dark"] .srms-nav-link:hover:not(.active) {
    color: #ffffff !important;
    background-color: #1e293b !important;
}

[data-theme="dark"] .srms-nav-icon {
    background-color: rgba(59, 130, 246, 0.1) !important;
    color: #94a3b8 !important;
}

[data-theme="dark"] .srms-nav-icon svg {
    stroke: #94a3b8 !important;
}

[data-theme="dark"] .srms-nav-link:hover:not(.active) .srms-nav-icon {
    background-color: rgba(59, 130, 246, 0.2) !important;
    color: #60a5fa !important;
}

[data-theme="dark"] .srms-nav-link:hover:not(.active) .srms-nav-icon svg {
    stroke: #60a5fa !important;
}

/* Fluent UI Active Link in Dark Mode */
[data-theme="dark"] .srms-nav-link.active {
    color: #60a5fa !important;
    background-color: rgba(59, 130, 246, 0.16) !important;
    font-weight: 650 !important;
}

[data-theme="dark"] .srms-nav-link.active::before {
    background-color: #3b82f6 !important;
}

[data-theme="dark"] .srms-nav-link.active .srms-nav-icon {
    background-color: rgba(96, 165, 250, 0.22) !important;
    color: #60a5fa !important;
}

[data-theme="dark"] .srms-nav-link.active .srms-nav-icon svg {
    stroke: #60a5fa !important;
}

/* Scrollbar styles for dark sidebar */
[data-theme="dark"] .srms-sidebar::-webkit-scrollbar-track {
    background: transparent !important;
}

[data-theme="dark"] .srms-sidebar::-webkit-scrollbar-thumb {
    background: #334155 !important;
}

[data-theme="dark"] .srms-sidebar::-webkit-scrollbar-thumb:hover {
    background: #475569 !important;
}

/* ==========================================================================
   DARK MODE SUMMARY & STAT CARDS OVERRIDES
   ========================================================================== */
[data-theme="dark"] .dashboard-stat-card,
[data-theme="dark"] .stock-summary-card {
    background-color: #1E293B !important;
    border: 1px solid #334155 !important;
    box-shadow: 0 8px 24px rgba(2, 6, 23, 0.28) !important;
}

[data-theme="dark"] .dashboard-stat-card strong,
[data-theme="dark"] .stock-summary-card strong {
    color: #FFFFFF !important;
    font-weight: 700 !important;
}

[data-theme="dark"] .dashboard-stat-card span,
[data-theme="dark"] .stock-summary-card span {
    color: #F8FAFC !important;
}

[data-theme="dark"] .dashboard-stat-card small,
[data-theme="dark"] .stock-summary-card small {
    color: #CBD5E1 !important;
}

/* Premium Card Shadows and Border for dark mode card elements */
[data-theme="dark"] .srms-card,
[data-theme="dark"] .card {
    box-shadow: 0 8px 24px rgba(2, 6, 23, 0.28) !important;
    border: 1px solid #334155 !important;
}

/* ==========================================================================
   REUSABLE ERP CARD VIEW & SEGMENTED SWITCHER SYSTEM
   ========================================================================== */

/* Segmented Control View Switcher */
.srms-view-switcher {
    display: inline-flex;
    align-items: center;
    padding: 3px;
    background-color: var(--srms-surface-muted);
    border: 1px solid var(--srms-border);
    border-radius: 10px;
    gap: 2px;
}

.srms-view-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--srms-text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.srms-view-btn svg {
    stroke: currentColor;
    transition: stroke 0.2s ease;
}

.srms-view-btn:hover {
    color: var(--srms-primary);
    background-color: rgba(37, 99, 235, 0.05);
}

.srms-view-btn.active {
    background-color: var(--srms-surface);
    color: var(--srms-primary);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

[data-theme="dark"] .srms-view-btn.active {
    background-color: #1e293b !important;
    color: #60a5fa !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

/* Reusable ERP Card Component */
.srms-erp-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background-color: var(--srms-surface);
    border: 1px solid var(--srms-border);
    border-radius: 14px;
    padding: 18px;
    transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.22s ease, border-color 0.22s ease;
    box-shadow: var(--srms-shadow-sm);
    position: relative;
    overflow: hidden;
}

.srms-erp-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.1);
    border-color: rgba(37, 99, 235, 0.3);
}

[data-theme="dark"] .srms-erp-card {
    background-color: #1e293b !important;
    border-color: #334155 !important;
}

[data-theme="dark"] .srms-erp-card:hover {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4) !important;
    border-color: rgba(96, 165, 250, 0.35) !important;
}

/* ERP Card Header */
.srms-erp-card-header {
    margin-bottom: 10px;
}

.srms-erp-card-icon-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border-radius: 10px;
    background-color: var(--srms-primary-soft);
    color: var(--srms-primary);
}

[data-theme="dark"] .srms-erp-card-icon-box {
    background-color: rgba(59, 130, 246, 0.16) !important;
    color: #60a5fa !important;
}

.srms-erp-card-code {
    display: block;
    font-size: 11px;
    font-weight: 750;
    color: var(--srms-primary);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

[data-theme="dark"] .srms-erp-card-code {
    color: #60a5fa !important;
}

.srms-erp-card-title {
    margin: 2px 0 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--srms-text);
    line-height: 1.3;
}

.srms-erp-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.srms-erp-card-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--srms-text-secondary);
    background-color: var(--srms-surface-muted);
    padding: 3px 8px;
    border-radius: 6px;
}

.srms-erp-card-location {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11.5px;
    color: var(--srms-muted);
}

/* Card Divider */
.srms-erp-card-divider {
    height: 1px;
    background-color: var(--srms-border);
    margin: 12px 0;
}

/* ERP Card Body / Stats */
.srms-erp-stat-box {
    padding: 8px 10px;
    border-radius: 8px;
    background-color: var(--srms-surface-muted);
    text-align: center;
}

.srms-erp-stat-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--srms-muted);
    margin-bottom: 2px;
}

.srms-erp-stat-value {
    display: block;
    font-size: 16px;
    font-weight: 750;
    color: var(--srms-text);
}

/* ERP Card Footer Actions */
.srms-erp-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    margin-top: 4px;
}

.srms-erp-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--srms-text-secondary);
    text-decoration: none;
    transition: all 0.18s ease;
    cursor: pointer;
}

.srms-erp-action-btn:hover {
    color: var(--srms-primary);
    background-color: var(--srms-primary-soft);
}

[data-theme="dark"] .srms-erp-action-btn:hover {
    color: #60a5fa !important;
    background-color: rgba(59, 130, 246, 0.16) !important;
}

/* Status Badges */
.srms-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
}

.srms-badge-success {
    background-color: rgba(16, 185, 129, 0.12);
    color: #10b981;
}

.srms-badge-warning {
    background-color: rgba(245, 158, 11, 0.14);
    color: #f59e0b;
}

.srms-badge-danger {
    background-color: rgba(239, 68, 68, 0.12);
    color: #ef4444;
}

.srms-badge-secondary {
    background-color: var(--srms-surface-muted);
    color: var(--srms-muted);
}

/* Empty State Component */
.srms-empty-state-card {
    text-align: center;
    padding: 48px 24px;
    background-color: var(--srms-surface);
    border: 1px dashed var(--srms-border);
    border-radius: 16px;
    margin: 20px 0;
}

.srms-empty-icon-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background-color: var(--srms-primary-soft);
    color: var(--srms-primary);
    margin-bottom: 16px;
}

.srms-empty-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--srms-text);
    margin-bottom: 6px;
}

.srms-empty-subtitle {
    font-size: 13.5px;
    color: var(--srms-muted);
    max-width: 420px;
    margin: 0 auto 20px;
}

/* ==========================================================================
   PREMIUM KPI CARDS & SEARCH FILTER SYSTEM
   ========================================================================== */

/* KPI SaaS Stat Cards */
.srms-kpi-card {
    background-color: var(--srms-surface);
    border: 1px solid var(--srms-border);
    border-radius: 14px;
    padding: 16px 18px;
    box-shadow: var(--srms-shadow-sm);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
    position: relative;
    overflow: hidden;
}

.srms-kpi-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
}

.srms-kpi-icon-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    border-radius: 12px;
}

.srms-kpi-icon-box.bg-blue {
    background-color: rgba(37, 99, 235, 0.12);
    color: #2563eb;
}

.srms-kpi-icon-box.bg-green {
    background-color: rgba(16, 185, 129, 0.12);
    color: #10b981;
}

.srms-kpi-icon-box.bg-amber {
    background-color: rgba(245, 158, 11, 0.14);
    color: #f59e0b;
}

.srms-kpi-icon-box.bg-red {
    background-color: rgba(239, 68, 68, 0.12);
    color: #ef4444;
}

.srms-kpi-icon-box.bg-purple {
    background-color: rgba(147, 51, 234, 0.12);
    color: #9333ea;
}

.srms-kpi-title {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--srms-text-secondary);
}

.srms-kpi-value {
    font-size: 28px !important;
    font-weight: 800 !important;
    line-height: 1.1 !important;
    margin: 2px 0 !important;
    display: block !important;
}

.srms-kpi-desc {
    display: block;
    font-size: 11px;
    color: var(--srms-muted);
}

/* Color Accent Bottom Lines */
.srms-kpi-blue { border-bottom: 3px solid #2563eb !important; }
.srms-kpi-green { border-bottom: 3px solid #10b981 !important; }
.srms-kpi-amber { border-bottom: 3px solid #f59e0b !important; }
.srms-kpi-red { border-bottom: 3px solid #ef4444 !important; }
.srms-kpi-purple { border-bottom: 3px solid #9333ea !important; }

/* Dark mode overrides for KPI cards */
[data-theme="dark"] .srms-kpi-card {
    background-color: #1e293b !important;
    border-color: #334155 !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28) !important;
}

[data-theme="dark"] .srms-kpi-icon-box.bg-blue {
    background-color: rgba(59, 130, 246, 0.18) !important;
    color: #60a5fa !important;
}

[data-theme="dark"] .srms-kpi-icon-box.bg-green {
    background-color: rgba(16, 185, 129, 0.18) !important;
    color: #34d399 !important;
}

[data-theme="dark"] .srms-kpi-icon-box.bg-amber {
    background-color: rgba(245, 158, 11, 0.2) !important;
    color: #fbbf24 !important;
}

[data-theme="dark"] .srms-kpi-icon-box.bg-red {
    background-color: rgba(239, 68, 68, 0.18) !important;
    color: #f87171 !important;
}

/* Search Wrapper & Filter Inputs */
.srms-search-wrapper {
    position: relative;
    width: 100%;
}

.srms-search-wrapper .srms-search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--srms-muted);
    z-index: 5;
    transition: color 0.18s ease;
}

.srms-search-wrapper .srms-filter-input {
    padding-left: 46px !important;
}

.srms-search-wrapper:focus-within .srms-search-icon {
    color: var(--srms-primary);
}

.srms-filter-input,
.srms-filter-select,
.srms-filter-clear-btn {
    height: 42px !important;
    border-radius: 10px !important;
    font-size: 13.5px !important;
    border: 1px solid var(--srms-border) !important;
    background-color: var(--srms-surface) !important;
    color: var(--srms-text) !important;
    transition: all 0.18s ease !important;
}

.srms-filter-input:focus,
.srms-filter-select:focus {
    border-color: var(--srms-primary) !important;
    box-shadow: 0 0 0 3px var(--srms-primary-soft) !important;
}

.srms-filter-clear-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    font-weight: 600 !important;
    color: var(--srms-text-secondary) !important;
    background-color: var(--srms-surface-muted) !important;
    cursor: pointer !important;
}

.srms-filter-clear-btn:hover {
    color: var(--srms-primary) !important;
    background-color: var(--srms-primary-soft) !important;
    border-color: var(--srms-primary-soft) !important;
}

/* ==========================================================================
   WORKFLOW TIMELINE REUSABLE COMPONENT (SAP Fiori / Fluent UI Style)
   ========================================================================== */

.srms-workflow-container {
    background-color: var(--srms-surface);
    border: 1px solid var(--srms-border);
    border-radius: 14px;
    padding: 20px 24px;
    box-shadow: var(--srms-shadow-sm);
    margin-bottom: 24px;
    position: relative;
}

.srms-workflow-title {
    margin: 0;
    font-size: 16px;
    font-weight: 750;
    color: var(--srms-text);
    display: flex;
    align-items: center;
}

.srms-workflow-subtitle {
    margin: 3px 0 0;
    font-size: 12.5px;
    color: var(--srms-muted);
}

.srms-workflow-progress-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 700;
    background-color: rgba(37, 99, 235, 0.1);
    color: var(--srms-primary);
}

/* Horizontal Track & Scroll Wrapper */
.srms-workflow-scroll-wrapper {
    overflow-x: auto;
    padding: 18px 4px 10px;
    margin: 0 -4px;
    scrollbar-width: thin;
    scrollbar-color: var(--srms-border) transparent;
}

.srms-workflow-scroll-wrapper::-webkit-scrollbar {
    height: 4px;
}

.srms-workflow-scroll-wrapper::-webkit-scrollbar-thumb {
    background-color: var(--srms-border);
    border-radius: 4px;
}

.srms-workflow-track {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    min-width: 680px;
    position: relative;
}

/* Step Column */
.srms-workflow-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    padding: 0 8px;
    animation: srmsTimelineSlideIn 0.38s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    opacity: 0;
    transform: translateY(8px);
    cursor: pointer;
}

@keyframes srmsTimelineSlideIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Node Circle Indicator */
.srms-workflow-node {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    z-index: 3;
    transition: all 0.22s ease;
    border: 2px solid var(--srms-border);
    background-color: var(--srms-surface);
}

.srms-workflow-step:hover .srms-workflow-node {
    transform: scale(1.15);
}

/* Status Variations */
/* 1. Completed (Yeşil - ✓) */
.srms-workflow-step.status-completed .srms-workflow-node {
    background-color: #10b981;
    border-color: #10b981;
    color: #ffffff;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15);
}

.srms-workflow-step.status-completed .srms-workflow-connector-line {
    background-color: #10b981;
}

/* 2. Active (Mavi - ●) */
.srms-workflow-step.status-active .srms-workflow-node {
    background-color: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
    box-shadow: 0 0 0 6px rgba(37, 99, 235, 0.2);
    animation: srmsActivePulse 2s infinite;
}

@keyframes srmsActivePulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(37, 99, 235, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
    }
}

.srms-pulse-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #ffffff;
}

/* 3. Pending (Gri - ○) */
.srms-workflow-step.status-pending .srms-workflow-node {
    background-color: var(--srms-surface-muted);
    border-color: var(--srms-border);
    color: var(--srms-muted);
}

.srms-empty-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--srms-muted);
}

.srms-workflow-step.status-pending .srms-workflow-connector-line {
    background-color: var(--srms-border);
}

/* 4. OnHold (Beklemede - Turuncu) */
.srms-workflow-step.status-onhold .srms-workflow-node {
    background-color: #f59e0b;
    border-color: #f59e0b;
    color: #ffffff;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.18);
}

/* 5. Cancelled (İptal - Kırmızı) */
.srms-workflow-step.status-cancelled .srms-workflow-node {
    background-color: #ef4444;
    border-color: #ef4444;
    color: #ffffff;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.18);
}

/* Connector Lines */
.srms-workflow-connector-line {
    position: absolute;
    top: 18px;
    height: 3px;
    z-index: 1;
    background-color: var(--srms-border);
    transition: background-color 0.22s ease;
}

.srms-workflow-connector-line.line-left {
    left: 0;
    width: 50%;
}

.srms-workflow-connector-line.line-right {
    right: 0;
    width: 50%;
}

/* Step Label Content */
.srms-workflow-content {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.srms-step-title {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    color: var(--srms-text);
    line-height: 1.2;
}

.srms-step-date {
    font-size: 11px;
    font-weight: 600;
    color: var(--srms-text-secondary);
}

.srms-step-code {
    font-size: 10.5px;
    font-weight: 650;
    color: var(--srms-primary);
    background-color: var(--srms-surface-muted);
    padding: 1px 6px;
    border-radius: 4px;
    margin-top: 2px;
}

.srms-step-user {
    font-size: 10.5px;
    color: var(--srms-muted);
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-top: 2px;
}

/* Dark Mode Overrides for Workflow Timeline */
[data-theme="dark"] .srms-workflow-container {
    background-color: #1e293b !important;
    border-color: #334155 !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28) !important;
}

[data-theme="dark"] .srms-workflow-step.status-pending .srms-workflow-node {
    background-color: #0f172a !important;
    border-color: #334155 !important;
    color: #64748b !important;
}

[data-theme="dark"] .srms-workflow-connector-line {
    background-color: #334155;
}

/* Procurement Summary Cards in Stock Module */
.srms-procurement-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background-color: var(--srms-surface);
    border: 1px solid var(--srms-border);
    border-radius: 14px;
    padding: 18px;
    box-shadow: var(--srms-shadow-sm);
    transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.22s ease, border-color 0.22s ease;
    position: relative;
    overflow: hidden;
}

.srms-procurement-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
    border-color: rgba(37, 99, 235, 0.3);
}

.srms-procurement-code {
    font-size: 11px;
    font-weight: 750;
    color: var(--srms-primary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.srms-procurement-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--srms-text);
    margin: 2px 0 0;
}

.srms-procurement-stage {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--srms-text-secondary);
}

/* ==========================================================================
   Import Center Module System
   ========================================================================== */
.srms-import-kpi-card {
    height: 100%;
    min-height: 90px;
    padding: 14px 16px;
    border-radius: 12px;
    background-color: var(--srms-surface-muted);
    border: 1px solid var(--srms-border);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.srms-import-kpi-card.success {
    background-color: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.2);
}

.srms-import-kpi-card.danger {
    background-color: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.2);
}

.srms-import-kpi-card.warning {
    background-color: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.2);
}

.srms-import-kpi-card.secondary {
    background-color: var(--srms-surface-muted);
    border-color: var(--srms-border);
}

.srms-import-kpi-label {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--srms-text-secondary);
    margin-bottom: 4px;
    line-height: 1.2;
}

.srms-import-kpi-val {
    font-size: 1.6rem;
    font-weight: 750;
    line-height: 1;
    margin: 0;
}

/* Compact Result Summary KPI Card with Icon */
.srms-import-result-card {
    padding: 12px 14px;
    border-radius: 10px;
    background-color: var(--srms-surface-muted);
    border: 1px solid var(--srms-border);
    display: flex;
    align-items: center;
    gap: 12px;
    height: 100%;
    min-height: 68px;
}

.srms-import-icon-box {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.srms-import-icon-box.primary {
    background-color: rgba(37, 99, 235, 0.12);
    color: var(--srms-primary);
}

.srms-import-icon-box.secondary {
    background-color: rgba(100, 116, 139, 0.12);
    color: var(--srms-text-secondary);
}

.srms-import-icon-box.muted {
    background-color: rgba(148, 163, 184, 0.12);
    color: #64748b;
}

.srms-import-icon-box.success {
    background-color: rgba(16, 185, 129, 0.12);
    color: #10b981;
}

.srms-import-icon-box.warning {
    background-color: rgba(245, 158, 11, 0.12);
    color: #d97706;
}

.srms-import-result-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.srms-import-result-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--srms-muted);
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.srms-import-result-val {
    font-size: 1.35rem;
    font-weight: 750;
    line-height: 1;
}

/* Success Banner Styling */
.srms-success-banner {
    padding: 16px 20px;
    border-radius: 12px;
    background-color: rgba(16, 185, 129, 0.09);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: var(--srms-text);
}

.srms-success-banner-title {
    font-size: 15px;
    font-weight: 700;
    color: #059669;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.srms-success-banner-subtitle {
    font-size: 13px;
    color: var(--srms-text-secondary);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 4px;
}

.srms-success-banner-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.srms-procurement-meta {
    font-size: 11.5px;
    color: var(--srms-muted);
}

[data-theme="dark"] .srms-procurement-card {
    background-color: #1e293b !important;
    border-color: #334155 !important;
}

[data-theme="dark"] .srms-procurement-card:hover {
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35) !important;
    border-color: rgba(96, 165, 250, 0.35) !important;
}

/* ==========================================================================
   ORTAK BUTON VE BADGE BİLEŞENLERİ (SHARED COMPONENT SYSTEM)
   ========================================================================== */

/* Shared Status Badges */
.srms-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 26px;
    padding: 0 10px;
    font-size: 11.5px;
    font-weight: 650;
    border-radius: 6px;
    white-space: nowrap;
    line-height: 1;
    border: 1px solid transparent;
    text-transform: none;
}

.srms-status-safe {
    background-color: rgba(16, 185, 129, 0.12);
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.25);
}

.srms-status-critical {
    background-color: rgba(245, 158, 11, 0.12);
    color: #d97706;
    border-color: rgba(245, 158, 11, 0.25);
}

.srms-status-danger,
.srms-status-out-of-stock {
    background-color: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.25);
}

.srms-status-passive {
    background-color: rgba(100, 116, 139, 0.12);
    color: #64748b;
    border-color: rgba(100, 116, 139, 0.25);
}

.srms-status-active {
    background-color: rgba(16, 185, 129, 0.12);
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.25);
}

/* Shared Buttons System */
.srms-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    height: 30px;
    padding: 0 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    white-space: nowrap;
    text-decoration: none;
}

.srms-btn-sm {
    height: 28px;
    padding: 0 9px;
    font-size: 11.5px;
    border-radius: 6px;
}

.srms-btn-primary {
    background-color: var(--srms-primary, #2563eb);
    color: #ffffff !important;
    border-color: var(--srms-primary, #2563eb);
}

.srms-btn-primary:hover {
    background-color: var(--srms-primary-dark, #1d4ed8);
    border-color: var(--srms-primary-dark, #1d4ed8);
}

.srms-btn-outline-primary {
    background-color: transparent;
    color: var(--srms-primary, #2563eb) !important;
    border-color: rgba(37, 99, 235, 0.35);
}

.srms-btn-outline-primary:hover {
    background-color: rgba(37, 99, 235, 0.08);
    border-color: var(--srms-primary, #2563eb);
}

.srms-btn-outline-secondary {
    background-color: transparent;
    color: var(--srms-muted, #64748b) !important;
    border-color: var(--srms-border, #cbd5e1);
}

.srms-btn-outline-secondary:hover {
    background-color: rgba(100, 116, 139, 0.08);
    border-color: #94a3b8;
}

.srms-btn-outline-danger {
    background-color: transparent;
    color: #ef4444 !important;
    border-color: rgba(239, 68, 68, 0.35);
}

.srms-btn-outline-danger:hover {
    background-color: rgba(239, 68, 68, 0.08);
    border-color: #ef4444;
}

.srms-btn-outline-success {
    background-color: transparent;
    color: #10b981 !important;
    border-color: rgba(16, 185, 129, 0.35);
}

.srms-btn-outline-success:hover {
    background-color: rgba(16, 185, 129, 0.08);
    border-color: #10b981;
}

/* Material Photo Thumbnail & Modal Styles */
.srms-material-thumb {
    width: 60px;
    height: 60px;
    min-width: 60px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid var(--srms-border);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.srms-material-thumb:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

.srms-material-thumb-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    min-width: 60px;
    background-color: var(--srms-surface-muted, #f1f5f9);
    border-radius: 10px;
    border: 1px solid var(--srms-border);
    font-size: 20px;
    color: var(--srms-muted);
}

/* ==========================================================================
   OFFICIAL UNIFIED SRMS DESIGN SYSTEM (Audited & Refined)
   Dashboard | Tedarik | Stok | Operasyon | BOM | Tanımlar | Raporlar | Bildirimler | Kullanıcılar
   ========================================================================== */

/* 1) TYPOGRAPHY SYSTEM */
.srms-page-title,
.dashboard-heading h2,
.page-action-header h2,
h2.fw-bold {
    font-size: 32px !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
    letter-spacing: -0.02em !important;
    color: var(--srms-text) !important;
}

.srms-page-subtitle,
.dashboard-heading p,
.page-action-header p,
p.text-muted.small {
    font-size: 15px !important;
    font-weight: 400 !important;
    color: #64748b !important;
}

.srms-card-title,
.srms-kpi-title,
.summary-info-label,
.dashboard-stat-card span,
.stock-summary-card span,
.form-label,
label.form-label {
    font-size: 12px !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    font-weight: 600 !important;
    color: #64748b !important;
}

.srms-card-value,
.srms-kpi-value,
.summary-info-value,
.dashboard-stat-card strong,
.stock-summary-card strong {
    font-size: 18px !important;
    font-weight: 600 !important;
    color: #0f172a !important;
    line-height: 1.3 !important;
}

[data-theme="dark"] .srms-card-value,
[data-theme="dark"] .srms-kpi-value,
[data-theme="dark"] .summary-info-value,
[data-theme="dark"] .dashboard-stat-card strong,
[data-theme="dark"] .stock-summary-card strong {
    color: #f8fafc !important;
}

.timeline-title,
.timeline-step-title,
.timeline-header h4 {
    font-size: 17px !important;
    font-weight: 600 !important;
    color: var(--srms-text) !important;
}

.timeline-desc,
.timeline-step-subtitle,
.timeline-step-desc {
    font-size: 14px !important;
    color: #64748b !important;
}

/* 2) SPACING SYSTEM */
.srms-card-gap {
    margin-bottom: 24px !important;
}

.srms-section-gap {
    margin-bottom: 32px !important;
}

/* 3) CARD DESIGN SYSTEM */
.srms-card,
.dashboard-stat-card,
.srms-kpi-card,
.summary-info-card,
.category-card,
.material-card,
.stock-summary-card,
.form-card,
.notifications-page-card {
    border-radius: 16px !important;
    border: 1px solid var(--srms-border) !important;
    background-color: var(--srms-surface) !important;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04) !important;
    transition: transform 200ms ease-in-out, box-shadow 200ms ease-in-out, border-color 200ms ease-in-out !important;
}

.srms-card:hover,
.dashboard-stat-card:hover,
.srms-kpi-card:hover,
.summary-info-card:hover,
.category-card:hover,
.material-card:hover,
.stock-summary-card:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08) !important;
}

/* 4) ICON & ICON BOX SYSTEM */
.srms-kpi-icon-box,
.summary-info-icon,
.dashboard-stat-icon,
.stock-summary-icon,
.notifications-page-icon-wrapper,
.srms-report-icon-wrapper {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    flex: 0 0 44px !important;
    border-radius: 12px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.srms-kpi-icon-box svg,
.summary-info-icon svg,
.dashboard-stat-icon svg,
.stock-summary-icon svg,
.notifications-page-icon-wrapper svg,
.srms-report-icon-wrapper svg {
    width: 20px !important;
    height: 20px !important;
}

/* 5) UNIFIED BUTTON SYSTEM (Excluding small, topbar & close buttons) */
.btn:not(.btn-sm):not(.btn-lg):not(.btn-close):not(.srms-bell-btn):not(.srms-theme-toggle-button):not(.srms-notification-button),
.srms-btn:not(.srms-btn-sm),
.srms-primary-button {
    height: 42px !important;
    min-height: 40px !important;
    border-radius: 10px !important;
    padding: 0 18px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    transition: all 200ms ease-in-out !important;
}

.btn-sm,
.srms-btn-sm,
.table td .btn,
.category-table td .btn,
.material-table td .btn,
.stock-table td .btn,
.dashboard-table td .btn {
    height: 32px !important;
    min-height: 32px !important;
    padding: 4px 10px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
}

/* 6) UNIFIED BADGE SYSTEM (Excluding notification counters) */
.badge:not(.srms-bell-badge):not(.srms-notification-count),
.category-status,
.material-status,
.srms-status-badge,
.robot-model-status,
.dashboard-status,
.stock-type {
    border-radius: 10px !important;
    padding: 6px 12px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    height: auto !important;
    min-height: unset !important;
    max-height: unset !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 200ms ease-in-out !important;
}

/* 7) COMPACT ALERT SYSTEM */
.alert {
    padding: 10px 16px !important;
    border-radius: 12px !important;
    min-height: 42px !important;
    font-size: 13.5px !important;
    margin-bottom: 24px !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}

/* 8) FORM INPUT SYSTEM (Excluding Textarea height freezing) */
input.form-control,
select.form-select,
select.form-control,
input.srms-input,
select.srms-input {
    height: 42px !important;
    min-height: 42px !important;
    border-radius: 10px !important;
    padding: 8px 14px !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    border: 1px solid var(--srms-border) !important;
    background-color: var(--srms-surface) !important;
    color: var(--srms-text) !important;
    transition: border-color 200ms ease-in-out, box-shadow 200ms ease-in-out !important;
}

textarea.form-control,
textarea.srms-input,
textarea {
    height: auto !important;
    min-height: 90px !important;
    border-radius: 10px !important;
    padding: 10px 14px !important;
    font-size: 14px !important;
    border: 1px solid var(--srms-border) !important;
    background-color: var(--srms-surface) !important;
    color: var(--srms-text) !important;
    transition: border-color 200ms ease-in-out, box-shadow 200ms ease-in-out !important;
}

.form-control:focus,
.form-select:focus,
.srms-input:focus,
textarea:focus {
    border-color: var(--srms-primary) !important;
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.12) !important;
}

/* 9) SPACIOUS & COMPACT RESPONSIVE TABLE SYSTEM */
.table,
.category-table,
.material-table,
.stock-table,
.dashboard-table,
.robot-model-table,
.bom-table,
.production-order-table,
.installation-order-table {
    border-collapse: separate !important;
    border-spacing: 0 !important;
}

.table th,
.category-table th,
.material-table th,
.stock-table th,
.dashboard-table th,
.robot-model-table th,
.bom-table th,
.production-order-table th,
.installation-order-table th {
    font-size: 12px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    color: #64748b !important;
    padding: 12px 18px !important;
    background-color: var(--srms-surface-muted) !important;
    border-bottom: 2px solid var(--srms-border) !important;
}

.table tbody tr,
.category-table tbody tr,
.material-table tbody tr,
.stock-table tbody tr,
.dashboard-table tbody tr,
.robot-model-table tbody tr,
.bom-table tbody tr,
.production-order-table tbody tr,
.installation-order-table tbody tr {
    min-height: 48px;
    transition: background-color 200ms ease-in-out !important;
}

.table td,
.category-table td,
.material-table td,
.stock-table td,
.dashboard-table td,
.robot-model-table td,
.bom-table td,
.production-order-table td,
.installation-order-table td {
    padding: 12px 18px !important;
    vertical-align: middle !important;
    font-size: 13.5px !important;
    border-bottom: 1px solid var(--srms-border) !important;
}

/* 10) GLOBAL 200MS ANIMATION DURATION */
.dropdown-menu,
.nav-link,
.card,
.srms-card,
.btn,
.badge {
    transition: all 200ms ease-in-out !important;
}

/* ==========================================================================
   PROCUREMENT DETAILS & WORKFLOW TIMELINE MODULE STYLES
   ========================================================================== */

.procurement-details-header {
    background-color: var(--srms-surface);
    border: 1px solid var(--srms-border);
    border-radius: 16px;
    padding: 20px 24px;
    margin-bottom: 24px;
    box-shadow: var(--srms-shadow-sm);
}

.summary-info-card {
    background-color: var(--srms-surface);
    border: 1px solid var(--srms-border);
    border-radius: 16px;
    padding: 18px 20px;
    height: 100%;
    transition: transform 200ms ease-in-out, box-shadow 200ms ease-in-out;
    box-shadow: var(--srms-shadow-sm);
}

.summary-info-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--srms-shadow-md);
}

.summary-info-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    flex: 0 0 44px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.summary-info-icon svg {
    width: 20px;
    height: 20px;
}

.summary-info-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #64748b;
    display: block;
    margin-bottom: 4px;
}

.summary-info-value {
    font-size: 18px;
    font-weight: 600;
    color: var(--srms-text);
    line-height: 1.3;
    display: block;
    word-break: break-word;
}

[data-theme="dark"] .summary-info-value {
    color: #f8fafc;
}

/* Timeline Container & Tracks */
.timeline-container {
    background-color: var(--srms-surface);
    border: 1px solid var(--srms-border);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--srms-shadow-sm);
}

.timeline-track-desktop {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    position: relative;
    padding: 10px 0;
}

.timeline-track-desktop::before {
    content: '';
    position: absolute;
    top: 29px;
    left: 50px;
    right: 50px;
    height: 3px;
    background-color: var(--srms-border);
    z-index: 1;
    border-radius: 2px;
}

.timeline-progress-bar {
    position: absolute;
    top: 29px;
    left: 50px;
    height: 3px;
    background-color: #10b981;
    z-index: 1;
    border-radius: 2px;
    transition: width 0.4s ease-in-out;
}

.timeline-step-desktop {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
    padding: 0 8px;
}

.timeline-node {
    width: 40px;
    height: 40px;
    min-width: 40px;
    flex: 0 0 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    transition: all 200ms ease-in-out;
    border: 3px solid var(--srms-surface);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 12px;
}

.timeline-node.node-completed {
    background-color: #10b981;
    color: #ffffff;
}

.timeline-node.node-active {
    background-color: #2563eb;
    color: #ffffff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.22);
    animation: pulse-blue-glow 2s infinite;
}

.timeline-node.node-pending {
    background-color: var(--srms-surface-muted);
    color: #94a3b8;
    border: 2px solid var(--srms-border);
}

.timeline-node.node-cancelled {
    background-color: #ef4444;
    color: #ffffff;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.22);
}

@keyframes pulse-blue-glow {
    0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4); }
    70% { box-shadow: 0 0 0 8px rgba(37, 99, 235, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
}

.timeline-step-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--srms-text);
    margin-bottom: 2px;
}

.timeline-step-subtitle {
    font-size: 14px;
    color: #64748b;
    display: block;
}

.timeline-step-meta {
    margin-top: 8px;
    padding: 6px 10px;
    background-color: var(--srms-surface-muted);
    border-radius: 8px;
    font-size: 11px;
    color: var(--srms-text-secondary);
}

.timeline-track-mobile {
    display: none;
    position: relative;
    padding-left: 36px;
}

.timeline-track-mobile::before {
    content: '';
    position: absolute;
    top: 10px;
    bottom: 10px;
    left: 19px;
    width: 3px;
    background-color: var(--srms-border);
    border-radius: 2px;
}

.timeline-step-mobile {
    position: relative;
    margin-bottom: 24px;
}

.timeline-step-mobile:last-child {
    margin-bottom: 0;
}

.timeline-step-mobile .timeline-node {
    position: absolute;
    left: -36px;
    top: 0;
    width: 36px;
    height: 36px;
    min-width: 36px;
    font-size: 13px;
}

@media (max-width: 991.98px) {
    .timeline-track-desktop { display: none; }
    .timeline-track-mobile { display: block; }
}

/* ==========================================================================
   OFFICIAL REUSABLE SRMS ENTERPRISE ERP DETAIL LAYOUT SYSTEM
   Reference Standard: Procurement Details | Stock Details | Operation Details | BOM Details
   ========================================================================== */

.srms-detail-page {
    margin-top: 0;
}

/* Base Card Style - Softer border & shadow */
.srms-detail-card {
    border-radius: 14px !important;
    border: 1px solid var(--srms-border) !important;
    background-color: var(--srms-surface) !important;
    padding: 18px !important;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.03) !important;
    transition: box-shadow 200ms ease-in-out !important;
}

.srms-detail-card:hover {
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06) !important;
}

.srms-card-section-title {
    font-size: 17px !important;
    font-weight: 600 !important;
    color: var(--srms-text) !important;
    margin-bottom: 14px !important;
    padding-bottom: 8px !important;
    border-bottom: 1px solid var(--srms-border) !important;
}

/* Material Hero Card (Premium Header Grouping) */
.srms-detail-material-img-box {
    width: 96px;
    height: 96px;
    min-width: 96px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--srms-border);
    background-color: var(--srms-surface-muted, #f8fafc);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
}

.srms-detail-material-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.srms-detail-material-img-box:hover .srms-detail-material-img {
    transform: scale(1.05);
}

.srms-detail-placeholder-icon {
    font-size: 32px;
    color: var(--srms-muted, #94a3b8);
}

.srms-detail-material-title {
    font-size: 22px !important;
    font-weight: 700 !important;
    color: var(--srms-text) !important;
    line-height: 1.25 !important;
}

/* Key-Value Data Row List (ERP Style) */
.srms-detail-kv-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.srms-detail-kv-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-radius: 8px;
    background-color: var(--srms-surface-muted, #f8fafc);
    border: 1px solid var(--srms-border);
}

.srms-detail-kv-label {
    font-size: 11px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.8px !important;
    color: #64748b !important;
}

.srms-detail-kv-value {
    font-size: 15px !important;
    font-weight: 600 !important;
    color: var(--srms-text) !important;
}

/* Technical Specification Item (Label Top / Value Below Grid) */
.srms-detail-spec-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.srms-detail-spec-label {
    font-size: 11px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.8px !important;
    color: #64748b !important;
}

.srms-detail-spec-value {
    font-size: 15px !important;
    font-weight: 600 !important;
    color: var(--srms-text) !important;
}

/* Sticky Right Sidebar with Internal Scroll */
@media (min-width: 992px) {
    .srms-sticky-sidebar {
        position: sticky;
        top: 24px;
        z-index: 10;
        max-height: calc(100vh - 130px);
        overflow-y: auto;
        padding-right: 4px;
    }

    .srms-sticky-sidebar::-webkit-scrollbar {
        width: 4px;
    }

    .srms-sticky-sidebar::-webkit-scrollbar-thumb {
        background-color: rgba(148, 163, 184, 0.4);
        border-radius: 4px;
    }
}

@media (max-width: 991.98px) {
    .srms-sticky-sidebar {
        position: static !important;
        max-height: none !important;
        overflow-y: visible !important;
    }
}

/* Compact Vertical Process Timeline (2px connector line) */
.srms-vertical-timeline {
    position: relative;
    padding-left: 32px;
}

.srms-vertical-timeline::before {
    content: '';
    position: absolute;
    top: 10px;
    bottom: 10px;
    left: 15px;
    width: 2px;
    background-color: var(--srms-border, #e2e8f0);
    border-radius: 1px;
}

.srms-vtimeline-step {
    position: relative;
    margin-bottom: 14px;
}

.srms-vtimeline-step:last-child {
    margin-bottom: 0;
}

.srms-vtimeline-step.step-active {
    background-color: rgba(37, 99, 235, 0.04);
    border-radius: 8px;
    padding: 6px 8px;
    margin-left: -8px;
}

.srms-vtimeline-step.step-pending {
    opacity: 0.65;
}

.srms-vtimeline-step .timeline-node {
    position: absolute;
    left: -32px;
    top: 0;
    width: 32px;
    height: 32px;
    min-width: 32px;
    font-size: 12px;
}

.srms-vtimeline-title {
    font-size: 15px !important;
    font-weight: 600 !important;
    color: var(--srms-text) !important;
    margin-bottom: 2px !important;
}

.srms-vtimeline-subtitle {
    font-size: 12px !important;
    color: #64748b !important;
    display: block !important;
}

.srms-vtimeline-meta {
    font-size: 12px !important;
    color: #64748b !important;
    line-height: 1.5 !important;
}

/* Compact Detail Badge Style */
.srms-detail-badge-sm {
    font-size: 11px !important;
    font-weight: 600 !important;
    padding: 4px 10px !important;
    border-radius: 9px !important;
}

/* Technical Specification Item (Label Top / Value Below Grid) */
.srms-detail-spec-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.srms-detail-spec-label {
    font-size: 11px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.8px !important;
    color: #64748b !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
}

.srms-detail-spec-value {
    font-size: 15px !important;
    font-weight: 600 !important;
    color: var(--srms-text) !important;
}

/* Compact Audit Log & Activity History Card */
.srms-audit-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.srms-audit-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 6px 10px;
    background-color: var(--srms-surface-muted, #f8fafc);
    border-radius: 8px;
    border: 1px solid var(--srms-border, #e2e8f0);
    font-size: 13px !important;
    transition: background-color 200ms ease;
}

.srms-audit-item:hover {
    background-color: rgba(37, 99, 235, 0.04);
}

.srms-audit-icon {
    width: 26px;
    height: 26px;
    min-width: 26px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
}

.srms-audit-content {
    flex: 1;
    min-width: 0;
}

/* ==========================================================================
   OFFICIAL REUSABLE SRMS ENTERPRISE ERP INDEX & DASHBOARD SYSTEM
   Reference Standard: Procurement Index | Stock Index | Operation Index | BOM Index
   ========================================================================== */

/* KPI Dashboard Cards */
.srms-kpi-link {
    text-decoration: none;
    color: inherit;
    display: block;
    cursor: pointer;
}

.srms-kpi-card {
    position: relative;
    background-color: var(--srms-surface);
    border: 1px solid var(--srms-border);
    border-radius: 14px;
    padding: 16px 18px;
    height: 100%;
    transition: transform 200ms ease-in-out, box-shadow 200ms ease-in-out, border-color 200ms ease-in-out;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.03);
}

.srms-kpi-card.active {
    border-color: var(--srms-primary, #2563eb) !important;
    background-color: rgba(37, 99, 235, 0.03) !important;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.08) !important;
}

.srms-kpi-card.active .srms-kpi-indicator-arrow {
    opacity: 1 !important;
    transform: translateX(0) !important;
}

.srms-kpi-indicator-arrow {
    position: absolute;
    top: 14px;
    right: 14px;
    color: #94a3b8;
    opacity: 0;
    transition: opacity 200ms ease-in-out, transform 200ms ease-in-out;
}

.srms-kpi-link:hover .srms-kpi-card {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
    border-color: var(--srms-primary, #2563eb) !important;
}

.srms-kpi-link:hover .srms-kpi-indicator-arrow {
    opacity: 1;
    transform: translateX(2px);
}

.srms-kpi-link:hover .srms-kpi-icon {
    transform: scale(1.05);
}

.srms-kpi-icon {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 200ms ease-in-out;
}

.srms-kpi-icon svg {
    width: 20px;
    height: 20px;
}

.srms-kpi-number {
    font-size: 28px !important;
    font-weight: 700 !important;
    color: var(--srms-text) !important;
    line-height: 1 !important;
    margin-bottom: 2px !important;
}

[data-theme="dark"] .srms-kpi-number {
    color: #f8fafc !important;
}

.srms-kpi-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #64748b;
    display: block;
    margin-bottom: 3px;
}

.srms-kpi-sub {
    font-size: 12px;
    color: #64748b;
    display: block;
}

/* Filter bar container spacing */
.srms-filter-bar-container {
    margin-bottom: 24px !important;
}

.srms-filter-input-group {
    height: 42px !important;
}

.srms-filter-input-group input,
.srms-filter-input-group select,
.srms-filter-select,
.srms-filter-btn {
    height: 42px !important;
    border-color: #cbd5e1 !important;
    font-size: 13.5px !important;
}

[data-theme="dark"] .srms-filter-input-group input,
[data-theme="dark"] .srms-filter-input-group select,
[data-theme="dark"] .srms-filter-select {
    border-color: var(--srms-border) !important;
}

.srms-filter-input-group input:focus,
.srms-filter-select:focus {
    border-color: var(--srms-primary, #2563eb) !important;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15) !important;
}

/* Shared filter search control */
.srms-search-control {
    display: flex !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 44px !important;
    align-items: center !important;
    overflow: hidden !important;
    border: 1px solid var(--srms-border) !important;
    border-radius: 10px !important;
    background: var(--srms-surface) !important;
    box-shadow: none !important;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.srms-search-control:focus-within {
    border-color: var(--srms-primary, #2563eb) !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .14) !important;
}

.srms-search-control .srms-search-icon.srms-search-icon {
    position: static !important;
    inset: auto !important;
    display: flex !important;
    width: 52px !important;
    min-width: 52px !important;
    height: 100% !important;
    flex: 0 0 52px !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
    border: 0 !important;
    border-right: 1px solid var(--srms-border) !important;
    border-radius: 0 !important;
    background: color-mix(in srgb, var(--srms-muted) 7%, transparent) !important;
    color: var(--srms-muted) !important;
    pointer-events: none;
}

.srms-search-control .srms-search-icon.srms-search-icon > i,
.srms-search-control .srms-search-icon.srms-search-icon > svg {
    position: static !important;
    display: block !important;
    margin: 0 !important;
    transform: none !important;
}

.srms-search-control .srms-search-input.srms-search-input {
    flex: 1 1 auto !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 14px !important;
    border: 0 !important;
    border-radius: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    color: var(--srms-text) !important;
    font: inherit;
    line-height: normal !important;
    box-shadow: none !important;
    box-sizing: border-box;
}

.srms-search-control .srms-search-input.srms-search-input::placeholder {
    color: var(--srms-muted) !important;
    opacity: .82;
}

[data-theme="dark"] .srms-search-control {
    border-color: var(--srms-border) !important;
    background: var(--srms-surface) !important;
}

/* ERP Table Hover, Padding & Accent Borders */
.srms-erp-table th {
    padding: 10px 12px !important;
    font-size: 12.5px !important;
    font-weight: 600 !important;
    color: #64748b !important;
    border-bottom: 2px solid var(--srms-border) !important;
}

.srms-erp-table td {
    padding: 10px 12px !important;
    border-bottom: 1px solid var(--srms-border) !important;
}

.srms-erp-table tbody tr {
    transition: background-color 180ms ease !important;
    border-left: 4px solid transparent;
}

.srms-erp-table tbody tr:hover {
    background-color: rgba(37, 99, 235, 0.04) !important;
}

.srms-erp-table tbody tr:last-child td {
    border-bottom: none !important;
}

/* Row Priority Accent Borders */
.srms-row-accent-danger {
    border-left: 4px solid var(--srms-danger, #dc2626) !important;
}

.srms-row-accent-warning {
    border-left: 4px solid var(--srms-warning, #f59e0b) !important;
}

/* Detay Button Style */
.srms-btn-detail {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12.5px !important;
    font-weight: 600 !important;
    padding: 5px 12px !important;
    border-radius: 8px !important;
    transition: all 200ms ease !important;
}

.srms-btn-detail:hover {
    background-color: var(--srms-primary, #2563eb) !important;
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.2) !important;
}

.srms-btn-detail svg {
    transition: transform 200ms ease;
}

.srms-btn-detail:hover svg {
    transform: translateX(2px);
}

/* Status & Priority Badge Standardization */
.srms-detail-badge-sm {
    font-size: 11px !important;
    font-weight: 600 !important;
    padding: 4px 10px !important;
    border-radius: 9px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    height: 22px !important;
    line-height: 1 !important;
}

.srms-detail-badge-sm svg {
    width: 12px !important;
    height: 12px !important;
    stroke-width: 2.2 !important;
}

/* Stock Management Tab Button Styles */
#stockManagementTabs .nav-link {
    background-color: var(--srms-surface, #ffffff);
    color: var(--srms-primary, #2563eb) !important;
    border: 1px solid var(--srms-border, #e2e8f0);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 650;
    transition: all 0.2s ease-in-out;
}

#stockManagementTabs .nav-link svg {
    stroke: var(--srms-primary, #2563eb);
    transition: stroke 0.2s ease-in-out;
}

#stockManagementTabs .nav-link:hover:not(.active) {
    background-color: rgba(37, 99, 235, 0.06);
    color: var(--srms-primary, #1d4ed8) !important;
}

#stockManagementTabs .nav-link.active {
    background-color: #2563eb !important;
    color: #ffffff !important;
    border-color: #2563eb !important;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}

#stockManagementTabs .nav-link.active svg {
    stroke: #ffffff !important;
}

/* Dark mode overrides for tabs */
[data-theme="dark"] #stockManagementTabs .nav-link {
    background-color: var(--srms-surface, #1e293b);
    border-color: var(--srms-border, #334155);
}

[data-theme="dark"] #stockManagementTabs .nav-link:hover:not(.active) {
    background-color: rgba(37, 99, 235, 0.15);
}

/* Standardized ERP Status Badge */
.srms-status-badge-erp {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    height: 30px !important;
    padding: 0 12px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    border-radius: 999px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
}

.srms-status-badge-erp svg {
    width: 14px !important;
    height: 14px !important;
    stroke-width: 2.2 !important;
}

/* Green (Safe) badge */
.srms-status-badge-erp.srms-badge-safe {
    background-color: rgba(16, 185, 129, 0.1) !important;
    color: #10b981 !important;
}

/* Yellow (Critical) badge */
.srms-status-badge-erp.srms-badge-critical {
    background-color: rgba(245, 158, 11, 0.1) !important;
    color: #f59e0b !important;
}

/* Red (Out of Stock / Danger) badge */
.srms-status-badge-erp.srms-badge-danger {
    background-color: rgba(239, 68, 68, 0.1) !important;
    color: #ef4444 !important;
}

/* Gray (Passive) badge */
.srms-status-badge-erp.srms-badge-passive {
    background-color: rgba(100, 116, 139, 0.1) !important;
    color: #64748b !important;
}

/* Fixed KPI Alignment rules to ensure exact equality */
.srms-kpi-card {
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
    padding: 16px 18px !important;
    min-height: 94px !important;
}

.srms-kpi-icon {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    border-radius: 12px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
}

.srms-kpi-number {
    font-size: 26px !important;
    font-weight: 700 !important;
    line-height: 1.1 !important;
}

.srms-kpi-label {
    font-size: 11px !important;
    line-height: 1.2 !important;
}

.srms-kpi-sub {
    font-size: 12px !important;
    line-height: 1.3 !important;
}

/* Equal-size stock status badge */
.srms-stock-status-badge {
    min-width: 116px !important;
    height: 30px !important;
    padding: 0 12px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    border-radius: 999px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    white-space: nowrap !important;
    line-height: 1 !important;
}

.srms-stock-status-badge svg {
    width: 14px !important;
    height: 14px !important;
    stroke-width: 2.2 !important;
    flex-shrink: 0 !important;
}

.srms-stock-status-badge.srms-badge-safe {
    background-color: rgba(16, 185, 129, 0.1) !important;
    color: #10b981 !important;
}

.srms-stock-status-badge.srms-badge-critical {
    background-color: rgba(245, 158, 11, 0.1) !important;
    color: #f59e0b !important;
}

.srms-stock-status-badge.srms-badge-danger {
    background-color: rgba(239, 68, 68, 0.1) !important;
    color: #ef4444 !important;
}

.srms-stock-status-badge.srms-badge-passive {
    background-color: rgba(100, 116, 139, 0.1) !important;
    color: #64748b !important;
}

/* Key-Value row styling for ERP detail/edit info cards */
.srms-info-kv-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
}

.srms-info-kv-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 12px 0 !important;
    border-bottom: 1px solid var(--srms-border, #e2e8f0) !important;
}

.srms-info-kv-row:last-child {
    border-bottom: none !important;
}

.srms-info-kv-label {
    font-size: 12px !important;
    color: #64748b !important;
}

.srms-info-kv-value {
    font-size: 13px !important;
    font-weight: 600 !important;
    text-align: right !important;
    color: var(--srms-text, #0f172a) !important;
}

/* Dark mode compatibility for Key-Value list */
[data-theme="dark"] .srms-info-kv-label {
    color: #94a3b8 !important;
}

[data-theme="dark"] .srms-info-kv-value {
    color: #f8fafc !important;
}

/* Page spacing updates */
.srms-edit-page-container {
    margin-top: 16px !important;
}

/* ERP Form and Detail card padding & font sizes */
.srms-erp-card-p18 {
    padding: 18px !important;
}

.srms-erp-title-fs17 {
    font-size: 17px !important;
}

.srms-erp-desc-fs12 {
    font-size: 12.5px !important;
}

/* Color themes for KPI cards */
.srms-kpi-card.kpi-blue {
    border-left: 3px solid #2563eb !important;
    background-color: rgba(37, 99, 235, 0.04) !important;
}
.srms-kpi-card.kpi-blue .srms-kpi-icon {
    background-color: rgba(37, 99, 235, 0.1) !important;
    color: #2563eb !important;
}
.srms-kpi-card.kpi-blue .srms-kpi-label {
    color: #2563eb !important;
}

.srms-kpi-card.kpi-green {
    border-left: 3px solid #10b981 !important;
    background-color: rgba(16, 185, 129, 0.04) !important;
}
.srms-kpi-card.kpi-green .srms-kpi-icon {
    background-color: rgba(16, 185, 129, 0.1) !important;
    color: #10b981 !important;
}
.srms-kpi-card.kpi-green .srms-kpi-label {
    color: #10b981 !important;
}

.srms-kpi-card.kpi-purple {
    border-left: 3px solid #9333ea !important;
    background-color: rgba(147, 51, 234, 0.04) !important;
}
.srms-kpi-card.kpi-purple .srms-kpi-icon {
    background-color: rgba(147, 51, 234, 0.1) !important;
    color: #9333ea !important;
}
.srms-kpi-card.kpi-purple .srms-kpi-label {
    color: #9333ea !important;
}

.srms-kpi-card.kpi-red {
    border-left: 3px solid #ef4444 !important;
    background-color: rgba(239, 68, 68, 0.04) !important;
}
.srms-kpi-card.kpi-red .srms-kpi-icon {
    background-color: rgba(239, 68, 68, 0.1) !important;
    color: #ef4444 !important;
}
.srms-kpi-card.kpi-red .srms-kpi-label {
    color: #ef4444 !important;
}
.srms-kpi-card.kpi-red .srms-kpi-number {
    color: #ef4444 !important;
}
.srms-kpi-card.kpi-red .srms-kpi-sub {
    color: rgba(239, 68, 68, 0.75) !important;
}

/* Dashboard Table Polishing Styles */
.dashboard-table {
    border-collapse: collapse !important;
    width: 100%;
}

.dashboard-table th {
    padding: 12px 14px !important;
    vertical-align: middle !important;
    background-color: #f8fafc !important;
    color: #64748b !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    letter-spacing: 0.8px !important;
    text-transform: uppercase !important;
    border-bottom: 2px solid var(--srms-border) !important;
}

.dashboard-table td {
    padding: 12px 14px !important;
    vertical-align: middle !important;
    border-bottom: none !important;
}

.dashboard-table tbody tr {
    border-bottom: 1px solid var(--srms-border) !important;
    transition: background-color 180ms ease !important;
}

.dashboard-table tbody tr:hover {
    background-color: rgba(37, 99, 235, 0.04) !important;
}

.dashboard-table tbody tr:last-child {
    border-bottom: none !important;
}

/* Secondary row and text hierarchy */
.dashboard-primary-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--srms-primary);
}

.dashboard-secondary-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 4px;
    font-size: 12px;
    color: var(--srms-muted);
}

/* Title group on card header */
.dashboard-card-title-group {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    line-height: 1;
}

.dashboard-card-title-group h2,
.dashboard-card-title-group h3 {
    margin: 0;
    line-height: 1.2;
}

.dashboard-card-title-group svg {
    width: 18px;
    height: 18px;
    display: block;
    flex: 0 0 18px;
    margin: 0;
    transform: translateY(-1px);
}

/* Compact priority badges for dashboard list */
.dashboard-priority-badge {
    height: 24px;
    padding: 0 9px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

/* Dashboard Modern Stock List Styles */
.dashboard-stock-list {
    display: flex;
    flex-direction: column;
}

.dashboard-stock-row {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 130px 130px 130px 86px;
    align-items: center;
    column-gap: 18px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--srms-border);
    transition: background-color 180ms ease;
}

.dashboard-stock-row:hover {
    background-color: rgba(37, 99, 235, 0.025);
}

.dashboard-stock-row:last-child {
    border-bottom: none;
}

.dashboard-stock-material {
    display: flex;
    flex-direction: column;
}

.dashboard-stock-name {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--srms-text);
}

.dashboard-stock-meta {
    font-size: 12px;
    color: #64748b;
    margin-top: 3px;
}

.dashboard-stock-value {
    display: flex;
    flex-direction: column;
}

.dashboard-stock-label {
    font-size: 10.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #64748b;
    margin-bottom: 2px;
}

.dashboard-stock-value strong {
    font-size: 14px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.dashboard-stock-value small {
    font-size: 12px;
    font-weight: 400;
    color: #64748b;
}

.dashboard-stock-status {
    display: flex;
    align-items: center;
    justify-content: center;
}

.dashboard-stock-action {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

/* Tablet Media Query (max-width: 991px) */
@media (max-width: 991px) {
    .dashboard-stock-row {
        grid-template-columns: 1fr 110px 110px;
        row-gap: 12px;
    }
    .dashboard-stock-status {
        grid-column: 2;
        justify-content: flex-start;
    }
    .dashboard-stock-action {
        grid-column: 3;
    }
}

/* Mobile Media Query (max-width: 576px) */
@media (max-width: 576px) {
    .dashboard-stock-row {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 14px;
    }
    .dashboard-stock-value {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    .dashboard-stock-value .dashboard-stock-label {
        margin-bottom: 0;
    }
    .dashboard-stock-status {
        margin-top: 4px;
        width: 100%;
    }
    .dashboard-stock-status .srms-stock-status-badge {
        width: 100%;
        min-width: 100%;
    }
    .dashboard-stock-action {
        width: 100%;
    }
    .dashboard-stock-action a {
        width: 100%;
        text-align: center;
    }
}

/* BOM Table Actions Row layout */
.bom-row-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: nowrap;
}

.bom-row-actions form {
    margin: 0;
    display: inline-flex;
}

.bom-row-actions .srms-btn {
    width: 80px !important;
    height: 32px !important;
    padding: 0 !important;
    font-size: 13px !important;
    border-radius: 8px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* BOM Robot Hero Layout */
.bom-hero-card {
    padding: 12px 16px !important;
}

.bom-hero-left {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bom-hero-header-box {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.bom-hero-icon-wrapper {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 10px;
    background-color: rgba(37, 99, 235, 0.08);
    color: var(--srms-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.bom-hero-icon-wrapper svg {
    width: 22px;
    height: 22px;
}

.bom-hero-title-area {
    display: flex;
    flex-direction: column;
}

.bom-hero-title {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--srms-text);
    margin: 0;
}

.bom-hero-desc {
    font-size: 13px;
    color: #8892a0;
    margin: 0;
    line-height: 1.45;
}

.bom-hero-right {
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: center;
}

@media (min-width: 992px) {
    .bom-hero-right {
        border-left: 1px solid var(--srms-border);
        padding-left: 20px !important;
    }
}

.bom-summary-mini-card {
    height: 58px;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid var(--srms-border);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    transition: transform 180ms ease, box-shadow 180ms ease;
    background-color: var(--srms-surface);
}

.bom-summary-mini-card:hover {
    transform: translateY(-1.5px);
    box-shadow: 0 3px 8px rgba(15, 23, 42, 0.03);
}

.bom-summary-mini-card-left {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.bom-summary-mini-card-label {
    font-size: 10.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #64748b;
}

.bom-summary-mini-card-val {
    font-size: 15px;
    font-weight: 700;
    color: var(--srms-text);
    margin-top: 1px;
}

.bom-summary-mini-card-val small {
    font-size: 11.5px;
    font-weight: 500;
    color: #64748b;
    margin-left: 2px;
}

.bom-summary-mini-card-icon {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* BOM table spacing adjustments */
.bom-page .dashboard-table th {
    padding: 6px 12px !important;
    font-size: 11px !important;
}

.bom-page .dashboard-table td {
    padding: 6px 12px !important;
    vertical-align: middle !important;
}

.bom-page .dashboard-table tbody tr:hover {
    background-color: rgba(37, 99, 235, 0.025) !important;
}

/* Farm Management module layout & table polishing */
.farm-avatar {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
}

.farm-name {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--srms-text);
    line-height: 1.2;
}

.farm-code {
    font-size: 12px;
    color: #8892a0;
    margin-top: 2px;
    display: block;
    line-height: 1;
}

.farm-contact-name {
    font-weight: 600;
    color: var(--srms-text);
    display: block;
    line-height: 1.2;
}

.farm-contact-phone {
    font-size: 12px;
    color: #8892a0;
    display: block;
    margin-top: 3px;
    line-height: 1;
}

.text-placeholder {
    color: #8892a0;
    font-size: 12.5px;
}

.srms-status-badge {
    font-size: 11px;
    padding: 6px 12px;
    min-width: 80px;
    border-radius: 999px;
    display: inline-block;
}

.farm-page .dashboard-table th {
    padding: 10px 14px !important;
    vertical-align: middle !important;
    font-weight: 600;
    color: #64748b;
}

.farm-page .dashboard-table td {
    padding: 10px 14px !important;
    vertical-align: middle !important;
}

.farm-page .dashboard-table tbody tr:hover {
    background-color: rgba(37, 99, 235, 0.025) !important;
}

.farm-actions-col {
    min-width: 270px;
    white-space: nowrap;
    text-align: right;
}

.farm-row-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: nowrap;
}

.farm-row-actions form {
    display: inline-flex;
    margin: 0;
}

.farm-page .dashboard-table td .farm-action-btn {
    width: 80px !important;
    height: 34px !important;
    padding: 0 12px !important;
    font-size: 12.5px !important;
    border-radius: 9px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.farm-page .dashboard-table td .farm-status-toggle-btn {
    height: 34px !important;
    padding: 0 12px !important;
    font-size: 12.5px !important;
    border-radius: 9px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Supplier create/edit forms share the compact Farm form geometry. */
.supplier-form-page{width:100%;max-width:1000px;margin:0 auto;color:var(--srms-text)}
.supplier-form-card{overflow:hidden;border:1px solid var(--srms-border);border-radius:16px;background:var(--srms-surface);box-shadow:var(--srms-shadow-sm)}
.supplier-form-header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px 22px;border-bottom:1px solid var(--srms-border)}
.supplier-form-title{margin:0;color:var(--srms-text);font-size:18px;font-weight:750}
.supplier-form-back{min-height:40px;display:inline-flex;align-items:center;gap:7px;border-radius:10px;white-space:nowrap}
.supplier-form-body{padding:22px}
.supplier-form-grid{--bs-gutter-x:16px;--bs-gutter-y:16px}
.supplier-form-page .form-label{margin-bottom:6px;color:var(--srms-text-secondary);font-size:13px;font-weight:700}
.supplier-form-page :is(.form-control,.form-select){min-height:44px;border-color:var(--srms-border-strong);border-radius:11px;background:var(--srms-surface);color:var(--srms-text);font-size:14px}
.supplier-form-page :is(.form-control,.form-select):focus{border-color:var(--srms-info);box-shadow:0 0 0 3px color-mix(in srgb,var(--srms-info) 17%,transparent)}
.supplier-form-page textarea.form-control{height:86px;min-height:86px;padding-top:11px;resize:vertical}
.supplier-form-page .form-check{display:flex;align-items:center;min-height:42px;padding:9px 12px 9px 38px;border:1px solid var(--srms-border);border-radius:11px;background:var(--srms-surface-soft)}
.supplier-form-page .form-check-input{margin-top:0}
.supplier-form-page .form-check-label{color:var(--srms-text-secondary);font-size:13px;font-weight:650}
.supplier-form-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:18px;padding-top:16px;border-top:1px solid var(--srms-border)}
.supplier-form-actions .btn{min-height:42px;padding-inline:17px;border-radius:10px;font-weight:700}
html[data-theme="dark"] .supplier-form-card{background:var(--srms-surface);border-color:var(--srms-border);box-shadow:0 10px 28px rgba(2,6,23,.24)}
html[data-theme="dark"] .supplier-form-page :is(.form-control,.form-select){color-scheme:dark;background:var(--srms-surface-soft);border-color:var(--srms-border-strong)}
@media(max-width:767.98px){.supplier-form-header{align-items:flex-start;padding:16px}.supplier-form-body{padding:16px}.supplier-form-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.supplier-form-actions .btn{width:100%}}
@media(max-width:420px){.supplier-form-header{flex-direction:column}.supplier-form-back{width:100%;justify-content:center}}

/* ==========================================================================
   BOM Production Material Planning UI Modernization Styles
   ========================================================================== */
.material-plan-method-card {
    border-radius: 16px !important;
    background-color: var(--srms-surface) !important;
    border: 1px solid var(--srms-border) !important;
    box-shadow: var(--srms-shadow-sm) !important;
}

.material-plan-toolbar {
    padding: 12px 18px !important;
    background-color: var(--srms-surface-muted) !important;
    border: 1px solid var(--srms-border) !important;
    border-radius: 12px !important;
}

.material-plan-summary {
    font-size: 13px !important;
    font-weight: 500 !important;
    color: var(--srms-text-secondary) !important;
}

.material-plan-edit-modal .modal-header {
    background-color: var(--srms-surface-muted) !important;
}

.material-plan-edit-modal .modal-body {
    background-color: var(--srms-surface) !important;
}

#materialPlanTable {
    border-collapse: collapse !important;
}

#materialPlanTable th {
    position: sticky !important;
    top: 0 !important;
    z-index: 10 !important;
    background-color: var(--srms-surface-muted) !important;
}

#materialPlanTable td {
    padding: 8px 12px !important;
    height: 48px !important;
}

.bom-model-selector-compact {
    padding: 10px 16px !important;
    border-radius: 12px !important;
    background-color: var(--srms-surface) !important;
    border: 1px solid var(--srms-border) !important;
    box-shadow: var(--srms-shadow-sm) !important;
}

.material-plan-material-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.material-plan-material-image {
    width: 36px;
    height: 36px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid rgba(229, 231, 235, 0.8);
}

.material-plan-material-placeholder {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    border: 1px solid rgba(229, 231, 235, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f3f4f6 !important;
    color: var(--srms-muted);
    font-size: 15px !important;
}

#materialPlanTable tbody tr {
    transition: background-color 0.15s ease-in-out, transform 0.1s ease;
}

#materialPlanTable tbody tr:hover {
    background-color: rgba(79, 70, 229, 0.04) !important;
}

#materialPlanTable th, #materialPlanTable td {
    padding-top: 6px !important;
    padding-bottom: 6px !important;
}

.btn-edit-plan {
    background-color: rgba(79, 70, 229, 0.08) !important;
    color: #4f46e5 !important;
    border: none !important;
    padding: 6px 14px !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
    font-size: 12px !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-edit-plan:hover {
    background-color: #4f46e5 !important;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.2) !important;
}

.btn-edit-plan svg {
    width: 13px !important;
    height: 13px !important;
    transition: transform 0.2s ease;
}

.btn-edit-plan:hover svg {
    transform: rotate(45deg);
}

.btn-submit-production-order {
    background: linear-gradient(135deg, #4f46e5, #6366f1) !important;
    color: #ffffff !important;
    border: none !important;
    padding: 10px 28px !important;
    font-size: 13.5px !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.25) !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.btn-submit-production-order:hover {
    background: linear-gradient(135deg, #4338ca, #4f46e5) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(79, 70, 229, 0.4) !important;
}

.btn-submit-production-order svg {
    width: 18px !important;
    height: 18px !important;
}

.material-plan-action-bar {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Planning KPI Cards styling */
.planning-kpi-card {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    padding: 16px 18px !important;
    min-height: 104px !important;
    border-radius: 8px !important;
    position: relative !important;
    transition: all 0.25s ease-in-out !important;
}

.planning-kpi-card .planning-kpi-label {
    font-size: 13px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: normal !important;
    margin-bottom: 2px !important;
    line-height: 1.2 !important;
}

.planning-kpi-card .planning-kpi-desc {
    font-size: 11.5px !important;
    color: #6b7280 !important;
    line-height: 1.3 !important;
    margin-bottom: 6px !important;
    display: block !important;
}

.planning-kpi-card .planning-kpi-number {
    font-size: 34px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    margin: 0 !important;
}

.planning-kpi-card .planning-kpi-icon-decor {
    position: absolute !important;
    bottom: 10px !important;
    left: 14px !important;
    font-size: 22px !important;
    opacity: 0.75 !important;
    pointer-events: none !important;
}

/* Production Order Hero Area */
.production-order-hero {
    background-color: var(--srms-surface) !important;
    border-radius: 12px !important;
    border: 1px solid var(--srms-border) !important;
    padding: 20px 24px !important;
}

/* Production Status Flow (Horizontal Timeline) */
.production-order-status-flow {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    position: relative !important;
    margin: 20px 0 !important;
    padding: 0 10px !important;
}

.production-order-status-flow::before {
    content: '' !important;
    position: absolute !important;
    top: 15px !important;
    left: 20px !important;
    right: 20px !important;
    height: 3px !important;
    background-color: rgba(229, 231, 235, 0.8) !important;
    z-index: 1 !important;
}

.status-flow-step {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    position: relative !important;
    z-index: 2 !important;
    flex: 1 !important;
}

.status-flow-circle {
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    background-color: #ffffff !important;
    border: 3px solid #e5e7eb !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    color: #9ca3af !important;
    transition: all 0.25s ease-in-out !important;
}

.status-flow-step.completed .status-flow-circle {
    border-color: #10b981 !important;
    background-color: #10b981 !important;
    color: #ffffff !important;
}

.status-flow-step.active .status-flow-circle {
    border-color: #4f46e5 !important;
    background-color: #ffffff !important;
    color: #4f46e5 !important;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.15) !important;
}

.status-flow-label {
    margin-top: 6px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    color: #6b7280 !important;
    text-align: center !important;
}

.status-flow-step.completed .status-flow-label {
    color: #10b981 !important;
}

.status-flow-step.active .status-flow-label {
    color: #4f46e5 !important;
}

/* Production Metric Card */
.production-order-metric-card {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    padding: 14px 16px !important;
    min-height: 104px !important;
    border-radius: 8px !important;
    position: relative !important;
    transition: all 0.25s ease-in-out !important;
}

.production-order-metric-card .metric-label {
    font-size: 12px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    margin-bottom: 2px !important;
    line-height: 1.2 !important;
}

.production-order-metric-card .metric-desc {
    font-size: 11px !important;
    color: #6b7280 !important;
    line-height: 1.3 !important;
    margin-bottom: 4px !important;
    display: block !important;
}

.production-order-metric-card .metric-number {
    font-size: 30px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    margin: 0 !important;
}

.production-order-metric-card .metric-icon-decor {
    position: absolute !important;
    bottom: 8px !important;
    left: 12px !important;
    font-size: 20px !important;
    opacity: 0.75 !important;
    pointer-events: none !important;
}

/* Production Readiness / Completeness Card */
.production-readiness-card {
    background-color: var(--srms-surface) !important;
    border-radius: 12px !important;
    border: 1px solid var(--srms-border) !important;
    padding: 20px !important;
}

/* Production Unit Cards */
.production-unit-card {
    border-radius: 10px !important;
    border: 1px solid rgba(229, 231, 235, 0.8) !important;
    background-color: #f9fafb !important;
    padding: 12px 16px !important;
    transition: all 0.2s ease !important;
}
.production-unit-card:hover {
    background-color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05) !important;
    border-color: rgba(79, 70, 229, 0.2) !important;
}

/* Procurement Summary Grid */
.production-procurement-summary {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)) !important;
    gap: 12px !important;
    margin-bottom: 20px !important;
}

.procurement-summary-item {
    background-color: #f9fafb !important;
    border: 1px solid rgba(229, 231, 235, 0.8) !important;
    border-radius: 8px !important;
    padding: 10px 14px !important;
    text-align: center !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
}
.procurement-summary-item .summary-num {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: var(--srms-text) !important;
}
.procurement-summary-item .summary-label {
    font-size: 11px !important;
    color: #6b7280 !important;
    margin-top: 2px !important;
    font-weight: 500 !important;
}

/* Material Toolbar */
.production-material-toolbar {
    background-color: #f9fafb !important;
    border: 1px solid rgba(229, 231, 235, 0.8) !important;
    border-radius: 10px !important;
    padding: 12px 16px !important;
    margin-bottom: 16px !important;
}

/* Sticky Header Table style */
.sticky-header-table {
    position: relative !important;
}
.sticky-header-table thead th {
    position: sticky !important;
    top: 0 !important;
    background-color: #ffffff !important;
    z-index: 10 !important;
    box-shadow: inset 0 -2px 0 var(--srms-border) !important;
}

@media (min-width: 768px) {
    .border-end-md {
        border-right: 1px solid var(--srms-border) !important;
    }
}

/* Sticky First Column Table style */
.sticky-first-column-table {
    position: relative !important;
}
.sticky-first-column-table th:first-child,
.sticky-first-column-table td:first-child {
    position: sticky !important;
    left: 0 !important;
    background-color: #ffffff !important;
    z-index: 5 !important;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.05) !important;
}
.sticky-first-column-table tr:hover td:first-child {
    background-color: #f9fafb !important;
}

/* Mobile app shell: final cascade authority for shared layout geometry. */
@media (max-width: 767.98px) {
    html,
    body,
    .srms-app,
    .srms-main,
    .srms-content {
        width: 100%;
        max-width: none;
        min-width: 0;
    }

    html,
    body {
        overflow-x: clip;
    }

    body { margin-bottom: 0; }
    .srms-app,
    .srms-main { min-height: 100dvh; }

    .srms-main {
        margin-left: 0 !important;
    }

    .srms-content {
        padding: 12px !important;
        overflow: visible;
    }

    .srms-sidebar {
        width: min(82vw, 300px) !important;
        max-width: 300px;
        transform: translate3d(-100%, 0, 0);
        box-shadow: none;
        overscroll-behavior: contain;
    }

    .srms-sidebar.open {
        transform: translate3d(0, 0, 0);
        box-shadow: 12px 0 36px rgba(15, 23, 42, 0.24);
    }

    .srms-sidebar-overlay {
        display: block;
        visibility: hidden;
        opacity: 0;
        background-color: rgba(15, 23, 42, 0.56);
        transition: opacity 180ms ease, visibility 180ms ease;
    }

    .srms-sidebar-overlay.show {
        visibility: visible;
        opacity: 1;
    }

    .srms-topbar.srms-page-hero {
        min-height: 64px !important;
        padding: 8px 12px !important;
        gap: 8px;
    }

    .srms-topbar.srms-page-hero .srms-topbar-left {
        flex: 1 1 auto;
        min-width: 0;
        gap: 8px;
    }

    .srms-mobile-menu-button {
        display: inline-grid;
        place-items: center;
        flex: 0 0 42px;
        width: 42px;
        height: 42px;
        margin: 0 !important;
    }

    .srms-topbar.srms-page-hero .srms-page-header-container {
        flex: 1 1 auto;
        min-width: 0;
        gap: 8px !important;
    }

    .srms-topbar.srms-page-hero .srms-page-header-icon-box {
        width: 36px !important;
        height: 36px !important;
        flex: 0 0 36px !important;
    }

    .srms-topbar.srms-page-hero .srms-page-header-text { min-width: 0; }

    .srms-topbar.srms-page-hero .srms-breadcrumb-nav,
    .srms-topbar.srms-page-hero .srms-page-subtitle {
        display: none !important;
    }

    .srms-topbar.srms-page-hero .srms-page-title {
        display: block;
        max-width: 100%;
        overflow: hidden;
        font-size: clamp(18px, 4.8vw, 21px) !important;
        line-height: 1.2 !important;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .srms-topbar-actions {
        flex: 0 0 auto;
        gap: 8px !important;
    }

    .srms-theme-toggle-button,
    .srms-bell-btn,
    .srms-user-avatar {
        width: 42px !important;
        height: 42px !important;
        min-width: 42px !important;
    }

    .srms-user-info { display: none !important; }

    .srms-bell-badge,
    .srms-notification-count {
        border-color: var(--srms-surface) !important;
    }

    .srms-footer { padding: 16px 12px; }
}

@media (max-width: 419.98px) {
    .srms-topbar.srms-page-hero {
        gap: 6px;
        padding-inline: 10px !important;
    }

    .srms-topbar.srms-page-hero .srms-page-header-icon-box {
        display: none !important;
    }

    .srms-topbar-actions { gap: 6px !important; }

    .srms-theme-toggle-button,
    .srms-bell-btn,
    .srms-user-avatar {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
    }
}

[data-theme="dark"] .srms-sidebar-overlay {
    background-color: rgba(2, 6, 23, 0.72);
}

/* ==========================================================================
   SRMS DESIGN SYSTEM CONVERGENCE
   Dashboard is the visual reference; this layer only normalizes presentation.
   ========================================================================== */
:root {
    --srms-control-height: 44px;
    --srms-control-radius: var(--srms-radius-md);
    --srms-card-radius: var(--srms-radius-lg);
    --srms-card-padding: 16px;
    --srms-section-gap: 16px;
    --srms-font-page: 25px;
    --srms-font-section: 17px;
    --srms-font-card: 15px;
    --srms-font-body: 13.5px;
    --srms-font-label: 13px;
    --srms-font-caption: 12px;
    --srms-table-head-bg: color-mix(in srgb, var(--srms-surface-muted) 82%, var(--srms-surface));
    --srms-hover-surface: color-mix(in srgb, var(--srms-primary-soft) 38%, var(--srms-surface));
}

/* Repeated in-page headings remain secondary to the shared compact page hero. */
.srms-content :where(.page-action-header, .rm-header, .farm-page-header, .supplier-header, .usr-header) {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: var(--srms-section-gap) !important;
}

.srms-content :where(.page-action-header, .rm-header, .farm-page-header, .supplier-header, .usr-header)
    :where(h1, h2, .rm-title, .farm-page-title, .supplier-title, .usr-title) {
    margin: 0;
    color: var(--srms-text);
    font-size: var(--srms-font-section) !important;
    font-weight: 750 !important;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

.srms-content :where(.page-action-header, .rm-header, .farm-page-header, .supplier-header, .usr-header)
    :where(p, .rm-subtitle, .farm-page-subtitle, .supplier-subtitle, .usr-subtitle) {
    margin: 3px 0 0 !important;
    color: var(--srms-text-secondary) !important;
    font-size: var(--srms-font-caption) !important;
    line-height: 1.4;
}

/* Card and panel elevation */
.srms-content :where(
    .srms-card,
    .planning-card,
    .cost-filter,
    .cost-table-card,
    .operations-filter-card,
    .operations-board,
    .rm-list-card,
    .farm-list-card,
    .supplier-list-card,
    .usr-list-card,
    .category-card
) {
    border: 1px solid var(--srms-border) !important;
    border-radius: var(--srms-card-radius) !important;
    background: var(--srms-surface) !important;
    box-shadow: var(--srms-shadow-sm) !important;
}

.srms-content :where(.srms-card, .planning-card, .cost-filter, .operations-filter-card) {
    color: var(--srms-text);
}

/* KPI families share geometry while retaining their existing semantic tones. */
.srms-content :where(
    .srms-kpi-card,
    .operations-kpi-card,
    .cost-kpi,
    .rm-kpi,
    .farm-kpi,
    .supplier-kpi,
    .usr-kpi,
    .planning-kpi-card
) {
    min-height: 108px;
    border: 1px solid var(--srms-border);
    border-radius: var(--srms-card-radius) !important;
    box-shadow: var(--srms-shadow-sm) !important;
}

.srms-content :where(
    .srms-kpi-icon,
    .srms-kpi-icon-box,
    .cost-kpi-icon,
    .rm-kpi-icon,
    .farm-kpi-icon,
    .supplier-kpi-icon,
    .usr-kpi-icon
) {
    border-radius: var(--srms-control-radius) !important;
}

.srms-content :where(
    .srms-kpi-label,
    .srms-kpi-title,
    .cost-kpi-label,
    .rm-kpi-label,
    .farm-kpi-label,
    .supplier-kpi-label,
    .usr-kpi-label,
    .planning-kpi-label
) {
    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 1.25;
}

.srms-content :where(
    .srms-kpi-number,
    .srms-kpi-value,
    .cost-kpi-value,
    .rm-kpi-value,
    .farm-kpi-number,
    .supplier-kpi-value,
    .usr-kpi-value,
    .planning-kpi-number
) {
    color: var(--srms-text);
    font-size: clamp(28px, 2.4vw, 34px) !important;
    font-weight: 800 !important;
    line-height: 1.05;
}

/* Form controls */
.srms-content :where(.form-control, .form-select, .planning-control) {
    min-height: var(--srms-control-height);
    border-color: var(--srms-border-strong);
    border-radius: var(--srms-control-radius) !important;
    background-color: var(--srms-surface);
    color: var(--srms-text);
    font-size: var(--srms-font-body);
    box-shadow: none;
}

.srms-content textarea.form-control {
    min-height: 72px;
    resize: vertical;
}

.srms-content :where(.form-control, .form-select, .planning-control):focus {
    border-color: var(--srms-primary);
    box-shadow: 0 0 0 3px var(--srms-primary-soft);
}

.srms-content :where(.form-control, .form-select)::placeholder {
    color: var(--srms-muted);
    opacity: 0.78;
}

.srms-content :where(.form-label, .planning-label, label:not(.form-check-label)) {
    color: var(--srms-text-secondary);
    font-size: var(--srms-font-label);
    font-weight: 650;
}

.srms-content :where(.form-control, .form-select):disabled,
.srms-content :where(.form-control, .form-select)[readonly] {
    background-color: var(--srms-surface-muted);
    color: var(--srms-text-secondary);
    opacity: 1;
}

/* Buttons */
.srms-content :where(.btn, .srms-btn):not(.btn-close):not(.btn-sm) {
    min-height: 42px;
    border-radius: var(--srms-control-radius) !important;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
}

.srms-content :where(.btn-primary, .srms-btn-primary) {
    border-color: var(--srms-primary) !important;
    background: var(--srms-primary) !important;
    color: #fff !important;
}

.srms-content :where(.btn-success, .srms-btn-success) {
    border-color: var(--srms-success) !important;
    background: var(--srms-success) !important;
    color: #fff !important;
}

.srms-content :where(.btn-warning, .srms-btn-warning) {
    border-color: var(--srms-warning) !important;
    background: var(--srms-warning) !important;
    color: #fff !important;
}

.srms-content :where(.btn-danger, .srms-btn-danger) {
    border-color: var(--srms-danger) !important;
    background: var(--srms-danger) !important;
    color: #fff !important;
}

.srms-content :where(.btn, .srms-btn):focus-visible,
.srms-content :where(a, button, input, select, textarea):focus-visible {
    outline: 3px solid color-mix(in srgb, var(--srms-primary) 32%, transparent);
    outline-offset: 2px;
}

/* Tables */
.srms-content .table {
    margin-bottom: 0;
    color: var(--srms-text);
    font-size: var(--srms-font-body);
    border-color: var(--srms-border);
}

.srms-content .table > thead > tr > th {
    padding: 11px 12px;
    border-color: var(--srms-border);
    background: var(--srms-table-head-bg) !important;
    color: var(--srms-text-secondary);
    font-size: 11px;
    font-weight: 750;
    line-height: 1.25;
    letter-spacing: 0.045em;
    text-transform: uppercase;
    vertical-align: middle;
}

.srms-content .table > tbody > tr > td {
    padding: 11px 12px;
    border-color: var(--srms-border);
    background-color: transparent;
    vertical-align: middle;
}

.srms-content .table > tbody > tr:hover > td {
    background-color: var(--srms-hover-surface);
}

/* Badges, tabs and compact empty states */
.srms-content :where(.badge, .srms-status-badge, [class*="status-badge"]) {
    min-height: 26px;
    padding: 5px 9px;
    border-radius: 999px !important;
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.2;
}

.srms-content .nav-pills {
    gap: 8px !important;
}

.srms-content .nav-pills .nav-link {
    min-height: 42px;
    border-radius: var(--srms-control-radius) !important;
    color: var(--srms-text-secondary);
    font-size: 13px;
    font-weight: 700;
}

.srms-content .nav-pills .nav-link.active {
    background: var(--srms-primary);
    color: #fff;
    box-shadow: var(--srms-shadow-sm);
}

.srms-content :where(
    .planning-empty-state,
    .category-empty-state,
    .operations-empty-state,
    .empty-state,
    [class$="-empty-state"]
) {
    min-height: 180px;
    padding: 28px 18px !important;
    color: var(--srms-text-secondary);
}

/* Dark surfaces use the same layered token system as Dashboard. */
[data-theme="dark"] .srms-content :where(.form-control, .form-select, .planning-control) {
    border-color: var(--srms-border-strong);
    background-color: var(--srms-surface-muted);
    color: var(--srms-text);
    color-scheme: dark;
}

[data-theme="dark"] .srms-content :where(.form-control, .form-select)::placeholder {
    color: #94a3b8;
}

[data-theme="dark"] .srms-content .table > tbody > tr > td,
[data-theme="dark"] .srms-content .sticky-header-table thead th,
[data-theme="dark"] .srms-content .sticky-first-column-table :where(th, td):first-child {
    border-color: var(--srms-border);
    background-color: var(--srms-surface) !important;
    color: var(--srms-text);
}

[data-theme="dark"] .srms-content .table > tbody > tr:hover > td,
[data-theme="dark"] .srms-content .sticky-first-column-table tr:hover td:first-child {
    background-color: var(--srms-hover-surface) !important;
}

[data-theme="dark"] .srms-content .text-muted {
    color: #aebdd0 !important;
}

/* Global KPI standard: geometry follows the Stock Management KPI family. */
.srms-content .srms-kpi-card {
    min-height: 96px !important;
    padding: 14px 16px !important;
    border-width: 1px !important;
    border-radius: var(--srms-radius-lg) !important;
    box-shadow: var(--srms-shadow-sm) !important;
}

.srms-content .srms-kpi-card .srms-kpi-icon {
    flex: 0 0 42px !important;
    width: 42px !important;
    height: 42px !important;
    border-radius: 10px !important;
    font-size: 17px !important;
}

.srms-content .srms-kpi-card .srms-kpi-label {
    color: var(--srms-text-secondary) !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
}

.srms-content .srms-kpi-card .srms-kpi-number {
    margin: 4px 0 3px !important;
    color: var(--srms-text) !important;
    font-size: clamp(27px, 2.3vw, 32px) !important;
    font-weight: 800 !important;
    line-height: 1 !important;
}

.srms-content .srms-kpi-card .srms-kpi-sub {
    color: var(--srms-muted) !important;
    font-size: 12.5px !important;
    line-height: 1.25 !important;
}

html .srms-content .srms-global-kpi.srms-global-kpi {
    --global-kpi-accent: var(--srms-info);
    --global-kpi-soft: var(--srms-info-soft);
    display: grid !important;
    grid-template-columns: 42px minmax(0, 1fr) !important;
    gap: 12px !important;
    align-items: center !important;
    min-height: 96px !important;
    padding: 14px 16px !important;
    overflow: hidden;
    color: var(--srms-text) !important;
    text-decoration: none !important;
    border: 1px solid color-mix(in srgb, var(--global-kpi-accent) 24%, var(--srms-border)) !important;
    border-left: 4px solid var(--global-kpi-accent) !important;
    border-radius: var(--srms-radius-lg) !important;
    background: color-mix(in srgb, var(--global-kpi-soft) 62%, var(--srms-surface)) !important;
    box-shadow: var(--srms-shadow-sm) !important;
}

html .srms-content .srms-global-kpi.kpi-primary { --global-kpi-accent: var(--srms-info); --global-kpi-soft: var(--srms-info-soft); }
html .srms-content .srms-global-kpi.kpi-success { --global-kpi-accent: var(--srms-success); --global-kpi-soft: var(--srms-success-soft); }
html .srms-content .srms-global-kpi.kpi-warning { --global-kpi-accent: var(--srms-warning); --global-kpi-soft: var(--srms-warning-soft); }
html .srms-content .srms-global-kpi.kpi-danger { --global-kpi-accent: var(--srms-danger); --global-kpi-soft: var(--srms-danger-soft); }
html .srms-content .srms-global-kpi.kpi-purple { --global-kpi-accent: var(--srms-purple); --global-kpi-soft: var(--srms-purple-soft); }
html .srms-content .srms-global-kpi.kpi-cyan { --global-kpi-accent: var(--srms-cyan); --global-kpi-soft: var(--srms-cyan-soft); }

html .srms-content .srms-global-kpi.srms-global-kpi :is(.srms-global-kpi-icon, .dashboard-kpi-icon, .cost-kpi-icon, .srms-kpi-icon, .material-kpi-icon) {
    display: grid !important;
    place-items: center !important;
    width: 42px !important;
    height: 42px !important;
    color: var(--global-kpi-accent) !important;
    border-radius: 10px !important;
    background: color-mix(in srgb, var(--global-kpi-accent) 14%, var(--srms-surface)) !important;
    font-size: 17px !important;
}

html .srms-content .srms-global-kpi.srms-global-kpi :is(.srms-global-kpi-title, .dashboard-kpi-title, .cost-kpi-copy > span, .srms-kpi-label, .material-kpi-label) {
    display: block;
    margin: 0 !important;
    color: var(--srms-text-secondary) !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
}

html .srms-content .srms-global-kpi.srms-global-kpi :is(.srms-global-kpi-value, .dashboard-kpi-value, .cost-kpi-copy > strong, .srms-kpi-number, .material-kpi-value) {
    display: block;
    margin: 4px 0 3px !important;
    color: var(--srms-text) !important;
    font-size: clamp(27px, 2.3vw, 32px) !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    letter-spacing: -0.025em;
}

html .srms-content .srms-global-kpi.srms-global-kpi :is(.srms-global-kpi-desc, .dashboard-kpi-sub, .cost-kpi-desc, .srms-kpi-sub) {
    display: block;
    margin: 0 !important;
    color: var(--srms-muted) !important;
    font-size: 12.5px !important;
    line-height: 1.25 !important;
}

html .srms-content .srms-global-kpi.srms-global-kpi:hover {
    color: var(--srms-text) !important;
    transform: translateY(-1px);
    box-shadow: var(--srms-shadow-md) !important;
}

html[data-theme="dark"] .srms-content .srms-global-kpi.srms-global-kpi {
    color: var(--srms-text) !important;
    border-color: color-mix(in srgb, var(--global-kpi-accent) 28%, var(--srms-border)) !important;
    border-left-color: var(--global-kpi-accent) !important;
    background: linear-gradient(
        120deg,
        color-mix(in srgb, var(--global-kpi-accent) 14%, var(--srms-surface)),
        var(--srms-surface) 72%
    ) !important;
    box-shadow: var(--srms-shadow-sm) !important;
}

html[data-theme="dark"] .srms-content .srms-global-kpi.srms-global-kpi :is(
    .srms-global-kpi-title,
    .dashboard-kpi-title,
    .cost-kpi-copy > span,
    .srms-kpi-label,
    .material-kpi-label,
    .srms-global-kpi-desc,
    .dashboard-kpi-sub,
    .cost-kpi-desc,
    .srms-kpi-sub
) {
    color: var(--srms-text-secondary) !important;
}

/* Theme-switch-safe table text. Every transition resolves from SRMS tokens. */
html[data-theme="light"] .srms-content :where(table, .table),
html[data-theme="light"] .srms-content :where(table, .table) > :not(caption) > * > * {
    border-color: var(--srms-border) !important;
    color: var(--srms-text) !important;
}

html[data-theme="light"] .srms-content :where(table, .table) thead th {
    background-color: var(--srms-table-head-bg) !important;
    color: var(--srms-text-secondary) !important;
}

html[data-theme="light"] .srms-content :where(table, .table) :where(.text-muted, .text-secondary, .cost-secondary) {
    color: var(--srms-muted) !important;
}

html[data-theme="light"] .srms-content :where(table, .table) :where(strong, .cost-name, .cost-value) {
    color: var(--srms-text) !important;
}

html[data-theme="dark"] .srms-content :where(table, .table),
html[data-theme="dark"] .srms-content :where(table, .table) > :not(caption) > * > * {
    border-color: var(--srms-border) !important;
    color: var(--srms-text) !important;
}

html[data-theme="dark"] .srms-content :where(table, .table) thead th {
    background-color: var(--srms-table-head-bg) !important;
    color: var(--srms-text-secondary) !important;
}

@media (max-width: 991.98px) {
    :root {
        --srms-card-padding: 14px;
        --srms-section-gap: 14px;
    }

    .srms-content :where(
        .srms-kpi-card,
        .operations-kpi-card,
        .cost-kpi,
        .rm-kpi,
        .farm-kpi,
        .supplier-kpi,
        .usr-kpi,
        .planning-kpi-card
    ) {
        min-height: 100px;
    }
}

@media (max-width: 767.98px) {
    .srms-content :where(.page-action-header, .rm-header, .farm-page-header, .supplier-header, .usr-header) {
        align-items: stretch;
        flex-direction: column;
        gap: 10px;
    }

    .srms-content :where(.page-action-header, .rm-header, .farm-page-header, .supplier-header, .usr-header)
        :where(.btn, .srms-btn) {
        width: 100%;
    }

    .srms-content :where(.btn, .srms-btn):not(.btn-close):not(.btn-sm) {
        min-height: 44px;
    }

    .srms-content .table-responsive {
        max-width: 100%;
        border-radius: var(--srms-control-radius);
    }
}

/* Shared report layout: summary first, compact filters second, report content last. */
.srms-content .srms-report-layout {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.srms-content .srms-report-layout > * { order: 3; }
.srms-content .srms-report-layout > .alert { order: 0; }
.srms-content .srms-report-layout > .srms-report-kpi-row { order: 1; margin-bottom: 16px; }
.srms-content .srms-report-layout > .srms-report-filter { order: 2; margin-bottom: 18px; }

.srms-content .srms-report-filter {
    border: 1px solid var(--srms-border, #dbe4ef) !important;
    border-radius: var(--srms-card-radius, 16px) !important;
    background: var(--srms-surface-muted, #f8fafc) !important;
    box-shadow: var(--srms-shadow-sm, 0 5px 17px rgba(15, 23, 42, .05)) !important;
}

.srms-content .srms-report-filter > .card-body { padding: 14px 16px !important; }

.srms-content .srms-report-filter .srms-report-filter-grid {
    display: grid !important;
    grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
    gap: 10px 12px !important;
    align-items: end !important;
    width: 100%;
}

.srms-content .srms-report-filter .srms-report-filter-grid > * {
    min-width: 0;
}

.srms-content .srms-report-filter .srms-report-filter-grid > :not(.srms-report-filter-actions) {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

@media (min-width: 1200px) {
    .srms-content .report-filter--stock > :nth-child(-n+6) { grid-column: span 3 !important; }
    .srms-content .report-filter--stock > :nth-child(7) { grid-column: span 4 !important; }
    .srms-content .report-filter--stock > .srms-report-filter-actions { grid-column: span 2 !important; }

    .srms-content .report-filter--production > :nth-child(-n+5) { grid-column: span 3 !important; }
    .srms-content .report-filter--production > :nth-child(6) { grid-column: span 6 !important; }
    .srms-content .report-filter--production > .srms-report-filter-actions { grid-column: span 3 !important; }

    .srms-content .report-filter--installation > :nth-child(-n+4) { grid-column: span 3 !important; }
    .srms-content .report-filter--installation > :nth-child(5),
    .srms-content .report-filter--installation > :nth-child(6) { grid-column: span 2 !important; }
    .srms-content .report-filter--installation > :nth-child(7) { grid-column: span 5 !important; }
    .srms-content .report-filter--installation > .srms-report-filter-actions { grid-column: span 3 !important; }

    .srms-content .report-filter--critical > :nth-child(1),
    .srms-content .report-filter--critical > :nth-child(2) { grid-column: span 2 !important; }
    .srms-content .report-filter--critical > :nth-child(3) { grid-column: span 5 !important; }
    .srms-content .report-filter--critical > .srms-report-filter-actions { grid-column: span 3 !important; }
}

.srms-content .srms-report-filter .form-label {
    display: block;
    margin: 0 !important;
    color: var(--srms-text-muted, #64748b) !important;
    font-size: 11.5px !important;
    font-weight: 650 !important;
    line-height: 1.2;
    letter-spacing: 0 !important;
    text-transform: none !important;
}

.srms-content .srms-report-filter :is(.form-control, .form-select, .srms-report-search) {
    width: 100%;
    min-width: 0;
    height: 44px !important;
    min-height: 44px !important;
    border-radius: 10px !important;
}

.srms-content .srms-report-filter .srms-report-search {
    position: relative;
    display: flex !important;
    align-items: stretch !important;
    width: 100%;
    min-width: 0;
    height: var(--srms-control-height, 44px) !important;
    min-height: var(--srms-control-height, 44px) !important;
    overflow: hidden;
}

.srms-content .srms-report-filter .srms-report-search > span {
    position: static !important;
    inset: auto !important;
    z-index: auto;
    display: flex !important;
    width: 52px !important;
    min-width: 52px !important;
    height: 100% !important;
    flex: 0 0 52px !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
    border-right: 1px solid var(--srms-border) !important;
    pointer-events: none;
}

.srms-content .srms-report-filter .srms-report-search .form-control {
    display: block !important;
    flex: 1 1 auto !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 15px !important;
    border: 0 !important;
    border-radius: 0 !important;
    line-height: normal !important;
    box-shadow: none !important;
    box-sizing: border-box;
}

.srms-content .srms-report-filter .srms-report-filter-actions {
    display: flex !important;
    align-items: flex-end !important;
    justify-content: flex-end !important;
    gap: 8px !important;
    align-self: end;
    height: 44px;
    min-width: 0;
}

.srms-content .srms-report-filter .srms-report-filter-actions > a { order: 1; }
.srms-content .srms-report-filter .srms-report-filter-actions > button { order: 2; }

.srms-content .srms-report-filter .srms-report-filter-actions .btn {
    width: auto !important;
    min-width: 104px;
    min-height: 44px !important;
    margin: 0 !important;
    padding: 7px 13px !important;
    border-radius: 10px !important;
    font-size: 13px !important;
    white-space: nowrap;
}

html[data-theme="dark"] .srms-content .srms-report-filter {
    background: var(--srms-surface-muted, #172033) !important;
    border-color: var(--srms-border, rgba(148, 163, 184, .22)) !important;
}

@media (max-width: 1199.98px) {
    .srms-content .srms-report-filter .srms-report-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .srms-content .srms-report-filter .srms-report-filter-grid > :not(.srms-report-filter-actions) {
        grid-column: span 1 !important;
    }

    .srms-content .srms-report-filter .srms-report-filter-actions {
        grid-column: 1 / -1 !important;
    }
}

@media (max-width: 767.98px) {
    .srms-content .srms-report-filter > .card-body { padding: 12px !important; }
    .srms-content .srms-report-filter .srms-report-filter-grid { grid-template-columns: minmax(0, 1fr) !important; }
    .srms-content .srms-report-filter .srms-report-filter-grid > :not(.srms-report-filter-actions),
    .srms-content .srms-report-filter .srms-report-filter-actions { grid-column: auto !important; }
    .srms-content .srms-report-filter .srms-report-filter-actions { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .srms-content .srms-report-filter .srms-report-filter-actions .btn { width: 100% !important; min-width: 0; }
}

@media (max-width: 359.98px) {
    .srms-content .srms-report-filter .srms-report-filter-actions { grid-template-columns: minmax(0, 1fr); }
}

@media print {
    .srms-content .srms-report-layout > .d-print-block { order: 0; }
}

/* Shared responsive safety layer. Desktop geometry remains owned by page components. */
@media (max-width: 991.98px) {
    html,
    body,
    .srms-app,
    .srms-main,
    .srms-content {
        max-width: 100%;
        min-width: 0;
    }

    html,
    body {
        overflow-x: clip;
    }

    .srms-main {
        margin-left: 0 !important;
    }

    .srms-sidebar {
        width: min(82vw, 300px) !important;
        max-width: 300px;
        transform: translate3d(-100%, 0, 0);
    }

    .srms-sidebar.open {
        transform: translate3d(0, 0, 0);
    }

    .srms-content > *,
    .srms-content .row,
    .srms-content .row > *,
    .srms-content form {
        min-width: 0;
        max-width: 100%;
    }

    .srms-content :where(
        .table-responsive,
        [class*="table-wrap"],
        [class*="table-shell"],
        [class*="table-scroll"]
    ) {
        max-width: 100%;
        overflow-x: auto;
        overscroll-behavior-inline: contain;
        -webkit-overflow-scrolling: touch;
    }

    .modal-dialog {
        width: auto;
        max-width: calc(100vw - 24px);
        margin: 12px auto;
    }

    .modal-content {
        max-height: calc(100dvh - 24px);
        overflow: hidden;
    }

    .modal-body {
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    .dropdown-menu {
        max-width: calc(100vw - 24px);
    }
}

@media (max-width: 767.98px) {
    .srms-content :where(
        .form-grid,
        .edit-form-grid,
        .create-form-grid,
        [class$="-form-grid"],
        .filter-grid,
        [class$="-filter-grid"]
    ) {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .srms-content :where(
        .form-grid,
        .edit-form-grid,
        .create-form-grid,
        [class$="-form-grid"],
        .filter-grid,
        [class$="-filter-grid"]
    ) > * {
        grid-column: auto !important;
        min-width: 0;
        width: 100%;
    }

    .srms-content :where(
        .form-actions,
        .filter-actions,
        [class$="-filter-actions"],
        .modal-footer
    ) {
        flex-wrap: wrap;
        min-width: 0;
    }

    .srms-content :where(
        .filter-actions,
        [class$="-filter-actions"]
    ) {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
        gap: 8px;
    }

    .srms-content :where(
        .filter-actions,
        [class$="-filter-actions"]
    ) :where(.btn, .srms-btn) {
        width: 100%;
        min-width: 0;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding-left: 16px;
        padding-right: 16px;
    }
}

@media (max-width: 419.98px) {
    .srms-content :where(
        .filter-actions,
        [class$="-filter-actions"]
    ) {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Mobile KPI strip: native swipe, compact cards and scroll position feedback. */
.srms-kpi-pagination {
    display: none;
}

@media (max-width: 767.98px) {
    .srms-content .srms-kpi-scroll.srms-kpi-scroll {
        display: flex !important;
        flex-wrap: nowrap !important;
        grid-template-columns: none !important;
        align-items: stretch;
        width: 100%;
        max-width: 100%;
        margin-right: 0 !important;
        margin-left: 0 !important;
        padding: 2px 0 8px !important;
        gap: 12px !important;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-padding-inline: 0;
        scroll-snap-type: x mandatory;
        overscroll-behavior-inline: contain;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .srms-content .srms-kpi-scroll.srms-kpi-scroll::-webkit-scrollbar {
        display: none;
    }

    .srms-content .srms-kpi-scroll.srms-kpi-scroll > [class] {
        flex: 0 0 min(86vw, 330px) !important;
        width: min(86vw, 330px) !important;
        max-width: min(86vw, 330px) !important;
        min-width: 0;
        margin: 0 !important;
        padding-right: 0 !important;
        padding-left: 0 !important;
        scroll-snap-align: start;
        scroll-snap-stop: always;
    }

    .srms-content .srms-kpi-scroll.srms-kpi-scroll > [class] > :is(
        .srms-kpi-card,
        .srms-global-kpi,
        .srms-kpi-link,
        .dashboard-kpi
    ),
    .srms-content .srms-kpi-scroll.srms-kpi-scroll > [class] > .srms-kpi-link > .srms-kpi-card {
        width: 100% !important;
        min-height: 92px !important;
    }

    .srms-content .srms-kpi-scroll :is(.srms-kpi-card, .srms-global-kpi, .dashboard-kpi) {
        min-height: 92px !important;
        padding: 12px 14px !important;
    }

    .srms-kpi-pagination {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 14px;
        margin: -2px 0 12px;
        gap: 6px;
    }

    .srms-kpi-pagination-dot {
        width: 7px;
        height: 7px;
        border-radius: 999px;
        background: var(--srms-border-strong);
        opacity: 0.72;
        transition: width 160ms ease, background-color 160ms ease, opacity 160ms ease;
    }

    .srms-kpi-pagination-dot.active {
        width: 22px;
        background: var(--srms-primary);
        opacity: 1;
    }
}
