/* ═══════════════════════════════════════════════════════════════
   Skywalk Global Asset Tracker — Theme
   Palette: Charcoal #1f2933 / Blue #2f80c9 / Orange #ff8a00
   ═══════════════════════════════════════════════════════════════ */

:root {
    --sg-charcoal: #1f2933;
    --sg-blue: #2f80c9;
    --sg-blue-hover: #2569a8;
    --sg-orange: #ff8a00;
    --sg-orange-hover: #e07a00;
    --sg-bg: #eef5fc;
    --sg-shell: #ffffff;
    --sg-sidebar: #f8fbff;
    --sg-card: #ffffff;
    --sg-text: #102a43;
    --sg-muted: #5f6f82;
    --sg-border: #d9e7f5;
    --sg-header-bg: #ffffff;
    --sg-header-border: #dce8f5;
    --sg-radius: 14px;
    --sg-radius-sm: 10px;
    --sg-radius-lg: 20px;
    --sg-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
    --sg-shadow-soft: 0 4px 16px rgba(15, 23, 42, 0.05);
}

html, body {
    font-family: "Inter", "Segoe UI", Arial, sans-serif;
    font-size: 14px;
    color: var(--sg-text);
    background: var(--sg-bg);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

button, input, select, textarea, .btn, table, th, td, h1, h2, h3, h4, h5, h6 {
    font-family: inherit;
}

/* Sidebar brand retains slightly different weight for logo cohesion */
.sidebar-brand-title {
    font-family: "Inter", "Segoe UI", Arial, sans-serif;
}

/* ═══════════════════════════════════════════════════════════════
   Layout — Sidebar + Top Bar + Content
   ═══════════════════════════════════════════════════════════════ */
.app-layout {
    display: flex;
    min-height: 100vh;
    background: var(--sg-bg);
}

.app-sidebar {
    width: 236px;
    height: 100vh;
    background: var(--sg-sidebar);
    border-right: 1px solid var(--sg-border);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    transition: width 0.22s ease;
    overflow-x: hidden;
    overflow-y: visible;
    flex-shrink: 0;
}

.app-main {
    flex: 1;
    margin-left: 236px;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    background: var(--sg-bg);
    transition: margin-left 0.22s ease;
    min-width: 0;
}

.app-header {
    height: 56px;
    background: var(--sg-header-bg);
    border-bottom: 1px solid var(--sg-header-border);
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 1.25rem;
    position: sticky;
    top: 0;
    z-index: 90;
    gap: 0;
    flex-shrink: 0;
}

.app-header-right {
    color: var(--sg-text);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.2px;
    margin-left: auto;  /* push user info to far right when no title shown */
}

.topbar-spacer {
    flex: 1 1 auto;
    min-width: 1rem;
}

.topbar-product-name {
    color: var(--sg-text);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.1px;
    white-space: nowrap;
}

/* ============================================================
   TOPBAR — USER INFO & LOGOUT
   ============================================================ */
.topbar-user {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-left: 0.85rem;
    padding-left: 0.85rem;
    border-left: 1px solid var(--sg-header-border);
}

.topbar-user-icon {
    color: var(--sg-muted);
    font-size: 1.15rem;
}

.topbar-user-name {
    color: var(--sg-text);
    font-size: 13px;
    font-weight: 500;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topbar-user-trigger {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 4px 8px;
    border-radius: var(--sg-radius-sm);
    transition: background 0.15s;
}

.topbar-user-trigger:hover {
    background: #eef4fd;
}

.topbar-caret {
    color: var(--sg-muted);
    font-size: 11px;
    transition: transform 0.2s;
}

.topbar-caret.open {
    transform: rotate(180deg);
}

.topbar-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 220px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    z-index: 1040;
    overflow: hidden;
}

.topbar-dropdown-header {
    padding: 12px 16px 10px;
    background: #f8fafc;
}

.topbar-dropdown-label {
    font-size: 11px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 2px;
}

.topbar-dropdown-email {
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    word-break: break-all;
}

.topbar-dropdown-divider {
    height: 1px;
    background: #e2e8f0;
}

.topbar-dropdown-signout {
    display: flex;
    align-items: center;
    width: 100%;
    background: none;
    border: none;
    padding: 10px 16px;
    font-size: 13px;
    color: var(--sg-text);
    cursor: pointer;
    text-align: left;
    transition: background 0.15s;
}

.topbar-dropdown-signout:hover {
    background: #f8f9fa;
}

/* ============================================================
   AUTH / LOGIN PAGE
   ============================================================ */
.auth-body {
    margin: 0;
    padding: 0;
    background: #f0f4f8;
    min-height: 100vh;
    font-family: Inter, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem 1rem;
}

.login-card {
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 8px 40px rgba(31, 41, 55, 0.08), 0 2px 8px rgba(31, 41, 55, 0.04);
    padding: 2.5rem 2.25rem 2rem;
    width: 100%;
    max-width: 420px;
}

.login-logo-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.login-logo {
    width: 64px;
    height: 64px;
    object-fit: contain;
    border-radius: 10px;
}

.login-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1f2933;
    text-align: center;
    margin-bottom: 0.2rem;
    letter-spacing: 0.1px;
}

.login-subtitle {
    font-size: 13px;
    color: #64748b;
    text-align: center;
    margin-bottom: 1.75rem;
    font-weight: 400;
}

.login-alert {
    font-size: 13px;
    padding: 0.6rem 0.9rem;
    margin-bottom: 1rem;
    border-radius: 8px;
}

.login-field {
    margin-bottom: 1rem;
}

.login-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.35rem;
}

.login-input {
    border-radius: 10px;
    border: 1px solid #d1d9e0;
    font-size: 14px;
    color: #1e293b;
    padding: 0.65rem 0.9rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

/* Placeholder should look like a hint, not typed text */
.login-input::placeholder {
    color: #94a3b8;
    opacity: 1;
}

/* Darker text for actual typed value */
.login-input:not(:placeholder-shown) {
    color: #1e293b;
}

.login-input:focus {
    border-color: #2f80c9;
    box-shadow: 0 0 0 4px rgba(47, 128, 201, 0.1);
    outline: none;
}

.login-validation {
    font-size: 12px;
    color: #dc3545;
    margin-top: 0.25rem;
    display: block;
}

.login-password-wrap {
    position: relative;
}

.login-password-input {
    padding-right: 2.6rem;
}

.login-eye-btn {
    position: absolute;
    top: 50%;
    right: 0.6rem;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: #9ca3af;
    font-size: 1rem;
    line-height: 1;
    display: flex;
    align-items: center;
}

.login-eye-btn:hover {
    color: #374151;
}

.login-check-row {
    display: flex;
    align-items: center;
    margin-bottom: 1.25rem;
    font-size: 13px;
    color: #374151;
}

.login-btn {
    width: 100%;
    background: #2f80c9;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    padding: 0.7rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
}

.login-btn:hover:not(:disabled) {
    background: #2569a8;
    box-shadow: 0 4px 12px rgba(47, 128, 201, 0.3);
}

.login-btn:active:not(:disabled) {
    transform: translateY(1px);
}

.login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.login-btn-microsoft {
    background: #fff;
    color: #3c4043;
    border: 1px solid #dadce0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 500;
    margin-bottom: 0;
}

.login-btn-microsoft:hover {
    background: #f8f9fa;
    border-color: #bdc1c6;
    color: #3c4043;
    box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}

.login-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1rem 0;
    color: #9ca3af;
    font-size: 0.8rem;
}

.login-divider::before,
.login-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

.login-local-note {
    font-size: 0.78rem;
    text-align: center;
    margin-top: 0.75rem;
    margin-bottom: 0;
}

/* Back navigation link — modern ghost style */
.sw-back-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    font-size: 13px;
    font-weight: 500;
    color: #4a5568;
    border: 1px solid #d1d9e0;
    border-radius: 6px;
    background: #f8fafc;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    white-space: nowrap;
}
.sw-back-link:hover {
    background: #edf2f7;
    border-color: #adb5bd;
    color: #1f2933;
    text-decoration: none;
}

/* Asset Code suggestion — Regenerate button */
.asset-code-regen-btn {
    border-color: #d1d9e0;
    color: #6b7a8d;
    padding: 0 8px;
}
.asset-code-regen-btn:hover {
    background: #f0f4f8;
    color: #2f80c9;
    border-color: #2f80c9;
}

.login-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e9edf2;
}

.app-content {
    flex: 1;
    padding: 1.35rem 2rem 2rem;
    width: 100%;
    min-height: 0;
}

.card,
.table-responsive,
.dropdown-menu {
    border-radius: var(--sg-radius);
    border-color: var(--sg-border);
    box-shadow: var(--sg-shadow);
}

.card-header,
.card-footer {
    border-color: var(--sg-border);
}

/* ── Hamburger button — hidden on desktop, shown on mobile ── */
.topbar-hamburger {
    display: none;          /* overridden to flex inside the media query */
    background: none;
    border: none;
    color: var(--sg-muted);
    font-size: 1.5rem;
    line-height: 1;
    padding: 4px 10px 4px 0;
    cursor: pointer;
    border-radius: 6px;
    flex-shrink: 0;
    transition: background 0.15s;
}
.topbar-hamburger:hover {
    background: #eef4fd;
}

/* ── Backdrop overlay — rendered by Blazor only when mobile sidebar is open ── */
.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.38);
    z-index: 199;
    cursor: pointer;
}

@media (max-width: 991.98px) {
    /* Sidebar: fixed overlay, hidden off-screen by default */
    .app-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        z-index: 200;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        box-shadow: none;
    }

    /* Slide in when .mobile-open is applied */
    .app-sidebar.mobile-open {
        transform: translateX(0);
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.25);
    }

    /* Main content takes full width — no margin offset */
    .app-main {
        margin-left: 0;
    }

    .app-content {
        padding: 1rem;
    }

    /* Show hamburger on narrow screens */
    .topbar-hamburger {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .topbar-product-name {
        font-size: 12px;
    }
}

@media (min-width: 992px) {
    /* Always hide hamburger on desktop */
    .topbar-hamburger {
        display: none !important;
    }
}

/* ═══════════════════════════════════════════════════════════════
   Sidebar — Logo / Brand
   ═══════════════════════════════════════════════════════════════ */
.sidebar-brand {
    height: 56px;
    padding: 0 1rem;
    background: var(--sg-sidebar);
    border-bottom: 1px solid var(--sg-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    gap: 0;
    min-width: 0;
    overflow: hidden;
}

.sidebar-brand-link {
    display: flex;
    align-items: center;
    text-decoration: none !important;
    gap: 0.55rem;
}

.sidebar-brand-link:hover {
    text-decoration: none !important;
    opacity: 0.9;
}

.sidebar-logo {
    max-height: 38px;
    max-width: 90px;
    width: auto;
    height: auto;
    object-fit: contain;
    flex-shrink: 0;
}

/* Square SG Logo for sidebar brand */
.sidebar-logo-square {
    width: 38px;
    height: 38px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 9px;
}

/* Full horizontal logo for expanded sidebar */
.sidebar-logo-full {
    max-width: 158px;
    max-height: 38px;
    width: auto;
    height: auto;
    object-fit: contain;
    flex-shrink: 0;
}

/* Collapsed mode: clickable logo button */
.sidebar-logo-collapsed-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    transition: background 0.15s;
}

.sidebar-logo-collapsed-btn:hover {
    background: #f1f5f9;
}

.sidebar-logo-collapsed-btn:focus {
    outline: 2px solid var(--sg-blue);
    outline-offset: 2px;
}

.sidebar-brand-title {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    gap: 0;
}

.brand-title-asset {
    font-size: 13px;
    font-weight: 700;
    color: var(--sg-orange);
    letter-spacing: 0.2px;
    line-height: 1.1;
}

.brand-title-tracker {
    font-size: 10px;
    font-weight: 600;
    color: var(--sg-blue);
    letter-spacing: 1px;
    text-transform: uppercase;
    line-height: 1.2;
}

/* ═══════════════════════════════════════════════════════════════
   Sidebar — Navigation
   ═══════════════════════════════════════════════════════════════ */
.navbar-toggler {
    appearance: none;
    cursor: pointer;
    width: 3.5rem;
    height: 2.5rem;
    position: absolute;
    top: 0.5rem;
    right: 1rem;
    border: 1px solid var(--sg-border);
    background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%2364748b' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") no-repeat center/1.75rem transparent;
}

.navbar-toggler:checked {
    background-color: #eaf3fb;
}

.nav-scrollable {
    display: none;
    overflow-y: auto;
}

.navbar-toggler:checked ~ .nav-scrollable {
    display: block;
}

/* ── Mobile drawer: always show nav-scrollable regardless of checkbox state ── */
.app-sidebar.mobile-open .nav-scrollable {
    display: flex !important;
    flex-direction: column;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
}

@media (min-width: 992px) {
    .navbar-toggler {
        display: none;
    }
    .nav-scrollable {
        display: flex !important;
        flex-direction: column;
        flex: 1;
        overflow-y: auto;
        overflow-x: hidden;
        min-height: 0;
    }
}

.sidebar-nav {
    padding: 0.25rem 0;
    list-style: none;
    margin: 0;
}

.nav-section-label {
    color: #64748b;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.9px;
    padding: 0.85rem 1.15rem 0.35rem;
    text-transform: uppercase;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-height: 38px;
    padding: 0.42rem 1.1rem;
    color: #1f2933;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none !important;
    border-left: 3px solid transparent;
    transition: color 0.15s, background 0.15s;
    margin: 1px 0;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar-link:hover {
    color: var(--sg-blue);
    background: #e8f3fd;
    border-left-color: var(--sg-blue);
    border-radius: 0 10px 10px 0;
    margin-right: 0.65rem;
    text-decoration: none !important;
}

/* Expanded sidebar active — softer pill style */
.sidebar-link.active {
    color: var(--sg-blue);
    background: #e8f3fd;
    border-left-color: var(--sg-blue);
    text-decoration: none !important;
    border-radius: 0 10px 10px 0;
    margin-right: 0.65rem;
    font-weight: 600;
}

.sidebar-icon {
    font-size: 17px;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}

.sidebar-link-text {
    transition: opacity 0.18s ease;
    overflow: hidden;
    white-space: nowrap;
}

/* ── Toggle button ── */
.sidebar-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border: 1px solid transparent;
    border-radius: 7px;
    background: transparent;
    color: var(--sg-muted);
    font-size: 12px;
    cursor: pointer;
    padding: 0;
    transition: background 0.14s, color 0.14s, border-color 0.14s;
    margin-left: auto;
}

.sidebar-toggle-btn:hover {
    background: #e8f3fd;
    color: var(--sg-blue);
    border-color: var(--sg-border);
}

/* ── Mobile drawer: override ALL collapsed-state rules so menu shows fully ──
   When the desktop was in collapsed mode and the user opens the mobile drawer,
   the parent .sidebar-collapsed class still applies. These overrides ensure
   the drawer always renders as fully expanded regardless of desktop state. ── */
.sidebar-collapsed .app-sidebar.mobile-open {
    width: 250px;
}
.sidebar-collapsed .app-sidebar.mobile-open .sidebar-brand {
    justify-content: space-between;
    padding: 0 1rem;
}
.sidebar-collapsed .app-sidebar.mobile-open .sidebar-brand-link {
    display: flex;
}
.sidebar-collapsed .app-sidebar.mobile-open .sidebar-toggle-btn {
    margin-left: auto;
}
.sidebar-collapsed .app-sidebar.mobile-open .nav-label-text {
    display: block;
}
.sidebar-collapsed .app-sidebar.mobile-open .sidebar-link {
    padding: 0.5rem 1.25rem;
    justify-content: flex-start;
    gap: 0.75rem;
    margin-right: 0;
    border-radius: 0 6px 6px 0;
    overflow: hidden;
}
.sidebar-collapsed .app-sidebar.mobile-open .sidebar-link.active {
    color: var(--sg-blue);
    background: #e8f3fd;
    border-left-color: var(--sg-blue);
    border-radius: 0 10px 10px 0;
    margin-right: 0.75rem;
}
.sidebar-collapsed .app-sidebar.mobile-open .sidebar-link-text {
    display: inline;
}
.sidebar-collapsed .app-sidebar.mobile-open .sidebar-icon {
    width: 20px;
    font-size: 17px;
}

/* ── Collapsed state ── */
.sidebar-collapsed .app-sidebar {
    width: 64px;
}

.sidebar-collapsed .app-main {
    margin-left: 64px;
    height: 100vh;
    overflow-y: auto;
}

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

.sidebar-collapsed .sidebar-brand-link {
    display: none;
}

.sidebar-collapsed .sidebar-toggle-btn {
    margin-left: 0;
}

.sidebar-collapsed .nav-label-text {
    display: none;
}

.sidebar-collapsed .sidebar-link {
    padding: 0.25rem 0;
    justify-content: center;
    gap: 0;
    margin-right: 0;
    border-radius: 0;
    overflow: hidden;
    background: transparent;
    border-left-color: transparent;
}

.sidebar-collapsed .sidebar-link:hover {
    background: transparent;
    border-left-color: transparent;
}

/* Collapsed sidebar active — icon-level rounded square, Freshservice style */
.sidebar-collapsed .sidebar-link.active {
    background: transparent;
    border-left-color: transparent;
    margin-right: 0;
}

.sidebar-collapsed .sidebar-link.active .sidebar-icon {
    background: #cfe5ff;
    color: var(--sg-blue);
}

/* Collapsed sidebar hover — rounded square, lighter than active */
.sidebar-collapsed .sidebar-link:hover .sidebar-icon {
    background: #e8f3fd;
    color: var(--sg-blue);
    box-shadow: 0 2px 8px rgba(47, 128, 201, 0.15);
}

.sidebar-collapsed .sidebar-link-text {
    display: none;
}

.sidebar-collapsed .sidebar-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    font-size: 19px;
    border-radius: 11px;
    transition: background 0.15s ease, box-shadow 0.15s ease;
}

.app-sidebar a {
    color: inherit;
    text-decoration: none !important;
}

/* Collapsed sidebar: hide scrollbar visually but keep scroll; prevent hover glitch near scrollbar */
.sidebar-collapsed .nav-scrollable {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.sidebar-collapsed .nav-scrollable::-webkit-scrollbar {
    display: none;
}


/* ═══════════════════════════════════════════════════════════════
   Error UI
   ═══════════════════════════════════════════════════════════════ */
#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* ═══════════════════════════════════════════════════════════════
   Links & Buttons
   ═══════════════════════════════════════════════════════════════ */
a, .btn-link {
    color: var(--sg-blue);
}

a:hover {
    color: var(--sg-blue-hover);
}

.btn-primary {
    color: #fff;
    background-color: var(--sg-blue);
    border-color: var(--sg-blue);
    border-radius: var(--sg-radius-sm);
}

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

.bg-purple {
    background-color: #6f42c1 !important;
    color: #fff !important;
}

/* ── Assignments page overflow actions menu ── */
.page-actions-menu {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    z-index: 1040;
    background: #ffffff;
    border: 1px solid var(--sg-border);
    border-radius: var(--sg-radius-sm);
    box-shadow: var(--sg-shadow-soft);
    min-width: 210px;
    padding: 4px 0;
}

.page-actions-item {
    display: flex;
    align-items: center;
    width: 100%;
    background: none;
    border: none;
    text-align: left;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--sg-text);
    cursor: pointer;
    transition: background 0.12s;
    white-space: nowrap;
}

.page-actions-item:hover {
    background: #f0f7ff;
    color: var(--sg-blue);
}

.btn-page-action {
    padding: 8px 18px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--sg-radius-sm);
    white-space: nowrap;
}

.btn-outline-primary {
    color: var(--sg-blue);
    border-color: var(--sg-blue);
    border-radius: var(--sg-radius-sm);
}

.btn-outline-primary:hover {
    background-color: var(--sg-blue);
    color: #fff;
}

.btn-warning {
    background-color: var(--sg-orange);
    border-color: var(--sg-orange);
    color: #fff;
}

.btn-warning:hover {
    background-color: var(--sg-orange-hover);
    border-color: var(--sg-orange-hover);
    color: #fff;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.15rem rgba(47, 128, 201, 0.3);
}

.btn {
    border-radius: var(--sg-radius-sm);
    font-weight: 500;
    font-size: 14px;
}

/* ═══════════════════════════════════════════════════════════════
   Page Titles
   ═══════════════════════════════════════════════════════════════ */
h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--sg-charcoal);
    margin-bottom: 0.25rem;
}

h1:focus { outline: none; }

h4 {
    font-size: 24px;
    font-weight: 700;
    color: var(--sg-charcoal);
}

.page-subtitle {
    color: var(--sg-muted);
    font-size: 14px;
    margin-bottom: 1.25rem;
}

/* ═══════════════════════════════════════════════════════════════
   Page Breadcrumb
   ═══════════════════════════════════════════════════════════════ */
.page-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
    font-size: 13px;
    margin-bottom: 0.5rem;
    color: var(--sg-muted);
}

.page-breadcrumb a {
    color: var(--sg-blue);
    text-decoration: none;
    font-weight: 500;
}

.page-breadcrumb a:hover {
    text-decoration: underline;
}

.page-breadcrumb-separator {
    color: var(--sg-muted);
    font-size: 13px;
    line-height: 1;
    user-select: none;
}

.page-breadcrumb-current {
    color: var(--sg-charcoal);
    font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════════
   Cards — General
   ═══════════════════════════════════════════════════════════════ */
.card {
    border: 1px solid var(--sg-border);
    border-radius: var(--sg-radius);
    box-shadow: var(--sg-shadow);
    background: var(--sg-card);
}

.card-body {
    padding: 1rem 1.25rem;
}

/* ═══════════════════════════════════════════════════════════════
   Dashboard — Premium Reduced-Color Palette
   Palette: navy #1f2933, blue #2f80c9, soft blue-gray #eef5fc,
            white #ffffff, border #d9e7f5
   ═══════════════════════════════════════════════════════════════ */

.dashboard-header {
    margin-bottom: 2rem;
}

.dashboard-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--sg-charcoal);
    margin-bottom: 0.25rem;
    letter-spacing: -0.01em;
}

.dashboard-subtitle {
    font-size: 14px;
    color: var(--sg-muted);
    margin-bottom: 0;
}

.dashboard-section {
    margin-bottom: 2rem;
}

.dash-section-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--sg-charcoal);
    margin-bottom: 0.75rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* Category cards — clean metric grid */
.dash-cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 14px;
    margin-bottom: 1.5rem;
}

.dash-cat-item {
    min-width: 0;
}

.dash-cat-card {
    background: var(--sg-card);
    border: 1px solid var(--sg-border);
    border-radius: var(--sg-radius-sm);
    box-shadow: var(--sg-shadow);
    padding: 1rem 0.5rem;
    text-align: center;
    min-height: 96px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
    cursor: pointer;
}

.dash-cat-card:hover {
    border-color: var(--sg-blue);
    box-shadow: 0 2px 10px rgba(47, 128, 201, 0.10);
    transform: translateY(-1px);
}

.dash-cat-primary {
    background: #f3f8fd;
    border: 1px solid #c8dff4;
    border-left: 4px solid var(--sg-blue);
    color: var(--sg-charcoal);
}

.dash-cat-primary .dash-cat-value {
    color: var(--sg-charcoal);
}

.dash-cat-primary .dash-cat-label {
    color: var(--sg-muted);
}

.dash-cat-active {
    border: 2px solid var(--sg-blue);
    background: #f0f8ff;
    box-shadow: 0 0 0 3px rgba(47, 128, 201, 0.12), 0 4px 12px rgba(47, 128, 201, 0.10);
}

.dash-cat-static {
    cursor: default;
}

.dash-cat-static:hover {
    border-color: var(--sg-border);
    box-shadow: var(--sg-shadow);
    transform: none;
}

.dash-cat-primary.dash-cat-static:hover {
    border-color: #c8dff4;
}

.dash-cat-value {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--sg-charcoal);
}

.dash-cat-label {
    font-size: 13px;
    color: var(--sg-muted);
    margin-top: 0.25rem;
}

/* Software & Subscriptions summary */
.dashboard-software-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 1.5rem;
}

.dashboard-software-card {
    background: var(--sg-card);
    border: 1px solid var(--sg-border);
    border-radius: var(--sg-radius-sm);
    box-shadow: var(--sg-shadow);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none !important;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
}

.dashboard-software-card:hover {
    border-color: var(--sg-blue);
    box-shadow: 0 2px 10px rgba(47, 128, 201, 0.10);
    transform: translateY(-1px);
}

.dashboard-software-card-static {
    cursor: default;
}

.dashboard-software-card-static:hover {
    border-color: var(--sg-border);
    box-shadow: var(--sg-shadow);
    transform: none;
}

.dashboard-software-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: var(--sg-bg);
    color: var(--sg-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.dashboard-software-value {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--sg-charcoal);
}

.dashboard-software-label {
    font-size: 13px;
    color: var(--sg-muted);
}

/* Location filter cards — same grid as Asset Summary */
.dash-loc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 14px;
    margin-bottom: 1.25rem;
}

.dash-loc-item {
    min-width: 0;
}

.dash-loc-card {
    background: var(--sg-card);
    border: 1px solid var(--sg-border);
    border-radius: var(--sg-radius-sm);
    box-shadow: var(--sg-shadow);
    padding: 0.75rem 0.5rem;
    text-align: center;
    min-height: 96px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
    cursor: pointer;
    user-select: none;
}

.dash-loc-card:hover {
    border-color: var(--sg-blue);
    box-shadow: 0 2px 10px rgba(47, 128, 201, 0.10);
    transform: translateY(-1px);
}

.dash-loc-active {
    border: 2px solid var(--sg-blue);
    background: #f0f8ff;
    box-shadow: 0 0 0 2px rgba(47, 128, 201, 0.10);
}

.dash-loc-name {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--sg-charcoal);
    white-space: nowrap;
}

.dash-loc-active .dash-loc-name {
    color: var(--sg-blue);
}

.dash-loc-count {
    font-size: 12px;
    color: var(--sg-muted);
    margin-top: 0.15rem;
}

/* Drill-down panel */
.dashboard-drill {
    border: 1px solid var(--sg-border);
    border-radius: var(--sg-radius);
    box-shadow: var(--sg-shadow-soft);
    overflow: hidden;
    margin-bottom: 2rem;
}

.dashboard-drill-header {
    background: var(--sg-bg);
    border-bottom: 1px solid var(--sg-border);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.dashboard-drill-title {
    font-weight: 700;
    color: var(--sg-charcoal);
    font-size: 0.95rem;
}

.dashboard-panel-close {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: none;
    background: transparent;
    color: var(--sg-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s;
}

.dashboard-panel-close:hover {
    background: rgba(47, 128, 201, 0.10);
    color: var(--sg-blue);
}

.dashboard-panel-close i {
    font-size: 1rem;
    line-height: 1;
}

.dashboard-drill-card {
    background: var(--sg-card);
    border: 1px solid var(--sg-border);
    border-radius: var(--sg-radius-sm);
    padding: 1rem;
    text-align: center;
    transition: border-color 0.15s, box-shadow 0.15s;
    cursor: pointer;
    height: 100%;
}

.dashboard-drill-card:hover {
    border-color: var(--sg-blue);
    box-shadow: 0 2px 8px rgba(47, 128, 201, 0.08);
}

.dashboard-summary-card {
    background: var(--sg-card);
    border: 1px solid var(--sg-border);
    border-radius: var(--sg-radius-sm);
    padding: 1rem;
    text-align: center;
    height: 100%;
}

.dashboard-sub-drill-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: flex-start;
}

.dashboard-sub-drill-card {
    width: 240px;
    min-height: 88px;
    text-align: left;
    background: var(--sg-card);
    border: 1px solid var(--sg-border);
    border-radius: var(--sg-radius-sm);
    padding: 1rem;
    transition: border-color 0.15s, box-shadow 0.15s;
    cursor: pointer;
    text-decoration: none;
    display: block;
}

.dashboard-sub-drill-card:hover {
    border-color: var(--sg-blue);
    box-shadow: 0 2px 8px rgba(47, 128, 201, 0.08);
}

.dashboard-drill-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--sg-charcoal);
    line-height: 1.2;
}

.dashboard-drill-value-muted {
    color: var(--sg-muted);
}

.dashboard-drill-label {
    font-size: 13px;
    color: var(--sg-muted);
    margin-top: 0.25rem;
}

.dashboard-drill-hint {
    font-size: 0.75rem;
    color: var(--sg-blue);
    margin-top: 0.25rem;
}

.dashboard-drill-text {
    font-size: 14px;
    color: var(--sg-muted);
}

.dashboard-drill-selected-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--sg-charcoal);
}

/* Alerts */
.dashboard-alerts {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.dashboard-alert {
    background: var(--sg-card);
    border: 1px solid var(--sg-border);
    border-radius: var(--sg-radius-sm);
    padding: 0.6rem 0.75rem;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: var(--sg-shadow);
}

.dashboard-alert-badge {
    background: var(--sg-charcoal);
    color: #ffffff;
    border-radius: 6px;
    padding: 0.2rem 0.5rem;
    font-weight: 600;
    font-size: 12px;
}

.dashboard-alert-text {
    color: var(--sg-muted);
}

.dashboard-alert-link {
    color: var(--sg-blue);
    font-weight: 500;
    text-decoration: none;
}

.dashboard-alert-link:hover {
    text-decoration: underline;
}

/* Quick navigation — pill buttons */
.dashboard-quicknav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.dashboard-quicknav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--sg-border);
    background: var(--sg-card);
    color: var(--sg-text);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none !important;
    box-shadow: var(--sg-shadow);
    transition: border-color 0.15s, color 0.15s, box-shadow 0.15s;
    white-space: nowrap;
}

.dashboard-quicknav-link i {
    color: var(--sg-blue);
    font-size: 1rem;
}

.dashboard-quicknav-link:hover {
    border-color: var(--sg-blue);
    color: var(--sg-blue);
    box-shadow: 0 2px 8px rgba(47, 128, 201, 0.10);
}

/* Large screen optimizations */
@media (min-width: 1600px) {
    .dash-cat-grid {
        grid-template-columns: repeat(7, minmax(0, 1fr));
        gap: 16px;
    }
    .dashboard-software-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 18px;
    }
    .dash-loc-grid {
        gap: 16px;
    }
}

@media (min-width: 1900px) {
    .dash-cat-grid {
        grid-template-columns: repeat(7, minmax(0, 1fr));
        gap: 18px;
    }
    .dash-loc-grid {
        gap: 18px;
    }
}

/* Responsive adjustments for smaller screens */
@media (max-width: 991px) {
    .dash-cat-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .dashboard-software-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
    .dash-loc-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
}

@media (max-width: 575px) {
    .dash-cat-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    .dash-cat-card {
        min-height: 80px;
        padding: 0.75rem 0.4rem;
    }
    .dash-cat-value {
        font-size: 22px;
    }
    .dashboard-software-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
    .dashboard-software-card {
        padding: 1rem;
    }
    .dashboard-software-value {
        font-size: 20px;
    }
    .dash-loc-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    .dashboard-quicknav-link {
        padding: 0.5rem 0.875rem;
        font-size: 12px;
    }
}


/* ═══════════════════════════════════════════════════════════════
   Category Filter Cards (Assets page)
   ═══════════════════════════════════════════════════════════════ */
/* ═══════════════════════════════════════════════════════════════
   Filter Tabs — Compact
   ═══════════════════════════════════════════════════════════════ */
.sw-filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 1rem;
}

.sw-filter-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.7rem;
    border: 1px solid var(--sg-border);
    border-radius: 8px;
    background: var(--sg-card);
    color: var(--sg-text);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.12s ease;
    white-space: nowrap;
}

.sw-filter-tab:hover {
    border-color: var(--sg-blue);
    background: #eaf3fb;
}

.sw-filter-tab.active {
    background: var(--sg-blue);
    border-color: var(--sg-blue);
    color: #ffffff;
}

.sw-filter-tab.active .sw-filter-badge {
    background: rgba(255,255,255,0.3);
    color: #ffffff;
}

.sw-filter-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 9px;
    background: #eef1f5;
    color: var(--sg-muted);
    font-size: 10px;
    font-weight: 700;
}

/* Legacy filter card classes — map to new compact style */
.cat-filter-card {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.7rem;
    border: 1px solid var(--sg-border);
    border-radius: 8px;
    background: var(--sg-card);
    color: var(--sg-text);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.12s ease;
    white-space: nowrap;
}

.cat-filter-card:hover {
    border-color: var(--sg-blue);
    background: var(--sg-bg);
}

.cat-filter-card.cat-filter-active {
    background: #eef7ff;
    border-color: var(--sg-blue);
    color: var(--sg-blue);
    box-shadow: 0 1px 3px rgba(47, 128, 201, 0.14);
}

.cat-filter-card.cat-filter-active .cat-filter-count {
    background: rgba(47, 128, 201, 0.12);
    color: var(--sg-blue);
}

.cat-filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 9px;
    background: var(--sg-bg);
    color: var(--sg-muted);
    font-size: 10px;
    font-weight: 700;
}

.cat-filter-label {
    line-height: 1;
}

/* Muted state for zero-count category pills */
.cat-filter-card.cat-filter-muted {
    opacity: 0.55;
    cursor: not-allowed;
}

.cat-filter-card.cat-filter-muted .cat-filter-count {
    background: var(--sg-bg);
    color: var(--sg-muted);
}

/* ═══════════════════════════════════════════════════════════════
   Asset Table - Modern Hardware Assets List
   ═══════════════════════════════════════════════════════════════ */
.asset-table-card {
    border: 1px solid #e6ebf1;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(31, 41, 55, 0.04), 0 4px 12px rgba(31, 41, 55, 0.05);
    overflow: hidden;
}

.asset-table {
    font-size: 13.5px;
    table-layout: fixed;
    width: 100%;
}

.asset-name-cell {
    font-weight: 600;
    color: #1f2933;
}

.asset-table thead th {
    background: #f7fbff;
    border-bottom: 1px solid var(--sg-border);
    font-weight: 500;
    font-size: 12.5px;
    color: var(--sg-charcoal);
    padding: 0.85rem 0.75rem;
    white-space: nowrap;
}

.asset-code-cell {
    white-space: nowrap;
}

.asset-serial-cell {
    max-width: 160px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.asset-code-link {
    font-weight: 600;
    color: var(--sg-blue);
    text-decoration: none;
    cursor: pointer;
    transition: color 0.15s ease;
}

.asset-code-link:hover {
    color: var(--sg-charcoal);
    text-decoration: underline;
}

.asset-table tbody td {
    padding: 0.95rem 0.75rem;
    vertical-align: middle;
    border-bottom: 1px solid #f0f2f5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.asset-table tbody tr:hover {
    background-color: var(--sg-bg);
}

.asset-table tbody tr:last-child td {
    border-bottom: none;
}

.asset-table .badge {
    font-size: 0.725rem;
    font-weight: 500;
    padding: 0.4em 0.65em;
    letter-spacing: 0.1px;
    vertical-align: middle;
    display: inline-block;
}

/* Asset status badges — reduced palette */
.asset-status-badge {
    display: inline-block;
    padding: 0.35em 0.65em;
    font-size: 0.725rem;
    font-weight: 500;
    border-radius: 6px;
    background: var(--sg-bg);
    border: 1px solid var(--sg-border);
    color: var(--sg-charcoal);
}

.asset-status-available {
    background: #f3f8fd;
    border-color: #c8dff4;
    color: var(--sg-charcoal);
}

.asset-status-assigned {
    background: #f0f5fa;
    border-color: var(--sg-blue);
    color: var(--sg-blue);
}

.asset-status-repair {
    background: #f8f9fa;
    border-color: #d9e2ec;
    color: var(--sg-muted);
}

.po-status-cancelled {
    background: #fdf3f2;
    border-color: #e8bfbb;
    color: #9b3b33;
}

/* Audit log module badges */
.audit-module-badge {
    display: inline-block;
    padding: 0.18rem 0.5rem;
    font-size: 0.72rem;
    font-weight: 600;
    border-radius: 999px;
    background: rgba(47, 128, 201, 0.10);
    color: var(--sg-blue);
    border: 1px solid rgba(47, 128, 201, 0.18);
    white-space: nowrap;
}

.audit-module-badge.neutral {
    background: #f5f8fb;
    color: var(--sg-text);
    border-color: var(--sg-border);
}

/* Asset action button — subtle icon */
.asset-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: transparent;
    border: 1px solid var(--sg-border);
    color: var(--sg-blue);
    font-size: 0.875rem;
    text-decoration: none;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.asset-action-btn:hover {
    background: var(--sg-bg);
    border-color: var(--sg-blue);
    color: var(--sg-blue);
}

/* ═══════════════════════════════════════════════════════════════
   Software List - Clickable Row & Product Name
   ═══════════════════════════════════════════════════════════════ */
.sw-product-row {
    cursor: pointer;
}

.sw-product-row:hover {
    background-color: var(--sg-bg);
}

.sw-product-link {
    font-weight: 600;
    color: var(--sg-blue, #2f80c9);
    cursor: pointer;
}

.sw-product-row:hover .sw-product-link {
    text-decoration: underline;
}

/* ═══════════════════════════════════════════════════════════════
   Row Action Icon Buttons
   ═══════════════════════════════════════════════════════════════ */
.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 6px;
    border: 1px solid var(--sg-border);
    background: #ffffff;
    color: var(--sg-muted);
    font-size: 14px;
    cursor: pointer;
    text-decoration: none !important;
    transition: background 0.14s, border-color 0.14s, color 0.14s;
    padding: 0;
    line-height: 1;
    flex-shrink: 0;
}

.action-btn + .action-btn {
    margin-left: 3px;
}

.action-btn:hover {
    border-color: #b0b8c4;
    color: var(--sg-text);
    background: #f0f3f7;
}

.action-btn.view {
    color: var(--sg-blue);
    border-color: rgba(47, 128, 201, 0.3);
}
.action-btn.view:hover {
    background: rgba(47, 128, 201, 0.08);
    border-color: var(--sg-blue);
    color: var(--sg-blue);
}

.action-btn.edit {
    color: #2f6fa8;
    border-color: rgba(47, 111, 168, 0.3);
}
.action-btn.edit:hover {
    background: rgba(47, 111, 168, 0.08);
    border-color: #2f6fa8;
    color: #2f6fa8;
}

.action-btn.success {
    color: #1a7a3a;
    border-color: rgba(26, 122, 58, 0.3);
}
.action-btn.success:hover {
    background: rgba(26, 122, 58, 0.08);
    border-color: #1a7a3a;
    color: #1a7a3a;
}

.action-btn.warn {
    color: #b86a00;
    border-color: rgba(184, 106, 0, 0.3);
}
.action-btn.warn:hover {
    background: rgba(255, 138, 0, 0.08);
    border-color: var(--sg-orange);
    color: var(--sg-orange);
}

.action-btn.danger {
    color: #c0392b;
    border-color: rgba(192, 57, 43, 0.3);
}
.action-btn.danger:hover {
    background: rgba(192, 57, 43, 0.08);
    border-color: #c0392b;
    color: #c0392b;
}

.action-btn.return {
    color: #2f6fa8;
    border-color: rgba(47, 111, 168, 0.3);
}
.action-btn.return:hover {
    background: rgba(47, 111, 168, 0.08);
    border-color: #2f6fa8;
    color: #2f6fa8;
}

/* ═══════════════════════════════════════════════════════════════
   Admin Master Data — Action Column & Row Layout
   ═══════════════════════════════════════════════════════════════ */
.admin-actions-col {
    width: 96px;
    min-width: 96px;
    white-space: nowrap;
    text-align: right;
    padding-right: 0.75rem !important;
}

.admin-row-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    white-space: nowrap;
}

.admin-master-table th,
.admin-master-table td {
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
    vertical-align: middle !important;
}

/* ═══════════════════════════════════════════════════════════════
   Tables — Clean Modern Admin Style
   ═══════════════════════════════════════════════════════════════ */
.table {
    font-size: 13px;
    background: var(--sg-card);
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 0;
    width: 100%;
}

/* Remove outer borders, keep subtle horizontal lines */
.table thead th {
    background: #fafbfc;
    color: var(--sg-charcoal);
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.2px;
    border-bottom: 1px solid #e1e4e8;
    border-top: none;
    border-left: none;
    border-right: none;
    padding: 0.45rem 0.7rem;
    white-space: nowrap;
}

.table tbody td {
    padding: 0.4rem 0.7rem;
    vertical-align: middle;
    border-bottom: 1px solid #f0f2f5;
    border-left: none;
    border-right: none;
    border-top: none;
}

/* Subtle row hover */
.table-hover tbody tr:hover {
    background-color: #f6f8fa;
}

/* Alternating row background for better scanability */
.table-striped > tbody > tr:nth-of-type(odd) > td {
    background-color: #fcfcfd;
}

/* Compact table variant */
.table-compact thead th {
    padding: 0.35rem 0.6rem;
}

.table-compact tbody td {
    padding: 0.35rem 0.6rem;
}

/* Action column — minimal width, right aligned */
.table-actions {
    white-space: nowrap;
    text-align: center;
    width: 1%;
    min-width: 90px;
}

/* First and last cell padding adjustments for cleaner edges */
.table thead th:first-child,
.table tbody td:first-child {
    padding-left: 0.9rem;
}

.table thead th:last-child,
.table tbody td:last-child {
    padding-right: 0.9rem;
}

/* ═══════════════════════════════════════════════════════════════
   Forms
   ═══════════════════════════════════════════════════════════════ */
.form-control, .form-select {
    border-color: var(--sg-border);
    border-radius: var(--sg-radius-sm);
}

.form-control:focus, .form-select:focus {
    border-color: var(--sg-blue);
    box-shadow: 0 0 0 0.15rem rgba(47, 128, 201, 0.2);
}

.form-label {
    font-weight: 600;
    font-size: 14px;
    color: var(--sg-text);
}

.form-text {
    color: var(--sg-muted);
    font-size: 0.78rem;
}

.form-select-sm, .form-control-sm {
    font-size: 0.8rem;
    border-color: var(--sg-border);
}

/* ═══════════════════════════════════════════════════════════════
   Workflow Tabs — Modern pill/card style for Assignments page
   ═══════════════════════════════════════════════════════════════ */
.workflow-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.workflow-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    border: 1px solid var(--sg-border);
    border-radius: var(--sg-radius);
    background: white;
    color: var(--sg-text);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
}

.workflow-tab:hover {
    border-color: var(--sg-blue);
    color: var(--sg-blue);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.workflow-tab.active {
    background: linear-gradient(135deg, var(--sg-blue) 0%, #1e6db3 100%);
    border-color: var(--sg-blue);
    color: white;
    box-shadow: 0 3px 6px rgba(47,128,201,0.3);
}

.workflow-tab.active:hover {
    color: white;
    transform: translateY(-1px);
}

.workflow-tab i {
    font-size: 1rem;
}

.workflow-tab .badge-count {
    font-size: 0.75rem;
    padding: 0.15rem 0.4rem;
    border-radius: 10px;
    background: rgba(255,255,255,0.2);
    color: inherit;
}

.workflow-tab.active .badge-count {
    background: rgba(255,255,255,0.25);
}

/* ═══════════════════════════════════════════════════════════════
   Workflow Tab Colors — Soft green for New Joinee, soft red for Final Exit
   ═══════════════════════════════════════════════════════════════ */

/* New Joinee Issue — Neutral blue-aligned */
.workflow-tab.new-joinee {
    background: var(--sg-card);
    border-color: var(--sg-border);
    color: var(--sg-text);
}

.workflow-tab.new-joinee:hover {
    border-color: var(--sg-blue);
    color: var(--sg-blue);
    box-shadow: 0 2px 4px rgba(47,128,201,0.10);
}

.workflow-tab.new-joinee.active {
    background: linear-gradient(135deg, var(--sg-blue) 0%, #1e6db3 100%);
    border-color: var(--sg-blue);
    color: white;
    box-shadow: 0 3px 6px rgba(47,128,201,0.3);
}

.workflow-tab.new-joinee.active:hover {
    color: white;
    transform: translateY(-1px);
}

/* Final Exit Return — Neutral muted */
.workflow-tab.final-exit {
    background: var(--sg-card);
    border-color: var(--sg-border);
    color: var(--sg-text);
}

.workflow-tab.final-exit:hover {
    border-color: var(--sg-blue);
    color: var(--sg-blue);
    box-shadow: 0 2px 4px rgba(47,128,201,0.10);
}

.workflow-tab.final-exit.active {
    background: linear-gradient(135deg, var(--sg-blue) 0%, #1e6db3 100%);
    border-color: var(--sg-blue);
    color: white;
    box-shadow: 0 3px 6px rgba(47,128,201,0.3);
}

.workflow-tab.final-exit.active:hover {
    color: white;
    transform: translateY(-1px);
}

/* ═══════════════════════════════════════════════════════════════
   Workflow Cards — Clean white cards for bulk workflows
   ═══════════════════════════════════════════════════════════════ */
.workflow-card {
    background: white;
    border: 1px solid var(--sg-border);
    border-radius: var(--sg-radius);
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    margin-bottom: 1.5rem;
    font-size: 13.5px;
}

.workflow-card .form-label {
    font-size: 13px;
    font-weight: 600;
}

.workflow-card .form-control,
.workflow-card .form-select {
    font-size: 13px;
}

.workflow-card .form-text,
.workflow-card .small,
.workflow-card small {
    font-size: 12px;
}

.workflow-card-header {
    padding: 14px 18px;
    border-bottom: 1px solid var(--sg-border-light);
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: var(--sg-radius) var(--sg-radius) 0 0;
}

.assignment-workflow-header {
    padding: 14px 18px;
}

.workflow-card-heading {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.workflow-card-icon {
    font-size: 15px;
    line-height: 1.25;
    color: var(--sg-blue);
    margin-top: 1px;
    flex: 0 0 auto;
}

.workflow-card-title {
    margin: 0 0 0.15rem 0;
    font-size: 0.9375rem;
    font-weight: 700;
    line-height: 1.25;
    color: var(--sg-text);
}

.workflow-card-subtitle {
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.3;
    color: var(--sg-muted, #6c757d);
}

.workflow-card-body {
    padding: 1rem 1.25rem 0.75rem;
}

.workflow-card.new-joinee .workflow-card-header {
    background: #f5f9fe;
}

.workflow-card.new-joinee .workflow-card-header i {
    color: var(--sg-blue);
}

.workflow-card.final-exit .workflow-card-header {
    background: #f5f9fe;
}

.workflow-card.final-exit .workflow-card-header i {
    color: var(--sg-text);
}

/* ═══════════════════════════════════════════════════════════════
   Workflow Form Grid — Compact aligned layout
   ═══════════════════════════════════════════════════════════════ */
.workflow-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.workflow-form-grid .form-group {
    display: flex;
    flex-direction: column;
}

.workflow-form-grid .form-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--sg-text);
    margin-bottom: 0.35rem;
}

/* ═══════════════════════════════════════════════════════════════
   Workflow Filters — Compact filter bar
   ═══════════════════════════════════════════════════════════════ */
.workflow-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    padding: 0.75rem;
    background: #f8fafc;
    border: 1px solid var(--sg-border-light);
    border-radius: var(--sg-radius-sm);
    margin-bottom: 0.75rem;
}

.workflow-filters .form-control-sm,
.workflow-filters .form-select-sm {
    min-width: 140px;
}

/* ═══════════════════════════════════════════════════════════════
   Shared Filter Bar — Standardized across all list pages
   ═══════════════════════════════════════════════════════════════ */
.app-filter-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    background: #ffffff;
    border: 1px solid var(--sg-border);
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    padding: 8px 12px;
    margin-bottom: 12px;
}

.app-filter-bar .form-control,
.app-filter-bar .form-control-sm,
.app-filter-bar .form-select,
.app-filter-bar .form-select-sm {
    font-size: 13px;
    height: 32px;
    border-color: var(--sg-border);
}

.app-filter-bar .app-filter-search {
    flex: 1 1 280px;
    min-width: 200px;
}

.app-filter-bar .app-filter-select {
    flex: 0 1 200px;
    min-width: 160px;
}

.app-filter-bar .app-filter-clear {
    flex: 0 0 auto;
    margin-left: auto;
}

.workflow-filters .search-input {
    flex: 1;
    min-width: 200px;
    max-width: 350px;
}

/* ═══════════════════════════════════════════════════════════════
   Workflow Table — Compact modern table
   ═══════════════════════════════════════════════════════════════ */
.workflow-table-container {
    border: 1px solid var(--sg-border);
    border-radius: var(--sg-radius-sm);
    overflow: hidden;
    max-height: 380px;
    overflow-y: auto;
}

.workflow-table {
    width: 100%;
    font-size: 0.82rem;
    margin-bottom: 0;
}

.workflow-table thead th {
    background: #f8fafc;
    color: var(--sg-text);
    font-weight: 600;
    font-size: 0.78rem;
    padding: 0.5rem 0.6rem;
    border-bottom: 1px solid var(--sg-border);
    white-space: nowrap;
}

.workflow-table thead th:first-child {
    width: 36px;
    text-align: center;
    padding-left: 0.6rem;
}

.workflow-table tbody td {
    padding: 0.45rem 0.6rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--sg-border-light);
    color: var(--sg-text);
}

.workflow-table tbody tr:hover {
    background: #f8fafc;
}

.workflow-table tbody tr:last-child td {
    border-bottom: none;
}

.workflow-table .asset-code {
    font-weight: 600;
    color: var(--sg-blue);
    font-size: 0.85rem;
}

.workflow-table .checkbox-cell {
    text-align: center;
}

.workflow-table select.form-select-sm {
    padding: 0.2rem 0.4rem;
    font-size: 0.75rem;
    min-width: 140px;
}

/* ═══════════════════════════════════════════════════════════════
   Workflow Actions — Primary action bar
   ═══════════════════════════════════════════════════════════════ */
.workflow-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 0;
    margin-top: 0.5rem;
    border-top: 1px solid var(--sg-border-light);
}

.workflow-actions .selected-count {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--sg-text);
}

.workflow-actions .selected-count .badge {
    font-size: 0.8rem;
    padding: 0.35rem 0.6rem;
}

.workflow-count-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.18rem 0.55rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--sg-blue);
    background: rgba(47, 128, 201, 0.10);
    border: 1px solid rgba(47, 128, 201, 0.18);
}

/* ═══════════════════════════════════════════════════════════════
   Empty State — Clean info message
   ═══════════════════════════════════════════════════════════════ */
.workflow-empty-state {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: #f8fafc;
    border: 1px dashed var(--sg-border);
    border-radius: var(--sg-radius-sm);
    color: var(--sg-muted);
    font-size: 0.9rem;
}

.workflow-empty-state i {
    font-size: 1.25rem;
    color: var(--sg-muted);
}

/* ═══════════════════════════════════════════════════════════════
   Badges & Alerts
   ═══════════════════════════════════════════════════════════════ */
.badge {
    font-size: 0.72rem;
    font-weight: 600;
    border-radius: 4px;
}

.alert {
    border-radius: var(--sg-radius-sm);
    font-size: 0.85rem;
}

/* ═══════════════════════════════════════════════════════════════
   Form Validation
   ═══════════════════════════════════════════════════════════════ */
.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

/* ═══════════════════════════════════════════════════════════════
   Error Boundary
   ═══════════════════════════════════════════════════════════════ */
.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred."
}

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

/* ═══════════════════════════════════════════════════════════════
   Section Headings
   ═══════════════════════════════════════════════════════════════ */
h5 {
    font-size: 17px;
    font-weight: 600;
    color: var(--sg-charcoal);
}

h6.text-muted {
    font-weight: 600;
    color: var(--sg-muted) !important;
    font-size: 15px;
}

/* ═══════════════════════════════════════════════════════════════
   Report Tabs / Button Groups
   ═══════════════════════════════════════════════════════════════ */
.btn-group .btn-outline-secondary.active,
.btn-group .btn-outline-secondary:active {
    background-color: var(--sg-blue);
    border-color: var(--sg-blue);
    color: #fff;
}

/* ═══════════════════════════════════════════════════════════════
   Utilities
   ═══════════════════════════════════════════════════════════════ */
.text-accent {
    color: var(--sg-orange) !important;
}

.bg-accent {
    background-color: var(--sg-orange) !important;
}

/* ═══════════════════════════════════════════════════════════════
   Responsive overflow fixes for Hardware Assets page
   ═══════════════════════════════════════════════════════════════ */

/* Ensure main layout shell doesn't expand beyond viewport */
.app-main {
    min-width: 0;
}

/* Ensure app shell constrains its children */
.app-shell {
    min-width: 0;
}

/* Category pills row - allow horizontal scroll if needed, don't force page width */
.cat-pills-row {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    max-width: 100%;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

/* Ensure filter card content doesn't expand */
.cat-filter-card {
    flex-shrink: 0;
}

/* Asset table scroll container — always scrollable with sticky header */
.asset-table-scroll {
    overflow-x: auto;
    overflow-y: auto;
    max-width: 100%;
    max-height: calc(100vh - 300px);
}

.asset-table-scroll .asset-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background-color: #f7fbff;
}

/* Ensure header content stays within bounds */
.app-header {
    min-width: 0;
    max-width: 100vw;
}

/* ═══════════════════════════════════════════════════════════════
   Add Hardware Asset Form — page-scoped styles
   ═══════════════════════════════════════════════════════════════ */
.asset-form-card {
    border-color: var(--sg-border);
    border-radius: var(--sg-radius);
    box-shadow: var(--sg-shadow-soft);
}

.asset-form-card .card-body {
    padding: 1.25rem 1.5rem;
}

.asset-form-section-label {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--sg-muted);
    margin-bottom: 0.65rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid var(--sg-border);
}

.asset-form-card .form-control-sm,
.asset-form-card .form-select-sm {
    padding-top: 0.32rem;
    padding-bottom: 0.32rem;
    font-size: 0.845rem;
}

.asset-form-card textarea.form-control {
    min-height: 76px;
    resize: vertical;
}

.asset-attachments-section {
    border: 1px solid var(--sg-border);
    border-radius: var(--sg-radius-sm);
    padding: 0.85rem 1.1rem;
    margin-bottom: 1rem;
    background: #fafcff;
}

.asset-attach-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--sg-text);
    margin-bottom: 0.15rem;
}

.asset-attach-hint {
    font-size: 0.78rem;
    color: var(--sg-muted);
    margin-bottom: 0.6rem;
}

.asset-attach-file-list {
    margin-bottom: 0.5rem;
}

.asset-attach-file-row {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.18rem 0;
    font-size: 0.82rem;
    color: var(--sg-text);
}

.asset-attach-file-row .text-muted {
    font-size: 0.76rem;
}

.asset-attach-drop-zone {
    border: 1px dashed var(--sg-border);
    border-radius: var(--sg-radius-sm);
    background: #ffffff;
    padding: 0.5rem 0.75rem;
}

.asset-attach-drop-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--sg-text);
    margin-bottom: 0.3rem;
}

.asset-form-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--sg-border);
}

/* ═══════════════════════════════════════════════════════════════
   Bulk Add Hardware Assets — reduced-palette badges & row states
   ═══════════════════════════════════════════════════════════════ */
.bulk-badge-total,
.bulk-badge-valid,
.bulk-badge-invalid,
.bulk-badge-invalid-zero {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.4;
}

.bulk-badge-total {
    background: var(--sg-sidebar);
    border: 1px solid var(--sg-border);
    color: var(--sg-text);
}

.bulk-badge-valid {
    background: #eaf2fb;
    border: 1px solid #b6d4ef;
    color: var(--sg-blue);
}

.bulk-badge-invalid {
    background: #fdf1f0;
    border: 1px solid #e8bfbb;
    color: #9b3b33;
}

.bulk-badge-invalid-zero {
    background: var(--sg-sidebar);
    border: 1px solid var(--sg-border);
    color: var(--sg-muted);
}

.bulk-state-valid,
.bulk-state-invalid {
    display: inline-block;
    padding: 0.1rem 0.45rem;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
}

.bulk-state-valid {
    background: #eaf2fb;
    border: 1px solid #b6d4ef;
    color: var(--sg-blue);
}

.bulk-state-invalid {
    background: #fdf1f0;
    border: 1px solid #e8bfbb;
    color: #9b3b33;
}

.bulk-row-invalid {
    background-color: #fdf6f5;
}

/* ═══════════════════════════════════════════════════════════════
   Software & Subscriptions landing — stat cards + module cards
   ═══════════════════════════════════════════════════════════════ */

/* Compact metric stat cards */
.sw-stat-card {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.9rem 1.1rem;
    background: var(--sg-card);
    border: 1px solid var(--sg-border);
    border-radius: var(--sg-radius);
    box-shadow: var(--sg-shadow-soft);
}

.sw-stat-icon {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eaf2fb;
    border-radius: var(--sg-radius-sm);
    color: var(--sg-blue);
    font-size: 1.1rem;
}

.sw-stat-body {
    min-width: 0;
}

.sw-stat-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--sg-text);
    line-height: 1.1;
}

.sw-stat-label {
    font-size: 11.5px;
    color: var(--sg-muted);
    margin-top: 0.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Module entry cards */
.sw-module-card {
    display: flex;
    flex-direction: column;
    padding: 1.35rem 1.4rem;
    background: var(--sg-card);
    border: 1px solid var(--sg-border);
    border-radius: var(--sg-radius);
    box-shadow: var(--sg-shadow-soft);
    height: 100%;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.sw-module-card:hover {
    border-color: var(--sg-blue);
    box-shadow: 0 4px 14px rgba(47, 128, 201, 0.1);
}

.sw-module-card-top {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin-bottom: 0.85rem;
}

.sw-module-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eaf2fb;
    border-radius: var(--sg-radius-sm);
    color: var(--sg-blue);
    font-size: 1.25rem;
}

.sw-module-meta {
    min-width: 0;
}

.sw-module-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--sg-text);
    line-height: 1.3;
}

.sw-module-count {
    font-size: 12px;
    color: var(--sg-muted);
    margin-top: 0.1rem;
}

.sw-module-desc {
    font-size: 13px;
    color: var(--sg-muted);
    line-height: 1.55;
    flex: 1;
    margin-bottom: 1.1rem;
}

.sw-module-action {
    margin-top: auto;
}

/* ═══════════════════════════════════════════════════════════════
   Neutral info/success alert — replaces green alert-success
   ═══════════════════════════════════════════════════════════════ */
.app-alert-info {
    padding: 0.65rem 1rem;
    border: 1px solid var(--sg-border);
    border-left: 3px solid var(--sg-blue);
    border-radius: var(--sg-radius-sm);
    background: #f5f9fe;
    color: var(--sg-text);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

/* ═══════════════════════════════════════════════════════════════
   Employees page — stat cards & badge
   ═══════════════════════════════════════════════════════════════ */
.emp-stat-card {
    border: 1px solid var(--sg-border);
    border-radius: var(--sg-radius);
    box-shadow: var(--sg-shadow-soft);
    background: var(--sg-card);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.emp-stat-number {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--sg-text);
    line-height: 1.2;
}

.emp-stat-label {
    font-size: 11.5px;
    color: var(--sg-muted);
}

/* Shared table scroll wrapper — vertical + horizontal scroll, sticky header */
.app-table-scroll {
    width: 100%;
    overflow-x: auto;
    overflow-y: auto;
    max-height: calc(100vh - 300px);
    -webkit-overflow-scrolling: touch;
}

.app-table-scroll > table {
    margin-bottom: 0;
}

.app-table-scroll > table thead th,
.app-table-scroll .admin-master-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background-color: #f7fbff;
    box-shadow: 0 1px 0 var(--sg-border);
}

/* Employees table column sizing */
.emp-col-code       { width: 100px; min-width: 90px; }
.emp-col-name       { width: 210px; min-width: 180px; }
.emp-col-email      { width: 270px; min-width: 220px; }
.emp-col-department { width: 180px; min-width: 150px; }
.emp-col-location   { width: 130px; min-width: 110px; }
.emp-col-type       { width: 110px; min-width: 95px; }
.emp-col-workmode   { width: 110px; min-width: 95px; }
.emp-col-status     { width: 80px;  min-width: 70px; }
.emp-col-assets     { width: 110px; min-width: 100px; text-align: center; }

.employees-table {
    min-width: 1280px;
}

.transfers-table {
    min-width: 1000px;
}

.vendors-table {
    min-width: 1240px;
}

.vendor-col-name     { width: 220px; min-width: 180px; }
.vendor-col-type     { width: 110px; min-width: 95px; }
.vendor-col-location { width: 140px; min-width: 120px; }
.vendor-col-contact { width: 160px; min-width: 140px; }
.vendor-col-email   { width: 220px; min-width: 180px; }
.vendor-col-phone   { width: 130px; min-width: 110px; }
.vendor-col-gst     { width: 130px; min-width: 110px; }
.vendor-col-active  { width: 80px;  min-width: 70px; }

.vendor-actions-col {
    width: 136px;
    min-width: 136px;
    text-align: right;
    white-space: nowrap;
    overflow: visible;
    padding-right: 1rem !important;
}

.vendor-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    white-space: nowrap;
}

.emp-actions-col {
    width: 136px;
    min-width: 136px;
    text-align: right;
    white-space: nowrap;
    overflow: visible;
    padding-right: 1rem !important;
}

.emp-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    white-space: nowrap;
}

.emp-asset-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(47, 128, 201, 0.1);
    color: var(--sg-blue);
    border: 1px solid rgba(47, 128, 201, 0.25);
}

/* ═══════════════════════════════════════════════════════════════
   Software Detail — Metric stat cards
   ═══════════════════════════════════════════════════════════════ */
.sw-stat-metric {
    border: 1px solid var(--sg-border);
    border-radius: var(--sg-radius);
    box-shadow: var(--sg-shadow-soft);
    background: var(--sg-card);
}

/* ═══════════════════════════════════════════════════════════════
   Revoke Access confirmation modal — scoped styles
   ═══════════════════════════════════════════════════════════════ */
.revoke-modal-content {
    border: 1px solid var(--sg-border);
    border-radius: var(--sg-radius);
    box-shadow: 0 4px 20px rgba(31, 41, 55, 0.10);
    overflow: hidden;
}

.revoke-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem 0.9rem;
    border-bottom: 1px solid var(--sg-border);
    background: var(--sg-card);
}

.revoke-modal-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--sg-text);
}

.revoke-modal-body {
    padding: 1.1rem 1.25rem 0.75rem;
}

.revoke-modal-message {
    font-size: 0.9rem;
    color: var(--sg-text);
    margin-bottom: 0.75rem;
    line-height: 1.55;
}

.revoke-modal-hint {
    font-size: 0.8rem;
    color: var(--sg-muted);
    margin-bottom: 0;
}

/* ═══════════════════════════════════════════════════════════════
   Assignments page — completion panels & row highlight
   ═══════════════════════════════════════════════════════════════ */
.asgn-completion-card {
    border: 1px solid var(--sg-border);
    border-radius: var(--sg-radius);
    box-shadow: var(--sg-shadow-soft);
    overflow: hidden;
}

.asgn-completion-header {
    padding: 0.9rem 1.25rem;
    border-bottom: 1px solid var(--sg-border);
    background: #f5f9fe;
}

.asgn-highlight {
    outline: none;
}

.asset-table tbody tr.asgn-highlight > td {
    background: rgba(47, 128, 201, 0.10) !important;
}

    .asset-table tbody tr.asgn-highlight > td:first-child {
        box-shadow: inset 3px 0 0 rgba(47, 128, 201, 0.75);
    }

.asset-table tbody tr.asgn-highlight:hover > td {
    background: rgba(47, 128, 201, 0.12) !important;
}

.assignment-actions-col {
    width: 60px;
    min-width: 60px;
    max-width: 60px;
    text-align: right;
    white-space: nowrap;
    overflow: visible;
    padding-right: 0.75rem !important;
}

/* Override the global asset-table ellipsis rule for action cells */
.asset-table td.assignment-actions-col {
    overflow: visible;
    text-overflow: clip;
}

.assignment-row-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    white-space: nowrap;
    overflow: visible;
}

/* ═══ Assignment Page — Action Group Dropdowns ═══════════════════ */
.assignment-action-groups {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: flex-start;
}

.assignment-action-group {
    position: relative;
}

.assignment-action-menu {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 190px;
    background: #fff;
    border: 1px solid #e0e6ef;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(31,41,55,0.13);
    z-index: 1050;
    padding: 4px 0;
}

.assignment-action-menu-item {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 8px 16px;
    border: none;
    background: transparent;
    color: var(--sg-text);
    font-size: 13.5px;
    text-align: left;
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
}

.assignment-action-menu-item:hover {
    background: var(--sg-bg);
    color: var(--sg-blue);
}

.revoke-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem 1rem;
    border-top: 1px solid var(--sg-border);
    background: var(--sg-card);
}
/* Workflow checkbox alignment */
.workflow-checkbox-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 0.75rem;
    margin-bottom: 1rem;
    color: var(--sg-text);
    font-size: 13px;
}

    .workflow-checkbox-row input[type="checkbox"] {
        margin: 0;
    }

/* ═══ Assignments — Compact Assign Asset form ═══════════════════ */
.assignment-compact-form {
    margin-bottom: 1rem;
}

.assignment-compact-body {
    padding: 1rem 1.25rem 0.5rem;
}

.assignment-compact-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    padding: 0.6rem 0 0.25rem;
    border-top: 1px solid var(--sg-border);
    margin-top: 0.5rem;
}

/* ═══ Assignments — Category quick-filter pill row ══════════════ */
.assignment-category-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.assignment-category-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.25rem 0.65rem;
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1.4;
    border-radius: 20px;
    border: 1px solid var(--sg-border);
    background: var(--sg-card);
    color: var(--sg-muted);
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
    white-space: nowrap;
}

.assignment-category-pill:hover {
    background: #f0f3f7;
    border-color: #b0b8c4;
    color: var(--sg-text);
}

.assignment-category-pill.active {
    background: var(--sg-blue);
    border-color: var(--sg-blue);
    color: #fff;
}

.assignment-category-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    padding: 0 5px;
    height: 16px;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 10px;
    background: rgba(0,0,0,0.10);
    color: inherit;
    line-height: 1;
}

.assignment-category-pill.active .assignment-category-count {
    background: rgba(255,255,255,0.25);
}

/* ═══ Assignments — Soft workflow alert classes ═════════════════ */
.workflow-alert {
    border-radius: var(--sg-radius-sm);
    padding: 0.55rem 0.85rem;
    font-size: 0.8125rem;
    border: 1px solid var(--sg-border);
    background: #f8fbff;
    color: var(--sg-text);
    margin-bottom: 0;
}

.workflow-alert-caution {
    border-color: rgba(47, 128, 201, 0.22);
    background: rgba(47, 128, 201, 0.06);
    color: var(--sg-text);
}

.workflow-alert-muted {
    border-color: var(--sg-border);
    background: #f7f9fc;
    color: var(--sg-muted);
}

/* Soft condition badge — replaces strong bg-success / bg-warning */
.asgn-condition-badge {
    display: inline-block;
    padding: 0.2em 0.6em;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 6px;
    border: 1px solid var(--sg-border);
    background: #f2f5f9;
    color: var(--sg-text);
}

/* ═══ Assignments — Pagination strip ════════════════════════════ */
.asgn-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.5rem;
}
/* Assignments workflow heading standardization */
.workflow-card .workflow-card-header h5,
.workflow-card .workflow-card-header .workflow-card-title,
.assignment-compact-form .workflow-card-header h5,
.assignment-compact-form .workflow-card-header .workflow-card-title {
    font-size: 0.9375rem !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
    margin: 0 0 0.15rem 0 !important;
    color: var(--sg-text) !important;
}

.workflow-card .workflow-card-header .text-muted,
.workflow-card .workflow-card-header .workflow-card-subtitle,
.assignment-compact-form .workflow-card-header .text-muted,
.assignment-compact-form .workflow-card-header .workflow-card-subtitle {
    font-size: 0.78rem !important;
    line-height: 1.3 !important;
    margin: 0 !important;
    color: var(--sg-muted) !important;
}

.workflow-card .workflow-card-header i,
.assignment-compact-form .workflow-card-header i {
    font-size: 0.9375rem !important;
    line-height: 1.25 !important;
}
/* Assignments workflow form label standardization */
.workflow-card .form-label,
.workflow-card .workflow-form-grid .form-label,
.workflow-card .workflow-form-grid label.form-label,
.workflow-card .form-group > .form-label,
.assignment-compact-form .form-label {
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1.25 !important;
    margin-bottom: 0.35rem !important;
    color: var(--sg-text) !important;
}

/* Keep workflow checkbox label same across all assignment forms */
.workflow-card .form-check-label,
.workflow-card .workflow-checkbox-row .form-check-label,
.assignment-compact-form .form-check-label {
    font-size: 13px !important;
    font-weight: 400 !important;
    line-height: 1.25 !important;
}

/* Keep workflow form inputs visually consistent */
.workflow-card .form-control,
.workflow-card .form-select,
.workflow-card .workflow-form-grid .form-control,
.workflow-card .workflow-form-grid .form-select,
.assignment-compact-form .form-control,
.assignment-compact-form .form-select {
    font-size: 13px !important;
    min-height: 28px;
}
/* Audit Log table column sizing */
.asset-table .audit-date-col {
    width: 150px;
    white-space: nowrap;
}

.asset-table .audit-user-col {
    width: 210px;
    white-space: nowrap;
}

.asset-table .audit-module-col {
    width: 130px;
    white-space: nowrap;
}

.asset-table .audit-action-col {
    width: 250px;
    white-space: nowrap;
}

.asset-table .audit-record-col {
    width: 180px;
    white-space: nowrap;
}

.asset-table .audit-summary-col {
    min-width: 520px;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    line-height: 1.35;
}
/* Sidebar expanded/collapsed logo sizing */
.sidebar-brand {
    min-height: 58px;
}

.sidebar-brand-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    overflow: hidden;
    flex: 1;
}

.sidebar-logo-full {
    display: block;
    width: 170px;
    max-width: 170px;
    max-height: 48px;
    object-fit: contain;
    margin-left: 4px;
}

.sidebar-logo-square {
    width: 46px;
    height: 32px;
    object-fit: contain;
}

/* ═══════════════════════════════════════════════════════════════
   PHASE 1 — Mobile Browser Compatibility
   Breakpoints: 768px (tablet/mobile boundary), 576px (small mobile)
   Desktop layout is unchanged.
   ═══════════════════════════════════════════════════════════════ */

/* ── A. Topbar — prevent overflow, truncate long username ── */
@media (max-width: 768px) {
    .app-header {
        padding: 0 0.75rem;
        gap: 0.5rem;
        overflow: hidden;
    }

    .topbar-product-name {
        font-size: 11px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        min-width: 0;
        flex: 1 1 0;
    }

    .topbar-spacer {
        display: none;
    }

    .topbar-user {
        flex-shrink: 0;
        max-width: 160px;
        overflow: hidden;
    }

    .topbar-user-name {
        max-width: 90px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .topbar-caret {
        flex-shrink: 0;
    }

    .topbar-dropdown-menu {
        right: 0;
        left: auto;
        min-width: 200px;
    }
}

/* ── B. Dashboard — mobile layout ── */
@media (max-width: 768px) {
    /* Location filter cards: 2 per row */
    .dash-loc-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    /* Asset Summary cards: 2 per row */
    .dash-cat-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    /* Subscription summary cards: full width on mobile */
    .dashboard-sub-drill-card {
        width: 100%;
        min-width: 0;
    }

    .dashboard-sub-drill-grid {
        gap: 0.5rem;
    }

    /* Quick nav: 2 per row */
    .dashboard-quicknav {
        gap: 0.5rem;
    }

    .dashboard-quicknav-link {
        flex: 1 1 calc(50% - 0.25rem);
        justify-content: center;
        font-size: 12px;
        padding: 0.45rem 0.5rem;
    }

    /* Drill-down panel padding */
    .dashboard-drill .card-body {
        padding: 0.75rem !important;
    }

    /* Section title spacing */
    .dash-section-title {
        font-size: 13px;
    }
}

@media (max-width: 400px) {
    /* Very small: 1 column for asset summary */
    .dash-cat-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dash-loc-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ── C. Hardware Assets page ── */
@media (max-width: 768px) {
    /* Search/filter bar already flex-wraps; reduce min-width so inputs fit */
    .app-filter-bar .app-filter-search {
        flex: 1 1 100%;
        min-width: 0;
    }

    .app-filter-bar .app-filter-select {
        flex: 1 1 calc(50% - 6px);
        min-width: 0;
    }

    .app-filter-bar .app-filter-clear {
        margin-left: 0;
        width: 100%;
    }

    .app-filter-bar .app-filter-clear .btn {
        width: 100%;
    }

    /* Category pills: allow horizontal scroll (already nowrap) — just ensure no page bleed */
    .cat-pills-row {
        -webkit-overflow-scrolling: touch;
        padding-bottom: 4px;
    }

    /* Asset table: ensure the scroll container uses full width */
    .asset-table-card {
        border-radius: 6px;
    }

    .asset-table-scroll {
        max-height: none;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Pagination: stack per-page and nav controls */
    .pagination-row-mobile {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    /* Page header: title + Add/Bulk Add buttons stack */
    .page-header-actions {
        width: 100%;
    }
}

/* ── D. Asset Detail page ── */
@media (max-width: 768px) {
    /* Title + action buttons: allow wrapping */
    .asset-detail-header {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    /* Asset detail heading: allow wrapping, reduce font */
    .asset-detail-header h1 {
        font-size: 1.1rem;
        word-break: break-word;
    }

    /* dl rows: reduce label column width on small screens */
    .card-body .row.mb-0 dt.col-5,
    .card-body dl.row dt.col-5 {
        font-size: 12px;
    }

    .card-body .row.mb-0 dd.col-7,
    .card-body dl.row dd.col-7 {
        font-size: 13px;
        word-break: break-word;
    }

    /* Row cards stack to single column */
    .row.g-3 > .col-md-6,
    .row.g-3 > .col-md-4,
    .row.g-3 > .col-md-8 {
        margin-bottom: 0;
    }
}

/* ── E. Modals — fit viewport, enable scrolling ── */
@media (max-width: 768px) {
    .modal-dialog {
        margin: 0.5rem auto;
        max-width: calc(100vw - 1rem) !important;
    }

    .modal-dialog-centered {
        min-height: calc(100vh - 1rem);
        align-items: flex-end;
    }

    .modal-content {
        border-radius: 12px 12px 0 0;
        max-height: 90vh;
        display: flex;
        flex-direction: column;
    }

    .modal-body {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        flex: 1 1 auto;
    }

    .modal-footer {
        flex-shrink: 0;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .modal-footer .btn {
        flex: 1 1 auto;
    }
}


/* ═══════════════════════════════════════════════════════════════
   Mobile Card List — Assets & Employees
   Hidden on desktop (>=768px), shown on mobile (<768px).
   Desktop tables hidden on mobile via d-none d-md-block on their wrapper.
   ═══════════════════════════════════════════════════════════════ */

.mobile-card-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 0.5rem;
}

.mobile-asset-card {
    background: var(--sg-card);
    border: 1px solid var(--sg-border);
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(31,41,55,0.06);
    padding: 0.75rem 1rem;
}

.mobile-card-relieved {
    opacity: 0.75;
}

.mobile-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.mobile-card-code {
    font-size: 13px;
    font-weight: 700;
    color: var(--sg-blue);
    text-decoration: none;
    font-family: monospace;
    letter-spacing: 0.01em;
}

.mobile-card-code:hover {
    text-decoration: underline;
}

.mobile-card-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--sg-text);
    margin-bottom: 0.4rem;
    word-break: break-word;
}

.mobile-card-fields {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    margin-bottom: 0.6rem;
}

.mobile-card-field {
    font-size: 12px;
    color: var(--sg-text);
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
    word-break: break-word;
}

.mobile-field-label {
    font-weight: 600;
    color: var(--sg-muted);
    min-width: 72px;
    flex-shrink: 0;
}

.mobile-card-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.mobile-card-actions .btn {
    font-size: 12px;
    padding: 0.25rem 0.75rem;
}

/* Employee stat cards: wrap on mobile */
@media (max-width: 768px) {
    .emp-stat-card {
        min-width: 80px;
    }
}


/* ═══════════════════════════════════════════════════════════════
   Assignments page — mobile card refinements
   ═══════════════════════════════════════════════════════════════ */

.mobile-asgn-highlight {
    border-color: var(--sg-blue) !important;
    background: #f0f8ff !important;
    box-shadow: 0 0 0 2px rgba(47, 128, 201, 0.10), 0 2px 8px rgba(47, 128, 201, 0.08);
}

@media (max-width: 768px) {
    .assignment-action-groups {
        width: 100%;
        justify-content: flex-start;
    }

    .assignment-action-group .btn {
        font-size: 12px;
        padding: 0.35rem 0.75rem;
    }

    .assignment-action-menu {
        right: 0;
        left: auto;
        min-width: 180px;
    }

    .workflow-tabs {
        flex-wrap: wrap;
        gap: 0.4rem;
        margin-bottom: 1rem;
    }

    .workflow-tab {
        padding: 0.45rem 0.75rem;
        font-size: 13px;
        flex: 1 1 auto;
        justify-content: center;
    }

    .workflow-tab i {
        font-size: 14px;
    }

    .assignment-category-pills {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 4px;
        gap: 6px;
    }

    .assignment-category-pill {
        flex-shrink: 0;
        font-size: 12px;
        padding: 0.3rem 0.6rem;
    }

    .app-filter-bar .app-filter-search {
        flex: 1 1 100%;
        min-width: 0;
    }

    .app-filter-bar .app-filter-select {
        flex: 1 1 calc(50% - 6px);
        min-width: 0;
    }

    .app-filter-bar .app-filter-clear {
        margin-left: 0;
        width: 100%;
    }

    .app-filter-bar .app-filter-clear .btn {
        width: 100%;
    }

    .asgn-pagination {
        flex-wrap: wrap;
        gap: 0.5rem;
        justify-content: flex-start;
    }

    .asgn-pagination .d-flex.gap-1 {
        flex-wrap: nowrap;
    }

    .mobile-card-list {
        gap: 8px;
    }

    .mobile-asset-card {
        padding: 0.65rem 0.85rem;
    }
}


/* ═══════════════════════════════════════════════════════════════
   Subscriptions page — mobile refinements
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .sw-product-link {
        word-break: break-word;
    }

    .mobile-card-actions .btn-outline-danger {
        font-size: 12px;
    }
}


/* ═══════════════════════════════════════════════════════════════
   Subscription/License Detail page — mobile refinements
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .sw-detail-heading {
        word-break: break-word;
    }

    .sw-detail-provider {
        word-break: break-word;
    }

    .sw-detail-actions {
        flex-wrap: wrap;
        gap: 0.5rem;
        justify-content: flex-start;
    }

    .sw-stat-metric .fs-3 {
        font-size: 1.25rem;
    }

    .sw-stat-metric .small {
        font-size: 11px;
    }
}


/* ═══════════════════════════════════════════════════════════════
   Reports & Audit Log — mobile refinements
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .cat-pills-row .cat-filter-card {
        font-size: 12px;
        padding: 0.35rem 0.65rem;
    }

    .app-filter-bar .app-filter-select[style*="max-width:120px"] {
        flex: 1 1 100%;
        max-width: none;
    }

    .mobile-card-list .badge {
        font-size: 11px;
    }
}
