/* ------------------------------------------------------------------
   فونت وزیرمتن - هر هفت وزن واقعی (نه وزنِ جعلی مرورگر)
   ------------------------------------------------------------------ */
@font-face {
    font-family: Vazirmatn;
    src: url("../fonts/Vazirmatn-Light.woff2") format("woff2");
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: Vazirmatn;
    src: url("../fonts/Vazirmatn-Regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: Vazirmatn;
    src: url("../fonts/Vazirmatn-Medium.woff2") format("woff2");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: Vazirmatn;
    src: url("../fonts/Vazirmatn-SemiBold.woff2") format("woff2");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: Vazirmatn;
    src: url("../fonts/Vazirmatn-Bold.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: Vazirmatn;
    src: url("../fonts/Vazirmatn-ExtraBold.woff2") format("woff2");
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: Vazirmatn;
    src: url("../fonts/Vazirmatn-Black.woff2") format("woff2");
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

/* Industrial blue, accessible scrollbars */
* {
    scrollbar-width: thin;
    scrollbar-color: #1769aa color-mix(in srgb, var(--background) 82%, transparent);
}

*::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

*::-webkit-scrollbar-track {
    border-radius: 999px;
    background: color-mix(in srgb, var(--background) 82%, transparent);
}

*::-webkit-scrollbar-thumb {
    min-height: 36px;
    border: 2px solid color-mix(in srgb, var(--background) 82%, transparent);
    border-radius: 999px;
    background: linear-gradient(180deg, #2386cb, #0e568d);
}

*::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #36a0e8, #1268a7);
}

.personnel-name-with-avatar {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.personnel-mini-avatar {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    display: grid;
    place-items: center;
    color: #fff;
    border-radius: 9px;
    background: linear-gradient(145deg, #2584c7, #0d5489);
    font-size: 8px;
}

.production-pdf-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.production-export-button.technical {
    color: #075985;
    border-color: rgba(14, 165, 233, .24);
    background: rgba(14, 165, 233, .08);
}

.production-export-button.manager {
    color: #5b21b6;
    border-color: rgba(139, 92, 246, .24);
    background: rgba(139, 92, 246, .08);
}

@media (min-width: 992px) {
    .press-accordion {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
    }

    .press-panel:has(.accordion-collapse.show) {
        grid-column: 1 / -1;
    }
}

.production-order-modal .modal-body,
.personnel-modal .modal-body {
    scrollbar-color: #1769aa transparent;
}

.production-modal-section-3 .production-modal-column-fields {
    max-height: 390px;
    padding-inline-end: 5px;
    overflow-y: auto;
}

.personnel-modal .modal-content {
    max-height: min(90vh, 820px);
    border: 1px solid color-mix(in srgb, var(--primary) 16%, var(--border));
    border-radius: 20px;
    background: var(--card);
}

.personnel-modal-grid {
    display: grid;
    gap: 12px;
}

.personnel-modal-section {
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: color-mix(in srgb, var(--background) 48%, var(--card));
}

.dashboard-operator-chart {
    margin-top: 18px;
    display: grid;
    gap: 11px;
}

.dashboard-operator-row {
    display: grid;
    grid-template-columns: minmax(110px, .8fr) minmax(140px, 2fr) 78px;
    align-items: center;
    gap: 10px;
    font-size: 9px;
}

.dashboard-operator-name {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--ink);
    font-weight: 700;
}

.operator-crown {
    color: #f6b51b;
    filter: drop-shadow(0 3px 5px rgba(246, 181, 27, .3));
    font-size: 17px;
    animation: crownFloat 1.9s ease-in-out infinite;
}

@keyframes crownFloat {
    50% { transform: translateY(-3px) rotate(-4deg); }
}

.dashboard-operator-track {
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: color-mix(in srgb, var(--border) 70%, transparent);
}

.dashboard-operator-track i {
    height: 100%;
    display: block;
    border-radius: inherit;
    background: linear-gradient(90deg, #0d5c97, #2b99dc);
    box-shadow: 0 0 12px rgba(43, 153, 220, .28);
}

.dashboard-operator-row > strong {
    color: var(--primary);
    font-size: 9px;
    text-align: left;
}

.dashboard-pie-layout {
    margin-top: 16px;
    display: grid;
    grid-template-columns: 118px 1fr;
    align-items: center;
    gap: 16px;
}

.dashboard-pie {
    width: 118px;
    aspect-ratio: 1;
    display: grid;
    place-content: center;
    position: relative;
    border-radius: 50%;
    background: var(--pie-background);
    box-shadow: 0 10px 26px rgba(15, 80, 130, .13);
    text-align: center;
}

.dashboard-pie::after {
    content: "";
    position: absolute;
    inset: 22px;
    border-radius: 50%;
    background: var(--card);
    box-shadow: inset 0 0 0 1px var(--border);
}

.dashboard-pie strong,
.dashboard-pie small {
    position: relative;
    z-index: 1;
}

.dashboard-pie strong {
    color: var(--ink);
    font-size: 17px;
}

.dashboard-pie small {
    color: var(--muted);
    font-size: 8px;
}

.dashboard-pie-legend {
    display: grid;
    gap: 7px;
}

.dashboard-pie-legend > div {
    display: grid;
    grid-template-columns: 7px 1fr auto;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-size: 8px;
}

.dashboard-pie-legend i {
    width: 7px;
    height: 7px;
    border-radius: 3px;
}

.dashboard-pie-legend strong {
    color: var(--ink);
    font-size: 8px;
}

@media (max-width: 575.98px) {
    .dashboard-operator-row {
        grid-template-columns: 1fr 60px;
    }

    .dashboard-operator-track {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .dashboard-pie-layout {
        grid-template-columns: 100px 1fr;
    }

    .dashboard-pie {
        width: 100px;
    }

    .production-pdf-group {
        width: 100%;
    }

    .production-pdf-group .btn {
        min-width: calc(33.333% - 4px);
        padding-inline: 7px;
    }
}

/* Keep every nested project scroller on the same industrial-blue system. */
.sidebar-nav::-webkit-scrollbar-thumb,
.production-sheet-wrap::-webkit-scrollbar-thumb,
.modal-body::-webkit-scrollbar-thumb,
.table-responsive::-webkit-scrollbar-thumb {
    border-color: color-mix(in srgb, var(--background) 82%, transparent);
    background: linear-gradient(180deg, #2386cb, #0e568d);
}

/* Final overrides for login inputs. */
.auth-page .login-form .input-with-icon > .form-control,
.auth-page .login-form .input-with-icon > .form-control:hover,
.auth-page .login-form .input-with-icon > .form-control:focus,
.auth-page .login-form .input-with-icon > .form-control:active,
.auth-page .login-form .input-with-icon > .form-control:focus-visible {
    color: #2386cb !important;
    background: #101828 !important;
    background-color: #101828 !important;
    border-color: rgba(148, 163, 184, .28) !important;
    box-shadow: none !important;
    outline: 0 !important;
}

.auth-page .login-form .input-with-icon > .form-control::selection {
    color: #fff !important;
    background: #1769aa !important;
}

.auth-page .login-form input:-webkit-autofill,
.auth-page .login-form input:-webkit-autofill:hover,
.auth-page .login-form input:-webkit-autofill:focus,
.auth-page .login-form input:-webkit-autofill:active {
    color: #2386cb !important;
    -webkit-text-fill-color: #2386cb !important;
    background-color: #101828 !important;
    -webkit-box-shadow: 0 0 0 1000px #101828 inset !important;
    box-shadow: 0 0 0 1000px #101828 inset !important;
    caret-color: #2386cb !important;
}


:root {
    color-scheme: light;
    --primary: #3b82f6;
    --primary-dark: #155eef;
    --primary-light: #60a5fa;
    --primary-soft: #eaf2ff;
    --cyan: #22d3ee;
    --orange: #fdb022;
    --pink: #f97066;
    --green: #32d583;
    --danger: #db4868;
    --ink: #101828;
    --muted: #667085;
    --surface: #ffffff;
    --card: #ffffff;
    --background: #f4f7fb;
    --border: #dbe3ef;
    --sidebar-width: 258px;
    --radius: 18px;
    --shadow: 0 14px 40px rgba(16, 24, 40, .08);
    --sidebar-bg: #101828;
    --sidebar-card: #172033;
    --sidebar-border: #344054;
}

html[data-theme="dark"] {
    color-scheme: dark;
    --primary: #3b82f6;
    --primary-dark: #155eef;
    --primary-light: #60a5fa;
    --primary-soft: rgba(59, 130, 246, .14);
    --danger: #fb7185;
    --ink: #f9fafb;
    --muted: #cbd5e1;
    --surface: #101828;
    --card: #172033;
    --background: #0b1220;
    --border: #344054;
    --shadow: 0 16px 45px rgba(0, 0, 0, .22);
    --sidebar-bg: #080f1c;
    --sidebar-card: #101828;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    /* مقیاس‌پذیری کل رابط بر اساس پهنای مانیتور (مقدار توسط اسکریپت head تنظیم می‌شود) */
    zoom: var(--app-zoom, 1);
}

/* هنگام چاپ/اعلان، مقیاس برداشته شود تا خروجی همیشه در اندازه واقعی باشد */
@media print {
    html {
        zoom: 1 !important;
    }
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--background);
    font-family: Vazirmatn, "Segoe UI", Tahoma, sans-serif;
    font-size: 16px;
    /* خط بلندتر برای خوانایی حروف فارسی (حروف به فضای بیشتری نیاز دارند) */
    line-height: 1.8;
    /* هرزن کردن لبهٔ حروف در ویندوز؛ متن فارسی بدون این لبهٔ مصنوعی تار می‌شود */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    /* حروف فارسی به هم می‌چسبند؛ هر فاصلهٔ حرفی این اتصال را می‌شکند */
    letter-spacing: normal;
    word-spacing: .02em;
    /* چون هر هفت وزن واقعی نصب شده، مرورگر نباید وزن جعلی بسازد */
    font-synthesis-weight: none;
}

/* فیلدهای فرم هم باید با فونت فارسی و ارقام خوانا رندر شوند */
input,
select,
textarea,
button {
    font-family: Vazirmatn, "Segoe UI", Tahoma, sans-serif;
    letter-spacing: normal;
}

/* ارقام هم‌عرض در ستون‌های عددی (دانسیته، تعداد، تناژ) تا زیر هم تراز شوند */
.panel-table th,
.panel-table td,
.panel-table tfoot th,
.panel-table tfoot td,
.press-wizard-table th,
.press-wizard-table td {
    font-variant-numeric: tabular-nums;
}

/* متن راهنمای داخل فیلدها نباید کم‌رنگ و ناخوانا باشد */
.form-control::placeholder,
.form-select::placeholder,
textarea::placeholder,
input::placeholder {
    color: #9aa4b2;
    opacity: 1;
}

/* متن فارسی در حالت راست‌چین نباید فاصلهٔ حرفی یا کجی جعلی داشته باشد */
[dir="rtl"] h1,
[dir="rtl"] h2,
[dir="rtl"] h3,
[dir="rtl"] h4,
[dir="rtl"] h5,
[dir="rtl"] h6,
[dir="rtl"] p,
[dir="rtl"] span,
[dir="rtl"] label,
[dir="rtl"] td,
[dir="rtl"] th,
[dir="rtl"] li,
[dir="rtl"] button,
[dir="rtl"] strong,
[dir="rtl"] small {
    letter-spacing: normal;
}

a {
    text-decoration: none;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

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

.sidebar {
    position: fixed;
    inset: 0 0 0 auto;
    z-index: 1040;
    width: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(circle at 20% 0, rgba(59, 130, 246, .13), transparent 25%),
        var(--sidebar-bg);
    box-shadow: -12px 0 38px rgba(16, 24, 40, .11);
    transition: transform .3s ease, width .3s ease;
}

.sidebar-brand {
    min-height: 88px;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.brand-link,
.login-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    display: inline-grid;
    place-items: center;
    padding: 3px;
    overflow: hidden;
    color: #fff;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(16, 24, 40, .16);
    font-size: 23px;
}

.brand-mark img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.brand-copy {
    color: #fff;
}

.brand-copy strong,
.login-brand strong {
    display: block;
    font-size: 17px;
}

.brand-copy small,
.login-brand small {
    display: block;
    margin-top: 2px;
    color: rgba(255, 255, 255, .62);
    font-size: 11px;
}

.sidebar-nav {
    flex: 1;
    padding: 14px 14px 24px;
    overflow-y: auto;
    scrollbar-width: thin;
}

.nav-section-label {
    padding: 16px 14px 8px;
    color: rgba(255, 255, 255, .42);
    font-size: 13px;
}

.sidebar-link {
    width: 100%;
    min-height: 48px;
    margin: 3px 0;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, .72);
    border: 0;
    border-radius: 12px;
    background: transparent;
    text-align: right;
    transition: color .2s ease, background .25s ease, transform .25s cubic-bezier(.22, 1, .36, 1);
}

.sidebar-link > i:first-child {
    width: 22px;
    font-size: 18px;
    text-align: center;
}

.sidebar-link:hover,
.sidebar-link.active {
    color: #fff;
    background: rgba(59, 130, 246, .1);
    transform: translateX(-4px);
}

.sidebar-link.active {
    background: linear-gradient(90deg, rgba(59, 130, 246, .2), rgba(34, 211, 238, .07));
    box-shadow: inset -2px 0 var(--primary-light);
}

.sidebar-link.active::after {
    content: "";
    width: 5px;
    height: 5px;
    margin-right: auto;
    border-radius: 50%;
    background: var(--cyan);
    box-shadow: 0 0 12px var(--cyan);
    animation: menuGlow 2.4s ease-in-out infinite;
}

.sidebar-dropdown-toggle .dropdown-arrow {
    margin-right: auto;
    transition: transform .2s ease;
}

.sidebar-dropdown-toggle[aria-expanded="true"] .dropdown-arrow {
    transform: rotate(180deg);
}

.nav-dot {
    width: 7px;
    height: 7px;
    margin-right: auto;
    border-radius: 50%;
    background: var(--cyan);
    box-shadow: 0 0 0 5px rgba(34, 211, 238, .1);
}

.sidebar-submenu {
    margin: 4px 32px 8px 0;
    padding-right: 17px;
    border-right: 1px dashed rgba(255, 255, 255, .18);
}

.sidebar-submenu a {
    position: relative;
    display: block;
    padding: 8px 10px;
    color: rgba(255, 255, 255, .57);
    font-size: 12px;
    transition: .2s ease;
}

.sidebar-submenu a::before {
    content: "";
    position: absolute;
    right: -21px;
    top: 15px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #5d587d;
}

.sidebar-submenu a:hover,
.sidebar-submenu a.active {
    color: #fff;
}

.sidebar-submenu a.active::before {
    background: #5ce1e6;
}

.sidebar-footer {
    padding: 14px;
}

.system-health {
    padding: 13px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--sidebar-border);
    border-radius: 16px;
    background: var(--sidebar-card);
}

.system-health strong,
.system-health small {
    display: block;
}

.system-health small {
    margin-top: 2px;
    color: rgba(255, 255, 255, .5);
    font-size: 10px;
}

.health-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    color: #64e5a5;
    border-radius: 11px;
    background: rgba(100, 229, 165, .1);
}

.health-pulse {
    width: 8px;
    height: 8px;
    margin-right: auto;
    border-radius: 50%;
    background: #64e5a5;
    box-shadow: 0 0 0 6px rgba(100, 229, 165, .08);
    animation: pulse 2s infinite;
}

.app-main {
    min-height: 100vh;
    margin-right: var(--sidebar-width);
    transition: margin .3s ease;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 1020;
    min-height: 76px;
    padding: 11px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    background: color-mix(in srgb, var(--surface) 86%, transparent);
    border-bottom: 1px solid color-mix(in srgb, var(--border) 72%, transparent);
    box-shadow: 0 1px 0 rgba(16, 24, 40, .015);
    backdrop-filter: blur(18px) saturate(140%);
}

.topbar-heading {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-heading-copy {
    min-width: 0;
}

.topbar-title {
    margin: 0;
    color: var(--ink);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -.25px;
    line-height: 1.65;
}

.topbar-subtitle {
    margin-top: 1px;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.7;
}

.topbar-status-dot {
    width: 5px;
    height: 5px;
    flex: 0 0 5px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 13%, transparent);
}

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

.icon-btn {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    color: var(--muted);
    border: 1px solid color-mix(in srgb, var(--border) 88%, transparent);
    border-radius: 11px;
    background: color-mix(in srgb, var(--surface) 78%, transparent);
    font-size: 14px;
    transition: color .18s ease, border-color .18s ease, background .18s ease, transform .18s ease;
}

.icon-btn:hover {
    color: var(--primary);
    border-color: color-mix(in srgb, var(--primary) 28%, var(--border));
    background: color-mix(in srgb, var(--primary) 7%, var(--surface));
    transform: translateY(-1px);
}

.theme-toggle {
    width: auto;
    grid-auto-flow: column;
    gap: 8px;
    padding: 0 11px;
}

.theme-toggle-label {
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
}

.notification-dot {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 6px;
    height: 6px;
    border: 1.5px solid var(--surface);
    border-radius: 50%;
    background: var(--pink);
}

.user-menu {
    min-height: 44px;
    padding: 4px 5px 4px 10px;
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--ink);
    border: 1px solid color-mix(in srgb, var(--border) 88%, transparent);
    border-radius: 13px;
    background: color-mix(in srgb, var(--surface) 82%, transparent);
    transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.user-menu:hover,
.user-menu[aria-expanded="true"] {
    border-color: color-mix(in srgb, var(--primary) 25%, var(--border));
    background: var(--surface);
    box-shadow: 0 8px 24px rgba(16, 24, 40, .07);
}

.user-avatar {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: grid;
    place-items: center;
    color: #fff;
    border: 1px solid color-mix(in srgb, var(--primary-light) 35%, transparent);
    border-radius: 10px;
    background: linear-gradient(145deg, var(--primary-dark), var(--primary));
    box-shadow: 0 5px 14px color-mix(in srgb, var(--primary) 20%, transparent);
    font-size: 10px;
    font-weight: 700;
}

.user-meta {
    min-width: 105px;
    flex-direction: column;
    align-items: flex-start;
    text-align: right;
}

.user-meta strong {
    max-width: 150px;
    overflow: hidden;
    color: var(--ink);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-meta small {
    color: var(--muted);
    font-size: 8px;
}

.user-menu-arrow {
    margin-right: 2px;
    color: var(--muted);
    font-size: 9px;
    transition: transform .18s ease;
}

.user-menu[aria-expanded="true"] .user-menu-arrow {
    transform: rotate(180deg);
}

.account-dropdown {
    width: 286px;
    margin-top: 9px !important;
    padding: 8px;
    color: var(--ink);
    border: 1px solid color-mix(in srgb, var(--border) 86%, transparent);
    border-radius: 16px;
    background: color-mix(in srgb, var(--surface) 96%, transparent);
    box-shadow: 0 18px 50px rgba(16, 24, 40, .14);
    backdrop-filter: blur(18px);
}

.account-dropdown-head {
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
    border-radius: 11px;
    background: color-mix(in srgb, var(--background) 78%, transparent);
}

.account-dropdown-head > span:last-child {
    min-width: 0;
}

.account-dropdown-head strong,
.account-dropdown-head small {
    display: block;
}

.account-dropdown-head strong {
    overflow: hidden;
    color: var(--ink);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-dropdown-head small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 8px;
}

.account-dropdown-avatar {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: grid;
    place-items: center;
    color: #fff;
    border-radius: 9px;
    background: linear-gradient(145deg, var(--primary-dark), var(--primary));
    font-size: 9px;
    font-weight: 700;
}

.account-dropdown-label {
    padding: 12px 10px 5px;
    color: var(--muted);
    font-size: 8px;
    font-weight: 700;
}

.account-dropdown-item,
.account-logout {
    min-height: 52px;
    padding: 7px 8px;
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--ink);
    border: 0;
    border-radius: 10px;
    background: transparent;
    text-align: right;
    transition: background .18s ease, color .18s ease;
}

.account-dropdown-item > span:nth-child(2),
.account-logout > span:nth-child(2) {
    min-width: 0;
    flex: 1;
}

.account-dropdown-item strong,
.account-dropdown-item small,
.account-logout strong,
.account-logout small {
    display: block;
}

.account-dropdown-item strong,
.account-logout strong {
    color: inherit;
    font-size: 10px;
}

.account-dropdown-item small,
.account-logout small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 8px;
}

.account-item-icon {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    display: grid;
    place-items: center;
    color: var(--primary);
    border-radius: 9px;
    background: color-mix(in srgb, var(--primary) 9%, transparent);
    font-size: 13px;
}

.account-item-arrow {
    color: color-mix(in srgb, var(--muted) 62%, transparent);
    font-size: 8px;
}

.account-dropdown-item:hover,
.account-dropdown-item:focus {
    color: var(--ink);
    background: color-mix(in srgb, var(--primary) 7%, transparent);
}

.account-dropdown-divider {
    margin: 6px 4px;
    border-color: var(--border);
    opacity: .7;
}

.account-logout {
    width: 100%;
    color: var(--danger);
}

.account-logout .account-item-icon {
    color: var(--danger);
    background: color-mix(in srgb, var(--danger) 9%, transparent);
}

.account-logout:hover,
.account-logout:focus {
    color: var(--danger);
    background: color-mix(in srgb, var(--danger) 7%, transparent);
}

.dashboard-critical-alerts-panel {
    margin-top: 20px;
}

.dashboard-critical-alerts-list {
    margin-top: 16px;
    display: grid;
    gap: 12px;
}

.dashboard-critical-alert-item {
    padding: 12px;
    border: 1px solid color-mix(in srgb, var(--danger) 25%, var(--border));
    border-radius: 12px;
    background: color-mix(in srgb, var(--danger) 5%, var(--card));
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dashboard-critical-alert-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(219, 72, 104, 0.15);
}

.dashboard-critical-alert-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.dashboard-critical-alert-icon {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    display: grid;
    place-items: center;
    color: #fff;
    border-radius: 8px;
    background: linear-gradient(145deg, var(--danger), #c9302c);
    font-size: 14px;
}

.dashboard-critical-alert-header > div {
    flex: 1;
    min-width: 0;
}

.dashboard-critical-alert-header strong {
    display: block;
    color: var(--ink);
    font-size: 11px;
    font-weight: 700;
}

.dashboard-critical-alert-header small {
    display: block;
    color: var(--muted);
    font-size: 9px;
}

.dashboard-critical-alert-duration {
    padding: 4px 8px;
    color: var(--danger);
    border: 1px solid color-mix(in srgb, var(--danger) 30%, transparent);
    border-radius: 6px;
    background: color-mix(in srgb, var(--danger) 10%, transparent);
    font-size: 10px;
    font-weight: 700;
}

.dashboard-critical-alert-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 8px;
}

.dashboard-critical-alert-category {
    color: var(--ink);
    font-size: 10px;
    font-weight: 600;
}

.dashboard-critical-alert-reason {
    color: var(--muted);
    font-size: 9px;
}

.dashboard-critical-alert-production {
    display: block;
    color: var(--muted);
    font-size: 8px;
}

.dashboard-panel-kicker.danger {
    color: var(--danger);
}

.page-content {
    padding: 12px 28px 36px;
}

.welcome-banner {
    position: relative;
    min-height: 178px;
    padding: 30px 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    overflow: hidden;
    color: #fff;
    border-radius: 26px;
    background:
        radial-gradient(circle at 16% 20%, rgba(34, 211, 238, .24), transparent 24%),
        linear-gradient(120deg, #155eef, #3b82f6 58%, #22d3ee);
    box-shadow: 0 20px 45px rgba(21, 94, 239, .22);
}

.welcome-banner h2 {
    position: relative;
    z-index: 2;
    margin: 10px 0 8px;
    font-size: clamp(19px, 2vw, 28px);
}

.welcome-banner p {
    position: relative;
    z-index: 2;
    margin: 0;
    color: rgba(255, 255, 255, .77);
}

.banner-kicker {
    position: relative;
    z-index: 2;
    padding: 6px 10px;
    border-radius: 20px;
    background: rgba(255, 255, 255, .12);
    font-size: 11px;
}

.banner-action {
    position: relative;
    z-index: 2;
    padding: 11px 18px;
    color: var(--primary);
    border: 0;
    border-radius: 14px;
    font-size: 13px;
}

.banner-orb {
    position: absolute;
    border: 1px solid rgba(255, 255, 255, .13);
    border-radius: 50%;
}

.orb-one {
    width: 190px;
    height: 190px;
    left: -35px;
    bottom: -95px;
    background: rgba(255, 255, 255, .06);
}

.orb-two {
    width: 110px;
    height: 110px;
    left: 140px;
    top: -50px;
}

.stat-card,
.panel-card,
.form-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.stat-card {
    position: relative;
    min-height: 152px;
    padding: 22px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    overflow: hidden;
    transition: .25s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 45px rgba(16, 24, 40, .13);
}

.stat-icon,
.quick-icon {
    display: grid;
    place-items: center;
    border-radius: 15px;
}

.stat-icon {
    width: 50px;
    height: 50px;
    flex: 0 0 50px;
    font-size: 21px;
}

.purple {
    color: var(--primary) !important;
    background: var(--primary-soft) !important;
}

.cyan {
    color: #0891b2 !important;
    background: rgba(34, 211, 238, .13) !important;
}

.orange {
    color: #d97706 !important;
    background: rgba(253, 176, 34, .14) !important;
}

.pink {
    color: #ef4444 !important;
    background: rgba(249, 112, 102, .14) !important;
}

.stat-content > span {
    color: var(--muted);
    font-size: 12px;
}

.stat-content strong {
    display: block;
    margin: 3px 0;
    font-size: 27px;
}

.stat-content small {
    color: #9b9cac;
    font-size: 10px;
}

.stat-trend {
    position: absolute;
    left: 15px;
    bottom: 15px;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 9px;
}

.stat-trend.positive,
.status-badge.success {
    color: #159b57;
    background: #e4f8ed;
}

.stat-trend.warning,
.status-badge.warning {
    color: #c97919;
    background: #fff1dd;
}

.stat-trend.danger,
.status-badge.danger {
    color: #db4868;
    background: #ffe7ed;
}

.stat-trend.neutral,
.status-badge.neutral {
    color: #6f7084;
    background: #eff0f5;
}

.panel-card,
.form-card {
    padding: 22px;
}

.panel-card-header,
.page-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.panel-card-header {
    margin-bottom: 16px;
}

.panel-card-header h3 {
    margin: 0 0 4px;
    font-size: 16px;
}

.panel-card-header p {
    margin: 0;
    color: var(--muted);
    font-size: 11px;
}

.btn {
    border-radius: 12px;
    font-size: 14px;
}

.btn-primary {
    border-color: var(--primary);
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    box-shadow: 0 7px 18px rgba(59, 130, 246, .2);
}

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

.btn-soft-primary {
    color: var(--primary);
    background: var(--primary-soft);
}

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

.panel-table {
    margin-bottom: 0;
    white-space: nowrap;
}

.panel-table thead th {
    padding: 13px 12px;
    color: #8e8fa2;
    border-bottom-color: var(--border);
    background: color-mix(in srgb, var(--surface) 72%, var(--background));
    font-size: 13px;
    font-weight: 400;
}

.panel-table tbody td {
    padding: 15px 12px;
    color: #626378;
    border-bottom-color: var(--border);
    font-size: 13px;
}

.tables-compact .panel-table tbody td {
    padding-top: 9px;
    padding-bottom: 9px;
}

.panel-table tbody tr {
    transition: .18s ease;
}

.panel-table tbody tr:hover {
    background: color-mix(in srgb, var(--primary) 5%, transparent);
}

.status-badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 11px;
}

.status-summary {
    display: grid;
    gap: 18px;
}

.status-row > div:first-child {
    margin-bottom: 7px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
}

.status-row strong {
    margin-right: auto;
    color: var(--ink);
}

.status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
}

.status-dot.warning,
.progress-bar.warning {
    background: var(--orange);
}

.status-dot.success,
.progress-bar.success {
    background: var(--green);
}

.status-dot.neutral,
.progress-bar.neutral {
    background: #a7a8b5;
}

.status-dot.purple,
.progress-bar.purple {
    background: var(--primary);
}

.progress {
    height: 6px;
    background: #f0f1f6;
}

.quick-actions {
    margin-top: 24px;
    padding-top: 17px;
    display: grid;
    gap: 8px;
    border-top: 1px solid var(--border);
}

.quick-actions a {
    padding: 9px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    border-radius: 13px;
    transition: .2s ease;
}

.quick-actions a:hover {
    background: color-mix(in srgb, var(--primary) 5%, transparent);
    transform: translateX(-3px);
}

.quick-icon {
    width: 38px;
    height: 38px;
}

.quick-actions strong,
.quick-actions small {
    display: block;
}

.quick-actions small {
    color: var(--muted);
    font-size: 9px;
}

.quick-actions > a > i:last-child {
    margin-right: auto;
    color: #b7b8c5;
}

.panel-alert {
    display: flex;
    align-items: center;
    gap: 9px;
    border: 0;
    border-radius: 14px;
}

.page-toolbar {
    margin-bottom: 18px;
}

.search-box {
    position: relative;
    min-width: min(100%, 320px);
}

.search-box i {
    position: absolute;
    right: 14px;
    top: 12px;
    color: #a4a5b5;
}

.search-box .form-control {
    padding-right: 40px;
}

.form-control,
.form-select {
    min-height: 44px;
    color: var(--ink);
    border-color: var(--border);
    border-radius: 12px;
    background-color: var(--surface);
    font-size: 14px;
}

.form-control:focus,
.form-select:focus {
    border-color: #bdb5ff;
    box-shadow: 0 0 0 .22rem rgba(108, 92, 231, .1);
}

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

.form-section-title {
    margin: 6px 0 18px;
    padding-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--border);
    font-size: 16px;
}

.form-switch .form-check-input {
    width: 42px;
    height: 22px;
}

.form-check-input:checked {
    border-color: var(--primary);
    background-color: var(--primary);
}

.avatar-sm {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    color: var(--primary);
    border-radius: 12px;
    background: var(--primary-soft);
    font-weight: 700;
}

.row-actions {
    display: flex;
    gap: 6px;
}

.row-actions .btn {
    width: 34px;
    height: 34px;
    padding: 0;
    display: grid;
    place-items: center;
}

.personnel-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.stops-filter-form.personnel-filter-form {
    grid-template-columns: minmax(280px, 2fr) minmax(180px, 1fr) auto;
}

.personnel-filter-form .personnel-filter-search,
.personnel-filter-form .personnel-filter-actions {
    grid-column: auto;
}

.personnel-results-panel {
    margin-top: 0;
}

.personnel-search {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    max-width: 520px;
}

.personnel-search > .bi-search {
    flex: 0 0 auto;
}

.personnel-search .form-control {
    flex: 1;
    min-width: 220px;
    padding-left: 34px;
}

.personnel-search-clear {
    position: absolute;
    left: 82px;
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    color: var(--muted);
    border-radius: 8px;
    text-decoration: none;
}

.personnel-search-clear:hover {
    color: var(--danger);
    background: color-mix(in srgb, var(--danger) 9%, transparent);
}

.personnel-search-clear i {
    position: static;
    color: inherit;
}

.personnel-search-submit {
    min-height: 38px;
    margin-right: 6px;
    padding-inline: 14px;
}

.personnel-add-button {
    min-height: 40px;
    padding-inline: 14px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
}

.personnel-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 7px;
}

.personnel-pdf-button {
    min-height: 40px;
    padding-inline: 13px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--danger);
    border: 1px solid color-mix(in srgb, var(--danger) 18%, var(--border));
    white-space: nowrap;
}

.personnel-pdf-button:hover {
    color: #fff;
    border-color: var(--danger);
    background: var(--danger);
}

.personnel-table-wrap {
    padding-bottom: 4px;
}

.personnel-table {
    width: 100%;
    min-width: 980px;
    table-layout: auto;
}

.personnel-table thead th,
.personnel-table tbody td {
    padding: 12px 16px;
    vertical-align: middle;
}

.personnel-table thead th {
    font-size: 13px;
    font-weight: 600;
}

.personnel-table tbody td {
    font-size: 13px;
}

.personnel-table tbody tr:last-child td {
    border-bottom: 0;
}

.personnel-code {
    display: inline-block;
    padding: 3px 7px;
    color: var(--primary);
    border-radius: 7px;
    background: var(--primary-soft);
    font-weight: 700;
}

.personnel-actions-cell {
    text-align: center;
}

.personnel-actions {
    justify-content: center;
    gap: 4px;
}

.personnel-actions form {
    margin: 0;
}

.personnel-action {
    width: 29px;
    height: 29px;
    padding: 0;
    display: inline-grid;
    place-items: center;
    border: 1px solid transparent;
    border-radius: 9px;
    background: transparent;
    font-size: 12px;
    line-height: 1;
    text-decoration: none;
    transition: color .18s ease, background .18s ease, border-color .18s ease, transform .18s ease;
}

.personnel-action:hover {
    transform: translateY(-1px);
}

.personnel-action.edit {
    color: var(--primary);
    border-color: color-mix(in srgb, var(--primary) 16%, transparent);
    background: color-mix(in srgb, var(--primary) 7%, transparent);
}

.personnel-action.edit:hover {
    color: #fff;
    border-color: var(--primary);
    background: var(--primary);
}

.personnel-action.delete {
    color: var(--danger);
    border-color: color-mix(in srgb, var(--danger) 15%, transparent);
    background: color-mix(in srgb, var(--danger) 6%, transparent);
}

.personnel-action.delete:hover {
    color: #fff;
    border-color: var(--danger);
    background: var(--danger);
}

.personnel-action:disabled {
    opacity: .35;
    cursor: not-allowed;
    transform: none;
}

@media (max-width: 575.98px) {
    .personnel-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .personnel-search {
        max-width: none;
    }

    .personnel-search .form-control {
        min-width: 0;
    }

    .personnel-add-button {
        justify-content: center;
    }

    .personnel-toolbar-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .personnel-pdf-button {
        justify-content: center;
    }

    .personnel-table {
        min-width: 900px;
    }

    .personnel-table thead th,
    .personnel-table tbody td {
        padding-inline: 13px;
    }
}

/* Personnel: compact, responsive and no horizontal scrolling */
.personnel-filter-panel {
    padding: 12px;
    border-radius: 16px;
}

.personnel-filter-panel .stops-filter-heading {
    margin-bottom: 10px;
    padding-bottom: 9px;
}

.personnel-filter-form {
    grid-template-columns: minmax(0, 2fr) minmax(150px, .85fr) auto !important;
}

.personnel-filter-form .stops-filter-field .form-control,
.personnel-filter-form .stops-filter-field .form-select {
    height: 37px;
    min-height: 37px;
}

.personnel-filter-actions {
    align-items: center;
}

.personnel-live-filter,
.reports-live-filter {
    color: var(--primary);
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.personnel-live-filter i,
.reports-live-filter i {
    margin-left: 3px;
}

.personnel-name-with-avatar {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.personnel-name-with-avatar > span:last-child,
.personnel-contact {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.personnel-name-with-avatar strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.personnel-name-with-avatar small,
.personnel-contact small {
    color: var(--muted);
    font-size: 8px;
    font-weight: 400;
}

.personnel-contact > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.personnel-role-pill,
.personnel-leave-balance {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 4px 7px;
    border-radius: 7px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 8px;
    font-weight: 700;
    white-space: nowrap;
}

.personnel-leave-balance {
    color: #087443;
    background: rgba(16, 185, 129, .09);
}

.personnel-password-cell {
    display: inline-flex;
    min-width: 72px;
    align-items: center;
    justify-content: center;
    padding: 4px 7px;
    color: var(--muted);
    border: 1px dashed var(--border);
    border-radius: 7px;
    background: var(--surface);
    cursor: text;
    letter-spacing: 2px;
    transition: .16s ease;
}

.personnel-password-cell:hover,
.personnel-password-cell.is-editing {
    color: var(--primary);
    border-color: color-mix(in srgb, var(--primary) 48%, var(--border));
    background: var(--primary-soft);
}

.personnel-password-cell.is-saving {
    opacity: .65;
    pointer-events: none;
}

.personnel-password-cell.is-error {
    color: var(--danger);
    border-color: color-mix(in srgb, var(--danger) 48%, var(--border));
}

.personnel-password-cell.is-saved {
    color: #087443;
    border-color: rgba(16, 185, 129, .36);
    background: rgba(16, 185, 129, .09);
}

.personnel-password-inline-input {
    width: 100%;
    max-width: 120px;
    min-height: 27px;
    padding: 3px 6px;
    color: var(--ink);
    border: 1px solid var(--primary);
    border-radius: 6px;
    background: var(--card);
    font: inherit;
    font-size: 9px;
    letter-spacing: 0;
    outline: 0;
}

.personnel-field-suffix {
    position: absolute;
    left: 10px;
    color: var(--muted);
    font-size: 9px;
    pointer-events: none;
}

.personnel-leave-control {
    position: relative;
}

.personnel-leave-control .form-control {
    padding-left: 35px;
}

.personnel-password-control {
    position: relative;
}

.personnel-password-control .form-control {
    padding-left: 39px;
}

#personnel-form-password {
    padding-left: 39px;
}

.personnel-password-toggle {
    position: absolute;
    left: 6px;
    top: 50%;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    color: var(--muted);
    border: 0;
    border-radius: 7px;
    background: transparent;
    transform: translateY(-50%);
}

.personnel-password-toggle:hover {
    color: var(--primary);
    background: var(--primary-soft);
}

.personnel-password-note {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 8px;
}

.personnel-table-wrap {
    overflow-x: hidden;
}

.personnel-table {
    min-width: 0;
    table-layout: fixed;
}

.personnel-table thead th,
.personnel-table tbody td {
    padding: 9px 10px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.personnel-table thead th:nth-child(1) { width: 11%; }
.personnel-table thead th:nth-child(2) { width: 22%; }
.personnel-table thead th:nth-child(3) { width: 16%; }
.personnel-table thead th:nth-child(4) { width: 13%; }
.personnel-table thead th:nth-child(5) { width: 11%; }
.personnel-table thead th:nth-child(6) { width: 9%; }
.personnel-table thead th:nth-child(7) { width: 9%; }
.personnel-table thead th:last-child { width: 9%; }

@media (max-width: 991.98px) {
    .personnel-filter-form {
        grid-template-columns: minmax(0, 1fr) minmax(130px, .75fr) auto !important;
    }

    .personnel-table thead th,
    .personnel-table tbody td {
        padding-inline: 7px;
        font-size: 9px;
    }
}

@media (max-width: 767.98px) {
    .personnel-filter-form {
        grid-template-columns: 1fr 1fr !important;
    }

    .personnel-filter-form .personnel-filter-search,
    .personnel-filter-form .personnel-filter-actions {
        grid-column: 1 / -1;
    }

    .personnel-filter-actions {
        justify-content: space-between;
    }

    .personnel-table,
    .personnel-table thead,
    .personnel-table tbody,
    .personnel-table tr,
    .personnel-table th,
    .personnel-table td {
        display: block;
    }

    .personnel-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
    }

    .personnel-table tbody tr {
        margin: 8px;
        padding: 8px;
        border: 1px solid var(--border);
        border-radius: 12px;
        background: var(--card);
    }

    .personnel-table tbody td {
        width: 100% !important;
        min-height: 34px;
        padding: 7px 5px 7px 45%;
        position: relative;
        border: 0;
        border-bottom: 1px solid color-mix(in srgb, var(--border) 65%, transparent);
        text-align: right;
    }

    .personnel-table tbody td:last-child {
        border-bottom: 0;
    }

    .personnel-table tbody td::before {
        content: attr(data-label);
        position: absolute;
        right: 5px;
        top: 7px;
        color: var(--muted);
        font-size: 8px;
        font-weight: 700;
    }

    .personnel-actions {
        justify-content: flex-start;
    }
}

/* Compact press ledger overrides */
.press-ledger-layout {
    direction: ltr;
    grid-template-areas: "content rail";
}

.press-ledger-rail,
.press-ledger-content {
    direction: rtl;
}

.press-ledger-press-icon {
    width: 31px;
    height: 31px;
    flex: 0 0 31px;
    display: grid;
    place-items: center;
    color: var(--primary);
    font-size: 11px;
    border-radius: 9px;
    background: var(--primary-soft);
}

.press-ledger-press-icon.featured {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
    font-size: 15px;
    border-radius: 11px;
}

.press-ledger-press.active .press-ledger-press-icon {
    color: #fff;
    background: rgba(255, 255, 255, .16);
}

.press-ledger-content {
    padding: 10px;
}

.press-ledger-list {
    padding-top: 7px;
    gap: 5px;
}

.press-ledger-entry {
    border-radius: 10px;
}

.press-ledger-entry-head {
    padding: 7px 9px;
}

.press-ledger-entry-icon {
    width: 28px;
    height: 28px;
    flex-basis: 28px;
    border-radius: 8px;
}

.press-ledger-entry-identity strong {
    font-size: 9px;
}

.press-ledger-entry-identity small,
.press-ledger-entry-meta > span {
    font-size: 7px;
}

.press-ledger-entry-identity small {
    margin-top: 1px;
}

.press-ledger-entry-meta > span {
    padding: 3px 6px;
}

.press-ledger-metrics {
    padding: 5px;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 4px;
}

.press-ledger-metric {
    min-height: 42px;
    padding: 5px 6px;
    border-radius: 7px;
}

.press-ledger-metric > span {
    margin-bottom: 2px;
    font-size: 6px;
}

.press-ledger-metric > strong {
    font-size: 8px;
}

.press-ledger-metric > strong small {
    font-size: 6px;
}

@media (max-width: 767.98px) {
    .press-ledger-metrics {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .press-ledger-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .stops-filter-form.personnel-filter-form {
        grid-template-columns: 1fr;
    }

    .personnel-filter-search,
    .personnel-filter-actions {
        grid-column: auto;
    }
}

.report-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.report-actions .btn {
    min-height: 32px;
    padding: 5px 9px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    white-space: nowrap;
}

.press-reports-table {
    min-width: 940px;
}

.press-reports-table thead th,
.press-reports-table tbody td {
    padding: 12px 14px;
}

.press-device-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.press-device-cell > span:last-child {
    display: grid;
    gap: 2px;
}

.press-device-cell strong {
    color: var(--ink);
    font-size: 11px;
}

.press-device-cell small {
    color: var(--muted);
    font-size: 9px;
}

.press-device-icon {
    width: 30px;
    height: 30px;
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    color: var(--primary);
    border-radius: 9px;
    background: var(--primary-soft);
}

.press-production-number {
    display: inline-block;
    padding: 4px 8px;
    color: var(--primary);
    border-radius: 8px;
    background: var(--primary-soft);
    font-weight: 700;
}

/* ---------- چیدمان فشرده‌تر جدول پرس ----------
   هدف: دکمهٔ «حذف» بدون اسکرول افقی روی مانیتور دیده شود.
   این قواعد فقط برای نمایشگر است تا با حالت کارت موبایل تداخل نکند. */
@media (min-width: 992px) {
    .press-reports-table { min-width: 0; }

    .press-reports-table thead th {
        padding: 9px 8px;
        font-size: 11.5px;
        white-space: nowrap;
    }

    .press-reports-table tbody td {
        padding: 9px 8px;
        font-size: 12.5px;
    }

    /* ستون‌های متنی طولانی نباید جدول را بیش از حد پهن کنند */
    .press-reports-table tbody td:nth-child(4),
    .press-reports-table tbody td:nth-child(5) {
        max-width: 128px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .press-device-cell { gap: 7px; }
    .press-device-cell strong { font-size: 11.5px; }
    .press-device-cell small { font-size: 9.5px; }
    .press-device-icon { width: 26px; height: 26px; font-size: 13px; }
    .press-production-number { padding: 3px 7px; font-size: 12px; }

    .status-badge { font-size: 11px; }
}

.press-report-actions-cell {
    text-align: center;
}

.press-report-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.press-report-action {
    width: 30px;
    height: 30px;
    padding: 0;
    display: inline-grid;
    place-items: center;
    border: 1px solid transparent;
    border-radius: 9px;
    background: transparent;
    font-size: 12px;
    line-height: 1;
    text-decoration: none;
    transition: color .18s ease, background .18s ease, border-color .18s ease, transform .18s ease;
}

.press-report-action:hover {
    color: #fff;
    transform: translateY(-1px);
}

.press-report-action.pdf {
    color: var(--danger);
    border-color: color-mix(in srgb, var(--danger) 16%, transparent);
    background: color-mix(in srgb, var(--danger) 6%, transparent);
}

.press-report-action.pdf:hover {
    border-color: var(--danger);
    background: var(--danger);
}

.press-report-action.excel {
    color: #159455;
    border-color: color-mix(in srgb, #159455 17%, transparent);
    background: color-mix(in srgb, #159455 7%, transparent);
}

.press-report-action.excel:hover {
    border-color: #159455;
    background: #159455;
}

.press-report-action.print {
    color: var(--muted);
    border-color: var(--border);
    background: color-mix(in srgb, var(--muted) 5%, transparent);
}

.press-report-action.print:hover {
    border-color: #667085;
    background: #667085;
}

.excel-preview {
    --excel-green: #107c41;
    --excel-green-soft: #eaf6ef;
    color: #17211b;
    background: #eef2f0;
}

.excel-preview__toolbar {
    min-height: 68px;
    padding: 11px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid #d9e1dc;
    background: #fff;
}

.excel-preview__file,
.excel-preview__tools {
    display: flex;
    align-items: center;
}

.excel-preview__file {
    gap: 11px;
}

.excel-preview__file strong,
.excel-preview__file small {
    display: block;
}

.excel-preview__file strong {
    color: #17211b;
    font-size: 13px;
}

.excel-preview__file small {
    margin-top: 3px;
    color: #718078;
    font-size: 9px;
}

.excel-preview__icon {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    color: #fff;
    border-radius: 11px;
    background: var(--excel-green);
    box-shadow: 0 8px 18px rgba(16, 124, 65, .18);
    font-size: 19px;
}

.excel-preview__tools {
    padding: 4px;
    gap: 3px;
    border: 1px solid #dde5e0;
    border-radius: 11px;
    background: #f8faf9;
}

.excel-tool {
    width: 31px;
    height: 31px;
    display: grid;
    place-items: center;
    color: #4e5d55;
    border: 0;
    border-radius: 8px;
    background: transparent;
    transition: .18s ease;
}

.excel-tool:hover,
.excel-tool:active {
    color: var(--excel-green);
    background: var(--excel-green-soft);
}

.excel-tool:active {
    transform: scale(.94);
}

.excel-zoom-value {
    min-width: 44px;
    color: #66736c;
    font-size: 10px;
    text-align: center;
}

.excel-preview__viewport {
    height: min(70vh, 750px);
    padding: 24px;
    overflow: auto;
    direction: ltr;
    background:
        linear-gradient(rgba(124, 141, 131, .06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(124, 141, 131, .06) 1px, transparent 1px),
        #edf1ef;
    background-size: 22px 22px;
}

.excel-sheet {
    display: none;
    min-width: 1180px;
    min-height: 720px;
}

.excel-sheet.is-active {
    display: block;
}

.excel-paper {
    width: 1180px;
    min-height: 700px;
    margin: 0 auto;
    padding: 22px;
    direction: rtl;
    border: 1px solid #cbd5cf;
    background: #fff;
    box-shadow: 0 18px 50px rgba(31, 47, 38, .12);
    transition: transform .2s ease;
}

.excel-document-title {
    min-height: 62px;
    padding: 10px 15px;
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    align-items: center;
    border: 1px solid #5d6c63;
    background: #f9fbfa;
    text-align: center;
}

.excel-document-title h3 {
    margin: 0;
    color: #13251a;
    font-size: 18px;
    font-weight: 700;
}

.excel-document-title span {
    color: #526158;
    font-size: 10px;
}

.excel-info-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.excel-cell {
    min-width: 0;
    border: solid #8a968f;
    border-width: 0 0 1px 1px;
    text-align: center;
}

.excel-field {
    min-height: 58px;
    padding: 8px 7px;
}

.excel-cell span,
.excel-cell strong {
    display: block;
}

.excel-cell span {
    margin-bottom: 5px;
    color: #617068;
    font-size: 9px;
}

.excel-cell strong {
    color: #101d16;
    font-size: 11px;
    overflow-wrap: anywhere;
}

.excel-section-title {
    padding: 7px 12px;
    color: #fff;
    border: 1px solid #0b6734;
    background: var(--excel-green);
    font-size: 10px;
    font-weight: 700;
    text-align: center;
}

.excel-tables-grid {
    display: grid;
    grid-template-columns: .75fr 1fr 1.45fr;
}

.excel-table-block table {
    width: 100%;
    height: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.excel-table-block th,
.excel-table-block td {
    height: 28px;
    padding: 4px 6px;
    color: #243229;
    border: 1px solid #8d9992;
    font-size: 9px;
    text-align: center;
    overflow-wrap: anywhere;
}

.excel-table-block th {
    color: #25332b;
    background: #e9f2ec;
    font-weight: 700;
}

.excel-table-block tbody tr:nth-child(even) td {
    background: #fafcfb;
}

.excel-table-block tbody tr:hover td {
    background: #f0f8f3;
}

.excel-metrics-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.excel-metric {
    min-height: 54px;
    padding: 8px 6px;
}

.excel-metrics-grid--compact {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.excel-signatures {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border: solid #89968e;
    border-width: 0 1px 1px 0;
}

.excel-signatures > div {
    min-height: 74px;
    padding: 10px;
    border-left: 1px solid #89968e;
}

.excel-signatures span,
.excel-signatures strong {
    display: block;
}

.excel-signatures span {
    color: #68756e;
    font-size: 9px;
}

.excel-signatures strong {
    margin-top: 16px;
    color: #18251e;
    font-size: 10px;
}

.excel-table-block--quality {
    margin-bottom: 16px;
}

.excel-table-block--quality th,
.excel-table-block--quality td {
    height: 39px;
}

.excel-description {
    min-height: 95px;
    padding: 12px;
    border: 1px solid #8d9992;
}

.excel-description span {
    color: #617068;
    font-size: 9px;
}

.excel-description p {
    margin: 8px 0 0;
    color: #1c2921;
    font-size: 10px;
    line-height: 2;
}

.excel-preview__tabs {
    min-height: 49px;
    padding: 7px 18px;
    display: flex;
    align-items: center;
    gap: 5px;
    border-top: 1px solid #d6dfd9;
    background: #fff;
}

.excel-sheet-tab {
    height: 34px;
    padding: 0 15px;
    color: #69776f;
    border: 0;
    border-radius: 8px;
    background: transparent;
    font-size: 10px;
    transition: .18s ease;
}

.excel-sheet-tab:hover {
    color: var(--excel-green);
    background: #f2f7f4;
}

.excel-sheet-tab.is-active {
    color: #fff;
    background: var(--excel-green);
    box-shadow: 0 6px 14px rgba(16, 124, 65, .17);
}

.excel-preview__status {
    margin-right: auto;
    color: #75827b;
    font-size: 9px;
}

.excel-preview__status i {
    margin-left: 4px;
    color: var(--excel-green);
}

.report-details {
    display: grid;
    gap: 16px;
}

.report-detail-section {
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
}

.report-detail-section h3 {
    margin: 0 0 14px;
    color: var(--ink);
    font-size: 14px;
}

.report-detail-section h3 small {
    color: var(--muted);
    font-size: 10px;
}

.report-info-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.report-info-item {
    min-width: 0;
    padding: 10px 12px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--primary) 4%, var(--background));
}

.report-info-item span,
.report-info-item strong {
    display: block;
}

.report-info-item span {
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 9px;
}

.report-info-item strong {
    color: var(--ink);
    font-size: 11px;
    overflow-wrap: anywhere;
}

.report-detail-table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
    white-space: nowrap;
}

.report-detail-table th,
.report-detail-table td {
    padding: 10px;
    color: var(--muted);
    border: 1px solid var(--border);
    text-align: center;
    font-size: 10px;
}

.report-detail-table th {
    color: var(--ink);
    background: color-mix(in srgb, var(--surface) 72%, var(--background));
    font-weight: 700;
}

.report-empty-cell {
    padding: 18px !important;
    color: var(--muted) !important;
}

.report-description {
    min-height: 54px;
    padding: 12px;
    color: var(--muted);
    border-radius: 12px;
    background: color-mix(in srgb, var(--primary) 4%, var(--background));
    font-size: 11px;
    line-height: 2;
    white-space: pre-wrap;
}

.empty-state {
    min-height: 150px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 8px;
    color: #a3a4b3;
    text-align: center;
}

.empty-state > span {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    color: var(--primary);
    border-radius: 17px;
    background: var(--primary-soft);
    font-size: 22px;
}

.empty-state p {
    margin: 0;
    font-size: 11px;
}

.module-hero {
    position: relative;
    min-height: 215px;
    padding: 32px;
    display: flex;
    align-items: center;
    overflow: hidden;
    border-radius: 24px;
    background: var(--card);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.module-hero-icon {
    width: 76px;
    height: 76px;
    margin-left: 20px;
    display: grid;
    place-items: center;
    color: var(--primary);
    border-radius: 24px;
    background: var(--primary-soft);
    font-size: 34px;
}

.module-hero h2 {
    margin: 0 0 8px;
    font-size: 23px;
}

.module-hero p {
    max-width: 580px;
    margin: 0;
    color: var(--muted);
}

.module-features {
    margin-top: 22px;
}

.module-feature {
    height: 100%;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--card);
}

.module-feature i {
    color: var(--primary);
    font-size: 20px;
}

.module-feature h4 {
    margin: 12px 0 6px;
    font-size: 14px;
}

.module-feature p {
    margin: 0;
    color: var(--muted);
    font-size: 11px;
}

.pagination {
    margin: 20px 0 0;
}

.infinite-scroll-loader {
    min-height: 58px;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    border-top: 1px dashed var(--border);
    font-size: 10px;
}

.infinite-scroll-loader > span,
.infinite-scroll-loader > button {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

.infinite-scroll-loader[data-state="idle"] [data-infinite-scroll-idle],
.infinite-scroll-loader[data-state="loading"] [data-infinite-scroll-loading],
.infinite-scroll-loader[data-state="error"] [data-infinite-scroll-retry],
.infinite-scroll-loader[data-state="complete"] [data-infinite-scroll-complete] {
    display: inline-flex;
}

.infinite-scroll-loader[data-state="loading"] {
    color: var(--primary);
}

.infinite-scroll-loader[data-state="complete"] {
    color: #079455;
}

.infinite-scroll-loader [data-infinite-scroll-retry] {
    min-height: 34px;
    padding: 6px 12px;
    color: var(--danger);
    border: 1px solid color-mix(in srgb, var(--danger) 24%, var(--border));
    border-radius: 9px;
    background: color-mix(in srgb, var(--danger) 6%, var(--surface));
    font: inherit;
}

.infinite-scroll-loader [data-infinite-scroll-retry]:hover {
    color: #fff;
    border-color: var(--danger);
    background: var(--danger);
}

.page-link {
    margin: 0 2px;
    color: var(--primary);
    border: 0;
    border-radius: 9px !important;
}

.active > .page-link {
    background: var(--primary);
}

.auth-body {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
    background: var(--background);
}

.auth-page {
    position: relative;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    display: grid;
    grid-template-columns: 1.12fr .88fr;
    /* Keep the form on the right and the visual panel on the left.
       Individual panels retain RTL for Persian content. */
    direction: ltr;
}

.auth-showcase {
    position: relative;
    height: 100%;
    min-height: 0;
    padding: clamp(24px, 5vh, 64px) clamp(28px, 5vw, 76px);
    display: flex;
    align-items: center;
    overflow: hidden;
    color: #fff;
    isolation: isolate;
    background: #18251e;
    direction: rtl;
}

.showcase-image,
.showcase-grid {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.showcase-image {
    z-index: -3;
    background:
        linear-gradient(100deg, rgba(8, 19, 15, .76) 0%, rgba(8, 19, 15, .46) 44%, rgba(8, 19, 15, .08) 100%),
        url("/images/dirgodaz-bg.webp") center / cover no-repeat;
    transform: scale(1.04);
    animation: showcaseZoom 18s ease-in-out infinite alternate;
}

.showcase-grid {
    z-index: -2;
    opacity: .22;
    background-image: linear-gradient(rgba(220, 255, 231, .12) 1px, transparent 1px), linear-gradient(90deg, rgba(220, 255, 231, .12) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: linear-gradient(90deg, transparent, #000 30%, #000 85%, transparent);
}

.auth-showcase-content {
    position: relative;
    z-index: 2;
    max-width: 640px;
    padding: clamp(20px, 3vh, 34px);
    border: 1px solid rgba(215, 255, 229, .12);
    border-radius: 26px;
    background: linear-gradient(135deg, rgba(8, 27, 18, .62), rgba(8, 27, 18, .28));
    box-shadow: 0 28px 70px rgba(0, 0, 0, .2);
    backdrop-filter: blur(8px);
    animation: showcaseEnter .8s cubic-bezier(.22, 1, .36, 1) both;
}

.showcase-badge {
    padding: 8px 14px;
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(215, 255, 229, .34);
    border-radius: 30px;
    color: #edfff3;
    background: rgba(21, 72, 42, .58);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .15);
    backdrop-filter: blur(10px);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.7;
}

.showcase-badge i {
    margin-left: 5px;
    color: #8ef0b0;
}

.auth-showcase h1 {
    max-width: 580px;
    margin: clamp(14px, 3vh, 25px) 0 clamp(10px, 2vh, 16px);
    font-size: clamp(34px, min(4.2vw, 7vh), 62px);
    font-weight: 700;
    letter-spacing: -.015em;
    line-height: 1.35;
    text-shadow: 0 4px 24px rgba(0, 0, 0, .32);
}

.auth-showcase h1 span {
    color: #9af2b7;
}

.auth-showcase-content > p {
    max-width: 550px;
    margin-bottom: 0;
    color: rgba(248, 255, 250, .9);
    font-size: 15px;
    font-weight: 400;
    line-height: 2.05;
    text-shadow: 0 2px 14px rgba(0, 0, 0, .28);
}

.showcase-cards {
    margin-top: clamp(18px, 4vh, 32px);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.showcase-cards > div {
    min-height: clamp(104px, 18vh, 142px);
    padding: clamp(12px, 2.2vh, 18px);
    border: 1px solid rgba(215, 255, 229, .22);
    border-radius: 17px;
    background: rgba(14, 48, 29, .62);
    backdrop-filter: blur(12px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, .18);
    transition: transform .3s ease, background .3s ease;
}

.showcase-cards > div:hover {
    transform: translateY(-5px);
    background: rgba(28, 72, 46, .56);
}

.showcase-cards i,
.showcase-cards strong,
.showcase-cards small {
    display: block;
}

.showcase-cards i {
    margin-bottom: clamp(8px, 2vh, 17px);
    color: #a8f7c1;
    font-size: 23px;
}

.showcase-cards strong {
    color: #fff;
    font-size: 13px;
    line-height: 1.8;
}

.showcase-cards small {
    margin-top: 5px;
    color: rgba(244, 255, 247, .78);
    font-size: 11px;
    line-height: 1.75;
}

@keyframes showcaseZoom {
    from { transform: scale(1.04); }
    to { transform: scale(1.1); }
}

@keyframes showcaseEnter {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-form-side {
    height: 100%;
    min-height: 0;
    padding: clamp(20px, 5vh, 40px);
    display: grid;
    place-items: center;
    background: var(--surface);
    direction: rtl;
}

.auth-theme-toggle {
    position: fixed;
    top: 22px;
    left: 22px;
    z-index: 20;
}

.login-card {
    width: min(100%, 410px);
}

.login-brand {
    color: var(--ink);
}

.login-brand small {
    color: var(--muted);
}

.login-heading {
    margin: clamp(24px, 6vh, 48px) 0 clamp(18px, 3.5vh, 28px);
}

.login-heading .eyebrow {
    color: var(--primary);
    font-size: 13px;
    font-weight: 700;
}

.login-heading h2 {
    margin: 8px 0;
    font-size: 25px;
}

.login-heading p {
    color: var(--muted);
    font-size: 13px;
}

.input-with-icon {
    position: relative;
}

.input-with-icon > i {
    position: absolute;
    right: 15px;
    top: 13px;
    z-index: 2;
    color: #aaaabb;
}

.input-with-icon .form-control {
    min-height: 50px;
    padding-right: 43px;
}

.password-toggle {
    position: absolute;
    left: 8px;
    top: 8px;
    width: 34px;
    height: 34px;
    color: #9a9bad;
    border: 0;
    background: transparent;
}

.login-submit {
    min-height: 51px;
    margin-top: 18px;
}

.login-footer {
    margin-top: 24px;
    color: #a0a1b0;
    text-align: center;
    font-size: 11px;
}

.auth-decoration {
    position: absolute;
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 50%;
    pointer-events: none;
    animation: float 7s ease-in-out infinite;
}

.auth-decoration-one {
    width: 260px;
    height: 260px;
    right: -100px;
    top: -90px;
}

.auth-decoration-two {
    width: 140px;
    height: 140px;
    right: 44%;
    bottom: 4%;
    animation-delay: -2s;
}

.reveal {
    opacity: 0;
    transform: translateY(14px);
}

.reveal.visible {
    opacity: 1;
    transform: none;
    transition: opacity .55s ease, transform .55s ease;
}

.reduce-motion * {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: .001ms !important;
        transition-duration: .001ms !important;
    }
}

@keyframes pulse {
    50% { box-shadow: 0 0 0 10px rgba(100, 229, 165, 0); }
}

@keyframes menuGlow {
    50% {
        opacity: .45;
        transform: scale(.72);
    }
}

@keyframes float {
    50% { transform: translateY(-16px) rotate(5deg); }
}

html[data-theme="dark"] .topbar,
html[data-theme="dark"] .dropdown-menu {
    color: var(--ink);
    background-color: color-mix(in srgb, var(--surface) 92%, transparent);
}

html[data-theme="dark"] .dropdown-item {
    color: var(--muted);
}

html[data-theme="dark"] .dropdown-item:hover,
html[data-theme="dark"] .dropdown-item:focus {
    color: var(--ink);
    background: rgba(59, 130, 246, .12);
}

html[data-theme="dark"] .account-dropdown {
    color: var(--ink);
    border-color: var(--border);
    background: color-mix(in srgb, var(--surface) 96%, transparent);
    box-shadow: 0 20px 55px rgba(0, 0, 0, .28);
}

html[data-theme="dark"] .account-dropdown-item {
    color: var(--ink);
}

html[data-theme="dark"] .account-dropdown-item:hover,
html[data-theme="dark"] .account-dropdown-item:focus {
    color: var(--ink);
    background: rgba(59, 130, 246, .1);
}

html[data-theme="dark"] .account-logout,
html[data-theme="dark"] .account-logout:hover,
html[data-theme="dark"] .account-logout:focus {
    color: var(--danger);
}

html[data-theme="dark"] .account-logout:hover,
html[data-theme="dark"] .account-logout:focus {
    background: color-mix(in srgb, var(--danger) 9%, transparent);
}

html[data-theme="dark"] .dropdown-divider,
html[data-theme="dark"] .border-top,
html[data-theme="dark"] .border-bottom {
    border-color: var(--border) !important;
}

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

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

html[data-theme="dark"] .btn-light {
    color: var(--ink);
    border-color: var(--border);
    background: var(--surface);
}

html[data-theme="dark"] .btn-outline-danger {
    color: #f97066;
    border-color: rgba(249, 112, 102, .5);
}

html[data-theme="dark"] .panel-table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--muted);
    --bs-table-hover-bg: rgba(59, 130, 246, .06);
}

html[data-theme="dark"] .panel-table thead th,
html[data-theme="dark"] .panel-table tbody td {
    color: var(--muted);
}

html[data-theme="dark"] .form-control,
html[data-theme="dark"] .form-select {
    color: var(--ink);
}

html[data-theme="dark"] .form-control::placeholder {
    color: #98a2b3;
}

html[data-theme="dark"] .form-select {
    --bs-form-select-bg-img: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23cbd5e1' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}

html[data-theme="dark"] .form-label,
html[data-theme="dark"] .form-check-label {
    color: var(--muted);
}

html[data-theme="dark"] .status-badge.success {
    color: #69e6aa;
    background: rgba(50, 213, 131, .13);
}

html[data-theme="dark"] .status-badge.warning {
    color: #ffc35c;
    background: rgba(253, 176, 34, .13);
}

html[data-theme="dark"] .status-badge.danger {
    color: #ff9189;
    background: rgba(249, 112, 102, .13);
}

html[data-theme="dark"] .status-badge.neutral {
    color: #cbd5e1;
    background: rgba(152, 162, 179, .13);
}

html[data-theme="dark"] .progress {
    background: #233047;
}

html[data-theme="dark"] .empty-state {
    color: #98a2b3;
}

html[data-theme="dark"] .auth-form-side {
    background:
        radial-gradient(circle at top left, rgba(59, 130, 246, .09), transparent 34%),
        var(--background);
}

html[data-theme="dark"] .login-brand {
    color: var(--ink);
}

@media (min-width: 992px) {
    .sidebar-compact {
        --sidebar-width: 92px;
    }

    .sidebar-compact .brand-copy,
    .sidebar-compact .sidebar-link span,
    .sidebar-compact .sidebar-link .dropdown-arrow,
    .sidebar-compact .nav-section-label,
    .sidebar-compact .sidebar-submenu,
    .sidebar-compact .system-health div,
    .sidebar-compact .health-pulse {
        display: none;
    }

    .sidebar-compact .sidebar-link {
        justify-content: center;
    }
}

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

    .sidebar-open .sidebar {
        transform: none;
    }

    .app-main {
        margin-right: 0;
    }

    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 1035;
        visibility: hidden;
        background: rgba(25, 22, 52, .48);
        opacity: 0;
        transition: .25s ease;
    }

    .sidebar-open .sidebar-backdrop {
        visibility: visible;
        opacity: 1;
    }

    .auth-page {
        grid-template-columns: 1fr;
    }

    .auth-showcase {
        display: none;
    }

    .auth-form-side {
        height: 100vh;
        height: 100dvh;
        min-height: 0;
        background:
            radial-gradient(circle at top right, var(--primary-soft), transparent 35%),
            var(--surface);
    }

    html[data-theme="dark"] .auth-form-side {
        background:
            radial-gradient(circle at top right, rgba(59, 130, 246, .12), transparent 35%),
            var(--background);
    }
}

@media (max-height: 720px) and (min-width: 992px) {
    .auth-showcase-content > p {
        font-size: 13px;
        line-height: 1.8;
    }

    .showcase-cards {
        gap: 10px;
    }

    .showcase-cards > div {
        border-radius: 14px;
    }
}

@media (max-height: 560px) {
    .auth-body .auth-form-side {
        padding-block: 12px;
    }

    .login-brand .brand-mark {
        width: 40px;
        height: 40px;
        flex-basis: 40px;
    }

    .login-heading {
        margin: 12px 0 10px;
    }

    .login-heading h2 {
        margin: 4px 0;
        font-size: 21px;
    }

    .login-heading p {
        display: none;
    }

    .login-form .mb-3 {
        margin-bottom: 8px !important;
    }

    .input-with-icon .form-control {
        min-height: 44px;
    }

    .input-with-icon > i {
        top: 10px;
    }

    .password-toggle {
        top: 5px;
    }

    .login-submit {
        min-height: 44px;
        margin-top: 8px;
    }

    .login-footer {
        margin-top: 8px;
    }
}

@media (max-width: 767.98px) {
    .topbar {
        min-height: 74px;
        padding: 12px 16px;
    }

    .topbar-title {
        font-size: 17px;
    }

    .page-content {
        padding: 8px 15px 26px;
    }

    .welcome-banner {
        padding: 25px 22px;
        align-items: flex-start;
        flex-direction: column;
        gap: 20px;
    }

    .panel-card,
    .form-card {
        padding: 16px;
    }

    .page-toolbar,
    .panel-card-header {
        align-items: stretch;
        flex-direction: column;
    }

    .search-box {
        width: 100%;
    }

    .report-info-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .report-actions .btn span {
        display: none;
    }

    .report-actions .btn {
        width: 32px;
        padding: 0;
        justify-content: center;
    }

    .module-hero {
        padding: 24px;
        align-items: flex-start;
        flex-direction: column;
    }

    .module-hero-icon {
        margin: 0 0 18px;
    }

    .auth-form-side {
        padding: 25px;
    }
}

/* Industrial sidebar */
:root {
    --sidebar-width: 286px;
    --sidebar-bg: #0b1220;
    --sidebar-card: #172033;
    --sidebar-border: rgba(96, 165, 250, .14);
    --sidebar-accent: #3b82f6;
    --sidebar-accent-light: #22d3ee;
}

.sidebar {
    overflow: visible;
    background:
        radial-gradient(circle at 82% 5%, rgba(59, 130, 246, .22), transparent 24%),
        radial-gradient(circle at 14% 48%, rgba(34, 211, 238, .07), transparent 28%),
        linear-gradient(180deg, #101828 0%, #0b1220 58%, #080f1c 100%);
    border-left: 1px solid rgba(96, 165, 250, .1);
    box-shadow: -18px 0 50px rgba(11, 18, 32, .2);
}

.sidebar::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: .14;
    background-image:
        linear-gradient(rgba(96, 165, 250, .035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(96, 165, 250, .022) 1px, transparent 1px);
    background-size: 100% 22px, 22px 100%;
}

.sidebar-head {
    position: relative;
    min-height: 86px;
    padding: 17px 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--sidebar-border);
}

.sidebar .brand-link {
    min-width: 0;
    flex: 1;
}

.sidebar .brand-mark {
    position: relative;
    width: 46px;
    height: 46px;
    flex-basis: 46px;
    overflow: hidden;
    padding: 3px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 9px 24px rgba(0, 0, 0, .2);
}

.brand-brick {
    position: absolute;
    height: 8px;
    border: 1px solid rgba(255, 255, 255, .54);
    border-radius: 2px;
}

.brand-brick-one { width: 20px; top: 13px; right: 7px; }
.brand-brick-two { width: 14px; top: 13px; left: 5px; }
.brand-brick-three { width: 27px; top: 25px; right: 12px; }

.sidebar .brand-copy strong {
    letter-spacing: -.35px;
    font-size: 16px;
}

.sidebar .brand-copy small {
    color: rgba(255, 255, 255, .46);
    font-size: 10px;
}

.sidebar-control {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    place-items: center;
    color: rgba(255, 255, 255, .5);
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 9px;
    background: rgba(255, 255, 255, .035);
    transition: .2s ease;
}

.sidebar-control:hover {
    color: #fff;
    border-color: rgba(34, 211, 238, .45);
    background: rgba(59, 130, 246, .14);
}

.sidebar-context {
    position: relative;
    margin: 14px 14px 4px;
    padding: 11px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    border: 1px solid rgba(96, 165, 250, .13);
    border-radius: 13px;
    background: linear-gradient(135deg, rgba(59, 130, 246, .1), rgba(34, 211, 238, .035));
}

.context-icon {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: grid;
    place-items: center;
    color: var(--sidebar-accent-light);
    border-radius: 10px;
    background: rgba(59, 130, 246, .16);
    box-shadow: inset 0 0 0 1px rgba(96, 165, 250, .08);
}

.context-copy { min-width: 0; flex: 1; }
.context-copy small,
.context-copy strong { display: block; white-space: nowrap; }
.context-copy small { color: rgba(255, 255, 255, .38); font-size: 9px; }
.context-copy strong { margin-top: 2px; overflow: hidden; font-size: 11px; text-overflow: ellipsis; }
.context-arrow { color: rgba(255, 255, 255, .28); font-size: 10px; }

.sidebar-nav {
    position: relative;
    padding: 8px 12px 20px;
}

.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { border-radius: 10px; background: rgba(255, 255, 255, .12); }

.nav-section + .nav-section {
    margin-top: 13px;
    padding-top: 11px;
    border-top: 1px solid rgba(255, 255, 255, .055);
}

.nav-section-label {
    padding: 4px 12px 7px;
    color: rgba(255, 255, 255, .31);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .2px;
}

.sidebar-link {
    position: relative;
    min-height: 46px;
    margin: 2px 0;
    padding: 6px 8px;
    gap: 9px;
    color: rgba(255, 255, 255, .61);
    border-radius: 11px;
    font-size: 14px;
    font-weight: 400;
}

.sidebar-link .nav-icon {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    font-size: 16px;
    transition: .2s ease;
}

.sidebar-link:hover {
    color: rgba(255, 255, 255, .92);
    background: rgba(255, 255, 255, .045);
    transform: none;
}

.sidebar-link:hover .nav-icon { background: rgba(255, 255, 255, .045); }

.sidebar-link.active {
    color: #fff;
    background: linear-gradient(90deg, rgba(59, 130, 246, .2), rgba(34, 211, 238, .055));
    box-shadow: none;
    transform: none;
}

.sidebar-link.active .nav-icon {
    color: #fff;
    background: linear-gradient(145deg, #3b82f6, #155eef);
    box-shadow: 0 7px 20px rgba(21, 94, 239, .3);
}

.sidebar-link.active::after {
    width: 3px;
    height: 20px;
    margin-right: auto;
    border-radius: 4px;
    background: var(--sidebar-accent-light);
    box-shadow: 0 0 14px rgba(34, 211, 238, .42);
    animation: none;
}

.nav-text { white-space: nowrap; }

.nav-tag {
    margin-right: auto;
    padding: 3px 7px;
    color: rgba(255, 255, 255, .42);
    border-radius: 20px;
    background: rgba(255, 255, 255, .055);
    font-size: 8px;
}

.sidebar-dropdown-toggle .dropdown-arrow {
    margin-right: auto;
    color: rgba(255, 255, 255, .3);
    font-size: 10px;
}

.sidebar-submenu {
    margin: 3px 25px 7px 0;
    padding: 2px 22px 2px 0;
    border-right: 1px solid rgba(34, 211, 238, .22);
}

.sidebar-submenu a {
    padding: 7px 8px;
    color: rgba(255, 255, 255, .43);
    border-radius: 7px;
    font-size: 10px;
}

.sidebar-submenu a::before {
    right: -25px;
    top: 13px;
    width: 5px;
    height: 5px;
    background: #54544e;
}

.sidebar-submenu a:hover { color: rgba(255, 255, 255, .9); background: rgba(255, 255, 255, .035); }
.sidebar-submenu a.active { color: var(--sidebar-accent-light); font-weight: 700; }
.sidebar-submenu a.active::before { background: var(--sidebar-accent-light); box-shadow: 0 0 0 4px rgba(34, 211, 238, .1); }

.sidebar-footer {
    position: relative;
    padding: 12px 13px 14px;
    border-top: 1px solid var(--sidebar-border);
    background: rgba(0, 0, 0, .09);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 9px;
}

.sidebar-avatar {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: grid;
    place-items: center;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .13);
    border-radius: 10px;
    background: linear-gradient(145deg, #344054, #172033);
    font-size: 11px;
    font-weight: 700;
}

.sidebar-user-copy { min-width: 0; flex: 1; }
.sidebar-user-copy strong,
.sidebar-user-copy small { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sidebar-user-copy strong { color: rgba(255, 255, 255, .85); font-size: 10px; }
.sidebar-user-copy small { margin-top: 2px; color: rgba(255, 255, 255, .35); font-size: 8px; }

.sidebar-logout {
    width: 31px;
    height: 31px;
    display: grid;
    place-items: center;
    color: rgba(255, 255, 255, .38);
    border: 0;
    border-radius: 9px;
    background: transparent;
    transition: .2s ease;
}

.sidebar-logout:hover { color: #ff9b8c; background: rgba(255, 107, 87, .09); }

.system-status {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, .3);
    font-size: 8px;
}

.system-status span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #71c891;
    box-shadow: 0 0 0 4px rgba(113, 200, 145, .08);
}

@media (min-width: 992px) {
    .sidebar-compact { --sidebar-width: 82px; }
    .sidebar-compact .sidebar-head { padding-inline: 17px; }
    .sidebar-compact .brand-link { flex: 0; }
    .sidebar-compact .brand-mark { width: 46px; }
    .sidebar-compact .sidebar-collapse {
        position: absolute;
        left: -13px;
        top: 27px;
        z-index: 2;
        color: #fff;
        border-color: rgba(255, 255, 255, .12);
        background: #172033;
        box-shadow: 0 5px 15px rgba(0, 0, 0, .2);
    }
    .sidebar-compact .sidebar-context { margin-inline: 13px; padding-inline: 10px; justify-content: center; }
    .sidebar-compact .context-icon { width: 34px; }
    .sidebar-compact .sidebar-nav { padding-inline: 13px; overflow: visible; }
    .sidebar-compact .nav-section + .nav-section { border-top-color: rgba(255, 255, 255, .08); }
    .sidebar-compact .sidebar-link { padding-inline: 4px; justify-content: center; }
    .sidebar-compact .sidebar-link .nav-icon { display: grid; }
    .sidebar-compact .sidebar-link.active::after { position: absolute; left: -13px; }
    .sidebar-compact .sidebar-footer { padding-inline: 14px; }
    .sidebar-compact .sidebar-user { justify-content: center; }
    .sidebar-compact .brand-copy,
    .sidebar-compact .context-copy,
    .sidebar-compact .context-arrow,
    .sidebar-compact .nav-text,
    .sidebar-compact .nav-tag,
    .sidebar-compact .sidebar-link .dropdown-arrow,
    .sidebar-compact .nav-section-label,
    .sidebar-compact .sidebar-submenu,
    .sidebar-compact .sidebar-user-copy,
    .sidebar-compact .sidebar-user form,
    .sidebar-compact .system-status { display: none; }
    .sidebar-compact .sidebar-dropdown-toggle + .collapse { display: none; }
}

@media (max-width: 991.98px) {
    .sidebar { width: min(300px, 88vw); }
    .sidebar-backdrop { background: rgba(12, 13, 11, .62); backdrop-filter: blur(3px); }
    .sidebar-open { overflow: hidden; }
}

@media (max-width: 420px) {
    .sidebar-head { min-height: 78px; padding: 14px; }
    .sidebar-context { margin-top: 10px; }
}

/* Live report filters and compact search sizing */
.press-reports-filter-form .stops-filter-search {
    max-width: 310px;
}

.press-reports-filter-form {
    grid-template-columns: minmax(190px, .9fr) repeat(4, minmax(110px, 1fr)) auto;
}

.press-reports-filter-form .stops-filter-actions {
    align-items: center;
}

.reports-live-filter {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
}

.press-ledger-head-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.press-ledger-pdf-disabled {
    min-height: 28px;
    padding: 0 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--muted);
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    font-size: 8px;
    opacity: .62;
    cursor: not-allowed;
}

.press-ledger-pdf-disabled i {
    font-size: 11px;
}

@media (max-width: 1199.98px) {
    .press-reports-filter-form {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .press-reports-filter-form .stops-filter-search {
        max-width: none;
        grid-column: span 1;
    }

    .press-reports-filter-form .stops-filter-actions {
        grid-column: span 1;
    }
}

@media (max-width: 767.98px) {
    .press-reports-filter-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .press-reports-filter-form .stops-filter-search,
    .press-reports-filter-form .stops-filter-actions {
        grid-column: 1 / -1;
    }

    .press-ledger-content-head {
        align-items: flex-start;
    }

    .press-ledger-head-actions {
        align-items: flex-end;
        flex-direction: column;
    }
}

/* Compact overview sidebar */
:root {
    --sidebar-width: 252px;
    --sidebar-bg: #0c1526;
    --sidebar-card: #132039;
    --sidebar-border: rgba(148, 163, 184, .12);
    --sidebar-accent: #4f8cff;
    --sidebar-accent-light: #42d6c7;
}

.sidebar {
    overflow: visible;
    background:
        radial-gradient(circle at 88% 2%, rgba(79, 140, 255, .18), transparent 25%),
        linear-gradient(180deg, #101c31 0%, #0c1526 52%, #09111f 100%);
    border-left-color: rgba(148, 163, 184, .1);
    box-shadow: -12px 0 34px rgba(15, 23, 42, .16);
}

.sidebar::before {
    opacity: .08;
    background-size: 28px 28px;
}

.sidebar-head {
    min-height: 68px;
    padding: 10px 13px;
    gap: 8px;
}

.sidebar .brand-mark {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
    padding: 3px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .2);
}

.brand-brick-one { width: 18px; top: 11px; right: 6px; }
.brand-brick-two { width: 12px; top: 11px; left: 4px; }
.brand-brick-three { width: 24px; top: 22px; right: 10px; }

.sidebar .brand-copy strong {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 11px;
}

.sidebar .brand-copy small {
    margin-top: 1px;
    font-size: 7.5px;
}

/* Keep avatar initials compact. */
.topbar .user-avatar {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    max-width: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
}

.account-dropdown-avatar {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    max-width: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
}

.sidebar-footer .sidebar-avatar {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    max-width: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
}

.personnel-mini-avatar {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    max-width: 30px !important;
    min-height: 30px !important;
    max-height: 30px !important;
}

/* Keep login controls dark and stable while focused. */
.auth-page .input-with-icon .form-control,
.auth-page .input-with-icon .form-control:focus,
.auth-page .input-with-icon .form-control:active {
    color: #f8fafc !important;
    background-color: #101828 !important;
    border-color: rgba(148, 163, 184, .28) !important;
    box-shadow: none !important;
    outline: none;
}

.auth-page .input-with-icon .form-control::placeholder {
    color: rgba(226, 232, 240, .78) !important;
}

.auth-page input:-webkit-autofill,
.auth-page input:-webkit-autofill:hover,
.auth-page input:-webkit-autofill:focus {
    -webkit-text-fill-color: #f8fafc !important;
    -webkit-box-shadow: 0 0 0 1000px #101828 inset !important;
    box-shadow: 0 0 0 1000px #101828 inset !important;
    transition: background-color 9999s ease-out 0s;
}

.sidebar-brand-logo {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    display: block;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    object-fit: contain;
}

.sidebar-control {
    width: 29px;
    height: 29px;
    flex-basis: 29px;
    border-radius: 8px;
    font-size: 12px;
}

.sidebar-collapse {
    position: absolute;
    left: -14px;
    top: 50%;
    z-index: 5;
    width: 28px;
    height: 38px;
    flex-basis: 28px;
    color: rgba(255, 255, 255, .72);
    border: 1px solid rgba(148, 163, 184, .2);
    border-radius: 10px;
    background: linear-gradient(180deg, #1a2942, #111c30);
    box-shadow:
        0 8px 22px rgba(2, 6, 23, .28),
        inset 0 1px rgba(255, 255, 255, .045);
    transform: translateY(-50%);
    transition: color .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease;
}

.sidebar-collapse::after {
    content: "";
    position: absolute;
    right: 4px;
    top: 9px;
    bottom: 9px;
    width: 1px;
    border-radius: 1px;
    background: rgba(255, 255, 255, .09);
}

.sidebar-collapse i {
    position: relative;
    z-index: 1;
    font-size: 11px;
    transition: transform .18s ease;
}

.sidebar-collapse:hover {
    color: #fff;
    border-color: rgba(66, 214, 199, .38);
    background: linear-gradient(180deg, #213453, #15243b);
    box-shadow:
        0 10px 26px rgba(2, 6, 23, .34),
        0 0 0 3px rgba(66, 214, 199, .06);
    transform: translateY(-50%) scale(1.03);
}

.sidebar-collapse:focus-visible {
    color: #fff;
    outline: 2px solid rgba(66, 214, 199, .62);
    outline-offset: 2px;
}

.sidebar-collapse:active {
    transform: translateY(-50%) scale(.96);
}

.sidebar-compact .sidebar-collapse {
    color: rgba(255, 255, 255, .8);
    border-color: rgba(66, 214, 199, .24);
}

.sidebar-context {
    min-height: 42px;
    margin: 9px 11px 3px;
    padding: 6px 8px;
    gap: 8px;
    border-color: rgba(79, 140, 255, .13);
    border-radius: 11px;
    background: rgba(255, 255, 255, .035);
}

.context-icon {
    width: 29px;
    height: 29px;
    flex-basis: 29px;
    color: #73e3d7;
    border-radius: 8px;
    background: rgba(66, 214, 199, .09);
    font-size: 13px;
}

.context-copy small {
    font-size: 8px;
}

.context-copy strong {
    margin-top: 0;
    font-size: 10px;
}

.context-status {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 0 4px rgba(74, 222, 128, .08);
}

.sidebar-nav {
    min-height: 0;
    padding: 4px 10px 7px;
    overflow: hidden;
}

.nav-section + .nav-section {
    margin-top: 7px;
    padding-top: 7px;
}

.nav-section-label {
    padding: 2px 9px 4px;
    font-size: 8px;
    letter-spacing: 0;
}

.sidebar-link {
    min-height: 37px;
    margin: 1px 0;
    padding: 3px 7px;
    gap: 7px;
    border-radius: 9px;
    font-size: 13px;
}

.sidebar-link .nav-icon {
    width: 29px;
    height: 29px;
    flex-basis: 29px;
    border-radius: 8px;
    font-size: 14px;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, .04);
}

.sidebar-link.active {
    background: linear-gradient(90deg, rgba(79, 140, 255, .18), rgba(66, 214, 199, .04));
}

.sidebar-link.active .nav-icon {
    background: linear-gradient(145deg, #4f8cff, #2867df);
    box-shadow: 0 5px 14px rgba(39, 100, 220, .25);
}

.sidebar-link.active::after {
    width: 2px;
    height: 16px;
    background: #42d6c7;
}

.nav-tag {
    padding: 2px 6px;
    color: #86efac;
    border: 1px solid rgba(74, 222, 128, .15);
    background: rgba(34, 197, 94, .12);
    font-size: 7px;
}

.sidebar-group {
    padding: 5px;
    border: 1px solid rgba(148, 163, 184, .09);
    border-radius: 11px;
    background: rgba(255, 255, 255, .022);
}

.sidebar-group + .sidebar-group {
    margin-top: 6px;
}

.sidebar-group-title {
    min-height: 25px;
    padding: 1px 4px 5px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: rgba(255, 255, 255, .66);
    font-size: 9px;
    font-weight: 700;
}

.sidebar-group-title span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.sidebar-group-title i {
    color: #75a7ff;
    font-size: 11px;
}

.sidebar-group-title small {
    color: rgba(255, 255, 255, .27);
    font-size: 7px;
    font-weight: 400;
}

.sidebar-shortcuts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
}

.sidebar-shortcut {
    position: relative;
    min-width: 0;
    min-height: 34px;
    padding: 5px 7px;
    display: flex;
    align-items: center;
    gap: 6px;
    overflow: hidden;
    color: rgba(255, 255, 255, .54);
    border: 1px solid transparent;
    border-radius: 8px;
    background: rgba(255, 255, 255, .025);
    font-size: 8px;
    transition: color .18s ease, border-color .18s ease, background .18s ease, transform .18s ease;
}

.sidebar-shortcut i {
    width: 16px;
    flex: 0 0 16px;
    color: rgba(148, 163, 184, .72);
    font-size: 12px;
    text-align: center;
}

.sidebar-shortcut span {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.sidebar-shortcut:hover {
    color: #fff;
    border-color: rgba(79, 140, 255, .16);
    background: rgba(79, 140, 255, .08);
    transform: translateY(-1px);
}

.sidebar-shortcut:hover i {
    color: #8fb5ff;
}

.sidebar-shortcut.active {
    color: #fff;
    border-color: rgba(66, 214, 199, .22);
    background: linear-gradient(135deg, rgba(79, 140, 255, .18), rgba(66, 214, 199, .08));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .025);
}

.sidebar-shortcut.active::after {
    content: "";
    position: absolute;
    right: 0;
    top: 8px;
    bottom: 8px;
    width: 2px;
    border-radius: 2px;
    background: #42d6c7;
}

.sidebar-shortcut.active i {
    color: #68e0d3;
}

.sidebar-group-stops .sidebar-group-title i,
.sidebar-group-stops .sidebar-shortcut.active i {
    color: #fbbf74;
}

.sidebar-group-stops .sidebar-shortcut.active {
    border-color: rgba(251, 191, 116, .18);
    background: linear-gradient(135deg, rgba(245, 158, 11, .11), rgba(79, 140, 255, .07));
}

.sidebar-group-stops .sidebar-shortcut.active::after {
    background: #fbbf74;
}

.sidebar-footer {
    padding: 9px 11px 10px;
    background: rgba(2, 6, 23, .16);
}

.sidebar-user {
    gap: 7px;
}

.sidebar-avatar {
    width: 31px;
    height: 31px;
    flex-basis: 31px;
    border-radius: 9px;
    font-size: 9px;
}

.sidebar-user-copy strong {
    font-size: 9px;
}

.sidebar-user-copy small,
.system-status {
    font-size: 7px;
}

.sidebar-logout {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    font-size: 12px;
}

.system-status {
    margin-top: 6px;
}

.system-status span {
    width: 5px;
    height: 5px;
    box-shadow: 0 0 0 3px rgba(113, 200, 145, .07);
}

@media (min-width: 992px) {
    .sidebar-compact {
        --sidebar-width: 74px;
    }

    .sidebar-compact .sidebar-head {
        padding-inline: 12px;
    }

    .sidebar-compact .brand-mark {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
    }

    .sidebar-compact .sidebar-brand-logo {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
    }

    .sidebar-compact .sidebar-collapse {
        left: -14px;
        top: 50%;
    }

    .sidebar-compact .sidebar-context {
        margin-inline: 9px;
        padding-inline: 6px;
    }

    .sidebar-compact .context-status,
    .sidebar-compact .sidebar-group-title {
        display: none;
    }

    .sidebar-compact .sidebar-nav {
        padding-inline: 8px;
    }

    .sidebar-compact .sidebar-link {
        min-height: 36px;
        padding-inline: 3px;
    }

    .sidebar-compact .sidebar-link.active::after {
        left: -8px;
    }

    .sidebar-compact .sidebar-group {
        padding: 4px;
    }

    .sidebar-compact .sidebar-shortcuts {
        gap: 3px;
    }

    .sidebar-compact .sidebar-shortcut {
        min-height: 27px;
        padding: 3px;
        justify-content: center;
    }

    .sidebar-compact .sidebar-shortcut span {
        display: none;
    }

    .sidebar-compact .sidebar-shortcut i {
        width: auto;
        flex-basis: auto;
        font-size: 11px;
    }

    .sidebar-compact .sidebar-footer {
        padding-inline: 9px;
    }
}

@media (max-width: 991.98px) {
    .sidebar {
        width: min(270px, 88vw);
    }

    .sidebar-nav {
        overflow-y: auto;
    }
}

@media (max-height: 700px) and (min-width: 992px) {
    .sidebar-head {
        min-height: 60px;
        padding-block: 7px;
    }

    .sidebar-context {
        min-height: 37px;
        margin-top: 6px;
        padding-block: 4px;
    }

    .nav-section + .nav-section {
        margin-top: 4px;
        padding-top: 4px;
    }

    .sidebar-link {
        min-height: 34px;
    }

    .sidebar-group-title {
        min-height: 21px;
        padding-bottom: 3px;
    }

    .sidebar-shortcut {
        min-height: 30px;
        padding-block: 3px;
    }

    .sidebar-footer {
        padding-block: 7px;
    }

    .system-status {
        display: none;
    }
}

/* Production planning sheet */
.production-plan {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: radial-gradient(circle at 100% 0, rgba(59, 130, 246, .07), transparent 27%), var(--card);
    box-shadow: 0 16px 45px rgba(15, 23, 42, .07);
}

.production-overview {
    position: relative;
    min-height: 105px;
    padding: 16px 18px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(115deg, color-mix(in srgb, var(--primary) 8%, var(--card)), transparent 48%), var(--card);
}
.production-overview::after {
    content: "";
    position: absolute;
    top: -62px;
    left: -42px;
    width: 160px;
    height: 160px;
    border: 30px solid rgba(59, 130, 246, .035);
    border-radius: 50%;
    pointer-events: none;
}
.production-overview-lead { position: relative; z-index: 1; min-width: 180px; display: flex; align-items: center; gap: 12px; }
.production-overview-lead h2 { margin: 0; font-size: 15px; font-weight: 800; letter-spacing: -.25px; }
.production-overview-lead p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.production-live-indicator {
    min-width: 72px;
    padding: 7px 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #17844e;
    border: 1px solid rgba(34, 197, 94, .18);
    border-radius: 20px;
    background: rgba(34, 197, 94, .08);
    font-size: 11px;
    font-weight: 800;
}
.production-live-indicator i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22c55e;
    animation: productionPulse 2s infinite;
}
.production-overview-metrics { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(4, minmax(120px, 1fr)); gap: 8px; }
.overview-metric {
    min-width: 125px;
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 9px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: color-mix(in srgb, var(--card) 92%, transparent);
    box-shadow: 0 7px 20px rgba(15, 23, 42, .035);
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.overview-metric:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--metric-color) 30%, var(--border)); box-shadow: 0 11px 26px rgba(15, 23, 42, .07); }
.overview-metric-icon { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; color: var(--metric-color); border-radius: 10px; background: color-mix(in srgb, var(--metric-color) 10%, var(--card)); font-size: 13px; }
.overview-metric small, .overview-metric strong { display: block; }
.overview-metric small { color: var(--muted); font-size: 11px; }
.overview-metric strong { margin-top: 2px; color: var(--ink); font-size: 15px; font-variant-numeric: tabular-nums; }
.overview-metric em { color: var(--muted); font-size: 11px; font-style: normal; font-weight: 500; }
.metric-blue { --metric-color: #2563eb; }
.metric-violet { --metric-color: #7c3aed; }
.metric-emerald { --metric-color: #059669; }
.metric-amber { --metric-color: #d97706; }

@keyframes productionPulse {
    0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .35); }
    70% { box-shadow: 0 0 0 7px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.production-plan-toolbar {
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border-bottom: 1px solid var(--border);
}

.production-plan-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 700;
}

.production-plan-title i { color: var(--primary); }

.production-plan-hint {
    margin-top: 5px;
    color: var(--muted);
    font-size: 10px;
}

.production-plan-actions {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.production-export-actions { display: flex; gap: 7px; }
.production-export-actions .btn { min-height: 42px; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.production-search { width: min(380px, 34vw); }
.production-search .form-control { padding-left: 42px; }
.production-search-submit {
    position: absolute;
    top: 5px;
    left: 5px;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    color: #fff;
    border: 0;
    border-radius: 9px;
    background: var(--primary);
    box-shadow: 0 5px 13px rgba(21, 94, 239, .18);
    transition: transform .16s ease, background .16s ease;
}
.production-search-submit:hover { background: var(--primary-dark); transform: translateX(-1px); }

.production-visibility-tabs {
    min-height: 42px;
    padding: 3px;
    display: flex;
    align-items: center;
    gap: 2px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--background);
}

.production-visibility-tabs a {
    min-height: 34px;
    padding: 6px 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    color: var(--muted);
    border-radius: 8px;
    text-decoration: none;
    white-space: nowrap;
    font-size: 8px;
    font-weight: 700;
}

.production-visibility-tabs a:hover { color: var(--primary); }
.production-visibility-tabs a.is-active { color: #fff; background: var(--primary); box-shadow: 0 5px 12px rgba(21, 94, 239, .18); }

.production-summary {
    min-height: 48px;
    padding: 9px 20px;
    display: flex;
    align-items: center;
    gap: 22px;
    color: var(--muted);
    border-bottom: 1px solid var(--border);
    background: color-mix(in srgb, var(--background) 55%, var(--card));
    font-size: 10px;
}

.production-summary strong {
    margin-left: 3px;
    color: var(--ink);
    font-size: 12px;
}

.production-save-state {
    margin-right: auto;
    color: #228b55;
}

.production-update-date { display: inline-flex; align-items: center; gap: 5px; }
.production-update-date i { color: var(--primary); }

.production-sheet-wrap {
    max-height: calc(100vh - 260px);
    overflow: auto;
    scrollbar-color: #c9cdd4 transparent;
    scrollbar-width: thin;
}

.production-sheet {
    width: 100%;
    min-width: 1780px;
    border-collapse: separate;
    border-spacing: 0;
    color: var(--ink);
    font-size: 10px;
}

.production-sheet th,
.production-sheet td {
    height: 42px;
    padding: 7px 9px;
    vertical-align: middle;
    white-space: nowrap;
    border-left: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.production-sheet th:last-child,
.production-sheet td:last-child { border-left: 0; }

.production-sheet thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    height: 45px;
    color: #fff;
    background: linear-gradient(180deg, #155eef, #1747b7);
    border-color: rgba(255, 255, 255, .14);
    box-shadow: 0 1px rgba(0, 0, 0, .08);
    text-align: center;
    font-size: 9px;
    font-weight: 700;
}

.production-sheet tbody tr {
    background: var(--card);
    transition: background .15s ease, opacity .15s ease;
}

.production-sheet tbody tr:nth-child(even) { background: color-mix(in srgb, var(--background) 48%, var(--card)); }
.production-sheet tbody tr:hover { background: color-mix(in srgb, #3b82f6 8%, var(--card)); }
.production-sheet tbody tr.is-dragging { opacity: .46; background: color-mix(in srgb, #22d3ee 14%, var(--card)); }

.production-sheet .drag-column {
    position: sticky;
    right: 0;
    z-index: 2;
    width: 42px;
    min-width: 42px;
    padding: 0;
    text-align: center;
    background: inherit;
}

.production-sheet thead .drag-column { z-index: 4; background: #1747b7; }

.drag-handle {
    width: 30px;
    height: 30px;
    color: #98a2b3;
    border: 0;
    border-radius: 7px;
    background: transparent;
    cursor: grab;
}

.drag-handle:hover { color: var(--primary); background: rgba(59, 130, 246, .1); }
.drag-handle:active { cursor: grabbing; }

.production-line-badge {
    min-width: 47px;
    padding: 5px 8px;
    display: inline-block;
    color: #155eef;
    border: 1px solid rgba(59, 130, 246, .2);
    border-radius: 7px;
    background: rgba(59, 130, 246, .09);
    text-align: center;
    font-weight: 700;
}

.priority-cell {
    color: #155eef;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
}

.numeric-cell {
    direction: ltr;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.description-cell {
    max-width: 210px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stamp-color,
.quality-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 9px;
    font-weight: 700;
}

.stamp-color {
    color: #197044;
    background: rgba(50, 213, 131, .1);
}

.stamp-color i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #27ae60;
}

.quality-badge {
    direction: ltr;
    color: #155eef;
    background: rgba(59, 130, 246, .11);
}

.production-sheet .row-actions .btn {
    width: 29px;
    height: 29px;
    padding: 0;
    display: inline-grid;
    place-items: center;
}

.production-form { max-width: 1280px; margin-inline: auto; }

.form-card-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

html[data-theme="dark"] .production-line-badge { color: #60a5fa; }
html[data-theme="dark"] .stamp-color { color: #71d59a; }
html[data-theme="dark"] .quality-badge { color: #60a5fa; }

@media (max-width: 991.98px) {
    .production-plan-toolbar { align-items: stretch; flex-direction: column; }
    .production-plan-actions { align-items: stretch; }
    .production-search { width: 100%; flex: 1; }
    .production-sheet-wrap { max-height: calc(100vh - 300px); }
}

@media (max-width: 575.98px) {
    .production-plan { margin-inline: -5px; border-radius: 13px; }
    .production-plan-toolbar { padding: 14px; }
    .production-plan-actions { flex-direction: column; }
    .production-summary { padding-inline: 14px; gap: 12px; overflow-x: auto; }
    .production-save-state { margin-right: 0; }
}

/* Production accordion */
.production-filters {
    display: flex;
    align-items: center;
    gap: 8px;
}

.visibility-filter {
    width: 132px;
    min-height: 42px;
    font-size: 10px;
}

.filter-clear {
    width: 42px;
    height: 42px;
    padding: 0;
    display: inline-grid;
    place-items: center;
}

.press-accordion {
    padding: 14px;
    display: grid;
    gap: 10px;
    background: color-mix(in srgb, var(--background) 52%, var(--card));
}

.press-panel {
    --press-accent: #2563eb;
    overflow: hidden;
    border: 1px solid var(--border) !important;
    border-radius: 14px !important;
    background: var(--card);
    box-shadow: 0 5px 18px rgba(16, 24, 40, .035);
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
    animation: pressPanelIn .38s both;
}

.press-panel:nth-child(2) { animation-delay: .035s; }
.press-panel:nth-child(3) { animation-delay: .07s; }
.press-panel:nth-child(4) { animation-delay: .105s; }
.press-panel:nth-child(5) { animation-delay: .14s; }
.press-panel:nth-child(6) { animation-delay: .175s; }
.press-panel:nth-child(7) { animation-delay: .21s; }
.press-panel:hover { border-color: color-mix(in srgb, var(--press-accent) 24%, var(--border)) !important; box-shadow: 0 11px 28px rgba(15, 23, 42, .065); transform: translateY(-1px); }
.press-panel:nth-child(2) { --press-accent: #7c3aed; }
.press-panel:nth-child(3) { --press-accent: #0891b2; }
.press-panel:nth-child(4) { --press-accent: #059669; }
.press-panel:nth-child(5) { --press-accent: #d97706; }
.press-panel:nth-child(6) { --press-accent: #e11d48; }
.press-panel:nth-child(7) { --press-accent: #4f46e5; }
.press-panel.is-empty { opacity: .76; }

@keyframes pressPanelIn {
    from { opacity: 0; transform: translateY(7px); }
    to { opacity: 1; transform: translateY(0); }
}

.press-panel .accordion-button {
    min-height: 66px;
    padding: 10px 14px;
    gap: 11px;
    color: var(--ink);
    background: var(--card);
    box-shadow: none;
}

.press-panel .accordion-button:not(.collapsed) {
    color: var(--ink);
    background: linear-gradient(90deg, color-mix(in srgb, var(--press-accent) 9%, var(--card)), var(--card));
    box-shadow: inset 0 -1px var(--border);
}

.press-panel .accordion-button:focus { box-shadow: none; }
.press-panel .accordion-button::after { margin-right: 12px; margin-left: 0; opacity: .5; }

.press-number {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    display: grid;
    place-items: center;
    color: #fff;
    border-radius: 11px;
    background: linear-gradient(145deg, color-mix(in srgb, var(--press-accent) 88%, #fff), var(--press-accent));
    box-shadow: 0 7px 18px color-mix(in srgb, var(--press-accent) 24%, transparent);
    font-size: 14px;
    font-weight: 700;
}

.press-panel.is-empty .press-number {
    color: var(--muted);
    background: var(--background);
    box-shadow: none;
}

.press-heading-copy {
    min-width: 100px;
    display: flex;
    flex-direction: column;
}

.press-heading-copy strong { font-size: 14px; }
.press-heading-copy small { margin-top: 2px; color: var(--muted); font-size: 11px; }

.press-heading-stats {
    margin-right: auto;
    display: flex;
    gap: 7px;
}

.press-heading-stats span {
    min-width: 62px;
    padding: 5px 9px;
    color: var(--muted);
    border: 1px solid var(--border);
    border-radius: 9px;
    background: color-mix(in srgb, var(--background) 65%, var(--card));
    text-align: center;
    font-size: 11px;
}

.press-heading-stats b { margin-left: 2px; color: var(--ink); font-size: 12px; }
.press-panel .accordion-body { padding: 0; }

.compact-sheet {
    min-width: 0;
    table-layout: fixed;
    font-size: 11px;
}

.compact-sheet .col-drag { width: 2.5%; }
.compact-sheet .col-production { width: 8.5%; }
.compact-sheet .col-material { width: 6.5%; }
.compact-sheet .col-mold { width: 6.5%; }
.compact-sheet .col-customer { width: 10%; }
.compact-sheet .col-quantity { width: 7%; }
.compact-sheet .col-tonnage { width: 5%; }
.compact-sheet .col-stamp { width: 7%; }
.compact-sheet .col-color { width: 6%; }
.compact-sheet .col-quality { width: 6%; }
.compact-sheet .col-actions { width: 6.5%; }
.compact-sheet .col-description { width: 21.5%; }

.compact-sheet th,
.compact-sheet td {
    height: 36px;
    padding: 5px 5px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.compact-sheet thead th {
    position: static;
    height: 36px;
    color: var(--muted);
    border-color: var(--border);
    background: color-mix(in srgb, var(--primary) 5%, var(--card));
    box-shadow: none;
    font-size: 10px;
}

.compact-sheet .drag-column {
    position: static;
    width: auto;
    min-width: 0;
    background: inherit;
}

.compact-sheet thead .drag-column { background: color-mix(in srgb, var(--primary) 5%, var(--card)); }
.compact-sheet .drag-handle { width: 24px; height: 24px; }
.compact-sheet .row-actions { justify-content: center; gap: 3px; }
.compact-sheet .row-actions .btn { width: 24px; height: 24px; border-radius: 7px; font-size: 9px; }
.compact-sheet .stamp-color,
.compact-sheet .quality-badge { max-width: 100%; padding: 3px 5px; font-size: 7px; }
.compact-sheet .description-cell { max-width: none; }
.compact-sheet tbody tr { transition: background .16s ease; }
.compact-sheet tbody tr:hover { background: color-mix(in srgb, var(--press-accent) 7%, var(--card)); }
.compact-sheet tbody tr:hover td:first-child { box-shadow: inset -3px 0 var(--press-accent); }
.truncate-cell { overflow: hidden; text-overflow: ellipsis; }

.is-hidden-order { opacity: .62; }

.hidden-order-badge {
    margin-left: 4px;
    padding: 2px 5px;
    color: var(--muted);
    border-radius: 10px;
    background: var(--background);
    font-size: 7px;
}

.press-totals {
    min-height: 54px;
    padding: 8px 14px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;
    border-top: 1px solid var(--border);
    background: color-mix(in srgb, var(--primary) 3%, var(--card));
}

.press-totals span {
    min-width: 125px;
    padding: 6px 9px;
    display: grid;
    grid-template-columns: 22px 1fr auto;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--card);
}

.press-totals i { color: var(--primary); font-size: 13px; }
.press-totals small { color: var(--muted); font-size: 11px; }
.press-totals strong { font-size: 12px; }

.press-empty {
    min-height: 96px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    color: var(--muted);
    font-size: 12px;
}

.press-empty i { color: var(--primary-light); font-size: 20px; }

.visibility-switch-card {
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: color-mix(in srgb, var(--primary) 4%, var(--card));
}

.visibility-switch-copy { display: flex; align-items: center; gap: 11px; }
.visibility-switch-copy strong,
.visibility-switch-copy small { display: block; }
.visibility-switch-copy strong { font-size: 13px; }
.visibility-switch-copy small { margin-top: 3px; color: var(--muted); font-size: 11px; }

.visibility-switch-icon {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: grid;
    place-items: center;
    color: var(--primary);
    border-radius: 10px;
    background: var(--primary-soft);
}

.visibility-switch-card .form-check-input { width: 42px; height: 22px; cursor: pointer; }

.production-order-modal .modal-dialog { max-width: min(1180px, calc(100vw - 28px)); }
.production-order-modal .modal-content {
    max-height: calc(100vh - 24px);
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--primary) 16%, var(--border));
    border-radius: 20px;
    background: var(--card);
    box-shadow: 0 28px 80px rgba(15, 23, 42, .22);
}
.production-order-modal .modal-header,
.production-order-modal .modal-footer { flex: 0 0 auto; padding: 12px 16px; border-color: var(--border); }
.production-order-modal .modal-header { background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 8%, var(--card)), var(--card)); }
.production-order-modal .modal-body { padding: 14px 16px; overflow-y: auto; background: color-mix(in srgb, var(--background) 35%, var(--card)); }
.production-modal-heading { display: flex; align-items: center; gap: 12px; }
.production-modal-heading > span {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    color: #fff;
    border-radius: 13px;
    background: linear-gradient(145deg, var(--primary), var(--primary-dark));
    box-shadow: 0 8px 20px rgba(21, 94, 239, .2);
}
.production-modal-heading h5 { font-size: 15px; font-weight: 800; }
.production-modal-heading p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.production-modal-close {
    width: 38px;
    height: 38px;
    margin-right: auto;
    flex: 0 0 38px;
    display: grid;
    place-items: center;
    color: #64748b;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--background);
    font-size: 15px;
    transition: color .16s ease, border-color .16s ease, background .16s ease, transform .16s ease;
}
.production-modal-close:hover {
    color: #dc2626;
    border-color: rgba(239, 68, 68, .25);
    background: rgba(239, 68, 68, .08);
    transform: rotate(5deg);
}
.production-order-modal .form-label { font-size: 12px; font-weight: 700; }

/* ==========================================================================
   تم مودال افزودن سفارش — هم‌خانواده با تم «افزودن پرسنل»
   مقادیر از public/css/personnel.css کپی شده تا هر دو مودال یک زبان بصری
   داشته باشند: کارت گرد ۲۲px، هدر گرادیانی، آیکون ۵۲px، بدنهٔ روشن.
   ========================================================================== */
.production-order-modal {
    --people-accent: #287bcb;
    --people-soft: color-mix(in srgb, #287bcb 7%, var(--surface));
}
.production-order-modal .modal-dialog { max-width: 1040px; }
.production-order-modal .modal-content {
    border: 1px solid var(--border);
    border-radius: 22px;
    background: var(--surface);
    overflow: hidden;
    box-shadow: 0 15px 50px #1125440a;
}
.production-order-modal .modal-content > form {
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-height: 100%;
    overflow: hidden;
}

/* هدر: آیکون درشت + عنوان + توضیح، پس‌زمینهٔ گرادیانی ملایم */
.production-order-modal .modal-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px 28px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(120deg, var(--people-soft), var(--surface));
}
.production-order-modal .production-modal-heading { gap: 16px; }
.production-order-modal .production-modal-heading > span {
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: linear-gradient(140deg, #2a90c9, #2859aa);
    color: #fff;
    font-size: 25px;
    box-shadow: 0 5px 14px #256dab25;
}
.production-order-modal .production-modal-heading h5 {
    font-size: 20px;
    font-weight: 800;
    margin: 0 0 7px;
    line-height: 1.6;
}
.production-order-modal .production-modal-heading p {
    color: var(--muted);
    font-size: 12px;
    margin: 0;
    line-height: 1.8;
}

/* دکمهٔ بستن: مربع گرد ۱۲px */
.production-order-modal .production-modal-close {
    width: 36px;
    height: 36px;
    margin-inline-start: auto;
    margin-right: 0;
    border-radius: 12px;
    background: var(--surface);
    color: var(--muted);
}
.production-order-modal .production-modal-close:hover {
    color: var(--primary);
    background: var(--people-soft);
    border-color: var(--border);
    transform: none;
}

/* بدنه: پس‌زمینهٔ کمی روشن‌تر از کارت */
.production-order-modal .modal-body {
    padding: 24px 28px;
    background: color-mix(in srgb, var(--surface) 65%, var(--background));
}

/* فوتر: راهنما سمت چپ، دکمه‌ها سمت راست */
.production-order-modal .modal-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 28px;
    border-top: 1px solid var(--border);
    background: var(--surface);
    flex-shrink: 0;
}
.production-order-modal .production-modal-footer-hint {
    margin-inline-end: auto;
    color: var(--muted);
    font-size: 11px;
}
.production-order-modal .production-modal-footer-hint i { color: #1a987d; margin-inline-end: 5px; }
.production-order-modal .modal-footer .btn { border-radius: 10px; padding: 11px 22px; font-size: 13px; }
.production-order-modal .modal-footer .btn-primary {
    background: #246cb0;
    border-color: #246cb0;
    box-shadow: 0 4px 12px #246cb020;
}
.production-order-modal .modal-footer .btn-primary:hover { background: #1c588f; border-color: #1c588f; }

/* کارت‌های بخش‌ها: گردی ۱۶px مثل people-section */
.production-order-modal .production-modal-order-card,
.production-order-modal .production-modal-section {
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
}
.production-order-modal .production-modal-section-head { align-items: center; gap: 10px; margin-bottom: 22px; }
.production-order-modal .production-modal-section-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--people-soft);
    color: var(--people-accent);
    font-size: 20px;
}
.production-order-modal .production-modal-section-head h3,
.production-order-modal .production-modal-section-head strong { font-size: 14px; font-weight: 800; margin: 0 0 5px; }
.production-order-modal .production-modal-section-head small { font-size: 11px; line-height: 1.8; color: var(--muted); margin: 0; }

/* فیلدها: ارتفاع ۴۶px و گردی ۱۰px مثل people-field */
.production-order-modal .form-control,
.production-order-modal .form-select {
    min-height: 46px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background-color: var(--surface);
    color: var(--ink);
    font-size: 13px;
    padding: 10px 12px;
}
.production-order-modal .form-select { padding-inline-end: 32px; }
.production-order-modal .form-control:focus,
.production-order-modal .form-select:focus {
    border-color: #438ccd;
    box-shadow: 0 0 0 3px #438ccd20;
}
.production-order-modal .form-control.is-invalid,
.production-order-modal .form-select.is-invalid { border-color: #dc3545; }
.production-order-modal .form-control::placeholder { color: var(--muted); opacity: .65; font-size: 12px; }
.production-order-modal .form-label { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; margin-bottom: 9px; }

@media (max-width: 640px) {
    .production-order-modal .modal-header,
    .production-order-modal .modal-body,
    .production-order-modal .modal-footer { padding-inline: 16px; }
}

.production-order-modal .form-control,
.production-order-modal .form-select { min-height: 38px; background-color: var(--card); }
.production-order-modal .row.g-3 { --bs-gutter-y: .65rem; }

.production-order-lookup { position: relative; }
.production-order-lookup > i { position: absolute; top: 50%; right: 13px; z-index: 2; color: var(--primary); transform: translateY(-50%); }
.production-order-lookup .form-control { min-height: 46px; padding-right: 39px; padding-left: 42px; border-color: color-mix(in srgb, var(--primary) 35%, var(--border)); font-size: 11px; font-weight: 700; direction: ltr; text-align: center; }
.production-lookup-toggle {
    position: absolute;
    top: 7px;
    left: 7px;
    z-index: 3;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    color: var(--muted);
    border: 0;
    border-radius: 8px;
    background: var(--background);
}
.production-lookup-menu {
    position: absolute;
    top: calc(100% + 7px);
    right: 0;
    left: 0;
    z-index: 1080;
    overflow: hidden;
    display: none;
    border: 1px solid color-mix(in srgb, var(--primary) 20%, var(--border));
    border-radius: 14px;
    background: var(--card);
    box-shadow: 0 20px 50px rgba(15, 23, 42, .2);
}
.production-lookup-menu.is-open { display: block; animation: lookupMenuIn .16s ease-out; }
.production-lookup-menu.is-flipped { top: auto; bottom: calc(100% + 7px); }
.production-lookup-menu-head {
    min-height: 38px;
    padding: 8px 11px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--muted);
    border-bottom: 1px solid var(--border);
    background: color-mix(in srgb, var(--primary) 4%, var(--card));
    font-size: 8px;
}
.production-lookup-results { max-height: 270px; padding: 5px; overflow-y: auto; }
.production-lookup-item {
    width: 100%;
    min-height: 51px;
    padding: 7px 8px;
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--ink);
    border: 0;
    border-radius: 10px;
    background: transparent;
    text-align: right;
}
.production-lookup-item:hover,
.production-lookup-item:focus { outline: 0; background: color-mix(in srgb, var(--primary) 8%, var(--card)); }
.production-lookup-item-icon {
    width: 33px;
    height: 33px;
    flex: 0 0 33px;
    display: grid;
    place-items: center;
    color: var(--primary);
    border-radius: 9px;
    background: var(--primary-soft);
}
.production-lookup-item-copy { min-width: 0; flex: 1; }
.production-lookup-item-copy strong,
.production-lookup-item-copy small { display: block; }
.production-lookup-item-copy strong { font-size: 13px; }
.production-lookup-item-copy small { margin-top: 3px; overflow: hidden; color: var(--muted); font-size: 11px; white-space: nowrap; text-overflow: ellipsis; }
.production-lookup-item-line { padding: 4px 7px; color: var(--primary); border-radius: 8px; background: var(--primary-soft); font-size: 10px; font-weight: 700; }
    .production-lookup-item.is-exact-match { border: 1px solid color-mix(in srgb, var(--primary) 35%, transparent); background: color-mix(in srgb, var(--primary) 8%, var(--card)); }
    .production-lookup-item.is-exact-match .production-lookup-item-icon { color: var(--card); background: var(--primary); }
    .production-lookup-item mark { padding: 0 2px; color: var(--ink); border-radius: 3px; background: #fde68a; }
    .production-number-lookup { position: fixed; z-index: 1080; display: grid; gap: 6px; max-width: 340px; padding: 8px; color: var(--ink); border: 1px solid var(--border); border-radius: 12px; background: var(--card); box-shadow: 0 10px 32px rgba(0, 0, 0, .18); font-size: 11px; }
    .production-number-lookup-head { color: var(--muted); font-size: 10px; font-weight: 700; }
    .production-number-lookup-list { display: grid; gap: 3px; max-height: 220px; overflow-y: auto; }
    .production-number-lookup-item { width: 100%; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; padding: 6px 8px; text-align: right; border: 1px solid transparent; border-radius: 8px; background: transparent; cursor: pointer; }
.production-number-lookup-item:hover { background: var(--primary-soft); }
    .production-number-lookup-item.is-exact-match { border-color: color-mix(in srgb, var(--primary) 35%, transparent); background: color-mix(in srgb, var(--primary) 8%, var(--card)); }

.production-number-lookup-new-hint b { display: inline-block; margin-inline-start: 4px; }
    .production-number-lookup-item-number { color: var(--primary); font-size: 11px; font-weight: 800; }
    .production-number-lookup-item-copy { overflow: hidden; min-width: 0; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
    .production-number-lookup-item-line { padding: 2px 6px; color: var(--primary); border-radius: 6px; background: var(--primary-soft); font-size: 9px; font-weight: 700; }
    .production-number-lookup mark { padding: 0 2px; color: var(--ink); border-radius: 3px; background: #fde68a; }
    .production-number-lookup-new-hint { width: 100%; display: flex; align-items: center; gap: 6px; margin-top: 4px; padding: 7px 9px; color: #b45309; border: 1px dashed color-mix(in srgb, #f59e0b 50%, transparent); border-radius: 8px; background: color-mix(in srgb, #f59e0b 8%, var(--card)); font: inherit; font-size: 10px; text-align: start; cursor: pointer; }
    .production-number-lookup-new-hint b { font-weight: 800; }
    .production-number-lookup-count { color: var(--muted); font-size: 10px; }
    .production-number-lookup-empty { padding: 10px; color: var(--muted); text-align: center; font-size: 10px; }
.production-lookup-empty { min-height: 90px; display: grid; place-items: center; align-content: center; gap: 5px; color: var(--muted); font-size: 12px; }
.production-lookup-empty i { font-size: 18px; }
.production-lookup-new {
    width: 100%;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #17844e;
    border: 0;
    border-top: 1px solid var(--border);
    background: color-mix(in srgb, #22c55e 6%, var(--card));
    font-size: 12px;
    font-weight: 700;
}
.production-lookup-status { margin-top: 8px; padding: 9px 11px; display: flex; align-items: flex-start; gap: 10px; color: var(--muted); border: 1px solid var(--border); border-radius: 12px; background: color-mix(in srgb, var(--primary) 4%, var(--card)); font-size: 11px; line-height: 1.75; }
    .production-lookup-status.is-existing { color: #15803d; border-color: color-mix(in srgb, #22c55e 40%, var(--border)); background: color-mix(in srgb, #22c55e 8%, var(--card)); }
    .production-lookup-status.is-new { color: #b45309; border-color: color-mix(in srgb, #f59e0b 45%, var(--border)); background: color-mix(in srgb, #f59e0b 8%, var(--card)); }
    .production-lookup-status.is-flash { animation: lookupStatusFlash .45s ease; }
    .production-lookup-status-icon { width: 28px; height: 28px; flex: 0 0 28px; display: grid; place-items: center; color: var(--primary); border-radius: 8px; background: var(--primary-soft); }
    .production-lookup-status.is-existing .production-lookup-status-icon { color: #15803d; background: color-mix(in srgb, #22c55e 16%, transparent); }
    .production-lookup-status.is-new .production-lookup-status-icon { color: #b45309; background: color-mix(in srgb, #f59e0b 16%, transparent); }
    .production-lookup-status-icon i { font-size: 14px; }
    .production-lookup-status-main { min-width: 0; }
    .production-lookup-status-title { display: flex; align-items: center; gap: 5px; color: var(--ink); font-size: 12px; font-weight: 800; }
    .production-lookup-status.is-existing .production-lookup-status-title { color: #15803d; }
    .production-lookup-status.is-new .production-lookup-status-title { color: #b45309; }
    .production-lookup-status-title i { font-size: 12px; }
    .production-lookup-status-copy { display: block; margin-top: 2px; }
    .production-lookup-status-copy b { color: var(--ink); font-weight: 800; }
    @keyframes lookupStatusFlash {
        0% { transform: translateY(3px); opacity: .35; }
        100% { transform: translateY(0); opacity: 1; }
    }
    .production-lookup-status-actions { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
    .production-confirm-new-btn { display: inline-flex; align-items: center; gap: 5px; padding: 5px 13px; color: #fff; border: 0; border-radius: 8px; background: #f59e0b; font-size: 11px; font-weight: 700; cursor: pointer; }
    .production-confirm-new-btn:hover { background: #d97706; }
    .production-cancel-new-btn { display: inline-flex; align-items: center; gap: 5px; padding: 5px 13px; color: var(--muted); border: 1px solid var(--border); border-radius: 8px; background: var(--card); font-size: 11px; font-weight: 700; cursor: pointer; }
    .production-cancel-new-btn:hover { background: color-mix(in srgb, var(--primary) 6%, var(--card)); }

.production-confirm-modal .modal-content {
    overflow: hidden;
    border: 1px solid color-mix(in srgb, #ef4444 18%, var(--border));
    border-radius: 19px;
    background: var(--card);
    box-shadow: 0 24px 70px rgba(15, 23, 42, .25);
}
.production-confirm-modal .modal-body { padding: 24px 20px 18px; text-align: center; }
.production-confirm-icon {
    width: 58px;
    height: 58px;
    margin: 0 auto 13px;
    display: grid;
    place-items: center;
    color: #dc2626;
    border-radius: 18px;
    background: rgba(239, 68, 68, .1);
    font-size: 23px;
}
.production-confirm-modal h5 { margin-bottom: 7px; font-size: 14px; font-weight: 800; }
.production-confirm-modal p { margin: 0; color: var(--muted); line-height: 2; font-size: 9px; }
.production-confirm-modal p strong { color: var(--ink); }
.production-confirm-actions { margin-top: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.production-confirm-actions .btn { min-height: 40px; font-size: 9px; }

@keyframes lookupMenuIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.production-mobile-list { padding: 10px; display: grid; gap: 9px; }

.production-mobile-card {
    position: relative;
    overflow: hidden;
    padding: 11px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--card);
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.production-mobile-card::before { content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 3px; background: var(--press-accent); }
.production-mobile-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--press-accent) 25%, var(--border)); box-shadow: 0 9px 22px rgba(15, 23, 42, .07); }
.production-mobile-card:nth-child(even) { background: color-mix(in srgb, var(--background) 55%, var(--card)); }
.production-mobile-card.is-dragging { opacity: .5; }

.mobile-card-head { display: flex; align-items: center; gap: 8px; }
.mobile-card-head > div:nth-child(2) { min-width: 0; flex: 1; }
.mobile-card-head strong,
.mobile-card-head small { display: block; }
.mobile-card-head strong { font-size: 11px; }
.mobile-card-head small { margin-top: 2px; overflow: hidden; color: var(--muted); font-size: 9px; white-space: nowrap; text-overflow: ellipsis; }

.mobile-card-grid {
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 7px;
}

.mobile-card-grid span { padding: 7px; border-radius: 8px; background: var(--background); }
.mobile-card-grid small,
.mobile-card-grid b { display: block; }
.mobile-card-grid small { color: var(--muted); font-size: 7px; }
.mobile-card-grid b { margin-top: 2px; overflow: hidden; font-size: 9px; white-space: nowrap; text-overflow: ellipsis; }
.production-mobile-card p { margin: 9px 0 0; padding-top: 8px; color: var(--muted); border-top: 1px dashed var(--border); font-size: 8px; }

html[data-theme="dark"] .compact-sheet tbody tr:nth-child(even) { background: rgba(255, 255, 255, .025); }
html[data-theme="dark"] .production-plan { box-shadow: 0 18px 50px rgba(0, 0, 0, .22); }
html[data-theme="dark"] .overview-metric { background: rgba(255, 255, 255, .025); }

.reduce-motion .production-live-indicator i,
.reduce-motion .overview-metric,
.reduce-motion .press-panel,
.reduce-motion .production-mobile-card { animation: none !important; transition: none !important; }

@media (max-width: 1199.98px) {
    .production-overview { align-items: stretch; flex-direction: column; }
    .production-overview-metrics { grid-template-columns: repeat(4, 1fr); }
    .overview-metric { min-width: 0; }
    .compact-sheet { font-size: 7.5px; }
    .compact-sheet th,
    .compact-sheet td { padding-inline: 3px; }
    .compact-sheet .stamp-color i { display: none; }
}

@media (max-width: 991.98px) {
    .production-filters { flex: 1; }
    .production-plan-actions { flex-wrap: wrap; }
    .production-export-actions { order: 2; }
    .press-heading-stats span:first-child { display: none; }
    .press-totals { justify-content: stretch; }
    .press-totals span { min-width: 0; flex: 1; }
    .production-summary { flex-wrap: wrap; gap: 8px 15px; }
    .production-save-state { margin-right: 0; margin-left: auto; }
    .production-overview-metrics { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 575.98px) {
    .production-overview { min-height: 0; padding: 13px; gap: 12px; }
    .production-overview-lead { min-width: 0; }
    .production-overview-lead h2 { font-size: 13px; }
    .production-live-indicator { min-width: 65px; padding-inline: 7px; }
    .production-overview-metrics { gap: 6px; }
    .overview-metric { padding: 8px; gap: 7px; border-radius: 11px; }
    .overview-metric-icon { width: 29px; height: 29px; flex-basis: 29px; font-size: 12px; }
    .overview-metric strong { font-size: 13px; }
    .production-filters { align-items: stretch; flex-direction: column; }
    .visibility-filter { width: 100%; }
    .filter-clear { position: absolute; left: 15px; margin-top: 0; }
    .press-accordion { padding: 8px; }
    .press-panel .accordion-button { min-height: 58px; padding: 8px 10px; }
    .press-number { width: 35px; height: 35px; flex-basis: 35px; }
    .press-heading-stats { display: none; }
    .press-totals { padding: 8px; gap: 5px; }
    .press-totals span { padding: 6px; display: flex; flex-direction: column; gap: 2px; text-align: center; }
    .press-totals i { display: none; }
    .mobile-card-grid { grid-template-columns: repeat(2, 1fr); }
    .visibility-switch-copy small { max-width: 210px; }
    .production-export-actions .btn { flex: 1; justify-content: center; }
    .production-visibility-tabs { width: 100%; }
    .production-visibility-tabs a { flex: 1; }
    .production-order-modal .modal-dialog { margin: 8px; max-width: none; }
    .production-order-modal .modal-header,
    .production-order-modal .modal-body,
    .production-order-modal .modal-footer { padding: 13px; }
    .production-modal-heading p { display: none; }
    .production-modal-heading > span { width: 38px; height: 38px; flex-basis: 38px; }
    .production-order-modal .modal-footer { position: sticky; bottom: 0; z-index: 4; flex-wrap: nowrap; background: var(--card); }
    .production-order-modal .modal-footer .btn { flex: 1; padding-inline: 8px !important; }
    .production-lookup-menu { position: fixed; top: auto; right: 8px; bottom: 8px; left: 8px; border-radius: 18px; }
    .production-lookup-results { max-height: min(50vh, 360px); }
    .production-sheet-wrap { overflow-x: auto; }
}

/* Stops reporting and combined filters */
.stops-filter-panel {
    margin-bottom: 14px;
    padding: 17px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background:
        radial-gradient(circle at 100% 0, rgba(59, 130, 246, .08), transparent 26%),
        var(--card);
    box-shadow: 0 12px 34px rgba(15, 23, 42, .055);
}

.stops-filter-heading {
    margin-bottom: 15px;
    padding-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--border);
}

.stops-filter-heading > div {
    display: flex;
    align-items: center;
    gap: 10px;
}

.stops-filter-heading strong,
.stops-filter-heading small {
    display: block;
}

.stops-filter-heading strong {
    font-size: 13px;
}

.stops-filter-heading small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 9px;
}

.stops-filter-icon {
    width: 35px;
    height: 35px;
    flex: 0 0 35px;
    display: grid;
    place-items: center;
    color: var(--primary);
    border-radius: 10px;
    background: var(--primary-soft);
    font-size: 14px;
}

.stops-active-count {
    padding: 5px 9px;
    color: var(--primary);
    border: 1px solid color-mix(in srgb, var(--primary) 20%, transparent);
    border-radius: 20px;
    background: var(--primary-soft);
    font-size: 8px;
    white-space: nowrap;
}

.stops-filter-form {
    display: grid;
    grid-template-columns: minmax(220px, 1.7fr) repeat(5, minmax(125px, 1fr)) auto;
    align-items: end;
    gap: 9px;
}

.stops-filter-field {
    min-width: 0;
}

.stops-filter-field label {
    margin: 0 2px 5px;
    display: block;
    color: var(--muted);
    font-size: 9px;
    font-weight: 700;
}

.stops-filter-field .form-control,
.stops-filter-field .form-select {
    min-height: 40px;
    border-radius: 10px;
    font-size: 10px;
}

.stops-input-icon {
    position: relative;
}

.stops-input-icon > i {
    position: absolute;
    z-index: 1;
    right: 12px;
    top: 50%;
    color: #98a2b3;
    font-size: 11px;
    transform: translateY(-50%);
    pointer-events: none;
}

.stops-input-icon .form-control {
    padding-right: 34px;
}

.stops-input-icon .form-control[dir="ltr"] {
    padding-right: 34px;
    text-align: left;
}

.persian-date-picker {
    z-index: 3;
}

.persian-date-picker .form-control[readonly] {
    cursor: pointer;
    caret-color: transparent;
}

.persian-date-picker.is-open {
    z-index: 1080;
}

.persian-date-picker.is-open .form-control {
    border-color: var(--primary);
    box-shadow: 0 0 0 .2rem color-mix(in srgb, var(--primary) 12%, transparent);
}

.persian-calendar {
    position: absolute;
    top: calc(100% + 7px);
    right: 0;
    z-index: 1080;
    width: 276px;
    padding: 11px;
    display: none;
    direction: rtl;
    color: var(--ink);
    border: 1px solid var(--border);
    border-radius: 15px;
    background: var(--card);
    box-shadow: 0 18px 48px rgba(15, 23, 42, .17);
}

.persian-date-picker.is-open .persian-calendar {
    display: block;
    animation: calendarReveal .16s ease-out;
}

.persian-calendar-head {
    margin-bottom: 9px;
    display: grid;
    grid-template-columns: 30px 1fr 30px;
    align-items: center;
    gap: 5px;
}

.persian-calendar-head strong {
    font-size: 11px;
    text-align: center;
}

.persian-calendar-head button {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    color: var(--muted);
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    font-size: 10px;
}

.persian-calendar-head button:hover {
    color: var(--primary);
    border-color: var(--border);
    background: var(--primary-soft);
}

.persian-calendar-weekdays,
.persian-calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
}

.persian-calendar-weekdays {
    margin-bottom: 4px;
}

.persian-calendar-weekdays span {
    padding: 4px 0;
    color: var(--muted);
    font-size: 8px;
    font-weight: 700;
    text-align: center;
}

.persian-calendar-days > button,
.persian-calendar-days > span {
    aspect-ratio: 1;
}

.persian-calendar-days > button {
    display: grid;
    place-items: center;
    color: var(--ink);
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    font-size: 9px;
    transition: .15s ease;
}

.persian-calendar-days > button:hover {
    color: var(--primary);
    border-color: color-mix(in srgb, var(--primary) 18%, var(--border));
    background: var(--primary-soft);
}

.persian-calendar-days > button.is-today {
    color: var(--primary);
    border-color: color-mix(in srgb, var(--primary) 28%, transparent);
    font-weight: 700;
}

.persian-calendar-days > button.is-selected {
    color: #fff;
    border-color: var(--primary);
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    box-shadow: 0 5px 12px rgba(59, 130, 246, .22);
}

.persian-calendar-footer {
    margin-top: 8px;
    padding-top: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--border);
}

.persian-calendar-footer button {
    padding: 4px 7px;
    color: var(--muted);
    border: 0;
    border-radius: 7px;
    background: transparent;
    font-size: 8px;
}

.persian-calendar-footer button:hover {
    color: var(--primary);
    background: var(--primary-soft);
}

@keyframes calendarReveal {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.stops-filter-actions {
    display: flex;
    gap: 6px;
}

.stops-filter-actions .btn {
    min-height: 40px;
    padding: 8px 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: 10px;
    font-size: 9px;
    white-space: nowrap;
}

.stops-filter-reset {
    color: var(--muted);
    border: 1px solid var(--border);
    background: var(--surface);
}

.stops-filter-reset:hover {
    color: var(--danger);
    border-color: color-mix(in srgb, var(--danger) 25%, var(--border));
    background: color-mix(in srgb, var(--danger) 6%, var(--surface));
}

.stops-summary-grid {
    margin-bottom: 14px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.stops-summary-card {
    min-width: 0;
    padding: 13px 14px;
    display: flex;
    align-items: center;
    gap: 11px;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: var(--card);
    box-shadow: 0 8px 24px rgba(15, 23, 42, .045);
}

.stops-summary-card > span:last-child {
    min-width: 0;
}

.stops-summary-card small,
.stops-summary-card strong {
    display: block;
}

.stops-summary-card small {
    margin-bottom: 3px;
    color: var(--muted);
    font-size: 8px;
}

.stops-summary-card strong {
    overflow: hidden;
    font-size: 15px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.stops-summary-card em {
    color: var(--muted);
    font-size: 8px;
    font-style: normal;
    font-weight: 400;
}

.stops-summary-icon {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    font-size: 15px;
}

.stops-summary-icon.blue { color: #2563eb; background: rgba(59, 130, 246, .11); }
.stops-summary-icon.orange { color: #d97706; background: rgba(245, 158, 11, .12); }
.stops-summary-icon.cyan { color: #0891b2; background: rgba(6, 182, 212, .11); }
.stops-summary-icon.red { color: #e11d48; background: rgba(244, 63, 94, .1); }

.stops-results-panel .page-toolbar {
    align-items: center;
}

.stops-results-title strong,
.stops-results-title small {
    display: block;
}

.stops-results-title strong {
    font-size: 13px;
}

.stops-results-title small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 9px;
}

.stops-filter-form.press-filter-form {
    grid-template-columns: minmax(240px, 1.7fr) repeat(4, minmax(120px, 1fr)) auto;
}

.press-filter-form .press-filter-search,
.press-filter-form .press-filter-actions {
    grid-column: auto;
}

/* Press reports: compact, linear filter bar */
.press-filter-panel {
    margin-bottom: 14px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--card);
    box-shadow: 0 8px 24px rgba(15, 23, 42, .045);
}

.press-filter-bar {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.press-filter-intro {
    min-width: 145px;
    padding-inline: 3px 8px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-left: 1px solid var(--border);
}

.press-filter-intro > span:last-child {
    min-width: 0;
}

.press-filter-intro strong,
.press-filter-intro small {
    display: block;
    white-space: nowrap;
}

.press-filter-intro strong {
    color: var(--ink);
    font-size: 11px;
    font-weight: 700;
}

.press-filter-intro small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 8px;
}

.press-filter-intro-icon {
    width: 31px;
    height: 31px;
    flex: 0 0 31px;
    display: grid;
    place-items: center;
    color: var(--primary);
    border-radius: 9px;
    background: var(--primary-soft);
    font-size: 13px;
}

.press-filter-control {
    min-width: 0;
    flex: 0 1 138px;
}

.press-filter-search {
    flex: 1 1 275px;
}

.press-filter-input {
    min-width: 0;
    height: 39px;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 0 10px;
    color: var(--muted);
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.press-filter-input:focus-within {
    border-color: color-mix(in srgb, var(--primary) 55%, var(--border));
    background: var(--card);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 10%, transparent);
}

.press-filter-input > i {
    flex: 0 0 auto;
    color: var(--primary);
    font-size: 12px;
}

.press-filter-input .form-control,
.press-filter-input .form-select {
    min-width: 0;
    height: 37px;
    flex: 1;
    padding: 0;
    color: var(--ink);
    border: 0;
    background: transparent;
    box-shadow: none;
    font-size: 10px;
}

.press-filter-input .form-control::placeholder {
    color: var(--muted);
    opacity: .85;
}

.press-filter-input .form-select {
    padding-inline: 0 17px;
    background-position: left .15rem center;
}

.press-filter-buttons {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.press-filter-submit,
.press-filter-clear {
    height: 39px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 10px;
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.press-filter-submit {
    gap: 6px;
    padding: 0 13px;
    color: #fff;
    border: 1px solid var(--primary-dark);
    background: var(--primary);
    box-shadow: 0 5px 14px rgba(59, 130, 246, .2);
}

.press-filter-submit:hover {
    color: #fff;
    background: var(--primary-dark);
    box-shadow: 0 7px 16px rgba(59, 130, 246, .27);
    transform: translateY(-1px);
}

.press-filter-clear {
    width: 39px;
    color: var(--muted);
    border: 1px solid var(--border);
    background: var(--surface);
}

.press-filter-clear:hover {
    color: var(--danger);
    border-color: color-mix(in srgb, var(--danger) 30%, var(--border));
    background: color-mix(in srgb, var(--danger) 6%, var(--surface));
}

@media (max-width: 1199.98px) {
    .press-filter-bar {
        flex-wrap: wrap;
    }

    .press-filter-intro {
        flex: 1 1 100%;
        padding: 0 0 9px;
        border-left: 0;
        border-bottom: 1px solid var(--border);
    }

    .press-filter-control {
        flex-basis: 145px;
    }

    .press-filter-search {
        flex-basis: min(100%, 280px);
    }
}

@media (max-width: 767.98px) {
    .press-filter-bar {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .press-filter-intro,
    .press-filter-search,
    .press-filter-buttons {
        grid-column: 1 / -1;
    }

    .press-filter-control {
        flex: none;
    }

    .press-filter-buttons {
        display: flex;
    }

    .press-filter-submit {
        flex: 1;
    }
}

@media (max-width: 420px) {
    .press-filter-bar {
        grid-template-columns: 1fr;
    }

    .press-filter-control,
    .press-filter-search {
        grid-column: auto;
    }
}

@media (max-width: 1399.98px) {
    .stops-filter-form {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .stops-filter-search {
        grid-column: span 2;
    }

    .stops-filter-actions {
        grid-column: span 2;
    }

    .stops-filter-form.press-filter-form {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .press-filter-form .press-filter-search {
        grid-column: span 2;
    }

    .press-filter-form .press-filter-actions {
        grid-column: auto;
    }
}

@media (max-width: 991.98px) {
    .stops-filter-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .stops-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .stops-filter-form.press-filter-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .press-filter-form .press-filter-actions {
        grid-column: span 2;
    }
}

@media (max-width: 575.98px) {
    .stops-filter-panel {
        padding: 13px;
        border-radius: 15px;
    }

    .stops-filter-heading {
        align-items: flex-start;
    }

    .stops-filter-heading small {
        max-width: 210px;
    }

    .stops-filter-form {
        grid-template-columns: 1fr;
    }

    .stops-filter-search,
    .stops-filter-actions {
        grid-column: auto;
    }

    .stops-filter-actions .btn {
        flex: 1;
    }

    .stops-filter-form.press-filter-form {
        grid-template-columns: 1fr;
    }

    .press-filter-form .press-filter-search,
    .press-filter-form .press-filter-actions {
        grid-column: auto;
    }

    .persian-calendar {
        position: fixed;
        top: 50%;
        right: 50%;
        width: min(310px, calc(100vw - 28px));
        transform: translate(50%, -50%);
    }

    .persian-date-picker.is-open::after {
        content: "";
        position: fixed;
        inset: 0;
        z-index: 1070;
        background: rgba(15, 23, 42, .38);
        backdrop-filter: blur(2px);
    }

    .persian-date-picker.is-open .persian-calendar {
        z-index: 1080;
        animation: calendarRevealMobile .16s ease-out;
    }

    .stops-summary-grid {
        gap: 7px;
    }

    .stops-summary-card {
        padding: 10px;
        gap: 8px;
    }

    .stops-summary-icon {
        width: 32px;
        height: 32px;
        flex-basis: 32px;
        font-size: 12px;
    }

    .stops-summary-card strong {
        font-size: 12px;
    }
}

@keyframes calendarRevealMobile {
    from { opacity: 0; transform: translate(50%, calc(-50% - 8px)); }
    to { opacity: 1; transform: translate(50%, -50%); }
}

/* Press ledger */
.press-ledger-hero {
    position: relative;
    margin-bottom: 16px;
    padding: 22px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    overflow: hidden;
    color: #fff;
    border-radius: 20px;
    background:
        radial-gradient(circle at 12% 10%, rgba(255, 255, 255, .14), transparent 30%),
        linear-gradient(125deg, #172554 0%, #1d4ed8 58%, #0891b2 100%);
    box-shadow: 0 18px 42px rgba(29, 78, 216, .18);
}

.press-ledger-hero::after {
    content: "";
    position: absolute;
    left: -45px;
    bottom: -80px;
    width: 190px;
    height: 190px;
    border: 28px solid rgba(255, 255, 255, .055);
    border-radius: 50%;
}

.press-ledger-hero-copy,
.press-ledger-hero-stat {
    position: relative;
    z-index: 1;
}

.press-ledger-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, .75);
    font-size: 9px;
}

.press-ledger-hero h2 {
    margin: 7px 0 5px;
    font-size: 21px;
    font-weight: 800;
}

.press-ledger-hero p {
    margin: 0;
    color: rgba(255, 255, 255, .72);
    font-size: 10px;
}

.press-ledger-hero-stat {
    min-width: 150px;
    padding: 12px 18px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 16px;
    background: rgba(255, 255, 255, .1);
    backdrop-filter: blur(9px);
}

.press-ledger-hero-stat span,
.press-ledger-hero-stat small,
.press-ledger-hero-stat strong {
    display: block;
}

.press-ledger-hero-stat span {
    color: rgba(255, 255, 255, .72);
    font-size: 8px;
}

.press-ledger-hero-stat strong {
    margin: 2px 0;
    font-size: 24px;
}

.press-ledger-hero-stat small {
    color: #bbf7d0;
    font-size: 8px;
}

.press-ledger-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 190px;
    grid-template-areas: "content rail";
    align-items: start;
    gap: 14px;
}

.press-ledger-rail {
    grid-area: rail;
    position: sticky;
    top: 84px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--card);
    box-shadow: var(--shadow-sm);
}

.press-ledger-rail-title {
    padding: 5px 4px 12px;
    display: flex;
    align-items: center;
    gap: 9px;
    border-bottom: 1px solid var(--border);
}

.press-ledger-rail-title > span {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    color: var(--primary);
    border-radius: 10px;
    background: var(--primary-soft);
}

.press-ledger-rail-title strong,
.press-ledger-rail-title small {
    display: block;
}

.press-ledger-rail-title strong {
    font-size: 10px;
}

.press-ledger-rail-title small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 8px;
}

.press-ledger-presses {
    margin-top: 10px;
    display: grid;
    gap: 6px;
}

.press-ledger-press {
    position: relative;
    padding: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    border: 1px solid transparent;
    border-radius: 12px;
    text-decoration: none;
    transition: transform .22s ease, color .22s ease, border-color .22s ease, background .22s ease, box-shadow .22s ease;
}

.press-ledger-press:hover {
    color: var(--primary);
    border-color: color-mix(in srgb, var(--primary) 16%, var(--border));
    background: var(--primary-soft);
    transform: translateX(-3px);
}

.press-ledger-press.active {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(135deg, var(--primary), #2563eb);
    box-shadow: 0 9px 22px rgba(37, 99, 235, .2);
}

.press-ledger-press-letter {
    width: 31px;
    height: 31px;
    flex: 0 0 31px;
    display: grid;
    place-items: center;
    color: var(--primary);
    font-size: 11px;
    font-weight: 800;
    border-radius: 9px;
    background: var(--primary-soft);
}

.press-ledger-press.active .press-ledger-press-letter {
    color: #fff;
    background: rgba(255, 255, 255, .16);
}

.press-ledger-press-copy {
    min-width: 0;
    flex: 1;
}

.press-ledger-press-copy strong,
.press-ledger-press-copy small {
    display: block;
}

.press-ledger-press-copy strong {
    font-size: 9px;
}

.press-ledger-press-copy small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 7px;
}

.press-ledger-press.active small {
    color: rgba(255, 255, 255, .7);
}

.press-ledger-press > i {
    color: var(--muted);
    font-size: 8px;
}

.press-ledger-press.active > i {
    color: rgba(255, 255, 255, .8);
}

.press-ledger-content {
    grid-area: content;
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--card);
    box-shadow: var(--shadow-sm);
}

.press-ledger-content-head {
    padding: 2px 2px 13px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--border);
}

.press-ledger-content-head > div {
    display: flex;
    align-items: center;
    gap: 6px;
}

.press-ledger-content-head strong {
    font-size: 11px;
}

.press-ledger-content-head small {
    color: var(--muted);
    font-size: 8px;
}

.press-ledger-live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 5px rgba(34, 197, 94, .11);
}

.press-ledger-count {
    padding: 5px 9px;
    color: var(--primary);
    font-size: 8px;
    font-weight: 700;
    border-radius: 999px;
    background: var(--primary-soft);
}

.press-ledger-list {
    padding-top: 10px;
    display: grid;
    gap: 9px;
}

.press-ledger-entry {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: var(--surface);
    transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
    animation: pressLedgerEntry .38s both ease-out;
}

.press-ledger-entry:hover {
    border-color: color-mix(in srgb, var(--primary) 20%, var(--border));
    box-shadow: 0 12px 28px rgba(15, 23, 42, .075);
    transform: translateY(-2px);
}

.press-ledger-entry-head {
    padding: 11px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--border);
    background: color-mix(in srgb, var(--card) 75%, var(--surface));
}

.press-ledger-entry-identity {
    display: flex;
    align-items: center;
    gap: 9px;
}

.press-ledger-entry-icon {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: grid;
    place-items: center;
    color: var(--primary);
    border-radius: 11px;
    background: var(--primary-soft);
}

.press-ledger-entry-identity strong,
.press-ledger-entry-identity small {
    display: block;
}

.press-ledger-entry-identity strong {
    font-size: 11px;
}

.press-ledger-entry-identity small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 8px;
}

.press-ledger-entry-meta {
    display: flex;
    align-items: center;
    gap: 7px;
}

.press-ledger-entry-meta > span {
    padding: 5px 8px;
    color: var(--muted);
    font-size: 8px;
    white-space: nowrap;
    border-radius: 8px;
    background: var(--card);
}

.press-ledger-entry-meta .press-ledger-shift {
    color: #7c3aed;
    background: rgba(124, 58, 237, .08);
}

.press-ledger-metrics {
    padding: 10px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
}

.press-ledger-metric {
    min-width: 0;
    padding: 8px 9px;
    border: 1px solid color-mix(in srgb, var(--border) 75%, transparent);
    border-radius: 10px;
    background: var(--card);
}

.press-ledger-metric > span,
.press-ledger-metric > strong {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.press-ledger-metric > span {
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 7px;
}

.press-ledger-metric > span i {
    margin-left: 3px;
}

.press-ledger-metric > strong {
    font-size: 10px;
}

.press-ledger-metric > strong small {
    color: var(--muted);
    font-size: 7px;
    font-weight: 400;
}

.press-ledger-metric.highlight {
    border-color: rgba(37, 99, 235, .13);
    background: rgba(37, 99, 235, .045);
}

.press-ledger-metric.highlight > strong {
    color: #2563eb;
}

.press-ledger-metric.danger {
    border-color: rgba(225, 29, 72, .12);
    background: rgba(225, 29, 72, .04);
}

.press-ledger-metric.danger > strong {
    color: #e11d48;
}

.press-ledger-empty {
    padding: 55px 20px;
    text-align: center;
}

.press-ledger-empty > span {
    width: 55px;
    height: 55px;
    margin: 0 auto 12px;
    display: grid;
    place-items: center;
    color: var(--muted);
    font-size: 22px;
    border-radius: 17px;
    background: var(--surface);
}

.press-ledger-empty strong {
    display: block;
    font-size: 11px;
}

.press-ledger-empty p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 8px;
}

.press-ledger-loader {
    margin-top: 10px;
}

@keyframes pressLedgerEntry {
    from { opacity: 0; transform: translateY(9px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 991.98px) {
    .press-ledger-layout {
        display: block;
    }

    .press-ledger-rail {
        position: static;
        margin-bottom: 12px;
    }

    .press-ledger-rail-title {
        display: none;
    }

    .press-ledger-presses {
        margin: 0;
        display: flex;
        overflow-x: auto;
        scrollbar-width: thin;
    }

    .press-ledger-press {
        min-width: 110px;
    }

    .press-ledger-press > i {
        display: none;
    }
}

@media (max-width: 767.98px) {
    .press-ledger-hero {
        padding: 18px;
    }

    .press-ledger-hero-stat {
        min-width: 115px;
    }

    .press-ledger-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .press-ledger-entry-head {
        align-items: flex-start;
    }

    .press-ledger-entry-meta {
        align-items: flex-end;
        flex-direction: column;
    }
}

@media (max-width: 575.98px) {
    .press-ledger-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .press-ledger-hero-stat {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
        gap: 8px;
        text-align: right;
    }

    .press-ledger-hero-stat small {
        text-align: left;
    }

    .press-ledger-content {
        padding: 10px;
        border-radius: 15px;
    }

    .press-ledger-content-head small {
        display: none;
    }

    .press-ledger-entry-head {
        display: block;
    }

    .press-ledger-entry-meta {
        margin-top: 9px;
        flex-direction: row;
        justify-content: flex-start;
    }
}

/* Dense ledger table */
.press-ledger-table-wrap {
    position: relative;
    min-height: 220px;
    margin-top: 10px;
    overflow: visible;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
}

.press-ledger-table-wrap:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--primary) 55%, transparent);
    outline-offset: 2px;
}

.press-ledger-table {
    width: 100%;
    min-width: 0;
    margin: 0;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
    white-space: normal;
}

.press-ledger-table th,
.press-ledger-table td {
    height: 58px;
    padding: 7px 9px;
    border-bottom: 1px solid var(--border);
    border-left: 1px solid color-mix(in srgb, var(--border) 62%, transparent);
    vertical-align: middle;
    font-size: 9px;
}

.press-ledger-table th:last-child,
.press-ledger-table td:last-child {
    border-left: 0;
}

.press-ledger-table thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    height: 38px;
    color: var(--muted);
    background: color-mix(in srgb, var(--card) 90%, var(--background));
    box-shadow: 0 1px 0 var(--border);
    font-size: 8px;
    font-weight: 700;
    text-align: right;
}

.press-ledger-table tbody tr {
    transition: background .16s ease;
}

.press-ledger-table tbody tr:nth-child(even) {
    background: color-mix(in srgb, var(--background) 38%, transparent);
}

.press-ledger-table tbody tr:hover {
    background: color-mix(in srgb, var(--primary) 5%, var(--surface));
}

.press-ledger-table tbody tr:last-child td {
    border-bottom: 0;
}

.press-ledger-table th:nth-child(1),
.press-ledger-table td:nth-child(1) { width: 15%; }

.press-ledger-table th:nth-child(2),
.press-ledger-table td:nth-child(2) { width: 20%; }

.press-ledger-table th:nth-child(3),
.press-ledger-table td:nth-child(3) { width: 19%; }

.press-ledger-table th:nth-child(4),
.press-ledger-table td:nth-child(4) { width: 16%; }

.press-ledger-table th:nth-child(5),
.press-ledger-table td:nth-child(5) { width: 14%; }

.press-ledger-table th:nth-child(6),
.press-ledger-table td:nth-child(6) { width: 16%; }

.press-ledger-table .numeric-column {
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.press-ledger-table .numeric-column small {
    margin-right: 3px;
    color: var(--muted);
    font-size: 7px;
}

.press-ledger-cell-pair {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.press-ledger-cell-pair > strong,
.press-ledger-cell-pair > small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.press-ledger-cell-pair > strong {
    color: var(--ink);
    font-size: 9px;
}

.press-ledger-cell-pair > small {
    color: var(--muted);
    font-size: 7px;
}

.press-ledger-cell-pair i {
    margin-left: 4px;
    color: var(--primary);
}

.press-ledger-personnel {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.press-ledger-personnel i {
    margin-left: 4px;
    color: var(--primary);
}

.press-ledger-personnel strong {
    color: var(--ink);
    font-size: 9px;
}

.press-ledger-table .date-cell {
    display: flex;
    align-items: center;
    gap: 6px;
}

.press-ledger-table .date-cell {
    color: var(--muted);
    direction: ltr;
    justify-content: flex-end;
}

.press-ledger-table .date-cell i {
    color: var(--primary);
    font-size: 9px;
}

.press-ledger-order-number {
    color: var(--ink);
    font-size: 9px;
    overflow-wrap: anywhere;
}

.tonnage-value {
    color: #079455 !important;
}

.tonnage-value small {
    color: #079455 !important;
}

.returned-value {
    display: inline-block;
    min-width: 24px;
    padding: 1px 5px;
    color: var(--danger);
    border-radius: 7px;
    background: color-mix(in srgb, var(--danger) 8%, transparent);
    font-weight: 700;
}

.press-ledger-table .press-ledger-empty {
    padding: 42px 20px;
}

@media (max-width: 575.98px) {
    .press-ledger-content {
        padding: 8px;
    }

    .press-ledger-table-wrap {
        margin-top: 8px;
        border-radius: 10px;
    }

    .press-ledger-table th,
    .press-ledger-table td {
        height: 54px;
        padding-inline: 5px;
        font-size: 8px;
    }

    .press-ledger-table thead th {
        font-size: 7px;
    }

    .press-ledger-cell-pair > strong,
    .press-ledger-order-number {
        font-size: 8px;
    }

    .press-ledger-cell-pair > small {
        font-size: 6px;
    }
}

/* Management dashboard */
.dashboard-command {
    position: relative;
    min-height: 154px;
    padding: 25px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--primary) 15%, var(--border));
    border-radius: 20px;
    background:
        radial-gradient(circle at 8% 10%, color-mix(in srgb, var(--primary) 12%, transparent), transparent 34%),
        linear-gradient(135deg, color-mix(in srgb, var(--card) 96%, var(--primary) 4%), var(--card));
    box-shadow: 0 12px 34px rgba(16, 24, 40, .055);
}

.dashboard-command::after {
    content: "";
    position: absolute;
    left: -60px;
    bottom: -105px;
    width: 220px;
    height: 220px;
    border: 1px solid color-mix(in srgb, var(--primary) 10%, transparent);
    border-radius: 50%;
    pointer-events: none;
}

.dashboard-command-copy {
    position: relative;
    z-index: 1;
    min-width: 0;
}

.dashboard-live-badge {
    padding: 5px 9px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #087a4c;
    border-radius: 20px;
    background: color-mix(in srgb, var(--green) 11%, transparent);
    font-size: 8px;
    font-weight: 700;
}

.dashboard-live-badge i {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 14%, transparent);
}

.dashboard-command h2 {
    margin: 11px 0 4px;
    color: var(--ink);
    font-size: clamp(20px, 2vw, 27px);
    font-weight: 700;
    letter-spacing: -.45px;
}

.dashboard-command-copy > p {
    margin: 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.9;
}

.dashboard-command-meta {
    margin-top: 15px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px 18px;
    color: var(--muted);
    font-size: 8px;
}

.dashboard-command-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.dashboard-command-meta i {
    color: var(--primary);
    font-size: 10px;
}

.dashboard-command-side {
    position: relative;
    z-index: 1;
    min-width: 270px;
    padding: 12px 12px 12px 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid color-mix(in srgb, var(--border) 76%, transparent);
    border-radius: 16px;
    background: color-mix(in srgb, var(--surface) 72%, transparent);
    backdrop-filter: blur(12px);
}

.dashboard-coverage {
    width: 66px;
    height: 66px;
    flex: 0 0 66px;
    padding: 5px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: conic-gradient(var(--primary) 0 var(--coverage), color-mix(in srgb, var(--border) 72%, transparent) var(--coverage) 100%);
    box-shadow: 0 8px 22px color-mix(in srgb, var(--primary) 13%, transparent);
}

.dashboard-coverage > div {
    width: 100%;
    height: 100%;
    display: grid;
    place-content: center;
    text-align: center;
    border-radius: inherit;
    background: var(--card);
}

.dashboard-coverage strong,
.dashboard-coverage span {
    display: block;
}

.dashboard-coverage strong {
    color: var(--ink);
    font-size: 16px;
    line-height: 1.25;
}

.dashboard-coverage span {
    color: var(--muted);
    font-size: 7px;
}

.dashboard-command-side-copy {
    min-width: 0;
    flex: 1;
}

.dashboard-command-side-copy strong,
.dashboard-command-side-copy span {
    display: block;
}

.dashboard-command-side-copy strong {
    color: var(--ink);
    font-size: 10px;
}

.dashboard-command-side-copy span {
    margin-top: 4px;
    color: var(--muted);
    font-size: 8px;
    line-height: 1.7;
}

.dashboard-command-link,
.dashboard-icon-link {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    display: grid;
    place-items: center;
    color: var(--primary);
    border: 1px solid color-mix(in srgb, var(--primary) 15%, transparent);
    border-radius: 9px;
    background: color-mix(in srgb, var(--primary) 7%, transparent);
    font-size: 10px;
    transition: .18s ease;
}

.dashboard-command-link:hover,
.dashboard-icon-link:hover {
    color: #fff;
    border-color: var(--primary);
    background: var(--primary);
    transform: translateX(-2px);
}

.dashboard-shortcuts {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.dashboard-shortcuts > a {
    min-width: 0;
    min-height: 60px;
    padding: 10px 11px;
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--ink);
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--card);
    transition: border-color .18s ease, background .18s ease, transform .18s ease, box-shadow .18s ease;
}

.dashboard-shortcuts > a:hover {
    color: var(--ink);
    border-color: color-mix(in srgb, var(--primary) 22%, var(--border));
    background: color-mix(in srgb, var(--primary) 2.5%, var(--card));
    box-shadow: 0 9px 25px rgba(16, 24, 40, .055);
    transform: translateY(-2px);
}

.dashboard-shortcut-icon {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    font-size: 14px;
}

.dashboard-shortcut-icon.blue,
.dashboard-kpi-icon.blue {
    color: #2563eb;
    background: rgba(59, 130, 246, .1);
}

.dashboard-shortcut-icon.cyan,
.dashboard-kpi-icon.cyan {
    color: #0891b2;
    background: rgba(34, 211, 238, .1);
}

.dashboard-shortcut-icon.amber {
    color: #d97706;
    background: rgba(245, 158, 11, .11);
}

.dashboard-shortcut-icon.violet {
    color: #7c3aed;
    background: rgba(139, 92, 246, .1);
}

.dashboard-shortcuts strong,
.dashboard-shortcuts small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-shortcuts strong {
    font-size: 13px;
}

.dashboard-shortcuts small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
}

.dashboard-kpi-grid {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.dashboard-kpi {
    position: relative;
    min-width: 0;
    min-height: 166px;
    padding: 16px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--card);
    box-shadow: 0 8px 24px rgba(16, 24, 40, .04);
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.dashboard-kpi:hover {
    border-color: color-mix(in srgb, var(--primary) 18%, var(--border));
    box-shadow: 0 13px 30px rgba(16, 24, 40, .07);
    transform: translateY(-2px);
}

.dashboard-kpi-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.dashboard-kpi-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    font-size: 14px;
}

.dashboard-kpi-icon.green {
    color: #079455;
    background: rgba(50, 213, 131, .1);
}

.dashboard-kpi-icon.red {
    color: #e5484d;
    background: rgba(249, 112, 102, .1);
}

.dashboard-kpi-state {
    padding: 4px 7px;
    color: var(--muted);
    border-radius: 20px;
    background: color-mix(in srgb, var(--background) 76%, transparent);
    font-size: 7px;
    white-space: nowrap;
}

.dashboard-kpi-state.danger {
    color: var(--danger);
    background: color-mix(in srgb, var(--danger) 7%, transparent);
}

.dashboard-kpi-label {
    margin-top: 14px;
    display: block;
    color: var(--muted);
    font-size: 12px;
}

.dashboard-kpi-value {
    margin-top: 3px;
    display: block;
    color: var(--ink);
    font-size: 25px;
    letter-spacing: -.45px;
    line-height: 1.5;
}

.dashboard-kpi-value small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 400;
}

.dashboard-kpi-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: var(--muted);
    font-size: 11px;
}

.dashboard-kpi-progress {
    height: 3px;
    margin-top: 13px;
    overflow: hidden;
    border-radius: 4px;
    background: color-mix(in srgb, var(--border) 68%, transparent);
}

.dashboard-kpi-progress i {
    height: 100%;
    display: block;
    border-radius: inherit;
    background: var(--primary);
}

.dashboard-kpi-progress.cyan i { background: #06b6d4; }
.dashboard-kpi-progress.green i { background: #12b76a; }
.dashboard-kpi-progress.red i { background: #f04438; }

.dashboard-layout {
    margin-top: 12px;
    display: grid;
    grid-template-columns: minmax(0, 1.9fr) minmax(285px, .82fr);
    align-items: start;
    gap: 12px;
}

.dashboard-main-column,
.dashboard-side-column {
    min-width: 0;
    display: grid;
    gap: 12px;
}

.dashboard-panel {
    min-width: 0;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 17px;
    background: var(--card);
    box-shadow: 0 8px 25px rgba(16, 24, 40, .04);
}

.dashboard-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.dashboard-panel-head > div {
    min-width: 0;
}

.dashboard-panel-kicker {
    display: block;
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
}

.dashboard-panel-head h3 {
    margin: 4px 0 0;
    color: var(--ink);
    font-size: 15px;
}

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

.dashboard-panel-head.compact {
    align-items: center;
}

.dashboard-panel-head.compact h3 {
    font-size: 14px;
}

.dashboard-panel-action {
    padding: 7px 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary);
    border: 1px solid color-mix(in srgb, var(--primary) 13%, transparent);
    border-radius: 9px;
    background: color-mix(in srgb, var(--primary) 6%, transparent);
    font-size: 8px;
    white-space: nowrap;
    transition: .18s ease;
}

.dashboard-panel-action:hover {
    color: #fff;
    border-color: var(--primary);
    background: var(--primary);
}

.dashboard-chart-summary {
    margin-top: 17px;
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--muted);
    font-size: 8px;
}

.dashboard-chart-summary span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.dashboard-chart-summary i {
    width: 6px;
    height: 6px;
    border-radius: 2px;
}

.dashboard-chart-summary i.blue { background: var(--primary); }
.dashboard-chart-summary i.cyan { background: #22d3ee; }
.dashboard-chart-summary strong { color: var(--ink); font-size: 9px; }

.dashboard-bar-chart {
    min-width: 0;
    margin-top: 20px;
    padding: 0 3px 2px;
    display: grid;
    grid-template-columns: repeat(7, minmax(58px, 1fr));
    gap: clamp(7px, 1.4vw, 15px);
    overflow-x: auto;
    scrollbar-width: thin;
}

.dashboard-bar-item {
    min-width: 58px;
    text-align: center;
}

.dashboard-bar-value {
    height: 23px;
    color: var(--muted);
    font-size: 7px;
    white-space: nowrap;
}

.dashboard-bar-value small {
    font-size: 6px;
}

.dashboard-bar-track {
    position: relative;
    height: 178px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    border-radius: 9px 9px 5px 5px;
    background:
        repeating-linear-gradient(to top, transparent 0 43px, color-mix(in srgb, var(--border) 45%, transparent) 43px 44px),
        color-mix(in srgb, var(--background) 58%, transparent);
}

.dashboard-bar-fill {
    position: relative;
    width: 100%;
    min-height: 5px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    border-radius: 8px 8px 4px 4px;
    background: linear-gradient(180deg, #5b95ff, #2563eb);
    box-shadow: 0 -8px 22px rgba(59, 130, 246, .12);
    transition: height .55s cubic-bezier(.22, 1, .36, 1), filter .18s ease;
}

.dashboard-bar-fill span {
    margin-top: 7px;
    padding: 2px 5px;
    color: #fff;
    border-radius: 12px;
    background: rgba(255, 255, 255, .14);
    font-size: 7px;
    font-weight: 700;
}

.dashboard-bar-item:hover .dashboard-bar-fill {
    filter: brightness(1.08);
}

.dashboard-bar-item.is-empty .dashboard-bar-fill {
    background: color-mix(in srgb, var(--border) 80%, transparent);
    box-shadow: none;
}

.dashboard-bar-item > strong,
.dashboard-bar-item > small {
    display: block;
}

.dashboard-bar-item > strong {
    margin-top: 9px;
    color: var(--ink);
    font-size: 8px;
}

.dashboard-bar-item > small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 6px;
    white-space: nowrap;
}

.dashboard-reports-panel {
    padding-bottom: 5px;
}

.dashboard-reports-panel .table-responsive {
    margin: 13px -18px 0;
}

.dashboard-table {
    min-width: 690px;
    margin: 0;
    --bs-table-bg: transparent;
    --bs-table-color: var(--muted);
}

.dashboard-table thead th {
    padding: 9px 18px;
    color: var(--muted);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: color-mix(in srgb, var(--background) 56%, transparent);
    font-size: 7px;
    font-weight: 700;
}

.dashboard-table tbody td {
    padding: 11px 18px;
    color: var(--muted);
    border-bottom-color: color-mix(in srgb, var(--border) 72%, transparent);
    font-size: 8px;
    vertical-align: middle;
}

.dashboard-table tbody tr:last-child td {
    border-bottom: 0;
}

.dashboard-table tbody tr:hover td {
    background: color-mix(in srgb, var(--primary) 2.5%, transparent);
}

.dashboard-table-primary,
.dashboard-table td small {
    display: block;
}

.dashboard-table-primary {
    color: var(--ink);
    font-size: 8px;
    font-weight: 700;
}

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

.dashboard-status {
    padding: 4px 7px;
    display: inline-flex;
    border-radius: 20px;
    font-size: 7px;
    white-space: nowrap;
}

.dashboard-status.success {
    color: #087a4c;
    background: rgba(50, 213, 131, .11);
}

.dashboard-status.warning {
    color: #b54708;
    background: rgba(253, 176, 34, .12);
}

.dashboard-status.neutral {
    color: var(--muted);
    background: color-mix(in srgb, var(--muted) 9%, transparent);
}

.dashboard-panel-total {
    padding: 4px 7px;
    color: var(--muted);
    border-radius: 20px;
    background: color-mix(in srgb, var(--background) 72%, transparent);
    font-size: 7px;
    white-space: nowrap;
}

.dashboard-donut-wrap {
    padding: 22px 0 17px;
    display: grid;
    place-items: center;
}

.dashboard-donut {
    position: relative;
    width: 142px;
    height: 142px;
    padding: 15px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--donut-background);
    box-shadow: 0 14px 32px rgba(16, 24, 40, .07);
}

.dashboard-donut::before {
    content: "";
    position: absolute;
    inset: 14px;
    border: 1px solid color-mix(in srgb, var(--border) 62%, transparent);
    border-radius: inherit;
    background: var(--card);
}

.dashboard-donut > div {
    position: relative;
    z-index: 1;
    text-align: center;
}

.dashboard-donut strong,
.dashboard-donut span {
    display: block;
}

.dashboard-donut strong {
    color: var(--ink);
    font-size: 24px;
    line-height: 1.35;
}

.dashboard-donut span {
    color: var(--muted);
    font-size: 7px;
}

.dashboard-status-list {
    display: grid;
    gap: 3px;
}

.dashboard-status-list > div {
    min-height: 39px;
    padding: 7px 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-radius: 9px;
    transition: background .18s ease;
}

.dashboard-status-list > div:hover {
    background: color-mix(in srgb, var(--background) 62%, transparent);
}

.dashboard-status-name {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-size: 8px;
}

.dashboard-status-name i {
    width: 7px;
    height: 7px;
    border-radius: 3px;
}

.dashboard-status-name i.success { background: #32d583; }
.dashboard-status-name i.warning { background: #fdb022; }
.dashboard-status-name i.neutral { background: #98a2b3; }
.dashboard-status-name i.other { background: #8b5cf6; }

.dashboard-status-list > div > span:last-child {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.dashboard-status-list strong {
    color: var(--ink);
    font-size: 9px;
}

.dashboard-status-list small {
    color: var(--muted);
    font-size: 7px;
}

.dashboard-stop-list {
    margin-top: 17px;
    display: grid;
    gap: 15px;
}

.dashboard-stop-item > div:first-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--muted);
    font-size: 8px;
}

.dashboard-stop-item strong {
    color: var(--ink);
    font-size: 7px;
    white-space: nowrap;
}

.dashboard-stop-track {
    height: 5px;
    margin-top: 7px;
    overflow: hidden;
    border-radius: 5px;
    background: color-mix(in srgb, var(--border) 65%, transparent);
}

.dashboard-stop-track i {
    height: 100%;
    display: block;
    border-radius: inherit;
    background: linear-gradient(90deg, #f97066, #f79073);
}

.dashboard-stop-item > small {
    margin-top: 5px;
    display: block;
    color: var(--muted);
    font-size: 6px;
}

.dashboard-wide-link {
    min-height: 34px;
    margin-top: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    color: var(--primary);
    border: 1px solid color-mix(in srgb, var(--primary) 14%, transparent);
    border-radius: 9px;
    background: color-mix(in srgb, var(--primary) 5%, transparent);
    font-size: 8px;
    font-weight: 700;
    transition: .18s ease;
}

.dashboard-wide-link:hover {
    color: #fff;
    border-color: var(--primary);
    background: var(--primary);
}

.dashboard-order-list {
    margin: 13px -6px -5px;
    display: grid;
}

.dashboard-order-list > a {
    min-width: 0;
    min-height: 49px;
    padding: 7px 6px;
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--ink);
    border-bottom: 1px solid color-mix(in srgb, var(--border) 72%, transparent);
    border-radius: 8px;
    transition: background .18s ease;
}

.dashboard-order-list > a:last-child {
    border-bottom: 0;
}

.dashboard-order-list > a:hover {
    color: var(--ink);
    background: color-mix(in srgb, var(--primary) 5%, transparent);
}

.dashboard-order-line {
    width: 29px;
    height: 29px;
    flex: 0 0 29px;
    display: grid;
    place-items: center;
    color: var(--primary);
    border-radius: 8px;
    background: color-mix(in srgb, var(--primary) 9%, transparent);
    font-size: 9px;
    font-weight: 700;
}

.dashboard-order-list > a > span:nth-child(2) {
    min-width: 0;
    flex: 1;
}

.dashboard-order-list strong,
.dashboard-order-list small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-order-list strong {
    font-size: 8px;
}

.dashboard-order-list small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 7px;
}

.dashboard-order-tonnage {
    color: var(--ink);
    font-size: 8px;
    font-weight: 700;
    white-space: nowrap;
}

.dashboard-order-tonnage small {
    display: inline;
    font-size: 6px;
    font-weight: 400;
}

html[data-theme="dark"] .dashboard-live-badge,
html[data-theme="dark"] .dashboard-status.success {
    color: #69e6aa;
}

html[data-theme="dark"] .dashboard-status.warning {
    color: #ffc35c;
}

html[data-theme="dark"] .dashboard-command,
html[data-theme="dark"] .dashboard-kpi,
html[data-theme="dark"] .dashboard-panel,
html[data-theme="dark"] .dashboard-shortcuts > a {
    box-shadow: 0 10px 30px rgba(0, 0, 0, .13);
}

html[data-theme="dark"] .dashboard-bar-track {
    background:
        repeating-linear-gradient(to top, transparent 0 43px, rgba(148, 163, 184, .07) 43px 44px),
        rgba(255, 255, 255, .025);
}

@media (max-width: 1199.98px) {
    .dashboard-command-side {
        min-width: 245px;
    }

    .dashboard-layout {
        grid-template-columns: minmax(0, 1.55fr) minmax(270px, .9fr);
    }

    .dashboard-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-shortcuts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .dashboard-command {
        align-items: stretch;
        flex-direction: column;
        gap: 18px;
    }

    .dashboard-command-side {
        width: 100%;
        min-width: 0;
    }

    .dashboard-layout {
        grid-template-columns: 1fr;
    }

    .dashboard-side-column {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-queue-panel {
        grid-column: 1 / -1;
    }
}

@media (max-width: 767.98px) {
    .dashboard-command {
        min-height: 0;
        padding: 20px;
        border-radius: 17px;
    }

    .dashboard-command h2 {
        font-size: 20px;
    }

    .dashboard-command-meta {
        align-items: flex-start;
        flex-direction: column;
        gap: 7px;
    }

    .dashboard-kpi {
        min-height: 158px;
    }

    .dashboard-panel {
        padding: 15px;
    }

    .dashboard-reports-panel .table-responsive {
        margin-inline: -15px;
    }

    .dashboard-panel-head p {
        display: none;
    }
}

@media (max-width: 575.98px) {
    .dashboard-command {
        padding: 17px;
    }

    .dashboard-command-copy > p {
        font-size: 9px;
    }

    .dashboard-command-side {
        padding: 10px;
    }

    .dashboard-coverage {
        width: 58px;
        height: 58px;
        flex-basis: 58px;
    }

    .dashboard-command-side-copy span {
        font-size: 7px;
    }

    .dashboard-shortcuts {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .dashboard-shortcuts > a {
        min-height: 56px;
        padding: 8px;
    }

    .dashboard-shortcut-icon {
        width: 32px;
        height: 32px;
        flex-basis: 32px;
    }

    .dashboard-shortcuts small {
        display: none;
    }

    .dashboard-kpi-grid {
        grid-template-columns: 1fr;
        gap: 9px;
    }

    .dashboard-kpi {
        min-height: 0;
        padding: 14px;
    }

    .dashboard-kpi-label {
        margin-top: 10px;
    }

    .dashboard-kpi-value {
        font-size: 22px;
    }

    .dashboard-side-column {
        grid-template-columns: 1fr;
    }

    .dashboard-queue-panel {
        grid-column: auto;
    }

    .dashboard-panel-head {
        gap: 8px;
    }

    .dashboard-panel-action {
        padding: 7px;
        font-size: 0;
    }

    .dashboard-panel-action i {
        font-size: 10px;
    }

    .dashboard-bar-chart {
        grid-template-columns: repeat(7, 60px);
        padding-bottom: 8px;
    }

    .dashboard-bar-track {
        height: 155px;
    }
}

/* Refined production load chart */
.dashboard-shortcuts:first-child {
    margin-top: 0;
}

.dashboard-production-chart {
    position: relative;
    overflow: hidden;
}

.dashboard-production-chart::before {
    content: "";
    position: absolute;
    top: 0;
    right: 20px;
    left: 20px;
    height: 2px;
    border-radius: 0 0 4px 4px;
    background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--primary) 55%, transparent), transparent);
    opacity: .7;
}

.dashboard-chart-head {
    align-items: center;
}

.dashboard-chart-head .dashboard-panel-kicker {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #087a4c;
}

.dashboard-chart-head .dashboard-panel-kicker i {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 13%, transparent);
}

.dashboard-chart-head h3 {
    margin-top: 6px;
    font-size: 15px;
    letter-spacing: -.2px;
}

.dashboard-chart-metrics {
    margin-top: 18px;
    padding: 10px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    border: 1px solid color-mix(in srgb, var(--border) 72%, transparent);
    border-radius: 13px;
    background: color-mix(in srgb, var(--background) 52%, transparent);
}

.dashboard-chart-metrics > div {
    min-width: 0;
    min-height: 45px;
    padding: 5px 7px;
    display: flex;
    align-items: center;
    gap: 9px;
    border-left: 1px solid color-mix(in srgb, var(--border) 72%, transparent);
}

.dashboard-chart-metrics > div:last-child {
    border-left: 0;
}

.dashboard-chart-metric-icon {
    width: 31px;
    height: 31px;
    flex: 0 0 31px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    font-size: 12px;
}

.dashboard-chart-metric-icon.blue {
    color: #2563eb;
    background: rgba(59, 130, 246, .1);
}

.dashboard-chart-metric-icon.cyan {
    color: #0891b2;
    background: rgba(34, 211, 238, .1);
}

.dashboard-chart-metric-icon.violet {
    color: #7c3aed;
    background: rgba(139, 92, 246, .1);
}

.dashboard-chart-metrics small,
.dashboard-chart-metrics strong {
    display: block;
}

.dashboard-chart-metrics small {
    color: var(--muted);
    font-size: 7px;
}

.dashboard-chart-metrics strong {
    margin-top: 3px;
    color: var(--ink);
    font-size: 11px;
}

.dashboard-chart-metrics em {
    color: var(--muted);
    font-size: 7px;
    font-style: normal;
    font-weight: 400;
}

.dashboard-production-chart .dashboard-bar-chart {
    margin-top: 23px;
    padding: 0 4px 7px;
    gap: clamp(10px, 1.8vw, 20px);
    overflow-y: hidden;
}

.dashboard-production-chart .dashboard-bar-item {
    position: relative;
    min-width: 62px;
    padding-top: 2px;
    border-radius: 11px;
    outline: none;
}

.dashboard-production-chart .dashboard-bar-value {
    height: 25px;
    color: var(--ink);
    font-size: 8px;
    font-weight: 700;
    opacity: 0;
    animation: dashboardChartValueIn .35s ease calc(var(--bar-delay) + 480ms) forwards;
}

.dashboard-production-chart .dashboard-bar-value small {
    color: var(--muted);
    font-size: 6px;
    font-weight: 400;
}

.dashboard-production-chart .dashboard-bar-track {
    height: 185px;
    justify-content: center;
    border: 1px solid color-mix(in srgb, var(--border) 56%, transparent);
    border-radius: 10px 10px 7px 7px;
    background:
        repeating-linear-gradient(
            to top,
            transparent 0 45px,
            color-mix(in srgb, var(--border) 42%, transparent) 45px 46px
        ),
        color-mix(in srgb, var(--background) 44%, transparent);
}

.dashboard-production-chart .dashboard-bar-fill {
    width: 66%;
    height: var(--bar-size);
    min-height: 5px;
    margin-inline: auto;
    border-radius: 7px 7px 3px 3px;
    background: linear-gradient(180deg, #6ba1ff 0%, #3b82f6 42%, #2563eb 100%);
    box-shadow:
        0 -7px 18px rgba(59, 130, 246, .12),
        inset 0 1px rgba(255, 255, 255, .18);
    transform-origin: bottom;
    animation: dashboardChartBarRise .78s cubic-bezier(.22, 1, .36, 1) var(--bar-delay) both;
}

.dashboard-production-chart .dashboard-bar-fill::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .12), transparent);
    opacity: 0;
    transform: translateX(70%);
    transition: opacity .2s ease, transform .45s ease;
}

.dashboard-production-chart .dashboard-bar-fill span {
    margin-top: 6px;
    padding: 2px 5px;
    color: rgba(255, 255, 255, .94);
    background: rgba(255, 255, 255, .13);
    font-size: 6px;
}

.dashboard-production-chart .dashboard-bar-item:hover .dashboard-bar-fill::before,
.dashboard-production-chart .dashboard-bar-item:focus-visible .dashboard-bar-fill::before {
    opacity: 1;
    transform: translateX(-70%);
}

.dashboard-production-chart .dashboard-bar-item:focus-visible .dashboard-bar-track {
    border-color: color-mix(in srgb, var(--primary) 45%, var(--border));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 8%, transparent);
}

.dashboard-production-chart .dashboard-bar-item.is-empty .dashboard-bar-fill {
    background: color-mix(in srgb, var(--border) 78%, transparent);
    box-shadow: none;
}

.dashboard-production-chart .dashboard-bar-item > strong {
    margin-top: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    color: var(--ink);
    font-size: 8px;
}

.dashboard-production-chart .dashboard-bar-item > strong i {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 9%, transparent);
}

.dashboard-production-chart .dashboard-bar-item.is-empty > strong i {
    background: var(--muted);
    box-shadow: none;
    opacity: .45;
}

.dashboard-production-chart .dashboard-bar-item > small {
    margin-top: 3px;
    font-size: 6px;
}

.dashboard-bar-tooltip {
    position: absolute;
    right: 50%;
    bottom: 43px;
    z-index: 8;
    width: 122px;
    padding: 8px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    visibility: hidden;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: color-mix(in srgb, var(--surface) 96%, transparent);
    box-shadow: 0 12px 30px rgba(16, 24, 40, .16);
    opacity: 0;
    pointer-events: none;
    transform: translate(50%, 7px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
    backdrop-filter: blur(14px);
}

.dashboard-bar-tooltip::after {
    content: "";
    position: absolute;
    right: 50%;
    bottom: -5px;
    width: 9px;
    height: 9px;
    border-left: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: var(--surface);
    transform: translateX(50%) rotate(-45deg);
}

.dashboard-bar-tooltip span {
    min-width: 0;
    text-align: right;
}

.dashboard-bar-tooltip small,
.dashboard-bar-tooltip strong {
    display: block;
}

.dashboard-bar-tooltip small {
    color: var(--muted);
    font-size: 6px;
}

.dashboard-bar-tooltip strong {
    margin-top: 3px;
    overflow: hidden;
    color: var(--ink);
    font-size: 7px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-bar-item:hover .dashboard-bar-tooltip,
.dashboard-bar-item:focus-visible .dashboard-bar-tooltip {
    visibility: visible;
    opacity: 1;
    transform: translate(50%, 0);
}

@keyframes dashboardChartBarRise {
    from {
        opacity: .3;
        transform: scaleY(.04);
    }
    to {
        opacity: 1;
        transform: scaleY(1);
    }
}

@keyframes dashboardChartValueIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

html[data-theme="dark"] .dashboard-chart-head .dashboard-panel-kicker {
    color: #69e6aa;
}

html[data-theme="dark"] .dashboard-bar-tooltip {
    box-shadow: 0 14px 34px rgba(0, 0, 0, .28);
}

@media (max-width: 767.98px) {
    .dashboard-chart-metrics {
        grid-template-columns: 1fr;
    }

    .dashboard-chart-metrics > div {
        min-height: 40px;
        border-left: 0;
        border-bottom: 1px solid color-mix(in srgb, var(--border) 72%, transparent);
    }

    .dashboard-chart-metrics > div:last-child {
        border-bottom: 0;
    }
}

@media (max-width: 575.98px) {
    .dashboard-production-chart .dashboard-bar-chart {
        grid-template-columns: repeat(7, 64px);
    }

    .dashboard-production-chart .dashboard-bar-track {
        height: 158px;
    }
}

/* Stops reports: match the compact one-line press filter treatment */
.stops-filter-panel {
    display: block;
    padding: 10px;
    border-radius: 14px;
    background: var(--card);
    box-shadow: 0 8px 24px rgba(15, 23, 42, .045);
}

.stops-filter-heading {
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0 0 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border: 0;
    border-bottom: 1px solid var(--border);
}

.stops-filter-heading > div {
    gap: 8px;
}

.stops-filter-heading strong {
    font-size: 11px;
}

.stops-filter-heading small {
    font-size: 8px;
    white-space: nowrap;
}

.stops-filter-icon {
    width: 31px;
    height: 31px;
    flex-basis: 31px;
    border-radius: 9px;
    font-size: 13px;
}

.stops-active-count {
    flex: 0 0 auto;
    margin: 0;
    padding: 2px 6px;
    font-size: 7px;
}

.stops-filter-form {
    min-width: 0;
    flex: 1;
    margin-top: 9px;
    display: grid;
    grid-template-columns: minmax(210px, 1.65fr) repeat(5, minmax(90px, 1fr)) auto;
    align-items: end;
    gap: 7px;
}

.stops-filter-field label {
    margin: 0 3px 6px;
    font-size: 8px;
}

.stops-filter-field .form-control,
.stops-filter-field .form-select {
    height: 36px;
    min-height: 36px;
    border-radius: 9px;
    font-size: 10px;
}

.stops-input-icon .form-control {
    padding-right: 32px;
}

.stops-input-icon > i {
    right: 11px;
    color: var(--primary);
}

.stops-filter-actions {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.stops-filter-actions .btn {
    height: 36px;
    min-height: 36px;
    padding: 0 10px;
    border-radius: 9px;
    font-size: 10px;
    white-space: nowrap;
}

.stops-filter-actions .btn-primary {
    border-color: var(--primary-dark);
    box-shadow: 0 5px 14px rgba(59, 130, 246, .2);
}

.stops-filter-reset {
    width: 39px;
    padding: 0 !important;
    display: inline-grid !important;
    place-items: center;
}

.stops-pdf-button {
    min-height: 34px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #b42318;
    border: 1px solid color-mix(in srgb, #e5484d 24%, var(--border));
    border-radius: 9px;
    background: color-mix(in srgb, #e5484d 7%, var(--card));
    font-size: 9px;
    font-weight: 700;
    transition: color .16s ease, background .16s ease, border-color .16s ease, transform .16s ease;
}

.stops-pdf-button i {
    font-size: 13px;
}

.stops-pdf-button:hover {
    color: #fff;
    border-color: #d64545;
    background: #d64545;
    transform: translateY(-1px);
}

@media (max-width: 1199.98px) {
    .stops-filter-form {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .stops-filter-search { grid-column: span 2; }
    .stops-filter-actions { grid-column: span 2; }
}

@media (max-width: 991.98px) {
    .stops-filter-form {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .stops-filter-search {
        grid-column: span 2;
    }

    .stops-filter-actions {
        grid-column: span 1;
    }
}

@media (max-width: 767.98px) {
    .stops-filter-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .stops-filter-search,
    .stops-filter-actions {
        grid-column: 1 / -1;
    }

    .stops-filter-actions .btn-primary {
        flex: 1;
    }
}

@media (max-width: 420px) {
    .stops-filter-form {
        grid-template-columns: 1fr;
    }

    .stops-filter-search,
    .stops-filter-actions {
        grid-column: auto;
    }
}

/* Production toolbar: right-aligned, compact action cluster */
.production-plan-toolbar {
    padding: 9px 12px;
    background: color-mix(in srgb, var(--background) 28%, var(--card));
}

.production-plan-actions {
    justify-content: space-between;
    gap: 7px;
}

.production-filter-actions {
    order: 1;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.production-add-button {
    min-height: 38px;
    padding: 0 13px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border-radius: 9px;
    font-size: 9px;
    font-weight: 700;
    box-shadow: 0 5px 14px rgba(59, 130, 246, .18);
}

.production-visibility-tabs {
    min-height: 38px;
    padding: 2px;
    border-radius: 9px;
}

.production-visibility-tabs a {
    min-height: 32px;
    padding: 5px 8px;
    border-radius: 7px;
    font-size: 8px;
}

.production-filters {
    gap: 5px;
}

.production-search {
    width: min(330px, 30vw);
}

.production-search .form-control {
    height: 38px;
    min-height: 38px;
    padding-right: 40px;
    padding-left: 40px;
    border-radius: 9px;
    font-size: 9px;
}

.production-search-submit {
    top: 4px;
    left: 4px;
    width: 30px;
    height: 30px;
    border-radius: 8px;
}

.production-search-submit i {
    position: static;
    top: auto;
    right: auto;
    color: inherit;
    transform: none;
}

.production-export-actions {
    order: 2;
    gap: 5px;
}

.production-export-actions .btn {
    min-height: 38px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border-radius: 9px;
    font-size: 9px;
}

.production-export-button {
    min-height: 34px !important;
    padding: 0 10px !important;
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    border: 1px solid color-mix(in srgb, #e5484d 24%, var(--border)) !important;
    border-radius: 9px !important;
    background: color-mix(in srgb, #e5484d 7%, var(--card)) !important;
    color: #b42318 !important;
    font-size: 9px !important;
    font-weight: 700;
    box-shadow: none !important;
    transition: color .16s ease, background .16s ease, border-color .16s ease, transform .16s ease;
}

.production-export-button i {
    font-size: 13px;
}

.production-export-button:hover {
    color: #fff !important;
    border-color: #d64545 !important;
    background: #d64545 !important;
    transform: translateY(-1px);
}

/* Production order modal: guided, minimal data-entry UI */
.production-order-modal .modal-dialog {
    max-width: min(1060px, calc(100vw - 28px));
}

.production-order-modal .modal-content {
    border-radius: 18px;
}

.production-order-modal .modal-header {
    padding: 11px 14px;
}

.production-order-modal .modal-body {
    padding: 12px;
    max-height: calc(100vh - 190px);
    overflow-y: auto;
    overscroll-behavior: contain;
}

.production-modal-form {
    display: grid;
    gap: 9px;
}

.production-modal-order-card,
.production-modal-section {
    padding: 11px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: var(--card);
}

.production-modal-order-card {
    border-color: color-mix(in srgb, var(--primary) 25%, var(--border));
    background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 5%, var(--card)), var(--card));
}

.production-modal-section-head {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.production-modal-section-head > div {
    min-width: 0;
}

.production-modal-section-head strong,
.production-modal-section-head small {
    display: block;
}

.production-modal-section-head strong {
    color: var(--ink);
    font-size: 10px;
    font-weight: 800;
}

.production-modal-section-head small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 7.5px;
}

.production-modal-section-icon {
    width: 29px;
    height: 29px;
    flex: 0 0 29px;
    display: grid;
    place-items: center;
    color: var(--primary);
    border-radius: 8px;
    background: var(--primary-soft);
    font-size: 11px;
}

.production-required-hint {
    margin-right: auto;
    padding: 4px 7px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--muted);
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--background);
    font-size: 7px;
    white-space: nowrap;
}

.production-required-hint i,
.production-field-required {
    color: var(--danger);
}

.production-order-modal .form-label {
    margin: 0 2px 5px;
    color: color-mix(in srgb, var(--ink) 80%, var(--muted));
    font-size: 12px;
    font-weight: 700;
}

.production-modal-control {
    position: relative;
}

.production-modal-control > i {
    position: absolute;
    top: 50%;
    right: 11px;
    z-index: 2;
    color: color-mix(in srgb, var(--primary) 76%, var(--muted));
    font-size: 11px;
    transform: translateY(-50%);
    pointer-events: none;
}

.production-modal-control .form-control,
.production-modal-control .form-select {
    height: 37px;
    min-height: 37px;
    padding-right: 33px;
    border-radius: 9px;
    background-color: var(--card);
    box-shadow: none;
    font-size: 9px;
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.production-modal-control .form-control::placeholder {
    color: color-mix(in srgb, var(--muted) 72%, transparent);
}

.production-modal-control .form-control:focus,
.production-modal-control .form-select:focus {
    border-color: color-mix(in srgb, var(--primary) 55%, var(--border));
    background: color-mix(in srgb, var(--primary) 2%, var(--card));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 9%, transparent);
}

.production-modal-control:focus-within > i {
    color: var(--primary);
}

.production-modal-final {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(290px, 1fr);
    align-items: end;
    gap: 10px;
}

.production-modal-notes .form-label small {
    margin-right: 3px;
    color: var(--muted);
    font-size: 7px;
    font-weight: 400;
}

.production-modal-notes textarea {
    min-height: 66px;
    resize: vertical;
    border-radius: 9px;
    box-shadow: none;
    font-size: 9px;
}

.production-modal-final .visibility-switch-card {
    min-height: 66px;
    padding: 10px;
    border-radius: 10px;
    box-shadow: none;
}

.production-order-modal .modal-footer {
    padding: 10px 14px;
    gap: 6px;
    background: var(--card);
}

.production-modal-footer-hint {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--muted);
    font-size: 8px;
}

.production-modal-footer-hint i {
    color: #16a164;
    font-size: 12px;
}

.production-modal-cancel,
.production-modal-submit {
    min-height: 36px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: 9px;
    font-size: 9px;
    font-weight: 700;
}

.production-modal-cancel {
    color: var(--muted);
    border: 1px solid var(--border);
    background: var(--card);
}

.production-modal-cancel:hover {
    color: var(--ink);
    background: var(--background);
}

.production-modal-submit {
    min-width: 116px;
    box-shadow: 0 6px 16px rgba(59, 130, 246, .2);
}

/* Three-column production order entry layout */
.production-order-modal .production-modal-form {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
    gap: 10px;
}

.production-order-modal .production-modal-order-card,
.production-order-modal .production-modal-final {
    grid-column: 1 / -1;
}

.production-order-modal .production-modal-section:not(.production-modal-final):not(.production-modal-order-card) {
    min-width: 0;
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.production-order-modal .production-modal-section:not(.production-modal-final):not(.production-modal-order-card) .production-modal-section-head {
    grid-column: 1 / -1;
}

.production-order-modal .production-modal-section:not(.production-modal-final):not(.production-modal-order-card) > .row {
    grid-column: 1 / -1;
    display: contents;
}

.production-order-modal .production-modal-section:not(.production-modal-final):not(.production-modal-order-card) > .row > [class*="col-"] {
    width: auto;
    max-width: none;
    flex: none;
    padding-inline: 0;
}

.production-order-modal .production-modal-section:not(.production-modal-final):not(.production-modal-order-card) .form-label {
    margin-bottom: 4px;
}

@media (max-width: 991.98px) {
    .production-order-modal .production-modal-form,
    .production-order-modal .production-modal-section:not(.production-modal-final):not(.production-modal-order-card) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .production-order-modal .production-modal-form,
    .production-order-modal .production-modal-section:not(.production-modal-final):not(.production-modal-order-card) {
        grid-template-columns: 1fr;
    }
}

/* Explicit vertical three-panel layout for the add-order popup */
.production-order-modal .production-modal-columns {
    grid-column: 1 / -1;
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    gap: 10px;
}

.production-order-modal .production-modal-columns .production-modal-column {
    min-width: 0;
    display: flex !important;
    flex-direction: column;
    gap: 10px;
    grid-column: auto !important;
    min-height: 100%;
    background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 3%, var(--card)), var(--card));
}

.production-order-modal .production-modal-column-fields {
    min-width: 0;
    display: grid;
    gap: 9px;
}

.production-order-modal .production-modal-field {
    min-width: 0;
}

@media (max-width: 991.98px) {
    .production-order-modal .production-modal-columns {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .production-order-modal .production-modal-columns {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .production-modal-final {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 991.98px) {
    .production-plan-actions {
        justify-content: space-between;
    }

    .production-search {
        width: min(100%, 330px);
    }
}

@media (max-width: 575.98px) {
    .production-order-modal .modal-body {
        padding: 8px;
    }

    .production-modal-form {
        gap: 7px;
    }

    .production-modal-order-card,
    .production-modal-section {
        padding: 9px;
        border-radius: 11px;
    }

    .production-modal-section-head {
        margin-bottom: 8px;
    }

    .production-required-hint,
    .production-modal-footer-hint {
        display: none;
    }

    .production-order-modal .modal-footer {
        padding: 9px;
    }

    .production-modal-cancel,
    .production-modal-submit {
        flex: 1;
    }

    .production-plan-toolbar {
        padding: 10px;
    }

    .production-plan-actions {
        gap: 7px;
    }

    .production-add-button,
    .production-filter-actions,
    .production-filters,
    .production-visibility-tabs,
    .production-export-actions {
        width: 100%;
    }

    .production-filters,
    .production-filter-actions,
    .production-export-actions {
        display: flex;
    }

    .production-filter-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .production-visibility-tabs {
        justify-content: center;
    }

    .production-search {
        flex: 1;
        width: auto;
    }

    .production-export-actions .btn,
    .production-add-button {
        flex: 1;
        justify-content: center;
    }
}

/* Printable production-plan view used on the web page */
.production-plan-document {
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--border) 72%, transparent);
    border-radius: 6px;
    background: #edf0ec;
    box-shadow: 0 12px 32px rgba(16, 24, 40, .08);
}

.production-document-toolbar {
    min-height: 54px;
    padding: 8px 11px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid color-mix(in srgb, var(--border) 72%, transparent);
    background: var(--card);
}

.production-document-toolbar-copy,
.production-document-toolbar-actions,
.production-document-actions,
.production-document-visibility,
.production-document-search-box {
    display: flex;
    align-items: center;
}

.production-document-toolbar-copy {
    min-width: 180px;
    gap: 8px;
}

.production-document-toolbar-copy > div {
    min-width: 0;
}

.production-document-toolbar-copy strong,
.production-document-toolbar-copy small {
    display: block;
}

.production-document-toolbar-copy strong {
    color: var(--ink);
    font-size: 11px;
}

.production-document-toolbar-copy small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 8px;
}

.production-document-toolbar-icon {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    flex: 0 0 32px;
    color: var(--primary);
    border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--border));
    border-radius: 8px;
    background: var(--primary-soft);
    font-size: 14px;
}

.production-document-toolbar-actions {
    min-width: 0;
    justify-content: flex-end;
    gap: 6px;
}

.production-document-search-box {
    position: relative;
    width: 170px;
    height: 32px;
    border: 1px solid color-mix(in srgb, var(--primary) 24%, var(--border));
    border-radius: 7px;
    background: color-mix(in srgb, var(--primary) 3%, var(--card));
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.production-document-search-box:focus-within {
    border-color: var(--primary);
    background: var(--card);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 12%, transparent);
}

.production-document-search-box > i {
    margin-inline: 8px 0;
    color: var(--primary);
    font-size: 11px;
}

.production-document-search-box input {
    min-width: 0;
    width: 100%;
    height: 100%;
    padding: 0 6px;
    color: var(--ink);
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 8px;
}

.production-document-search-box input::placeholder {
    color: var(--muted);
}

.production-document-search-box > a {
    width: 25px;
    height: 25px;
    margin-inline: 0 3px;
    display: grid;
    place-items: center;
    color: var(--muted);
    border-radius: 5px;
    font-size: 9px;
}

.production-document-search-box > a:hover {
    color: var(--danger);
    background: color-mix(in srgb, var(--danger) 10%, transparent);
}

.production-document-visibility {
    padding: 2px;
    gap: 1px;
    border: 1px solid color-mix(in srgb, var(--primary) 20%, var(--border));
    border-radius: 7px;
    background: color-mix(in srgb, var(--primary) 4%, var(--card));
}

.production-document-visibility a {
    min-height: 26px;
    padding: 3px 7px;
    display: inline-flex;
    align-items: center;
    color: var(--muted);
    border-radius: 5px;
    font-size: 7px;
    font-weight: 700;
    white-space: nowrap;
}

.production-document-visibility a:hover {
    color: var(--primary);
    background: color-mix(in srgb, var(--primary) 8%, transparent);
}

.production-document-visibility a.is-active {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    box-shadow: 0 4px 10px color-mix(in srgb, var(--primary) 22%, transparent);
}

.production-document-actions {
    gap: 4px;
}

.production-document-button {
    min-height: 32px;
    padding: 0 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--primary);
    border: 1px solid color-mix(in srgb, var(--primary) 28%, var(--border));
    border-radius: 7px;
    background: color-mix(in srgb, var(--primary) 7%, var(--card));
    font-size: 8px;
    font-weight: 700;
    white-space: nowrap;
    transition: color .15s ease, background .15s ease, border-color .15s ease;
}

.production-document-button:hover {
    color: #fff;
    border-color: var(--primary-dark);
    background: var(--primary-dark);
}

/* آیکون PDF قرمز — هم‌رنگ دکمهٔ خروجی PDF پرسنل */
.production-document-button-pdf .bi-file-earmark-pdf {
    color: #d9364a;
}
.production-document-button-pdf:hover .bi-file-earmark-pdf {
    color: #fff;
}

.production-document-button-print {
    color: var(--primary);
    border-color: color-mix(in srgb, var(--primary) 28%, var(--border));
    background: color-mix(in srgb, var(--primary) 7%, var(--card));
}

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

/* دکمهٔ افزودن سفارش — هم‌سبک personnel-create-button (outline آبی با hover پررنگ) */
.production-document-button-add {
    color: var(--primary);
    border-color: color-mix(in srgb, var(--primary) 18%, var(--border));
    background: var(--surface);
    box-shadow: none;
}

.production-document-button-add:hover {
    color: #fff;
    border-color: var(--primary);
    background: var(--primary);
}

.production-document-scroll {
    padding: 20px 14px 24px;
    overflow-x: auto;
    background:
        linear-gradient(rgba(255, 255, 255, .4), rgba(255, 255, 255, .4)),
        #e8ece7;
}

.production-document {
    width: 100%;
    min-width: 760px;
    margin: 0 auto;
    overflow: hidden;
    color: #111;
    border: 2px solid #111;
    background: #fff;
    direction: rtl;
    font-family: Vazirmatn, Tahoma, sans-serif;
    font-size: 10px;
    line-height: 1.25;
    box-shadow: 0 5px 15px rgba(16, 24, 40, .11);
}

.production-document-header {
    min-height: 34px;
    padding: 4px 10px;
    display: grid;
    grid-template-columns: 1fr 1.2fr 1fr;
    align-items: center;
    direction: ltr;
    border-bottom: 1px solid #111;
    background: #c8e0b0;
    text-align: center;
}

.production-document-header > span {
    min-width: 0;
    direction: rtl;
    text-align: left;
    font-size: 9px;
    font-weight: 700;
    white-space: nowrap;
}

.production-document-header > span:last-child {
    text-align: right;
}

.production-document-header > strong {
    direction: rtl;
    color: #111;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.production-document-company {
    color: transparent;
    user-select: none;
}

.production-document-press {
    position: relative;
    page-break-inside: avoid;
}

.production-document-fixed-press-label {
    position: absolute;
    inset-block-start: 22px;
    inset-inline-start: 0;
    inset-block-end: 22px;
    z-index: 2;
    width: 4.5%;
    display: grid;
    place-items: center;
    pointer-events: none;
    background: #f2f2f2;
    border-inline-end: 0;
    border-inline-start: 1px solid #444;
    text-align: center;
}

.production-document-fixed-press-label span {
    display: block;
    direction: rtl;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    white-space: nowrap;
    font-weight: 800;
}

.production-document-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    direction: rtl;
    color: #111;
    font-family: Vazirmatn, Tahoma, sans-serif;
    font-size: 13px;
    font-weight: 600;
}

.production-document-table th,
.production-document-table td {
    height: 24px;
    padding: 1px 4px;
    overflow: hidden;
    border-left: 1px solid #444;
    border-bottom: 1px solid #444;
    vertical-align: middle;
    text-align: center;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.production-document-table th:last-child,
.production-document-table td:last-child {
    border-left: 0;
}

.production-document-table thead th {
    height: 24px;
    padding-inline: 4px;
    background: #c8e0b0;
    color: #111;
    text-align: center;
    font-size: 12px;
    font-weight: 800;
}

.production-document-table tbody tr {
    background: #fff;
    transition: background .12s ease;
}

.production-document-table tbody tr:hover {
    background: #f4f8f1;
}

.production-document-inline-cell {
    cursor: cell;
}

.production-document-inline-cell:not(.is-inline-editing):hover {
    background: color-mix(in srgb, var(--primary) 8%, transparent);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 28%, transparent);
}

.production-document-inline-cell.is-inline-editing {
    padding: 2px !important;
    background: color-mix(in srgb, var(--primary) 10%, transparent) !important;
    box-shadow: inset 0 0 0 2px var(--primary);
}

.production-document-inline-input {
    width: 100%;
    min-width: 0;
    height: 25px;
    padding: 2px 5px;
    color: var(--ink);
    border: 1px solid color-mix(in srgb, var(--primary) 45%, var(--border));
    border-radius: 4px;
    outline: 0;
    background: var(--card);
    font: inherit;
    font-size: 13px;
    line-height: 1.2;
    text-align: inherit;
    direction: inherit;
}

.production-document-inline-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 15%, transparent);
}

.production-document-inline-input.is-invalid,
.production-document-inline-cell.is-inline-error .production-document-inline-input {
    border-color: var(--danger);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--danger) 14%, transparent);
}

.production-document-inline-cell.is-inline-saving {
    opacity: .68;
    cursor: progress;
}

.production-document-table .production-document-col-press { width: 3.5%; }
.production-document-table .production-document-col-priority { width: 4.5%; }
.production-document-table .production-document-col-material { width: 6.5%; }
.production-document-table .production-document-col-formula { width: 9%; }
.production-document-table .production-document-col-proposal { width: 7%; }
.production-document-table .production-document-col-production { width: 7%; }
.production-document-table .production-document-col-mold { width: 7%; }
.production-document-table .production-document-col-customer { width: 9%; }
.production-document-table .production-document-col-stamp { width: 8%; }
.production-document-table .production-document-col-stamp-color { width: 5%; }
.production-document-table .production-document-col-quality { width: 6.5%; }
.production-document-table .production-document-col-amount-bricks { width: 7.5%; }
.production-document-table .production-document-col-amount-tonnage { width: 7.5%; }
.production-document-table .production-document-col-description { width: 12%; }

.production-document-amount {
    padding: 0 !important;
    vertical-align: top !important;
    overflow: hidden;
}

.production-document-amount-total {
    display: flex;
    align-items: center;
    justify-content: center;
    direction: ltr;
    height: 27px;
    padding: 1px 4px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.production-document-amount-total.production-document-inline-cell {
    cursor: cell;
}

.production-document-amount-total.production-document-inline-cell:not(.is-inline-editing):hover {
    background: color-mix(in srgb, var(--primary) 8%, transparent);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 28%, transparent);
}

.production-document-amount-inline.is-inline-editing {
    flex: 1;
    background: color-mix(in srgb, var(--primary) 10%, transparent) !important;
    box-shadow: inset 0 0 0 2px var(--primary);
}

.production-document-amount-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-top: 1px solid #444;
    height: 27px;
}

.production-document-amount-split > span {
    display: flex;
    align-items: center;
    justify-content: center;
    direction: ltr;
    padding: 1px 3px;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}

.production-document-amount-split > span + span {
    border-right: 1px solid #444;
}

.production-document-amount .production-document-produced-cell {
    background: rgba(21, 94, 239, .05);
}

.production-document-amount .production-document-remaining-cell {
    background: rgba(242, 116, 15, .08);
}

.production-document-press-label-slot {
    padding: 0 !important;
    background: #f2f2f2 !important;
    cursor: default;
    text-align: center !important;
    vertical-align: middle !important;
    font-weight: 800;
    position: relative;
    overflow: visible;
}

.production-document-priority,
.production-document-number {
    direction: ltr;
    text-align: center !important;
    font-variant-numeric: tabular-nums;
}

.production-document-priority {
    font-weight: 800;
}

.production-document-ltr {
    direction: ltr;
    text-align: center !important;
}

.production-document-ltr strong {
    font-weight: 800;
}

.production-document-description {
    position: relative;
    overflow: visible !important;
}

.production-document-description > span:first-child {
    display: block;
    padding-inline-end: 30px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.production-document-row-actions {
    position: absolute;
    inset-inline-end: 3px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 3px;
    margin: 0;
    line-height: 1;
}

.production-document-row-actions form {
    margin: 0;
    display: flex;
}

/* نمایش/مخفی کردن دکمه‌ها بر اساس وضعیت سفارش */
.production-document-row-actions .production-row-restore,
.production-document-row-actions .production-row-delete {
    display: none;
}

.is-hidden-order .production-document-row-actions .production-row-hide {
    display: none;
}

.is-hidden-order .production-document-row-actions .production-row-restore,
.is-hidden-order .production-document-row-actions .production-row-delete {
    display: flex;
}

.production-document-row-action {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    padding: 0;
    display: inline-grid;
    place-items: center;
    color: #526071;
    border: 1px solid #e2e7ed;
    border-radius: 5px;
    background: #f8fafc;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    transition: color .15s ease, background .15s ease, border-color .15s ease;
}

.production-document-row-action:hover {
    color: #175cd3;
    background: #eff6ff;
    border-color: #b2ccff;
}

.production-document-row-action:focus-visible {
    outline: 2px solid #84adff;
    outline-offset: 1px;
}

.production-document-row-action.danger {
    color: #a92323;
    background: #fff1f0;
    border-color: #f3b9b4;
}

.production-document-row-action.danger:hover {
    color: #891b1b;
    background: #fee4e2;
    border-color: #e9958d;
}

.production-document-row-action.success {
    color: #1a7f37;
    background: #f0fff4;
    border-color: #b2dfbc;
}

.production-document-row-action.success:hover {
    color: #146c2e;
    background: #dcffe4;
    border-color: #8fd19e;
}

@media (prefers-reduced-motion: reduce) {
    .production-document-row-action { transition: none; }
}

.production-document-row-add {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(calc(-50% + 2px), -50%);
    z-index: 6;
    width: 22px;
    height: 22px;
    padding: 0;
    display: inline-grid;
    place-items: center;
    color: #526072;
    border: 1px solid #b7c6dd;
    border-radius: 50%;
    background: #fff;
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
    opacity: .65;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .14);
    transition: opacity .15s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.production-document-order-row:hover .production-document-row-add,
.production-document-row-add:focus-visible {
    opacity: 1;
    transform: translate(calc(-50% + 2px), -50%) scale(1.08);
    border-color: #3b82f6;
    background: #eff6ff;
    box-shadow: 0 2px 6px rgba(37, 99, 235, .3);
}

.production-document-row-add:hover {
    background: #dbeafe;
    border-color: #2563eb;
    color: #1d4ed8;
}

@media (pointer: coarse) {
    .production-document-row-add {
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .production-document-row-add { transition: none; }
}

.production-document-total-row td {
    height: 22px;
    background: #fff;
    font-weight: 800;
}

.production-document-total-row .production-document-total-label {
    text-align: right;
    /* مجموع ۳ سانتی‌متر جلوتر از ابتدای سطر قرار می‌گیرد (زیر لیبل پرس نیفتد) */
    padding-right: 30mm !important;
}

.production-document-total-orders {
    text-align: center;
}

.production-document-empty {
    min-height: 140px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 6px;
    color: #555;
    background: #fff;
    font-size: 10px;
}

.production-document-empty i {
    color: #315f28;
    font-size: 24px;
}

.production-document-footer {
    min-height: 39px;
    padding: 7px 14px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 18px;
    color: var(--muted);
    border-top: 1px solid color-mix(in srgb, var(--border) 72%, transparent);
    background: var(--card);
    font-size: 8px;
}

.production-document-footer strong,
.production-document-footer b {
    color: var(--ink);
}

.production-document-footer i {
    margin-inline-end: 3px;
    color: #315f28;
}

.production-document-save-state {
    margin-inline-start: auto;
    color: #315f28 !important;
}

html[data-theme="dark"] .production-plan-document {
    background: #101828;
}

html[data-theme="dark"] .production-document {
    color: #111;
    background: #fff;
}

@media (max-width: 991.98px) {
    .production-document-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .production-document-toolbar-copy {
        min-width: 0;
    }

    .production-document-toolbar-actions {
        justify-content: stretch;
        flex-wrap: wrap;
    }

    .production-document-search {
        flex: 1 1 150px;
    }

    .production-document-search-box {
        width: 100%;
    }

    .production-document-visibility {
        flex: 0 0 auto;
    }

    .production-document-actions {
        margin-inline-start: auto;
    }
}

@media (max-width: 575.98px) {
    .production-plan-document {
        margin-inline: -5px;
        border-radius: 4px;
    }

    .production-document-toolbar {
        padding: 8px;
    }

    .production-document-toolbar-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .production-document-visibility,
    .production-document-actions {
        width: 100%;
    }

    .production-document-visibility a,
    .production-document-actions > * {
        flex: 1;
        justify-content: center;
    }

    .production-document-scroll {
        padding: 9px 5px 14px;
    }

    .production-document {
        min-width: 760px;
    }

    .production-document-footer {
        justify-content: flex-start;
        gap: 12px;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* Final overrides for the requested compact report/personnel experience */
.personnel-filter-form {
    grid-template-columns: minmax(0, 2fr) minmax(150px, .85fr) auto !important;
}

.personnel-table {
    min-width: 0 !important;
}

.personnel-table-wrap {
    overflow-x: hidden !important;
}

.press-reports-filter-form {
    grid-template-columns: minmax(180px, .72fr) repeat(4, minmax(105px, 1fr)) auto !important;
}

.press-reports-filter-form .stops-filter-search {
    width: 100%;
    max-width: 300px;
    grid-column: auto !important;
}

.press-reports-filter-form .stops-filter-actions,
.stops-filter-form[data-instant-filter] .stops-filter-actions {
    align-items: center;
}

.press-ledger-head-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.press-ledger-pdf-disabled {
    min-height: 28px;
    padding: 0 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--muted);
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    font-size: 8px;
    opacity: .62;
    cursor: not-allowed;
}

@media (max-width: 1199.98px) {
    .press-reports-filter-form {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }

    .press-reports-filter-form .stops-filter-search {
        max-width: none;
    }
}

@media (max-width: 767.98px) {
    .press-reports-filter-form {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .press-reports-filter-form .stops-filter-search,
    .press-reports-filter-form .stops-filter-actions {
        grid-column: 1 / -1 !important;
    }

    .press-ledger-content-head {
        align-items: flex-start;
    }

    .press-ledger-head-actions {
        align-items: flex-end;
        flex-direction: column;
    }
}

@media (max-width: 420px) {
    .press-reports-filter-form {
        grid-template-columns: 1fr !important;
    }
}

/* Final compact filters */
.stops-filter-form.press-reports-filter-form {
    grid-template-columns: minmax(190px, .75fr) repeat(4, minmax(110px, 1fr)) auto;
}

.press-reports-filter-form .stops-filter-search {
    width: 100%;
    max-width: 310px;
    grid-column: auto;
}

.press-reports-filter-form .stops-filter-actions,
.personnel-filter-form .stops-filter-actions {
    align-items: center;
}

/* Press ledger: minimalist device rail */
.press-ledger-layout {
    grid-template-columns: minmax(0, 1fr) 168px;
    gap: 10px;
}

.press-ledger-rail {
    padding: 9px;
    border-radius: 14px;
    box-shadow: 0 7px 20px rgba(15, 23, 42, .04);
}

.press-ledger-rail-title {
    padding: 3px 3px 9px;
    gap: 7px;
}

.press-ledger-rail-title > span {
    width: 29px;
    height: 29px;
    border-radius: 8px;
    font-size: 11px;
}

.press-ledger-rail-title strong {
    font-size: 9px;
}

.press-ledger-rail-title small {
    font-size: 7px;
}

.press-ledger-presses {
    margin-top: 7px;
    gap: 3px;
}

.press-ledger-press {
    min-height: 43px;
    padding: 6px;
    gap: 7px;
    border-radius: 9px;
}

.press-ledger-press:hover {
    transform: none;
}

.press-ledger-press.active {
    color: var(--primary);
    border-color: color-mix(in srgb, var(--primary) 24%, var(--border));
    background: var(--primary-soft);
    box-shadow: none;
}

.press-ledger-press-icon,
.press-ledger-press-icon.featured {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    color: var(--muted);
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    font-size: 9px;
}

.press-ledger-press.active .press-ledger-press-icon {
    color: #fff;
    border-color: var(--primary);
    background: var(--primary);
}

.press-ledger-press-copy strong {
    font-size: 8px;
}

.press-ledger-press-copy small {
    font-size: 7px;
}

.press-ledger-press.active small,
.press-ledger-press.active > i {
    color: var(--primary);
}

.press-ledger-content {
    padding: 11px;
    border-radius: 14px;
    box-shadow: 0 7px 20px rgba(15, 23, 42, .04);
}

.press-ledger-head-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.press-ledger-pdf-disabled {
    min-height: 28px;
    padding: 0 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--muted);
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    font-size: 8px;
    opacity: .62;
    cursor: not-allowed;
}

@media (max-width: 1199.98px) {
    .stops-filter-form.press-reports-filter-form {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .press-reports-filter-form .stops-filter-search {
        max-width: none;
    }
}

@media (max-width: 991.98px) {
    .press-ledger-layout {
        display: block;
    }
}

@media (max-width: 767.98px) {
    .stops-filter-form.press-reports-filter-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .press-reports-filter-form .stops-filter-search,
    .press-reports-filter-form .stops-filter-actions {
        grid-column: 1 / -1;
    }

    .press-ledger-content-head {
        align-items: flex-start;
    }

    .press-ledger-head-actions {
        align-items: flex-end;
        flex-direction: column;
    }
}

@media (max-width: 420px) {
    .stops-filter-form.press-reports-filter-form {
        grid-template-columns: 1fr;
    }
}

/* ==== Standardized readable sizes (final overrides for all pages) ==== */

/* Stops / Press / Personnel filter panels */
.stops-filter-heading strong {
    font-size: 15px;
}

.stops-filter-heading small {
    font-size: 11px;
}

.stops-filter-icon {
    font-size: 15px;
}

.stops-active-count {
    font-size: 10px;
}

.stops-filter-field label {
    font-size: 12px;
}

.stops-filter-field .form-control,
.stops-filter-field .form-select {
    height: 40px;
    min-height: 40px;
    font-size: 13px;
}

.stops-filter-actions .btn {
    min-height: 40px;
    padding: 0 14px;
    font-size: 13px;
}

.personnel-live-filter,
.reports-live-filter {
    font-size: 13px;
}

.stops-pdf-button {
    min-height: 38px;
    padding: 0 12px;
    font-size: 12px;
}

/* Results header */
.stops-results-title strong {
    font-size: 16px;
}

.stops-results-title small {
    font-size: 12px;
}

/* Stops summary cards */
.stops-summary-card small {
    font-size: 11px;
}

.stops-summary-card strong {
    font-size: 17px;
}

.stops-summary-card em {
    font-size: 11px;
}

.stops-summary-icon {
    font-size: 16px;
}

/* Infinite scroll loader */
.infinite-scroll-loader {
    font-size: 13px;
}

.infinite-scroll-loader [data-infinite-scroll-retry] {
    font-size: 13px;
}

/* Production plan toolbar */
.production-document-toolbar-copy strong {
    font-size: 16px;
}

.production-document-toolbar-copy small {
    font-size: 12px;
}

.production-document-toolbar-icon {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
    font-size: 16px;
}

.production-document-search-box {
    height: 38px;
}

.production-document-search-box > i {
    font-size: 13px;
}

.production-document-search-box input {
    font-size: 13px;
}

.production-document-visibility a {
    min-height: 30px;
    padding: 4px 10px;
    font-size: 12px;
}

.production-document-button {
    min-height: 34px;
    padding: 0 10px;
    font-size: 12px;
}

/* Press ledger */
.press-ledger-rail-title > span {
    font-size: 13px;
}

.press-ledger-rail-title strong {
    font-size: 13px;
}

.press-ledger-rail-title small {
    font-size: 10px;
}

.press-ledger-press-icon,
.press-ledger-press-icon.featured {
    font-size: 12px;
}

.press-ledger-press-copy strong {
    font-size: 12px;
}

.press-ledger-press-copy small {
    font-size: 10px;
}

.press-ledger-press > i {
    font-size: 10px;
}

.press-ledger-content-head strong {
    font-size: 14px;
}

.press-ledger-content-head small {
    font-size: 11px;
}

.press-ledger-count {
    font-size: 11px;
}

.press-ledger-pdf-disabled {
    font-size: 11px;
}

.press-ledger-table th,
.press-ledger-table td {
    font-size: 12px;
}

.press-ledger-table thead th {
    font-size: 12px;
}

.press-ledger-table .numeric-column small {
    font-size: 10px;
}

.press-ledger-cell-pair > strong {
    font-size: 12px;
}

.press-ledger-cell-pair > small {
    font-size: 10px;
}

.press-ledger-personnel strong {
    font-size: 12px;
}

.press-ledger-order-number {
    font-size: 12px;
}

.press-ledger-table .date-cell i {
    font-size: 11px;
}

/* Press report archive action */
.report-archive-control {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 44px;
    min-width: 165px;
    padding: 10px 14px;
    border: 1px solid #b6c9e8;
    border-radius: 12px;
    background: #eff6ff;
    color: #1e40af;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
}
.report-archive-control:hover { background: #dbeafe; }
.report-archive-control:focus-within { outline: 3px solid #93c5fd; outline-offset: 2px; }
.report-archive-control input[type="checkbox"] {
    appearance: auto;
    width: 20px;
    height: 20px;
    margin: 0;
    opacity: 1;
    accent-color: #2563eb;
    cursor: inherit;
}
.report-archive-control.is-archived { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; cursor: default; }
.report-archive-control.is-unavailable { background: #f1f5f9; border-color: #cbd5e1; color: #64748b; cursor: not-allowed; }
.report-archive-control[aria-busy="true"] { opacity: .7; cursor: progress; }
.report-archive-message { display: block; margin-top: 5px; max-width: 220px; font-size: 11px; color: #64748b; }
.report-archive-message:empty { display: none; }
.report-archive-message.is-error { color: #dc2626; }

/* Cleaning is a display state; stored order values remain editable. */
.production-document-table .is-cleaning-order > td {
    background-color: #fff3cd;
    border-bottom-color: #dfb85c;
}
.production-document-table .is-cleaning-order:hover > td {
    background-color: #ffecb5;
}
.is-cleaning-order > td:not(.production-document-press-label-slot) {
    position: relative;
    text-align: center !important;
    direction: rtl;
}
.is-cleaning-order > td:not(.production-document-press-label-slot)::after {
    content: "نظافت کامل";
    display: block;
    color: #714b08;
    font-weight: bold;
    font-size: 9px;
    line-height: 1.5;
    white-space: normal;
    pointer-events: none;
}
.is-cleaning-order > td.production-document-description::after { padding-inline-end: 30px; }
.is-cleaning-order > td > .production-document-inline-value,
.is-cleaning-order > td > .production-document-amount-total,
.is-cleaning-order > td > .production-document-amount-split { display: none; }
.is-cleaning-order > td.is-inline-editing > .production-document-inline-value { display: block; }
.is-cleaning-order > td.is-inline-editing::after { display: none; }

/* ============================================================
   ویزارد ویرایش گزارش پرس
   ============================================================ */
.press-wizard { display: flex; flex-direction: column; gap: 16px; padding-bottom: 28px; }

.press-wizard-bar {
    position: sticky; top: 0; z-index: 40;
    display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
    padding: 14px 20px; border-radius: 18px;
    background: rgba(255, 255, 255, .96); backdrop-filter: blur(10px);
    border: 1px solid #e4e9f2; box-shadow: 0 8px 24px rgba(16, 40, 80, .07);
}
.press-wizard-bar-main { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.press-wizard-back { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 12px; background: #f4f7fc; color: #2859aa; font-size: 13px; font-weight: 800; text-decoration: none; border: 1px solid #dde6f5; }
.press-wizard-back:hover { background: #e8effb; color: #1d4291; }
.press-wizard-bar-divider { width: 1px; height: 26px; background: #e4e9f2; }
.press-wizard-bar-title { display: flex; align-items: center; gap: 10px; }
.press-wizard-bar-title strong { font-size: 15px; font-weight: 800; color: #16243d; }
.press-wizard-bar-status { font-size: 11px !important; }
.press-wizard-bar-actions { display: flex; align-items: center; gap: 12px; }
.press-wizard-save-state { font-size: 12px; font-weight: 700; color: #24755f; }
.press-wizard-save-state.is-busy { color: #a8631a; }

.press-wizard-steps {
    position: sticky; top: 78px; z-index: 35;
    display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px;
    padding: 10px; border-radius: 18px;
    background: rgba(255, 255, 255, .96); backdrop-filter: blur(10px);
    border: 1px solid #e4e9f2; box-shadow: 0 6px 18px rgba(16, 40, 80, .06);
}
.press-wizard-step {
    display: flex; align-items: center; gap: 9px;
    padding: 11px 12px; border: 1px solid transparent; border-radius: 13px;
    background: #f6f8fc; color: #667085; cursor: pointer; font-family: inherit;
    font-size: 12px; font-weight: 800; text-align: start; transition: .16s ease;
}
.press-wizard-step:hover { background: #eaf0fb; color: #2859aa; }
.press-wizard-step-index {
    display: grid; place-items: center; width: 26px; height: 26px; flex: 0 0 26px;
    border-radius: 9px; background: #e4e9f2; color: #475467; font-size: 12px; font-weight: 900;
}
.press-wizard-step.is-active { background: #e8f1fd; border-color: #b9d6f7; color: #1d4291; }
.press-wizard-step.is-active .press-wizard-step-index { background: #2859aa; color: #fff; }
.press-wizard-step.is-done { background: #edf8f2; border-color: #b9e6cd; color: #1d7a4f; }
.press-wizard-step.is-done .press-wizard-step-index { background: #1d7a4f; color: #fff; }
.press-wizard-step-label { display: inline-flex; align-items: center; gap: 6px; }

.press-wizard-errors { border-radius: 16px; border: 1px solid #fecdca; }
.press-wizard-errors ul { margin: 8px 0 0; padding-inline-start: 20px; font-size: 12px; }

.press-wizard-panel {
    padding: 24px 26px 26px; border-radius: 20px;
    background: #fff; border: 1px solid #e4e9f2; box-shadow: 0 4px 16px rgba(16, 40, 80, .05);
}
.press-wizard-panel[hidden] { display: none !important; }
.press-wizard-panel-head { margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid #eef1f7; }
.press-wizard-panel-head h2 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 18px; font-weight: 900; color: #16243d; }
.press-wizard-panel-head h2 i { color: #2a90c9; font-size: 22px; }
.press-wizard-panel-head p { margin: 6px 0 0; font-size: 13px; color: #667085; }

.press-wizard-group-title { margin: 24px 0 12px; font-size: 14px; font-weight: 900; color: #33415c; }
.press-wizard-group-title:first-of-type { margin-top: 0; }

.press-wizard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.press-wizard-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.press-wizard-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.press-wizard-grid.cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }

.press-wizard-field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.press-wizard-field > label { font-size: 12px; font-weight: 800; color: #475467; }
.press-wizard-field .form-control,
.press-wizard-field .form-select {
    min-height: 46px; padding: 11px 14px; border-radius: 12px;
    border: 1px solid #dde3ee; background-color: #fcfdff; color: #16243d;
    font-size: 13px; font-weight: 600; transition: .16s ease;
}
.press-wizard-field .form-control:focus,
.press-wizard-field .form-select:focus {
    border-color: #438ccd; background-color: #fff;
    box-shadow: 0 0 0 4px rgba(67, 140, 205, .13);
}
.press-wizard-field .form-control.is-calculated { background: #f1f5fb; color: #33415c; font-weight: 800; cursor: default; }
.press-wizard-field .form-control[readonly] { cursor: default; }
.press-wizard-field textarea.form-control { min-height: 108px; line-height: 2; font-weight: 500; }
.press-wizard-error { font-size: 11px; font-weight: 700; color: #b42318; }
.press-wizard-field .persian-date-picker { position: relative; }
.press-wizard-field .persian-date-picker > i { position: absolute; inset-inline-start: 14px; top: 50%; transform: translateY(-50%); color: #98a2b3; z-index: 2; pointer-events: none; }
.press-wizard-field .persian-date-picker .form-control { padding-inline-start: 40px; text-align: center; }

/* فیلدهای ساعت: انتخابگر ساعت مرورگر با چیدمان چپ‌به‌راست */
.press-wizard-field .press-time-input { direction: ltr; text-align: center; font-variant-numeric: tabular-nums; letter-spacing: .5px; }
.press-wizard-field .press-time-input::-webkit-calendar-picker-indicator { cursor: pointer; opacity: .55; }
.press-wizard-field .press-time-input::-webkit-calendar-picker-indicator:hover { opacity: 1; }

/* برچسب و راهنمای خاکستری در بخش ضایعات و متغیرها */
.press-wizard-field--muted > label { color: #98a2b3; font-weight: 700; }
.press-wizard-field--muted .form-control::placeholder { color: #b6bfcd; font-weight: 500; }
.press-wizard-field--muted .form-control { color: #5b6b84; }

/* ------------------------------------------------------------------
   لیست‌های بازشو (شماره تولید / پرسنل)
   قاعدهٔ عمومی فیلدها پدینگ ویژهٔ آیکن‌ها را پاک می‌کرد و باعث می‌شد
   آیکن جست‌وجو و دکمهٔ بازکردن لیست روی متن بیفتند. اینجا جای هر دو
   رزرو می‌شود و رنگ متن صریحاً مشکی می‌ماند تا در هر پوسته‌ای خوانا باشد.
   آیکن جست‌وجو سمت راست (شروع در RTL) و دکمهٔ لیست سمت چپ است، پس
   پدینگ فیزیکی نوشته می‌شود تا با جای واقعی آیکن‌ها هم‌خوان بماند.
   ------------------------------------------------------------------ */
.press-wizard-field .production-order-lookup .form-control {
    padding-top: 11px;
    padding-bottom: 11px;
    padding-right: 44px;
    padding-left: 48px;
    color: #101828;
    background-color: #fcfdff;
    -webkit-text-fill-color: #101828;
    caret-color: #101828;
    font-size: 13px;
    font-weight: 700;
}
.press-wizard-field .production-order-lookup .form-control:focus {
    background-color: #fff;
    -webkit-text-fill-color: #101828;
}
.press-wizard-field .production-order-lookup .form-control::placeholder {
    color: #98a2b3;
    -webkit-text-fill-color: #98a2b3;
    font-weight: 500;
}
/* شماره تولید لاتین است و چپ‌به‌راست می‌ماند */
.press-wizard-field .production-order-lookup .form-control[dir="ltr"] { direction: ltr; text-align: center; }
/* نام پرسنل فارسی است و راست‌به‌چپ می‌ماند */
.press-wizard-field .production-order-lookup .form-control[dir="rtl"] { direction: rtl; text-align: right; }
.press-wizard-field .production-order-lookup > i { pointer-events: none; }
.press-wizard-field .production-order-lookup .production-lookup-toggle { color: #475467; background: transparent; }
.press-wizard-field .production-order-lookup .production-lookup-toggle:hover { color: #1d4291; background: #eef3fb; }

/* محتوای لیست بازشو: پنل ویزارد همیشه پس‌زمینهٔ سفید دارد، پس رنگ
   متن صریحاً تیره می‌شود تا در هر پوسته‌ای خوانا بماند و با متغیرهای
   تیرهٔ قالب که رنگ متن را کم‌رنگ می‌کنند درگیر نشود. */
.press-wizard .production-lookup-menu { color: #101828; background: #ffffff; border-color: #d6dce5; }
.press-wizard .production-lookup-menu-head { color: #667085; }
.press-wizard .production-lookup-menu-empty { color: #667085; }
.press-wizard .production-lookup-item { color: #101828; }
.press-wizard .production-lookup-item-copy strong { color: #101828; font-weight: 700; }
.press-wizard .production-lookup-item-copy small { color: #5b6b84; }
.press-wizard .production-lookup-item:hover,
.press-wizard .production-lookup-item:focus { background: #eef4ff; }
.press-wizard .production-lookup-item.is-exact-match { background: #e7efff; border-color: #b9cdf5; }
.press-wizard .production-lookup-item.is-exact-match .production-lookup-item-icon { color: #ffffff; background: #2563eb; }
.press-wizard .production-lookup-item-line { color: #1d4ed8; background: #e7efff; }
.press-wizard .production-lookup-item mark { color: #101828; background: #fde68a; }

/* انتخاب پرس: محتوا دقیقاً وسط فیلد می‌نشیند و با فلش بومی برخورد نمی‌کند.
   پدینگ چپ و راست هم‌اندازه است تا مرکز متن با مرکز خود فیلد منطبق شود. */
.press-wizard-field .form-select[name="press_device"],
.press-wizard-field .form-select[name="shift"] {
    padding-top: 11px;
    padding-bottom: 11px;
    padding-right: 42px;
    padding-left: 42px;
    color: #101828;
    background-color: #fcfdff;
    -webkit-text-fill-color: #101828;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
}
.press-wizard-field .form-select[name="press_device"]:focus,
.press-wizard-field .form-select[name="shift"]:focus {
    background-color: #fff;
    -webkit-text-fill-color: #101828;
}
.press-wizard-field .form-select[name="press_device"] option,
.press-wizard-field .form-select[name="shift"] option { color: #101828; background-color: #fff; }

/* نشان دانسیته و شماره نمونه */
.press-density-badge {
    display: inline-block; align-self: flex-start; padding: 3px 9px; border-radius: 999px;
    background: #f1f5fb; color: #667085; font-size: 10px; font-weight: 800; line-height: 1.7;
}
.press-density-badge.is-ready { background: rgba(18, 183, 106, .12); color: #087443; }
.press-density-badge.is-error { background: rgba(217, 45, 32, .1); color: #b42318; }

/* جدول‌های تکرارشونده */
.press-wizard-repeat { margin-top: 22px; border: 1px solid #e4e9f2; border-radius: 16px; overflow: hidden; background: #fcfdff; }
.press-wizard-repeat-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 16px; background: #f4f7fc; border-bottom: 1px solid #e4e9f2; }
.press-wizard-repeat-head h3 { display: flex; align-items: center; gap: 9px; margin: 0; font-size: 14px; font-weight: 900; color: #16243d; }
.press-wizard-repeat-head h3 i { color: #2a90c9; font-size: 17px; }
.press-wizard-repeat-body { display: flex; flex-direction: column; gap: 12px; padding: 16px; }
.press-wizard-repeat-empty { margin: 0; padding: 22px 10px; text-align: center; font-size: 13px; color: #98a2b3; }

.press-wizard-repeat-row {
    /* نشان شمارهٔ ردیف و دکمهٔ حذف با inset-inline-start روی «شروع» سمت
       چیده می‌شوند؛ در RTL یعنی سمت راست. رزرو فضا هم باید همان‌جا باشد،
       وگرنه نشان و دکمهٔ حذف روی اولین فیلد ردیف می‌افتند. */
    position: relative; display: grid; gap: 12px;
    padding-block: 15px;
    padding-inline-start: 46px;
    padding-inline-end: 16px;
    border: 1px solid #e8edf6; border-radius: 14px; background: #fff;
}
.press-wizard-repeat-row.is-stop { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.press-wizard-repeat-row:not(.is-stop) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.press-wizard-repeat-badge {
    position: absolute; inset-inline-start: 12px; top: 15px;
    display: grid; place-items: center; width: 26px; height: 26px;
    border-radius: 9px; background: #e8effb; color: #2859aa; font-size: 11px; font-weight: 900;
}
.press-wizard-repeat-row .is-wide { grid-column: 1 / -1; }
.press-wizard-units-field { grid-column: 1 / -1; }
.press-wizard-units { display: flex; flex-wrap: wrap; gap: 8px; }
.press-wizard-unit { display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border: 1px solid #dde3ee; border-radius: 11px; background: #fcfdff; cursor: pointer; font-size: 12px; font-weight: 700; color: #475467; transition: .16s ease; }
.press-wizard-unit:hover { border-color: #b9d6f7; background: #f2f7fd; }
.press-wizard-unit input { width: 16px; height: 16px; margin: 0; accent-color: #2859aa; cursor: inherit; }
.press-wizard-unit:has(input:checked) { background: #e8f1fd; border-color: #2a90c9; color: #1d4291; }

.press-wizard-row-remove {
    position: absolute; inset-inline-start: 12px; bottom: 12px;
    display: grid; place-items: center; width: 30px; height: 30px;
    border: 1px solid #fecdca; border-radius: 9px; background: #fff1f0; color: #b42318;
    cursor: pointer; font-size: 14px; transition: .16s ease;
}
.press-wizard-row-remove:hover { background: #fee4e2; border-color: #fda29b; }

/* خلاصه مرحله آخر */
.press-wizard-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.press-wizard-summary-block { padding: 15px 16px; border: 1px solid #e8edf6; border-radius: 15px; background: #fcfdff; }
.press-wizard-summary-block h3 { margin: 0 0 11px; font-size: 13px; font-weight: 900; color: #2859aa; }
.press-wizard-summary-block dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; margin: 0; }
.press-wizard-summary-block dl > div { display: flex; justify-content: space-between; gap: 8px; padding-bottom: 6px; border-bottom: 1px dashed #eef1f7; }
.press-wizard-summary-block dt { margin: 0; font-size: 11px; font-weight: 700; color: #667085; }
.press-wizard-summary-block dd { margin: 0; font-size: 11px; font-weight: 800; color: #16243d; text-align: end; word-break: break-word; }

/* جدول‌های پیش‌نمایش مرحلهٔ آخر */
.press-wizard-summary-block { grid-column: 1 / -1; }
.press-wizard-preview-scroll { overflow-x: auto; border: 1px solid #eef1f7; border-radius: 12px; }
.press-wizard-preview-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.press-wizard-preview-table th,
.press-wizard-preview-table td { padding: 7px 10px; border-bottom: 1px solid #f1f4f9; text-align: right; white-space: nowrap; }
.press-wizard-preview-table th { background: #f4f7fc; color: #475467; font-weight: 800; position: sticky; top: 0; }
.press-wizard-preview-table td { color: #16243d; font-weight: 600; }
.press-wizard-preview-table tbody tr:last-child td { border-bottom: 0; }
.press-wizard-preview-table tbody tr:hover td { background: #f8fafd; }
.press-wizard-preview-empty { margin: 0; padding: 10px 12px; border: 1px dashed #e4e9f2; border-radius: 12px; background: #fbfcfe; color: #98a2b3; font-size: 11px; font-weight: 600; text-align: center; }

.press-wizard-final { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 22px; padding: 18px; border-radius: 16px; background: #f4f7fc; border: 1px solid #e4e9f2; }
.press-wizard-final-note { display: flex; gap: 10px; align-items: flex-start; font-size: 12px; line-height: 1.9; color: #475467; max-width: 620px; }
.press-wizard-final-note i { color: #2a90c9; font-size: 17px; margin-top: 3px; }
.press-production-number { color: #2859aa; font-weight: 900; }

/* دکمه‌ها */
.press-wizard-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border: 1px solid transparent; border-radius: 13px; font-size: 13px; font-weight: 800; cursor: pointer; font-family: inherit; transition: .16s ease; }
.press-wizard-btn.primary { background: #246cb0; color: #fff; box-shadow: 0 4px 12px rgba(36, 108, 176, .28); }
.press-wizard-btn.primary:hover { background: #1d5490; }
.press-wizard-btn.ghost { background: #fff; border-color: #d0d5dd; color: #344054; }
.press-wizard-btn.ghost:hover { background: #f9fafb; }
.press-wizard-btn.sm { min-height: 38px; padding: 0 14px; font-size: 12px; }
.press-wizard-btn.lg { min-height: 52px; padding: 0 28px; font-size: 14px; }
.press-wizard-btn:disabled { opacity: .5; cursor: not-allowed; }

.press-wizard-nav { position: sticky; bottom: 0; z-index: 38; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 20px; border-radius: 18px; background: rgba(255, 255, 255, .97); backdrop-filter: blur(10px); border: 1px solid #e4e9f2; box-shadow: 0 -6px 20px rgba(16, 40, 80, .08); }
.press-wizard-nav-count { font-size: 12px; font-weight: 800; color: #667085; }

@media (max-width: 1200px) {
    .press-wizard-grid.cols-5, .press-wizard-grid.cols-4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .press-wizard-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
    .press-wizard-grid, .press-wizard-grid.cols-3, .press-wizard-grid.cols-4, .press-wizard-grid.cols-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .press-wizard-repeat-row, .press-wizard-repeat-row.is-stop { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .press-wizard-summary { grid-template-columns: 1fr; }
    .press-wizard-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
    .press-wizard-grid, .press-wizard-grid.cols-3, .press-wizard-grid.cols-4, .press-wizard-grid.cols-5,
    .press-wizard-repeat-row, .press-wizard-repeat-row.is-stop { grid-template-columns: 1fr; }
    .press-wizard-panel { padding: 18px 16px; }
}

/* ==================================================================
   ریسپانسیو - فهرست گزارشات پرس
   ================================================================== */

/* تبلت: کمی فشرده‌تر */
@media (max-width: 1200px) {
    .press-reports-table-wrap .panel-table th,
    .press-reports-table-wrap .panel-table td { padding-inline: 10px; }
    .press-reports-filter-form { gap: 12px; }
}

/* موبایل و تبلت کوچک: هر ردیف جدول به کارت مستقل تبدیل می‌شود */
@media (max-width: 991.98px) {
    .press-reports-filter-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .press-reports-filter-form .stops-filter-search,
    .press-reports-filter-form .stops-filter-actions { grid-column: 1 / -1; }

    .press-results-panel .page-toolbar { flex-wrap: wrap; gap: 10px; }
    .press-results-panel .stops-results-title { min-width: 0; }
    .press-results-panel .stops-results-title strong { font-size: 14px; }
    .press-results-panel .stops-results-title small { font-size: 11px; }

    /* اسکرول افقی جدول غیرفعال و هر ردیف کارت می‌شود */
    .press-reports-table-wrap { overflow-x: visible; -webkit-overflow-scrolling: auto; }
    .press-reports-table,
    .press-reports-table tbody,
    .press-reports-table tr,
    .press-reports-table td { display: block; width: 100%; }

    .press-reports-table thead { display: none; }

    .press-reports-table tbody tr {
        margin: 0 0 14px;
        padding: 6px 14px;
        border: 1px solid var(--border);
        border-radius: 16px;
        background: var(--surface);
        box-shadow: 0 2px 10px rgba(16, 40, 80, .06);
    }

    .press-reports-table tbody tr:hover { background: var(--surface); }

    .press-reports-table td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        padding: 11px 0;
        border-bottom: 1px dashed var(--border);
        text-align: start;
    }

    .press-reports-table td:last-child { border-bottom: 0; }

    .press-reports-table td::before {
        content: attr(data-label);
        flex: 0 0 auto;
        font-size: 11px;
        font-weight: 800;
        color: var(--muted);
    }

    /* سلول‌هایی که برچسب تکراری می‌سازند یا باید تمام‌عرض باشند */
    .press-reports-table td[colspan] { display: block; padding: 10px 0; }
    .press-reports-table td[data-label="دستگاه / شیفت"]::before,
    .press-reports-table td[data-label="وضعیت"]::before { display: none; }
    .press-reports-table td[data-label="دستگاه / شیفت"],
    .press-reports-table td[data-label="وضعیت"] { justify-content: flex-start; }

    .press-reports-table .press-report-actions-cell { flex-direction: column; align-items: stretch; gap: 10px; }
    .press-reports-table .press-report-actions-cell::before { display: none; }
    .press-reports-table .press-report-actions { flex-wrap: wrap; width: 100%; gap: 8px; }
    .press-reports-table .press-report-actions .press-report-action { flex: 1 1 auto; min-width: 88px; }

    .press-reports-table .press-report-archive-cell { align-items: flex-start; flex-direction: column; gap: 6px; }
    .press-reports-table .report-archive-control { min-width: 0; width: 100%; justify-content: flex-start; }
    .press-reports-table .report-archive-message { max-width: none; }
    .press-reports-table .press-device-cell { padding: 4px 0; }
}

/* موبایل کوچک */
@media (max-width: 575.98px) {
    .press-reports-filter-form { grid-template-columns: 1fr; }
    .press-reports-filter-form .stops-filter-field,
    .press-reports-filter-form .stops-filter-search,
    .press-reports-filter-form .stops-filter-actions { grid-column: 1 / -1; max-width: none; }
    .press-reports-filter-form .stops-filter-actions { flex-wrap: wrap; }

    .press-reports-table tbody tr { padding: 4px 12px; border-radius: 14px; }
    .press-reports-table td { gap: 10px; font-size: 13px; }
    .press-reports-table td::before { font-size: 10.5px; }

    .press-reports-table .press-report-actions .press-report-action { min-width: 0; padding: 0 8px; gap: 5px; }
    .press-reports-table .press-report-actions .press-report-action i { font-size: 17px; }
}

/* مودال حذف روی صفحه‌های کوچک */
@media (max-width: 575.98px) {
    .press-delete-modal .modal-dialog { margin: .5rem; }
    .press-delete-modal .modal-content { border-radius: 16px; }
    .press-delete-head { padding: 16px; gap: 11px; }
    .press-delete-icon { width: 40px; height: 40px; flex: 0 0 40px; font-size: 21px; border-radius: 12px; }
    .press-delete-modal .modal-body { padding: 16px; }
    .press-delete-modal .modal-footer { padding: 14px 16px; flex-direction: column-reverse; }
    .press-delete-modal .modal-footer .press-delete-btn { width: 100%; justify-content: center; }
    .press-delete-list { padding: 12px; gap: 8px; }
    .press-delete-list li { font-size: 12px; }
}

/* ==================================================================
   ریسپانسیو - ویزارد ویرایش گزارش پرس
   ================================================================== */

@media (max-width: 991.98px) {
    .press-wizard-grid.cols-3,
    .press-wizard-grid.cols-4,
    .press-wizard-grid.cols-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .press-wizard-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .press-wizard-summary-block dl { grid-template-columns: 1fr; }
    .press-wizard-summary { grid-template-columns: 1fr; }

    /* نوار بالای صفحه نباید سرریز کند */
    .press-wizard-bar { padding: 13px 15px; }
    .press-wizard-bar-main { gap: 10px; }
    .press-wizard-bar-divider { display: none; }
    .press-wizard-bar-title strong { font-size: 14px; }
    .press-wizard-bar-actions { gap: 8px; width: 100%; }
    .press-wizard-bar-actions .press-wizard-btn { flex: 1 1 auto; }
}

@media (max-width: 767.98px) {
    .press-wizard { gap: 13px; }
    .press-wizard-bar { position: static; border-radius: 14px; }
    .press-wizard-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 10px; }
    .press-wizard-step { padding: 9px 8px; font-size: 12px; }
    .press-wizard-step-index { width: 24px; height: 24px; font-size: 11px; }
    .press-wizard-panel { padding: 16px 14px; border-radius: 14px; }
    .press-wizard-panel-head { margin-bottom: 15px; padding-bottom: 13px; }
    .press-wizard-panel-head h2 { font-size: 16px; }
    .press-wizard-panel-head p { font-size: 12px; }
    .press-wizard-field textarea.form-control { min-height: 92px; }
    .press-wizard-repeat { border-radius: 13px; }
    .press-wizard-repeat-head { padding: 12px; }
    .press-wizard-repeat-body { padding: 12px; gap: 10px; }
    .press-wizard-final { padding: 14px; }

    /* ناوبری پایین صفحه: دکمه‌ها تمام‌عرض */
    .press-wizard-nav { padding: 10px 12px; border-radius: 14px; gap: 10px; flex-wrap: wrap; }
    .press-wizard-nav .press-wizard-btn { flex: 1 1 100%; min-height: 48px; }
    .press-wizard-nav-count { width: 100%; text-align: center; order: 3; }
}

@media (max-width: 575.98px) {
    .press-wizard-grid,
    .press-wizard-grid.cols-3,
    .press-wizard-grid.cols-4,
    .press-wizard-grid.cols-5 { grid-template-columns: 1fr; }
    .press-wizard-repeat-row,
    .press-wizard-repeat-row.is-stop { grid-template-columns: 1fr; }
    .press-wizard-steps { grid-template-columns: 1fr; }
    .press-wizard-step-label { font-size: 12.5px; }
    .press-wizard-back { padding: 8px 11px; font-size: 12px; }
    .press-wizard-btn { min-height: 44px; }
    .press-wizard-unit { padding: 7px 11px; font-size: 11.5px; }
    .press-wizard-summary-block dl { gap: 7px; }
}

/* روی صفحه‌های بسیار باریک، ستون‌های عددی جدول‌های تکرارشونده
   باید سرریز نکنند */
@media (max-width: 420px) {
    .press-wizard-field .form-control,
    .press-wizard-field .form-select { font-size: 15px; }
    .press-wizard-final { flex-direction: column; align-items: stretch; }
    .press-wizard-final .press-wizard-btn { width: 100%; }
}

/* Searchable production-number picker. */
.plan-number-picker { width:520px; max-width:calc(100vw - 24px); max-height:calc(100dvh - 32px); padding:0; border:1px solid var(--border); border-radius:20px; background:var(--card,#fff); color:var(--ink); box-shadow:0 24px 80px #10182840; overflow:auto; }
.plan-number-picker::backdrop { background:#10182880; backdrop-filter:blur(3px); }
.plan-picker-head { display:flex; align-items:center; gap:12px; padding:20px; border-bottom:1px solid var(--border); }
.plan-picker-icon { display:grid; place-items:center; width:42px; height:42px; flex-shrink:0; border-radius:13px; background:#3b82f615; color:#3b82f6; font-size:20px; }
.plan-picker-head h2 { font-size:17px; margin:0 0 5px; font-weight:800; }
.plan-picker-head p { font-size:11px; margin:0; color:var(--muted); line-height:1.8; }
.plan-picker-close { margin-inline-start:auto; border:0; background:transparent; color:var(--muted); min-width:36px; height:36px; border-radius:9px; }
.plan-picker-body { padding:18px 20px; }
.plan-picker-body > label { font-size:12px; font-weight:600; margin-bottom:8px; }
.plan-picker-search { display:flex; align-items:center; gap:10px; border:1px solid var(--border); border-radius:12px; padding:0 12px; background:var(--surface); }
.plan-picker-search:focus-within { border-color:#3b82f6; box-shadow:0 0 0 3px #3b82f61a; }
.plan-picker-search > i { color:#3b82f6; }
.plan-picker-search input { width:100%; min-width:0; min-height:48px; border:0; outline:0; background:transparent; color:var(--ink); font:inherit; font-size:13px; }
.plan-picker-search button { border:0; background:transparent; color:var(--muted); font-size:22px; padding:4px 8px; }
.plan-picker-meta { display:flex; justify-content:space-between; gap:8px; color:var(--muted); font-size:10px; margin:12px 0 8px; }
.plan-picker-options { max-height:260px; overflow-y:auto; overscroll-behavior:contain; scrollbar-width:thin; border:1px solid var(--border); border-radius:12px; }
.plan-picker-option { padding:12px 14px; cursor:pointer; border-bottom:1px solid var(--border); }
.plan-picker-option:last-child { border-bottom:0; }
.plan-picker-option:hover, .plan-picker-option.is-active, .plan-picker-option[aria-selected="true"] { background:color-mix(in srgb,#3b82f6 9%,var(--card)); }
.plan-picker-option-top { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.plan-picker-option strong { font-size:14px; font-variant-numeric:tabular-nums; }
.plan-picker-option small { display:block; color:var(--muted); font-size:11px; margin-top:5px; line-height:1.9; overflow-wrap:anywhere; }
.plan-picker-status { padding:2px 8px; border-radius:999px; background:color-mix(in srgb,var(--muted) 10%,var(--card)); color:var(--muted); font-size:10px; }
.plan-picker-status.is-visible { background:color-mix(in srgb,#10b981 12%,var(--card)); color:var(--ink); }
.plan-picker-help, .plan-picker-empty { font-size:11px; line-height:1.9; color:var(--muted); margin:12px 0 0; }
.plan-picker-empty { padding:15px; margin:0; }
.plan-picker-footer { display:flex; gap:10px; padding:16px 20px; border-top:1px solid var(--border); }
.plan-picker-footer .btn { min-height:44px; border-radius:10px; font-size:12px; }
.plan-picker-footer .btn-primary { flex:1; }
.plan-number-picker button:focus-visible { outline:3px solid #3b82f6; outline-offset:2px; }
@media(max-width:480px) { .plan-picker-head,.plan-picker-body { padding:16px; } .plan-picker-head h2 { font-size:15px; } .plan-picker-meta > span:last-child { display:none; } .plan-picker-options { max-height:32dvh; } }

/* Premium production-number picker: branded, card-based and touch friendly. */
.plan-number-picker { width:620px; border:0; border-radius:24px; background:var(--card,#fff); box-shadow:0 30px 100px #0b1f3a55; }
.plan-number-picker::backdrop { background:linear-gradient(135deg,#081a33cc,#254e8588); backdrop-filter:blur(6px); }
.plan-picker-head { position:relative; padding:22px 24px 20px; border:0; color:#fff; background:linear-gradient(135deg,#0f4c81,#2377bf 58%,#08a6bb); overflow:hidden; }
.plan-picker-head::after { content:""; position:absolute; width:180px; height:180px; left:-45px; top:-90px; border-radius:50%; background:#ffffff14; }
.plan-picker-icon { position:relative; z-index:1; width:48px; height:48px; border:1px solid #ffffff44; background:#ffffff1e; color:#fff; box-shadow:0 8px 20px #082b4d30; }
.plan-picker-head h2 { position:relative; z-index:1; font-size:18px; letter-spacing:-.2px; }
.plan-picker-head p { position:relative; z-index:1; color:#e7f4ff; font-size:11px; }
.plan-picker-close { position:relative; z-index:2; color:#fff; background:#ffffff18; border:1px solid #ffffff38; }
.plan-picker-close:hover { background:#ffffff2e; }
.plan-picker-body { padding:20px 24px 14px; background:var(--card); }
.plan-picker-body > label { display:block; color:var(--ink); font-size:12px; margin-bottom:9px; }
.plan-picker-search { min-height:56px; border:2px solid color-mix(in srgb,#2377bf 25%,var(--border)); border-radius:15px; padding:0 15px; background:color-mix(in srgb,#2377bf 3%,var(--surface)); box-shadow:0 7px 20px #2377bf0d; }
.plan-picker-search:focus-within { border-color:#2377bf; box-shadow:0 0 0 4px #2377bf18,0 8px 24px #2377bf16; }
.plan-picker-search > i { font-size:18px; color:#2377bf; }
.plan-picker-search input { min-height:52px; font-size:14px; }
.plan-picker-meta { margin:14px 2px 9px; font-size:10px; }
.plan-picker-meta [data-count] { color:#2377bf; font-weight:800; }
.plan-picker-options { max-height:310px; border:0; border-radius:15px; background:color-mix(in srgb,var(--muted) 4%,var(--card)); padding:4px; }
.plan-picker-option { margin:3px 0; border:1px solid transparent; border-radius:12px; padding:13px 14px; background:var(--card); box-shadow:0 2px 8px #102a4308; transition:transform .15s ease,box-shadow .15s ease,border-color .15s ease; }
.plan-picker-option:hover, .plan-picker-option.is-active, .plan-picker-option[aria-selected="true"] { border-color:#50a5df; background:var(--card); transform:translateY(-1px); box-shadow:0 7px 18px #2377bf1c; }
.plan-picker-option-top { gap:12px; }
.plan-picker-option strong { display:inline-flex; align-items:center; gap:7px; color:#14538a; font-size:14px; }
.plan-picker-option strong::before { content:"#"; display:inline-grid; place-items:center; width:22px; height:22px; border-radius:7px; color:#2377bf; background:#2377bf12; font-size:11px; }
.plan-picker-option small { font-size:11px; padding-inline-start:29px; }
.plan-picker-status { font-size:9px; font-weight:700; }
.plan-picker-status.is-visible { color:#087f62; background:#10b98118; }
.plan-picker-help { padding:9px 11px; border-radius:9px; background:color-mix(in srgb,#f59e0b 8%,var(--card)); color:var(--muted); }
.plan-picker-empty { margin:6px 0; border:1px dashed var(--border); border-radius:12px; background:var(--card); text-align:center; }
.plan-picker-footer { padding:15px 24px 20px; background:var(--card); border:0; }
.plan-picker-footer .btn { min-height:46px; border-radius:12px; font-weight:700; }
.plan-picker-footer .btn-primary { background:linear-gradient(135deg,#2377bf,#0b9db5); border-color:transparent; box-shadow:0 7px 16px #2377bf2e; }
.plan-picker-footer .btn-primary:hover { background:linear-gradient(135deg,#145a98,#087f91); }
@media(max-width:480px) { .plan-number-picker { border-radius:20px; } .plan-picker-head { padding:18px; } .plan-picker-body { padding:16px 18px 10px; } .plan-picker-footer { padding:12px 18px 18px; } }

/* Final dashboard-style minimal override for the production picker. */
.plan-number-picker { width:540px; border:1px solid var(--border); border-radius:18px; box-shadow:0 18px 55px #10182826; }
.plan-number-picker::backdrop { background:#10182866; backdrop-filter:blur(2px); }
.plan-picker-head { padding:17px 20px; color:var(--ink); background:var(--card); border-bottom:1px solid var(--border); }
.plan-picker-head::after { display:none; }
.plan-picker-icon { width:38px; height:38px; border:0; background:color-mix(in srgb,#3b82f6 10%,var(--card)); color:#3b82f6; box-shadow:none; font-size:17px; }
.plan-picker-head h2 { color:var(--ink); font-size:16px; margin-bottom:3px; }
.plan-picker-head p { color:var(--muted); font-size:10px; }
.plan-picker-close { color:var(--muted); background:transparent; border:1px solid var(--border); }
.plan-picker-close:hover { color:var(--ink); background:var(--surface); }
.plan-picker-body { padding:16px 20px 10px; }
.plan-picker-body > label { color:var(--muted); font-size:11px; font-weight:600; }
.plan-picker-search { min-height:46px; border:1px solid var(--border); border-radius:11px; padding:0 11px; background:var(--surface); box-shadow:none; }
.plan-picker-search:focus-within { border-color:#3b82f6; box-shadow:0 0 0 3px #3b82f615; }
.plan-picker-search > i { color:#3b82f6; font-size:15px; }
.plan-picker-search input { min-height:43px; font-size:12px; }
.plan-picker-meta { margin:11px 1px 7px; font-size:10px; }
.plan-picker-options { max-height:270px; padding:0; border:1px solid var(--border); border-radius:11px; background:var(--surface); }
.plan-picker-option { margin:0; padding:11px 12px; border:0; border-bottom:1px solid var(--border); border-radius:0; background:transparent; box-shadow:none; }
.plan-picker-option:last-child { border-bottom:0; }
.plan-picker-option:hover, .plan-picker-option.is-active, .plan-picker-option[aria-selected="true"] { transform:none; border-color:transparent; background:color-mix(in srgb,#3b82f6 6%,var(--card)); box-shadow:none; }
.plan-picker-option strong { color:var(--ink); font-size:12px; }
.plan-picker-option strong::before { width:19px; height:19px; border-radius:6px; color:#3b82f6; background:#3b82f610; font-size:10px; }
.plan-picker-option small { padding-inline-start:26px; font-size:10px; }
.plan-picker-status { padding:2px 7px; font-size:9px; }
.plan-picker-help { margin-top:9px; padding:7px 9px; border-radius:8px; background:var(--surface); font-size:10px; }
.plan-picker-footer { gap:8px; padding:12px 20px 16px; border-top:1px solid var(--border); }
.plan-picker-footer .btn { min-height:40px; border-radius:9px; font-size:11px; }
.plan-picker-footer .btn-primary { background:#3b82f6; box-shadow:none; }
.plan-picker-footer .btn-primary:hover { background:#2563eb; }

/* Full-page production order editing links. */
.production-document-button-add, .production-document-row-action { text-decoration:none; }
.production-document-row-action { display:inline-flex; align-items:center; justify-content:center; }

/* Production plan: disabled add action and responsive toolbar/table behavior. */
.production-document-button-add.is-disabled { opacity:.48; filter:grayscale(.35); cursor:not-allowed; pointer-events:none; background:var(--surface); color:var(--muted); border-color:var(--border); box-shadow:none; }
.production-document-button-add.is-disabled:hover { transform:none; }
.production-document-scroll { width:100%; max-width:100%; overflow-x:auto; overscroll-behavior-x:contain; scrollbar-width:thin; }
@media(max-width:991.98px) {
 .production-plan-document { width:100%; max-width:100%; }
 .production-document-toolbar-actions { width:100%; gap:10px; }
 .production-document-search { flex:1 1 220px; min-width:180px; }
 .production-document-visibility { display:flex; flex:1 1 100%; }
 .production-document-visibility a { flex:1; text-align:center; }
 .production-document-actions { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); width:100%; margin:0; }
 .production-document-actions > * { min-width:0; }
}
@media(max-width:575.98px) {
 .production-document-toolbar-copy { align-items:flex-start; }
 .production-document-toolbar-copy strong { font-size:14px; }
 .production-document-toolbar-copy small { font-size:10px; }
 .production-document-search { flex-basis:100%; }
 .production-document-actions { grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; }
 .production-document-actions .production-document-button { min-height:40px; padding-inline:6px; font-size:10px; }
 .production-document-actions .production-document-button-add { grid-column:1/-1; }
  .production-document-scroll { padding-inline:0; }
  .production-document { min-width:700px; }
}

/* ===== آواتار دایره‌ای همراه با تصویر کاربر ===== */
.user-avatar,
.account-dropdown-avatar,
.sidebar-avatar {
    border-radius: 50% !important;
    overflow: hidden;
}

.user-avatar img,
.account-dropdown-avatar img,
.sidebar-avatar img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    border-radius: 50%;
}

/* ===== مرکز اعلان‌ها (زنگوله): تأیید مرخصی و ورود اپراتور ===== */
.notification-count {
    position: absolute;
    top: 3px;
    left: 3px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    color: #fff;
    border-radius: 999px;
    background: var(--pink);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--surface) 92%, transparent);
    font-variant-numeric: tabular-nums;
}

.notification-count[hidden] { display: none !important; }

.notification-center .notification-panel {
    width: 384px;
    max-width: calc(100vw - 24px);
    padding: 0;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--border) 90%, transparent);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.notification-panel-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}

.notification-panel-icon {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: grid;
    place-items: center;
    color: var(--primary);
    border-radius: 10px;
    background: var(--primary-soft);
    font-size: 15px;
}

.notification-panel-heading {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.notification-panel-heading strong { font-size: 13px; font-weight: 800; color: var(--ink); }
.notification-panel-heading small { font-size: 11px; color: var(--muted); }

.notification-refresh {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    display: grid;
    place-items: center;
    color: var(--muted);
    border: 1px solid color-mix(in srgb, var(--border) 88%, transparent);
    border-radius: 9px;
    background: transparent;
    transition: color .18s ease, border-color .18s ease;
}

.notification-refresh:hover { color: var(--primary); border-color: color-mix(in srgb, var(--primary) 28%, var(--border)); }
.notification-refresh.is-spinning i { animation: notification-spin .8s linear infinite; }

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

.notification-tabs {
    display: flex;
    gap: 6px;
    padding: 10px 12px;
    border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}

.notification-tab {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 10px;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--muted);
    border: 1px solid transparent;
    border-radius: 10px;
    background: color-mix(in srgb, var(--background) 70%, transparent);
    transition: color .18s ease, background .18s ease, border-color .18s ease;
}

.notification-tab.is-active {
    color: var(--primary);
    border-color: color-mix(in srgb, var(--primary) 28%, var(--border));
    background: var(--primary-soft);
}

.notification-tab-count {
    min-width: 17px;
    height: 17px;
    padding: 0 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 800;
    color: #fff;
    border-radius: 999px;
    background: var(--pink);
}

.notification-tab-count[hidden] { display: none !important; }

.notification-body {
    max-height: 430px;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notification-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 34px 16px;
    text-align: center;
    color: var(--muted);
    font-size: 12px;
}

.notification-state i { font-size: 30px; color: color-mix(in srgb, var(--green) 78%, var(--muted)); }
.notification-state strong { font-size: 12.5px; font-weight: 800; color: var(--ink); }
.notification-state.is-error i { color: var(--danger); }

.notification-spinner {
    width: 22px;
    height: 22px;
    border: 2.5px solid color-mix(in srgb, var(--primary) 25%, transparent);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: notification-spin .7s linear infinite;
}

.notification-card {
    padding: 12px;
    border: 1px solid color-mix(in srgb, var(--border) 85%, transparent);
    border-radius: 14px;
    background: var(--card);
    transition: border-color .18s ease, box-shadow .18s ease, opacity .18s ease;
}

.notification-card.is-busy { opacity: .6; }

.notification-card-head { display: flex; align-items: center; gap: 10px; }

.notification-avatar {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: grid;
    place-items: center;
    color: var(--primary);
    border-radius: 50%;
    overflow: hidden;
    background: var(--primary-soft);
    font-size: 14px;
    font-weight: 800;
}

.notification-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

.notification-identity { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.notification-name { font-size: 12.5px; font-weight: 800; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notification-meta { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.notification-time {
    flex: 0 0 auto;
    padding: 3px 8px;
    font-size: 10px;
    font-weight: 700;
    color: #b54708;
    border: 1px solid rgba(247, 144, 9, .3);
    border-radius: 999px;
    background: rgba(247, 144, 9, .1);
}

.notification-balance {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding: 7px 10px;
    font-size: 11px;
    color: var(--muted);
    border: 1px solid rgba(126, 86, 217, .18);
    border-radius: 10px;
    background: rgba(126, 86, 217, .07);
}

.notification-balance i { color: #7e56d9; }
.notification-balance strong { margin-inline-start: auto; font-size: 12px; font-weight: 800; color: #7e56d9; }

.notification-details { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

.notification-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 9px;
    font-size: 11px;
    font-weight: 600;
    color: color-mix(in srgb, var(--primary) 82%, var(--ink));
    border: 1px solid color-mix(in srgb, var(--primary) 20%, transparent);
    border-radius: 9px;
    background: var(--primary-soft);
}

.notification-chip i { font-size: 12px; }
.notification-chip.is-purple { color: #7e56d9; border-color: rgba(126, 86, 217, .2); background: rgba(126, 86, 217, .08); }

.notification-device { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 11px; color: var(--muted); }
.notification-device i { font-size: 13px; }

.notification-reason {
    margin-top: 8px;
    padding: 8px 10px;
    font-size: 11.5px;
    line-height: 1.8;
    color: color-mix(in srgb, var(--ink) 80%, var(--muted));
    border-radius: 10px;
    background: color-mix(in srgb, var(--ink) 4%, transparent);
}

.notification-actions { display: flex; gap: 8px; margin-top: 12px; }

.notification-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 12px;
    font-size: 12px;
    font-weight: 700;
    border: 1px solid transparent;
    border-radius: 10px;
    transition: filter .18s ease, background .18s ease, border-color .18s ease;
}

.notification-btn:disabled { opacity: .55; cursor: not-allowed; }
.notification-btn.approve { color: #fff; background: #12b76a; }
.notification-btn.approve:hover:not(:disabled) { filter: brightness(.95); }
.notification-btn.reject { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, transparent); background: transparent; }
.notification-btn.reject:hover:not(:disabled) { background: color-mix(in srgb, var(--danger) 10%, transparent); }

.notification-btn-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, .5);
    border-top-color: #fff;
    border-radius: 50%;
    animation: notification-spin .7s linear infinite;
}

.notification-btn.reject .notification-btn-spinner {
    border-color: color-mix(in srgb, var(--danger) 40%, transparent);
    border-top-color: var(--danger);
}

.notification-toast-layer {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.notification-toast {
    max-width: 320px;
    padding: 11px 14px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    border-radius: 12px;
    background: #12b76a;
    box-shadow: 0 12px 30px rgba(16, 24, 40, .2);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity .25s ease, transform .25s ease;
}

.notification-toast.is-error { background: var(--danger); }
.notification-toast.is-visible { opacity: 1; transform: translateY(0); }
