@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-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --primary: #ff6000;
    --primary-dark: #e55400;
    --bg: #f4f4f6;
    --card-bg: #ffffff;
    --border: #e7e7ec;
    --text: #24272c;
    --text-muted: #77797e;
    --success: #1fb35c;
    --danger: #e0242c;
    --radius: 10px;

    /* سیستم فاصله‌گذاری یکپارچه (مقیاس ۴ پیکسلی) — همه‌ی صفحات باید فقط از این متغیرها استفاده کنند */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;

    /* عرض یکسان محتوا برای همه‌ی صفحات (هدر و کانتینر اصلی) */
    --content-max-width: 1280px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
}

.topbar {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
}
.topbar-inner {
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: var(--space-4) var(--space-5);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.brand { font-weight: 700; font-size: 16px; color: var(--primary); text-decoration: none; }

.topbar-actions {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.container {
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: var(--space-5);
}

/* هدر صفحه: بک‌لینک (اختیاری) + عنوان، با فاصله‌ی یکسان تا شروع محتوا در همه‌ی صفحات.
   چون داخل همون .container قرار می‌گیرد، همیشه با گرید/کارت‌های پایین‌ترش هم‌تراز است. */
.page-header {
    margin-bottom: var(--space-5);
    width: 100%;
}
.back-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--text-muted);
    text-decoration: none;
    font-size: 13px;
}
.back-link:hover { color: var(--primary); }
.page-header .back-link {
    margin-bottom: var(--space-3);
}
.page-header .card-header-row {
    margin-bottom: 0;
}
.page-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}

/* چیدمان دوستونه (مثلاً پنل راننده) */
.grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-4);
}
/* فرم و جدول فقط روی نمایشگرهای عریض کنار هم می‌نشینند؛ در عرض‌های کمتر،
   جدول تمام‌عرض می‌شود تا اطلاعات بسته بدون اسکرول افقی قابل مشاهده بماند. */
@media (min-width: 1200px) {
    .grid {
        grid-template-columns: minmax(320px, 340px) minmax(0, 1fr);
        gap: var(--space-6);
        align-items: start;
    }
}

/* چند کارت زیر هم با فاصله‌ی یکسان (مثل صفحه‌ی پیگیری بسته) */
.stack {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--space-5);
    box-shadow: 0 1px 2px rgba(25, 28, 33, 0.04);
}
.card h3 { margin: 0 0 var(--space-4); font-size: 15px; }
.card-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-4);
}
.card-header-row h3 { margin: 0; }

/* کارت باریک (فرم‌های تک‌ستونه مثل ویرایش بسته) */
.card-narrow { max-width: 520px; }

/* کارت وسط‌چین (صفحات ورود/ثبت‌نام) */
.auth-card {
    max-width: 360px;
    margin: var(--space-8) auto;
}
.auth-card.auth-card-wide { max-width: 440px; }
.auth-card h2 { margin: 0 0 var(--space-4); }

a.auth-method-button,
a.auth-method-button:visited,
a.auth-method-button:hover,
a.auth-method-button:focus {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    text-decoration: none !important;
}
.auth-method-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-2);
    margin-top: var(--space-4);
}
.auth-method-actions .auth-method-button {
    min-width: 0;
    min-height: 42px;
    padding-inline: var(--space-2);
    font-size: 12.5px;
    white-space: nowrap;
}
.auth-method-button:hover {
    border-color: #ffc49f;
    background: #fff8f3;
    color: var(--primary);
}

.otp-auth-card { position: relative; max-width: 400px; }
.otp-auth-card h2 { text-align: center; }
.auth-back-button {
    position: absolute;
    top: var(--space-5);
    right: var(--space-5);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: #fff;
    color: var(--text-muted);
    text-decoration: none;
    transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.auth-back-button:hover {
    border-color: #ffc49f;
    background: #fff8f3;
    color: var(--primary);
    text-decoration: none;
}
.auth-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin: 0 auto var(--space-4);
    border-radius: 14px;
    background: #fff1e8;
    color: var(--primary);
}
.auth-hint-centered { margin: -6px 0 var(--space-5); text-align: center; }
.otp-code-input {
    direction: ltr;
    text-align: center;
    font-size: 21px !important;
    font-weight: 700;
    letter-spacing: 8px;
    padding-right: 20px !important;
}
.otp-timer {
    min-height: 36px;
    margin-top: var(--space-3);
    border: 1px solid #e3e6ea;
    border-radius: 8px;
    background: #f7f8fa;
    color: #6f757d;
    font-size: 12px;
    transition: opacity .3s ease, transform .3s ease, background .2s ease, border-color .2s ease;
}
.otp-timer[hidden] { display: none; }
.otp-timer-active {
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
}
.otp-timer-active[hidden] { display: none; }
.otp-timer-active > svg { color: #777e87; }
.otp-timer strong {
    min-width: 42px;
    color: #3f454d;
    direction: ltr;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    text-align: center;
}
.otp-expired-state {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    margin: var(--space-3) 0 0;
    color: #6f757d;
    font-size: 12.5px;
    font-weight: 400;
    text-align: center;
}
.otp-expired-state[hidden] { display: none; }
.otp-resend-form { display: none; }
.otp-resend-icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: #fff;
    color: var(--primary);
    box-shadow: 0 1px 3px rgba(35, 39, 44, .06);
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease, color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.otp-resend-icon-button:not(:disabled):hover {
    border-color: #ffc49f;
    background: #fff8f3;
    color: var(--primary);
    box-shadow: 0 4px 10px rgba(255, 96, 0, .12);
    transform: translateY(-1px);
}
.otp-resend-icon-button:not(:disabled):active { transform: translateY(0); }
.otp-resend-icon-button:disabled { cursor: not-allowed; opacity: .55; }

label {
    display: block;
    margin: var(--space-4) 0 var(--space-2);
    font-size: 13px;
    color: var(--text-muted);
}
form > label:first-child { margin-top: 0; }

input[type=text], input[type=password], input[type=tel], textarea, select {
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fbfbfc;
    font-family: inherit;
    font-size: 14px;
    color: var(--text);
}
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
}

.btn {
    display: inline-block;
    min-height: 42px;
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
    font-weight: 600;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-block { width: 100%; margin-top: 16px; }
.btn-ghost { background: transparent; color: var(--text-muted); border: 1px solid var(--border); }
.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #c22030; }
.btn:disabled {
    cursor: not-allowed;
    opacity: .55;
}

/* Icon-only action buttons (minimal, borderless, colored per action) */
.actions-cell { white-space: nowrap; }

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: #8a8d93;
    cursor: pointer;
    margin-left: 2px;
    text-decoration: none;
    vertical-align: middle;
    transition: background 0.12s ease, color 0.12s ease;
}
.icon-btn:hover { background: #f2f2f4; color: var(--primary); }

.icon-btn-success { color: var(--success); }
.icon-btn-success:hover { background: #e3f8ea; color: var(--success); }

.icon-btn-danger { color: var(--danger); }
.icon-btn-danger:hover { background: #fbe4e4; color: var(--danger); }

/* تولتیپ آیکون‌ها (ساخته‌شده توسط جاوااسکریپت، position:fixed تا هیچ‌وقت بریده نشود) */
.js-tooltip {
    position: fixed;
    background: #24272c;
    color: #fff;
    font-size: 11px;
    padding: 5px 9px;
    border-radius: 6px;
    white-space: nowrap;
    z-index: 9999;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.12s ease, transform 0.12s ease;
    pointer-events: none;
}
.js-tooltip-visible {
    opacity: 1;
    transform: translateY(0);
}
.btn-sm { min-height: 36px; padding: 6px 10px; font-size: 12px; }

.inline-form { display: inline; }

.table-wrap { width: 100%; }
.table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.table th, .table td {
    padding: 10px 8px;
    text-align: right;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    line-height: 20px;
    vertical-align: middle;
    overflow-wrap: anywhere;
}
.table th { color: var(--text-muted); font-weight: 600; }
.table th:last-child,
.table td:last-child { width: 136px; }
.table .status-cell { width: 200px; }
.table td:first-child { direction: ltr; unicode-bidi: plaintext; }
.empty { text-align: center; color: var(--text-muted); padding: 24px 0 !important; }

.badge {
    display: inline-block;
    white-space: nowrap;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    background: #eee;
    color: #555;
}
.badge-received { background: #fff2e0; color: #b56400; }
.badge-processing { background: #eee3fb; color: #7a3fd6; }
.badge-shipped { background: #e3edff; color: #2255c2; }
.badge-delivered { background: #e3f8ea; color: #1a8a4c; }
.badge-canceled { background: #fbe4e4; color: #c22626; }
.badge-unread { background: var(--primary); color: #fff; }

.notif-list { list-style: none; margin: 0; padding: 0; }
.notif {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}
.notif time { color: var(--text-muted); font-size: 11px; white-space: nowrap; }
.notif-unread { font-weight: 700; }

.messages { margin-bottom: 16px; }
.alert {
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 13px;
    animation: alert-fade-out 0.4s ease-in forwards;
    animation-delay: 3.5s;
}
@keyframes alert-fade-out {
    from { opacity: 1; max-height: 60px; margin-bottom: 8px; padding: 10px 14px; }
    to { opacity: 0; max-height: 0; margin-bottom: 0; padding: 0 14px; overflow: hidden; }
}
.alert-success { background: #e3f8ea; color: #1a8a4c; }
.alert-error { background: #fbe4e4; color: #c22626; }
.alert-info { background: #e8f1ff; color: #2255c2; }


.auth-hint {
    font-size: 12.5px;
    color: var(--text-muted);
    margin: -6px 0 14px;
    line-height: 1.7;
}
.auth-switch-link {
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 16px;
}
.auth-switch-link a { color: var(--primary); text-decoration: none; font-weight: 600; }
.auth-switch-link a:hover { text-decoration: underline; }
.form-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 18px 0 6px;
}

/* Package tracking page */
.tracking-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}
.tracking-code { font-size: 18px; font-weight: 700; direction: ltr; text-align: right; }
.tracking-store { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.tracking-badge { font-size: 12px; padding: 5px 12px; }

.tracking-steps { list-style: none; margin: 0; padding: 0; }
.tracking-step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding-bottom: 20px;
    position: relative;
}
.tracking-step:not(:last-child)::before {
    content: "";
    position: absolute;
    right: 5px;
    top: 16px;
    bottom: -4px;
    width: 2px;
    background: var(--border);
}
.tracking-step-done:not(:last-child)::before { background: var(--primary); }
.tracking-step-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--border);
    flex-shrink: 0;
    margin-top: 3px;
}
.tracking-step-done .tracking-step-dot { background: var(--primary); }
.tracking-step-title { font-size: 13.5px; font-weight: 600; }
.tracking-step-time { font-size: 11px; color: var(--text-muted); }

.tracking-canceled-banner {
    background: #fbe4e4;
    color: #c22626;
    border-radius: 8px;
    padding: 14px 16px;
    font-size: 13.5px;
    font-weight: 600;
    text-align: center;
}
.tracking-canceled-banner span { font-weight: 400; color: #a51e1e; margin-right: 6px; }

.tracking-details-card .detail-list { margin: 0; }
.detail-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}
.detail-row:last-child { border-bottom: none; }
.detail-row dt { color: var(--text-muted); flex: 0 0 auto; }
.detail-row dd { margin: 0; font-weight: 600; text-align: left; }
.ltr-text { direction: ltr; unicode-bidi: embed; }

/* Profile menu */
.profile-menu { position: relative; }

.profile-icon-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    padding: 4px;
    margin: 0;
    cursor: pointer;
    color: var(--text);
}
.profile-icon-btn:hover { color: var(--primary); }
.profile-menu.open .profile-icon-btn { color: var(--primary); }

.profile-caret { color: var(--text-muted); transition: transform 0.15s ease; }
.profile-menu.open .profile-caret { transform: rotate(180deg); color: var(--primary); }

.profile-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    min-width: 240px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.10);
    padding: 6px 0;
    z-index: 20;
    overflow: hidden;
}
.profile-menu.open .profile-dropdown { display: block; }

.profile-dropdown-header {
    padding: 14px 18px;
    font-weight: 700;
    font-size: 14px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 4px;
}

.profile-dropdown form { margin: 0; }
.profile-dropdown-item {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-direction: row-reverse;
    gap: 12px;
    background: transparent;
    border: none;
    padding: 12px 18px;
    font-family: inherit;
    font-size: 13.5px;
    text-align: right;
    cursor: pointer;
    color: var(--text);
}
.profile-dropdown-item svg { flex-shrink: 0; color: var(--text-muted); }
.profile-dropdown-item:hover { background: var(--bg); }

/* Searchable combobox (store picker) */
.combobox { position: relative; }
.combobox-input {
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fbfbfc;
    font-family: inherit;
    font-size: 14px;
    color: var(--text);
}
.combobox-input:focus { outline: none; border-color: var(--primary); background: #fff; }

.combobox-list {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    left: 0;
    max-height: 240px;
    overflow-y: auto;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.10);
    z-index: 15;
    padding: 4px;
}
.combobox-list.open { display: block; }

.combobox-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
}
.combobox-option:hover { background: var(--bg); }
.combobox-option-name { font-weight: 600; }
.combobox-option-id { color: var(--text-muted); font-size: 11px; direction: ltr; }
.combobox-empty { padding: 12px; text-align: center; color: var(--text-muted); font-size: 13px; }

.field-error { color: var(--danger); font-size: 12px; margin-top: 4px; }
.field-hint { color: var(--text-muted); font-size: 11.5px; margin-top: 4px; line-height: 1.6; transition: color 0.15s ease; }
.field-hint-error { color: var(--danger); }
.field-hint-ok { color: var(--success); }

/* Password visibility toggle */
.password-field { position: relative; }
.password-field input {
    padding-left: 40px;
}
.password-toggle {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
}
.password-toggle:hover { color: var(--primary); }

/* Filter bar for package lists */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
}
.filter-search {
    flex: 1 1 200px;
    min-width: 160px;
    min-height: 36px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fbfbfc;
    font-family: inherit;
    font-size: 13px;
    color: var(--text);
}
.filter-search:focus { outline: none; border-color: var(--primary); background: #fff; }
.filter-status {
    width: auto;
    flex: 0 0 auto;
    min-height: 36px;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fbfbfc;
    font-family: inherit;
    font-size: 13px;
    color: var(--text);
}
.filter-bar .btn {
    flex: 0 0 auto;
    white-space: nowrap;
    min-height: 36px;
    padding: 8px 12px;
}
.filter-date {
    width: 118px;
    flex: 0 0 auto;
    min-height: 36px;
    padding: 8px 8px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fbfbfc;
    font-family: inherit;
    font-size: 12.5px;
    color: var(--text);
    direction: ltr;
    text-align: center;
}
.filter-date:focus { outline: none; border-color: var(--primary); background: #fff; }

.filter-break {
    display: none;
}

.date-range-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}
.date-range-group .filter-date { width: 118px; }
.date-range-sep { font-size: 12px; color: var(--text-muted); }

/* Bell / notifications */
.bell-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    color: var(--text);
    text-decoration: none;
    border-radius: 8px;
}
.bell-btn:hover { color: var(--primary); }

.bell-badge {
    position: absolute;
    top: -2px;
    left: -2px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--danger);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.notif-list { list-style: none; margin: 0; padding: 0; }

.notif-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 4px;
    border-bottom: 1px solid var(--border);
}
.notif-row:last-child { border-bottom: none; }
.notif-row-unread { background: #fff9f4; }

.notif-row-main { display: flex; align-items: flex-start; gap: 10px; }

.notif-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    margin-top: 6px;
    flex-shrink: 0;
    opacity: 0;
}
.notif-row-unread .notif-dot { opacity: 1; }

.notif-row-message { font-size: 13.5px; margin-bottom: 4px; }
.notif-row-time { font-size: 11px; color: var(--text-muted); }

/* Jalali calendar popup */
.jalali-cal-popup {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 25;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
    padding: 10px;
    width: 240px;
}
.jalali-cal-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 8px;
}
.jalali-cal-title {
    font-size: 13px;
    font-weight: 700;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text);
    padding: 4px 8px;
    border-radius: 6px;
    min-width: 110px;
    text-align: center;
}
.jalali-cal-title:hover { background: var(--bg); color: var(--primary); }
.jalali-cal-nav {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: var(--text-muted);
    padding: 2px 8px;
    border-radius: 6px;
    flex-shrink: 0;
}
.jalali-cal-nav:hover { background: var(--bg); color: var(--primary); }
.jalali-cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 10px;
    color: var(--text-muted);
    margin-bottom: 4px;
}
.jalali-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}
.jalali-cal-day {
    background: transparent;
    border: none;
    border-radius: 6px;
    padding: 6px 0;
    font-size: 12px;
    cursor: pointer;
    font-family: inherit;
    color: var(--text);
}
.jalali-cal-day:hover { background: var(--primary); color: #fff; }
.jalali-cal-today { font-weight: 700; color: var(--primary); }

.jalali-cal-grid-months, .jalali-cal-grid-years {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}
.jalali-cal-month-cell, .jalali-cal-year-cell {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 4px;
    font-size: 12px;
    cursor: pointer;
    font-family: inherit;
    color: var(--text);
}
.jalali-cal-month-cell:hover, .jalali-cal-year-cell:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.jalali-cal-month-cell.jalali-cal-today, .jalali-cal-year-cell.jalali-cal-today {
    border-color: var(--primary);
    color: var(--primary);
}

.jalali-cal-today-bar {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
    text-align: center;
}
.jalali-cal-today-btn {
    background: transparent;
    border: none;
    color: var(--primary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 6px;
    font-family: inherit;
}
.jalali-cal-today-btn:hover { background: var(--bg); }

@media (max-width: 799px) {
    .topbar-inner,
    .container {
        padding-right: var(--space-4);
        padding-left: var(--space-4);
    }

    .card { padding: var(--space-4); }

    .filter-search { flex-basis: 100%; }
    .filter-status { flex: 1 1 150px; }
    .date-range-group { width: 100%; }
    .date-range-group .filter-date { flex: 1 1 0; min-width: 0; }
    .filter-bar .btn { flex: 1 1 auto; }
}

@media (max-width: 640px) {
    /* جدول بسته‌های راننده روی موبایل به فهرست کارت‌مانند تبدیل می‌شود تا همه‌ی
       فیلدها، از جمله عملیات، بدون اسکرول افقی در همان صفحه دیده شوند. */
    .driver-package-table,
    .driver-package-table tbody,
    .driver-package-table tr,
    .driver-package-table td {
        display: block;
        width: 100%;
    }
    .driver-package-table { table-layout: auto; }
    .driver-package-table thead { display: none; }
    .driver-package-table tr {
        margin-bottom: var(--space-3);
        padding: var(--space-2) var(--space-3);
        border: 1px solid var(--border);
        border-radius: var(--radius);
        background: var(--card-bg);
    }
    .driver-package-table td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        gap: var(--space-3);
        padding: var(--space-2) 0;
        text-align: left;
    }
    .driver-package-table td::before {
        content: attr(data-label);
        flex: 0 0 auto;
        color: var(--text-muted);
        font-size: 12px;
        font-weight: 600;
        text-align: right;
    }
    .driver-package-table td.actions-cell {
        display: block;
        padding-bottom: 0;
    }
    .driver-package-table td.actions-cell::before { display: none; }
    .driver-package-table td.empty {
        display: block;
        text-align: center;
    }
}
