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

:root {
    --primary: #1c9ec0;
    --primary-700: #147f9d;
    --primary-100: #dff5fa;
    --primary-50: #f0fbfd;
    --ink: #16262d;
    --ink-soft: #53646c;
    --muted: #7e8e95;
    --line: #e3e9eb;
    --line-dark: #d5dde0;
    --surface: #ffffff;
    --canvas: #f6f8f9;
    --danger: #dc4c64;
    --warning: #e99a32;
    --success: #27966f;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 8px 30px rgba(22, 38, 45, .055);
    --shadow-hover: 0 14px 38px rgba(22, 38, 45, .10);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--ink);
    background: var(--canvas);
    font-family: "Vazirmatn", Tahoma, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
svg { display: block; fill: currentColor; }
h1, h2, h3, p { margin-top: 0; }
button { color: inherit; }

.skip-link { position: fixed; top: -60px; right: 16px; z-index: 9999; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; }
.skip-link:focus { top: 12px; }
.app-shell { min-height: 100vh; display: flex; }
.sidebar {
    width: 260px;
    position: fixed;
    inset: 0 0 0 auto;
    z-index: 50;
    display: flex;
    flex-direction: column;
    padding: 28px 18px 18px;
    background: #fff;
    border-left: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 10px 28px; }
.brand img { width: 45px; height: 45px; object-fit: contain; }
.brand span { display: flex; flex-direction: column; line-height: 1.35; }
.brand strong { font-size: 18px; font-weight: 850; letter-spacing: -.4px; }
.brand small { color: var(--muted); font-size: 11px; }
.main-nav { display: flex; flex-direction: column; gap: 5px; }
.nav-caption { margin: 18px 13px 6px; color: #9aa7ac; font-size: 10px; font-weight: 800; letter-spacing: .3px; }
.main-nav a { min-height: 46px; display: flex; align-items: center; gap: 12px; padding: 10px 13px; color: #5f7078; border-radius: 11px; font-weight: 650; transition: .18s ease; }
.main-nav a:hover { background: #f4f8f9; color: var(--ink); }
.main-nav a.active { color: var(--primary-700); background: var(--primary-50); box-shadow: inset -3px 0 var(--primary); }
.main-nav svg { width: 20px; height: 20px; flex: none; }
.nav-badge { margin-right: auto; min-width: 22px; height: 22px; padding: 0 6px; display: grid; place-items: center; background: var(--primary); color: white; border-radius: 20px; font-size: 10px; }
.sidebar-user { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 14px 10px 4px; border-top: 1px solid var(--line); }
.avatar { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--primary-100); color: var(--primary-700); font-size: 14px; font-weight: 850; }
.avatar-xl { width: 74px; height: 74px; font-size: 28px; box-shadow: 0 0 0 8px rgba(255,255,255,.65); }
.user-copy { min-width: 0; display: flex; flex-direction: column; line-height: 1.5; }
.user-copy strong { max-width: 125px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12px; }
.user-copy small { color: var(--muted); font-size: 10px; }
.sidebar-user form { margin-right: auto; }
.icon-button { width: 34px; height: 34px; padding: 8px; border: 0; border-radius: 8px; background: transparent; color: #8a999f; cursor: pointer; }
.icon-button:hover { color: var(--danger); background: #fff1f3; }
.icon-button svg { width: 18px; height: 18px; }
.main-column { min-width: 0; width: calc(100% - 260px); margin-right: 260px; }
.topbar { height: 76px; display: flex; align-items: center; gap: 16px; padding: 0 clamp(22px, 4vw, 58px); background: rgba(255,255,255,.92); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
.topbar-title { display: flex; flex-direction: column; line-height: 1.55; }
.topbar-title strong { font-size: 15px; font-weight: 800; }
.topbar-title small { color: var(--muted); font-size: 10px; }
.topbar-action { margin-right: auto; display: flex; align-items: center; gap: 7px; padding: 9px 14px; color: var(--primary-700); background: var(--primary-50); border-radius: 10px; font-weight: 750; }
.topbar-action svg { width: 18px; }
.mobile-menu { display: none; width: 40px; height: 40px; padding: 9px; border: 1px solid var(--line); background: #fff; border-radius: 10px; }
.page-content { width: 100%; max-width: 1540px; margin: 0 auto; padding: 34px clamp(22px, 4vw, 58px) 60px; }
.sidebar-backdrop { display: none; }

.button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 18px; border: 1px solid transparent; border-radius: 10px; cursor: pointer; font-weight: 750; transition: .18s ease; }
.button:hover { transform: translateY(-1px); }
.button-primary { color: #fff; background: var(--primary); box-shadow: 0 7px 18px rgba(28,158,192,.20); }
.button-primary:hover { background: var(--primary-700); box-shadow: 0 9px 24px rgba(28,158,192,.28); }
.button-secondary { color: var(--primary-700); background: var(--primary-50); border-color: #bde5ee; }
.button-dark { color: #fff; background: var(--ink); }
.button-ghost { color: var(--ink-soft); background: #fff; border-color: var(--line); }
.button-danger-ghost { color: var(--danger); background: #fff; border-color: #f3cbd2; }
.button-block { width: 100%; }
.button-lg { min-height: 48px; padding-inline: 24px; }
.align-self-start { align-self: flex-start; }
.back-link, .text-link { color: var(--primary-700); font-weight: 700; }
.back-link:hover, .text-link:hover { color: var(--primary); }
.eyebrow { display: inline-block; margin-bottom: 5px; color: var(--primary-700); font-size: 11px; font-weight: 850; }
.muted { color: var(--muted); }

.toast-stack { position: fixed; z-index: 100; left: 24px; top: 92px; width: min(360px, calc(100vw - 32px)); display: grid; gap: 10px; }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 13px; background: #fff; border: 1px solid var(--line); border-right: 4px solid var(--primary); border-radius: 11px; box-shadow: var(--shadow-hover); animation: toast-in .25s ease; }
.toast-success { border-right-color: var(--success); }
.toast-error { border-right-color: var(--danger); }
.toast-icon { width: 23px; height: 23px; display: grid; place-items: center; background: var(--primary-50); color: var(--primary-700); border-radius: 50%; font-weight: 900; }
.toast-success .toast-icon { color: var(--success); background: #eaf8f2; }
.toast-error .toast-icon { color: var(--danger); background: #fff0f3; }
.toast button { margin-right: auto; border: 0; background: transparent; color: var(--muted); font-size: 20px; cursor: pointer; }
.toast.is-leaving { opacity: 0; transform: translateY(-8px); transition: .2s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } }

.welcome-card { position: relative; overflow: hidden; min-height: 195px; display: grid; grid-template-columns: 1fr minmax(330px, 500px); align-items: center; gap: 45px; padding: 32px 42px; margin-bottom: 22px; background: linear-gradient(120deg, #fff 35%, #f3fbfd); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); }
.welcome-card::after { content: ""; position: absolute; width: 250px; height: 250px; left: -110px; top: -130px; border: 38px solid rgba(28,158,192,.055); border-radius: 50%; }
.welcome-card h1 { margin-bottom: 7px; font-size: clamp(22px, 2.2vw, 30px); font-weight: 900; letter-spacing: -.7px; }
.welcome-card p { max-width: 650px; margin-bottom: 0; color: var(--ink-soft); }
.quick-ticket { position: relative; z-index: 1; display: flex; align-items: center; gap: 13px; padding: 10px 12px 10px 18px; background: #fff; border: 1px solid var(--line-dark); border-radius: 40px; box-shadow: 0 8px 26px rgba(22,38,45,.06); transition: .2s; }
.quick-ticket:hover { transform: translateY(-2px); border-color: #a9dce7; box-shadow: var(--shadow-hover); }
.quick-icon { width: 51px; height: 51px; flex: none; display: grid; place-items: center; color: white; background: linear-gradient(145deg, #8bd2e2, var(--primary)); border-radius: 50%; }
.quick-icon svg { width: 28px; }
.quick-ticket > span:nth-child(2) { display: flex; flex-direction: column; line-height: 1.55; }
.quick-ticket strong { font-size: 13px; }
.quick-ticket small { color: var(--muted); font-size: 10px; }
.quick-arrow { margin-right: auto; color: var(--primary); font-size: 22px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.stat-card { display: flex; align-items: center; gap: 14px; min-height: 95px; padding: 17px 19px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); transition: .2s; }
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.stat-card > span:last-child { display: flex; flex-direction: column; }
.stat-card small { color: var(--muted); font-size: 11px; }
.stat-card strong { margin-top: -2px; font-size: 25px; font-weight: 900; }
.stat-icon { width: 48px; height: 48px; flex: none; display: grid; place-items: center; border-radius: 13px; }
.stat-icon svg { width: 24px; }
.icon-blue { color: var(--primary-700); background: var(--primary-50); }
.icon-orange { color: #cc7c18; background: #fff5e6; }
.icon-green { color: var(--success); background: #eaf8f2; }
.icon-gray { color: #708087; background: #f0f3f4; }
.queue-strip { display: grid; grid-template-columns: 1fr auto 1fr auto; align-items: center; gap: 18px; margin-bottom: 22px; padding: 13px 18px; background: #14323b; color: #e9f6f8; border-radius: 12px; }
.queue-strip div { display: flex; align-items: center; gap: 7px; }
.queue-strip strong { color: #7dd1e4; font-size: 17px; }
.queue-strip a { color: #91d9e8; font-size: 11px; font-weight: 700; }
.pulse-dot, .live-dot { width: 8px; height: 8px; display: inline-block; background: #6be2b7; border-radius: 50%; box-shadow: 0 0 0 4px rgba(107,226,183,.13); }
.section-card, .form-card, .info-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.section-card { padding: 23px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.section-heading h2 { margin-bottom: 1px; font-size: 16px; font-weight: 850; }
.section-heading p { margin-bottom: 0; color: var(--muted); font-size: 11px; }
.ticket-table-wrap { overflow-x: auto; scrollbar-width: thin; }
.ticket-table { width: 100%; border-collapse: collapse; min-width: 770px; }
.ticket-table th { padding: 10px 12px; color: #8a989d; border-bottom: 1px solid var(--line); font-size: 10px; font-weight: 750; text-align: right; white-space: nowrap; }
.ticket-table td { padding: 13px 12px; border-bottom: 1px solid #edf1f2; vertical-align: middle; white-space: nowrap; }
.ticket-table tbody tr:last-child td { border-bottom: 0; }
.ticket-table tbody tr { transition: .15s; }
.ticket-table tbody tr:hover { background: #fafcfc; }
.ticket-table tr.unread-row { background: #fbfeff; }
.ticket-table time { color: var(--ink-soft); font-size: 11px; }
.ticket-subject { min-width: 230px; display: flex; align-items: center; gap: 9px; }
.ticket-subject span { display: flex; flex-direction: column; line-height: 1.55; }
.ticket-subject strong { max-width: 340px; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
.ticket-subject small { color: var(--muted); direction: ltr; text-align: right; font-size: 10px; }
.unread-dot { width: 7px; height: 7px; flex: none; background: var(--primary); border-radius: 50%; }
.person-cell, .mini-person { display: flex; align-items: center; gap: 7px; }
.person-cell i, .mini-person i { width: 27px; height: 27px; display: grid; place-items: center; background: #edf7f9; color: var(--primary-700); border-radius: 50%; font-style: normal; font-size: 10px; font-weight: 800; }
.person-plain { font-size: 11px; }
.badge { display: inline-flex; align-items: center; justify-content: center; min-height: 26px; padding: 3px 9px; border-radius: 20px; font-size: 9px; font-weight: 750; }
.status-open { color: #b06d13; background: #fff3df; }
.status-pending { color: #8a6813; background: #fff9d9; }
.status-answered { color: #237f61; background: #e8f7f1; }
.status-closed { color: #66777e; background: #eef1f2; }
.priority { display: inline-flex; align-items: center; gap: 6px; font-size: 10px; }
.priority i { width: 7px; height: 7px; border-radius: 50%; background: #8a999f; }
.priority-low i { background: #8a999f; }
.priority-normal i { background: var(--primary); }
.priority-high i { background: var(--warning); }
.priority-urgent { color: var(--danger); font-weight: 750; }
.priority-urgent i { background: var(--danger); box-shadow: 0 0 0 3px #ffe8ec; }
.row-arrow { width: 30px; height: 30px; display: grid; place-items: center; color: var(--primary-700); border: 1px solid var(--line); border-radius: 8px; }
.row-arrow:hover { color: #fff; background: var(--primary); border-color: var(--primary); }
.empty-state { min-height: 320px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 35px; text-align: center; }
.compact-empty { min-height: 250px; }
.empty-icon { width: 54px; height: 54px; display: grid; place-items: center; margin-bottom: 10px; color: var(--primary-700); background: var(--primary-50); border-radius: 50%; font-size: 24px; }
.empty-state h3 { margin-bottom: 3px; font-size: 17px; }
.empty-state p { color: var(--muted); }

.page-title-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 25px; margin-bottom: 22px; }
.page-title-row h1 { margin-bottom: 2px; font-size: 26px; font-weight: 900; letter-spacing: -.5px; }
.page-title-row p { margin-bottom: 0; color: var(--ink-soft); }
.filter-card { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; padding: 13px; background: #fff; border: 1px solid var(--line); border-radius: 13px; }
.filter-card select { width: auto; min-width: 145px; }
.search-field { position: relative; flex: 1; min-width: 240px; }
.search-field svg { position: absolute; top: 50%; right: 13px; width: 19px; color: #93a1a6; transform: translateY(-50%); }
.search-field input { padding-right: 41px !important; }
.clear-filter { color: var(--danger); font-size: 11px; font-weight: 700; }
.flush-card { padding: 4px 16px; }
.full-table { min-width: 1080px; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 15px; margin-top: 22px; }
.pagination a { padding: 7px 13px; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.pagination span { color: var(--muted); font-size: 11px; }

input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), textarea, select {
    width: 100%;
    min-height: 45px;
    padding: 10px 13px;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line-dark);
    border-radius: 9px;
    outline: none;
    transition: border-color .18s, box-shadow .18s;
}
textarea { min-height: 120px; resize: vertical; line-height: 1.9; }
select { cursor: pointer; }
input:focus, textarea:focus, select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(28,158,192,.11); }
input::placeholder, textarea::placeholder { color: #a3aeb2; }
.field-group { display: flex; flex-direction: column; gap: 6px; }
.field-group label { color: #33474f; font-size: 11px; font-weight: 750; }
.field-group label b { color: var(--danger); }
.field-group label span { color: var(--muted); font-weight: 500; }
.field-help, .field-group > small { color: var(--muted); font-size: 9px; }
.field-help ul { margin: 5px 0 0; padding-right: 16px; }
.field-error { color: var(--danger) !important; font-size: 10px !important; font-weight: 650; }
.has-error input, .has-error textarea, .has-error select, .has-error .file-drop { border-color: #eea8b4; }
.form-alert, .errorlist { margin: 0; padding: 10px 12px; color: #a82e43; background: #fff0f3; border: 1px solid #f8ccd3; border-radius: 9px; list-style: none; font-size: 11px; }
.stack-form { display: flex; flex-direction: column; gap: 15px; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field-meta { display: flex; justify-content: space-between; color: var(--muted); }
.form-card { padding: 25px; }
.form-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 18px; align-items: start; }
.narrow-page { max-width: 1120px; margin: 0 auto; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 5px; }
.file-drop { position: relative; min-height: 92px; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 16px; background: #fbfdfd; border: 1px dashed #b9d2d9; border-radius: 11px; cursor: pointer; text-align: center; }
.file-drop:hover { background: var(--primary-50); border-color: var(--primary); }
.file-drop input, .attach-button input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.file-drop > span:not(.file-icon) { display: flex; flex-direction: column; }
.file-drop strong { color: var(--primary-700); font-size: 11px; }
.file-drop small { color: var(--muted); font-size: 9px; }
.file-icon { width: 39px; height: 39px; display: grid; place-items: center; color: var(--primary-700); background: var(--primary-100); border-radius: 50%; }
.file-icon svg { width: 22px; }
.tips-card { position: sticky; top: 95px; padding: 22px; background: linear-gradient(160deg,#173640,#102c35); color: #e9f6f8; border-radius: var(--radius); box-shadow: var(--shadow); }
.tips-icon { width: 31px; height: 31px; display: grid; place-items: center; margin-bottom: 12px; color: #11333d; background: #79d1e4; border-radius: 50%; font-weight: 900; }
.tips-card h2 { margin-bottom: 10px; font-size: 15px; }
.tips-card ul { margin: 0; padding-right: 18px; color: #b8d0d6; font-size: 10px; }
.tips-card li { margin-bottom: 8px; }
.privacy-tip { margin-top: 16px; padding: 11px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); border-radius: 9px; }
.privacy-tip strong { color: #8ed9e9; font-size: 10px; }
.privacy-tip p { margin: 2px 0 0; color: #b8d0d6; font-size: 9px; }

.ticket-detail-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 22px; }
.ticket-detail-header h1 { margin: 6px 0 2px; font-size: 25px; font-weight: 900; letter-spacing: -.5px; }
.ticket-detail-header p { margin: 0; color: var(--muted); font-size: 11px; }
.ticket-number-line { display: flex; align-items: center; gap: 9px; margin-top: 12px; }
.copy-number { direction: ltr; padding: 0; color: var(--primary-700); background: transparent; border: 0; font-size: 11px; font-weight: 800; cursor: pointer; }
.copy-number span { margin-left: 4px; color: #91a2a8; }
.ticket-detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 18px; align-items: start; }
.conversation-card { overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.conversation-head { min-height: 56px; display: flex; align-items: center; justify-content: space-between; padding: 0 22px; border-bottom: 1px solid var(--line); }
.conversation-head div { display: flex; align-items: center; gap: 9px; }
.conversation-head small { color: var(--muted); }
.thread { padding: 22px; background: #fbfcfc; }
.message { width: min(84%, 720px); margin-bottom: 18px; padding: 16px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.message-user { margin-left: auto; border-top-right-radius: 4px; }
.message-admin { margin-right: auto; background: #f0fbfd; border-color: #cceaf0; border-top-left-radius: 4px; }
.message-internal { width: 92%; margin-inline: auto; background: #fff9e7; border: 1px dashed #e7c979; }
.message header { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
.message header > div:nth-child(2) { display: flex; flex-direction: column; line-height: 1.45; }
.message header strong { font-size: 11px; }
.message header small { color: var(--muted); font-size: 9px; }
.message header time { margin-right: auto; color: #8b999e; font-size: 9px; }
.message-body { color: #30444c; line-height: 2; overflow-wrap: anywhere; }
.message-admin .avatar { color: #fff; background: var(--primary); }
.message-internal .avatar { color: #916a12; background: #ffedb9; }
.attachment-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 13px; }
.attachment { min-width: 190px; display: flex; align-items: center; gap: 9px; padding: 8px 10px; background: rgba(255,255,255,.7); border: 1px solid var(--line); border-radius: 9px; }
.attachment:hover { border-color: var(--primary); }
.attachment-icon { width: 29px; height: 29px; display: grid; place-items: center; color: var(--primary-700); background: var(--primary-100); border-radius: 7px; font-weight: 900; }
.attachment > span:last-child { min-width: 0; display: flex; flex-direction: column; line-height: 1.5; }
.attachment strong { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 9px; direction: ltr; }
.attachment small { color: var(--muted); font-size: 8px; }
.waiting-separator { display: flex; align-items: center; gap: 12px; color: #95a3a8; font-size: 9px; }
.waiting-separator::before, .waiting-separator::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.reply-area { padding: 20px 22px; border-top: 1px solid var(--line); }
.reply-heading { display: flex; justify-content: space-between; margin-bottom: 8px; }
.reply-heading label { font-size: 11px; font-weight: 800; }
.reply-heading small { color: var(--muted); font-size: 9px; }
.reply-area textarea { min-height: 125px; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.reply-toolbar { min-height: 51px; display: flex; align-items: center; gap: 12px; margin-top: -1px; padding: 7px 8px; border: 1px solid var(--line-dark); border-radius: 0 0 9px 9px; }
.attach-button { position: relative; display: flex; align-items: center; gap: 6px; padding: 7px 8px; color: var(--primary-700); cursor: pointer; font-size: 10px; font-weight: 700; }
.attach-button svg { width: 19px; }
.internal-check { display: flex; align-items: center; gap: 5px; color: #8d6b18; font-size: 9px; cursor: pointer; }
.internal-check input { accent-color: #d3a62f; }
.reply-toolbar .button { margin-right: auto; min-height: 37px; }
.closed-notice { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 90px; color: #66777e; background: #f7f9f9; border-radius: 10px; }
.closed-notice > span { width: 35px; height: 35px; display: grid; place-items: center; color: var(--success); background: #e8f7f1; border-radius: 50%; font-weight: 900; }
.closed-notice strong { display: block; }
.closed-notice p { margin: 0; font-size: 10px; }
.ticket-sidebar { display: grid; gap: 14px; }
.info-card { padding: 18px; }
.info-card h2 { margin-bottom: 14px; font-size: 14px; }
.ticket-meta { margin: 0; }
.ticket-meta > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; border-bottom: 1px solid #edf1f2; }
.ticket-meta > div:last-child { border: 0; }
.ticket-meta dt { color: var(--muted); font-size: 10px; }
.ticket-meta dd { margin: 0; text-align: left; font-size: 10px; font-weight: 650; }
.card-title-with-icon { display: flex; gap: 9px; margin-bottom: 13px; }
.card-title-with-icon > span { width: 33px; height: 33px; display: grid; place-items: center; background: #f0f3f4; border-radius: 8px; }
.card-title-with-icon h2 { margin: 0; }
.card-title-with-icon p { margin: 0; color: var(--muted); font-size: 9px; }
.compact-form { display: grid; gap: 11px; }
.compact-form select { min-height: 39px; padding-block: 6px; font-size: 10px; }
.help-card { display: flex; gap: 10px; background: var(--primary-50); border-color: #cceaf0; }
.help-symbol { width: 30px; height: 30px; flex: none; display: grid; place-items: center; color: #fff; background: var(--primary); border-radius: 50%; font-weight: 900; }
.help-card strong { font-size: 10px; }
.help-card p { margin: 2px 0 0; color: var(--ink-soft); font-size: 9px; }

.profile-wrap { max-width: 820px; margin: 0 auto; }
.profile-hero { display: flex; align-items: center; gap: 19px; margin-bottom: 18px; padding: 25px; color: #fff; background: linear-gradient(130deg, #123540, #1b677b); border-radius: var(--radius); }
.profile-hero .eyebrow { color: #8bd8e8; }
.profile-hero h1 { margin: 0; font-size: 23px; }
.profile-hero p { margin: 0; color: #bdd7dd; direction: ltr; text-align: right; }
.profile-card { padding: 25px; }
.profile-card .stack-form { max-width: 520px; }
.disabled-field input { color: #7b8a90; background: #f3f5f5; }

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.ltr-cell { direction: ltr; display: inline-block; }
.feedback-callout { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; padding: 16px 18px; background: linear-gradient(110deg, #eefafd, #fff); border: 1px solid #cdeaf0; border-radius: 14px; }
.feedback-callout-icon { width: 43px; height: 43px; flex: none; display: grid; place-items: center; color: #fff; background: var(--primary); border-radius: 12px; font-size: 21px; box-shadow: 0 8px 18px rgba(28,158,192,.2); }
.feedback-callout div { flex: 1; }
.feedback-callout strong { font-size: 13px; }
.feedback-callout p { margin: 1px 0 0; color: var(--ink-soft); font-size: 10px; }
.feedback-list-table { min-width: 850px; }
.score-chip { display: inline-flex; align-items: center; justify-content: center; min-width: 47px; min-height: 27px; padding: 3px 9px; color: var(--primary-700); background: var(--primary-50); border: 1px solid #c8e9f0; border-radius: 20px; font-size: 10px; font-weight: 800; }

.feedback-page { max-width: 1220px; }
.feedback-page .page-title-row { align-items: center; }
.feedback-page .page-title-row h1 { margin-top: 7px; }
.feedback-date-card { min-width: 150px; display: flex; flex-direction: column; align-items: center; padding: 12px 18px; color: var(--primary-700); background: #fff; border: 1px solid #cceaf0; border-radius: 13px; box-shadow: var(--shadow); }
.feedback-date-card small { color: var(--muted); font-size: 9px; }
.feedback-date-card strong { direction: ltr; font-size: 18px; }
.feedback-form { min-width: 0; display: grid; gap: 17px; }
.feedback-section { min-width: 0; padding: 23px 25px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.feedback-section-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.feedback-section-head > span { width: 31px; height: 31px; flex: none; display: grid; place-items: center; color: #fff; background: var(--primary); border-radius: 9px; font-size: 12px; font-weight: 850; }
.feedback-section-head h2 { margin: 0 0 2px; font-size: 15px; font-weight: 850; }
.feedback-section-head p { margin: 0; color: var(--muted); font-size: 10px; }
.feedback-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; scrollbar-width: thin; }
.feedback-matrix { width: 100%; border-collapse: collapse; }
.feedback-matrix th, .feedback-matrix td { padding: 11px 12px; border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: center; vertical-align: middle; }
.feedback-matrix tr:last-child > th, .feedback-matrix tr:last-child > td { border-bottom: 0; }
.feedback-matrix th:last-child, .feedback-matrix td:last-child { border-left: 0; }
.feedback-matrix thead th { color: #5e7077; background: #f6f9fa; font-size: 10px; font-weight: 800; white-space: nowrap; }
.feedback-matrix tbody th { color: var(--ink); background: #fbfdfd; direction: ltr; font-size: 11px; font-weight: 800; white-space: nowrap; }
.feedback-matrix tbody td { font-size: 11px; }
.usage-matrix { min-width: 700px; table-layout: fixed; }
.usage-matrix th:first-child { width: 30%; }
.matrix-radio { position: relative; width: 34px; height: 34px; display: inline-grid; place-items: center; cursor: pointer; }
.matrix-radio input { position: absolute; opacity: 0; }
.matrix-radio > span { width: 21px; height: 21px; display: block; background: #fff; border: 2px solid #bbc8cc; border-radius: 50%; transition: .16s ease; }
.matrix-radio input:checked + span { background: radial-gradient(circle, var(--primary) 0 42%, #fff 45%); border-color: var(--primary); box-shadow: 0 0 0 4px rgba(28,158,192,.1); }
.matrix-radio input:focus-visible + span { outline: 3px solid rgba(28,158,192,.22); outline-offset: 2px; }
.matrix-row-error { background: #fff8f9; }
.matrix-error-row td { padding: 6px 12px; color: var(--danger); background: #fff2f4; font-size: 9px; text-align: right; }
.rating-matrix { min-width: 980px; }
.rating-matrix th:first-child { min-width: 130px; }
.rating-cell select { min-width: 66px; min-height: 38px; padding: 5px 8px; text-align: center; }
.rating-cell.rating-disabled { background: #f4f6f7; }
.rating-cell.rating-disabled select { color: #a5afb3; background: #edf1f2; cursor: not-allowed; }
.average-output { min-width: 42px; min-height: 30px; display: inline-grid; place-items: center; color: var(--primary-700); background: var(--primary-50); border-radius: 8px; font-weight: 850; }
.rating-scale { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin: -5px 43px 14px 0; color: var(--ink-soft); font-size: 9px; }
.rating-scale b { width: 22px; height: 22px; display: grid; place-items: center; color: var(--primary-700); background: var(--primary-50); border-radius: 50%; }
.rating-scale i { width: 15px; height: 1px; background: var(--line-dark); }
.feedback-check-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px 14px; }
.feedback-check { display: flex; align-items: flex-start; gap: 9px; padding: 11px 12px; color: #3f525a; background: #fbfdfd; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-size: 10px; }
.feedback-check:hover { border-color: #b7e1ea; background: var(--primary-50); }
.feedback-check input { margin-top: 3px; accent-color: var(--primary); }
.feedback-check:has(input:checked) { color: var(--primary-700); background: var(--primary-50); border-color: #b7e1ea; }
.feedback-block-error { display: block; margin-top: 7px; }
.feedback-followups { margin-top: 14px; }
.feedback-followups [hidden] { display: none; }
.feedback-submit-bar { display: flex; align-items: center; gap: 10px; padding: 17px 20px; background: #15343e; color: #fff; border-radius: 14px; box-shadow: var(--shadow); }
.feedback-submit-bar > div { flex: 1; display: flex; flex-direction: column; }
.feedback-submit-bar strong { font-size: 12px; }
.feedback-submit-bar small { color: #b8d0d6; font-size: 9px; }
.feedback-submit-bar .button-ghost { color: #d9ebef; background: transparent; border-color: rgba(255,255,255,.2); }

.feedback-readonly-badge { padding: 8px 12px; color: var(--success); background: #eaf8f2; border: 1px solid #cdeade; border-radius: 20px; font-size: 10px; font-weight: 800; }
.feedback-summary-card { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-bottom: 17px; padding: 16px 20px; background: #15343e; color: #fff; border-radius: 14px; }
.feedback-summary-card > div { min-width: 0; display: flex; flex-direction: column; padding: 2px 15px; border-left: 1px solid rgba(255,255,255,.1); }
.feedback-summary-card > div:last-child { border-left: 0; }
.feedback-summary-card small { color: #a9c7ce; font-size: 9px; }
.feedback-summary-card strong { overflow: hidden; text-overflow: ellipsis; font-size: 11px; }
.feedback-detail-title { margin-bottom: 16px; }
.feedback-detail-title + .feedback-summary-card ~ .feedback-section { margin-bottom: 17px; }
.detail-usage-table { min-width: 540px; }
.usage-badge { display: inline-flex; min-width: 120px; justify-content: center; padding: 5px 10px; border-radius: 20px; font-size: 9px; font-weight: 800; }
.usage-in_use { color: #237f61; background: #e8f7f1; }
.usage-evaluating { color: #9a6b16; background: #fff4dc; }
.usage-not_using { color: #69797f; background: #edf1f2; }
.feedback-answer-section .feedback-section-head { margin-bottom: 12px; }
.feedback-answer { min-height: 62px; padding: 14px 16px; color: #3d5058; background: #f8fafb; border-right: 3px solid #bce4ed; border-radius: 9px; line-height: 2; }
.feedback-reason-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; padding: 0; list-style: none; }
.feedback-reason-list li { position: relative; padding: 10px 34px 10px 12px; color: #3d5058; background: #f8fafb; border: 1px solid var(--line); border-radius: 9px; font-size: 10px; }
.feedback-reason-list li::before { content: "✓"; position: absolute; right: 11px; color: var(--primary); font-weight: 900; }
.feedback-inline-answer { display: flex; flex-direction: column; margin-top: 10px; padding: 10px 13px; background: var(--primary-50); border-radius: 9px; }
.feedback-inline-answer small { color: var(--muted); font-size: 9px; }
.feedback-inline-answer strong { font-size: 11px; font-weight: 650; }

.auth-body { min-height: 100vh; background: #fff; }
.auth-layout { min-height: 100vh; display: grid; grid-template-columns: minmax(410px, .82fr) 1.18fr; }
.auth-card { width: min(420px, calc(100% - 50px)); margin: auto; padding: 38px 0; }
.auth-card-wide { width: min(470px, calc(100% - 50px)); }
.auth-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 45px; font-size: 14px; font-weight: 850; }
.auth-brand img { width: 38px; height: 38px; }
.auth-heading { margin-bottom: 23px; }
.auth-heading h1 { margin-bottom: 5px; font-size: 27px; font-weight: 900; letter-spacing: -.6px; }
.auth-heading p { color: var(--muted); }
.password-wrap { position: relative; }
.password-wrap input { padding-left: 60px !important; }
.password-wrap button { position: absolute; left: 8px; top: 50%; padding: 4px 7px; color: var(--primary-700); background: transparent; border: 0; transform: translateY(-50%); cursor: pointer; font-size: 9px; font-weight: 750; }
.auth-divider { display: flex; align-items: center; gap: 10px; margin: 22px 0 12px; color: var(--muted); font-size: 9px; }
.auth-divider::before, .auth-divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.auth-note, .auth-switch { margin: 13px 0 0; color: var(--muted); text-align: center; font-size: 10px; }
.auth-switch a { color: var(--primary-700); font-weight: 750; }
.auth-visual { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 70px; text-align: center; background: linear-gradient(150deg, #f6fdfe, #e6f7fa); }
.auth-visual::before, .auth-visual::after { content: ""; position: absolute; border: 1px solid rgba(28,158,192,.12); border-radius: 50%; }
.auth-visual::before { width: 620px; height: 620px; }
.auth-visual::after { width: 410px; height: 410px; }
.visual-orbit { position: relative; z-index: 1; width: 100px; height: 100px; display: grid; place-items: center; margin-bottom: 28px; background: #fff; border-radius: 50%; box-shadow: 0 20px 50px rgba(28,158,192,.14); }
.visual-orbit img { width: 64px; }
.auth-visual .eyebrow, .auth-visual h2, .visual-steps, .feature-pills { position: relative; z-index: 1; }
.auth-visual h2 { max-width: 650px; margin-bottom: 32px; font-size: clamp(25px, 2.4vw, 38px); line-height: 1.65; font-weight: 900; letter-spacing: -.8px; }
.visual-steps { display: flex; align-items: center; gap: 10px; }
.visual-steps span { display: flex; align-items: center; gap: 6px; padding: 8px 11px; background: rgba(255,255,255,.78); border: 1px solid rgba(28,158,192,.12); border-radius: 25px; font-size: 9px; }
.visual-steps b { width: 22px; height: 22px; display: grid; place-items: center; color: #fff; background: var(--primary); border-radius: 50%; }
.feature-pills { display: flex; gap: 10px; }
.feature-pills span { padding: 8px 14px; color: var(--primary-700); background: #fff; border: 1px solid #cdeaf0; border-radius: 30px; font-size: 10px; font-weight: 700; }
.auth-toasts { top: 20px; }

@media (max-width: 1180px) {
    .welcome-card { grid-template-columns: 1fr 400px; padding-inline: 30px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .queue-strip { grid-template-columns: 1fr auto; }
    .auth-layout { grid-template-columns: 460px 1fr; }
    .auth-visual { padding: 40px; }
    .ticket-detail-grid { grid-template-columns: minmax(0, 1fr) 280px; }
}

@media (max-width: 940px) {
    .sidebar { transform: translateX(105%); transition: transform .25s ease; box-shadow: -18px 0 40px rgba(22,38,45,.12); }
    body.sidebar-open .sidebar { transform: translateX(0); }
    .sidebar-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(10,25,30,.35); backdrop-filter: blur(2px); }
    body.sidebar-open .sidebar-backdrop { display: block; }
    .main-column { width: 100%; margin-right: 0; }
    .mobile-menu { display: block; }
    .welcome-card { grid-template-columns: 1fr; }
    .quick-ticket { max-width: 500px; }
    .ticket-detail-grid { grid-template-columns: 1fr; }
    .ticket-sidebar { grid-template-columns: 1fr 1fr; }
    .help-card { grid-column: 1 / -1; }
    .form-layout { grid-template-columns: 1fr; }
    .tips-card { position: static; }
    .auth-layout { grid-template-columns: 1fr; }
    .auth-visual { display: none; }
    .feedback-summary-card { grid-template-columns: 1fr 1fr; gap: 12px 0; }
    .feedback-summary-card > div:nth-child(2) { border-left: 0; }
}

@media (max-width: 680px) {
    body { font-size: 13px; }
    .topbar { height: 66px; padding-inline: 15px; }
    .topbar-action span { display: none; }
    .topbar-action { width: 39px; height: 39px; justify-content: center; padding: 9px; }
    .page-content { padding: 22px 14px 45px; }
    .welcome-card { min-height: 0; gap: 24px; padding: 24px 20px; }
    .welcome-card h1 { font-size: 22px; }
    .quick-ticket { padding-left: 12px; }
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
    .stat-card { min-height: 80px; gap: 9px; padding: 12px; }
    .stat-icon { width: 40px; height: 40px; }
    .stat-card strong { font-size: 20px; }
    .queue-strip { grid-template-columns: 1fr; gap: 8px; }
    .queue-strip a { padding-bottom: 7px; border-bottom: 1px solid rgba(255,255,255,.08); }
    .section-card { padding: 16px 10px; }
    .section-heading { padding-inline: 6px; }
    .page-title-row { align-items: flex-start; flex-direction: column; }
    .page-title-row .button { width: 100%; }
    .filter-card { align-items: stretch; flex-direction: column; }
    .filter-card select { width: 100%; }
    .search-field { min-width: 0; }
    .field-grid { grid-template-columns: 1fr; }
    .form-card { padding: 18px 14px; }
    .form-actions { flex-direction: column-reverse; }
    .form-actions .button { width: 100%; }
    .ticket-detail-header { align-items: flex-start; flex-direction: column; }
    .ticket-detail-header form, .ticket-detail-header form .button { width: 100%; }
    .ticket-detail-header h1 { font-size: 21px; }
    .thread { padding: 13px; }
    .message { width: 94%; padding: 13px; }
    .message header { flex-wrap: wrap; }
    .message header time { width: 100%; margin-right: 47px; }
    .reply-area { padding: 15px 13px; }
    .reply-toolbar { flex-wrap: wrap; }
    .reply-toolbar .button { width: 100%; margin: 0; }
    .ticket-sidebar { grid-template-columns: 1fr; }
    .help-card { grid-column: auto; }
    .profile-hero { padding: 20px 16px; }
    .avatar-xl { width: 60px; height: 60px; }
    .profile-card { padding: 18px 14px; }
    .feedback-callout { align-items: flex-start; flex-wrap: wrap; }
    .feedback-callout div { min-width: calc(100% - 65px); }
    .feedback-callout .button { width: 100%; }
    .feedback-date-card, .feedback-readonly-badge { width: 100%; }
    .feedback-section { padding: 17px 13px; }
    .feedback-section-head { gap: 9px; }
    .rating-scale { margin-right: 0; }
    .feedback-check-grid, .feedback-reason-list { grid-template-columns: 1fr; }
    .feedback-submit-bar { align-items: stretch; flex-direction: column; }
    .feedback-submit-bar .button { width: 100%; }
    .feedback-summary-card { grid-template-columns: 1fr; }
    .feedback-summary-card > div { padding: 6px 3px; border-left: 0; border-bottom: 1px solid rgba(255,255,255,.1); }
    .feedback-summary-card > div:last-child { border-bottom: 0; }
    .auth-card, .auth-card-wide { width: calc(100% - 32px); padding: 25px 0; }
    .auth-brand { margin-bottom: 30px; }
    .auth-heading h1 { font-size: 23px; }
    .toast-stack { left: 16px; top: 76px; }
}

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