/* ==========================================================================
   آریا سرویس | Design System
   ========================================================================== */

@font-face {
    font-family: 'Shabnam';
    src: url('../fonts/Shabnam-Medium-FD.woff2') format('woff2'),
         url('../fonts/Shabnam-Medium-FD.woff') format('woff');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

:root {
    --font: 'Shabnam', 'Segoe UI', Tahoma, sans-serif;
    --bg: #f5f6fa;
    --surface: #ffffff;
    --surface-soft: #f9fafc;
    --surface-muted: #f3f5f9;
    --ink: #111827;
    --ink-soft: #344054;
    --muted: #667085;
    --muted-light: #98a2b3;
    --line: #e7eaf0;
    --line-soft: #f0f2f7;
    --primary: #3454f5;
    --primary-dark: #2742ce;
    --primary-soft: #eef1ff;
    --primary-ring: rgba(52, 84, 245, 0.16);
    --success: #0f9f6e;
    --success-soft: #e9f9f2;
    --warning: #d98a05;
    --warning-soft: #fff7e6;
    --danger: #e5484d;
    --danger-soft: #fff0f0;
    --violet: #7c5cfc;
    --violet-soft: #f2efff;
    --cyan: #0891b2;
    --cyan-soft: #e8f8fc;
    --sidebar-bg: #0f1728;
    --sidebar-bg-soft: #151f33;
    --sidebar-text: #c5cddd;
    --sidebar-muted: #7f8ba3;
    --sidebar-width: 276px;
    --radius-xs: 9px;
    --radius-sm: 12px;
    --radius: 17px;
    --radius-lg: 23px;
    --shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.04);
    --shadow-sm: 0 1px 3px rgba(16, 24, 40, 0.04), 0 5px 14px rgba(16, 24, 40, 0.03);
    --shadow-md: 0 4px 10px rgba(16, 24, 40, 0.04), 0 14px 35px rgba(16, 24, 40, 0.055);
    --shadow-lg: 0 24px 70px rgba(16, 24, 40, 0.14);
    --transition: 180ms cubic-bezier(0.4, 0, 0.2, 1);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font);
    background: var(--bg);
    color: var(--ink);
    font-size: 16px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--primary);
    text-decoration: none;
}

img {
    max-width: 100%;
    display: inline-block;
}

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

button {
    cursor: pointer;
}

::selection {
    background: #dbe2ff;
    color: var(--primary-dark);
}

:focus-visible {
    outline: 3px solid var(--primary-ring);
    outline-offset: 2px;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cfd5e1;
    border-radius: 20px;
}

::-webkit-scrollbar-thumb:hover {
    background: #aeb7c8;
}

h1, h2, h3, h4, h5, p {
    margin-top: 0;
}

/* ---------- Helpers ---------- */
.currency {
    font-size: 0.72em;
    color: var(--muted);
    font-weight: 500;
    margin-inline-start: 2px;
}

.muted { color: var(--muted); }
.text-sm { font-size: 14.5px; }
.text-xs { font-size: 13px; }
.text-danger { color: var(--danger) !important; }
.text-success { color: var(--success) !important; }
.text-warning { color: var(--warning) !important; }
.text-primary { color: var(--primary) !important; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.nowrap { white-space: nowrap; }
.ltr { direction: ltr; }
.text-center { text-align: center; }
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mt-24 { margin-top: 24px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; }
.w-full { width: 100%; }
.d-flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2-1 { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }
.grid-1-2 { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.5fr); }
.divider { height: 1px; border: 0; background: var(--line); margin: 20px 0; }
.hide { display: none !important; }
.dot-sep { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .4; display: inline-block; }

/* ---------- Brand ---------- */
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--ink);
    min-width: 0;
}

.brand:hover { color: inherit; }

.brand-mark {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    background: linear-gradient(140deg, #5473ff 0%, #3454f5 45%, #1e37ba 100%);
    color: #fff;
    font-weight: 800;
    font-size: 25.5px;
    line-height: 1;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 8px 22px rgba(52, 84, 245, .28);
    flex: 0 0 auto;
}

.brand-logo {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
}

.brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.5;
}

.brand-copy strong {
    font-size: 18.5px;
    font-weight: 750;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.brand-copy small {
    font-size: 13px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.brand-light { color: #fff; }
.brand-light .brand-copy small { color: var(--sidebar-muted); }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 42px;
    padding: 0 17px;
    border: 1px solid transparent;
    border-radius: 11px;
    font-size: 15px;
    font-weight: 600;
    color: var(--ink-soft);
    white-space: nowrap;
    transition: all var(--transition);
    text-decoration: none;
    line-height: 1;
    background: transparent;
}

.btn svg { flex: 0 0 auto; }

.btn-primary {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 5px 14px rgba(52, 84, 245, .22);
}

.btn-primary:hover {
    color: #fff;
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    box-shadow: 0 8px 20px rgba(52, 84, 245, .28);
    transform: translateY(-1px);
}

.btn-secondary {
    background: #fff;
    border-color: var(--line);
    color: var(--ink-soft);
    box-shadow: var(--shadow-xs);
}

.btn-secondary:hover {
    border-color: #d4dae6;
    background: #fbfcff;
    color: var(--ink);
}

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

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

.btn-success {
    background: var(--success);
    color: #fff;
    border-color: var(--success);
    box-shadow: 0 5px 14px rgba(15, 159, 110, .18);
}

.btn-success:hover { background: #0b8b5f; color: #fff; }

.btn-danger {
    background: var(--danger);
    color: #fff;
    border-color: var(--danger);
}

.btn-danger:hover { background: #cf3439; color: #fff; }

.btn-danger-soft {
    background: var(--danger-soft);
    color: #c92a2f;
    border-color: transparent;
}

.btn-danger-soft:hover { background: #ffe0e0; color: #ad1f24; }

.btn-warning-soft {
    background: var(--warning-soft);
    color: #9a6300;
    border-color: transparent;
}

.btn-ghost {
    background: transparent;
    color: var(--muted);
}

.btn-ghost:hover {
    background: var(--surface-muted);
    color: var(--ink);
}

.btn-lg { height: 50px; border-radius: 13px; padding: 0 24px; font-size: 16px; }
.btn-sm { height: 35px; font-size: 14px; border-radius: 9px; padding: 0 12px; gap: 6px; }
.btn-xs { height: 29px; font-size: 13px; border-radius: 8px; padding: 0 9px; gap: 5px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none !important; }

.icon-btn {
    width: 40px;
    height: 40px;
    display: inline-grid;
    place-items: center;
    border: 1px solid transparent;
    border-radius: 11px;
    background: transparent;
    color: var(--muted);
    transition: all var(--transition);
    position: relative;
    flex: 0 0 auto;
}

.icon-btn:hover {
    background: var(--surface-muted);
    color: var(--ink);
}

.btn-icon {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    border: 1px solid transparent;
    color: var(--muted);
    background: transparent;
    transition: all var(--transition);
}

.btn-icon:hover {
    color: var(--ink);
    background: var(--surface-muted);
}

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

/* ---------- Badges ---------- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
}

.badge-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
    flex: 0 0 auto;
}

.badge-blue { color: #274bd6; background: #edf1ff; }
.badge-violet { color: #6547d8; background: var(--violet-soft); }
.badge-amber { color: #a66a00; background: var(--warning-soft); }
.badge-cyan { color: #087b98; background: var(--cyan-soft); }
.badge-green { color: #087f59; background: var(--success-soft); }
.badge-gray { color: #667085; background: #f0f2f6; }
.badge-red { color: #c52b31; background: var(--danger-soft); }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--primary);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .2px;
    margin-bottom: 10px;
}

.eyebrow::before {
    content: '';
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
}

.eyebrow-light { color: #9fb1ff; }

/* ---------- Avatars ---------- */
.avatar {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: inline-grid;
    place-items: center;
    font-size: 14px;
    font-weight: 700;
    flex: 0 0 auto;
    line-height: 1;
    letter-spacing: -.3px;
}

.avatar-sm { width: 34px; height: 34px; border-radius: 10px; font-size: 13px; }
.avatar-lg { width: 54px; height: 54px; border-radius: 16px; font-size: 17.5px; }
.avatar-xl { width: 72px; height: 72px; border-radius: 20px; font-size: 22px; }
.avatar-indigo { background: #e9edff; color: #3454f5; }
.avatar-emerald { background: #e5f8ef; color: #0b8960; }
.avatar-amber { background: #fff4df; color: #b27100; }
.avatar-rose { background: #ffeaed; color: #d23c52; }
.avatar-sky { background: #e7f6fd; color: #087fa1; }
.avatar-violet { background: #f0ebff; color: #7850e8; }

/* ---------- App layout ---------- */
.app-shell {
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background:
        radial-gradient(circle at 20% 0%, rgba(82, 112, 245, .16), transparent 36%),
        linear-gradient(180deg, #101a2d 0%, var(--sidebar-bg) 54%, #0c1423 100%);
    color: var(--sidebar-text);
    z-index: 80;
    padding: 18px 15px 16px;
    transition: transform 260ms cubic-bezier(.4, 0, .2, 1);
}

.sidebar-inner {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 2px 3px;
    scrollbar-width: thin;
    scrollbar-color: #2c3850 transparent;
}

.sidebar-inner::-webkit-scrollbar { width: 4px; }
.sidebar-inner::-webkit-scrollbar-thumb { background: #2c3850; }

.sidebar-brand {
    padding: 4px 8px 0;
    margin-bottom: 19px;
}

.sidebar-brand .brand-mark {
    background: linear-gradient(145deg, #6382ff, #3454f5 55%, #2037b5);
    box-shadow: 0 9px 24px rgba(52, 84, 245, .35), inset 0 1px 0 rgba(255,255,255,.25);
}

.sidebar-brand .brand-copy strong { color: #fff; }
.sidebar-brand .brand-copy small { color: var(--sidebar-muted); }

.workspace-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 4px 20px;
    padding: 9px 12px;
    border: 1px solid rgba(255,255,255,.07);
    background: rgba(255,255,255,.035);
    border-radius: 10px;
    color: #aab5c9;
    font-size: 13px;
}

.workspace-pill small {
    margin-inline-start: auto;
    color: #8595ff;
    background: rgba(91, 118, 255, .12);
    padding: 2px 7px;
    border-radius: 5px;
    font-size: 13px;
}

.workspace-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 0 4px rgba(52, 211, 153, .1);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 19px;
}

.nav-group {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.nav-label {
    display: block;
    padding: 0 12px;
    margin-bottom: 7px;
    font-size: 13px;
    font-weight: 600;
    color: #657188;
    letter-spacing: .3px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 43px;
    padding: 8px 11px;
    border-radius: 10px;
    color: #aab4c6;
    font-size: 14.5px;
    font-weight: 500;
    transition: all var(--transition);
    position: relative;
}

.nav-link::before {
    content: '';
    position: absolute;
    right: -15px;
    top: 50%;
    width: 3px;
    height: 20px;
    border-radius: 4px;
    transform: translateY(-50%) scaleY(0);
    background: #6f8aff;
    transition: transform var(--transition);
}

.nav-link:hover {
    background: rgba(255,255,255,.045);
    color: #fff;
}

.nav-link.is-active {
    color: #fff;
    background: linear-gradient(90deg, rgba(64, 94, 245, .18), rgba(64, 94, 245, .09));
    box-shadow: inset 0 0 0 1px rgba(116, 141, 255, .1);
}

.nav-link.is-active::before { transform: translateY(-50%) scaleY(1); }

.nav-icon {
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: #7f8ca4;
    transition: all var(--transition);
}

.nav-link.is-active .nav-icon {
    color: #9fb0ff;
    background: rgba(105, 131, 255, .1);
}

.nav-link:hover .nav-icon { color: #c6d0e4; }

.nav-text { flex: 1; }

.nav-badge {
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 6px;
    background: rgba(103, 129, 255, .13);
    color: #9fb0ff;
    display: inline-grid;
    place-items: center;
    font-size: 13px;
    line-height: 1;
    font-weight: 700;
}

.nav-badge-warning {
    background: rgba(245, 158, 11, .13);
    color: #f5bb4d;
}

.sidebar-spacer { flex: 1; min-height: 24px; }

.support-card {
    display: flex;
    gap: 10px;
    padding: 13px;
    border-radius: 13px;
    background: linear-gradient(145deg, rgba(255,255,255,.06), rgba(255,255,255,.025));
    border: 1px solid rgba(255,255,255,.065);
    margin: 0 3px 13px;
}

.support-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: rgba(103, 129, 255, .13);
    color: #9fb0ff;
    flex: 0 0 auto;
}

.support-card strong {
    display: block;
    color: #e8edf7;
    font-size: 13px;
    font-weight: 600;
}

.support-card p {
    margin: 1px 0 4px;
    font-size: 13px;
    line-height: 1.7;
    color: #77849b;
}

.support-card a {
    color: #a5b5ff;
    font-size: 13px;
    font-weight: 600;
    direction: ltr;
    display: inline-block;
}

.sidebar-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    color: #59657a;
    font-size: 13px;
    padding: 7px 0 0;
}

.sidebar-footer-dot {
    width: 2px;
    height: 2px;
    border-radius: 50%;
    background: currentColor;
}

.sidebar-logout-form { margin: 6px 3px 0; }

.sidebar-logout {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    border: 0;
    background: transparent;
    color: #8c98ad;
    padding: 9px 7px;
    font-size: 13px;
    border-radius: 8px;
    transition: all var(--transition);
}

.sidebar-logout:hover {
    background: rgba(229, 72, 77, .08);
    color: #ff8e92;
}

.customer-side-card {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 2px 4px 22px;
    padding: 11px 12px;
    border-radius: 13px;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.065);
    position: relative;
}

.customer-side-card .avatar {
    background: rgba(103, 129, 255, .16);
    color: #b2c0ff;
}

.customer-side-card > div {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.customer-side-card strong {
    color: #edf1fa;
    font-size: 13px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.customer-side-card span {
    color: #7d8aa1;
    font-size: 13px;
}

.online-dot {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #34d399;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    border: 0;
    padding: 0;
    background: rgba(10, 17, 30, .45);
    backdrop-filter: blur(3px);
    z-index: 70;
    opacity: 0;
    transition: opacity var(--transition);
}

.app-main {
    margin-right: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.topbar {
    height: 78px;
    padding: 0 29px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: rgba(255, 255, 255, .88);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 50;
}

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

.topbar-titles { min-width: 0; }

.page-title {
    margin: 0;
    font-size: 20.5px;
    font-weight: 750;
    letter-spacing: -.25px;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.page-subtitle {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

.topbar-date {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    color: var(--muted);
    background: #f7f8fc;
    border: 1px solid var(--line-soft);
    border-radius: 9px;
    height: 35px;
    padding: 0 11px;
}

.topbar-date svg { color: #9aa5b7; }

.topbar-search {
    display: flex;
    align-items: center;
    gap: 7px;
    width: 205px;
    height: 38px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fafbfe;
    padding: 0 11px;
    color: var(--muted-light);
    transition: all var(--transition);
}

.topbar-search:focus-within {
    border-color: #bdc9ff;
    background: #fff;
    box-shadow: 0 0 0 3px var(--primary-ring);
}

.topbar-search input {
    border: 0;
    background: transparent;
    outline: 0;
    font-size: 13px;
    color: var(--ink);
    width: 100%;
    min-width: 0;
}

.topbar-search input::placeholder { color: var(--muted-light); }

.notification-btn {
    border-color: var(--line);
    background: #fff;
    width: 38px;
    height: 38px;
    border-radius: 10px;
}

.notification-dot {
    position: absolute;
    top: 4px;
    left: 4px;
    min-width: 18px;
    height: 18px;
    border-radius: 6px;
    background: var(--danger);
    color: #fff;
    font-size: 13px;
    line-height: 1;
    font-weight: 700;
    display: grid;
    place-items: center;
    border: 2px solid #fff;
    padding: 0 3px;
}

.menu-toggle { display: none; }

.user-chip {
    display: flex;
    align-items: center;
    gap: 9px;
    border: 1px solid transparent;
    background: transparent;
    border-radius: 11px;
    padding: 3px 5px;
    transition: all var(--transition);
    color: var(--muted);
}

.user-chip:hover {
    background: var(--surface-muted);
    border-color: var(--line-soft);
}

.user-chip-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.45;
    text-align: right;
}

.user-chip-copy strong {
    color: var(--ink);
    font-size: 13px;
    font-weight: 600;
}

.user-chip-copy small {
    color: var(--muted-light);
    font-size: 13px;
}

.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 9px);
    left: 0;
    width: 220px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow-md);
    padding: 6px;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-5px);
    transition: all var(--transition);
}

.dropdown.is-open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-head {
    padding: 10px 11px 9px;
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid var(--line-soft);
    margin-bottom: 5px;
}

.dropdown-head strong {
    font-size: 14px;
    color: var(--ink);
}

.dropdown-head span {
    font-size: 13px;
    color: var(--muted);
    margin-top: 1px;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 9px 10px;
    border: 0;
    background: transparent;
    border-radius: 8px;
    color: var(--ink-soft);
    font-size: 13px;
    text-align: right;
    transition: all var(--transition);
}

.dropdown-item:hover {
    background: var(--surface-muted);
    color: var(--ink);
}

.dropdown-danger { color: #d23a3f; }
.dropdown-danger:hover { background: var(--danger-soft); color: #bc262b; }

.dropdown-divider {
    height: 1px;
    background: var(--line-soft);
    margin: 5px 0;
}

.page-content {
    padding: 26px 29px 44px;
    flex: 1;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
}

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

.page-header-row h2 {
    margin: 0 0 4px;
    font-size: 22px;
    font-weight: 750;
    letter-spacing: -.2px;
}

.page-header-row p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.page-header-actions {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
}

.page-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 9px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb svg { color: #b7c0d0; }

/* ---------- Cards ---------- */
.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xs);
}

.card-elevated { box-shadow: var(--shadow-sm); }
.card-flat { box-shadow: none; }

.card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 20px 16px;
    border-bottom: 1px solid var(--line-soft);
    flex-wrap: wrap;
}

.card-head.borderless { border-bottom: 0; padding-bottom: 4px; }
.card-head h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--ink);
}

.card-head p {
    margin: 2px 0 0;
    font-size: 13px;
    color: var(--muted);
}

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

.card-body { padding: 20px; }
.card-body.p-0 { padding: 0; }
.card-body.p-sm { padding: 15px; }
.card-footer {
    padding: 14px 20px;
    border-top: 1px solid var(--line-soft);
    background: #fcfcfe;
    border-radius: 0 0 var(--radius) var(--radius);
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
}

.card-link:hover { color: var(--primary-dark); }

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.section-heading h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}

.section-heading p {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 13px;
}

/* ---------- Stats ---------- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.stat-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 17px 17px 15px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-xs);
    transition: all var(--transition);
}

.stat-card:hover {
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.stat-card::after {
    content: '';
    position: absolute;
    left: -20px;
    bottom: -34px;
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: var(--stat-soft, #f3f6ff);
    opacity: .7;
}

.stat-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    color: var(--stat-color, var(--primary));
    background: var(--stat-soft, var(--primary-soft));
    position: relative;
    z-index: 1;
}

.stat-label {
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 2px;
    font-weight: 500;
}

.stat-value {
    font-size: 25.5px;
    line-height: 1.35;
    font-weight: 750;
    letter-spacing: -.5px;
    color: var(--ink);
    position: relative;
    z-index: 1;
}

.stat-value small {
    font-size: 13px;
    color: var(--muted);
    font-weight: 500;
    letter-spacing: 0;
}

.stat-foot {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    font-size: 13px;
    color: var(--muted-light);
    position: relative;
    z-index: 1;
}

.trend {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 13px;
    font-weight: 600;
    padding: 2px 5px;
    border-radius: 5px;
    background: var(--success-soft);
    color: var(--success);
}

.trend.down { background: var(--danger-soft); color: var(--danger); }

/* ---------- Hero / dashboard ---------- */
.dash-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    background:
        radial-gradient(circle at 15% 0%, rgba(119, 146, 255, .4), transparent 30%),
        radial-gradient(circle at 90% 100%, rgba(58, 214, 165, .15), transparent 32%),
        linear-gradient(120deg, #18234a 0%, #1e2e6b 48%, #2845b9 100%);
    border-radius: 21px;
    padding: 25px 27px;
    color: #fff;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 14px 38px rgba(27, 45, 115, .16);
}

.dash-hero::before {
    content: '';
    position: absolute;
    left: -40px;
    top: -70px;
    width: 230px;
    height: 230px;
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 50%;
}

.dash-hero::after {
    content: '';
    position: absolute;
    left: 55px;
    top: -20px;
    width: 130px;
    height: 130px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 50%;
}

.dash-hero-content { position: relative; z-index: 1; max-width: 620px; }

.dash-hero .eyebrow { color: #b3c2ff; margin-bottom: 8px; }
.dash-hero .eyebrow::before { background: #b3c2ff; }

.dash-hero h2 {
    font-size: 25.5px;
    font-weight: 750;
    margin: 0 0 7px;
    letter-spacing: -.3px;
}

.dash-hero p {
    margin: 0 0 15px;
    color: #b8c4e8;
    font-size: 13px;
    max-width: 500px;
    line-height: 1.9;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.hero-actions .btn-primary {
    background: #fff;
    color: #233781;
    border-color: #fff;
    box-shadow: 0 8px 20px rgba(0,0,0,.12);
}

.hero-actions .btn-primary:hover { background: #f3f6ff; color: #1c2b63; }

.hero-actions .btn-secondary {
    background: rgba(255,255,255,.08);
    border-color: rgba(255,255,255,.14);
    color: #eef2ff;
    box-shadow: none;
}

.hero-actions .btn-secondary:hover { background: rgba(255,255,255,.13); color: #fff; }

.hero-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 15px;
    border-radius: 14px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.1);
    flex: 0 0 auto;
    z-index: 1;
    min-width: 190px;
}

.hero-status-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: rgba(255,255,255,.1);
    color: #dce4ff;
}

.hero-status small { display: block; font-size: 13px; color: #9eacd6; }
.hero-status strong { font-size: 18.5px; color: #fff; line-height: 1.4; }

/* ---------- Charts ---------- */
.chart-card { min-height: 100%; }

.chart-wrap {
    position: relative;
    width: 100%;
    min-height: 220px;
    overflow: hidden;
    padding-top: 10px;
}

.chart-wrap svg {
    width: 100%;
    height: auto;
    overflow: visible;
    display: block;
}

.chart-grid-line {
    stroke: #eef0f6;
    stroke-width: 1;
    stroke-dasharray: 3 4;
}

.chart-label {
    font-family: var(--font);
    font-size: 13px;
    fill: #98a2b3;
}

.chart-legend {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--muted);
}

.legend-item { display: inline-flex; align-items: center; gap: 6px; }
.legend-dot { width: 7px; height: 7px; border-radius: 3px; background: var(--primary); }
.legend-dot.green { background: var(--success); }
.legend-dot.amber { background: var(--warning); }

.chart-summary {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.chart-summary-item span {
    display: block;
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 2px;
}

.chart-summary-item strong {
    font-size: 20.5px;
    font-weight: 750;
    letter-spacing: -.3px;
}

.donut-layout {
    display: flex;
    align-items: center;
    gap: 22px;
    flex-wrap: wrap;
}

.donut {
    width: 146px;
    height: 146px;
    border-radius: 50%;
    position: relative;
    flex: 0 0 auto;
    background: conic-gradient(var(--donut));
    display: grid;
    place-items: center;
}

.donut::before {
    content: '';
    position: absolute;
    inset: 15px;
    border-radius: 50%;
    background: #fff;
    box-shadow: inset 0 0 0 1px var(--line-soft);
}

.donut-center {
    position: relative;
    z-index: 1;
    text-align: center;
    line-height: 1.5;
}

.donut-center strong { display: block; font-size: 26.5px; font-weight: 750; letter-spacing: -.5px; }
.donut-center span { font-size: 13px; color: var(--muted); }

.status-legend {
    display: flex;
    flex-direction: column;
    gap: 9px;
    flex: 1;
    min-width: 130px;
}

.legend-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--muted);
}

.legend-row .legend-dot { width: 7px; height: 7px; border-radius: 50%; }
.legend-row strong {
    margin-inline-start: auto;
    color: var(--ink);
    font-size: 13px;
    font-weight: 650;
}

/* ---------- Tables ---------- */
.table-wrap {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #a9b5cc var(--surface-muted);
}

.table-wrap:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.table-scroll-tools, .mobile-nav, .sidebar-mobile-head { display: none; }
.data-table .code-chip { white-space: nowrap; }

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
    min-width: 700px;
}

.data-table th {
    text-align: right;
    padding: 10px 18px;
    background: #fafbfd;
    color: #7b8698;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .1px;
    border-bottom: 1px solid var(--line-soft);
    white-space: nowrap;
}

.data-table td {
    padding: 13px 18px;
    border-bottom: 1px solid var(--line-soft);
    color: var(--ink-soft);
    vertical-align: middle;
}

.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr { transition: background var(--transition); }
.data-table tbody tr:hover { background: #fbfcff; }
.data-table .td-actions { width: 1%; white-space: nowrap; }
.data-table .text-end { text-align: left; }
.data-table .row-click { cursor: pointer; }
.data-table.compact th, .data-table.compact td { padding: 10px 14px; }

.table-user {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.table-user-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.55;
}

.table-user-copy strong {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
    white-space: nowrap;
}

.table-user-copy span {
    font-size: 13px;
    color: var(--muted);
    direction: ltr;
    text-align: right;
}

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

.device-cell-icon {
    width: 35px;
    height: 35px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: #f4f6fb;
    color: #697586;
    flex: 0 0 auto;
}

.device-cell-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.55;
}

.device-cell-copy strong {
    font-size: 13px;
    color: var(--ink);
    font-weight: 600;
}

.device-cell-copy span {
    font-size: 13px;
    color: var(--muted);
}

.code-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #f5f7fb;
    border: 1px solid var(--line-soft);
    color: #516079;
    padding: 3px 7px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    direction: ltr;
    letter-spacing: .2px;
    font-variant-numeric: tabular-nums;
}

.copy-btn {
    border: 0;
    background: transparent;
    color: #a3adbd;
    padding: 1px;
    display: inline-grid;
    place-items: center;
    border-radius: 4px;
}

.copy-btn:hover { color: var(--primary); }

.table-actions {
    display: flex;
    align-items: center;
    gap: 3px;
    justify-content: flex-end;
}

.amount-cell {
    font-weight: 650;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.amount-cell .currency { font-size: 13px; }

/* ---------- Filter bar ---------- */
.filters-bar {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    margin-bottom: 16px;
    box-shadow: var(--shadow-xs);
}

.filter-search {
    position: relative;
    flex: 1 1 230px;
    min-width: 180px;
}

.filter-search svg {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #9aa5b5;
    pointer-events: none;
}

.filter-search input {
    width: 100%;
    height: 39px;
    border: 1px solid var(--line);
    background: #fafbfe;
    border-radius: 9px;
    padding: 0 36px 0 12px;
    font-size: 13px;
    color: var(--ink);
    outline: 0;
    transition: all var(--transition);
}

.filter-search input:focus {
    border-color: #bdc9ff;
    background: #fff;
    box-shadow: 0 0 0 3px var(--primary-ring);
}

.filter-select {
    height: 39px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #fafbfe;
    color: var(--ink-soft);
    font-size: 13px;
    padding: 0 11px;
    min-width: 130px;
    outline: 0;
    transition: all var(--transition);
}

.filter-select:focus {
    border-color: #bdc9ff;
    background: #fff;
    box-shadow: 0 0 0 3px var(--primary-ring);
}

.filters-bar .btn { height: 39px; font-size: 13px; }
.filter-count {
    font-size: 13px;
    color: var(--muted);
    margin-inline-start: auto;
    white-space: nowrap;
}

/* ---------- Empty state ---------- */
.empty-state {
    padding: 45px 20px;
    text-align: center;
}

.empty-icon {
    width: 62px;
    height: 62px;
    margin: 0 auto 14px;
    border-radius: 18px;
    background: #f2f5fb;
    color: #8995a8;
    display: grid;
    place-items: center;
}

.empty-state h3 {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 5px;
}

.empty-state p {
    max-width: 340px;
    margin: 0 auto 16px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.9;
}

/* ---------- Pagination ---------- */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 17px;
    flex-wrap: wrap;
}

.page-btn {
    min-width: 31px;
    height: 31px;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 13px;
    line-height: 1;
    background: #fff;
    transition: all var(--transition);
    padding: 0 6px;
}

.page-btn:hover { border-color: #cbd3e4; color: var(--ink); }
.page-btn.is-active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(52,84,245,.2);
}
.page-btn.is-disabled { opacity: .4; pointer-events: none; }
.page-dots { color: #a6b0c0; padding: 0 2px; font-size: 14px; }

/* ---------- Forms ---------- */
.form-grid {
    display: grid;
    gap: 17px;
}

.form-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field-full { grid-column: 1 / -1; }

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.field label,
.field-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-soft);
    display: flex;
    align-items: center;
    gap: 4px;
}

.required { color: var(--danger); }

.input,
.select,
.textarea,
input[type="text"].input,
input[type="tel"].input,
input[type="email"].input,
input[type="password"].input,
input[type="number"].input,
input[type="url"].input,
input[type="date"].input,
input[type="search"].input {
    width: 100%;
    min-height: 44px;
    border: 1px solid #dfe4ec;
    border-radius: 10px;
    background: #fff;
    color: var(--ink);
    font-size: 13px;
    padding: 9px 13px;
    outline: 0;
    transition: all var(--transition);
    font-family: var(--font);
}

.textarea {
    min-height: 102px;
    resize: vertical;
    line-height: 2;
}

.select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23808a9c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 12px center;
    padding-left: 32px;
}

.input:focus,
.select:focus,
.textarea:focus {
    border-color: #aebcff;
    box-shadow: 0 0 0 3px var(--primary-ring);
}

.input::placeholder,
.textarea::placeholder { color: #a8b1c0; }

.input[readonly],
.input[disabled],
.select[disabled] {
    background: #f7f8fb;
    color: var(--muted);
    cursor: not-allowed;
}

.field-hint {
    font-size: 13px;
    color: var(--muted-light);
    line-height: 1.7;
}

/* ---------- Jalali date picker ---------- */
.jalali-date {
    position: relative;
    display: block;
}

.jalali-date input.jalali-date-input {
    padding-inline-end: 72px;
    font-variant-numeric: tabular-nums;
}

/* ورودی نمایشی readonly است ولی باید همان حس یک فیلد فعال را بدهد */
.jalali-date input.jalali-date-input[readonly]:not([disabled]) {
    background: #fff;
    color: var(--ink);
    cursor: pointer;
}

.jalali-date.is-open .jalali-date-input {
    border-color: #aebcff;
    box-shadow: 0 0 0 3px var(--primary-ring);
}

.jalali-date-toggle,
.jalali-date-clear {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    border: 0;
    padding: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    transition: all var(--transition);
}

.jalali-date-toggle {
    inset-inline-end: 36px;
    width: 30px;
    height: 30px;
    border-radius: 8px;
}

.jalali-date-clear {
    inset-inline-end: 10px;
    width: 24px;
    height: 24px;
    border-radius: 7px;
    font-size: 17px;
    line-height: 1;
}

.jalali-date-toggle:hover,
.jalali-date-clear:hover {
    background: var(--primary-soft);
    color: var(--primary-dark);
}

.jalali-date[data-disabled] .jalali-date-toggle,
.jalali-date[data-disabled] .jalali-date-clear {
    background: none;
    color: var(--muted-light);
    cursor: not-allowed;
}

.jalali-date-pop {
    position: absolute;
    z-index: 60;
    top: calc(100% + 8px);
    inset-inline-start: 0;
    width: 302px;
    max-width: calc(100vw - 28px);
    padding: 12px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 15px;
    box-shadow: 0 18px 44px rgba(16, 24, 40, .16);
    animation: jd-pop .16s ease-out;
}

.jalali-date-pop[hidden] { display: none; }

@keyframes jd-pop {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.jd-head {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 10px;
}

.jd-title {
    flex: 1;
    text-align: center;
    font-size: 14.5px;
    font-weight: 700;
    color: var(--ink);
}

.jd-step {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0;
    background: var(--surface-soft);
    color: var(--ink-soft);
    font-size: 14px;
    line-height: 1;
    font-family: var(--font);
    cursor: pointer;
    transition: all var(--transition);
}

.jd-step:hover {
    background: var(--primary-soft);
    border-color: #c8d2ff;
    color: var(--primary-dark);
}

.jd-week,
.jd-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 3px;
}

.jd-week { margin-bottom: 5px; }

.jd-week span {
    text-align: center;
    padding-bottom: 4px;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted-light);
    line-height: 1;
}

.jd-blank { height: 34px; }

.jd-day {
    height: 34px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 9px;
    padding: 0;
    background: transparent;
    color: var(--ink-soft);
    font-size: 13.5px;
    font-weight: 600;
    font-family: var(--font);
    font-variant-numeric: tabular-nums;
    cursor: pointer;
    transition: all var(--transition);
}

.jd-day:hover {
    background: var(--primary-soft);
    color: var(--primary-dark);
}

.jd-day.is-today {
    box-shadow: inset 0 0 0 1px #c8d2ff;
    color: var(--primary-dark);
}

.jd-day.is-selected,
.jd-day.is-selected:hover {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 6px 14px rgba(52, 84, 245, .28);
}

.jd-foot {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--line-soft);
}

.field-error {
    font-size: 13px;
    color: var(--danger);
}

.input-wrap {
    position: relative;
}

.input-wrap .input { padding-inline-end: 38px; }
.input-wrap > svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #9aa5b7;
    pointer-events: none;
}

.input-suffix {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
    color: var(--muted);
    pointer-events: none;
    background: #f7f9fd;
    padding: 2px 5px;
    border-radius: 5px;
}

.input-wrap.with-suffix .input { padding-left: 58px; }

.password-wrap { position: relative; }
.password-wrap input.input {
    padding-right: 13px;
    padding-left: 40px;
    text-align: right;
}
.password-toggle {
    position: absolute;
    left: 6px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: #9aa5b7;
    padding: 6px;
    border-radius: 7px;
    display: grid;
    place-items: center;
}
.password-toggle:hover { color: var(--ink); background: #f4f6fa; }

.customer-password-form .input {
    direction: rtl;
    text-align: right;
}
.customer-password-form .password-wrap .input {
    padding-right: 13px;
    padding-left: 40px;
}

.checkbox {
    display: inline-flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    color: var(--ink-soft);
    cursor: pointer;
}

.checkbox input { position: absolute; opacity: 0; width: 0; height: 0; }

.checkbox-ui {
    width: 17px;
    height: 17px;
    border: 1.5px solid #cfd6e4;
    border-radius: 5px;
    flex: 0 0 auto;
    margin-top: 1px;
    background: #fff;
    position: relative;
    transition: all var(--transition);
}

.checkbox input:checked + .checkbox-ui {
    background: var(--primary);
    border-color: var(--primary);
}

.checkbox input:checked + .checkbox-ui::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 5px;
    height: 8px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox input:focus-visible + .checkbox-ui { box-shadow: 0 0 0 3px var(--primary-ring); }

.check-card {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border: 1px solid var(--line);
    background: #fbfcfe;
    border-radius: 11px;
    padding: 12px 13px;
    cursor: pointer;
    transition: all var(--transition);
}

.check-card:hover { border-color: #cbd4f7; }
.check-card input { position: absolute; opacity: 0; }
.check-ui {
    width: 18px;
    height: 18px;
    border: 1.5px solid #cfd6e4;
    border-radius: 5px;
    flex: 0 0 auto;
    margin-top: 1px;
    background: #fff;
    position: relative;
}
.check-card input:checked + .check-ui {
    background: var(--primary);
    border-color: var(--primary);
}
.check-card input:checked + .check-ui::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 5px;
    height: 8px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.check-card-copy { display: flex; flex-direction: column; gap: 2px; }
.check-card-copy strong { font-size: 13px; color: var(--ink-soft); font-weight: 600; }
.check-card-copy small { font-size: 13px; color: var(--muted); line-height: 1.7; }

.radio-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.radio-card {
    position: relative;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 15px;
    cursor: pointer;
    transition: all var(--transition);
    background: #fff;
    display: flex;
    gap: 11px;
    align-items: flex-start;
}

.radio-card:hover { border-color: #becaf7; }
.radio-card input { position: absolute; opacity: 0; }
.radio-card-ui {
    width: 17px;
    height: 17px;
    border-radius: 50%;
    border: 1.5px solid #cbd3e0;
    flex: 0 0 auto;
    margin-top: 1px;
    position: relative;
    background: #fff;
}
.radio-card input:checked ~ .radio-card-ui { border-color: var(--primary); border-width: 5px; }
.radio-card:has(input:checked) {
    border-color: #97a9ff;
    background: #f7f9ff;
    box-shadow: 0 0 0 3px rgba(52,84,245,.07);
}
.radio-card-copy strong { display: block; font-size: 13px; color: var(--ink); font-weight: 600; }
.radio-card-copy span { display: block; font-size: 13px; color: var(--muted); line-height: 1.7; margin-top: 2px; }

.file-drop {
    border: 1.5px dashed #cfd7e6;
    border-radius: 12px;
    background: #fbfcfe;
    padding: 18px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    display: block;
}

.file-drop:hover { border-color: #aab9fa; background: #f8faff; }
.file-drop input { display: none; }
.file-drop-icon {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    background: var(--primary-soft);
    color: var(--primary);
    display: grid;
    place-items: center;
    margin: 0 auto 7px;
}
.file-drop strong { display: block; font-size: 13px; color: var(--ink-soft); }
.file-drop span { display: block; font-size: 13px; color: var(--muted-light); margin-top: 2px; }
.file-name { font-size: 13px; color: var(--success); margin-top: 6px; display: none; }

.form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;
    padding: 16px 20px;
    background: #fcfcfe;
    border-top: 1px solid var(--line-soft);
    border-radius: 0 0 var(--radius) var(--radius);
    flex-wrap: wrap;
}

.form-actions.between { justify-content: space-between; }
.form-actions .start { margin-inline-end: auto; }

.form-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 17px;
}

.form-section-icon {
    width: 35px;
    height: 35px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: var(--primary-soft);
    color: var(--primary);
    flex: 0 0 auto;
}

.form-section-title h3 { margin: 0; font-size: 15px; font-weight: 700; }
.form-section-title p { margin: 1px 0 0; color: var(--muted); font-size: 13px; }

.form-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 18px;
    align-items: start;
}

.side-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 96px;
}

/* ---------- Flash & alerts ---------- */
.flash-stack {
    position: fixed;
    top: 88px;
    left: 24px;
    z-index: 200;
    width: min(400px, calc(100vw - 32px));
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.flash {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 11px 12px;
    box-shadow: var(--shadow-md);
    font-size: 13px;
    line-height: 1.8;
    color: var(--ink-soft);
    animation: flashIn 260ms cubic-bezier(.2,.8,.3,1);
}

.flash-icon { flex: 0 0 auto; margin-top: 1px; }
.flash-success .flash-icon { color: var(--success); }
.flash-error .flash-icon { color: var(--danger); }
.flash-warning .flash-icon { color: var(--warning); }
.flash-info .flash-icon { color: var(--primary); }
.flash-success { border-right: 3px solid var(--success); }
.flash-error { border-right: 3px solid var(--danger); }
.flash-warning { border-right: 3px solid var(--warning); }
.flash-info { border-right: 3px solid var(--primary); }
.flash-close {
    border: 0;
    background: transparent;
    color: #9aa4b5;
    margin-inline-start: auto;
    padding: 2px;
    display: grid;
    place-items: center;
    border-radius: 4px;
}
.flash-close:hover { color: var(--ink); background: var(--surface-muted); }

@keyframes flashIn {
    from { opacity: 0; transform: translateY(-8px) scale(.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.alert {
    padding: 13px 15px;
    border-radius: 11px;
    font-size: 13px;
    line-height: 1.9;
    margin-bottom: 16px;
    border: 1px solid transparent;
}

.alert ul { margin: 0; padding-inline-start: 18px; }
.alert-error { background: var(--danger-soft); color: #a52026; border-color: #ffd6d7; }
.alert-success { background: var(--success-soft); color: #086a4a; border-color: #c8f0df; }
.alert-warning { background: var(--warning-soft); color: #8c5a00; border-color: #ffe6b8; }
.alert-info { background: var(--primary-soft); color: #263fa9; border-color: #dbe2ff; }
.alert-list { list-style: disc; padding-inline-start: 18px; }

/* ---------- Info blocks ---------- */
.info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 20px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.info-item > span {
    font-size: 13px;
    color: var(--muted-light);
}

.info-item > strong,
.info-item > a {
    font-size: 13px;
    color: var(--ink-soft);
    font-weight: 500;
    overflow-wrap: anywhere;
}

.info-item > a { color: var(--primary); }

.info-inline {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 13px;
}

.info-inline svg { color: #9aa5b7; flex: 0 0 auto; }

/* ---------- Tabs ---------- */
.tabs {
    display: flex;
    align-items: center;
    gap: 3px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 4px;
    overflow-x: auto;
    margin-bottom: 16px;
    width: fit-content;
    max-width: 100%;
}

.tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 13px;
    border-radius: 8px;
    color: var(--muted);
    font-size: 13px;
    white-space: nowrap;
    transition: all var(--transition);
}

.tab:hover { color: var(--ink); }
.tab.is-active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.tab span.count { font-size: 13px; background: rgba(0,0,0,.05); border-radius: 4px; padding: 1px 4px; }

/* ---------- Timeline ---------- */
.timeline {
    position: relative;
    padding-inline-start: 4px;
}

.timeline-item {
    position: relative;
    padding: 0 27px 20px 0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    right: 7px;
    top: 18px;
    bottom: 0;
    width: 1px;
    background: var(--line);
}

.timeline-item:last-child { padding-bottom: 0; }
.timeline-item:last-child::before { display: none; }

.timeline-dot {
    position: absolute;
    right: 0;
    top: 2px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid #cbd4e6;
    z-index: 1;
    box-shadow: 0 0 0 3px #fff;
}

.timeline-item.is-current .timeline-dot { border-color: var(--primary); }
.timeline-item.is-done .timeline-dot { border-color: var(--success); background: var(--success); }
.timeline-head {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 2px;
}
.timeline-head strong { font-size: 13px; color: var(--ink); font-weight: 600; }
.timeline-head time { font-size: 13px; color: var(--muted-light); margin-inline-start: auto; }
.timeline-item p {
    margin: 0;
    font-size: 13px;
    line-height: 1.9;
    color: var(--muted);
    background: #fafbfd;
    padding: 7px 10px;
    border-radius: 7px;
    margin-top: 5px;
}
.timeline-actor {
    display: block;
    margin-top: 4px;
    font-size: 13px;
    color: var(--muted-light);
}

/* ---------- Repair tracker ---------- */
.repair-tracker {
    padding: 4px 2px 2px;
}

.tracker-bar {
    height: 5px;
    background: #edf0f6;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 14px;
}

.tracker-bar-fill {
    height: 100%;
    border-radius: 5px;
    background: linear-gradient(90deg, #6f8aff, var(--primary));
    transition: width .5s ease;
}

.tracker-steps {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 4px;
}

.tracker-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    flex: 1;
    text-align: center;
    color: var(--muted-light);
    font-size: 13px;
    position: relative;
}

.tracker-step-icon {
    width: 27px;
    height: 27px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #f3f5f9;
    color: #a6b0c1;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px #e6eaf1;
}

.tracker-step.is-done .tracker-step-icon {
    background: var(--primary-soft);
    color: var(--primary);
    box-shadow: 0 0 0 1px #cdd7ff;
}
.tracker-step.is-current .tracker-step-icon {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 0 0 4px rgba(52,84,245,.12);
}
.tracker-step.is-current { color: var(--primary); font-weight: 600; }
.tracker-step.is-done { color: var(--ink-soft); }

/* ---------- Detail layout ---------- */
.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.8fr);
    gap: 18px;
    align-items: start;
}

.detail-main, .detail-side {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-width: 0;
}

.detail-side { position: sticky; top: 96px; }

.repair-report-text { overflow-wrap: anywhere; }
.repair-report-files {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
    gap: 14px;
}
.repair-report-file {
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--line-soft);
    border-radius: 12px;
    overflow-wrap: anywhere;
}
.repair-report-file-link { display: flex; flex-direction: column; gap: 8px; }
.repair-report-file-link img { width: 100%; height: 150px; object-fit: contain; border-radius: 8px; background: var(--surface-muted); }
.repair-report-file-link small { color: var(--muted); }
.repair-report-pdf { display: flex; align-items: center; justify-content: center; gap: 10px; height: 90px; background: var(--primary-soft); border-radius: 8px; }

.repair-summary-card {
    overflow: hidden;
}

.repair-summary-head {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 19px 20px;
    border-bottom: 1px solid var(--line-soft);
    flex-wrap: wrap;
}

.repair-summary-icon {
    width: 50px;
    height: 50px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(145deg, #eff3ff, #e4eaff);
    color: var(--primary);
    flex: 0 0 auto;
}

.repair-summary-title { flex: 1; min-width: 150px; }
.repair-summary-title h2 {
    margin: 0;
    font-size: 18.5px;
    font-weight: 750;
    letter-spacing: -.2px;
}
.repair-summary-title p {
    margin: 2px 0 0;
    font-size: 13px;
    color: var(--muted);
}

.repair-summary-badges {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}

.detail-list {
    display: flex;
    flex-direction: column;
}

.detail-list-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 10px 0;
    border-bottom: 1px dashed var(--line-soft);
    font-size: 13px;
}
.detail-list-row:last-child { border-bottom: 0; }
.detail-list-row .label { color: var(--muted); }
.detail-list-row .value { color: var(--ink-soft); font-weight: 500; text-align: start; }

.quick-links {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.quick-link {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 10px;
    border-radius: 8px;
    color: var(--ink-soft);
    font-size: 13px;
    transition: all var(--transition);
}
.quick-link:hover { background: var(--surface-muted); color: var(--ink); }
.quick-link svg:last-child { margin-inline-start: auto; color: #b0b9c8; }

/* ---------- Status / info panels ---------- */
.stat-mini-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
    gap: 10px;
}
.stat-mini-grid.invoice-summary {
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
}
.stat-mini {
    background: #fafbfd;
    border: 1px solid var(--line-soft);
    border-radius: 11px;
    padding: 11px 12px;
}
.stat-mini span { display: block; color: var(--muted); font-size: 13px; }
.stat-mini strong { display: block; font-size: 16px; font-weight: 700; margin-top: 2px; }

/* ردیف یک‌خطی داشبورد مشتری: چهار کارت هم‌عرض، هر کدام با لهجهٔ رنگی خودش */
.stat-mini-grid.stat-row-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.stat-row-4 .stat-mini {
    --stat-accent: var(--primary);
    --stat-accent-soft: var(--primary-soft);
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--surface);
    overflow: hidden;
}
.stat-row-4 .stat-mini::before {
    content: '';
    position: absolute;
    inset-block: 0;
    inset-inline-start: 0;
    width: 3px;
    background: var(--stat-accent);
}
.stat-row-4 .stat-mini-icon {
    display: grid;
    place-items: center;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: var(--stat-accent-soft);
    color: var(--stat-accent);
}
.stat-row-4 .stat-mini .stat-mini-copy { display: block; min-width: 0; }
.stat-row-4 .stat-mini .stat-mini-copy > span { display: block; color: var(--muted); font-size: 13.5px; line-height: 1.7; }
.stat-row-4 .stat-mini .stat-mini-copy strong {
    display: block;
    margin-top: 2px;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.6;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.stat-row-4 .stat-tone-cyan { --stat-accent: var(--cyan); --stat-accent-soft: var(--cyan-soft); }
.stat-row-4 .stat-tone-green { --stat-accent: var(--success); --stat-accent-soft: var(--success-soft); }
.stat-row-4 .stat-tone-red { --stat-accent: var(--danger); --stat-accent-soft: var(--danger-soft); }
.stat-row-4 .stat-tone-blue { --stat-accent: var(--primary); --stat-accent-soft: var(--primary-soft); }

/* وقتی عرض کارت کم می‌شود، آیکون بالای متن می‌رود تا عددها کامل دیده شوند */
@media screen and (max-width: 1279px) {
    .app-page .stat-row-4 .stat-mini { flex-direction: column; align-items: flex-start; gap: 10px; }
    .app-page .stat-row-4 .stat-mini-icon { flex-basis: 34px; width: 34px; height: 34px; border-radius: 10px; }
    .app-page .stat-row-4 .stat-mini .stat-mini-copy { width: 100%; }
}

.note-box {
    background: #fbfcff;
    border: 1px dashed #dfe5f2;
    border-radius: 10px;
    padding: 11px 13px;
    color: var(--muted);
    font-size: 13px;
    line-height: 2;
}

.notice {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    border-radius: 10px;
    padding: 11px 13px;
    font-size: 13px;
    line-height: 1.9;
    background: var(--primary-soft);
    color: #2b429d;
    border: 1px solid #dde4ff;
}
.notice.is-warning { background: var(--warning-soft); color: #7f5300; border-color: #ffe6b3; }
.notice.is-success { background: var(--success-soft); color: #066849; border-color: #c9f1e0; }
.notice.is-danger { background: #fdeef0; color: #9b1c31; border-color: #f8d3d9; }
.notice svg { flex: 0 0 auto; margin-top: 1px; }

/* ---------- Search / command ---------- */
.search-input-lg {
    position: relative;
}
.search-input-lg input {
    width: 100%;
    height: 48px;
    padding: 0 44px 0 15px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    font-size: 14px;
    outline: none;
    transition: all var(--transition);
}
.search-input-lg input:focus { border-color: #aebcff; box-shadow: 0 0 0 3px var(--primary-ring); }
.search-input-lg > svg { position: absolute; right: 15px; top: 50%; transform: translateY(-50%); color: #96a1b4; }

/* ---------- Login / Auth ---------- */
.auth-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at 10% 10%, rgba(88, 116, 255, .12), transparent 28%),
        radial-gradient(circle at 90% 90%, rgba(27, 196, 147, .09), transparent 24%),
        #f5f7fc;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
}

.auth-shell {
    width: 100%;
    max-width: 1030px;
    min-height: 590px;
    display: grid;
    grid-template-columns: 1.02fr .98fr;
    background: #fff;
    border: 1px solid rgba(224, 228, 237, .9);
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 30px 90px rgba(31, 43, 79, .12);
}

.auth-visual {
    background:
        radial-gradient(circle at 18% 12%, rgba(116, 143, 255, .35), transparent 34%),
        radial-gradient(circle at 85% 88%, rgba(58, 217, 164, .15), transparent 30%),
        linear-gradient(145deg, #101b38, #17275b 55%, #2440a8);
    color: #fff;
    padding: 35px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.auth-visual::before,
.auth-visual::after {
    content: '';
    position: absolute;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 50%;
    pointer-events: none;
}
.auth-visual::before { width: 340px; height: 340px; left: -110px; bottom: -120px; }
.auth-visual::after { width: 210px; height: 210px; left: -45px; bottom: -55px; }

.auth-visual .brand { position: relative; z-index: 1; }
.auth-visual-content {
    margin-top: auto;
    margin-bottom: auto;
    padding: 35px 0;
    position: relative;
    z-index: 1;
}
.auth-visual-content h2 {
    font-size: 31px;
    line-height: 1.6;
    font-weight: 750;
    letter-spacing: -.5px;
    margin: 0 0 12px;
}
.auth-visual-content p {
    color: #aebbe1;
    font-size: 13px;
    line-height: 2;
    max-width: 360px;
    margin: 0;
}
.auth-features {
    list-style: none;
    margin: 23px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 9px;
}
.auth-features li {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #c4cff0;
    font-size: 13px;
}
.auth-features .feature-check {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    background: rgba(114, 141, 255, .15);
    color: #9db0ff;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
}
.auth-visual-footer {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: #7383a9;
    font-size: 13px;
    position: relative;
    z-index: 1;
}
.auth-visual-footer a { color: #a3b3e1; }

.auth-panel {
    padding: 38px 45px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}
.auth-panel-head { margin-bottom: 27px; }
.auth-panel-head .eyebrow { margin-bottom: 8px; }
.auth-panel-head h1 {
    font-size: 26.5px;
    font-weight: 750;
    letter-spacing: -.4px;
    margin: 0 0 5px;
    color: var(--ink);
}
.auth-panel-head p {
    font-size: 13px;
    color: var(--muted);
    margin: 0;
}
.auth-form { display: flex; flex-direction: column; gap: 15px; }
.auth-form .input { height: 46px; background: #fbfcfe; }
.auth-form .input:focus { background: #fff; }
.auth-form .input[dir="ltr"] {
    text-align: right;
    padding-right: 13px;
}
.auth-form .input-wrap .input[dir="ltr"] { padding-left: 38px; }
.auth-form .password-wrap .input[dir="ltr"] { padding-left: 40px; }
.auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 13px;
    color: var(--muted);
    flex-wrap: wrap;
}
.auth-submit { height: 48px; border-radius: 12px; margin-top: 2px; }
.auth-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--muted-light);
    font-size: 13px;
    margin: 2px 0;
}
.auth-divider::before, .auth-divider::after { content: ''; height: 1px; background: var(--line-soft); flex: 1; }
.auth-demo {
    background: #f8faff;
    border: 1px dashed #dbe2f7;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 13px;
    color: var(--muted);
    margin-top: 19px;
    line-height: 1.9;
    text-align: right;
}
.auth-demo strong { color: var(--ink-soft); font-weight: 600; }
.auth-demo code {
    direction: ltr;
    unicode-bidi: isolate;
    display: inline-block;
    background: #eef2ff;
    padding: 1px 5px;
    border-radius: 4px;
    color: #3e58cd;
    font-family: inherit;
    font-size: 13px;
}
.auth-footer-links {
    margin-top: 21px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--muted);
}
.auth-footer-links a { color: var(--primary); font-weight: 500; }
.auth-back {
    position: absolute;
    top: 25px;
    left: 28px;
    color: var(--muted);
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.auth-back:hover { color: var(--primary); }

.auth-page.customer-auth .auth-visual {
    background:
        radial-gradient(circle at 18% 12%, rgba(80, 210, 170, .25), transparent 34%),
        radial-gradient(circle at 85% 88%, rgba(93, 125, 255, .22), transparent 30%),
        linear-gradient(145deg, #0c1f28, #123847 55%, #115c61);
}
.auth-page.customer-auth .auth-visual .brand-mark {
    background: linear-gradient(145deg, #36d3a6, #0f9f6e);
    box-shadow: 0 9px 24px rgba(15,159,110,.3);
}

/* ---------- Invoice / payment ---------- */
.invoice-hero {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px;
    background: linear-gradient(135deg, #f8faff, #fff);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    flex-wrap: wrap;
}
.invoice-hero-icon {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    background: var(--primary-soft);
    color: var(--primary);
    flex: 0 0 auto;
}
.invoice-hero-copy { flex: 1; min-width: 160px; }
.invoice-hero-copy h2 { margin: 0; font-size: 18.5px; font-weight: 750; }
.invoice-hero-copy p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }

.invoice-summary-box {
    background: #fafbfd;
    border: 1px solid var(--line-soft);
    border-radius: 13px;
    padding: 15px;
}
.summary-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    font-size: 13px;
    color: var(--muted);
    padding: 5px 0;
}
.summary-line strong {
    color: var(--ink-soft);
    font-weight: 550;
    direction: ltr;
}
.summary-line.total {
    border-top: 1px solid var(--line);
    margin-top: 7px;
    padding-top: 11px;
    font-size: 14px;
    color: var(--ink);
    font-weight: 600;
}
.summary-line.total strong { font-size: 18.5px; font-weight: 750; color: var(--ink); }
.summary-line.paid strong { color: var(--success); }
.summary-line.due strong { color: var(--danger); }

.payment-amount-display {
    text-align: center;
    padding: 17px;
    background: linear-gradient(135deg, #f4f7ff, #fbfcff);
    border: 1px solid #e1e7fc;
    border-radius: 13px;
    margin-bottom: 16px;
}
.payment-amount-display span { display: block; font-size: 13px; color: var(--muted); }
.payment-amount-display strong {
    display: block;
    font-size: 29px;
    font-weight: 750;
    letter-spacing: -.6px;
    color: var(--primary);
    margin-top: 2px;
}

.card-info {
    display: grid;
    grid-template-columns: 1fr;
    gap: 11px;
    padding: 14px;
    background: #fbfcff;
    border: 1px dashed #d9e1f5;
    border-radius: 11px;
    margin-top: 12px;
}
.card-info-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; }
.card-info-row span { color: var(--muted); }
.card-info-row strong { color: var(--ink-soft); font-weight: 600; }
.card-number-text { direction: ltr; letter-spacing: 1.5px; font-size: 14px; }

.invoice-items-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 480px;
}
.invoice-items-table th {
    text-align: right;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    background: #f8f9fc;
    padding: 9px 12px;
    border-bottom: 1px solid var(--line-soft);
}
.invoice-items-table td {
    padding: 11px 12px;
    border-bottom: 1px solid var(--line-soft);
    font-size: 13px;
    color: var(--ink-soft);
}
.invoice-items-table tr:last-child td { border-bottom: 0; }
.invoice-items-table .line-total { font-weight: 600; color: var(--ink); }
.item-type-chip {
    font-size: 13px;
    padding: 2px 5px;
    border-radius: 4px;
    background: #f1f4f9;
    color: #78849a;
    margin-right: 5px;
}
.item-type-chip.part { background: var(--violet-soft); color: #6948d9; }
.item-type-chip.labor { background: var(--cyan-soft); color: #077d9b; }

.payment-list { display: flex; flex-direction: column; gap: 12px; }
.payment-row {
    display: flex;
    align-items: flex-start;
    gap: 12px 14px;
    padding: 14px 16px;
    border: 1px solid var(--line-soft);
    border-radius: 12px;
    background: #fcfdff;
    flex-wrap: wrap;
    transition: border-color var(--transition);
}
.payment-row:hover { border-color: #d7def0; }
.payment-row.is-pending { border-color: #f0dfb8; background: #fffdf7; }
.payment-row.is-rejected { background: #fdfafa; }
.payment-method-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: var(--primary-soft);
    color: var(--primary);
    flex: 0 0 auto;
}
.payment-row.is-pending .payment-method-icon { background: var(--warning-soft); color: #b47700; }
.payment-row.is-rejected .payment-method-icon { background: var(--danger-soft); color: var(--danger); }
.payment-main { display: flex; align-items: flex-start; gap: 12px; flex: 1 1 300px; min-width: 0; }
.payment-amount-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 7px;
    margin-inline-start: auto;
}
.payment-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 7px;
    margin-inline-start: auto;
}
.payment-copy { flex: 1; min-width: 0; }
.payment-copy strong { display: block; font-size: 13px; font-weight: 600; color: var(--ink); }
.payment-copy > span { display: block; font-size: 13px; color: var(--muted); margin-top: 3px; line-height: 1.8; }
.payment-amount {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--ink);
    white-space: nowrap;
    margin-inline-start: auto;
    padding-top: 1px;
}
.payment-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    width: 100%;
    align-items: center;
    padding-top: 12px;
    border-top: 1px dashed var(--line-soft);
    margin-top: 2px;
}
.payment-actions > form { display: flex; align-items: center; gap: 8px; margin: 0; }
.payment-actions .btn { margin: 0; }
.payment-actions.is-plain { width: auto; border-top: 0; padding-top: 0; margin-top: 0; }
.payment-review-form { flex: 1 1 240px; min-width: 0; }
.payment-review-form .btn { flex: 0 0 auto; white-space: nowrap; }
.payment-review-input {
    flex: 1;
    min-width: 0;
    width: auto;
    min-height: 34px;
    height: 34px;
    font-size: 13px;
    padding: 0 10px;
    border-radius: 9px;
}
input.payment-review-input { height: 34px; min-height: 34px; }
.payment-review-form .btn-xs { height: 34px; }
.payment-invoice-link { margin-inline-start: auto; flex: 0 0 auto; }
.payment-side .badge { font-size: 12.5px; }
@media (max-width: 640px) {
    .payment-side { flex-direction: row; align-items: center; justify-content: space-between; width: 100%; margin-inline-start: 0; }
    .payment-review-form { flex: 1 1 100%; }
    .payment-invoice-link { margin-inline-start: 0; flex: 1; justify-content: center; }
    .payment-actions.is-plain { width: 100%; }
    .payment-actions.is-plain > a { flex: 1; justify-content: center; }
}
.receipt-thumb {
    width: 42px;
    height: 42px;
    border-radius: 9px;
    object-fit: cover;
    border: 1px solid var(--line);
    background: #fff;
}
.receipt-file {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 9px;
    color: var(--muted);
    padding: 7px 9px;
    border: 1px dashed var(--line);
    border-radius: 8px;
}
.invoice-detail-foot {
    display: flex;
    gap: 20px;
    justify-content: space-between;
    flex-wrap: wrap;
    align-items: flex-start;
    margin-top: 16px;
}
.invoice-detail-foot .summary-wrap { width: min(295px, 100%); margin-inline-start: auto; }
.invoice-detail-note { flex: 1; min-width: 200px; }

.invoice-form-row {
    display: grid;
    grid-template-columns: 95px minmax(140px, 1fr) 75px 120px 110px 34px;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}
.invoice-item-field, .invoice-item-total { min-width: 0; }
.invoice-form-row .field-mini-label { display: none; font-size: 13px; font-weight: 500; color: var(--muted); margin-bottom: 6px; }
.invoice-form-row .input, .invoice-form-row .select { min-height: 40px; font-size: 13px; }
.line-total-display {
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 10px;
    background: #f8f9fc;
    border: 1px solid var(--line-soft);
    border-radius: 9px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-soft);
    white-space: nowrap;
}
.line-remove {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: #b0b9c8;
}
.line-remove:hover { background: var(--danger-soft); color: var(--danger); }

.invoice-totals-panel {
    background: #fafbfd;
    border: 1px solid var(--line-soft);
    border-radius: 13px;
    padding: 15px;
}
.total-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 13px;
}
.total-input-row span { color: var(--muted); flex: 1; }
.total-input-row .input { min-height: 36px; width: 110px; font-size: 13px; text-align: left; direction: ltr; }
.total-display-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 7px 0;
    font-size: 13px;
    color: var(--muted);
}
.total-display-row strong { color: var(--ink-soft); font-weight: 600; direction: ltr; }
.total-display-row.final {
    border-top: 1px solid var(--line);
    margin-top: 5px;
    padding-top: 11px;
    color: var(--ink);
    font-weight: 650;
    font-size: 14px;
}
.total-display-row.final strong { font-size: 19.5px; font-weight: 750; color: var(--ink); }

/* ---------- Customer panel ---------- */
.customer-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 23px 25px;
    background:
        radial-gradient(circle at 0% 100%, rgba(66, 217, 167, .14), transparent 30%),
        linear-gradient(120deg, #102535, #123b4a 60%, #0f5a5b);
    border-radius: 21px;
    color: #fff;
    margin-bottom: 20px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 14px 38px rgba(14, 43, 55, .14);
}
.customer-hero::after {
    content: '';
    position: absolute;
    width: 190px;
    height: 190px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.08);
    left: -60px;
    top: -70px;
}
.customer-hero h2 { margin: 0 0 6px; font-size: 24px; font-weight: 750; }
.customer-hero p { margin: 0; font-size: 13px; color: #a5c9cd; line-height: 1.9; }
.customer-hero .eyebrow { color: #7fe0c8; }
.customer-hero .eyebrow::before { background: #7fe0c8; }
.customer-hero-orb {
    width: 80px;
    height: 80px;
    border-radius: 24px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.12);
    display: grid;
    place-items: center;
    color: #9ae8d7;
    flex: 0 0 auto;
    z-index: 1;
}

.repair-cards {
    display: flex;
    flex-direction: column;
    gap: 11px;
}
.repair-card {
    border: 1px solid var(--line);
    border-radius: 13px;
    padding: 14px 15px;
    background: #fff;
    transition: all var(--transition);
    display: block;
    color: inherit;
}
.repair-card:hover { border-color: #cbd5f0; box-shadow: var(--shadow-sm); color: inherit; }
.repair-card-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.repair-card-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: #f3f6fd;
    color: #6a7b98;
    flex: 0 0 auto;
}
.repair-card-copy { flex: 1; min-width: 0; }
.repair-card-copy strong {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.repair-card-copy span { display: block; font-size: 13px; color: var(--muted); }
.repair-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 13px;
    color: var(--muted);
    padding-top: 10px;
    border-top: 1px dashed var(--line-soft);
    flex-wrap: wrap;
}

.repair-device-hero {
    background: linear-gradient(145deg, #f8faff, #fff);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 21px;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}
.repair-device-icon {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 17px;
    background: var(--primary-soft);
    color: var(--primary);
    flex: 0 0 auto;
}
.repair-device-copy { flex: 1; min-width: 150px; }
.repair-device-copy h2 { margin: 0; font-size: 19.5px; font-weight: 750; }
.repair-device-copy p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }

.warranty-card {
    background: linear-gradient(135deg, #0f2c26, #145c49);
    color: #fff;
    border-radius: var(--radius);
    padding: 19px;
    position: relative;
    overflow: hidden;
}
.warranty-card::after {
    content: '';
    position: absolute;
    width: 120px;
    height: 120px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 50%;
    left: -30px;
    bottom: -55px;
}
.warranty-card .warranty-icon { color: #6fe1ba; margin-bottom: 12px; }
.warranty-card h3 { font-size: 15px; margin: 0 0 4px; font-weight: 650; }
.warranty-card p { font-size: 13px; color: #a6cdc0; margin: 0; line-height: 1.9; }
.warranty-card strong { color: #fff; }

/* ---------- Public / landing ---------- */
.public-page {
    background: #f7f8fc;
    color: var(--ink);
    overflow-x: hidden;
}
.site-container { width: min(1160px, calc(100% - 40px)); margin: 0 auto; }
.public-header {
    height: 76px;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 50;
    border-bottom: 1px solid rgba(16,24,40,.06);
    background: rgba(255,255,255,.8);
    backdrop-filter: blur(16px);
}
.public-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; width: 100%; }
.site-logo { display: flex; align-items: center; gap: 11px; color: var(--ink); }
.site-logo .brand-mark { width: 40px; height: 40px; border-radius: 12px; font-size: 20.5px; }
.site-logo-copy strong { display: block; font-size: 16px; font-weight: 750; line-height: 1.5; }
.site-logo-copy span { display: block; font-size: 13px; color: var(--muted); }
.site-nav { display: flex; align-items: center; gap: 24px; }
.site-nav a { color: #5a6579; font-size: 13px; font-weight: 500; }
.site-nav a:hover { color: var(--primary); }
.site-header-actions { display: flex; align-items: center; gap: 8px; }
.public-main { overflow: hidden; }

.public-hero {
    padding: 68px 0 70px;
    position: relative;
}
.public-hero::before {
    content: '';
    position: absolute;
    top: -140px;
    right: 46%;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(73, 109, 255, .1), transparent 65%);
    pointer-events: none;
}
.public-hero-grid {
    display: grid;
    grid-template-columns: 1.02fr .98fr;
    gap: 55px;
    align-items: center;
    position: relative;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 11px;
    border-radius: 30px;
    background: #eef2ff;
    color: #3753c8;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid #dde4ff;
    margin-bottom: 18px;
}
.hero-badge span {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #40c99a;
    box-shadow: 0 0 0 3px rgba(64,201,154,.13);
}
.public-hero h1 {
    font-size: clamp(32px, 4.3vw, 52px);
    line-height: 1.35;
    letter-spacing: -1.7px;
    font-weight: 800;
    margin: 0 0 19px;
    color: #101828;
}
.public-hero h1 .gradient-text {
    display: inline-block;
    background: linear-gradient(100deg, #3454f5 20%, #7d5dfb 52%, #1b9f81 90%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.public-hero-lead {
    font-size: 15px;
    line-height: 2.15;
    color: #667085;
    max-width: 490px;
    margin: 0 0 28px;
}
.public-hero-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 30px; }
.trust-row { display: flex; align-items: center; gap: 19px; flex-wrap: wrap; }
.trust-item { display: flex; align-items: center; gap: 7px; color: #7c8798; font-size: 13px; }
.trust-item svg { color: #18a47a; }
.trust-divider { width: 1px; height: 22px; background: #e5e9f1; }

.hero-mockup {
    position: relative;
    perspective: 1400px;
}
.hero-mockup-glow {
    position: absolute;
    inset: 6% 2% 2% 2%;
    background: radial-gradient(ellipse at 50% 50%, rgba(70,100,245,.18), transparent 62%);
    filter: blur(18px);
}
.mock-window {
    position: relative;
    background: #fff;
    border: 1px solid #e6eaf2;
    border-radius: 18px;
    box-shadow: 0 30px 80px rgba(26, 40, 92, .14), 0 3px 10px rgba(26,40,92,.04);
    transform: rotateY(-4deg) rotateX(2deg);
    overflow: hidden;
}
.mock-topbar {
    height: 44px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 14px;
    border-bottom: 1px solid #eef1f6;
    background: #fbfcfe;
}
.mock-dot { width: 7px; height: 7px; border-radius: 50%; background: #e3e7ef; }
.mock-dot:nth-child(1) { background: #ffb6b8; }
.mock-dot:nth-child(2) { background: #ffdda1; }
.mock-dot:nth-child(3) { background: #a7e8cd; }
.mock-address {
    margin-inline-start: auto;
    margin-inline-end: auto;
    width: 42%;
    height: 15px;
    border-radius: 5px;
    background: #f0f3f8;
}
.mock-layout { display: flex; min-height: 335px; }
.mock-side {
    width: 78px;
    background: #111d33;
    padding: 15px 11px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.mock-side-logo { width: 28px; height: 28px; border-radius: 9px; background: linear-gradient(145deg,#6382ff,#3454f5); margin-bottom: 12px; }
.mock-side-item { height: 8px; border-radius: 4px; background: rgba(255,255,255,.09); }
.mock-side-item.active { background: rgba(116,141,255,.32); }
.mock-content { flex: 1; padding: 17px; background: #f7f8fc; min-width: 0; }
.mock-page-head { display: flex; align-items: center; gap: 8px; margin-bottom: 15px; }
.mock-title { width: 90px; height: 10px; border-radius: 4px; background: #dce1eb; }
.mock-plus { margin-inline-start: auto; width: 45px; height: 18px; border-radius: 6px; background: #3454f5; box-shadow: 0 4px 10px rgba(52,84,245,.24); }
.mock-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.mock-stat { background: #fff; border: 1px solid #edf0f6; border-radius: 9px; padding: 10px; }
.mock-stat-line { width: 65%; height: 5px; background: #eef1f7; border-radius: 3px; margin-bottom: 7px; }
.mock-stat-value { width: 45%; height: 10px; background: #343f57; border-radius: 3px; }
.mock-chart { height: 95px; background: #fff; border: 1px solid #edf0f6; border-radius: 10px; padding: 12px; margin-bottom: 10px; display: flex; align-items: flex-end; gap: 6px; }
.mock-bar { flex: 1; border-radius: 3px 3px 0 0; background: linear-gradient(180deg, #7c93ff, #dfe5ff); }
.mock-table { background: #fff; border: 1px solid #edf0f6; border-radius: 10px; padding: 10px; }
.mock-row { display: flex; align-items: center; gap: 7px; padding: 5px 0; border-bottom: 1px solid #f2f4f8; }
.mock-row:last-child { border-bottom: 0; }
.mock-avatar { width: 15px; height: 15px; border-radius: 5px; background: #e8ecf6; }
.mock-row-line { width: 38%; height: 5px; background: #edf0f6; border-radius: 3px; }
.mock-row-pill { margin-inline-start: auto; width: 32px; height: 10px; background: #e7f8f1; border-radius: 4px; }
.hero-float-card {
    position: absolute;
    left: -22px;
    bottom: 24px;
    background: rgba(255,255,255,.95);
    border: 1px solid #e6eaf2;
    box-shadow: 0 15px 40px rgba(26,40,92,.14);
    border-radius: 12px;
    padding: 10px 13px;
    display: flex;
    align-items: center;
    gap: 9px;
    animation: floatCard 5s ease-in-out infinite;
}
.hero-float-card .float-icon {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    background: #e9f9f2;
    color: #0f9f6e;
}
.hero-float-card strong { display: block; font-size: 13px; color: var(--ink); }
.hero-float-card span { display: block; font-size: 13px; color: var(--muted); }
@keyframes floatCard {
    0%,100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.public-section { padding: 66px 0; }
.public-section.soft { background: #fff; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.public-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 30px;
}
.public-stats > .card { padding: 20px; display: flex; align-items: center; gap: 12px; }
.public-stats .stat-icon { flex: 0 0 auto; }
.public-stats strong { font-size: 22px; }
.section-intro { text-align: center; max-width: 540px; margin: 0 auto 36px; }
.section-intro .eyebrow { justify-content: center; }
.section-intro .eyebrow::before { display: none; }
.section-intro h2 { font-size: 30px; font-weight: 750; letter-spacing: -.6px; margin: 0 0 9px; }
.section-intro p { color: #667085; font-size: 13px; margin: 0; line-height: 2; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.feature-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 17px;
    padding: 22px;
    transition: all 220ms ease;
}
.feature-card:hover { transform: translateY(-3px); box-shadow: 0 15px 40px rgba(16,24,40,.06); border-color: #dce2f0; }
.feature-icon {
    width: 43px;
    height: 43px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    margin-bottom: 15px;
    background: var(--primary-soft);
    color: var(--primary);
}
.feature-card:nth-child(2) .feature-icon { background: #e9f9f2; color: #0f9f6e; }
.feature-card:nth-child(3) .feature-icon { background: #f2efff; color: #7450e8; }
.feature-card:nth-child(4) .feature-icon { background: #fff7e6; color: #bb7a05; }
.feature-card:nth-child(5) .feature-icon { background: #e8f8fc; color: #087f9e; }
.feature-card:nth-child(6) .feature-icon { background: #ffeff1; color: #d1445a; }
.feature-card h3 { font-size: 15px; font-weight: 700; margin: 0 0 6px; }
.feature-card p { font-size: 13px; line-height: 2; color: var(--muted); margin: 0; }

.process-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; position: relative; }
.process-card { text-align: center; position: relative; padding: 0 8px; }
.process-num {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    background: #fff;
    border: 1px solid #dde4f7;
    color: var(--primary);
    font-size: 17.5px;
    line-height: 1;
    font-weight: 750;
    display: grid;
    place-items: center;
    margin: 0 auto 13px;
    position: relative;
    z-index: 1;
    box-shadow: 0 5px 15px rgba(52,84,245,.07);
}
.process-card:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 21px;
    right: calc(50% + 30px);
    left: calc(-50% + 30px);
    height: 1px;
    background: repeating-linear-gradient(90deg, #dce2ef 0 4px, transparent 4px 8px);
}
.process-card h3 { font-size: 14.5px; margin: 0 0 5px; }
.process-card p { color: var(--muted); font-size: 13px; line-height: 1.9; margin: 0; }

.track-panel {
    background:
        radial-gradient(circle at 85% 20%, rgba(102,129,255,.22), transparent 30%),
        linear-gradient(120deg, #101d39, #182c62 55%, #2745b7);
    border-radius: 23px;
    padding: 36px;
    color: #fff;
    display: grid;
    grid-template-columns: 1fr 1.05fr;
    align-items: center;
    gap: 35px;
    overflow: hidden;
    position: relative;
}
.track-panel::after {
    content: '';
    position: absolute;
    width: 260px;
    height: 260px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 50%;
    left: -90px;
    bottom: -130px;
}
.track-panel h2 { font-size: 27.5px; font-weight: 750; margin: 0 0 8px; letter-spacing: -.4px; }
.track-panel p { color: #aebbe0; font-size: 13px; line-height: 2; margin: 0; }
.track-form {
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 16px;
    padding: 17px;
    backdrop-filter: blur(8px);
    position: relative;
    z-index: 1;
}
.track-form .field label { color: #c3cde9; }
.track-form .input { background: rgba(255,255,255,.95); border-color: transparent; height: 42px; }
.track-form .btn { height: 42px; }
.track-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-bottom: 9px; }

.public-footer { padding: 30px 0; border-top: 1px solid var(--line); background: #fff; }
.public-footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 15px; flex-wrap: wrap; }
.public-footer p { margin: 0; color: var(--muted); font-size: 13px; }
.footer-links { display: flex; gap: 17px; font-size: 13px; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--primary); }

/* ---------- Tracking page ---------- */
.tracking-page {
    min-height: 100vh;
    background: radial-gradient(circle at 50% 0%, #e9edff, transparent 40%), #f6f7fb;
    padding: 30px 16px 50px;
}
.tracking-wrap { width: min(860px, 100%); margin: 0 auto; }
.tracking-topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 35px; }
.tracking-card { background: #fff; border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow-md); overflow: hidden; }
.tracking-head {
    padding: 27px;
    background: linear-gradient(140deg, #f8faff, #fff);
    border-bottom: 1px solid var(--line-soft);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}
.tracking-head h1 { font-size: 23px; font-weight: 750; margin: 0 0 5px; }
.tracking-head p { margin: 0; font-size: 13px; color: var(--muted); }
.tracking-body { padding: 25px; }
.track-device-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 15px;
    border: 1px solid var(--line-soft);
    background: #fbfcfe;
    border-radius: 13px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}
.track-device-card .repair-device-icon { width: 48px; height: 48px; border-radius: 13px; }
.track-device-card h2 { margin: 0; font-size: 17.5px; }
.track-device-card p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.track-code-display {
    margin-inline-start: auto;
    text-align: center;
    background: #fff;
    border: 1px dashed #d6def2;
    border-radius: 10px;
    padding: 7px 12px;
}
.track-code-display span { display: block; font-size: 13px; color: var(--muted); }
.track-code-display strong { font-size: 14px; direction: ltr; display: block; letter-spacing: .5px; }
.track-details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 13px;
    margin-bottom: 24px;
}
.track-detail-item {
    background: #fafbfd;
    border: 1px solid var(--line-soft);
    border-radius: 10px;
    padding: 11px 13px;
}
.track-detail-item span { display: block; font-size: 13px; color: var(--muted); }
.track-detail-item strong { display: block; font-size: 13px; color: var(--ink-soft); font-weight: 550; margin-top: 2px; }
.tracking-search-card { max-width: 460px; margin: 70px auto; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 30px; box-shadow: var(--shadow-md); }
.tracking-search-logo { display: flex; justify-content: center; margin-bottom: 18px; }
.tracking-search-card h1 { text-align: center; font-size: 23px; font-weight: 750; margin: 0 0 6px; }
.tracking-search-card > p { text-align: center; font-size: 13px; color: var(--muted); margin: 0 0 24px; line-height: 1.9; }
.tracking-search-card .field { margin-bottom: 12px; }
.tracking-search-card .btn { height: 46px; }
.tracking-search-footer { text-align: center; margin-top: 15px; font-size: 13px; color: var(--muted); }

/* ---------- Print ---------- */
.print-page { background: #eef0f5; color: #111827; }
.print-toolbar {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid #e2e6ee;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.print-toolbar-copy { font-size: 12px; color: #667085; line-height: 1.6; }
.print-toolbar-actions { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; }
.print-toolbar-actions .btn { min-width: 150px; white-space: nowrap; }
.print-toolbar-actions .label-copies-form { flex: 0 0 auto; gap: 8px; font-size: 13.5px; color: var(--ink-soft); }
.print-toolbar-actions input.input { height: 35px; min-height: 35px; padding: 0 10px; font-size: 14px; }
.print-sheet {
    width: 210mm;
    min-height: 296mm;
    margin: 24px auto 50px;
    background: #fff;
    box-shadow: 0 10px 50px rgba(16,24,40,.1);
    padding: 15mm 16mm;
    position: relative;
    display: flex;
    flex-direction: column;
    font-size: 11.5px;
    line-height: 1.8;
}
.print-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; border-bottom: 2px solid #1b2a4a; padding-bottom: 14px; margin-bottom: 15px; }
.print-brand { display: flex; align-items: center; gap: 12px; }
.print-brand .brand-mark { width: 48px; height: 48px; }
.print-brand h1 { margin: 0; font-size: 19px; font-weight: 800; color: #16213e; }
.print-brand p { margin: 2px 0 0; color: #667085; font-size: 10.5px; }
.print-brand-contact { margin-top: 5px; display: flex; flex-wrap: wrap; gap: 10px; font-size: 9.5px; color: #667085; }
.print-title { text-align: left; }
.print-title h2 { margin: 0 0 5px; font-size: 22px; font-weight: 800; color: #16213e; letter-spacing: .5px; }
.print-title span { display: inline-block; background: #f0f3fa; padding: 3px 9px; border-radius: 5px; font-size: 10.5px; direction: ltr; letter-spacing: .5px; }
.print-meta-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; margin-bottom: 13px; }
.print-meta-box { border: 1px solid #e5e9f1; border-radius: 7px; padding: 8px 11px; }
.print-meta-box > span { display: block; color: #8a94a6; font-size: 9.5px; margin-bottom: 1px; }
.print-meta-box strong { font-size: 11.5px; font-weight: 600; color: #344054; }
.print-meta-box small { display: block; color: #667085; font-size: 9.5px; margin-top: 1px; }
.print-section { margin-bottom: 12px; }
.print-section-title { font-size: 11.5px; font-weight: 700; margin: 0 0 6px; padding-bottom: 4px; border-bottom: 1px solid #e8ebf2; color: #1f2d4d; }
.print-table { width: 100%; border-collapse: collapse; }
.print-table th { background: #f5f7fb; color: #526079; padding: 5px 9px; font-size: 10px; text-align: right; border-bottom: 1px solid #e2e7f0; }
.print-table td { padding: 6px 9px; font-size: 10.5px; border-bottom: 1px solid #eff1f6; color: #344054; }
.print-table .text-end { text-align: left; }
.print-summary { display: flex; justify-content: flex-end; margin-top: 6px; }
.print-summary-inner { width: 265px; }
.print-summary-row { display: flex; justify-content: space-between; gap: 10px; padding: 3px 8px; font-size: 10.5px; color: #667085; }
.print-summary-row strong { color: #344054; font-weight: 600; }
.print-summary-row.total { border-top: 1.5px solid #1b2a4a; margin-top: 3px; padding-top: 6px; color: #16213e; font-size: 12.5px; font-weight: 700; }
.print-summary-row.total strong { font-size: 14.5px; font-weight: 800; }
.print-summary-row.paid strong { color: #0f8a60; }
.print-summary-row.due strong { color: #c73338; }
.print-notes { background: #f8fafc; border: 1px solid #e8ecf3; border-radius: 7px; padding: 8px 11px; font-size: 9.5px; color: #667085; line-height: 1.75; }
.print-footer { margin-top: auto; border-top: 1px dashed #d8dde7; padding-top: 8px; display: flex; justify-content: space-between; align-items: flex-end; gap: 15px; font-size: 9px; color: #8a94a6; }
.print-signatures { display: flex; gap: 40px; }
.print-signature { text-align: center; min-width: 110px; }
.print-signature span { display: block; margin-bottom: 18px; color: #7a8496; }
.print-signature strong { display: block; border-top: 1px solid #dfe3eb; padding-top: 3px; font-size: 9px; font-weight: 500; color: #667085; }
.print-qr { text-align: center; }
.print-qr img, .print-qr canvas { width: 64px; height: 64px; display: block; }
.print-qr span { display: block; font-size: 8px; color: #8a94a6; margin-top: 3px; }
.receipt-sheet {
    width: 148mm;
    min-height: 210mm;
    padding: 11mm 12mm;
    font-size: 10px;
    display: flex;
    flex-direction: column;
}
.receipt-sheet .print-header { align-items: center; gap: 18px; padding-bottom: 12px; margin-bottom: 14px; }
.receipt-sheet .print-brand .brand-mark { width: 46px; height: 46px; font-size: 18px; border-radius: 12px; }
.receipt-sheet .print-brand h1 { font-size: 18px; }
.receipt-sheet .print-brand p { font-size: 9.5px; }
.receipt-sheet .print-brand-contact { gap: 12px; font-size: 9px; }
.receipt-sheet .print-title { flex: 0 0 auto; text-align: left; }
.receipt-sheet .print-title h2 { font-size: 20px; }
.receipt-sheet .print-title span { font-size: 9px; }
.receipt-sheet .print-meta-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.receipt-sheet .print-meta-box { padding: 8px 10px; }
.receipt-sheet .print-meta-box > span { font-size: 8px; }
.receipt-sheet .print-meta-box strong { font-size: 10px; }
.receipt-sheet .print-meta-box small { font-size: 8.5px; }
.receipt-sheet .print-section { margin-bottom: 10px; }
.receipt-sheet .print-section-title { font-size: 10.5px; margin-bottom: 6px; }
.receipt-sheet .print-table th, .receipt-sheet .print-table td { padding: 6px 8px; font-size: 9px; }
.receipt-sheet .print-notes { padding: 9px 11px; font-size: 8.5px; }
.receipt-sheet .print-footer {
    position: static;
    margin-top: auto;
    padding-top: 8px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: end;
    gap: 14px;
}
.receipt-sheet .print-qr { margin: 0; }
.receipt-sheet .print-qr img, .receipt-sheet .print-qr canvas { width: 56px; height: 56px; }
.receipt-sheet .print-signatures { display: flex; gap: 18px; }
.receipt-sheet .print-signature { min-width: 80px; }
.receipt-sheet .print-signature span { margin-bottom: 15px; }
.receipt-footer-note { font-size: 8px; line-height: 1.9; color: #8a94a6; min-width: 0; }
.print-badge { display: inline-block; background: #e9f9f2; color: #087f59; padding: 3px 8px; border-radius: 5px; font-size: 9.5px; font-weight: 600; }
.print-badge.unpaid { background: #fff0f0; color: #c52b31; }

/* ---------- Installer ---------- */
.installer-page {
    background: #f3f5fa;
    min-height: 100vh;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.installer-shell {
    width: 100%;
    max-width: 1250px;
    min-height: 720px;
    background: #fff;
    border: 1px solid #e4e8f0;
    border-radius: 24px;
    box-shadow: 0 30px 90px rgba(16,24,40,.1);
    display: grid;
    grid-template-columns: 365px minmax(0, 1fr);
    overflow: hidden;
}
.installer-aside {
    background:
        radial-gradient(circle at 20% 10%, rgba(108,136,255,.3), transparent 33%),
        radial-gradient(circle at 80% 90%, rgba(52,211,153,.12), transparent 30%),
        linear-gradient(155deg, #101a30, #172755 60%, #213aa3);
    color: #fff;
    padding: 31px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}
.installer-aside::after {
    content: '';
    position: absolute;
    width: 280px;
    height: 280px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 50%;
    left: -130px;
    bottom: -100px;
}
.installer-aside .brand { position: relative; z-index: 1; }
.installer-aside-content { margin: auto 0; padding: 40px 0; position: relative; z-index: 1; }
.installer-aside-content h1 {
    font-size: 27.5px;
    line-height: 1.65;
    letter-spacing: -.5px;
    font-weight: 750;
    margin: 0 0 12px;
}
.installer-aside-content > p {
    color: #aebbe0;
    font-size: 13px;
    line-height: 2;
    margin: 0;
}
.installer-features { list-style: none; padding: 0; margin: 24px 0 0; display: flex; flex-direction: column; gap: 10px; }
.installer-features li { display: flex; gap: 8px; align-items: center; color: #c3cdec; font-size: 13px; }
.installer-features li span {
    width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    border-radius: 6px;
    background: rgba(107,134,255,.16);
    color: #a7b8ff;
    font-size: 13px;
    flex: 0 0 auto;
}
.installer-aside-footer { display: flex; justify-content: space-between; color: #6f80a9; font-size: 13px; z-index: 1; }
.installer-main { padding: 38px 48px 30px; overflow-y: auto; max-height: 880px; }
.installer-head { margin-bottom: 23px; }
.installer-head h2 { font-size: 26.5px; font-weight: 750; letter-spacing: -.4px; margin: 0 0 6px; }
.installer-head p { color: var(--muted); font-size: 13px; margin: 0; }
.installer-form { display: flex; flex-direction: column; gap: 19px; }
.install-section {
    border: 1px solid var(--line);
    border-radius: 15px;
    padding: 17px 19px;
    background: #fff;
}
.install-section-head { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 15px; }
.step-number {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 13px;
    line-height: 1;
    font-weight: 700;
    flex: 0 0 auto;
}
.install-section-head h3 { margin: 0; font-size: 14.5px; font-weight: 700; }
.install-section-head p { margin: 1px 0 0; font-size: 13px; color: var(--muted); }
.requirement-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 7px; }
.requirement-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fafbfd;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    padding: 7px 9px;
}
.requirement-item > span {
    width: 18px;
    height: 18px;
    border-radius: 5px;
    display: grid;
    place-items: center;
    font-size: 13px;
    font-weight: 700;
    background: #eef1f6;
    color: #8490a3;
    flex: 0 0 auto;
}
.requirement-item.is-ok > span { background: var(--success-soft); color: var(--success); }
.requirement-item.is-error > span { background: var(--danger-soft); color: var(--danger); }
.requirement-item.is-warning > span { background: var(--warning-soft); color: var(--warning); }
.requirement-item div { min-width: 0; }
.requirement-item strong { display: block; font-size: 13px; color: var(--ink-soft); font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.requirement-item small { display: block; font-size: 13px; color: var(--muted-light); }
.installer-form .form-grid { gap: 12px; }
.installer-form .field label { font-size: 13px; }
.installer-form .input { min-height: 39px; font-size: 13px; }
.installer-form .field-hint, .installer-form .field small { font-size: 13px; color: var(--muted-light); line-height: 1.7; }
.install-submit { height: 47px; }
.installer-terms { text-align: center; font-size: 13px; color: var(--muted-light); margin: -9px 0 0; }
.installer-footer { text-align: center; font-size: 13px; color: #a4adbc; margin-top: 20px; }
.installer-card { max-width: 560px; margin: 55px auto; text-align: center; }
.install-complete { padding: 20px; }
.complete-icon {
    width: 65px;
    height: 65px;
    display: grid;
    place-items: center;
    margin: 0 auto 18px;
    border-radius: 20px;
    background: linear-gradient(145deg, #e4fbf2, #ccf7e5);
    color: #0f9f6e;
    font-size: 30px;
    line-height: 1;
    font-weight: 700;
    box-shadow: 0 12px 30px rgba(15,159,110,.12);
}
.installer-card h2 { font-size: 26.5px; font-weight: 750; margin: 0 0 9px; letter-spacing: -.4px; }
.installer-card > p { color: var(--muted); font-size: 13px; line-height: 2; margin: 0 auto 20px; max-width: 430px; }
.success-credentials { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin: 20px 0; }
.success-credentials > div { background: #f8fafc; border: 1px solid var(--line-soft); border-radius: 10px; padding: 11px; text-align: right; }
.success-credentials span { display: block; font-size: 13px; color: var(--muted); }
.success-credentials strong { display: block; font-size: 13px; margin-top: 2px; color: var(--ink); }
.install-actions { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin: 17px 0; }
.install-warning { background: var(--warning-soft); color: #865800; padding: 10px 13px; border-radius: 9px; font-size: 13px; line-height: 1.9; text-align: right; }
.security-note { font-size: 13px; color: var(--muted-light); }
.installer-card code, .install-warning code { direction: ltr; display: inline-block; background: #f0f3f9; padding: 1px 4px; border-radius: 4px; font-family: inherit; }

/* ---------- Installer wizard ---------- */
.installer-wizard {
    max-width: 1330px;
    min-height: 760px;
    grid-template-columns: 350px minmax(0, 1fr);
}
.installer-wizard .installer-aside { padding: 32px 30px 24px; }
.installer-wizard-aside {
    margin: auto 0;
    padding: 34px 0 22px;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.installer-wizard-aside > h1 {
    font-size: 25.5px;
    line-height: 1.7;
    letter-spacing: -.4px;
    font-weight: 750;
    margin: 2px 0 0;
}
.installer-wizard-aside > p {
    color: #aebbe0;
    font-size: 13px;
    line-height: 2;
    margin: 0;
}
.installer-steps {
    list-style: none;
    margin: 22px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
    counter-reset: install-step;
}
.installer-steps li {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 10px 11px;
    border-radius: 12px;
    border: 1px solid transparent;
    position: relative;
    transition: background 180ms ease, border-color 180ms ease;
}
.installer-steps li + li::before {
    content: '';
    position: absolute;
    top: -3px;
    right: 24px;
    width: 1px;
    height: 6px;
    background: rgba(255,255,255,.16);
}
.installer-step-marker {
    width: 28px;
    height: 28px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.12);
    color: #9fb1ff;
    font-size: 13px;
    font-weight: 700;
    flex: 0 0 auto;
    transition: all 180ms ease;
}
.installer-step-copy { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.installer-step-copy strong { font-size: 13px; font-weight: 600; color: #dbe3f7; }
.installer-step-copy small { font-size: 13px; color: #8294bd; line-height: 1.7; }
.installer-steps li.is-active {
    background: rgba(255,255,255,.08);
    border-color: rgba(255,255,255,.14);
}
.installer-steps li.is-active .installer-step-marker {
    background: #fff;
    border-color: #fff;
    color: #20347d;
    box-shadow: 0 7px 18px rgba(4,10,30,.28);
}
.installer-steps li.is-active .installer-step-copy strong { color: #fff; }
.installer-steps li.is-active .installer-step-copy small { color: #b5c2e4; }
.installer-steps li.is-done .installer-step-marker {
    background: rgba(52,211,153,.18);
    border-color: rgba(52,211,153,.35);
    color: #6ee7b7;
}
.installer-steps li.is-done .installer-step-copy strong { color: #c8d5f2; }
.installer-aside-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 20px;
    padding: 12px 13px;
    border-radius: 13px;
    border: 1px solid rgba(255,255,255,.1);
    background: rgba(255,255,255,.06);
    position: relative;
    z-index: 1;
}
.installer-aside-note-icon {
    width: 21px;
    height: 21px;
    border-radius: 7px;
    display: grid;
    place-items: center;
    background: rgba(167,184,255,.16);
    color: #a7b8ff;
    font-size: 13px;
    font-weight: 700;
    flex: 0 0 auto;
    margin-top: 1px;
}
.installer-aside-note strong { display: block; font-size: 13px; color: #dbe3f7; margin-bottom: 2px; }
.installer-aside-note p { margin: 0; font-size: 13px; line-height: 1.9; color: #8fa0c9; }
.installer-wizard .installer-aside-footer {
    margin-top: auto;
    position: relative;
    z-index: 1;
    padding-top: 18px;
}

.installer-wizard .installer-main {
    padding: 34px 44px 28px;
    max-height: 920px;
}
.installer-wizard-head { margin-bottom: 20px; }
.installer-wizard-head h2 {
    font-size: 26.5px;
    font-weight: 750;
    letter-spacing: -.4px;
    margin: 0 0 6px;
    color: var(--ink);
}
.installer-wizard-head > p {
    margin: 0;
    font-size: 13px;
    color: var(--muted);
    line-height: 2;
    max-width: 720px;
}
.installer-step-kicker {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--primary);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 7px;
}
.installer-step-kicker .dot-sep {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #b9c3da;
    display: inline-block;
}
.installer-alert { margin-bottom: 16px; font-size: 13px; line-height: 1.9; }
.installer-alert .alert-list { margin: 5px 0 0; display: flex; flex-direction: column; gap: 2px; }

.installer-status {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: #fbfcfe;
    margin-bottom: 16px;
}
.installer-status.compact { padding: 11px 14px; }
.installer-status-icon {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    font-size: 15px;
    font-weight: 700;
    background: #eef1f6;
    color: #8490a3;
    flex: 0 0 auto;
}
.installer-status strong { display: block; font-size: 13px; color: var(--ink); margin-bottom: 2px; }
.installer-status p { margin: 0; font-size: 13px; line-height: 1.9; color: var(--muted); }
.installer-status.is-ok { background: linear-gradient(180deg, #f3fdf9, #fbfefd); border-color: #c9f0e1; }
.installer-status.is-ok .installer-status-icon { background: var(--success-soft); color: var(--success); }
.installer-status.is-error { background: #fffafa; border-color: #ffd9da; }
.installer-status.is-error .installer-status-icon { background: var(--danger-soft); color: var(--danger); }

.installer-wizard .installer-requirement-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 16px;
}
.installer-wizard .requirement-item {
    align-items: flex-start;
    padding: 10px 11px;
    border-radius: 10px;
    background: #fff;
}
.installer-wizard .requirement-state {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    display: grid;
    place-items: center;
    font-size: 13px;
    font-weight: 700;
    background: #eef1f6;
    color: #8490a3;
    flex: 0 0 auto;
}
.installer-wizard .requirement-item.is-ok .requirement-state { background: var(--success-soft); color: var(--success); }
.installer-wizard .requirement-item.is-error .requirement-state { background: var(--danger-soft); color: var(--danger); }
.installer-wizard .requirement-item.is-warning .requirement-state { background: var(--warning-soft); color: var(--warning); }
.installer-wizard .requirement-copy { min-width: 0; }
.installer-wizard .requirement-copy strong {
    display: block;
    font-size: 13px;
    color: var(--ink-soft);
    font-weight: 600;
    white-space: normal;
    overflow: visible;
}
.installer-wizard .requirement-copy small {
    display: block;
    margin-top: 1px;
    font-size: 13px;
    color: var(--muted-light);
    overflow-wrap: anywhere;
}
.installer-wizard .requirement-copy em {
    display: block;
    margin-top: 4px;
    font-style: normal;
    font-size: 13px;
    line-height: 1.8;
    color: var(--muted);
}

.installer-help {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fbfcfe;
    padding: 12px 14px;
    margin-bottom: 16px;
}
.installer-help summary {
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-soft);
}
.installer-help ul {
    margin: 9px 0 0;
    padding-inline-start: 17px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 13px;
    line-height: 1.9;
    color: var(--muted);
}
.installer-help code,
.installer-callout code,
.installer-success code,
.installer-delete-warning code,
.installer-review-list code {
    direction: ltr;
    display: inline-block;
    background: #f0f3f9;
    padding: 1px 4px;
    border-radius: 4px;
    font-family: inherit;
    font-size: .95em;
}

.installer-form-section {
    border: 1px solid var(--line);
    border-radius: 15px;
    background: #fff;
    padding: 17px 19px;
    margin-bottom: 15px;
}
.installer-section-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding-bottom: 10px;
    margin-bottom: 14px;
    border-bottom: 1px dashed var(--line-soft);
}
.installer-section-title > span { font-size: 13px; font-weight: 700; color: var(--ink); }
.installer-section-title > small { font-size: 13px; color: var(--muted-light); }
.installer-form .form-grid { gap: 13px; }
.installer-form .installer-form-section,
.installer-form > .installer-callout,
.installer-form > .installer-inline-note,
.installer-form > .installer-form-actions { margin-top: 0; margin-bottom: 0; }
.installer-form .field label { font-size: 13px; }
.installer-form .input,
.installer-form .select { min-height: 41px; font-size: 13px; }
.installer-form .textarea { min-height: 76px; font-size: 13px; }
.installer-form .field-hint { font-size: 13px; }
.installer-form .field-error { font-size: 13px; }
.installer-form .input.is-invalid,
.installer-form .select.is-invalid,
.installer-form .textarea.is-invalid,
.installer-form .check-card.is-invalid {
    border-color: #f3b4b6;
    background: #fffafa;
}
.installer-form .check-card { padding: 12px 13px; }
.installer-form .check-card-copy strong { font-size: 13px; }
.installer-form .check-card-copy small { font-size: 13px; }
.installer-mini-check {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 5px;
    font-size: 13px;
    color: var(--muted);
    cursor: pointer;
}
.installer-mini-check input { accent-color: var(--primary); }
.installer-prefix-note { margin: 9px 0 0; }

.installer-diagnostics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    background: var(--line-soft);
    border: 1px solid var(--line-soft);
    border-radius: 12px;
    overflow: hidden;
}
.installer-diagnostics > div {
    background: #fff;
    padding: 9px 11px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.installer-diagnostics span { font-size: 13px; color: var(--muted); }
.installer-diagnostics strong {
    font-size: 13px;
    color: var(--ink-soft);
    font-weight: 600;
    overflow-wrap: anywhere;
    line-height: 1.7;
}

.installer-callout {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 13px 15px;
    border-radius: 13px;
    border: 1px solid var(--line);
    background: #fbfcfe;
    margin-bottom: 16px;
}
.installer-callout.compact { padding: 10px 13px; margin-bottom: 14px; }
.installer-callout-icon {
    width: 28px;
    height: 28px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    background: #eef1f6;
    color: #6d7a90;
    font-size: 13px;
    font-weight: 700;
    flex: 0 0 auto;
}
.installer-callout strong { display: block; font-size: 13px; color: var(--ink); margin-bottom: 2px; }
.installer-callout p { margin: 0; font-size: 13px; line-height: 1.9; color: var(--muted); }
.installer-callout p + p { margin-top: 3px; }
.installer-callout .installer-callout-note { color: var(--muted-light); font-size: 13px; }
.installer-callout.is-info { background: #f5f8ff; border-color: #dbe4ff; }
.installer-callout.is-info .installer-callout-icon { background: var(--primary-soft); color: var(--primary); }
.installer-callout.is-warning { background: var(--warning-soft); border-color: #f5e3bb; }
.installer-callout.is-warning .installer-callout-icon { background: #fceecb; color: #b47c00; }
.installer-callout.is-warning strong { color: #7c5300; }
.installer-callout.is-warning p { color: #8a641f; }

.installer-form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 16px;
    padding-top: 15px;
    border-top: 1px dashed var(--line-soft);
}
.installer-form-actions .btn { min-width: 150px; }
.installer-action-note {
    flex: 1 1 280px;
    font-size: 13px;
    line-height: 1.9;
    color: var(--muted);
}
.installer-terms {
    text-align: center;
    font-size: 13px;
    color: var(--muted-light);
    margin: 9px 0 0;
}

.installer-inline-note {
    border: 1px dashed #d5def6;
    background: #f7f9ff;
    color: #4e5f87;
    border-radius: 10px;
    padding: 9px 11px;
    font-size: 13px;
    line-height: 1.9;
    margin-bottom: 13px;
}
.installer-password-rules {
    list-style: none;
    margin: 11px 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.installer-password-rules li {
    font-size: 13px;
    color: var(--muted);
    background: #f4f6fa;
    border: 1px solid var(--line-soft);
    border-radius: 20px;
    padding: 3px 9px;
}

.installer-review-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 15px;
}
.installer-review-card {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    padding: 14px 15px;
}
.installer-review-card > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-bottom: 9px;
    margin-bottom: 9px;
    border-bottom: 1px dashed var(--line-soft);
}
.installer-review-card > header > div { display: flex; align-items: center; gap: 8px; }
.installer-review-card > header strong { font-size: 13px; color: var(--ink); }
.installer-review-card > header a {
    font-size: 13px;
    color: var(--primary);
    text-decoration: none;
    border: 1px solid #dbe4ff;
    background: #f5f8ff;
    border-radius: 7px;
    padding: 3px 8px;
    transition: all var(--transition);
}
.installer-review-card > header a:hover { background: var(--primary-soft); }
.installer-review-icon {
    width: 25px;
    height: 25px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .3px;
}
.installer-review-list { margin: 0; display: flex; flex-direction: column; }
.installer-review-list > div {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 5px 0;
    border-bottom: 1px dashed var(--line-soft);
}
.installer-review-list > div:last-child { border-bottom: 0; padding-bottom: 0; }
.installer-review-list dt { font-size: 13px; color: var(--muted); flex: 0 0 auto; }
.installer-review-list dd {
    margin: 0;
    font-size: 13px;
    color: var(--ink-soft);
    font-weight: 500;
    text-align: left;
    overflow-wrap: anywhere;
}

.installer-install-plan {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fbfcfe;
    padding: 15px 16px;
    margin-bottom: 15px;
}
.installer-install-plan .installer-section-title { margin-bottom: 11px; }
.installer-install-plan ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px 14px;
}
.installer-install-plan li { display: flex; align-items: flex-start; gap: 9px; }
.installer-install-plan li > span {
    width: 21px;
    height: 21px;
    border-radius: 7px;
    display: grid;
    place-items: center;
    background: #fff;
    border: 1px solid var(--line);
    color: var(--primary);
    font-size: 13px;
    font-weight: 700;
    flex: 0 0 auto;
}
.installer-install-plan li strong { display: block; font-size: 13px; color: var(--ink-soft); }
.installer-install-plan li small { display: block; font-size: 13px; line-height: 1.8; color: var(--muted); margin-top: 1px; }
.installer-final-form { display: flex; flex-direction: column; gap: 10px; }
.installer-ack-error { display: block; margin-top: -4px; }

.installer-success { max-width: 780px; margin: 0 auto; }
.installer-success-icon {
    width: 68px;
    height: 68px;
    border-radius: 21px;
    display: grid;
    place-items: center;
    margin-bottom: 15px;
    background: linear-gradient(145deg, #e4fbf2, #ccf7e5);
    color: #0f9f6e;
    font-size: 31px;
    font-weight: 700;
    box-shadow: 0 14px 32px rgba(15,159,110,.14);
}
.installer-success h2 { margin: 4px 0 7px; font-size: 27.5px; font-weight: 750; letter-spacing: -.4px; }
.installer-success-lead { margin: 0 0 17px; font-size: 13px; line-height: 2; color: var(--muted); }
.installer-success-credentials {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin-bottom: 15px;
}
.installer-success-credentials > div {
    border: 1px solid var(--line);
    background: #fbfcfe;
    border-radius: 11px;
    padding: 11px 12px;
    min-width: 0;
}
.installer-success-credentials span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 3px; }
.installer-success-credentials strong {
    display: block;
    font-size: 13px;
    color: var(--ink);
    font-weight: 600;
    overflow-wrap: anywhere;
}
.installer-demo-credentials {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: var(--line-soft);
    border: 1px solid var(--line-soft);
    border-radius: 11px;
    overflow: hidden;
    margin-bottom: 15px;
}
.installer-demo-credentials > div {
    background: #fff;
    padding: 9px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.installer-demo-credentials span { font-size: 13px; color: var(--muted); }
.installer-demo-credentials span small { color: var(--muted-light); font-size: 13px; }
.installer-demo-credentials strong {
    font-size: 13px;
    color: var(--ink);
    background: #f4f6fa;
    border-radius: 6px;
    padding: 3px 7px;
    overflow-wrap: anywhere;
}
.installer-success-actions { display: flex; gap: 9px; flex-wrap: wrap; margin: 16px 0; }
.installer-success-actions .btn { min-width: 165px; }
.installer-next-steps { display: flex; flex-direction: column; gap: 8px; margin: 18px 0; }
.installer-next-steps article {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 11px 13px;
    background: #fff;
}
.installer-next-steps article.is-critical { border-color: #f5e3bb; background: #fffdf7; }
.installer-next-steps article.is-done { border-color: #cdeee0; background: #f7fdfa; }
.installer-next-icon {
    width: 25px;
    height: 25px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: #f1f4f9;
    color: var(--ink-soft);
    font-size: 13px;
    font-weight: 700;
    flex: 0 0 auto;
}
.installer-next-steps article.is-critical .installer-next-icon { background: #fceecb; color: #a87400; }
.installer-next-steps article.is-done .installer-next-icon { background: #dcf6ea; color: var(--success); }
.installer-next-steps strong { display: block; font-size: 13px; color: var(--ink); margin-bottom: 2px; }
.installer-next-steps p { margin: 0; font-size: 13px; line-height: 1.9; color: var(--muted); }
.installer-next-steps code {
    direction: ltr;
    display: block;
    margin-top: 5px;
    background: #f4f6fa;
    border: 1px solid var(--line-soft);
    border-radius: 6px;
    padding: 5px 8px;
    font-family: inherit;
    font-size: 13px;
    color: var(--ink-soft);
    overflow-wrap: anywhere;
}
/* نام فایل وسط توضیح باید در همان خط بنشیند، نه اینکه بلوک شود. */
.installer-next-steps p code {
    display: inline-block;
    margin-top: 0;
    padding: 0 5px;
    border: none;
    background: #eef1f7;
    font-size: 12.5px;
}
.installer-success-footer {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--muted);
    border-top: 1px dashed var(--line-soft);
    padding-top: 11px;
    margin-top: 15px;
}
.installer-success-footer b { color: var(--ink-soft); font-weight: 600; }
.installer-delete-warning { margin-top: 13px; font-size: 13px; padding: 12px 15px; border-radius: 11px; }
.installer-delete-warning.is-clean { background: var(--success-soft); color: #0b7a55; }

/* گزارش پاک‌سازی امنیتی پس از نصب */
.installer-cleanup {
    border: 1px solid #cdeee0;
    background: #f7fdfa;
    border-radius: 14px;
    padding: 13px 15px;
    margin: 16px 0;
}
.installer-cleanup.is-attention { border-color: #f5e3bb; background: #fffdf7; }
.installer-cleanup-head { display: flex; align-items: flex-start; gap: 11px; }
.installer-cleanup-icon {
    width: 26px;
    height: 26px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    background: #dcf6ea;
    color: var(--success);
    font-size: 14px;
    font-weight: 700;
    flex: 0 0 auto;
}
.installer-cleanup.is-attention .installer-cleanup-icon { background: #fceecb; color: #a87400; }
.installer-cleanup-head strong { display: block; font-size: 13.5px; color: var(--ink); margin-bottom: 3px; }
.installer-cleanup-head p { margin: 0; font-size: 13px; line-height: 1.95; color: var(--muted); }
.installer-cleanup code { direction: ltr; font-family: inherit; }
.installer-cleanup-head code {
    display: inline-block;
    background: #fff;
    border: 1px solid var(--line-soft);
    border-radius: 5px;
    padding: 0 5px;
    font-size: 12.5px;
}
.installer-cleanup-list {
    list-style: none;
    margin: 11px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.installer-cleanup-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: #fff;
    border: 1px solid var(--line-soft);
    border-radius: 9px;
    padding: 6px 11px;
}
.installer-cleanup-list code { font-size: 13px; color: var(--ink-soft); overflow-wrap: anywhere; }
.installer-cleanup-state {
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 9px;
    border-radius: 999px;
}
.installer-cleanup-state.is-removed { background: var(--success-soft); color: #0b7a55; }
.installer-cleanup-state.is-pending { background: var(--primary-soft); color: var(--primary-dark); }
.installer-cleanup-state.is-absent { background: #f2f4f8; color: var(--muted-light); }
.installer-cleanup-state.is-kept { background: var(--warning-soft); color: #9a6a04; }
.installer-cleanup-state.is-failed { background: var(--danger-soft); color: #b42318; }
.installer-cleanup-manual {
    margin-top: 10px;
    background: #101828;
    color: #e4e7ec;
    border-radius: 9px;
    padding: 8px 12px;
    font-size: 12.5px;
    line-height: 1.9;
    text-align: left;
    overflow-wrap: anywhere;
}
.installer-cleanup-form { margin-top: 12px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.installer-cleanup-note { margin: 0; font-size: 12.5px; line-height: 1.9; color: var(--muted); }

.installer-installed { max-width: 620px; margin: 20px auto; text-align: center; }
.installer-installed-icon {
    width: 68px;
    height: 68px;
    border-radius: 21px;
    display: grid;
    place-items: center;
    margin: 0 auto 15px;
    background: #f1f4f9;
    font-size: 30px;
}
.installer-installed h2 { margin: 0 0 8px; font-size: 25.5px; font-weight: 750; }
.installer-installed p { margin: 0 auto 18px; max-width: 520px; font-size: 13px; line-height: 2; color: var(--muted); }
.installer-installed .installer-success-actions { justify-content: center; }
.installer-wizard-footer {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 22px;
    padding-top: 13px;
    border-top: 1px dashed var(--line-soft);
    font-size: 13px;
    color: var(--muted-light);
}

@media (max-width: 1100px) {
    .installer-wizard { grid-template-columns: 300px minmax(0, 1fr); }
    .installer-wizard .installer-main { padding: 30px 30px 24px; }
    .installer-diagnostics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
    .installer-wizard { grid-template-columns: 1fr; max-width: 680px; min-height: 0; }
    .installer-wizard .installer-aside { padding: 20px 24px; min-height: 0; }
    .installer-wizard-aside { margin: 0; padding: 14px 0 0; }
    .installer-wizard-aside > h1 { font-size: 20.5px; margin: 3px 0 0; }
    .installer-wizard-aside > p,
    .installer-wizard .installer-steps,
    .installer-aside-note,
    .installer-wizard .installer-aside-footer { display: none; }
    .installer-wizard .installer-main { max-height: none; padding: 24px 24px 20px; }
}

@media (max-width: 760px) {
    .installer-wizard .installer-main { padding: 20px 16px 18px; }
    .installer-wizard-head h2 { font-size: 22px; }
    .installer-wizard .installer-requirement-grid,
    .installer-review-grid,
    .installer-install-plan ul,
    .installer-success-credentials { grid-template-columns: 1fr; }
    .installer-diagnostics { grid-template-columns: 1fr 1fr; }
    .installer-form-section { padding: 14px; }
    .installer-form-actions { align-items: stretch; }
    .installer-form-actions .btn { flex: 1 1 140px; min-width: 0; }
    .installer-action-note { flex-basis: 100%; }
    .installer-success h2 { font-size: 23px; }
    .installer-success-actions .btn { flex: 1 1 100%; }
}

@media (max-width: 480px) {
    .installer-diagnostics { grid-template-columns: 1fr; }
    .installer-demo-credentials > div { flex-direction: column; align-items: flex-start; gap: 4px; }
    .installer-review-list > div { flex-direction: column; gap: 2px; }
    .installer-review-list dd { text-align: right; }
}

/* ---------- Toast ---------- */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translate(-50%, 12px);
    background: #101828;
    color: #fff;
    font-size: 13px;
    padding: 9px 15px;
    border-radius: 9px;
    box-shadow: 0 10px 30px rgba(16,24,40,.25);
    opacity: 0;
    pointer-events: none;
    transition: all 200ms ease;
    z-index: 300;
    max-width: calc(100vw - 32px);
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Details / misc ---------- */
.meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 13px;
}
.meta-row .dot-sep { color: var(--muted-light); }
.meta-row svg { color: #a4aebe; }

.detail-hero-actions {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}

.uploaded-image {
    border-radius: 11px;
    border: 1px solid var(--line);
    max-height: 230px;
    width: 100%;
    object-fit: cover;
}

.progress-note {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 11px;
    background: var(--warning-soft);
    color: #8a5b00;
    border-radius: 8px;
    font-size: 13px;
    margin-top: 10px;
}

.sticky-note { border-color: #f2e8cc; background: #fffdf7; }

.activity-feed { display: flex; flex-direction: column; }
.activity-item {
    display: flex;
    gap: 9px;
    padding: 10px 0;
    border-bottom: 1px dashed var(--line-soft);
}
.activity-item:last-child { border-bottom: 0; padding-bottom: 0; }
.activity-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #c6d0e3;
    margin-top: 6px;
    flex: 0 0 auto;
}
.activity-dot.blue { background: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.activity-dot.green { background: var(--success); box-shadow: 0 0 0 3px var(--success-soft); }
.activity-dot.amber { background: var(--warning); box-shadow: 0 0 0 3px var(--warning-soft); }
.activity-copy { min-width: 0; }
.activity-copy p { margin: 0; font-size: 13px; color: var(--ink-soft); line-height: 1.8; }
.activity-copy time { display: block; margin-top: 1px; font-size: 13px; color: var(--muted-light); }

/* ---------- داده و پشتیبان (تنظیمات > تب داده) ---------- */
.data-set-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
    gap: 10px;
}

.data-set-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    cursor: pointer;
    transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.data-set-item:hover { border-color: #c9d4f7; background: #fbfcff; }

.data-set-item input[type="checkbox"] {
    width: 19px;
    height: 19px;
    margin: 2px 0 0;
    flex: 0 0 auto;
    accent-color: var(--primary);
    cursor: pointer;
}

.data-set-item:has(input:checked) {
    border-color: var(--primary);
    background: var(--primary-soft);
    box-shadow: 0 0 0 1px var(--primary) inset;
}

.data-set-icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    border-radius: 11px;
    background: #fff;
    border: 1px solid var(--line);
    color: var(--primary);
}

.data-set-copy { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.data-set-copy strong { font-size: 14.5px; color: var(--ink); line-height: 1.6; }
.data-set-copy small { font-size: 13px; color: var(--muted); line-height: 1.85; }

.data-set-basis {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12.5px;
    color: var(--ink-soft);
    background: #fff;
    border: 1px dashed var(--line);
    border-radius: 999px;
    padding: 3px 9px;
    align-self: flex-start;
}

.data-set-item.is-danger:has(input:checked) {
    border-color: var(--danger);
    background: var(--danger-soft);
    box-shadow: 0 0 0 1px var(--danger) inset;
}
.data-set-item.is-danger .data-set-icon { color: var(--danger); }

.danger-zone { border-color: #f3d2d3; }
.danger-zone > .card-head { background: linear-gradient(180deg, #fff7f7, #fff); border-bottom-color: #f6dede; }
.danger-zone > .card-head h3 { display: flex; align-items: center; gap: 7px; color: #b42318; }
.danger-zone > .card-head svg { color: var(--danger); }

.backup-name {
    display: inline-block;
    font-family: "SFMono-Regular", Consolas, monospace;
    font-size: 12.5px;
    color: var(--ink-soft);
    word-break: break-all;
    margin-inline-end: 6px;
}

.backup-sets { display: flex; flex-wrap: wrap; gap: 4px; }
.backup-note { max-width: 210px; font-size: 13px; line-height: 1.8; }

.purge-preview { border-top: 1px dashed var(--line); background: #fffdfd; }
.purge-preview-head {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.purge-preview-head strong { font-size: 15px; color: var(--ink); }
.purge-preview .data-table td, .purge-preview .data-table th { font-size: 13.5px; }
.purge-total td { background: var(--danger-soft); color: #b42318; }
.purge-warnings { display: flex; flex-direction: column; gap: 8px; }

.purge-confirm {
    border: 1px solid #f3d2d3;
    border-radius: 14px;
    background: #fff;
    padding: 14px;
}
.purge-confirm > label { font-size: 13.5px; line-height: 1.9; color: var(--ink-soft); margin-bottom: 9px; display: block; }
.purge-confirm-row { flex-wrap: wrap; }
.purge-confirm-row .input { flex: 1 1 220px; min-width: 0; }

@media (max-width: 900px) {
    .data-set-grid { grid-template-columns: 1fr; }
    .backup-note { max-width: none; }
    .purge-confirm-row .btn { width: 100%; justify-content: center; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1280px) {
    :root { --sidebar-width: 254px; }
    .page-content { padding: 23px 23px 40px; }
    .topbar { padding: 0 23px; }
    .topbar-search { width: 170px; }
    .stats-grid { gap: 13px; }
    .stat-value { font-size: 23px; }
    .detail-grid { grid-template-columns: minmax(0,1.3fr) minmax(260px,.8fr); }
    .form-layout { grid-template-columns: minmax(0,1fr) 280px; }
}

@media (max-width: 1100px) {
    .stats-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .grid-3 { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .public-hero-grid { gap: 35px; }
    .feature-grid { grid-template-columns: repeat(2, 1fr); }
    .process-grid { grid-template-columns: repeat(2, 1fr); gap: 27px 20px; }
    .process-card:nth-child(2)::after { display: none; }
    .detail-grid { grid-template-columns: minmax(0, 1fr); }
    .detail-side { position: static; }
    .form-layout { grid-template-columns: minmax(0, 1fr); }
    .side-stack { position: static; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); align-items: start; }
    .installer-main { padding: 34px 34px 26px; }
    .installer-shell { grid-template-columns: 310px minmax(0,1fr); }
}

@media (max-width: 960px) {
    .sidebar {
        transform: translateX(100%);
        box-shadow: -20px 0 60px rgba(10,17,30,.2);
    }
    body.sidebar-open .sidebar { transform: translateX(0); }
    body.sidebar-open .sidebar-overlay { display: block; opacity: 1; }
    .app-main { margin-right: 0; }
    .menu-toggle { display: inline-grid; }
    .topbar { height: 70px; padding: 0 20px; }
    .page-content { padding: 21px 20px 38px; }
    .auth-shell { grid-template-columns: 1fr; max-width: 500px; min-height: 0; }
    .auth-visual { display: none; }
    .auth-panel { padding: 35px 32px; }
    .public-hero-grid { grid-template-columns: 1fr; gap: 45px; }
    .public-hero { padding: 40px 0 55px; }
    .public-hero-lead { max-width: 620px; }
    .hero-mockup { max-width: 560px; margin: 0 auto; width: 100%; }
    .public-header { height: auto; padding: 13px 0; }
    .public-header-inner { flex-wrap: wrap; }
    .site-nav { order: 3; width: 100%; justify-content: center; gap: 20px; border-top: 1px solid var(--line-soft); padding-top: 10px; display: none; }
    .public-header .site-header-actions .btn-secondary { display: none; }
    .track-panel { grid-template-columns: 1fr; padding: 28px; gap: 24px; }
    .installer-page { padding: 14px; }
    .installer-shell { grid-template-columns: 1fr; max-width: 620px; }
    .installer-aside { min-height: 190px; padding: 23px 26px; }
    .installer-aside-content { padding: 20px 0 0; }
    .installer-aside-content h1 { font-size: 22px; margin-bottom: 6px; }
    .installer-aside-content > p, .installer-features { display: none; }
    .installer-aside-footer { display: none; }
    .installer-main { max-height: none; padding: 28px 28px 22px; }
}

@media (max-width: 760px) {
    .hide-sm { display: none !important; }
    .hide-md { display: none !important; }
    .page-title { font-size: 18.5px; }
    .page-subtitle { display: none; }
    .user-chip > svg { display: none; }
    .topbar-actions { gap: 5px; }
    .topbar { padding: 0 15px; gap: 10px; }
    .page-content { padding: 18px 14px 32px; }
    .dash-hero { padding: 21px; flex-direction: column; align-items: flex-start; }
    .hero-status { width: 100%; justify-content: flex-start; }
    .dash-hero h2 { font-size: 22px; }
    .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .stat-card { padding: 14px; }
    .stat-value { font-size: 20.5px; }
    .grid-2, .grid-3, .grid-2-1, .grid-1-2 { grid-template-columns: minmax(0, 1fr); }
    .info-grid { grid-template-columns: 1fr; gap: 11px; }
    .form-grid-2, .form-grid-3 { grid-template-columns: 1fr; }
    .form-layout { gap: 14px; }
    .side-stack { display: flex; }
    .filters-bar { padding: 11px; gap: 7px; }
    .filter-search { flex-basis: 100%; }
    .filter-select { flex: 1 1 130px; min-width: 0; }
    .filters-bar .btn { flex: 1 1 auto; }
    .filter-count { display: none; }
    .card-head { padding: 15px 16px 13px; }
    .card-body { padding: 16px; }
    .table-wrap { margin: 0; width: 100%; }
    .data-table th, .data-table td { padding: 11px 14px; }
    .page-header-row { margin-bottom: 15px; }
    .page-header-row h2 { font-size: 19.5px; }
    .topbar-search { display: none; }
    .invoice-form-row { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 14px; border: 1px solid var(--line); border-radius: 14px; gap: 12px; margin-bottom: 16px; background: var(--surface-muted); }
    .invoice-form-row .invoice-item-type, .invoice-form-row .invoice-item-title { grid-column: 1 / -1; }
    .invoice-form-row .invoice-item-qty { grid-column: 1; }
    .invoice-form-row .invoice-item-price { grid-column: 2; }
    .invoice-form-row .invoice-item-total { grid-column: 1; }
    .invoice-form-row .line-remove { grid-column: 2; justify-self: end; align-self: end; border-color: var(--line); background: var(--surface); }
    .invoice-form-row .field-mini-label { display: block; }
    .invoice-form-head-row { display: none; }
    .radio-cards { grid-template-columns: 1fr; }
    .stat-mini-grid { grid-template-columns: 1fr 1fr; }
    .tracker-step { font-size: 13px; }
    .tracker-step-icon { width: 24px; height: 24px; }
    .tracker-step-icon svg { width: 12px; height: 12px; }
    .detail-grid { gap: 14px; }
    .repair-summary-head { padding: 16px; }
    .repair-summary-title h2 { font-size: 16px; }
    .timeline-item { padding-right: 24px; }
    .public-hero h1 { font-size: 38px; letter-spacing: -1px; }
    .public-hero-lead { font-size: 13px; }
    .mock-layout { min-height: 280px; }
    .mock-side { width: 60px; }
    .public-section { padding: 45px 0; }
    .section-intro { margin-bottom: 26px; }
    .section-intro h2 { font-size: 25.5px; }
    .feature-grid { grid-template-columns: 1fr; }
    .process-grid { grid-template-columns: 1fr 1fr; }
    .process-card::after { display: none !important; }
    .track-panel { padding: 23px; border-radius: 18px; }
    .track-panel h2 { font-size: 24px; }
    .track-form-grid { grid-template-columns: 1fr; }
    .customer-hero { padding: 19px; }
    .customer-hero h2 { font-size: 20.5px; }
    .customer-hero-orb { display: none; }
    .public-footer-inner { flex-direction: column; text-align: center; }
    .auth-panel { padding: 30px 23px; }
    .auth-panel-head h1 { font-size: 24px; }
    .tracking-head { padding: 20px; }
    .tracking-body { padding: 18px; }
    .track-details-grid { grid-template-columns: 1fr; }
    .track-code-display { margin-inline-start: 0; }
    .print-sheet { margin: 12px 0; transform: none; }
    .installer-main { padding: 22px 18px 20px; }
    .install-section { padding: 14px; }
    .requirement-grid, .success-credentials { grid-template-columns: 1fr; }
    .flash-stack { top: 78px; left: 12px; width: calc(100vw - 24px); }
    .sidebar { width: min(290px, 86vw); }
    .public-stats { grid-template-columns: 1fr; gap: 10px; margin-bottom: 20px; }
    .public-stats > .card { padding: 16px; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .stat-card { padding: 15px 16px; }
    .stat-top { margin-bottom: 9px; }
    .stat-icon { width: 36px; height: 36px; }
    .stat-value { font-size: 24px; }
    .stat-foot { margin-top: 5px; }
    .hero-actions .btn { flex: 1; }
    .public-hero-actions .btn { width: 100%; }
    .public-hero-actions { gap: 7px; }
    .trust-divider { display: none; }
    .trust-row { gap: 12px; }
    .hero-float-card { left: 8px; bottom: 12px; padding: 8px 9px; }
    .hero-float-card .float-icon { width: 27px; height: 27px; }
    .site-header-actions .btn-primary { padding: 0 12px; font-size: 13px; }
    .site-logo-copy span { display: none; }
    .process-grid { grid-template-columns: 1fr; }
    .page-header-actions { width: 100%; }
    .page-header-actions .btn { flex: 1; }
    .dash-hero .eyebrow { margin-bottom: 5px; }
    .dash-hero h2 { font-size: 20.5px; }
    .donut-layout { justify-content: center; }
    .status-legend { flex-basis: 100%; }
    .card-head { flex-direction: column; }
    .card-head-actions { width: 100%; }
    .form-actions { flex-direction: column-reverse; }
    .form-actions .btn { width: 100%; }
    .form-actions .start { margin: 0; }
    .invoice-hero { padding: 15px; }
    .invoice-hero .btn { width: 100%; }
    .auth-panel { padding: 27px 19px; }
    .auth-back { display: none; }
    .tracker-steps { flex-wrap: wrap; gap: 8px 2px; }
    .tracker-step { flex: 1 0 30%; }
    .tracker-bar { display: none; }
    .repair-device-hero { padding: 16px; }
    .repair-device-icon { width: 47px; height: 47px; }
    .repair-device-copy h2 { font-size: 17.5px; }
    .customer-hero { flex-direction: column; align-items: flex-start; }
    .print-toolbar { padding: 8px 10px; }
    .print-toolbar-copy { display: none; }
    .print-toolbar-actions { width: 100%; flex-wrap: wrap; }
    .print-toolbar-actions .btn { flex: 1 1 140px; }
    .print-toolbar-actions .label-copies-form { flex: 1 1 100%; justify-content: flex-end; }
    .sidebar-overlay { backdrop-filter: blur(2px); }
}

@media (min-width: 961px) {
    .sidebar-overlay { display: none !important; }
}

/* ---------- Animations ---------- */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-in { animation: fadeUp 450ms cubic-bezier(.2,.7,.3,1) both; }
.delay-1 { animation-delay: 60ms; }
.delay-2 { animation-delay: 120ms; }
.delay-3 { animation-delay: 180ms; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

/* ---------- Auth / customer tracking additions ---------- */
.auth-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.auth-topbar-note {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--muted);
    font-size: 13px;
}
.auth-top-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink-soft);
    font-size: 13px;
    font-weight: 550;
    transition: all var(--transition);
}
.auth-top-link:hover { border-color: #c8d2ff; color: var(--primary); background: var(--primary-soft); }

.auth-switch {
    display: flex;
    gap: 4px;
    padding: 4px;
    border-radius: 13px;
    background: #f3f5fa;
    margin-bottom: 24px;
}
.auth-tab {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 38px;
    padding: 8px 10px;
    border-radius: 9px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    transition: all var(--transition);
}
.auth-tab:hover { color: var(--ink-soft); }
.auth-tab.is-active {
    background: #fff;
    color: var(--primary);
    box-shadow: 0 1px 3px rgba(16,24,40,.08);
}
.auth-method-switch { margin-bottom: 18px; }
.otp-sent-box {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    padding: 14px 16px;
    border: 1px solid #dbe5ff;
    border-radius: 12px;
    background: #f5f8ff;
}
.otp-sent-icon {
    display: grid;
    place-items: center;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    color: var(--primary);
    background: #e8efff;
}
.otp-sent-box strong { display: block; margin-bottom: 4px; font-size: 15px; }
.otp-sent-box p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.8; }
.otp-code-input { height: 54px; text-align: center; font-size: 24px; font-weight: 700; letter-spacing: 8px; }
.otp-secondary-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.otp-secondary-actions form, .otp-secondary-actions > .btn { min-width: 0; }
.otp-secondary-actions .btn { width: 100%; height: 44px; min-height: 44px; padding-inline: 10px; font-size: 14px; }
.otp-support-options { margin-top: 16px; }

.auth-shell.is-wide { max-width: 1180px; grid-template-columns: .74fr 1.26fr; }
.auth-shell.is-wide .auth-panel { justify-content: flex-start; padding: 28px 34px 30px; }
.auth-shell.is-wide .auth-panel-head { margin-bottom: 18px; }
.auth-page.tracking-auth { align-items: flex-start; }
.auth-page.tracking-auth .auth-shell { margin: 8px 0; }
.auth-page.tracking-auth .auth-visual-content h2 { font-size: 27.5px; }

.auth-help-box {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 18px;
    padding: 12px 14px;
    border: 1px dashed #dbe2f7;
    border-radius: 12px;
    background: #f8faff;
}
.auth-help-icon {
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: var(--primary-soft);
    color: var(--primary);
}
.auth-help-box strong { display: block; font-size: 13px; color: var(--ink-soft); }
.auth-help-box p { margin: 2px 0 0; font-size: 13px; color: var(--muted); line-height: 1.9; }
.auth-help-box a { display: inline-block; margin-top: 3px; font-size: 13px; color: var(--primary); font-weight: 600; }
.tracking-result-actions { display: flex; justify-content: flex-end; gap: 7px; flex-wrap: wrap; margin-bottom: 12px; }
.tracking-embed { box-shadow: none; border-radius: 16px; }
.tracking-embed .tracking-head { padding: 17px 18px; }
.tracking-embed .tracking-head h2 { font-size: 18.5px; font-weight: 750; margin: 0 0 4px; }
.tracking-embed .tracking-head .eyebrow { margin-bottom: 5px; }
.tracking-embed .tracking-body { padding: 17px 18px; }
.tracking-embed .track-device-card { margin-bottom: 17px; }
.tracking-embed .track-details-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin-bottom: 18px; }
.tracking-embed .track-detail-item { padding: 9px 11px; }
.tracking-embed .section-heading { margin-top: 18px; }
.tracking-embed .timeline { margin-top: 10px; }
.tracking-embed .timeline-item { padding-bottom: 14px; }

/* ---------- Toggle fields ---------- */
.toggle-field {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 62px;
    padding: 11px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fbfcfe;
    cursor: pointer;
    margin: 0;
    transition: border-color var(--transition), background var(--transition);
}
.toggle-field:hover { border-color: #c8d2ff; background: #fff; }
.toggle-copy { min-width: 0; }
.toggle-copy strong { display: block; font-size: 13px; color: var(--ink-soft); font-weight: 600; }
.toggle-copy small { display: block; margin-top: 3px; color: var(--muted); font-size: 13px; line-height: 1.8; }
.toggle-ui { position: relative; display: inline-block; width: 40px; height: 23px; flex: 0 0 auto; }
.toggle-ui input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 2; }
.toggle-track {
    position: absolute;
    inset: 0;
    border-radius: 99px;
    background: #d6dce8;
    transition: background var(--transition);
    pointer-events: none;
}
.toggle-track::after {
    content: '';
    position: absolute;
    top: 3px;
    right: 3px;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(16,24,40,.18);
    transition: transform var(--transition);
}
.toggle-ui input:checked + .toggle-track { background: var(--success); }
.toggle-ui input:checked + .toggle-track::after { transform: translateX(-17px); }
.toggle-ui input:focus-visible + .toggle-track { box-shadow: 0 0 0 3px var(--primary-ring); }
.toggle-field.compact { min-height: 0; padding: 0; border: 0; background: transparent; align-items: flex-start; }
.toggle-field.compact:hover { background: transparent; border-color: transparent; }
.toggle-field.compact .toggle-ui { margin-top: 2px; }

/* ---------- Settings ---------- */
.settings-tabs { flex-wrap: wrap; }
.settings-layout { align-items: flex-start; }
.settings-form-grid { gap: 14px; }
.settings-form-grid .field > label { font-size: 13px; }
.sms-settings-section-title {
    grid-column: 1 / -1;
    margin-top: 8px;
    padding-top: 18px;
    border-top: 1px solid var(--line-soft);
}
.sms-settings-section-title h4 { margin: 0 0 4px; font-size: 15px; }
.sms-settings-section-title p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.9; }
.sms-events-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    border-top: 1px solid var(--line-soft);
    padding-top: 20px;
}
.sms-events-head h3 { margin: 0 0 3px; font-size: 15px; }
.sms-events-head p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.9; }
.sms-events-list { display: flex; flex-direction: column; gap: 10px; margin-top: 13px; }
.sms-event-card {
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fbfcfe;
}
.sms-event-head { margin-bottom: 8px; }
.sms-event-template { min-height: 58px; background: #fff; font-size: 13px; line-height: 1.9; }
.sms-placeholders { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; }
.sms-placeholders span {
    direction: ltr;
    display: inline-block;
    padding: 1px 5px;
    border-radius: 4px;
    background: #eef2ff;
    color: #3e58cd;
    font-size: 13px;
    line-height: 1.7;
}
.gateway-callback-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px 14px;
    border: 1px dashed #d6def2;
    border-radius: 12px;
    background: #f8faff;
}
.gateway-callback-copy { min-width: 0; }
.gateway-callback-copy .field-label { margin: 0 0 3px; }
.gateway-callback-copy code {
    display: block;
    direction: ltr;
    color: #3e58cd;
    font-size: 13px;
    word-break: break-all;
    line-height: 1.8;
}

/* ---------- SMS log ---------- */
.sms-log-table { min-width: 920px; }
.sms-user-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    background: var(--primary-soft);
    color: var(--primary);
}
.sms-message-preview { max-width: 320px; font-size: 13px; line-height: 1.8; color: var(--ink-soft); }
.sms-related { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.sms-related span {
    direction: ltr;
    display: inline-block;
    padding: 1px 5px;
    border-radius: 4px;
    background: #f1f4fa;
    color: var(--muted);
    font-size: 13px;
}
.sms-error { display: block; margin-top: 3px; color: var(--danger); font-size: 13px; line-height: 1.8; }
.sms-provider-cell strong { display: block; font-size: 13px; font-weight: 550; color: var(--ink-soft); }
.sms-provider-cell small { display: block; margin-top: 2px; color: var(--muted); font-size: 13px; }
.inline-form { display: inline; }
.sms-row-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.sms-row-actions .inline-form { display: inline-flex; }

@media (max-width: 1100px) {
    .auth-shell.is-wide { max-width: 1050px; grid-template-columns: .7fr 1.3fr; }
    .tracking-embed .track-details-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
    .auth-shell.is-wide { grid-template-columns: 1fr; max-width: 650px; }
    .auth-shell.is-wide .auth-panel { padding: 30px 26px; }
    .auth-page.tracking-auth { align-items: flex-start; }
    .auth-page.tracking-auth .auth-shell { margin: 0; }
    .auth-page.tracking-auth .auth-visual { display: none; }
}
@media (max-width: 760px) {
    .auth-shell.is-wide { max-width: 100%; }
    .auth-shell.is-wide .auth-panel { padding: 24px 17px 28px; }
    .auth-topbar { margin-bottom: 15px; }
    .auth-switch { margin-bottom: 20px; }
    .tracking-embed .track-details-grid { grid-template-columns: 1fr; }
    .tracking-embed .tracking-head { padding: 14px; }
    .tracking-embed .tracking-body { padding: 14px; }
    .tracking-embed .track-code-display { margin-inline-start: 0; width: 100%; }
    .toggle-field { align-items: flex-start; }
    .settings-form-grid { grid-template-columns: 1fr; }
    .sms-event-card { padding: 11px; }
}

/* ---------- Maintenance & tickets ---------- */
.mt-4 { margin-top: 4px; }
.d-block { display: block; }
.flex-column { flex-direction: column; }
.inline-code {
    display: inline-block;
    direction: ltr;
    max-width: 100%;
    padding: 5px 9px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #f6f8fc;
    color: var(--ink-soft);
    font-size: 13px;
    line-height: 1.9;
    word-break: break-all;
}
.btn-icon-danger { color: var(--danger); }
.btn-icon-danger:hover { color: var(--danger); background: var(--danger-soft); }
.row-unread td { background: #fffaf0; }
.row-unread:hover td { background: #fff6e6 !important; }
.notice.is-info { background: #eef6ff; color: #1c4e7a; border-color: #d6e9ff; }
.stat-mini-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.customer-maintenance-page > :not(:last-child) { margin-bottom: 24px; }
.customer-maintenance-page > .detail-grid,
.customer-maintenance-page > .maintenance-card-grid { gap: 24px; }

/* Maintenance hero */
.maintenance-hero {
    display: flex;
    align-items: center;
    gap: 17px;
    padding: 21px 23px;
    margin-bottom: 20px;
    border: 1px solid #dfe5ff;
    border-radius: var(--radius);
    background: linear-gradient(135deg, #eef2ff 0%, #f8faff 55%, #eafaf4 100%);
    box-shadow: var(--shadow-xs);
}
.maintenance-hero-icon {
    width: 58px;
    height: 58px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 17px;
    background: linear-gradient(140deg, #5473ff, #3454f5);
    color: #fff;
    box-shadow: 0 10px 24px rgba(52, 84, 245, .24);
}
.maintenance-hero-copy { min-width: 0; flex: 1; }
.maintenance-hero-copy .eyebrow { margin-bottom: 4px; }
.maintenance-hero-copy h2 { margin: 0 0 3px; font-size: 19.5px; font-weight: 750; letter-spacing: -.2px; }
.maintenance-hero-copy p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.9; }
.maintenance-hero-copy p strong { color: var(--ink-soft); }
.maintenance-hero-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex: 0 0 auto; }

/* Maintenance cards */
.maintenance-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}
.maintenance-card { display: flex; flex-direction: column; overflow: hidden; }
.maintenance-card.is-inactive { opacity: .74; }
.maintenance-card-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 16px 0;
}
.maintenance-card-head > div { flex: 1; min-width: 0; }
.maintenance-card-head h3 { margin: 0; font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.maintenance-card-head p { margin: 2px 0 0; color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.maintenance-card-head > .badge { flex: 0 0 auto; font-size: 13px; }
.maintenance-card-icon {
    width: 41px;
    height: 41px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--primary-soft);
    color: var(--primary);
}
.maintenance-card-body { display: flex; flex-direction: column; gap: 12px; flex: 1; padding: 14px 16px 16px; }
.maintenance-date-box {
    padding: 10px 12px;
    border: 1px dashed #dfe5f2;
    border-radius: 10px;
    background: #fbfcff;
}
.maintenance-date-box > span:first-child { display: block; color: var(--muted); font-size: 13px; }
.maintenance-date-box strong { display: block; margin-top: 1px; font-size: 14px; font-weight: 700; }
.maintenance-date-box .badge { margin-top: 5px; font-size: 13px; padding: 3px 7px; }
.maintenance-card-foot {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    padding: 11px 16px;
    border-top: 1px solid var(--line-soft);
    background: #fcfcfe;
}

/* Maintenance mini list (dashboard) */
.maintenance-mini-list, .mini-ticket-list { display: flex; flex-direction: column; gap: 4px; }
.maintenance-mini, .mini-ticket {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 10px;
    border-radius: 9px;
    color: var(--ink-soft);
    transition: background var(--transition);
}
.maintenance-mini:hover, .mini-ticket:hover { background: var(--surface-muted); color: var(--ink); }
.maintenance-mini-icon, .mini-ticket-icon {
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: var(--primary-soft);
    color: var(--primary);
}
.maintenance-mini > div, .mini-ticket > div { flex: 1; min-width: 0; }
.maintenance-mini strong, .mini-ticket strong { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.maintenance-mini span:not(.badge):not(.maintenance-mini-icon), .mini-ticket span:not(.badge):not(.mini-ticket-icon) { display: block; margin-top: 1px; color: var(--muted); font-size: 13px; }
.maintenance-mini .badge, .mini-ticket .badge { flex: 0 0 auto; font-size: 13px; padding: 3px 7px; }
.mini-ticket.has-unread { background: #f8faff; }
.mini-ticket.has-unread strong { color: var(--primary-dark); }

/* Notification list */
.notification-list {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-xs);
    overflow: hidden;
    margin-bottom: 14px;
}
.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px 17px;
    border-bottom: 1px solid var(--line-soft);
}
.notification-item:last-child { border-bottom: 0; }
.notification-item.is-unread { background: #fbfcff; }
.notification-item.is-unread .notification-copy h3 { color: var(--primary-dark); }
.notification-icon {
    width: 41px;
    height: 41px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--primary-soft);
    color: var(--primary);
}
.notification-icon.type-maintenance { background: var(--cyan-soft); color: var(--cyan); }
.notification-icon.type-ticket { background: var(--violet-soft); color: var(--violet); }
.notification-icon.type-system { background: var(--warning-soft); color: var(--warning); }
.notification-copy { flex: 1; min-width: 0; }
.notification-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.notification-head h3 { margin: 0; font-size: 13px; font-weight: 700; line-height: 1.8; }
.notification-head time { color: var(--muted-light); font-size: 13px; white-space: nowrap; }
.notification-copy p { margin: 4px 0 0; color: var(--muted); font-size: 13px; line-height: 2; }
.notification-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.notification-foot .card-link { font-size: 13px; }

/* Customer ticket list */
.ticket-list { display: flex; flex-direction: column; gap: 9px; margin-bottom: 14px; }
.ticket-row {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    color: var(--ink-soft);
    box-shadow: var(--shadow-xs);
    transition: all var(--transition);
}
.ticket-row:hover { border-color: #c8d2ff; color: var(--ink); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.ticket-row.has-unread { border-color: #cfd9ff; background: #fbfcff; }
.ticket-row-icon {
    width: 39px;
    height: 39px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: var(--primary-soft);
    color: var(--primary);
}
.ticket-row-main { flex: 1; min-width: 0; }
.ticket-row-head { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.ticket-row-head strong { font-size: 13px; font-weight: 700; color: var(--ink); }
.ticket-row-head .badge { font-size: 13px; padding: 3px 7px; }
.ticket-row-meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 4px; color: var(--muted); font-size: 13px; }
.ticket-row-meta .badge { font-size: 13px; padding: 2px 6px; }
.ticket-row-preview { margin: 5px 0 0; color: var(--muted); font-size: 13px; line-height: 1.9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ticket-row-side { display: flex; align-items: center; gap: 7px; flex: 0 0 auto; color: var(--muted-light); font-size: 13px; padding-top: 2px; }

/* Ticket header + thread */
.ticket-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
    flex-wrap: wrap;
    padding: 18px 20px;
    margin-bottom: 17px;
}
.ticket-header-main { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.ticket-header-main > div { min-width: 0; }
.ticket-header-icon {
    width: 46px;
    height: 46px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: var(--primary-soft);
    color: var(--primary);
}
.ticket-header-main h2 { margin: 0 0 5px; font-size: 17.5px; font-weight: 750; letter-spacing: -.2px; line-height: 1.7; }
.ticket-header-side { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.ticket-thread { display: flex; flex-direction: column; gap: 14px; }
.ticket-message {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    width: fit-content;
    max-width: 88%;
}
.ticket-message.is-customer { margin-inline-end: auto; }
.ticket-message.is-staff { margin-inline-start: auto; flex-direction: row-reverse; }
.ticket-message-avatar {
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: var(--primary-soft);
    color: var(--primary);
}
.ticket-message.is-staff .ticket-message-avatar { background: var(--success-soft); color: var(--success); }
.ticket-message-body {
    min-width: 0;
    padding: 11px 14px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: #fbfcff;
}
.ticket-message.is-customer .ticket-message-body { background: var(--primary-soft); border-color: #dce3ff; }
.ticket-message.is-staff .ticket-message-body { background: #fff; }
.ticket-message-head { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.ticket-message-head strong { font-size: 13px; font-weight: 700; color: var(--ink-soft); }
.ticket-message-head span { color: var(--muted-light); font-size: 13px; }
.ticket-message-head time { margin-inline-start: auto; color: var(--muted-light); font-size: 13px; white-space: nowrap; }
.ticket-message-text { margin-top: 4px; color: var(--ink-soft); font-size: 13px; line-height: 2.1; word-break: break-word; }
.ticket-reply-form {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-top: 20px;
    padding-top: 17px;
    border-top: 1px dashed var(--line);
}
.ticket-reply-form .field { width: 100%; }
.ticket-reply-form .field label { margin-bottom: 5px; }
.ticket-reply-form .textarea { min-height: 92px; }
.ticket-subject-link { color: var(--ink); font-weight: 600; }
.ticket-subject-link:hover { color: var(--primary); }
.ticket-last-message { max-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.maintenance-table { min-width: 920px; }
.tickets-table { min-width: 920px; }

@media (max-width: 1100px) {
    .stat-mini-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
    .maintenance-hero { flex-direction: column; align-items: flex-start; padding: 18px; }
    .maintenance-hero-actions { width: 100%; flex-direction: row; align-items: center; justify-content: flex-start; flex-wrap: wrap; }
    .maintenance-card-grid { grid-template-columns: 1fr; }
    .ticket-header { padding: 15px 16px; }
    .ticket-header-side { width: 100%; }
    .ticket-message { max-width: 100%; }
    .ticket-row { padding: 12px 13px; flex-wrap: wrap; }
    .ticket-row-side { width: 100%; padding-inline-start: 50px; justify-content: flex-start; }
    .ticket-row-side svg { display: none; }
    .notification-item { padding: 13px; }
    .notification-head { flex-direction: column; gap: 2px; }
    .notification-head time { order: -1; }
    .stat-mini-grid-4 { grid-template-columns: 1fr 1fr; }
    .inline-code { display: block; }
}
@media (max-width: 480px) {
    .maintenance-hero-copy h2 { font-size: 17.5px; }
    .maintenance-card-grid { gap: 10px; }
    .notification-icon { width: 35px; height: 35px; border-radius: 10px; }
    .notification-copy p { font-size: 13px; }
    .ticket-row-icon { width: 34px; height: 34px; }
    .ticket-row-head strong { font-size: 13px; }
    .ticket-message-head time { width: 100%; margin-inline-start: 0; }
    .stat-mini-grid-4 { grid-template-columns: 1fr; }
}

/* ---------- Readability & RTL polish (staff/customer panels) ---------- */
/* Persian placeholders in technical LTR fields should still start from the right. */
.app-page .input[dir="ltr"]:placeholder-shown,
.app-page .textarea[dir="ltr"]:placeholder-shown {
    direction: rtl;
    text-align: right;
}

/* Page chrome */
.app-page .page-title { font-size: 22px; }
.app-page .page-subtitle { font-size: 14px; }
.app-page .topbar-date { font-size: 13px; }
.app-page .topbar-search input { font-size: 14.5px; }
.app-page .user-chip-copy strong { font-size: 14.5px; }
.app-page .user-chip-copy small { font-size: 13px; }
.app-page .dropdown-item { font-size: 14.5px; }
.app-page .page-header-row h2 { font-size: 23px; }
.app-page .page-header-row p { font-size: 15px; }
.app-page .breadcrumb { font-size: 14px; }

/* Sidebar */
.app-page .nav-label { font-size: 13px; }
.app-page .nav-badge { font-size: 13px; }
.app-page .workspace-pill { font-size: 14px; }
.app-page .workspace-pill small { font-size: 13px; }
.app-page .support-card p { font-size: 13px; }
.app-page .support-card a { font-size: 13px; }
.app-page .sidebar-footer { font-size: 13px; }

/* Cards, sections and inline info */
.app-page .card-head h3 { font-size: 18px !important; }
.app-page .card-head p { font-size: 14.5px !important; }
.app-page .card-link { font-size: 14px; }
.app-page .section-heading h3 { font-size: 18px; }
.app-page .section-heading p { font-size: 14.5px; }
.app-page .form-section-title h3 { font-size: 17.5px; }
.app-page .form-section-title p { font-size: 14px; }
.app-page .detail-list-row { font-size: 14.5px; }
.app-page .quick-link { font-size: 14px; }
.app-page .note-box { font-size: 14.5px !important; }
.app-page .notice,
.app-page .alert { font-size: 14.5px; }
.app-page .info-item > span { font-size: 13px; }
.app-page .info-item > strong,
.app-page .info-item > a { font-size: 15px; }
.app-page .info-inline { font-size: 14.5px; }
.app-page .stat-label { font-size: 14px; }
.app-page .stat-foot { font-size: 13px; }
.app-page .stat-mini span { font-size: 13px; }
.app-page .stat-mini strong { font-size: 18.5px; }
.app-page .repair-summary-title p { font-size: 14px; }
.app-page .badge { font-size: 14px !important; }
.app-page .currency { font-size: max(0.72em, 11px); }
.app-page .repair-card-copy strong { font-size: 15px; }
.app-page .repair-card-copy span { font-size: 14px; }
.app-page .repair-card-foot { font-size: 13px; }
.app-page .maintenance-mini strong,
.app-page .mini-ticket strong { font-size: 14.5px; }
.app-page .maintenance-mini span:not(.badge):not(.maintenance-mini-icon),
.app-page .mini-ticket span:not(.badge):not(.mini-ticket-icon) { font-size: 13px; }

/* Tabs */
.app-page .tab { padding: 8px 14px; font-size: 14.5px; }
.app-page .tab span.count { font-size: 13px; }

/* Tables */
.app-page .data-table { font-size: 15px; }
.app-page .data-table th { font-size: 13px; }
.app-page .table-user-copy strong { font-size: 15px; }
.app-page .table-user-copy span { font-size: 13px; }
.app-page .amount-cell .currency { font-size: 13px; }
.app-page .data-table small { font-size: 14px; }
.app-page .card-body li { font-size: 14.5px; }
.app-page .card-body p { font-size: 14.5px !important; }

/* Buttons and filters */
.app-page .btn-sm { font-size: 14.5px; }
.app-page .btn-xs { font-size: 13px; }
.app-page .filters-bar .btn,
.app-page .filter-search input,
.app-page .filter-select { font-size: 14.5px; }
.app-page .filter-count { font-size: 13px; }

/* Forms */
.app-page .field label,
.app-page .field-label { font-size: 15px; }
.app-page .settings-form-grid .field > label { font-size: 15px; }
.app-page input.input,
.app-page select.select,
.app-page textarea.textarea { font-size: 15.5px; }
.app-page .field-hint { font-size: 14px; }
.app-page .field-error { font-size: 13px; }
.app-page .input-suffix { font-size: 13px; }
.app-page .toggle-copy strong { font-size: 15px; }
.app-page .toggle-copy small { font-size: 13px; }

/* Payment rows */
.app-page .payment-copy strong { font-size: 14.5px; }
.app-page .payment-copy strong span { font-size: 13px !important; }
.app-page .payment-copy span { font-size: 13px; }
.app-page .payment-copy .card-link { font-size: 13px !important; }
.app-page .payment-amount { font-size: 15.5px; }
.app-page .payment-amount .currency { font-size: 13px; }
.app-page .stat-mini small { font-size: 13px !important; }

/* Settings */
.app-page .sms-settings-section-title h4 { font-size: 17px; }
.app-page .sms-settings-section-title p { font-size: 14px; }
.app-page .sms-events-head h3 { font-size: 17.5px; }
.app-page .sms-events-head p { font-size: 14px; }
.app-page .sms-event-template { font-size: 14.5px; }
.app-page .sms-placeholders span { font-size: 13px; }
.app-page .gateway-callback-copy code { font-size: 14px; }
.app-page .inline-code { font-size: 13px; }

/* Invoices and payments */
.app-page .invoice-hero-copy h2 { font-size: 20.5px; }
.app-page .invoice-hero-copy p { font-size: 14px; }
.app-page .summary-line { font-size: 14.5px; }
.app-page .summary-line.total { font-size: 16px; }
.app-page .summary-line.total strong { font-size: 19.5px; }
.app-page .payment-amount-display span { font-size: 13px; }
.app-page .payment-amount-display strong { font-size: 30px; }
.app-page .card-info-row { font-size: 14.5px; }
.app-page .invoice-items-table th { font-size: 13px; }
.app-page .invoice-items-table td { font-size: 15px; }
.app-page .item-type-chip { font-size: 13px; }

/* Tickets and notifications */
.app-page .ticket-row-head strong { font-size: 15.5px; }
.app-page .ticket-row-head .badge,
.app-page .ticket-row-meta .badge { font-size: 13px; }
.app-page .ticket-row-meta { font-size: 13px; }
.app-page .ticket-row-preview { font-size: 14px; }
.app-page .ticket-row-side { font-size: 13px; }
.app-page .ticket-header-main h2 { font-size: 19.5px; }
.app-page .ticket-message-head strong { font-size: 14.5px; }
.app-page .ticket-message-head span,
.app-page .ticket-message-head time { font-size: 13px; }
.app-page .ticket-message-text { font-size: 15.5px; }
.app-page .notification-head h3 { font-size: 15.5px; }
.app-page .notification-head time { font-size: 13px; }
.app-page .notification-copy p { font-size: 14px; }
.app-page .notification-foot .card-link { font-size: 13px; }

/* Timeline and tracker */
.app-page .timeline-head strong { font-size: 14.5px; }
.app-page .timeline-head time { font-size: 13px; }
.app-page .timeline-item p { font-size: 14.5px; }
.app-page .timeline-actor { font-size: 13px; }
.app-page .tracker-step { font-size: 13px; }
.app-page .repair-device-copy p { font-size: 14px; }

#invoice-items { container-type: inline-size; }

@container (max-width: 680px) {
    .invoice-form-row { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 14px; gap: 12px; border: 1px solid var(--line); border-radius: 14px; margin-bottom: 16px; background: var(--surface-muted); }
    .invoice-form-row .invoice-item-type, .invoice-form-row .invoice-item-title { grid-column: 1 / -1; }
    .invoice-form-row .invoice-item-qty { grid-column: 1; }
    .invoice-form-row .invoice-item-price { grid-column: 2; }
    .invoice-form-row .invoice-item-total { grid-column: 1; }
    .invoice-form-row .line-remove { grid-column: 2; justify-self: end; align-self: end; }
    .invoice-form-row .field-mini-label { display: block; }
}

@media screen and (max-width: 960px) {
    .app-page { --mobile-nav-height: 76px; }
    .app-page .app-shell, .app-page .app-main { min-height: 100dvh; }
    .app-page .sidebar {
        width: min(320px, calc(100vw - 48px));
        visibility: hidden;
        padding-top: max(16px, env(safe-area-inset-top));
        padding-bottom: max(16px, env(safe-area-inset-bottom));
        transition: transform 260ms ease, visibility 0s 260ms;
    }
    .app-page.sidebar-open .sidebar { visibility: visible; transition-delay: 0s; }
    .app-page .sidebar-inner { overscroll-behavior-y: contain; }
    .sidebar-mobile-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 8px 16px; color: var(--sidebar-text); }
    .sidebar-mobile-head .sidebar-close { color: #fff; background: rgba(255,255,255,.08); }
    .app-page .nav-link, .app-page .sidebar-logout { min-height: 48px; }
    .app-page .topbar { padding-inline: max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-left)); }
    .app-page .topbar-date, .app-page .topbar-search { display: none; }
    .app-page .topbar-start { flex: 1; }
    .app-page .topbar-titles { overflow-wrap: anywhere; }
    .app-page .topbar-actions { gap: 8px; }
    .app-page .icon-btn, .app-page .btn-icon, .app-page .line-remove { min-width: 44px; width: 44px; min-height: 44px; height: 44px; }
    .app-page .btn, .app-page .page-btn, .app-page .tab, .app-page .dropdown-item, .app-page .quick-link { min-height: 44px; }
    .app-page .btn { height: auto; padding-block: 10px; }
    .app-page .page-btn { min-width: 44px; }
    .app-page .pagination, .app-page .table-actions { gap: 8px; }
    .app-page .sms-row-actions { gap: 10px; }
    .app-page .copy-btn { min-width: 44px; min-height: 44px; }
    .app-page .user-chip { min-height: 44px; }
    .app-page .input, .app-page input.input, .app-page select.select, .app-page textarea.textarea,
    .app-page .filter-select, .app-page .filter-search input { font-size: 16px; min-height: 48px; }
    .app-page .filter-search input, .app-page .filter-select { height: 48px; }
    .app-page .customer-picker .select { min-width: 0; }
    .app-page .table-wrap { border-radius: 0 0 var(--radius) var(--radius); }
    .app-page .table-scroll-tools:not([hidden]) { display: flex; align-items: center; gap: 8px; padding: 8px 12px; color: var(--muted); background: var(--surface-muted); border-bottom: 1px solid var(--line-soft); }
    .app-page .table-scroll-tools span { flex: 1; min-width: 0; font-size: 13px; }
    .app-page .table-scroll-tools button { flex: 0 0 44px; border-color: var(--line); background: var(--surface); color: var(--primary); font-size: 22px; }
    .app-page .table-scroll-tools button:disabled { opacity: .35; cursor: default; }
    .app-page .data-table th, .app-page .data-table td { padding: 14px 16px; }
    .app-page .code-chip { max-width: 100%; }
    .app-page .detail-list-row, .app-page .summary-line, .app-page .total-display-row, .app-page .card-info-row { flex-wrap: wrap; gap: 6px 12px; }
    .app-page .detail-list-row .value, .app-page .summary-line strong, .app-page .total-display-row strong,
    .app-page .card-info-row strong { min-width: 0; overflow-wrap: anywhere; }
    .app-page .invoice-hero-copy, .app-page .repair-device-copy, .app-page .repair-summary-title { overflow-wrap: anywhere; }
    .app-page .payment-quick-actions { flex-wrap: wrap; }
    .app-page .payment-quick-actions .btn { flex: 1 1 160px; white-space: normal; }
    .app-page .payment-amount, .app-page .payment-amount-display strong { white-space: normal; overflow-wrap: anywhere; }
    .app-page .file-drop { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 20px 16px; overflow-wrap: anywhere; }
    .app-page .file-drop input[type="file"] { display: block; position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
    .app-page .file-drop:focus-within { outline: 2px solid var(--primary); outline-offset: 3px; }
    .app-page .password-toggle { width: 44px; height: 44px; }
    .app-page .password-wrap .input, .app-page .customer-password-form .password-wrap .input { padding-left: 54px; }
    .app-page .jalali-date-toggle, .app-page .jalali-date-clear { width: 44px; height: 44px; }
    .app-page .jalali-date-toggle { inset-inline-end: 46px; }
    .app-page .jalali-date-clear { inset-inline-end: 2px; }
    .app-page .jalali-date input.jalali-date-input { padding-inline-end: 92px; }
    .app-page .note-box, .app-page .notice, .app-page .field-hint { overflow-wrap: anywhere; }
}

@media screen and (max-width: 760px) {
    .app-page .page-content { padding: 20px 16px calc(var(--mobile-nav-height) + env(safe-area-inset-bottom) + 28px); }
    .app-page .topbar { min-height: 72px; height: auto; padding-block: max(12px, env(safe-area-inset-top)) 12px; gap: 8px; }
    .app-page .topbar-start { gap: 8px; }
    .app-page .page-title { font-size: 18px; line-height: 1.5; white-space: normal; }
    .app-page .page-header-row h2 { font-size: 22px; }
    .app-page .ticket-row-head strong { font-size: 15px; }
    .app-page .topbar-actions { gap: 4px; }
    .app-page .user-chip { padding: 4px; border: 0; background: transparent; }
    .app-page .dropdown-menu { width: min(290px, calc(100vw - 32px)); max-height: calc(100dvh - 180px); overflow-y: auto; }
    .mobile-nav {
        display: flex;
        position: fixed;
        inset: auto 0 0;
        z-index: 55;
        min-height: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom));
        padding: 8px max(8px, env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
        gap: 4px;
        background: var(--surface);
        border-top: 1px solid var(--line);
        box-shadow: 0 -4px 24px rgba(16,24,40,.06);
    }
    .mobile-nav-link { flex: 1 1 0; min-width: 0; min-height: 56px; padding: 6px 2px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: 0; border-radius: 14px; background: transparent; color: var(--muted); font: inherit; }
    .mobile-nav-label { font-size: 12px; font-weight: 600; line-height: 1.5; }
    .mobile-nav-link.is-active, .mobile-nav-link[aria-expanded="true"] { background: var(--primary-soft); color: var(--primary-dark); }
    .mobile-nav-link:active { background: var(--primary-soft); }
    .app-page .page-actions, .app-page .page-header-actions, .app-page .hero-actions { gap: 8px; flex-wrap: wrap; }
    .app-page .page-actions .btn, .app-page .page-header-actions .btn { flex: 1 1 140px; white-space: normal; text-align: center; }
    .app-page .card, .app-page .card-body, .app-page .card-head > div { min-width: 0; }
    .app-page .card-head { padding: 16px; gap: 12px; flex-direction: row; align-items: center; }
    .app-page .card-head-actions { width: auto; flex-wrap: wrap; }
    .app-page .card-body { padding: 16px; }
    .app-page .card-body.p-0 { padding: 0; }
    .app-page .detail-main, .app-page .detail-side, .app-page .form-layout, .app-page .detail-grid { gap: 20px; }
    .app-page .dash-hero, .app-page .customer-hero { padding: 22px 20px; border-radius: 18px; margin-bottom: 20px; }
    .app-page .dash-hero h2, .app-page .customer-hero h2 { font-size: 23px; line-height: 1.7; }
    .app-page .hero-actions { width: 100%; }
    .app-page .hero-actions .btn { flex: 1 1 130px; }
    .app-page .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .app-page .stat-card { padding: 16px 14px; }
    .app-page .stat-top { flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
    .app-page .stat-icon { width: 36px; height: 36px; flex-shrink: 0; }
    .app-page .stat-label { font-size: 14px; line-height: 1.8; }
    .app-page .stat-value { font-size: 23px; overflow-wrap: anywhere; }
    .app-page .stat-foot { flex-wrap: wrap; line-height: 1.8; color: var(--muted); }
    .app-page .stat-mini { min-width: 0; padding: 14px; }
    .app-page .stat-mini-grid:not(.invoice-summary) > .stat-mini:last-child:nth-child(3) { grid-column: 1 / -1; }
    .app-page .stat-mini strong { overflow-wrap: anywhere; }
    .app-page .invoice-summary { padding-bottom: 8px; scrollbar-width: thin; scroll-snap-type: x proximity; }
    .app-page .invoice-summary .stat-mini { scroll-snap-align: start; }
    .app-page .stat-mini-grid.stat-row-4 {
        grid-template-columns: none;
        grid-auto-flow: column;
        grid-auto-columns: minmax(172px, 1fr);
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scroll-snap-type: x proximity;
        padding-bottom: 6px;
        scrollbar-width: thin;
    }
    .app-page .stat-row-4 .stat-mini { scroll-snap-align: start; padding: 13px 14px; }
    .app-page .stat-row-4 .stat-mini .stat-mini-copy strong { font-size: 16.5px; }
    .app-page .filters-bar { gap: 10px; padding: 14px; border-radius: 16px; }
    .app-page .filter-search { min-width: 0; }
    .app-page .filter-select { flex-basis: 140px; }
    .app-page .filters-bar .jalali-date { flex: 1 1 170px; min-width: 0; }
    .app-page .filter-count { display: block; flex-basis: 100%; margin: 0; }
    .app-page .tabs { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; overscroll-behavior-x: contain; scrollbar-width: thin; gap: 6px; padding: 6px; }
    .app-page .tabs .tab { flex: 0 0 auto; white-space: nowrap; }
    .app-page .form-grid, .app-page .settings-form-grid { gap: 20px; }
    .app-page .customer-picker { flex-wrap: wrap; }
    .app-page .customer-picker .select { flex-basis: 100% !important; }
    .app-page .customer-picker .btn { width: 100%; }
    .app-page .invoice-form-row { gap: 14px 12px; }
    .app-page .invoice-form-row .line-total-display { min-height: 48px; height: auto; white-space: normal; overflow-wrap: anywhere; padding: 10px; }
    .app-page .invoice-form-row .field-mini-label { font-size: 14px; }
    .app-page .repair-card { padding: 16px; border-radius: 16px; }
    .app-page .repair-card-head { flex-wrap: wrap; align-items: flex-start; gap: 12px; }
    .app-page .repair-card-copy { flex-basis: calc(100% - 56px); }
    .app-page .repair-card-copy strong { white-space: normal; overflow: visible; overflow-wrap: anywhere; font-size: 16px; }
    .app-page .repair-card-foot { gap: 12px; line-height: 1.8; }
    .app-page .invoice-hero-copy, .app-page .repair-device-copy { min-width: 0; flex-basis: calc(100% - 72px); }
    .app-page .invoice-hero-copy h2, .app-page .repair-device-copy h2 { font-size: 19px; }
    .app-page .card-info-row { align-items: flex-start; flex-direction: column; }
    .app-page .card-number-text { letter-spacing: .5px; }
    .app-page .form-actions { gap: 10px; }
    .app-page .form-actions .btn { min-height: 48px; }
    .app-page .sms-log-table .sms-actions-cell {
        position: sticky;
        left: 0;
        z-index: 2;
        width: 154px;
        min-width: 154px;
        padding: 10px;
        background: var(--surface);
        box-shadow: 1px 0 0 var(--line-soft), -10px 0 18px -16px rgba(16, 24, 40, .32);
    }
    .app-page .sms-log-table th.sms-actions-cell { background: #fafbfd; }
    .app-page .sms-log-table tbody tr:hover .sms-actions-cell { background: #fbfcff; }
    .app-page .sms-row-actions { flex-direction: column; align-items: stretch; gap: 10px; }
    .app-page .sms-row-actions .inline-form { display: flex; }
    .app-page .sms-row-actions .btn { width: 100%; justify-content: center; }
    .app-page .customer-maintenance-page > :not(:last-child) { margin-bottom: 24px; }
    .app-page .toast { bottom: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom) + 12px); max-width: calc(100vw - 32px); }
    .app-page .jalali-date-pop { position: fixed; inset: auto 12px calc(var(--mobile-nav-height) + env(safe-area-inset-bottom) + 12px); width: auto; max-width: 360px; max-height: calc(100dvh - 160px); margin-inline: auto; overflow-y: auto; z-index: 90; }
    .app-page .jd-day, .app-page .jd-step { min-height: 40px; height: 40px; }
    .app-page .jd-title { font-size: 16px; }
}

@media screen and (max-width: 359px) {
    .app-page .stats-grid, .app-page .stat-mini-grid:not(.invoice-summary):not(.stat-row-4) { grid-template-columns: minmax(0, 1fr); }
    .app-page .topbar { padding-inline: 12px; }
    .app-page .page-content { padding-inline: 12px; }
    .app-page .mobile-nav-label { font-size: 11px; }
    .app-page .sms-log-table .sms-actions-cell { width: 140px; min-width: 140px; padding: 8px; }
}

@media (prefers-reduced-motion: reduce) {
    .app-page *, .app-page *::before, .app-page *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Blocked IP list ---------- */
.ip-chip {
    direction: ltr;
    display: inline-block;
    max-width: 100%;
    padding: 3px 8px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #f6f8fc;
    color: var(--ink-soft);
    font-size: 13px;
    unicode-bidi: embed;
}
.ip-blocks-table .badge { margin-top: 5px; }
.ip-blocks-table small.muted { font-size: 12.5px; }
.ip-block-form { border-top: 1px solid var(--line-soft); padding-top: 18px; }

/* ---------- Item label (چاپ لیبل کالا) ---------- */
/* اندازه‌ها به میلی‌متر است تا آنچه روی پرینتر می‌آید با اندازهٔ واقعی برچسب یکی باشد؛
   --label-scale از ارتفاع لیبل می‌آید و فقط فونت‌ها را با برچسب بزرگ یا کوچک می‌کند.
   ردیف‌ها همیشه دوتا‌دوتا‌اند و عرض برگه به همان اندازهٔ لیبل‌ها جمع می‌شود، پس
   برای یک یا دو لیبل، کادر سفید دور آن‌ها می‌چرخد نه به پهنای A4. */
.label-sheet {
    --label-w: 60mm;
    --label-h: 40mm;
    --label-scale: 1;
    --label-cols: 1;
    display: grid;
    grid-template-columns: repeat(var(--label-cols), minmax(0, var(--label-w)));
    grid-auto-rows: var(--label-h);
    justify-content: center;
    align-content: flex-start;
    gap: 4mm;
    width: fit-content;
    max-width: 100%;
    margin: 24px auto 50px;
    padding: 8mm;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.label-sheet.is-preview {
    gap: 3mm;
    padding: 6mm;
    background: var(--surface-soft);
    box-shadow: none;
}
.label-card {
    width: var(--label-w);
    height: var(--label-h);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: calc(1mm * var(--label-scale));
    padding: calc(2mm * var(--label-scale)) calc(2.5mm * var(--label-scale));
    overflow: hidden;
    background: #fff;
    color: #101828;
    border: 1px dashed #c3cad6;
    border-radius: 2mm;
    text-align: center;
    line-height: 1.35;
}
.label-shop {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.2mm;
    font-size: calc(2.5mm * var(--label-scale));
    font-weight: 700;
    max-width: 100%;
}
.label-shop img {
    height: calc(3.4mm * var(--label-scale));
    width: auto;
    object-fit: contain;
}
.label-title {
    font-size: calc(3.4mm * var(--label-scale));
    font-weight: 700;
    letter-spacing: -0.2mm;
    max-width: 100%;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.label-row {
    display: flex;
    gap: 1.2mm;
    justify-content: center;
    font-size: calc(2.4mm * var(--label-scale));
    color: #344054;
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.label-row span { color: #6b7280; }
.label-barcode-holder {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    color: #000;
}
.label-barcode-holder svg {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
}
.label-code {
    font-size: calc(2.6mm * var(--label-scale));
    font-weight: 600;
    letter-spacing: 0.3mm;
    direction: ltr;
}
.label-date {
    display: flex;
    gap: 1.2mm;
    justify-content: center;
    font-size: calc(2.6mm * var(--label-scale));
    border-top: 0.4mm solid #101828;
    border-radius: 1mm;
    padding-top: calc(1mm * var(--label-scale));
    width: 100%;
}
.label-date span { color: #6b7280; }
.label-date strong { font-weight: 700; }
.label-note {
    font-size: calc(2.1mm * var(--label-scale));
    color: #475467;
    max-width: 100%;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.label-copies-form {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    color: var(--muted);
}
.label-copies-form label { white-space: nowrap; }
.label-copies-form input { width: 74px; }
.label-preview-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-top: 12px;
    font-size: 13px;
    color: var(--muted);
}

/* ---------- Print media ---------- */
@media print {
    @page { size: A4; margin: 0; }
    @page receipt { size: A5 portrait; margin: 0; }
    html, body { background: #fff !important; }
    .print-page { background: #fff; }
    .no-print, .print-toolbar { display: none !important; }
    .print-sheet {
        width: 210mm;
        min-height: 296mm;
        margin: 0;
        box-shadow: none;
        padding: 13mm 15mm;
    }
    .receipt-sheet {
        width: 148mm;
        min-height: 210mm;
        padding: 11mm 12mm;
        page: receipt;
        box-shadow: none;
    }
    .label-sheet {
        width: fit-content;
        max-width: none;
        min-height: 296mm;
        margin: 0 auto;
        padding: 8mm;
        gap: 4mm;
        border: none;
        border-radius: 0;
        box-shadow: none;
        background: #fff;
    }
    .label-card { break-inside: avoid; page-break-inside: avoid; }
    .label-sheet.is-preview { padding: 8mm; background: #fff; }
    .receipt-sheet .print-footer { position: static; }
    .receipt-sheet .print-header,
    .receipt-sheet .print-meta-grid,
    .receipt-sheet .print-section,
    .receipt-sheet .print-footer { break-inside: avoid; page-break-inside: avoid; }
    a { color: inherit; text-decoration: none; }
    * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
}
