﻿:root {
        --primary: #0f3d5e;
/*    --primary: #dc3545;*/
        --primary-dark: #08263c;
/*    --primary-dark: #c42130;*/
    --secondary: #f4b63f;
    --bg: #f4f7fb;
    --card: #ffffff;
    --text: #172033;
    --muted: #7a8699;
    --border: #e5e9f2;
    --sidebar-width: 280px;
    --sidebar-collapsed-width: 82px;
    --topbar-height: 76px;
}
html, body {
    height: 100%;
    overflow: hidden; /* åÐÇ Ãåã ÓØÑ */
}
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
}

/*.app-shell {
    min-height: 100vh;
    display: flex;
    background: var(--bg);
    overflow: hidden;*/ /* ãåã ÌÏÇ */
/*}*/
.app-shell {
    height: 100vh; /* ÈÏá min-height */
    display: flex;
    overflow: hidden;
    background: var(--bg);
}

    .app-shell.rtl {
        direction: rtl;
    }

    .app-shell.ltr {
        direction: ltr;
    }

/* Sidebar */
.app-sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(180deg, var(--primary-dark), var(--primary));
    color: #fff;
    position: relative;
    top: 0;
    display: flex;
    flex-direction: column;
    transition: width .25s ease;
    box-shadow: 0 15px 40px rgba(15, 61, 94, .25);
    z-index: 1000;
    overflow: hidden; /* áÇ ÊÌÚá ßá ÇáÜ sidebar íÓßÑæá */
}

.sidebar-collapsed .app-sidebar {
    width: var(--sidebar-collapsed-width);
}

.sidebar-brand {
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 20px;
    border-bottom: 1px solid rgba(255,255,255,.12);
}

.brand-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: rgba(244, 182, 63, .18);
    color: var(--secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.brand-title {
    font-size: 17px;
    font-weight: 800;
    line-height: 1.1;
}

.brand-subtitle {
    font-size: 11px;
    color: rgba(255,255,255,.65);
    margin-top: 3px;
}

.sidebar-nav {
    padding: 16px 12px;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

.nav-section {
    font-size: 11px;
    color: rgba(255,255,255,.45);
    padding: 14px 12px 8px;
    text-transform: uppercase;
    letter-spacing: .8px;
}

.sidebar-collapsed .nav-section,
.sidebar-collapsed .nav-item span,
.sidebar-collapsed .brand-title,
.sidebar-collapsed .brand-subtitle,
.sidebar-collapsed .user-info {
    display: none;
}

.nav-item {
    height: 44px;
    color: rgba(255,255,255,.78);
    text-decoration: none;
    border-radius: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 14px;
    margin-bottom: 6px;
    transition: all .2s ease;
    font-size: 14px;
}

    .nav-item i {
        font-size: 18px;
        width: 22px;
        text-align: center;
    }

    .nav-item:hover {
        background: rgba(255,255,255,.10);
        color: #fff;
    }

    .nav-item.active {
        background: linear-gradient(90deg, var(--secondary), #ffd76d);
        color: #172033;
        font-weight: 700;
        box-shadow: 0 8px 20px rgba(244, 182, 63, .28);
    }

.sidebar-footer {
    padding: 14px;
    border-top: 1px solid rgba(255,255,255,.12);
}

.collapse-btn {
    width: 100%;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: rgba(255,255,255,.10);
    color: #fff;
}

/* Main */
.app-main {
    flex: 1;
    min-width: 0;
}

.app-topbar {
    height: var(--topbar-height);
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 900;
    flex-shrink: 0;
}

.topbar-left,
.topbar-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.mobile-menu-btn {
    width: 42px;
    height: 42px;
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 14px;
    font-size: 22px;
}

.page-heading h5 {
    margin: 0;
    font-weight: 800;
    color: var(--text);
}

.page-heading span {
    font-size: 12px;
    color: var(--muted);
}

.topbar-center {
    flex: 1;
    max-width: 520px;
}

.global-search {
    height: 44px;
    background: #f6f8fc;
    border: 1px solid var(--border);
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
}

    .global-search i {
        color: var(--muted);
    }

    .global-search input {
        border: 0;
        outline: none;
        background: transparent;
        width: 100%;
        font-size: 14px;
    }

.icon-btn {
    min-width: 42px;
    height: 42px;
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 14px;
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    position: relative;
}

    .icon-btn:hover {
        background: #f8fafc;
    }

.notification-btn .notify-dot {
    width: 9px;
    height: 9px;
    background: #ef4444;
    border: 2px solid #fff;
    border-radius: 50%;
    position: absolute;
    top: 9px;
    right: 10px;
}

.rtl .notification-btn .notify-dot {
    right: auto;
    left: 10px;
}

.user-box {
    height: 46px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 10px;
    border-radius: 18px;
    background: #f8fafc;
    border: 1px solid var(--border);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 13px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 13px;
}

.user-info {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

    .user-info strong {
        font-size: 13px;
    }

    .user-info span {
        font-size: 11px;
        color: var(--muted);
    }

/* Content */
.app-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 24px;
}

/* Cards style for pages */
.fm-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 22px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .05);
    padding: 20px;
}

.fm-page-title {
    font-weight: 800;
    margin-bottom: 4px;
}

.fm-page-subtitle {
    color: var(--muted);
    font-size: 13px;
}

/* Responsive */
@media (max-width: 992px) {
    .app-sidebar {
        position: fixed;
        transform: translateX(-100%);
    }

    .rtl .app-sidebar {
        transform: translateX(100%);
    }

    .sidebar-collapsed .app-sidebar {
        transform: translateX(0);
        width: var(--sidebar-width);
    }

    .topbar-center {
        display: none;
    }

    .user-info {
        display: none;
    }

    .app-content {
        padding: 16px;
    }
}

@media (max-width: 576px) {
    .page-heading span {
        display: none;
    }

    .icon-btn span {
        display: none;
    }

    .app-topbar {
        padding: 0 12px;
    }
}

.nav-parent {
    height: 44px;
    color: rgba(255,255,255,.78);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
    margin-bottom: 6px;
    cursor: pointer;
    transition: all .2s ease;
    font-size: 14px;
}

    .nav-parent > div {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .nav-parent i {
        font-size: 18px;
    }

    .nav-parent:hover {
        background: rgba(255,255,255,.10);
        color: #fff;
    }

.nav-children {
    margin: 2px 0 10px;
    padding-inline-start: 18px;
}

.nav-child {
    height: 36px;
    color: rgba(255,255,255,.65);
    text-decoration: none;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 12px;
    margin-bottom: 4px;
    font-size: 13px;
    transition: all .2s ease;
}

    .nav-child i {
        font-size: 9px;
    }

    .nav-child:hover {
        background: rgba(255,255,255,.08);
        color: #fff;
    }

    .nav-child.active {
        background: rgba(244,182,63,.18);
        color: #ffd76d;
        font-weight: 700;
    }

.sidebar-collapsed .nav-parent {
    justify-content: center;
    padding: 0;
}

    .sidebar-collapsed .nav-parent span,
    .sidebar-collapsed .nav-parent .bi-chevron-down,
    .sidebar-collapsed .nav-parent .bi-chevron-up,
    .sidebar-collapsed .nav-children {
        display: none;
    }
 

    /* ÊÍÓíä Ôßá ÇáÇÓßÑæá */
    .sidebar-nav::-webkit-scrollbar {
        width: 6px;
    }

    .sidebar-nav::-webkit-scrollbar-thumb {
        background: rgba(255,255,255,.25);
        border-radius: 10px;
    }

        .sidebar-nav::-webkit-scrollbar-thumb:hover {
            background: rgba(255,255,255,.4);
        }
.app-main {
    flex: 1;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* ãåã */
}
 

    /* Scroll Ìãíá */
    .app-content::-webkit-scrollbar {
        width: 8px;
    }

    .app-content::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 10px;
    }

        .app-content::-webkit-scrollbar-thumb:hover {
            background: #94a3b8;
        }

 
.sidebar-nav,
.app-content {
    scroll-behavior: smooth;
}
.sidebar-nav {
    position: relative;
}

    .sidebar-nav::after {
        content: "";
        position: sticky;
        bottom: 0;
        height: 20px;
        display: block;
        background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.2));
    }

.fm-page {
    animation: fadeIn .25s ease;
}

.fm-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

    .fm-page-header h3 {
        margin: 0;
        font-weight: 900;
        color: var(--text);
    }

    .fm-page-header p {
        margin: 5px 0 0;
        color: var(--muted);
        font-size: 14px;
    }

.fm-action-btn {
    border-radius: 14px;
    padding: 10px 18px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.fm-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.fm-stat-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .05);
}

.stat-icon {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 22px;
}

.bg-blue {
    background: linear-gradient(135deg, #2563eb, #60a5fa);
}

.bg-green {
    background: linear-gradient(135deg, #16a34a, #4ade80);
}

.bg-orange {
    background: linear-gradient(135deg, #ea580c, #fbbf24);
}

.fm-stat-card span {
    color: var(--muted);
    font-size: 13px;
}

.fm-stat-card strong {
    display: block;
    font-size: 24px;
    font-weight: 900;
}

.fm-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.fm-search-box {
    height: 44px;
    flex: 1;
    max-width: 420px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
}

    .fm-search-box i {
        color: var(--muted);
    }

    .fm-search-box input {
        border: 0;
        outline: none;
        background: transparent;
        width: 100%;
    }

.fm-table {
    margin: 0;
}

    .fm-table thead th {
        background: #f8fafc;
        color: #64748b;
        font-size: 12px;
        text-transform: uppercase;
        border-bottom: 1px solid var(--border);
    }

    .fm-table tbody td {
        padding: 14px 12px;
    }

.fm-code {
    background: #eef2ff;
    color: #3730a3;
    padding: 6px 10px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 12px;
}

.fm-soft-badge {
    background: #f1f5f9;
    color: #334155;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 700;
}

.fm-loading,
.fm-empty {
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 12px;
    color: var(--muted);
}

    .fm-empty i {
        font-size: 42px;
        color: #cbd5e1;
    }

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 992px) {
    .fm-page-header {
        flex-direction: column;
        align-items: stretch;
    }

    .fm-stats-grid {
        grid-template-columns: 1fr;
    }

    .fm-toolbar {
        flex-direction: column;
    }

    .fm-search-box {
        max-width: 100%;
    }
}
.fm-criticality {
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 800;
}

    .fm-criticality.low {
        background: #ecfdf5;
        color: #047857;
    }

    .fm-criticality.medium {
        background: #eff6ff;
        color: #1d4ed8;
    }

    .fm-criticality.high {
        background: #fff7ed;
        color: #c2410c;
    }

    .fm-criticality.critical {
        background: #fef2f2;
        color: #b91c1c;
    }

    .fm-criticality.none {
        background: #f1f5f9;
        color: #64748b;
    }
.fm-preview-box {
    background: #f8fafc;
    border: 1px dashed var(--border);
    border-radius: 18px;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.incident-details {
    background: #fff;
}

.details-header {
    background: linear-gradient(135deg, #f8fafc, #eef2ff);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 22px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.details-item {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 16px;
}

    .details-item span {
        display: block;
        color: var(--muted);
        font-size: 12px;
        margin-bottom: 6px;
    }

    .details-item strong {
        font-size: 14px;
        color: var(--text);
    }

@media (max-width: 992px) {
    .details-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .details-header {
        flex-direction: column;
    }
}

@media (max-width: 576px) {
    .details-grid {
        grid-template-columns: 1fr;
    }
}
.status-change-box {
    background: #fff;
}

.status-timeline {
    position: relative;
    padding-inline-start: 20px;
}

.timeline-item {
    position: relative;
    padding-bottom: 18px;
    padding-inline-start: 22px;
    border-inline-start: 2px solid #e2e8f0;
}

.timeline-dot {
    width: 12px;
    height: 12px;
    background: var(--primary);
    border: 3px solid #fff;
    box-shadow: 0 0 0 2px #cbd5e1;
    border-radius: 50%;
    position: absolute;
    inset-inline-start: -7px;
    top: 4px;
}

.timeline-content {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 14px;
}
.fm-table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

    .fm-table-actions .btn {
        border-radius: 12px;
        font-weight: 700;
        display: inline-flex;
        align-items: center;
        gap: 7px;
    }

.fm-selected-row {
    background: #eef6ff !important;
}

    .fm-selected-row td {
        border-color: #bfdbfe;
    }

.incident-attachments-box {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 16px;
}

.attachments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 14px;
}

    .attachments-header h6 {
        margin: 0;
        font-weight: 900;
    }

    .attachments-header small {
        color: var(--muted);
    }

.attachment-upload-btn {
    border-radius: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.attachments-empty {
    min-height: 120px;
    border: 1px dashed var(--border);
    border-radius: 18px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
    color: var(--muted);
}

    .attachments-empty i {
        font-size: 34px;
        color: #cbd5e1;
    }

.attachments-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.attachment-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 12px;
    display: grid;
    grid-template-columns: 42px 1fr auto;
    align-items: center;
    gap: 12px;
}

.attachment-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: #eef2ff;
    color: #3730a3;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.attachment-info {
    min-width: 0;
}

    .attachment-info strong {
        display: block;
        font-size: 13px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .attachment-info small {
        color: var(--muted);
        font-size: 12px;
    }

.attachment-actions {
    display: flex;
    gap: 6px;
}

.small-loading {
    min-height: 100px;
}

@media (max-width: 768px) {
    .attachments-header {
        flex-direction: column;
        align-items: stretch;
    }

    .attachments-grid {
        grid-template-columns: 1fr;
    }

    .attachment-card {
        grid-template-columns: 38px 1fr;
    }

    .attachment-actions {
        grid-column: 1 / -1;
        justify-content: flex-end;
    }
}
.incident-details-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 18px;
}

.incident-main,
.incident-side {
    min-width: 0;
}

.fm-section-title {
    font-weight: 900;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.fm-empty.compact {
    min-height: 120px;
}

.related-wo-card {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 16px;
}

.side-info {
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
}

    .side-info:last-child {
        border-bottom: 0;
    }

    .side-info span {
        display: block;
        color: var(--muted);
        font-size: 12px;
        margin-bottom: 4px;
    }

    .side-info strong {
        font-size: 13px;
    }

@media (max-width: 1100px) {
    .incident-details-layout {
        grid-template-columns: 1fr;
    }
}
.fm-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    width: auto;
    height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
    line-height: 1;
}

    .fm-status-pill i {
        font-size: 7px;
    }

.status-new {
    background: #eef2ff;
    color: #4338ca;
}

.status-review {
    background: #fff7ed;
    color: #c2410c;
}

.status-converted {
    background: #ecfeff;
    color: #0e7490;
}

.status-closed {
    background: #ecfdf5;
    color: #047857;
}

.status-rejected {
    background: #fef2f2;
    color: #b91c1c;
}

.status-default {
    background: #f1f5f9;
    color: #475569;
}
.workorder-details-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 18px;
}

.workorder-main,
.workorder-side {
    min-width: 0;
}

@media (max-width: 1100px) {
    .workorder-details-layout {
        grid-template-columns: 1fr;
    }
}
.workorder-section {
    width: 100%;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.task-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.task-card {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 14px;
    display: grid;
    grid-template-columns: 32px 1fr auto auto;
    gap: 10px;
    align-items: center;
}

    .task-card.completed {
        background: #ecfdf5;
        border-color: #bbf7d0;
    }

.task-check input {
    width: 18px;
    height: 18px;
}

.task-content {
    min-width: 0;
}

    .task-content strong {
        display: block;
        font-size: 14px;
    }

    .task-content small {
        display: block;
        color: var(--muted);
        margin-top: 4px;
    }

.task-completed-info {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    font-size: 12px;
    color: #047857;
    font-weight: 700;
}

@media (max-width: 768px) {
    .section-header {
        flex-direction: column;
        align-items: stretch;
    }

    .task-card {
        grid-template-columns: 32px 1fr;
    }

        .task-card .btn {
            grid-column: span 1;
        }
}
.assignment-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.assignment-card {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 14px;
    display: grid;
    grid-template-columns: 46px 1fr auto;
    gap: 12px;
    align-items: center;
}

.assignment-avatar {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    background: #eef2ff;
    color: #3730a3;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.assignment-info {
    min-width: 0;
}

    .assignment-info strong {
        display: block;
        font-size: 14px;
    }

    .assignment-info small {
        display: block;
        color: var(--muted);
        font-size: 12px;
        margin-top: 3px;
    }

    .assignment-info p {
        font-size: 13px;
        color: #475569;
    }

.assignment-accepted {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    font-size: 12px;
    color: #047857;
    font-weight: 800;
}

.assignment-actions {
    display: flex;
    gap: 6px;
}

@media (max-width: 768px) {
    .assignment-card {
        grid-template-columns: 46px 1fr;
    }

    .assignment-actions {
        grid-column: 1 / -1;
        justify-content: flex-end;
    }
}
.approval-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.approval-card {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 14px;
    display: grid;
    grid-template-columns: 46px 1fr auto;
    gap: 12px;
    align-items: center;
}

.approval-icon {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    background: #f1f5f9;
    color: #475569;
}

    .approval-icon.pending {
        background: #fff7ed;
        color: #c2410c;
    }

    .approval-icon.approved {
        background: #ecfdf5;
        color: #047857;
    }

    .approval-icon.rejected {
        background: #fef2f2;
        color: #b91c1c;
    }

.approval-info {
    min-width: 0;
}

    .approval-info strong {
        display: block;
        font-size: 14px;
    }

    .approval-info small {
        display: block;
        color: var(--muted);
        font-size: 12px;
        margin-top: 3px;
    }

    .approval-info p {
        font-size: 13px;
        color: #475569;
    }

.approval-actions {
    display: flex;
    gap: 6px;
}

@media (max-width: 768px) {
    .approval-card {
        grid-template-columns: 46px 1fr;
    }

    .approval-actions {
        grid-column: 1 / -1;
        justify-content: flex-end;
    }
}
.checklist-item-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checklist-item-card {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 14px;
    display: grid;
    grid-template-columns: 42px 1fr auto;
    gap: 12px;
    align-items: center;
}

.checklist-order {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: #eef2ff;
    color: #3730a3;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
}

.checklist-item-content {
    min-width: 0;
}

    .checklist-item-content strong {
        display: block;
        font-size: 14px;
    }

@media (max-width: 768px) {
    .checklist-item-card {
        grid-template-columns: 42px 1fr;
    }

        .checklist-item-card .d-flex {
            grid-column: 1 / -1;
            justify-content: flex-end;
        }
}
.checklist-results-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checklist-result-card {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 14px;
    display: grid;
    grid-template-columns: 42px 1fr auto;
    gap: 12px;
    align-items: center;
}

.result-status {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    background: #f1f5f9;
    color: #64748b;
}

    .result-status.passed {
        background: #ecfdf5;
        color: #047857;
    }

    .result-status.failed {
        background: #fef2f2;
        color: #b91c1c;
    }

    .result-status.pending {
        background: #f8fafc;
        color: #64748b;
    }

.result-content {
    min-width: 0;
}

    .result-content strong {
        display: block;
        font-size: 14px;
    }

    .result-content p {
        color: #475569;
        font-size: 13px;
    }

.result-controls {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .checklist-result-card {
        grid-template-columns: 42px 1fr;
    }

        .checklist-result-card > button {
            grid-column: 1 / -1;
            justify-self: flex-end;
        }
}
.fm-chart-box {
    height: 310px;
    position: relative;
}

.fm-list {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.fm-list-item {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #eef2f7;
}

    .fm-list-item strong {
        color: #172033;
        font-weight: 800;
    }

    .fm-list-item small {
        display: block;
        color: #667085;
        margin-top: 4px;
    }

.fm-alert-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px;
    border-radius: 16px;
    background: #f8fafc;
}

    .fm-alert-item i {
        width: 36px;
        height: 36px;
        border-radius: 12px;
        display: grid;
        place-items: center;
        color: white;
    }

    .fm-alert-item.danger i {
        background: #ef4444;
    }

    .fm-alert-item.warning i {
        background: #f59e0b;
    }

.bg-red {
    background: #ef4444;
}

.bg-dark {
    background: #111827;
}

.portal-loader-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: radial-gradient(circle at center, rgba(255, 214, 0, .08), transparent 35%), rgba(0, 0, 0, .92);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(7px);
}

.portal-loader-box {
    width: 360px;
    text-align: center;
    color: #ffd600;
    animation: loaderFadeIn .25s ease;
}

.portal-loader-ring {
    width: 240px;
    height: 240px;
    margin: 0 auto 26px;
    border-radius: 50%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .portal-loader-ring::before {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: 50%;
        border: 3px solid rgba(255, 214, 0, .14);
        border-top-color: #ffd600;
        border-right-color: rgba(255, 214, 0, .55);
        filter: drop-shadow(0 0 12px rgba(255, 214, 0, .75));
        animation: loaderSpin 1.3s linear infinite;
    }

    .portal-loader-ring::after {
        content: "";
        position: absolute;
        inset: 22px;
        border-radius: 50%;
        border: 1px solid rgba(255, 214, 0, .18);
        animation: loaderReverseSpin 2.2s linear infinite;
    }

.portal-loader-dot {
    position: absolute;
    width: 16px;
    height: 16px;
    top: 18px;
    left: 50%;
    margin-left: -8px;
    border-radius: 50%;
    background: #ffd600;
    box-shadow: 0 0 18px rgba(255, 214, 0, 1), 0 0 35px rgba(255, 214, 0, .8);
    transform-origin: 8px 102px;
    animation: loaderDotSpin 1.3s linear infinite;
    z-index: 3;
}

.portal-loader-logo {
    width: 118px;
    max-height: 160px;
    object-fit: contain;
    z-index: 2;
    filter: drop-shadow(0 0 12px rgba(255, 214, 0, .65)) drop-shadow(0 0 28px rgba(255, 214, 0, .25));
    animation: loaderLogoPulse 1.6s ease-in-out infinite;
}

.portal-loader-title {
    font-size: 34px;
    font-weight: 900;
    letter-spacing: .5px;
    text-shadow: 0 0 18px rgba(255, 214, 0, .45);
}

.portal-loader-subtitle {
    margin-top: 8px;
    font-size: 15px;
    color: rgba(255, 255, 255, .68);
}

.portal-loader-bar {
    height: 12px;
    width: 100%;
    background: rgba(255, 255, 255, .14);
    border-radius: 999px;
    overflow: hidden;
    margin-top: 28px;
}

    .portal-loader-bar span {
        display: block;
        height: 100%;
        width: 45%;
        border-radius: inherit;
        background: linear-gradient(90deg, #ffd600, #ffea61, #ffd600);
        box-shadow: 0 0 16px rgba(255, 214, 0, .9);
        animation: loaderBarMove 1.35s ease-in-out infinite;
    }

@keyframes loaderSpin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes loaderReverseSpin {
    to {
        transform: rotate(-360deg);
    }
}

@keyframes loaderDotSpin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes loaderLogoPulse {
    0%, 100% {
        transform: scale(1);
        opacity: .95;
    }

    50% {
        transform: scale(1.06);
        opacity: 1;
    }
}

@keyframes loaderBarMove {
    0% {
        transform: translateX(-110%);
    }

    50% {
        transform: translateX(70%);
    }

    100% {
        transform: translateX(230%);
    }
}

@keyframes loaderFadeIn {
    from {
        opacity: 0;
        transform: scale(.96);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}
.dot {
    opacity: 0;
    animation: blinkDot 1.4s infinite;
}

.dot1 {
    animation-delay: 0s;
}

.dot2 {
    animation-delay: .2s;
}

.dot3 {
    animation-delay: .4s;
}

@keyframes blinkDot {
    0%, 20% {
        opacity: 0;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

.assignment-list {
    display: grid;
    gap: 12px;
    max-height: 720px;
    overflow-y: auto;
    padding-inline-end: 4px;
}

.assignment-card {
    border: 1px solid #e5e7eb;
    background: #fff;
    border-radius: 18px;
    padding: 14px;
    cursor: pointer;
    transition: .2s ease;
}

    .assignment-card:hover {
        border-color: #0d6efd;
        box-shadow: 0 8px 24px rgba(13, 110, 253, .08);
        transform: translateY(-1px);
    }

    .assignment-card.selected {
        border-color: #0d6efd;
        background: #f0f7ff;
    }

    .assignment-card h6 {
        font-weight: 800;
        margin: 12px 0 8px;
        color: #172033;
    }

.assignment-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: #667085;
    font-size: .85rem;
}

.selected-wo-box {
    border: 1px solid #e5e7eb;
    background: #f8fafc;
    border-radius: 18px;
    padding: 16px;
}

    .selected-wo-box h5 {
        margin: 12px 0 6px;
        font-weight: 800;
    }

.assignment-list {
    display: grid;
    gap: 8px;
    max-height: calc(100vh - 300px);
    overflow-y: auto;
    padding-inline-end: 6px;
}

.wo-list-item {
    border: 1px solid #e5e7eb;
    background: #fff;
    border-radius: 16px;
    padding: 12px 14px;
    cursor: pointer;
    transition: .18s ease;
}

    .wo-list-item:hover {
        border-color: #2563eb;
        box-shadow: 0 8px 20px rgba(37, 99, 235, .08);
    }

    .wo-list-item.active {
        border-color: #2563eb;
        background: #eff6ff;
    }

.wo-main-line {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.wo-number {
    display: inline-flex;
    padding: 4px 10px;
    border-radius: 999px;
    background: #eef2ff;
    color: #1d4ed8;
    font-size: .75rem;
    font-weight: 800;
    margin-bottom: 6px;
}

.wo-main-line h6 {
    margin: 0;
    font-size: .92rem;
    font-weight: 800;
    color: #111827;
    max-width: 280px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wo-priority {
    padding: 4px 9px;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 800;
    white-space: nowrap;
}

    .wo-priority.high {
        background: #fee2e2;
        color: #b91c1c;
    }

    .wo-priority.medium {
        background: #ffedd5;
        color: #c2410c;
    }

    .wo-priority.low {
        background: #dcfce7;
        color: #15803d;
    }

    .wo-priority.default {
        background: #f1f5f9;
        color: #475569;
    }

.wo-meta-line,
.wo-footer-line {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: #64748b;
    font-size: .78rem;
    margin-top: 9px;
}

    .wo-meta-line span,
    .wo-footer-line span {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        min-width: 0;
    }

.wo-overdue {
    color: #dc2626;
    font-weight: 800;
}

.wo-pending {
    color: #d97706;
    font-weight: 800;
}

.selected-wo-box {
    border: 1px solid #e5e7eb;
    background: linear-gradient(135deg, #f8fafc, #eef6ff);
    border-radius: 20px;
    padding: 18px;
}

    .selected-wo-box h5 {
        margin: 12px 0 6px;
        font-weight: 900;
        color: #111827;
    }

.ai-recommendation-box {
    border: 1px solid #dbeafe;
    background: linear-gradient(135deg, #eff6ff, #f5f3ff);
    border-radius: 20px;
    padding: 16px;
    margin-top: 16px;
}

    .ai-recommendation-box .ai-title {
        display: flex;
        align-items: center;
        gap: 8px;
        font-weight: 900;
        color: #1d4ed8;
        margin-bottom: 12px;
    }

.ai-reason {
    display: flex;
    gap: 8px;
    color: #475569;
    font-size: .85rem;
    margin-top: 6px;
}

.ai-confidence {
    height: 8px;
    background: #dbeafe;
    border-radius: 999px;
    overflow: hidden;
    margin-top: 12px;
}

    .ai-confidence span {
        display: block;
        height: 100%;
        width: 92%;
        background: #2563eb;
    }

.wo-detail-header {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
}

.wo-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

    .wo-detail-grid div {
        background: #fff;
        border: 1px solid #e5e7eb;
        border-radius: 14px;
        padding: 12px;
    }

    .wo-detail-grid span {
        display: block;
        font-size: .75rem;
        color: #64748b;
        margin-bottom: 5px;
    }

    .wo-detail-grid strong {
        font-size: .9rem;
        color: #111827;
    }

.ai-result-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

    .ai-result-grid div {
        background: rgba(255,255,255,.75);
        border: 1px solid #dbeafe;
        border-radius: 14px;
        padding: 12px;
    }

    .ai-result-grid span {
        display: block;
        font-size: .72rem;
        color: #64748b;
        margin-bottom: 4px;
    }

    .ai-result-grid strong {
        font-size: .92rem;
        color: #1e293b;
    }

.ai-score-line {
    display: flex;
    justify-content: space-between;
    margin-top: 14px;
    font-size: .85rem;
    color: #1e3a8a;
    font-weight: 800;
}
.mywo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 16px;
}

.mywo-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    padding: 16px;
    transition: .2s ease;
}

    .mywo-card:hover {
        border-color: #2563eb;
        box-shadow: 0 12px 28px rgba(37, 99, 235, .08);
    }

.mywo-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

    .mywo-card-header h5 {
        font-size: 1rem;
        font-weight: 900;
        margin: 10px 0 0;
        color: #111827;
    }

.mywo-info {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 16px;
}

    .mywo-info div {
        background: #f8fafc;
        border: 1px solid #eef2f7;
        border-radius: 14px;
        padding: 10px;
    }

    .mywo-info span {
        display: block;
        font-size: .72rem;
        color: #64748b;
        margin-bottom: 4px;
    }

    .mywo-info strong {
        color: #111827;
        font-size: .86rem;
    }

.mywo-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}
.wo-timeline {
    position: relative;
    display: grid;
    gap: 18px;
}

.wo-timeline-item {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 14px;
    position: relative;
}

    .wo-timeline-item:not(:last-child)::before {
        content: "";
        position: absolute;
        top: 44px;
        bottom: -18px;
        inset-inline-start: 21px;
        width: 2px;
        background: #e5e7eb;
    }

.wo-timeline-icon {
    width: 44px;
    height: 44px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    color: #fff;
    z-index: 1;
}

.wo-timeline-content {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 14px;
}

    .wo-timeline-content strong {
        color: #111827;
        font-weight: 900;
    }

.wo-timeline-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: #64748b;
    font-size: .85rem;
}

    .wo-timeline-meta span {
        display: inline-flex;
        align-items: center;
        gap: 6px;
    }

.wo-timeline-notes {
    margin: 10px 0 0;
    color: #475569;
    background: #f8fafc;
    border-radius: 12px;
    padding: 10px;
    font-size: .88rem;
}

.timeline-blue {
    background: #2563eb;
}

.timeline-green {
    background: #16a34a;
}

.timeline-red {
    background: #dc2626;
}

.timeline-orange {
    background: #f59e0b;
}

.timeline-purple {
    background: #7c3aed;
}

.timeline-default {
    background: #64748b;
}

.wo-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 16px;
}

.wo-photo-card {
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
}

    .wo-photo-card img {
        width: 100%;
        height: 180px;
        object-fit: cover;
        background: #f8fafc;
    }

.wo-photo-body {
    padding: 12px;
}

    .wo-photo-body strong {
        color: #111827;
        font-weight: 800;
    }

.wo-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e7eb;
}

.wo-tab {
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #475569;
    padding: 10px 14px;
    border-radius: 14px;
    font-weight: 800;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: .18s ease;
}

    .wo-tab:hover {
        border-color: #2563eb;
        color: #2563eb;
        background: #eff6ff;
    }

    .wo-tab.active {
        background: #2563eb;
        border-color: #2563eb;
        color: #fff;
        box-shadow: 0 8px 18px rgba(37, 99, 235, .18);
    }

.wo-tab-content {
    min-height: 240px;
}

    .wo-tab-content > .fm-card {
        box-shadow: none;
        border: 0;
        padding: 0;
        margin-top: 0 !important;
    }

.wo-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 22px;
    overflow: hidden;
}

.wo-tab {
    border: 1px solid transparent;
    background: #ffffff;
    color: #475569;
    padding: 11px 16px;
    border-radius: 16px;
    font-weight: 800;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: .18s ease;
    box-shadow: 0 4px 14px rgba(15, 23, 42, .04);
}

    .wo-tab:hover {
        color: #1d4ed8;
        background: #eff6ff;
        border-color: #bfdbfe;
        transform: translateY(-1px);
    }

    .wo-tab.active {
        background: linear-gradient(135deg, #2563eb, #1d4ed8);
        border-color: #2563eb;
        color: #fff;
        box-shadow: 0 10px 22px rgba(37, 99, 235, .22);
    }

        .wo-tab.active i {
            color: #fff;
        }

.wo-tab-content {
    margin-top: 16px;
    min-height: 260px;
}

    .wo-tab-content > .fm-card {
        box-shadow: none;
        border: 0;
        padding: 0;
        margin-top: 0 !important;
    }

.supervisor-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 22px;
}

.supervisor-tab {
    border: 1px solid transparent;
    background: #fff;
    color: #475569;
    padding: 11px 16px;
    border-radius: 16px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: .18s ease;
}

    .supervisor-tab span {
        background: #eef2ff;
        color: #1d4ed8;
        padding: 2px 8px;
        border-radius: 999px;
        font-size: .75rem;
    }

    .supervisor-tab.active {
        background: #2563eb;
        color: #fff;
        box-shadow: 0 10px 22px rgba(37, 99, 235, .22);
    }

        .supervisor-tab.active span {
            background: rgba(255,255,255,.22);
            color: #fff;
        }

.supervisor-list {
    display: grid;
    gap: 12px;
}

.supervisor-card {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 18px;
    border: 1px solid #e5e7eb;
    background: #fff;
    border-radius: 20px;
    padding: 16px;
}

.supervisor-card-main h5 {
    margin: 10px 0;
    font-weight: 900;
    color: #111827;
}

.supervisor-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    color: #64748b;
    font-size: .85rem;
}

    .supervisor-meta span {
        display: inline-flex;
        align-items: center;
        gap: 6px;
    }

.supervisor-card-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    min-width: 210px;
}

.supervisor-reason {
    margin-top: 12px;
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
    border-radius: 14px;
    padding: 10px;
    font-size: .85rem;
}

@media (max-width: 900px) {
    .supervisor-card {
        grid-template-columns: 1fr;
    }

    .supervisor-card-side {
        align-items: flex-start;
        min-width: auto;
    }
}

.calendar-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
}

    .calendar-toolbar h5 {
        margin: 8px 0 0;
        font-weight: 900;
        color: #111827;
    }

.calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

    .calendar-legend span {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        color: #64748b;
        font-size: .85rem;
        font-weight: 700;
    }

.legend-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    display: inline-block;
}

    .legend-dot.event-critical {
        background: #dc2626;
    }

    .legend-dot.event-high {
        background: #f97316;
    }

    .legend-dot.event-medium {
        background: #eab308;
    }

    .legend-dot.event-low {
        background: #22c55e;
    }

    .legend-dot.event-pm {
        background: #2563eb;
    }

.day-calendar {
    display: grid;
    gap: 8px;
}

.calendar-hour-row {
    display: grid;
    grid-template-columns: 82px 1fr;
    gap: 12px;
    min-height: 82px;
}

.calendar-hour-label {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: #475569;
    font-weight: 900;
}

.calendar-hour-slot {
    border: 1px dashed #dbe3ef;
    border-radius: 14px;
    background: #fbfdff;
    padding: 10px;
    display: grid;
    gap: 8px;
}

.calendar-event-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-inline-start: 5px solid #94a3b8;
    border-radius: 14px;
    padding: 12px;
    cursor: pointer;
    transition: .18s ease;
}

    .calendar-event-card:hover {
        transform: translateY(-1px);
        box-shadow: 0 10px 22px rgba(15, 23, 42, .08);
    }

    .calendar-event-card strong {
        display: block;
        margin: 8px 0;
        color: #111827;
        font-weight: 900;
    }

.calendar-event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: #64748b;
    font-size: .82rem;
}

    .calendar-event-meta span {
        display: inline-flex;
        gap: 5px;
        align-items: center;
    }

.calendar-event-card.event-critical {
    border-inline-start-color: #dc2626;
}

.calendar-event-card.event-high {
    border-inline-start-color: #f97316;
}

.calendar-event-card.event-medium {
    border-inline-start-color: #eab308;
}

.calendar-event-card.event-low {
    border-inline-start-color: #22c55e;
}

.calendar-event-card.event-pm {
    border-inline-start-color: #2563eb;
}
.timeline-toolbar {
    display: grid;
    grid-template-columns: 230px 1fr;
    gap: 16px;
    align-items: end;
}

    .timeline-toolbar h5 {
        margin: 8px 0 0;
        font-weight: 900;
        color: #111827;
    }

.timeline-hours-header {
    display: grid;
    grid-template-columns: repeat(18, 1fr);
    gap: 0;
    color: #64748b;
    font-size: .75rem;
    font-weight: 800;
}

    .timeline-hours-header span {
        text-align: center;
    }

.tech-timeline {
    display: grid;
    gap: 10px;
    margin-top: 16px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.tech-row {
    display: grid;
    grid-template-columns: 230px minmax(900px, 1fr);
    gap: 16px;
    min-height: 88px;
}

.tech-cell {
    border: 1px solid #e5e7eb;
    background: #fff;
    border-radius: 16px;
    padding: 12px;
}

    .tech-cell strong {
        display: block;
        font-weight: 900;
        color: #111827;
    }

    .tech-cell small {
        display: block;
        color: #64748b;
        margin: 4px 0 8px;
    }

.tech-time-grid {
    position: relative;
    display: grid;
    grid-template-columns: repeat(18, 1fr);
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #fbfdff;
    overflow: hidden;
    min-height: 88px;
}

.tech-hour-cell {
    border-inline-end: 1px dashed #dbe3ef;
}

    .tech-hour-cell:last-child {
        border-inline-end: 0;
    }

.tech-event {
    position: absolute;
    top: 12px;
    height: 64px;
    border-radius: 14px;
    padding: 8px 10px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-inline-start: 5px solid #94a3b8;
    overflow: hidden;
    cursor: pointer;
    transition: .18s ease;
}

    .tech-event:hover {
        transform: translateY(-1px);
        box-shadow: 0 12px 24px rgba(15, 23, 42, .12);
        z-index: 5;
    }

    .tech-event strong {
        display: block;
        font-size: .82rem;
        color: #111827;
        font-weight: 900;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        margin: 4px 0;
    }

    .tech-event small {
        color: #64748b;
        font-size: .72rem;
    }

    .tech-event.event-critical {
        border-inline-start-color: #dc2626;
    }

    .tech-event.event-high {
        border-inline-start-color: #f97316;
    }

    .tech-event.event-medium {
        border-inline-start-color: #eab308;
    }

    .tech-event.event-low {
        border-inline-start-color: #22c55e;
    }

    .tech-event.event-pm {
        border-inline-start-color: #2563eb;
    }
.dispatch-board {
    display: grid;
    grid-template-columns: repeat(5, minmax(280px, 1fr));
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.dispatch-column {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 22px;
    min-height: 680px;
    display: flex;
    flex-direction: column;
}

.dispatch-column-header {
    padding: 14px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .dispatch-column-header div {
        display: flex;
        align-items: center;
        gap: 8px;
        color: #111827;
    }

    .dispatch-column-header strong {
        font-weight: 900;
    }

    .dispatch-column-header span {
        background: #eef2ff;
        color: #1d4ed8;
        font-weight: 900;
        border-radius: 999px;
        padding: 4px 10px;
    }

.dispatch-column-body {
    padding: 12px;
    display: grid;
    gap: 12px;
    align-content: start;
    max-height: 720px;
    overflow-y: auto;
}

.dispatch-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-inline-start: 5px solid #94a3b8;
    border-radius: 18px;
    padding: 12px;
    transition: .18s ease;
}

    .dispatch-card:hover {
        transform: translateY(-1px);
        box-shadow: 0 10px 22px rgba(15, 23, 42, .08);
    }

    .dispatch-card.critical {
        border-inline-start-color: #dc2626;
    }

    .dispatch-card.high {
        border-inline-start-color: #f97316;
    }

    .dispatch-card.medium {
        border-inline-start-color: #eab308;
    }

    .dispatch-card.low {
        border-inline-start-color: #22c55e;
    }

    .dispatch-card h6 {
        margin: 10px 0;
        color: #111827;
        font-weight: 900;
        line-height: 1.35;
    }

.dispatch-priority {
    background: #f1f5f9;
    color: #475569;
    border-radius: 999px;
    padding: 4px 9px;
    font-size: .72rem;
    font-weight: 800;
}

.dispatch-meta {
    display: grid;
    gap: 6px;
    color: #64748b;
    font-size: .82rem;
}

    .dispatch-meta span {
        display: inline-flex;
        gap: 6px;
        align-items: center;
    }

.dispatch-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.dispatch-empty {
    display: grid;
    place-items: center;
    gap: 8px;
    min-height: 120px;
    color: #94a3b8;
    font-weight: 800;
}
.heatmap-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 16px;
}

.heatmap-card {
    border: 1px solid #e5e7eb;
    border-top: 5px solid #94a3b8;
    background: #fff;
    border-radius: 22px;
    padding: 16px;
    transition: .18s ease;
}

    .heatmap-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 14px 30px rgba(15, 23, 42, .08);
    }

    .heatmap-card.load-critical {
        border-top-color: #dc2626;
    }

    .heatmap-card.load-high {
        border-top-color: #f97316;
    }

    .heatmap-card.load-medium {
        border-top-color: #eab308;
    }

    .heatmap-card.load-low {
        border-top-color: #22c55e;
    }

.heatmap-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}

    .heatmap-header strong {
        display: block;
        color: #111827;
        font-weight: 900;
    }

    .heatmap-header small {
        display: block;
        color: #64748b;
        margin-top: 4px;
    }

.heatmap-score {
    text-align: center;
    margin: 18px 0 12px;
}

    .heatmap-score span {
        display: block;
        font-size: 2.2rem;
        font-weight: 900;
        color: #111827;
    }

    .heatmap-score small {
        color: #64748b;
        font-weight: 700;
    }

.heatmap-bar {
    height: 11px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
}

    .heatmap-bar span {
        display: block;
        height: 100%;
        background: #2563eb;
    }

.heatmap-card.load-critical .heatmap-bar span {
    background: #dc2626;
}

.heatmap-card.load-high .heatmap-bar span {
    background: #f97316;
}

.heatmap-card.load-medium .heatmap-bar span {
    background: #eab308;
}

.heatmap-card.load-low .heatmap-bar span {
    background: #22c55e;
}

.heatmap-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 16px;
}

    .heatmap-metrics div {
        background: #f8fafc;
        border: 1px solid #eef2f7;
        border-radius: 14px;
        padding: 10px;
        text-align: center;
    }

    .heatmap-metrics span {
        display: block;
        color: #64748b;
        font-size: .72rem;
        margin-bottom: 4px;
    }

    .heatmap-metrics strong {
        color: #111827;
        font-weight: 900;
    }
.sla-filter-bar {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.sla-list {
    display: grid;
    gap: 14px;
}

.sla-card {
    display: grid;
    grid-template-columns: 1fr 330px auto;
    gap: 18px;
    align-items: center;
    border: 1px solid #e5e7eb;
    border-inline-start: 6px solid #94a3b8;
    border-radius: 20px;
    background: #fff;
    padding: 16px;
}

    .sla-card.sla-within {
        border-inline-start-color: #22c55e;
    }

    .sla-card.sla-risk {
        border-inline-start-color: #f97316;
    }

    .sla-card.sla-breached {
        border-inline-start-color: #dc2626;
        background: #fff7f7;
    }

.sla-main h5 {
    margin: 10px 0;
    font-weight: 900;
    color: #111827;
}

.sla-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    color: #64748b;
    font-size: .85rem;
}

    .sla-meta span {
        display: inline-flex;
        align-items: center;
        gap: 6px;
    }

.sla-pill {
    padding: 6px 11px;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 900;
    white-space: nowrap;
}

    .sla-pill.sla-within {
        background: #dcfce7;
        color: #15803d;
    }

    .sla-pill.sla-risk {
        background: #ffedd5;
        color: #c2410c;
    }

    .sla-pill.sla-breached {
        background: #fee2e2;
        color: #b91c1c;
    }

.sla-timer strong {
    display: block;
    color: #111827;
    font-size: 1.6rem;
    font-weight: 900;
}

.sla-timer small {
    color: #64748b;
    font-weight: 700;
}

.sla-progress {
    height: 9px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
    margin: 12px 0;
}

    .sla-progress span {
        display: block;
        height: 100%;
        background: #22c55e;
    }

.sla-card.sla-risk .sla-progress span {
    background: #f97316;
}

.sla-card.sla-breached .sla-progress span {
    background: #dc2626;
}

.sla-dates {
    display: grid;
    gap: 4px;
    color: #64748b;
    font-size: .78rem;
}

.sla-actions {
    display: flex;
    justify-content: flex-end;
}

@media (max-width: 1100px) {
    .sla-card {
        grid-template-columns: 1fr;
    }

    .sla-actions {
        justify-content: flex-start;
    }
}

.exec-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.exec-kpi-card {
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    border: 1px solid #e5e7eb;
    border-radius: 24px;
    padding: 18px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .05);
}

    .exec-kpi-card span {
        display: block;
        color: #64748b;
        font-size: .85rem;
        font-weight: 800;
    }

    .exec-kpi-card strong {
        display: block;
        margin: 12px 0 6px;
        font-size: 2rem;
        font-weight: 950;
        color: #111827;
    }

    .exec-kpi-card small {
        color: #94a3b8;
        font-weight: 700;
    }

    .exec-kpi-card.success {
        border-top: 5px solid #22c55e;
    }

    .exec-kpi-card.danger {
        border-top: 5px solid #dc2626;
    }

    .exec-kpi-card.cost {
        border-top: 5px solid #7c3aed;
    }

.exec-chart-list {
    display: grid;
    gap: 14px;
}

.exec-chart-row {
    display: grid;
    gap: 8px;
}

.exec-chart-label {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

    .exec-chart-label span {
        color: #475569;
        font-weight: 800;
    }

    .exec-chart-label strong {
        color: #111827;
        font-weight: 900;
    }

.exec-chart-bar {
    height: 12px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
}

    .exec-chart-bar span {
        display: block;
        height: 100%;
        background: linear-gradient(135deg, #2563eb, #1d4ed8);
    }

.asset-health-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 16px;
}

.asset-health-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-top: 5px solid #94a3b8;
    border-radius: 24px;
    padding: 16px;
    transition: .18s ease;
}

    .asset-health-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 14px 30px rgba(15, 23, 42, .08);
    }

    .asset-health-card.risk-healthy {
        border-top-color: #22c55e;
    }

    .asset-health-card.risk-warning {
        border-top-color: #f97316;
    }

    .asset-health-card.risk-critical {
        border-top-color: #dc2626;
    }

.asset-health-header {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
}

    .asset-health-header h5 {
        margin: 10px 0 4px;
        color: #111827;
        font-weight: 900;
    }

    .asset-health-header small {
        color: #64748b;
    }

.asset-health-score {
    width: 72px;
    height: 72px;
    border-radius: 22px;
    background: #f8fafc;
    display: grid;
    place-items: center;
    text-align: center;
}

    .asset-health-score strong {
        font-size: 1.45rem;
        color: #111827;
        font-weight: 950;
        line-height: 1;
    }

    .asset-health-score span {
        font-size: .7rem;
        color: #64748b;
        font-weight: 800;
    }

.asset-health-bar {
    height: 11px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
    margin: 16px 0;
}

    .asset-health-bar span {
        display: block;
        height: 100%;
        background: #22c55e;
    }

.asset-health-card.risk-warning .asset-health-bar span {
    background: #f97316;
}

.asset-health-card.risk-critical .asset-health-bar span {
    background: #dc2626;
}

.asset-health-metrics {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

    .asset-health-metrics div {
        background: #f8fafc;
        border: 1px solid #eef2f7;
        border-radius: 14px;
        padding: 10px;
        text-align: center;
    }

    .asset-health-metrics span {
        display: block;
        color: #64748b;
        font-size: .72rem;
        margin-bottom: 4px;
    }

    .asset-health-metrics strong {
        color: #111827;
        font-weight: 900;
        font-size: .88rem;
    }

.cost-chart-list {
    display: grid;
    gap: 14px;
}

.cost-chart-row {
    display: grid;
    gap: 8px;
}

.cost-chart-label {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

    .cost-chart-label span {
        color: #475569;
        font-weight: 800;
    }

    .cost-chart-label strong {
        color: #111827;
        font-weight: 900;
    }

.cost-chart-bar {
    height: 12px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
}

    .cost-chart-bar span {
        display: block;
        height: 100%;
        background: linear-gradient(135deg, #7c3aed, #2563eb);
    }

.reliability-chart-list {
    display: grid;
    gap: 14px;
}

.reliability-chart-row {
    display: grid;
    gap: 8px;
}

.reliability-chart-label {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

    .reliability-chart-label span {
        color: #475569;
        font-weight: 800;
    }

    .reliability-chart-label strong {
        color: #111827;
        font-weight: 900;
    }

.reliability-chart-bar {
    height: 12px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
}

    .reliability-chart-bar span {
        display: block;
        height: 100%;
        background: linear-gradient(135deg, #dc2626, #f97316);
    }
.asset-health-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(390px, 1fr));
    gap: 16px;
}

.asset-health-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-top: 5px solid #94a3b8;
    border-radius: 24px;
    padding: 16px;
    transition: .18s ease;
}

    .asset-health-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 14px 30px rgba(15, 23, 42, .08);
    }

    .asset-health-card.risk-healthy {
        border-top-color: #22c55e;
    }

    .asset-health-card.risk-warning {
        border-top-color: #f97316;
    }

    .asset-health-card.risk-critical {
        border-top-color: #dc2626;
    }

.asset-health-header {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
}

    .asset-health-header h5 {
        margin: 10px 0 4px;
        color: #111827;
        font-weight: 900;
    }

    .asset-health-header small {
        color: #64748b;
    }

.asset-health-score {
    min-width: 76px;
    height: 76px;
    border-radius: 24px;
    background: #f8fafc;
    display: grid;
    place-items: center;
    text-align: center;
}

    .asset-health-score strong {
        font-size: 1.5rem;
        color: #111827;
        font-weight: 950;
        line-height: 1;
    }

    .asset-health-score span {
        font-size: .7rem;
        color: #64748b;
        font-weight: 800;
    }

.asset-health-risk {
    display: flex;
    justify-content: flex-end;
}

.asset-risk-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    padding: 6px 11px;
    font-size: .78rem;
    font-weight: 900;
    background: #f1f5f9;
    color: #475569;
}

    .asset-risk-badge.healthy {
        background: #dcfce7;
        color: #15803d;
    }

    .asset-risk-badge.warning {
        background: #ffedd5;
        color: #c2410c;
    }

    .asset-risk-badge.critical {
        background: #fee2e2;
        color: #b91c1c;
    }

.asset-health-bar {
    height: 11px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
    margin: 16px 0;
}

    .asset-health-bar span {
        display: block;
        height: 100%;
        background: #22c55e;
    }

.asset-health-card.risk-warning .asset-health-bar span {
    background: #f97316;
}

.asset-health-card.risk-critical .asset-health-bar span {
    background: #dc2626;
}

.asset-health-reason {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 10px 12px;
    color: #475569;
    font-size: .85rem;
}

    .asset-health-reason strong {
        color: #111827;
        font-weight: 900;
    }

.asset-health-subscores {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

    .asset-health-subscores > div {
        background: #ffffff;
        border: 1px solid #eef2f7;
        border-radius: 14px;
        padding: 10px;
    }

    .asset-health-subscores span {
        display: block;
        color: #64748b;
        font-size: .72rem;
        margin-bottom: 4px;
    }

    .asset-health-subscores strong {
        color: #111827;
        font-weight: 900;
        font-size: .86rem;
    }

.mini-score-bar {
    height: 7px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
    margin-top: 7px;
}

    .mini-score-bar span {
        display: block;
        height: 100%;
        background: #2563eb;
    }

.asset-health-metrics {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

    .asset-health-metrics div {
        background: #f8fafc;
        border: 1px solid #eef2f7;
        border-radius: 14px;
        padding: 10px;
        text-align: center;
    }

    .asset-health-metrics span {
        display: block;
        color: #64748b;
        font-size: .72rem;
        margin-bottom: 4px;
    }

    .asset-health-metrics strong {
        color: #111827;
        font-weight: 900;
        font-size: .88rem;
    }

@media (max-width: 700px) {
    .asset-health-grid {
        grid-template-columns: 1fr;
    }

    .asset-health-metrics {
        grid-template-columns: repeat(2, 1fr);
    }

    .asset-health-subscores {
        grid-template-columns: 1fr;
    }
}

/*PM Dashboard*/
.pm-score-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 24px;
    padding: 18px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .05);
}

    .pm-score-card > span {
        color: #64748b;
        font-weight: 800;
        font-size: .85rem;
    }

    .pm-score-card > strong {
        display: block;
        margin: 12px 0;
        color: #111827;
        font-size: 2.1rem;
        font-weight: 950;
    }

.pm-score-bar {
    height: 12px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
    margin: 16px 0;
}

    .pm-score-bar span {
        display: block;
        height: 100%;
        background: linear-gradient(135deg, #22c55e, #2563eb);
    }

.pm-score-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

    .pm-score-grid div {
        background: #f8fafc;
        border: 1px solid #eef2f7;
        border-radius: 14px;
        padding: 10px;
        text-align: center;
    }

    .pm-score-grid span {
        display: block;
        color: #64748b;
        font-size: .72rem;
        margin-bottom: 4px;
    }

    .pm-score-grid strong {
        color: #111827;
        font-weight: 900;
    }

.pm-score-info {
    background: #f8fafc;
    border: 1px solid #eef2f7;
    border-radius: 16px;
    padding: 12px;
    color: #64748b;
    font-size: .85rem;
    line-height: 1.7;
}

.pm-chart-list {
    display: grid;
    gap: 14px;
}

.pm-chart-row {
    display: grid;
    gap: 8px;
}

.pm-chart-label {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

    .pm-chart-label span {
        color: #475569;
        font-weight: 800;
    }

    .pm-chart-label strong {
        color: #111827;
        font-weight: 900;
    }

.pm-chart-bar {
    height: 12px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
}

    .pm-chart-bar span {
        display: block;
        height: 100%;
        background: linear-gradient(135deg, #22c55e, #2563eb);
    }

.pm-list {
    display: grid;
    gap: 12px;
}

.pm-list-item {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid #e5e7eb;
    border-inline-start: 5px solid #2563eb;
    border-radius: 18px;
    padding: 12px;
    background: #fff;
}

    .pm-list-item.overdue {
        border-inline-start-color: #dc2626;
        background: #fff7f7;
    }

    .pm-list-item strong {
        display: block;
        color: #111827;
        font-weight: 900;
        margin: 7px 0;
    }

    .pm-list-item small {
        display: block;
        color: #64748b;
        margin-top: 4px;
        font-size: .78rem;
    }

@media (max-width: 700px) {
    .pm-list-item {
        flex-direction: column;
    }

    .pm-score-grid {
        grid-template-columns: 1fr;
    }
}

/*KPI dashboard */
.kpi-hero-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.kpi-hero-card {
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    border: 1px solid #e5e7eb;
    border-top: 5px solid #2563eb;
    border-radius: 24px;
    padding: 18px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .05);
}

    .kpi-hero-card.success {
        border-top-color: #22c55e;
    }

    .kpi-hero-card.warning {
        border-top-color: #f97316;
    }

    .kpi-hero-card.danger {
        border-top-color: #dc2626;
    }

    .kpi-hero-card.cost {
        border-top-color: #7c3aed;
    }

    .kpi-hero-card span {
        display: block;
        color: #64748b;
        font-size: .85rem;
        font-weight: 800;
    }

    .kpi-hero-card strong {
        display: block;
        margin: 12px 0 6px;
        font-size: 2rem;
        font-weight: 950;
        color: #111827;
    }

    .kpi-hero-card small {
        color: #94a3b8;
        font-weight: 700;
    }

.kpi-chart-list {
    display: grid;
    gap: 14px;
}

.kpi-chart-row {
    display: grid;
    gap: 8px;
}

.kpi-chart-label {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

    .kpi-chart-label span {
        color: #475569;
        font-weight: 800;
    }

    .kpi-chart-label strong {
        color: #111827;
        font-weight: 900;
    }

.kpi-chart-bar {
    height: 12px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
}

    .kpi-chart-bar span {
        display: block;
        height: 100%;
        background: linear-gradient(135deg, #2563eb, #7c3aed);
    }
/* benchmark dashboard*/
.benchmark-score-card {
    background: linear-gradient(135deg, #111827, #1e293b);
    color: #fff;
    border-radius: 28px;
    padding: 24px;
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: center;
    box-shadow: 0 16px 34px rgba(15, 23, 42, .18);
}

    .benchmark-score-card span {
        display: block;
        color: #cbd5e1;
        font-weight: 800;
    }

    .benchmark-score-card strong {
        display: block;
        font-size: 3rem;
        font-weight: 950;
        margin: 10px 0;
    }

    .benchmark-score-card small {
        color: #94a3b8;
        font-weight: 700;
    }

.benchmark-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 1.8rem;
    font-weight: 950;
    background: #2563eb;
    border: 8px solid rgba(255,255,255,.14);
}

    .benchmark-circle.benchmark-passed {
        background: #16a34a;
    }

    .benchmark-circle.benchmark-warning {
        background: #f97316;
    }

    .benchmark-circle.benchmark-failed {
        background: #dc2626;
    }

.benchmark-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 16px;
}

.benchmark-card {
    border: 1px solid #e5e7eb;
    border-top: 5px solid #94a3b8;
    border-radius: 24px;
    background: #fff;
    padding: 16px;
    transition: .18s ease;
}

    .benchmark-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 14px 30px rgba(15, 23, 42, .08);
    }

    .benchmark-card.benchmark-passed {
        border-top-color: #22c55e;
    }

    .benchmark-card.benchmark-warning {
        border-top-color: #f97316;
    }

    .benchmark-card.benchmark-failed {
        border-top-color: #dc2626;
    }

.benchmark-card-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}

    .benchmark-card-header h5 {
        margin: 10px 0 0;
        color: #111827;
        font-weight: 900;
    }

.benchmark-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    padding: 6px 11px;
    font-size: .78rem;
    font-weight: 900;
    white-space: nowrap;
}

    .benchmark-status.benchmark-passed {
        background: #dcfce7;
        color: #15803d;
    }

    .benchmark-status.benchmark-warning {
        background: #ffedd5;
        color: #c2410c;
    }

    .benchmark-status.benchmark-failed {
        background: #fee2e2;
        color: #b91c1c;
    }

.benchmark-values {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 16px 0;
}

    .benchmark-values div {
        background: #f8fafc;
        border: 1px solid #eef2f7;
        border-radius: 14px;
        padding: 10px;
        text-align: center;
    }

    .benchmark-values span {
        display: block;
        color: #64748b;
        font-size: .72rem;
        margin-bottom: 4px;
    }

    .benchmark-values strong {
        color: #111827;
        font-weight: 900;
        font-size: .86rem;
    }

.benchmark-progress {
    height: 11px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
}

    .benchmark-progress span {
        display: block;
        height: 100%;
        background: #2563eb;
    }

.benchmark-card.benchmark-passed .benchmark-progress span {
    background: #22c55e;
}

.benchmark-card.benchmark-warning .benchmark-progress span {
    background: #f97316;
}

.benchmark-card.benchmark-failed .benchmark-progress span {
    background: #dc2626;
}

.benchmark-notes {
    margin-top: 14px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 10px 12px;
    color: #475569;
    font-size: .85rem;
    line-height: 1.6;
}

@media (max-width: 700px) {
    .benchmark-score-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .benchmark-grid {
        grid-template-columns: 1fr;
    }

    .benchmark-values {
        grid-template-columns: 1fr;
    }
}

/*vendors and contrac */
/* =========================================================
   Enterprise Detail Tabs - Horizontal Hidden Scroll
   Same style as Work Order Details tabs
========================================================= */

.fm-detail-tabs-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    padding: 22px;
    box-shadow: 0 12px 35px rgba(15, 23, 42, 0.06);
}

.fm-detail-tabs {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    background: #f8fafc;
    border: 1px solid #dbe3ef;
    border-radius: 22px;
    padding: 12px;
    margin-bottom: 18px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

    .fm-detail-tabs::-webkit-scrollbar {
        display: none;
        width: 0;
        height: 0;
    }

.fm-detail-tab {
    flex: 0 0 auto;
    min-height: 54px;
    min-width: 135px;
    max-width: 190px;
    padding: 0 20px;
    border: 1px solid transparent;
    border-radius: 16px;
    background: #ffffff;
    color: #243b53;
    font-size: 0.96rem;
    font-weight: 800;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
    transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

    .fm-detail-tab i {
        font-size: 1.05rem;
        color: inherit;
        flex-shrink: 0;
    }

    .fm-detail-tab:hover {
        background: #eff6ff;
        color: #1d4ed8;
        border-color: #bfdbfe;
        transform: translateY(-2px);
        box-shadow: 0 12px 26px rgba(37, 99, 235, 0.14);
    }

    .fm-detail-tab.active {
        background: #2563eb;
        color: #ffffff;
        border-color: #2563eb;
        box-shadow: 0 14px 28px rgba(37, 99, 235, 0.30);
    }

        .fm-detail-tab.active:hover {
            background: #1d4ed8;
            color: #ffffff;
            border-color: #1d4ed8;
            transform: translateY(-2px);
            box-shadow: 0 16px 32px rgba(37, 99, 235, 0.35);
        }

.fm-detail-tab-content {
    padding-top: 4px;
}

/* Tablet */
@media (max-width: 1199px) {
    .fm-detail-tab {
        min-width: 140px;
        max-width: 185px;
        padding: 0 18px;
        font-size: 0.94rem;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .fm-detail-tabs-card {
        padding: 14px;
        border-radius: 18px;
    }

    .fm-detail-tabs {
        border-radius: 18px;
        padding: 10px;
        gap: 8px;
    }

    .fm-detail-tab {
        min-height: 48px;
        min-width: 135px;
        max-width: 170px;
        padding: 0 14px;
        font-size: 0.9rem;
        border-radius: 14px;
    }
}

/* =========================================================
   Enterprise Add Button
   Used in Facilities detail tabs and forms
========================================================= */

.fm-add-btn {
    border: 0;
    min-height: 38px;
    padding: 0 16px;
    border-radius: 999px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
    font-weight: 800;
    font-size: 0.88rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.26);
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

    .fm-add-btn:hover {
        color: #ffffff;
        background: linear-gradient(135deg, #1d4ed8, #1e40af);
        transform: translateY(-2px);
        box-shadow: 0 14px 28px rgba(37, 99, 235, 0.34);
    }

    .fm-add-btn:active {
        transform: translateY(0);
        box-shadow: 0 8px 18px rgba(37, 99, 235, 0.24);
    }

    .fm-add-btn i {
        font-size: 1rem;
    }


/* Enterprise dashboard charts */
.fm-chart-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    padding: 20px;
    box-shadow: 0 14px 35px rgba(15, 23, 42, .06);
    height: 100%;
}

.fm-chart-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

    .fm-chart-header h6 {
        margin: 0;
        color: #0f172a;
        font-size: 1rem;
        font-weight: 900;
        display: flex;
        align-items: center;
        gap: 9px;
    }

        .fm-chart-header h6 i {
            color: #2563eb;
            font-size: 1.1rem;
        }

    .fm-chart-header p {
        margin: 6px 0 0;
        color: #64748b;
        font-size: .86rem;
        font-weight: 600;
    }

.fm-chart-body {
    position: relative;
    width: 100%;
}

.fm-chart-body-sm {
    height: 240px;
}

.fm-chart-body-md {
    height: 310px;
}

.fm-chart-body-lg {
    height: 370px;
}

.fm-chart-body-xl {
    height: 430px;
}

@media (max-width: 768px) {
    .fm-chart-card {
        border-radius: 18px;
        padding: 14px;
    }

    .fm-chart-body-md,
    .fm-chart-body-lg,
    .fm-chart-body-xl {
        height: 280px;
    }
}
/* ==========================================================
   Enterprise KPI Cards - Global System Style
========================================================== */

.fm-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.fm-kpi-card {
    position: relative;
    overflow: hidden;
    min-height: 158px;
    border-radius: 22px;
    padding: 20px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    border: 1px solid #dbe5f1;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .06);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

    .fm-kpi-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 18px 40px rgba(15, 23, 42, .10);
        border-color: rgba(37, 99, 235, .25);
    }

.fm-kpi-accent {
    position: absolute;
    inset-inline-start: 0;
    top: 0;
    width: 5px;
    height: 100%;
    background: var(--kpi-color);
}

.fm-kpi-card::after {
    content: "";
    position: absolute;
    inset-inline-end: -55px;
    top: -65px;
    width: 150px;
    height: 150px;
    border-radius: 999px;
    background: var(--kpi-soft);
    opacity: .75;
}

.fm-kpi-top {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
}

.fm-kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--kpi-soft);
    color: var(--kpi-color);
    border: 1px solid var(--kpi-border);
}

    .fm-kpi-icon i {
        font-size: 1.45rem;
    }

.fm-kpi-badge {
    min-height: 28px;
    padding: 0 11px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--kpi-color);
    background: var(--kpi-soft);
    border: 1px solid var(--kpi-border);
    font-size: .76rem;
    font-weight: 850;
    white-space: nowrap;
}

.fm-kpi-content {
    position: relative;
    z-index: 2;
}

.fm-kpi-title {
    display: block;
    color: #64748b;
    font-size: .84rem;
    font-weight: 800;
    margin-bottom: 6px;
}

.fm-kpi-value {
    display: block;
    color: #0f172a;
    font-size: 2rem;
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -.035em;
    margin-bottom: 8px;
}

.fm-kpi-subtitle {
    margin: 0;
    color: #64748b;
    font-size: .82rem;
    font-weight: 600;
    line-height: 1.5;
}

.fm-kpi-progress-wrap {
    position: relative;
    z-index: 2;
    margin-top: 15px;
}

.fm-kpi-progress-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 7px;
    color: #64748b;
    font-size: .74rem;
    font-weight: 800;
}

    .fm-kpi-progress-info strong {
        color: var(--kpi-color);
    }

.fm-kpi-progress {
    height: 7px;
    border-radius: 999px;
    background: #eef2f7;
    overflow: hidden;
}

    .fm-kpi-progress span {
        display: block;
        height: 100%;
        border-radius: 999px;
        background: linear-gradient(90deg, var(--kpi-color), var(--kpi-color-2));
    }

/* Variants */
.fm-kpi-primary {
    --kpi-color: #2563eb;
    --kpi-color-2: #60a5fa;
    --kpi-soft: rgba(37, 99, 235, .10);
    --kpi-border: rgba(37, 99, 235, .18);
}

.fm-kpi-success {
    --kpi-color: #059669;
    --kpi-color-2: #34d399;
    --kpi-soft: rgba(5, 150, 105, .10);
    --kpi-border: rgba(5, 150, 105, .18);
}

.fm-kpi-warning {
    --kpi-color: #d97706;
    --kpi-color-2: #fbbf24;
    --kpi-soft: rgba(217, 119, 6, .11);
    --kpi-border: rgba(217, 119, 6, .18);
}

.fm-kpi-danger {
    --kpi-color: #dc2626;
    --kpi-color-2: #fb7185;
    --kpi-soft: rgba(220, 38, 38, .10);
    --kpi-border: rgba(220, 38, 38, .18);
}

.fm-kpi-info {
    --kpi-color: #0891b2;
    --kpi-color-2: #22d3ee;
    --kpi-soft: rgba(8, 145, 178, .10);
    --kpi-border: rgba(8, 145, 178, .18);
}

.fm-kpi-purple {
    --kpi-color: #7c3aed;
    --kpi-color-2: #a78bfa;
    --kpi-soft: rgba(124, 58, 237, .10);
    --kpi-border: rgba(124, 58, 237, .18);
}

.fm-kpi-dark {
    --kpi-color: #334155;
    --kpi-color-2: #64748b;
    --kpi-soft: rgba(51, 65, 85, .09);
    --kpi-border: rgba(51, 65, 85, .16);
}

@media (max-width: 1400px) {
    .fm-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .fm-kpi-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .fm-kpi-card {
        min-height: 145px;
        border-radius: 18px;
        padding: 17px;
    }

    .fm-kpi-value {
        font-size: 1.7rem;
    }
}

/* ==========================================================
   Contract Dashboard Enterprise V2
========================================================== */

.fm-dashboard-shell {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.fm-executive-panel {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 52%, #2563eb 100%);
    border-radius: 28px;
    padding: 26px;
    color: #fff;
    box-shadow: 0 22px 55px rgba(15, 23, 42, .20);
    position: relative;
    overflow: hidden;
}

    .fm-executive-panel::after {
        content: "";
        position: absolute;
        width: 320px;
        height: 320px;
        border-radius: 999px;
        inset-inline-end: -110px;
        top: -140px;
        background: rgba(255, 255, 255, .12);
    }

    .fm-executive-panel h4 {
        margin: 0;
        font-weight: 950;
        letter-spacing: -.03em;
    }

    .fm-executive-panel p {
        margin: 8px 0 0;
        color: rgba(255,255,255,.76);
        font-weight: 600;
    }

.fm-executive-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 22px;
    position: relative;
    z-index: 2;
}

.fm-executive-metric {
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 20px;
    padding: 16px;
    backdrop-filter: blur(14px);
}

    .fm-executive-metric span {
        display: block;
        color: rgba(255,255,255,.72);
        font-size: .78rem;
        font-weight: 750;
        margin-bottom: 7px;
    }

    .fm-executive-metric strong {
        display: block;
        color: #fff;
        font-size: 1.45rem;
        font-weight: 950;
    }

.fm-chart-badge {
    border-radius: 999px;
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
    padding: 6px 11px;
    font-size: .76rem;
    font-weight: 850;
    white-space: nowrap;
}

.fm-chart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #64748b;
    text-align: center;
    background: radial-gradient(circle at 50% 20%, rgba(37,99,235,.08), transparent 34%), #fbfdff;
    border: 1px dashed #cbd5e1;
    border-radius: 18px;
    padding: 20px;
}

.fm-chart-empty-icon {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    background: #eff6ff;
    color: #2563eb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

    .fm-chart-empty-icon i {
        font-size: 1.55rem;
    }

.fm-chart-empty strong {
    color: #0f172a;
    font-size: 1rem;
    font-weight: 900;
}

.fm-chart-empty p {
    max-width: 310px;
    margin: 7px auto 0;
    font-size: .84rem;
    font-weight: 600;
    line-height: 1.5;
}

.fm-alert-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

    .fm-alert-section-title h5 {
        margin: 0;
        font-size: 1.05rem;
        font-weight: 950;
        color: #0f172a;
        display: flex;
        align-items: center;
        gap: 9px;
    }

    .fm-alert-section-title p {
        margin: 4px 0 0;
        color: #64748b;
        font-size: .84rem;
        font-weight: 600;
    }

.fm-risk-score {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 13px;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 900;
}

    .fm-risk-score.low {
        color: #059669;
        background: rgba(5,150,105,.11);
    }

    .fm-risk-score.medium {
        color: #d97706;
        background: rgba(217,119,6,.12);
    }

    .fm-risk-score.high {
        color: #dc2626;
        background: rgba(220,38,38,.11);
    }

@media (max-width: 1400px) {
    .fm-executive-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .fm-executive-panel {
        border-radius: 20px;
        padding: 20px;
    }

    .fm-executive-metrics {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================
   Contract Alerts Page
========================================================== */

.fm-alert-icon-box {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
}

    .fm-alert-icon-box i {
        font-size: 1.25rem;
    }

    .fm-alert-icon-box.danger {
        color: #dc2626;
        background: rgba(220, 38, 38, .10);
        border-color: rgba(220, 38, 38, .16);
    }

    .fm-alert-icon-box.warning {
        color: #d97706;
        background: rgba(217, 119, 6, .11);
        border-color: rgba(217, 119, 6, .16);
    }

    .fm-alert-icon-box.info {
        color: #0891b2;
        background: rgba(8, 145, 178, .10);
        border-color: rgba(8, 145, 178, .16);
    }

    .fm-alert-icon-box.muted {
        color: #64748b;
        background: rgba(100, 116, 139, .10);
        border-color: rgba(100, 116, 139, .16);
    }

.fm-alert-row-critical {
    background: linear-gradient(90deg, rgba(220, 38, 38, .055), transparent 55%);
}

.fm-alert-row-high {
    background: linear-gradient(90deg, rgba(217, 119, 6, .055), transparent 55%);
}

.fm-alert-row-closed {
    opacity: .72;
    background: #f8fafc;
}

/* =========================================================
   Smart Assignment Modal
========================================================= */

.fm-assignment-modal-body {
    max-height: 70vh;
    overflow-y: auto;
    padding-inline-end: 4px;
}

.fm-assignment-layout {
    display: grid;
    grid-template-columns: 440px minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

.fm-assignment-side-card {
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 1rem;
    background: #fff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
    min-width: 0;
}

.fm-assignment-table-card {
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    background: #fff;
    overflow: hidden;
    min-width: 0;
}

.fm-assignment-mini-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
}

.fm-assignment-mini-stat {
    border: 1px solid #e5e7eb;
    background: #f8fafc;
    border-radius: 14px;
    padding: .85rem;
    min-width: 0;
}

    .fm-assignment-mini-stat span {
        display: block;
        font-size: .78rem;
        color: #64748b;
        margin-bottom: .35rem;
        line-height: 1.35;
    }

    .fm-assignment-mini-stat strong {
        display: block;
        font-size: .95rem;
        color: #0f172a;
        line-height: 1.45;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

.fm-assignment-table-scroll {
    width: 100%;
    overflow-x: auto;
    overflow-y: visible;
}

.fm-assignment-table {
    min-width: 1200px;
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
}

    .fm-assignment-table th,
    .fm-assignment-table td {
        white-space: normal;
        vertical-align: middle;
    }

        .fm-assignment-table th:nth-child(1),
        .fm-assignment-table td:nth-child(1) {
            position: sticky;
            left: 0;
            z-index: 4;
            width: 46px;
            min-width: 46px;
            max-width: 46px;
            background: #fff;
        }

        .fm-assignment-table th:nth-child(2),
        .fm-assignment-table td:nth-child(2) {
            position: sticky;
            left: 46px;
            z-index: 4;
            width: 210px;
            min-width: 210px;
            max-width: 210px;
            background: #fff;
            box-shadow: 8px 0 12px rgba(15, 23, 42, 0.05);
        }

        .fm-assignment-table th:last-child,
        .fm-assignment-table td:last-child {
            position: sticky;
            right: 0;
            z-index: 4;
            width: 160px;
            min-width: 160px;
            max-width: 160px;
            background: #fff;
            box-shadow: -8px 0 12px rgba(15, 23, 42, 0.05);
        }

    .fm-assignment-table thead th {
        background: #f8fafc !important;
        z-index: 5;
    }

        .fm-assignment-table thead th:nth-child(1),
        .fm-assignment-table thead th:nth-child(2),
        .fm-assignment-table thead th:last-child {
            z-index: 6;
            background: #f8fafc !important;
        }

.fm-assignment-score-details {
    min-width: 150px;
    line-height: 1.55;
}

.fm-assignment-score-cell strong {
    display: block;
    margin-bottom: .35rem;
}

.fm-assignment-footer {
    display: flex;
    gap: .5rem;
    justify-content: flex-end;
    flex-wrap: wrap;
    width: 100%;
}

.fm-assignment-skillings {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.fm-assignment-muted-text {
    color: #64748b;
    line-height: 1.6;
}

html[dir="rtl"] .fm-assignment-table th:nth-child(1),
html[dir="rtl"] .fm-assignment-table td:nth-child(1) {
    right: 0;
    left: auto;
}

html[dir="rtl"] .fm-assignment-table th:nth-child(2),
html[dir="rtl"] .fm-assignment-table td:nth-child(2) {
    right: 46px;
    left: auto;
    box-shadow: -8px 0 12px rgba(15, 23, 42, 0.05);
}

html[dir="rtl"] .fm-assignment-table th:last-child,
html[dir="rtl"] .fm-assignment-table td:last-child {
    left: 0;
    right: auto;
    box-shadow: 8px 0 12px rgba(15, 23, 42, 0.05);
}

@media (max-width: 1200px) {
    .fm-assignment-layout {
        grid-template-columns: 1fr;
    }

    .fm-assignment-side-card {
        width: 100%;
    }
}

/* =========================================================
   PM Dashboard
========================================================= */

.fm-dashboard-bars {
    display: flex;
    flex-direction: column;
    gap: .85rem;
}

.fm-dashboard-bar-row {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr) 70px;
    align-items: center;
    gap: .75rem;
}

.fm-dashboard-bar-label {
    display: flex;
    flex-direction: column;
    gap: .1rem;
}

    .fm-dashboard-bar-label span {
        color: #64748b;
        font-size: .82rem;
    }

    .fm-dashboard-bar-label strong {
        color: #0f172a;
        font-size: 1rem;
    }

.fm-dashboard-bar-track {
    height: 12px;
    border-radius: 999px;
    overflow: hidden;
    background: #eef2f7;
}

.fm-dashboard-bar-fill {
    height: 100%;
    border-radius: 999px;
    background: #64748b;
}

    .fm-dashboard-bar-fill.success {
        background: #16a34a;
    }

    .fm-dashboard-bar-fill.warning {
        background: #f59e0b;
    }

    .fm-dashboard-bar-fill.info {
        background: #0ea5e9;
    }

    .fm-dashboard-bar-fill.danger {
        background: #dc2626;
    }

    .fm-dashboard-bar-fill.muted {
        background: #94a3b8;
    }

.fm-performance-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.fm-performance-item {
    border: 1px solid #e5e7eb;
    background: #f8fafc;
    border-radius: 16px;
    padding: .9rem;
}

    .fm-performance-item span {
        display: block;
        color: #64748b;
        font-size: .85rem;
        margin-bottom: .35rem;
    }

    .fm-performance-item strong {
        display: block;
        color: #0f172a;
        font-size: 1.25rem;
        margin-bottom: .5rem;
    }

.fm-list-panel {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.fm-list-panel-item {
    border: 1px solid #e5e7eb;
    background: #fff;
    border-radius: 14px;
    padding: .85rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .75rem;
}

    .fm-list-panel-item div {
        min-width: 0;
    }

    .fm-list-panel-item strong {
        display: block;
        color: #0f172a;
        overflow-wrap: anywhere;
    }

    .fm-list-panel-item small {
        display: block;
        color: #64748b;
        margin-top: .15rem;
        overflow-wrap: anywhere;
    }

@media (max-width: 768px) {
    .fm-dashboard-bar-row {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   Section Title With Action Button
========================================================= */

.fm-section-title-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
}

.fm-section-title-text {
    display: flex;
    align-items: center;
    gap: .55rem;
    min-width: 0;
    font-weight: 700;
    color: #0f172a;
}

    .fm-section-title-text i {
        width: 34px;
        height: 34px;
        border-radius: 12px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: #f1f5f9;
        color: #64748b;
        font-size: 1rem;
    }

    .fm-section-title-text span {
        overflow-wrap: anywhere;
    }

.fm-section-action-btn {
    border: 1px solid #dbe3ef;
    background: #ffffff;
    color: #0f172a;
    border-radius: 999px;
    padding: .45rem .85rem;
    font-size: .85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    white-space: nowrap;
    transition: all .18s ease-in-out;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

    .fm-section-action-btn i {
        color: #64748b;
        font-size: .95rem;
    }

    .fm-section-action-btn:hover {
        background: #64748b;
        border-color: #64748b;
        color: #ffffff;
        transform: translateY(-1px);
        box-shadow: 0 12px 22px rgba(220, 38, 38, 0.18);
    }

        .fm-section-action-btn:hover i {
            color: #ffffff;
        }

@media (max-width: 576px) {
    .fm-section-title-actions {
        align-items: flex-start;
        flex-direction: column;
    }

    .fm-section-action-btn {
        width: 100%;
        justify-content: center;
    }
}

/* =========================================================
   Premium PM KPI Cards
========================================================= */

.pm-kpi-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 1rem;
}

.pm-kpi-card {
    position: relative;
    overflow: hidden;
    min-height: 185px;
    border: 1px solid rgba(226, 232, 240, .95);
    border-radius: 24px;
    padding: 1rem;
    background: #ffffff;
    text-align: inherit;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: .85rem;
    box-shadow: 0 16px 35px rgba(15, 23, 42, 0.07);
    transition: all .22s ease-in-out;
}

    .pm-kpi-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 22px 45px rgba(15, 23, 42, 0.12);
    }

    .pm-kpi-card:focus {
        outline: none;
        box-shadow: 0 0 0 4px rgba(37, 99, 235, .15), 0 22px 45px rgba(15, 23, 42, 0.12);
    }

.pm-kpi-top {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .75rem;
}

.pm-kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.35rem;
    box-shadow: 0 12px 24px rgba(15, 23, 42, .18);
}

.pm-kpi-badge {
    border-radius: 999px;
    padding: .35rem .65rem;
    font-size: .72rem;
    font-weight: 800;
    background: rgba(255, 255, 255, .8);
    border: 1px solid rgba(226, 232, 240, .9);
    color: #475569;
    white-space: nowrap;
    backdrop-filter: blur(8px);
}

.pm-kpi-body {
    position: relative;
    z-index: 2;
}

    .pm-kpi-body span {
        display: block;
        color: #64748b;
        font-size: .82rem;
        font-weight: 700;
        margin-bottom: .35rem;
    }

    .pm-kpi-body strong {
        display: block;
        color: #0f172a;
        font-size: 2.05rem;
        line-height: 1;
        letter-spacing: -.04em;
        margin-bottom: .45rem;
    }

    .pm-kpi-body small {
        display: flex;
        align-items: center;
        gap: .35rem;
        color: #64748b;
        font-size: .78rem;
        font-weight: 600;
    }

.pm-kpi-footer {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding-top: .75rem;
    border-top: 1px solid rgba(226, 232, 240, .85);
    color: #475569;
    font-size: .78rem;
    font-weight: 800;
}

    .pm-kpi-footer i {
        width: 28px;
        height: 28px;
        border-radius: 999px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: #f8fafc;
        transition: all .22s ease-in-out;
    }

.pm-kpi-card:hover .pm-kpi-footer i {
    transform: translateX(3px);
}

html[dir="rtl"] .pm-kpi-card:hover .pm-kpi-footer i {
    transform: translateX(-3px);
}

.pm-kpi-bg-icon {
    position: absolute;
    z-index: 1;
    inset-inline-end: -16px;
    bottom: -18px;
    font-size: 6.2rem;
    opacity: .06;
    transform: rotate(-12deg);
    pointer-events: none;
}

.pm-kpi-progress {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: #eef2f7;
    overflow: hidden;
}

    .pm-kpi-progress div {
        height: 100%;
        border-radius: 999px;
        transition: width .35s ease-in-out;
    }

/* Card color themes */

.pm-kpi-card.primary {
    background: radial-gradient(circle at top right, rgba(37, 99, 235, .13), transparent 42%), #ffffff;
}

    .pm-kpi-card.primary .pm-kpi-icon,
    .pm-kpi-card.primary .pm-kpi-progress div {
        background: linear-gradient(135deg, #2563eb, #60a5fa);
    }

    .pm-kpi-card.primary .pm-kpi-footer i {
        color: #2563eb;
    }

.pm-kpi-card.success {
    background: radial-gradient(circle at top right, rgba(22, 163, 74, .13), transparent 42%), #ffffff;
}

    .pm-kpi-card.success .pm-kpi-icon,
    .pm-kpi-card.success .pm-kpi-progress div {
        background: linear-gradient(135deg, #16a34a, #4ade80);
    }

    .pm-kpi-card.success .pm-kpi-footer i {
        color: #16a34a;
    }

.pm-kpi-card.warning {
    background: radial-gradient(circle at top right, rgba(245, 158, 11, .17), transparent 42%), #ffffff;
}

    .pm-kpi-card.warning .pm-kpi-icon,
    .pm-kpi-card.warning .pm-kpi-progress div {
        background: linear-gradient(135deg, #f59e0b, #fbbf24);
    }

    .pm-kpi-card.warning .pm-kpi-footer i {
        color: #d97706;
    }

.pm-kpi-card.info {
    background: radial-gradient(circle at top right, rgba(14, 165, 233, .14), transparent 42%), #ffffff;
}

    .pm-kpi-card.info .pm-kpi-icon,
    .pm-kpi-card.info .pm-kpi-progress div {
        background: linear-gradient(135deg, #0284c7, #38bdf8);
    }

    .pm-kpi-card.info .pm-kpi-footer i {
        color: #0284c7;
    }

.pm-kpi-card.purple {
    background: radial-gradient(circle at top right, rgba(124, 58, 237, .14), transparent 42%), #ffffff;
}

    .pm-kpi-card.purple .pm-kpi-icon,
    .pm-kpi-card.purple .pm-kpi-progress div {
        background: linear-gradient(135deg, #7c3aed, #a78bfa);
    }

    .pm-kpi-card.purple .pm-kpi-footer i {
        color: #7c3aed;
    }

.pm-kpi-card.dark {
    background: radial-gradient(circle at top right, rgba(15, 23, 42, .14), transparent 42%), #ffffff;
}

    .pm-kpi-card.dark .pm-kpi-icon,
    .pm-kpi-card.dark .pm-kpi-progress div {
        background: linear-gradient(135deg, #0f172a, #475569);
    }

    .pm-kpi-card.dark .pm-kpi-footer i {
        color: #0f172a;
    }

/* Responsive */

@media (max-width: 1600px) {
    .pm-kpi-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 992px) {
    .pm-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 576px) {
    .pm-kpi-grid {
        grid-template-columns: 1fr;
    }

    .pm-kpi-card {
        min-height: 165px;
    }

    .pm-kpi-body strong {
        font-size: 1.75rem;
    }
}

/* =========================================================
   PM Calendar / Forecast View
========================================================= */

.pm-calendar-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.pm-calendar-month-nav {
    display: flex;
    align-items: center;
    gap: .65rem;
    flex-wrap: wrap;
}

.pm-calendar-current-month {
    display: flex;
    flex-direction: column;
    margin-inline-start: .35rem;
}

    .pm-calendar-current-month strong {
        color: #0f172a;
        font-size: 1.2rem;
        line-height: 1.2;
    }

    .pm-calendar-current-month small {
        color: #64748b;
        font-size: .82rem;
    }

.pm-calendar-filters {
    display: flex;
    align-items: center;
    gap: .65rem;
    flex-wrap: wrap;
}

    .pm-calendar-filters .form-select {
        min-width: 190px;
    }

.pm-calendar-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 1rem;
    align-items: start;
}

.pm-calendar-main {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 16px 35px rgba(15, 23, 42, 0.06);
}

.pm-calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
}

    .pm-calendar-weekdays div {
        padding: .85rem;
        text-align: center;
        font-weight: 800;
        color: #475569;
        font-size: .82rem;
    }

.pm-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.pm-calendar-day {
    min-height: 150px;
    padding: .65rem;
    border-inline-end: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
    background: #ffffff;
    transition: background .18s ease-in-out;
}

    .pm-calendar-day:hover {
        background: #f8fafc;
    }

    .pm-calendar-day.other-month {
        background: #f9fafb;
        opacity: .65;
    }

    .pm-calendar-day.today {
        background: radial-gradient(circle at top right, rgba(37, 99, 235, .12), transparent 44%), #ffffff;
    }

    .pm-calendar-day.has-items {
        background: radial-gradient(circle at top right, rgba(14, 165, 233, .07), transparent 40%), #ffffff;
    }

.pm-calendar-day-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: .5rem;
}

    .pm-calendar-day-header strong {
        width: 30px;
        height: 30px;
        border-radius: 11px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: #0f172a;
        font-size: .9rem;
    }

.pm-calendar-day.today .pm-calendar-day-header strong {
    background: #2563eb;
    color: #ffffff;
}

.pm-calendar-day-header span {
    border-radius: 999px;
    background: #dbeafe;
    color: #1d4ed8;
    padding: .18rem .5rem;
    font-size: .68rem;
    font-weight: 800;
}

.pm-calendar-day-items {
    display: flex;
    flex-direction: column;
    gap: .35rem;
}

.pm-calendar-chip {
    border: 0;
    border-radius: 12px;
    padding: .4rem .45rem;
    display: flex;
    align-items: center;
    gap: .4rem;
    min-width: 0;
    text-align: inherit;
    cursor: pointer;
    font-size: .73rem;
    font-weight: 700;
    transition: all .16s ease-in-out;
}

    .pm-calendar-chip:hover {
        transform: translateY(-1px);
        box-shadow: 0 8px 16px rgba(15, 23, 42, 0.12);
    }

.pm-calendar-chip-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    flex: 0 0 auto;
    background: currentColor;
}

.pm-calendar-chip-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pm-calendar-chip.pending {
    background: #fff7ed;
    color: #c2410c;
}

.pm-calendar-chip.generated {
    background: #e0f2fe;
    color: #0369a1;
}

.pm-calendar-chip.completed {
    background: #dcfce7;
    color: #15803d;
}

.pm-calendar-chip.overdue {
    background: #fee2e2;
    color: #b91c1c;
}

.pm-calendar-chip.skipped {
    background: #f1f5f9;
    color: #475569;
}

.pm-calendar-chip.cancelled {
    background: #ffe4e6;
    color: #be123c;
}

.pm-calendar-chip.default {
    background: #f8fafc;
    color: #475569;
}

.pm-calendar-more-btn {
    border: 1px dashed #cbd5e1;
    background: #ffffff;
    color: #475569;
    border-radius: 12px;
    padding: .35rem;
    font-size: .72rem;
    font-weight: 800;
    transition: all .16s ease-in-out;
}

    .pm-calendar-more-btn:hover {
        background: #f1f5f9;
        color: #0f172a;
    }

.pm-calendar-side {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.pm-calendar-side-card {
    margin-bottom: 0;
}

.pm-calendar-legend {
    display: grid;
    grid-template-columns: 1fr;
    gap: .65rem;
    margin-top: 1rem;
}

    .pm-calendar-legend div {
        display: flex;
        align-items: center;
        gap: .55rem;
        color: #475569;
        font-size: .86rem;
        font-weight: 700;
    }

.legend-dot {
    width: 11px;
    height: 11px;
    border-radius: 999px;
}

    .legend-dot.pending {
        background: #f97316;
    }

    .legend-dot.generated {
        background: #0284c7;
    }

    .legend-dot.completed {
        background: #16a34a;
    }

    .legend-dot.overdue {
        background: #dc2626;
    }

    .legend-dot.skipped {
        background: #64748b;
    }

    .legend-dot.cancelled {
        background: #be123c;
    }

.pm-calendar-upcoming-list,
.pm-calendar-forecast-list {
    display: flex;
    flex-direction: column;
    gap: .65rem;
    margin-top: 1rem;
}

.pm-calendar-upcoming-item,
.pm-calendar-forecast-item {
    border: 1px solid #e5e7eb;
    background: #ffffff;
    border-radius: 16px;
    padding: .75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    text-align: inherit;
    transition: all .16s ease-in-out;
}

.pm-calendar-upcoming-item {
    cursor: pointer;
}

    .pm-calendar-upcoming-item:hover {
        background: #f8fafc;
        transform: translateY(-1px);
        box-shadow: 0 10px 18px rgba(15, 23, 42, 0.08);
    }

    .pm-calendar-upcoming-item div,
    .pm-calendar-forecast-item div {
        min-width: 0;
    }

    .pm-calendar-upcoming-item strong,
    .pm-calendar-forecast-item strong {
        display: block;
        color: #0f172a;
        font-size: .9rem;
    }

    .pm-calendar-upcoming-item small,
    .pm-calendar-forecast-item small {
        display: block;
        color: #64748b;
        font-size: .78rem;
        margin-top: .15rem;
        overflow-wrap: anywhere;
    }

.pm-mini-status {
    border-radius: 999px;
    padding: .25rem .55rem;
    font-size: .68rem;
    font-weight: 900;
    white-space: nowrap;
}

    .pm-mini-status.pending {
        background: #fff7ed;
        color: #c2410c;
    }

    .pm-mini-status.generated {
        background: #e0f2fe;
        color: #0369a1;
    }

    .pm-mini-status.completed {
        background: #dcfce7;
        color: #15803d;
    }

    .pm-mini-status.overdue {
        background: #fee2e2;
        color: #b91c1c;
    }

    .pm-mini-status.skipped {
        background: #f1f5f9;
        color: #475569;
    }

    .pm-mini-status.cancelled {
        background: #ffe4e6;
        color: #be123c;
    }

    .pm-mini-status.default {
        background: #f8fafc;
        color: #475569;
    }

.pm-schedule-details {
    border-radius: 22px;
    background: #ffffff;
}

.pm-schedule-details-header {
    border: 1px solid #e5e7eb;
    background: radial-gradient(circle at top right, rgba(37, 99, 235, .10), transparent 42%), #f8fafc;
    border-radius: 20px;
    padding: 1rem;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

    .pm-schedule-details-header h5 {
        margin: .45rem 0 .2rem;
        color: #0f172a;
        font-weight: 900;
    }

    .pm-schedule-details-header p {
        margin: 0;
        color: #64748b;
    }

.pm-detail-box {
    border: 1px solid #e5e7eb;
    background: #ffffff;
    border-radius: 18px;
    padding: .9rem;
    min-height: 96px;
}

    .pm-detail-box span {
        display: block;
        color: #64748b;
        font-size: .8rem;
        font-weight: 800;
        margin-bottom: .4rem;
    }

    .pm-detail-box strong {
        display: block;
        color: #0f172a;
        font-size: .98rem;
        overflow-wrap: anywhere;
    }

    .pm-detail-box small {
        display: block;
        color: #64748b;
        margin-top: .25rem;
        overflow-wrap: anywhere;
    }

@media (max-width: 1400px) {
    .pm-calendar-layout {
        grid-template-columns: 1fr;
    }

    .pm-calendar-side {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 992px) {
    .pm-calendar-side {
        grid-template-columns: 1fr;
    }

    .pm-calendar-filters {
        width: 100%;
    }

        .pm-calendar-filters .form-select,
        .pm-calendar-filters .fm-search-box {
            width: 100%;
            max-width: none;
        }

    .pm-calendar-grid,
    .pm-calendar-weekdays {
        min-width: 900px;
    }

    .pm-calendar-main {
        overflow-x: auto;
    }
}

@media (max-width: 576px) {
    .pm-calendar-toolbar {
        align-items: stretch;
    }

    .pm-calendar-month-nav {
        width: 100%;
    }

        .pm-calendar-month-nav .btn {
            flex: 1;
        }

    .pm-calendar-current-month {
        width: 100%;
        margin-inline-start: 0;
        margin-top: .5rem;
    }

    .pm-schedule-details-header {
        flex-direction: column;
    }
}
/* =========================================================
   Scheduler Calendar Linked Highlight
========================================================= */

.calendar-event-selected {
    position: relative;
    border: 2px solid #2563eb !important;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .14), 0 16px 30px rgba(37, 99, 235, .22) !important;
    transform: translateY(-2px);
}

    .calendar-event-selected::before {
        content: "Selected";
        position: absolute;
        inset-inline-end: .65rem;
        top: -.65rem;
        background: #2563eb;
        color: #ffffff;
        border-radius: 999px;
        padding: .15rem .55rem;
        font-size: .68rem;
        font-weight: 900;
        box-shadow: 0 8px 16px rgba(37, 99, 235, .25);
    }

html[dir="rtl"] .calendar-event-selected::before {
    content: "محدد";
}

