:root {
    --bg: #f3f6f4;
    --surface: #ffffff;
    --ink: #122421;
    --muted: #3d524c;
    --line: #d5e3de;
    --rail: #06221f;
    --rail-text: #d5eee6;
    --primary: #0c6b5c;
    --primary-dark: #084f44;
    --primary-soft: #e7f4f0;
    --mint: #b6f6ea;
    --danger: #9f1d1d;
    --danger-bg: #fdecec;
    --radius: 14px;
    --shadow: 0 1px 2px rgba(6, 34, 31, 0.04), 0 10px 28px rgba(6, 34, 31, 0.05);
    --header-h: 68px;
    --nav-h: 68px;
}

* { font-family: "Vazirmatn", sans-serif; }

html { font-size: 16px; }

html, body { height: 100%; }

.license-banner {
    background: #fff6e8;
    color: #6b4708;
    border-bottom: 1px solid #f0d7a8;
    padding: 10px 16px;
    font-size: 15px;
    line-height: 1.7;
}
.license-banner.is-danger {
    background: #fdecec;
    color: #7f1d1d;
    border-bottom-color: #f3c4c4;
}
.license-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.license-grid div {
    background: #f4faf7;
    border: 1px solid #d5e3de;
    border-radius: 12px;
    padding: 10px 12px;
}
.license-grid span { display: block; color: #3d524c; font-size: 13px; font-weight: 700; }
.license-grid strong { display: block; font-size: 16px; margin-top: 2px; word-break: break-word; }

.app-body {
    margin: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--ink);
    overflow: hidden;
    font-size: 16px;
    line-height: 1.65;
}

.app-body, .app-body * { user-select: text; }
button, .tab-btn, select, .channel-pill { user-select: none; }

.app-body .text-xs { font-size: 15px !important; line-height: 1.6 !important; }
.app-body .text-sm { font-size: 16px !important; line-height: 1.6 !important; }
.app-body .text-\[10px\],
.app-body .text-\[11px\] { font-size: 13px !important; line-height: 1.45 !important; }
.app-body .text-slate-400,
.app-body .text-slate-500 { color: var(--muted) !important; }
.app-body .text-slate-600,
.app-body .text-slate-700,
.app-body .text-slate-800,
.app-body .text-slate-900 { color: var(--ink) !important; }

.app-body .bg-blue-600 { background-color: var(--primary) !important; }
.app-body .hover\:bg-blue-700:hover,
.app-body .hover\:bg-blue-800:hover { background-color: var(--primary-dark) !important; }
.app-body .text-blue-600,
.app-body .text-blue-700,
.app-body .text-blue-800,
.app-body .text-blue-900,
.app-body .hover\:text-blue-800:hover { color: var(--primary-dark) !important; }
.app-body .bg-blue-50,
.app-body .bg-blue-100,
.app-body .bg-indigo-50,
.app-body .from-blue-50,
.app-body .to-indigo-50 { background-color: var(--primary-soft) !important; }
.app-body .border-blue-100,
.app-body .border-blue-200,
.app-body .border-blue-500,
.app-body .border-blue-600,
.app-body .border-indigo-100,
.app-body .border-indigo-200,
.app-body .focus\:border-blue-500:focus,
.app-body .focus\:border-indigo-500:focus { border-color: var(--primary) !important; }
.app-body .bg-indigo-600 { background-color: #0e5f63 !important; }
.app-body .hover\:bg-indigo-700:hover { background-color: #0a4c50 !important; }
.app-body .text-indigo-600,
.app-body .text-indigo-700,
.app-body .text-indigo-800,
.app-body .text-indigo-900 { color: #0c4f52 !important; }
.app-body .bg-indigo-100 { background-color: #e5f4f4 !important; }
.app-body .bg-stone-900 { background-color: var(--rail) !important; }
.app-body .hover\:bg-stone-800:hover { background-color: #0c3330 !important; }

.app-body input,
.app-body select,
.app-body textarea {
    font-size: 16px !important;
    line-height: 1.5 !important;
    color: var(--ink);
    border-radius: 12px;
}

.app-body input:not([type="checkbox"]):not([type="radio"]),
.app-body select,
.app-body textarea {
    min-height: 44px;
    background: #fff !important;
    border-color: #c5d6d0 !important;
}

.app-body input:focus,
.app-body select:focus,
.app-body textarea:focus {
    outline: 2px solid transparent;
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(12, 107, 92, 0.16);
}

.app-body input.is-invalid,
.app-body select.is-invalid,
.app-body textarea.is-invalid {
    border-color: var(--danger) !important;
    background: #fff8f7 !important;
    box-shadow: 0 0 0 3px rgba(159, 29, 29, 0.12);
}

button:focus-visible,
a:focus-visible,
.tab-btn:focus-visible,
.channel-pill:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.topbar {
    height: var(--header-h);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 18px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    z-index: 20;
}

.brand { display: flex; align-items: center; gap: 10px; min-width: 0; text-decoration: none; color: inherit; }
.brand-logo {
    height: 46px;
    width: auto;
    display: block;
    object-fit: contain;
}
.brand h1 { font-size: 16px; font-weight: 800; line-height: 1.25; margin: 0; color: var(--ink); }
.brand p { font-size: 13px; color: var(--muted); margin: 0; font-weight: 600; }

.acct-switch {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 6px 12px;
    min-width: 0;
}
.acct-switch select {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    min-height: 0 !important;
    height: auto !important;
    font-weight: 700;
    font-size: 15px !important;
    color: var(--ink);
    outline: none;
    max-width: 220px;
    padding: 0 !important;
}
.status-dot {
    width: 8px; height: 8px; border-radius: 99px;
    background: #8aa099; flex-shrink: 0;
}
.status-dot.is-on { background: #0f8a62; }
.acct-state { font-size: 13px; color: var(--muted); font-weight: 700; }

.top-user { display: flex; align-items: center; gap: 8px; min-width: 0; }
.top-user-meta { text-align: right; max-width: 180px; min-width: 0; }
#top-user-name, #top-user-role {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
#top-user-name { font-size: 14px; font-weight: 800; }
#top-user-role { font-size: 12px; font-weight: 700; color: var(--muted); }
#chat-header { min-width: 0; }
#chat-header h3 {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 280px;
    font-size: 16px !important;
}

.workspace {
    flex: 1;
    min-height: 0;
    display: flex;
}

.rail {
    width: 188px;
    flex-shrink: 0;
    background: var(--rail);
    border-left: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 10px 12px;
}

.rail-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 2px 6px 12px;
    padding: 8px 8px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.rail-brand img { height: 64px; width: auto; display: block; }

.tab-btn {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    border: 0;
    background: transparent;
    color: var(--rail-text);
    border-radius: 12px;
    padding: 11px 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}
.tab-btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.tab-btn:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.tab-btn.is-active,
.tab-btn.active {
    background: rgba(182, 246, 234, 0.16);
    color: #fff;
}
.tab-btn.hidden { display: none !important; }
.rail-badge {
    margin-right: auto;
    background: #f3c98a;
    color: #5c3b08;
    font-size: 12px;
    font-weight: 800;
    min-width: 20px;
    text-align: center;
    border-radius: 99px;
    padding: 1px 6px;
}

.workspace-main { flex: 1; min-width: 0; display: flex; overflow: hidden; }

.tab-content { min-width: 0; }
.tab-content h2 { font-size: 1.45rem !important; line-height: 1.4 !important; font-weight: 800; }
.tab-content h3 { font-size: 1.05rem !important; }
#tab-inbox { background: var(--bg); }
#tab-focus, #tab-products, #tab-customers, #tab-analytics, #tab-settings { background: transparent; }

#tab-focus > .max-w-5xl > .flex,
#tab-products > .max-w-6xl > .flex,
#tab-customers > .max-w-6xl > .flex,
#tab-analytics > .max-w-6xl > .flex {
    gap: 16px;
    align-items: flex-end;
}

.tab-content .bg-white {
    border-color: var(--line) !important;
    box-shadow: var(--shadow);
}

.inbox-list { background: var(--surface); }
#conversations-list .is-selected {
    background: #e8f5f1;
    box-shadow: inset 3px 0 0 var(--primary);
}
#conversations-list h4 { font-size: 15px !important; }
#conversations-list p { font-size: 14px !important; color: var(--muted); }

.list-empty {
    margin: 28px 16px;
    padding: 28px 18px;
    text-align: center;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.8;
    background: #f7fbf9;
    border: 1px dashed #c5d8d1;
    border-radius: var(--radius);
}
.list-empty strong {
    display: block;
    color: var(--ink);
    font-size: 16px;
    margin-bottom: 6px;
}
.list-empty p { margin: 0; font-size: 15px; }

.empty-cell {
    padding: 36px 16px !important;
    text-align: center;
    color: var(--muted) !important;
    font-size: 15px !important;
    line-height: 1.7;
}

#chat-stage { background: #eef3f1; }
#chat-empty {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 3;
    background:
        radial-gradient(420px 180px at 50% 38%, rgba(12, 107, 92, 0.08), transparent 70%),
        #eef3f1;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    padding: 32px;
    gap: 8px;
}
#chat-empty h3 { font-size: 20px; font-weight: 800; margin: 0; }
#chat-empty p { font-size: 15px; color: var(--muted); margin: 0; max-width: 320px; line-height: 1.8; }
#chat-stage.is-idle > :not(#chat-empty) { visibility: hidden; pointer-events: none; }
#chat-stage.is-idle #chat-empty { display: flex; }

.chat-back { display: none; }

#chat-summary-text {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 15px !important;
}
#chat-ai-summary-bar {
    background: #f3faf7 !important;
    border-color: var(--line) !important;
}

#messages-stream { font-size: 15px; }
#message-input { font-size: 16px !important; }

.channel-pill { min-height: 36px; font-size: 14px !important; }
.channel-pill.active {
    background: var(--primary) !important;
    color: #fff !important;
    border-color: var(--primary) !important;
}

.conn-count {
    font-size: 12px;
    font-weight: 800;
    background: #eef2f0;
    color: #3d524c;
    border-radius: 99px;
    padding: 1px 6px;
}
.conn-count.is-on { background: #e5f6ee; color: #086b45; }

#customer-side-panel { background: var(--surface); }
#customer-side-panel.is-collapsed { display: none !important; }

.tab-content table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
    font-size: 15px;
}
.tab-content .overflow-hidden:has(table),
.tab-content .overflow-x-auto {
    overflow-x: auto !important;
}
.tab-content thead th {
    position: sticky;
    top: 0;
    background: #f4f8f6 !important;
    color: #314842 !important;
    font-size: 14px;
    font-weight: 800;
    white-space: nowrap;
    letter-spacing: 0;
}
.tab-content tbody td {
    font-size: 15px;
    color: var(--ink);
    vertical-align: middle;
}
.tab-content tbody tr:hover { background: #f4faf8; }
#products-table-body td,
#customers-table-body td {
    padding-top: 14px;
    padding-bottom: 14px;
    font-size: 15px;
    white-space: nowrap;
}
#customers-table-body td:nth-child(2),
#customers-table-body td:nth-child(4),
#products-table-body td:nth-child(2) {
    white-space: normal;
    min-width: 160px;
    max-width: 280px;
}
.tab-content td button { white-space: nowrap; }

.tab-content .rounded-2xl,
.tab-content .rounded-3xl,
.glass-modal .rounded-2xl,
.glass-modal .rounded-3xl { border-radius: var(--radius); }

.snav-btn { box-shadow: none !important; border-radius: 12px !important; font-size: 15px !important; }
.snav-btn.active {
    background: var(--primary-soft) !important;
    color: var(--primary-dark) !important;
    border-color: #b7ddd2 !important;
}

#modal-login {
    background: #e7f1ed !important;
    backdrop-filter: none !important;
    align-items: stretch !important;
    justify-content: stretch !important;
    padding: 0 !important;
    overflow: auto;
}
#modal-login.hidden { display: none !important; }

.login-shell {
    min-height: 100%;
    width: 100%;
    display: grid;
    grid-template-columns: minmax(320px, 1.05fr) minmax(360px, 0.95fr);
}

.login-brand {
    background:
        radial-gradient(900px 420px at 10% -10%, rgba(182, 246, 234, 0.22), transparent 55%),
        linear-gradient(165deg, #0d3f38 0%, #06221f 68%);
    color: #f3fffb;
    padding: 64px 72px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 18px;
}
.login-brand img {
    height: 156px;
    width: auto;
    align-self: flex-start;
    filter: drop-shadow(0 16px 28px rgba(0, 0, 0, 0.28));
}
.login-brand h2 {
    margin: 8px 0 0;
    font-size: 32px;
    line-height: 1.45;
    font-weight: 800;
    max-width: 16ch;
}
.login-brand > p {
    margin: 0;
    max-width: 38ch;
    font-size: 17px;
    line-height: 1.8;
    color: #d7f3eb;
}
.login-brand ul {
    margin: 8px 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 10px;
}
.login-brand li {
    font-size: 15px;
    line-height: 1.6;
    color: #e7faf4;
    padding-right: 16px;
    position: relative;
}
.login-brand li::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 99px;
    background: #9ef3e2;
    position: absolute;
    right: 0;
    top: 0.55em;
}

.login-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 28px;
    background:
        radial-gradient(520px 280px at 12% -10%, rgba(12, 107, 92, 0.14), transparent 62%),
        radial-gradient(420px 240px at 100% 100%, rgba(182, 246, 234, 0.45), transparent 60%),
        linear-gradient(180deg, #f7fbf9 0%, #e6f2ed 100%);
}
#modal-login .login-card {
    width: min(440px, 100%);
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 22px;
    padding: 32px 28px 24px;
    box-shadow: 0 24px 60px rgba(6, 34, 31, 0.12);
}
.login-card h2 { font-size: 26px; font-weight: 800; margin: 0; line-height: 1.4; }
.login-card .login-kicker {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.7;
}
.login-card form { margin-top: 22px; display: grid; gap: 14px; }
.login-card label { display: block; font-size: 14px; font-weight: 800; margin-bottom: 6px; }
.login-card .pw-field { position: relative; }
.login-card .pw-toggle {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: var(--primary-dark);
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
    padding: 6px 8px;
}
.login-card input { width: 100%; padding-left: 64px; }
.login-card #login-username { padding-left: 14px; }
.field-error {
    color: var(--danger);
    font-size: 14px;
    margin: 6px 0 0;
    line-height: 1.5;
}
.form-error {
    background: var(--danger-bg);
    color: #7f1d1d;
    border: 1px solid #f0c2c2;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 15px;
    line-height: 1.6;
}
#login-submit { min-height: 48px; font-size: 16px; font-weight: 800; }
#login-submit:disabled { opacity: 0.7; cursor: progress; }

.dev-shortcuts { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.dev-shortcuts .dev-label {
    display: block;
    text-align: center;
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 8px;
}
.dev-shortcuts button {
    width: 100%;
    text-align: right;
    background: transparent;
    border: 0;
    color: #3d524c;
    font-size: 14px;
    padding: 5px 0;
    cursor: pointer;
    font-weight: 700;
}
.dev-shortcuts button:hover { color: var(--ink); }

body.is-guest .topbar,
body.is-guest .workspace,
body.is-guest #voip-screen-pop { display: none !important; }
html.has-session body.is-guest .topbar { display: flex !important; }
html.has-session body.is-guest .workspace { display: flex !important; }
html.has-session #modal-login { display: none !important; }
body.is-guest { overflow: auto; background: #06221f; }

.app-toast {
    position: fixed;
    z-index: 70;
    top: calc(var(--header-h) + 10px);
    left: 16px;
    max-width: min(380px, calc(100vw - 32px));
    background: #06221f;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.6;
    padding: 12px 16px;
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(6, 34, 31, 0.28);
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.app-toast.is-in { opacity: 1; transform: none; }
.app-toast.is-danger { background: #9f1d1d; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #c5d4ce; border-radius: 10px; }

.msg-bubble-customer {
    background-color: var(--surface);
    border: 1px solid var(--line);
    border-radius: 4px 16px 16px 16px;
    color: var(--ink);
    font-size: 15px;
}
.msg-bubble-agent {
    background-color: #0c3b35;
    color: #fff;
    border-radius: 16px 4px 16px 16px;
    font-size: 15px;
}
.msg-bubble-system {
    background-color: #f4f7f6;
    border: 1px dashed #c9d8d2;
    color: #243833;
    font-size: 14px;
    border-radius: var(--radius);
    text-align: center;
}

.channel-badge-whatsapp { background-color: #dcfce7; color: #166534; }
.channel-badge-telegram { background-color: #e0f2fe; color: #075985; }
.channel-badge-eitaa { background-color: #ffedd5; color: #9a3412; }
.channel-badge-bale { background-color: #d1fae5; color: #065f46; }
.channel-badge-rubika { background-color: #f3e8ff; color: #6b21a8; }
.channel-badge-voip { background-color: #e0e7ff; color: #3730a3; }

.voip-ringing { animation: pulse-ring 1.5s infinite; }
@keyframes pulse-ring {
    0% { box-shadow: 0 0 0 0 rgba(185, 28, 28, 0.45); }
    70% { box-shadow: 0 0 0 12px rgba(185, 28, 28, 0); }
    100% { box-shadow: 0 0 0 0 rgba(185, 28, 28, 0); }
}

.glass-modal { background: rgba(6, 34, 31, 0.46); }
.modal-animate-in { animation: modalIn 0.18s ease-out; }
@keyframes modalIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1100px) {
    .brand p { display: none; }
    .acct-switch select { max-width: 140px; }
    .top-user-meta { display: none; }
    .rail-brand { display: none; }

    .workspace { padding-bottom: var(--nav-h); }
    .rail {
        position: fixed;
        left: 0; right: 0; bottom: 0;
        width: 100%;
        height: var(--nav-h);
        flex-direction: row;
        justify-content: space-around;
        align-items: center;
        border-top: 1px solid rgba(255, 255, 255, 0.06);
        z-index: 40;
        padding: 6px 6px 8px;
        gap: 0;
    }
    .tab-btn {
        width: auto;
        flex: 1;
        flex-direction: column;
        justify-content: center;
        gap: 3px;
        padding: 6px 2px;
        font-size: 11px;
        border-radius: 10px;
    }
    .tab-btn span.rail-label { display: block; font-size: 11px; font-weight: 700; }
    .rail-badge { position: absolute; top: 2px; left: 10px; margin: 0; }

    #tab-inbox .inbox-list { width: 100% !important; max-width: none; border-left: 0; }
    body:not(.chat-open) #chat-stage,
    body:not(.chat-open) #customer-side-panel { display: none !important; }
    body.chat-open #tab-inbox .inbox-list { display: none; }
    .chat-back { display: inline-flex; align-items: center; justify-content: center; }

    #customer-side-panel:not(.is-collapsed) {
        position: fixed;
        z-index: 36;
        top: var(--header-h);
        right: 0;
        bottom: var(--nav-h);
        left: 0;
        width: auto !important;
        max-width: none;
        border: 0;
    }

    .glass-modal { padding: 12px; align-items: flex-end; }
    .glass-modal > div { max-width: 100% !important; max-height: calc(100vh - 24px); overflow: auto; }
    #channel-filter-pills { flex-wrap: wrap !important; overflow: visible !important; }
}

@media (max-width: 860px) {
    .login-shell { grid-template-columns: 1fr; }
    .login-brand { padding: 28px 22px 8px; gap: 10px; }
    .login-brand img { width: 96px; height: auto; }
    .login-brand h2 { font-size: 24px; max-width: none; }
    .login-brand > p { font-size: 15px; }
    .login-brand ul { display: none; }
    .login-panel { padding: 18px 16px 28px; align-items: flex-start; }
    #modal-login .login-card { padding: 22px 18px 16px; }
}

@media (max-width: 720px) {
    #tab-customers table,
    #tab-products table,
    #tab-customers thead,
    #tab-products thead,
    #tab-customers tbody,
    #tab-products tbody,
    #tab-customers tr,
    #tab-products tr,
    #tab-customers td,
    #tab-products td {
        display: block;
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        white-space: normal !important;
    }
    #tab-customers thead,
    #tab-products thead { display: none; }
    #tab-customers tr,
    #tab-products tr {
        padding: 12px 14px;
        border-bottom: 1px solid var(--line);
    }
    #tab-customers td,
    #tab-products td {
        padding: 2px 0 !important;
        border: 0 !important;
        text-align: right !important;
    }
    #tab-customers td:nth-child(2),
    #tab-products td:nth-child(2) { font-size: 16px; font-weight: 800; }
    #tab-customers td:nth-child(3) { direction: ltr; text-align: right !important; }
    #tab-customers td::before,
    #tab-products td::before {
        display: block;
        font-size: 13px;
        font-weight: 700;
        color: var(--muted);
        margin-top: 6px;
    }
    #tab-customers td:nth-child(1)::before { content: "کد حسابداری"; }
    #tab-customers td:nth-child(3)::before { content: "شماره تماس"; }
    #tab-customers td:nth-child(4)::before { content: "شهر و آدرس"; }
    #tab-customers td:nth-child(5)::before { content: "مانده حساب (ریال)"; }
    #tab-customers td:nth-child(6)::before { content: "سیستم مبدأ"; }
    #tab-products td:nth-child(1)::before { content: "کد کالا"; }
    #tab-products td:nth-child(3)::before { content: "دسته‌بندی"; }
    #tab-products td:nth-child(4)::before { content: "قیمت فروش (ریال)"; }
    #tab-products td:nth-child(5)::before { content: "موجودی"; }
    #tab-products td:nth-child(6)::before { content: "وضعیت"; }
    :root { --header-h: 60px; }
    .topbar { padding: 0 10px; gap: 8px; }
    .brand h1 { font-size: 15px; }
    .brand-logo { height: 38px; }
    .acct-state { display: none; }
    .acct-switch { padding: 4px 8px; }
    .acct-switch select { max-width: 92px; font-size: 14px !important; }

    #tab-focus, #tab-products, #tab-customers, #tab-analytics, #tab-settings {
        padding: 16px 12px 24px !important;
    }
    #tab-focus > .max-w-5xl > .flex,
    #tab-products > .max-w-6xl > .flex,
    #tab-customers > .max-w-6xl > .flex,
    #tab-analytics > .max-w-6xl > .flex {
        flex-direction: column;
        align-items: stretch !important;
    }
    #product-search-input,
    #customer-search-input { width: 100% !important; }
    .grid.grid-cols-3 { grid-template-columns: 1fr !important; }
    #chat-header { height: auto !important; min-height: 64px; flex-wrap: wrap; gap: 8px; padding-top: 8px; padding-bottom: 8px; }
    #chat-header h3 { max-width: 46vw; }
}

@media (prefers-reduced-motion: reduce) {
    .voip-ringing,
    .modal-animate-in { animation: none; }
}
