:root {
  --primary: #315edb;
  --primary-dark: #274eb9;
  --primary-soft: #eaf0ff;
  --success: #0f7569;
  --success-soft: #e4f5f1;
  --warning: #a85e0c;
  --warning-soft: #fff1dd;
  --danger: #b4453c;
  --danger-soft: #fdeceb;
  --teal: #0f8578;
  --navy: #17213a;
  --surface: #fff;
  --background: #f6f8fb;
  --text: #17213a;
  --muted: #63708a;
  --subtle: #8793a9;
  --border: #dce3ed;
  --shadow: none;
}
html { font-family: "Public Sans", sans-serif; background: var(--background); }
body { background: var(--background); }
h1, h2, h3, .login-brand__content h1, .login-form__heading h2, .confirmation-card h1, .agent-list__heading h1 { font-family: "Lora", serif; font-weight: 600; letter-spacing: -.35px; }
h1 { font-size: 31px; line-height: 1.3; }
a, button, input, select, textarea, summary { font-family: "Public Sans", sans-serif; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid #315edb55; outline-offset: 3px; }
.button { border-radius: 6px; box-shadow: none; transition: background-color .15s, border-color .15s; }
.button:hover:not(:disabled) { transform: none; }
.button--primary { box-shadow: none; }
.icon-button { border-radius: 6px; }
.card { border-radius: 4px; box-shadow: none; }
.card__header { border-bottom-color: var(--border); }
.brand__mark, .stat-icon, .project-icon { border-radius: 7px; }
.avatar { font-family: "Public Sans", sans-serif; }
.role-pill { border-radius: 4px; }
.nav-item { border-radius: 5px; }
.badge { border-radius: 20px; }
.topbar { height: 76px; border-bottom-color: var(--line, var(--border)); }
.portal-body .topbar { left: 82px; }
.topbar-logout { display: inline-flex; }
.topbar-logout .icon-button { color: var(--muted); }
.portal-main { margin-left: 82px; padding-top: 112px; padding-inline: 42px; }
.portal-sidebar { top: 0; width: 82px; padding: 22px 12px 18px; background: var(--navy); border-right: 0; }
.portal-sidebar::before { content: ""; display: block; width: 36px; height: 36px; margin: 0 auto 64px; border-radius: 9px; background: var(--primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5h16v5a2 2 0 0 0 0 4v5H4v-5a2 2 0 0 0 0-4V5Z'/%3E%3Cpath d='M13 5v2m0 4v2m0 4v2'/%3E%3C/svg%3E") center/19px no-repeat; }
.portal-sidebar .nav-item { width: 44px; min-height: 44px; padding: 0; margin: 0 auto 10px; justify-content: center; font-size: 0; }
.portal-sidebar .nav-item .icon { width: 21px; height: 21px; color: #96a3c2; }
.portal-sidebar .nav-item:hover:not(.disabled) { background: #22304e; }
.portal-sidebar .nav-item.active { background: #2a3859; }
.portal-sidebar .nav-item.active .icon { color: #fff; }
.portal-sidebar .sidebar__user { justify-content: center; border-top-color: #35415e; padding-top: 18px; }
.portal-sidebar .sidebar__user > div, .portal-sidebar .sidebar__user form { display: none; }
.staff-sidebar { background: var(--navy); border-right: 0; }
.staff-brand { color: #fff; }
.staff-brand .role-pill { background: #2a3859; color: #bdc9e4; }
.staff-sidebar .nav-item { color: #b5c0d9; }
.staff-sidebar .nav-item .icon { color: #96a3c2; }
.staff-sidebar .nav-item:hover:not(.disabled) { background: #22304e; color: #fff; }
.staff-sidebar .nav-item.active { background: #2a3859; color: #fff; }
.staff-sidebar .nav-item.active .icon { color: #fff; }
.staff-sidebar .nav-count { background: #2a3859; color: #c6d1e9; }
.staff-sidebar .nav-count--alert { background: var(--danger); color: #fff; }
.staff-sidebar .nav-section { color: #7786a8; }
.staff-sidebar .sidebar__user { border-top-color: #35415e; }
.staff-sidebar .sidebar__user strong { color: #fff; }
.staff-sidebar .sidebar__user span:not(.avatar) { color: #aeb9d2; }
.staff-sidebar .sidebar__user .icon-button { color: #aeb9d2; }
.staff-sidebar .sidebar__user .icon-button:hover { background: #2a3859; }
.staff-main { padding: 64px 38px 52px; position: relative; }
.staff-notification { position: absolute; top: 18px; right: 24px; z-index: 45; }
.staff-notification .notification-button { background: #fff; border: 1px solid var(--border); }
.staff-notification .notification-list { right: 0; }
.agent-notification { top: 16px; right: 20px; }
.agent-detail__header .status-form { margin-right: 46px; }
.notification-list { max-height: 460px; overflow-y: auto; }
.notification-list a.notification-unread { background: var(--primary-soft); border-left: 2px solid var(--primary); }
.notification-empty { padding: 26px 16px; color: var(--muted); text-align: center; font-size: 11px; }
.popover__head form { margin: 0; }
.mention-suggestions { position: fixed; z-index: 120; width: 320px; padding: 7px; background: #fff; border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 12px 32px rgb(23 33 58 / 16%); }
.mention-suggestions button { width: 100%; padding: 10px; border: 0; border-radius: 6px; background: transparent; display: flex; align-items: center; justify-content: space-between; gap: 10px; text-align: left; }
.mention-suggestions button:hover { background: var(--primary-soft); }
.mention-suggestions strong { font-size: 11px; }
.mention-suggestions span { color: var(--muted); font-size: 9px; }
.page-heading { margin-bottom: 28px; }
.page-heading p { color: var(--muted); }
.breadcrumb { color: #71809b; }
.stats-grid { gap: 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin-bottom: 34px; }
.stat-card { min-height: 128px; padding: 22px 24px; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.stat-card + .stat-card { border-left: 1px solid var(--border); }
.stat-card > strong { font-family: "Lora", serif; font-weight: 600; margin-top: 2px; }
.stat-card__top { color: var(--muted); }
.stat-icon { background: transparent; }
.table-card { border: 0; background: transparent; overflow: visible; }
.table-card > .card__header { padding-inline: 0; background: transparent; border-bottom: 1px solid var(--border); }
.table-card .data-table { background: #fff; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.data-table th { height: 44px; background: transparent; color: #63708a; border-bottom-color: var(--border); font-weight: 500; }
.data-table td { border-bottom-color: #e8edf3; }
.data-table tbody tr:hover { background: #f8faff; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.table-filters { padding-inline: 0; border-bottom: 0; }
.table-footer { padding-inline: 0; border-top-color: var(--border); }
.search-field, .select-field, .field input:not([type=radio]):not([type=checkbox]), .field textarea, .side-form select, .assign-popover select, .input-with-icon { border-radius: 5px; border-color: var(--border); }
.side-form, .meta-card, .form-card, .reply-card, .messages-card { border-radius: 4px; }
.report-kpis { gap: 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin-bottom: 28px; }
.kpi-card { border: 0; border-radius: 0; background: transparent; }
.kpi-card + .kpi-card { border-left: 1px solid var(--border); }
.kpi-card > strong { font-family: "Lora", serif; font-weight: 600; }
.report-charts { gap: 24px; }
.chart-card { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.chart-card .card__header { padding-inline: 0; }
.donut { width: 142px; height: 142px; }
.project-overview-grid { gap: 28px; }
.project-overview { border: 0; border-top: 2px solid var(--primary); padding: 22px 0; background: transparent; }
.coordinator-grid { gap: 28px; }
.team-card, .attention-card { border: 0; background: transparent; }
.team-card .card__header, .attention-card .card__header { padding-inline: 0; }
.team-list, .attention-list { padding-inline: 0; }
.project-cell, .user-cell { gap: 11px; }
.agent-ticket-list { border-right-color: var(--border); }
.agent-ticket-row { border-radius: 0; border-left: 2px solid transparent; }
.agent-ticket-row.active { border-color: var(--primary); }
.agent-detail { background: var(--background); }
.agent-detail__header { border-bottom-color: var(--border); }
.agent-reply { border-radius: 4px; }
.message__bubble { border-radius: 3px 12px 12px 12px; background: #edf1f6; }
.message--own .message__bubble { border-radius: 12px 3px 12px 12px; background: var(--primary); }
.message--internal .message__bubble { background: #fff3df; }
.system-event { border-color: var(--border); }
.form-card { border-top: 2px solid var(--primary); }
.dropzone { border-radius: 5px; background: #f8faff; }
.form-actions { border-top-color: var(--border); }
.detail-layout { gap: 28px; }
.detail-heading h1 { font-size: 27px; }
.detail-description { max-width: 850px; margin: -10px 0 24px; padding: 16px 18px; border-left: 2px solid var(--primary); background: #fff; color: var(--muted); font-size: 13px; line-height: 1.75; white-space: pre-wrap; }
.agent-description { margin: 14px 0 0; padding: 10px 12px; font-size: 11px; }
.confirmation-card { border-top: 2px solid var(--success); }
.login-layout { background: var(--background); }
.login-brand-panel { background: var(--navy); }
.login-brand-panel::after { display: none; }
.login-brand__content h1 { font-size: clamp(34px, 3.3vw, 50px); line-height: 1.25; }
.login-illustration { border-radius: 8px; background: #22304e; border-color: #35415e; }
.login-form-panel { background: var(--background); }
.login-form { background: #fff; padding: 34px; border-left: 3px solid var(--primary); }
.login-form__heading h2 { font-size: 29px; }
.eyebrow { color: var(--primary); font-size: 10px; letter-spacing: .4px; text-transform: none; }
.demo-accounts button { border-radius: 4px; }
.auth-simple-card { border-top: 2px solid var(--primary); }
.profile-summary { border-top: 2px solid var(--primary); }
.agent-profile-shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.agent-profile-shell .agent-sidebar { position: relative; width: auto; }
.agent-profile-main { position: relative; padding: 64px 38px 48px; }
.profile-form { border-top: 2px solid var(--primary); }
.mail-editor { border-top: 2px solid var(--primary); }
.mail-list__item.active { border-left: 2px solid var(--primary); }
.settings-card { border-top: 1px solid var(--border); }
.settings-card__heading { background: transparent; }
.coordinator-project-card { border: 0; border-top: 2px solid var(--primary); background: transparent; padding-inline: 0; }
.team-member-card { border-top: 2px solid var(--primary); }
.coordinator-report-bars > div { grid-template-columns: 160px 1fr 30px; }
.status-report-list { padding: 18px 20px; display: grid; gap: 12px; }
.status-report-list > div { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.c-intro { margin-bottom: 36px; }
.c-intro > p:first-child { color: var(--primary); font-size: 13px; margin-bottom: 10px; }
.c-intro h1 { font-size: 38px; font-weight: 600; max-width: 660px; line-height: 1.25; }
.c-intro > p:last-child { color: var(--muted); margin-top: 13px; font-size: 12px; }
.c-path { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0 0 46px; border-top: 1px solid var(--border); }
.c-path__step { position: relative; padding: 25px 24px 0 0; }
.c-path__step::before { content: ""; position: absolute; top: -5px; left: 0; width: 9px; height: 9px; border-radius: 50%; background: #b7c2d3; }
.c-path__step.active::before { background: var(--primary); box-shadow: 0 0 0 5px #315edb18; }
.c-path__step > span { color: var(--muted); font-size: 10px; }
.c-path__step > strong { display: block; font-family: "Lora", serif; font-size: 19px; font-weight: 600; margin: 8px 0 15px; }
.c-path__step > b { font-size: 12px; color: var(--primary); }
.c-path__step > p { color: var(--muted); font-size: 10px; line-height: 1.7; margin-top: 8px; max-width: 220px; }
.c-history__head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 17px; border-bottom: 1px solid var(--border); }
.c-history__head h2 { font-size: 21px; }
.c-history__head a { color: var(--primary); font-size: 11px; font-weight: 600; }
.c-ticket { position: relative; display: flex; align-items: center; gap: 20px; padding: 20px 0 20px 4px; }
.c-ticket::before { content: ""; position: absolute; left: 8px; top: 0; bottom: 0; width: 1px; background: var(--border); }
.c-ticket__node { position: relative; z-index: 1; width: 9px; height: 9px; border-radius: 50%; background: #fff; border: 2px solid var(--primary); }
.c-ticket__body { flex: 1; }
.c-ticket__body > div { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.c-ticket__body strong { font-size: 13px; }
.c-ticket__body p { color: var(--muted); font-size: 9px; margin: 6px 0; }
.c-ticket__body > span { color: var(--muted); font-size: 10px; }
.c-ticket > .icon { width: 16px; height: 16px; color: var(--muted); }
.c-ticket:hover > .icon { color: var(--primary); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
@media (max-width: 1000px) {
  .portal-main { padding-inline: 28px; }
  .c-intro h1 { font-size: 33px; }
  .report-kpis { grid-template-columns: 1fr 1fr; }
  .kpi-card:nth-child(3) { border-left: 0; border-top: 1px solid var(--border); }
  .kpi-card:nth-child(4) { border-top: 1px solid var(--border); }
}
@media (max-width: 720px) {
  h1 { font-size: 27px; }
  .portal-body .topbar { left: 0; height: 66px; }
  .agent-profile-shell { display: block; }
  .agent-profile-shell .agent-sidebar { position: fixed; width: 232px; }
  .agent-profile-main { padding: 64px 20px 40px; }
  .topbar-logout { display: none; }
  .portal-sidebar { width: 232px; padding-top: 22px; }
  .portal-sidebar::before { margin-bottom: 28px; }
  .portal-sidebar .nav-item { width: 100%; min-height: 42px; padding: 0 12px; justify-content: flex-start; font-size: 12px; }
  .portal-sidebar .sidebar__user > div { display: flex; }
  .portal-sidebar .sidebar__user form { display: block; }
  .portal-sidebar .sidebar__user { justify-content: flex-start; }
  .portal-sidebar .sidebar__user strong { color: #fff; }
  .portal-sidebar .sidebar__user span:not(.avatar) { color: #aeb9d2; }
  .portal-main { margin-left: 0; padding: 92px 20px 40px; }
  .staff-main { padding-inline: 20px; }
  .stats-grid { grid-template-columns: 1fr; }
  .stat-card + .stat-card { border-left: 0; border-top: 1px solid var(--border); }
  .c-intro h1 { font-size: 30px; }
  .c-path { grid-template-columns: 1fr; margin-bottom: 34px; }
  .c-path__step { padding-bottom: 14px; }
  .c-path__step > p { max-width: 100%; }
  .c-ticket__body > div { align-items: flex-start; flex-direction: column; }
  .login-form { padding: 24px; }
  .report-kpis { grid-template-columns: 1fr; }
  .kpi-card + .kpi-card { border-left: 0; border-top: 1px solid var(--border); }
}

.mail-rules { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 12px; }
.company-options { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 8px; }
.company-options input { accent-color: var(--primary); }
.company-options label { display: flex; align-items: center; gap: 7px; padding: 8px; border: 1px solid var(--border); border-radius: 5px; font-size: 10px; }
.company-options label:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.user-status-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; }
.mail-list__item small { color: var(--muted); font-size: 8px; }
@media (max-width: 900px) { .mail-rules { grid-template-columns: 1fr; } }

.customer-workspace { display: grid; grid-template-columns: minmax(620px, 1.15fr) minmax(390px, .85fr); gap: 26px; align-items: start; }
.customer-list-pane { min-width: 0; }
.customer-detail-pane { position: sticky; top: 96px; max-height: calc(100vh - 116px); overflow-y: auto; min-width: 0; padding-right: 4px; }
.customer-detail__header h2 { margin: 8px 0 10px; font-size: 22px; }
.customer-detail__meta { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.customer-detail__meta span { display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: 10px; }
.customer-detail__meta b { color: var(--text); font-size: 11px; }
.customer-detail__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.customer-detail-pane .messages-card { padding: 16px; }
.customer-detail-pane .message__content { max-width: 88%; }
.customer-ticket-table { min-width: 820px; }
.ticket-row { cursor: pointer; }
.ticket-row.selected { background: var(--primary-soft); box-shadow: inset 3px 0 var(--primary); }
.ticket-row:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.customer-ticket-table th button { border: 0; padding: 0; background: transparent; color: inherit; font-size: inherit; font-weight: inherit; }
.customer-ticket-table th button:hover, .customer-ticket-table th button.active { color: var(--primary); }
.customer-ticket-table th button.active::after { content: " ↑"; }
.customer-ticket-table th button.active.desc::after { content: " ↓"; }
.customer-filters { flex-wrap: wrap; }
@media (max-width: 1200px) { .customer-workspace { grid-template-columns: minmax(540px, 1fr) minmax(340px, .8fr); gap: 20px; } }
@media (max-width: 1000px) { .customer-workspace { grid-template-columns: 1fr; } .customer-detail-pane { position: static; max-height: none; overflow: visible; } }
@media (max-width: 720px) { .customer-detail__meta { grid-template-columns: 1fr; } }

.mention { display: inline; padding: 2px 5px; border-radius: 4px; background: #dce8ff; color: #214da9; font-weight: 700; }
.message--own .mention { background: rgb(255 255 255 / 22%); color: #fff; }
.message-image-link { display: block; margin-top: 12px; }
.message-image { display: block; max-width: min(360px, 100%); max-height: 280px; object-fit: contain; border-radius: 6px; border: 1px solid var(--border); background: #fff; }
.attachment-file { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 6px; background: rgb(255 255 255 / 70%); color: var(--text); }
.attachment-file .icon { color: var(--primary); }
.attachment-file span { display: flex; flex-direction: column; gap: 3px; }
.attachment-file strong { font-size: 10px; }
.attachment-file small { color: var(--muted); font-size: 9px; }

.sidebar-toggle { min-height: 36px; margin: 0 4px 14px; padding: 0 10px; border: 1px solid #35415e; border-radius: 6px; background: #22304e; color: #b5c0d9; display: flex; align-items: center; gap: 8px; font-size: 10px; }
.sidebar-toggle .icon { width: 16px; height: 16px; }
.portal-sidebar .sidebar__user { display: none; }
@media (min-width: 721px) {
  .portal-sidebar { width: 232px; padding: 22px 14px 18px; }
  .portal-sidebar::before { margin-bottom: 20px; }
  .portal-sidebar .nav-item { width: 100%; min-height: 42px; padding: 0 12px; margin: 0 0 4px; justify-content: flex-start; font-size: 12px; }
  .portal-body .topbar { left: 232px; }
  .portal-main { margin-left: 232px; }
  body.sidebar-collapsed .portal-sidebar { width: 82px; padding-inline: 12px; }
  body.sidebar-collapsed .portal-sidebar::before { margin-bottom: 20px; }
  body.sidebar-collapsed .portal-sidebar .nav-item { width: 44px; padding: 0; margin-inline: auto; justify-content: center; font-size: 0; }
  body.sidebar-collapsed .portal-body .topbar { left: 82px; }
  body.sidebar-collapsed .portal-main { margin-left: 82px; }
  body.sidebar-collapsed .staff-sidebar { width: 82px; padding-inline: 10px; }
  body.sidebar-collapsed .staff-brand { padding: 0; justify-content: center; }
  body.sidebar-collapsed .staff-brand strong, body.sidebar-collapsed .staff-brand .role-pill, body.sidebar-collapsed .nav-section, body.sidebar-collapsed .staff-sidebar .nav-count { display: none; }
  body.sidebar-collapsed .staff-sidebar .nav-item { padding: 0; justify-content: center; font-size: 0; }
  body.sidebar-collapsed .staff-sidebar .nav-item .icon { width: 20px; height: 20px; }
  body.sidebar-collapsed .staff-sidebar .sidebar__user > div { display: none; }
  body.sidebar-collapsed .staff-sidebar .sidebar__user { justify-content: center; }
  body.sidebar-collapsed .staff-main { margin-left: 82px; }
  body.sidebar-collapsed .agent-layout { grid-template-columns: 82px 400px minmax(0, 1fr); }
  body.sidebar-collapsed .agent-profile-shell { grid-template-columns: 82px minmax(0, 1fr); }
  body.sidebar-collapsed .sidebar-toggle { padding: 0; justify-content: center; font-size: 0; }
}
@media (max-width: 720px) { .sidebar-toggle { display: none; } }

.ticket-lifecycle { list-style: none; padding: 0; margin: 0 0 20px; display: grid; grid-template-columns: repeat(6, 1fr); }
.ticket-lifecycle li { position: relative; padding-top: 18px; border-top: 2px solid var(--border); }
.ticket-lifecycle li > span { position: absolute; top: -5px; left: 0; width: 8px; height: 8px; border-radius: 50%; background: #b7c2d3; }
.ticket-lifecycle li.done { border-color: var(--teal); }
.ticket-lifecycle li.done > span { background: var(--teal); }
.ticket-lifecycle li.current { border-color: var(--primary); }
.ticket-lifecycle li.current > span { background: var(--primary); box-shadow: 0 0 0 4px #315edb18; }
.ticket-lifecycle small { display: block; padding-right: 5px; color: var(--muted); font-size: 8px; line-height: 1.4; }
.ticket-lifecycle li.current small { color: var(--primary); font-weight: 700; }
.agent-detail > .ticket-lifecycle { margin: 14px 22px 0; }

.desktop-nav-toggle { display: inline-flex; flex: 0 0 auto; }
.desktop-nav-toggle + .brand { margin-right: auto; }
@media (min-width: 721px) {
  body.nav-hidden .customer-sidebar { transform: translateX(-100%); }
  body.nav-hidden.portal-body .topbar, body.nav-hidden.sidebar-collapsed.portal-body .topbar { left: 0; }
  body.nav-hidden .portal-main, body.nav-hidden.sidebar-collapsed .portal-main { margin-left: 0; }
}
@media (max-width: 720px) { .desktop-nav-toggle { display: none; } }

.customer-detail__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.detail-window-actions { display: flex; gap: 6px; flex: 0 0 auto; }
[data-detail-close] { display: inline-flex; }
.customer-workspace:not(:has(.customer-detail-pane)) { grid-template-columns: 1fr; }
.detail-backdrop { position: fixed; inset: 0; z-index: 100; background: rgb(10 18 36 / 55%); backdrop-filter: blur(3px); }
body.detail-open { overflow: hidden; }
.customer-detail-pane.detail-expanded, .ticket-detail-modal.detail-expanded { position: fixed; z-index: 101; top: 28px; right: 28px; bottom: 28px; width: min(1120px, calc(100vw - 56px)); max-height: none; height: auto; padding: 28px; overflow-y: auto; background: var(--background); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 24px 70px rgb(10 18 36 / 25%); }
.detail-expanded [data-detail-close] { display: inline-flex; }
.detail-expanded [data-detail-expand] { display: none; }
@media (max-width: 720px) {
  .customer-detail-pane.detail-expanded, .ticket-detail-modal.detail-expanded { top: 8px; right: 8px; bottom: 8px; width: calc(100vw - 16px); padding: 16px; height: auto; }
  .customer-detail__header { flex-direction: column; }
}

form[data-chat-drop] { position: relative; }
form[data-chat-drop].drag-active::before { content: "Faylı chat-a əlavə etmək üçün buraxın"; position: absolute; inset: 0; z-index: 20; display: grid; place-items: center; padding: 20px; border: 2px dashed var(--primary); border-radius: inherit; background: rgb(234 240 255 / 96%); color: var(--primary); font-size: 13px; font-weight: 700; text-align: center; pointer-events: none; }
.compact-file-input { min-height: 32px; padding-inline: 6px; font-size: 11px; }

.ticket-history { margin-top: 16px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 6px; background: #fff; }
.ticket-history > summary { display: flex; align-items: center; gap: 7px; cursor: pointer; font-size: 12px; font-weight: 700; list-style: none; }
.ticket-history > summary::-webkit-details-marker { display: none; }
.ticket-history > summary .icon { width: 16px; height: 16px; color: var(--primary); }
.ticket-history > summary span { margin-left: auto; color: var(--muted); font-size: 10px; font-weight: 500; }
.ticket-history ol { list-style: none; padding: 0 0 0 4px; margin: 14px 0 0; }
.history-item { position: relative; display: flex; gap: 12px; padding: 0 0 16px 4px; }
.history-item::before { content: ""; position: absolute; left: 7px; top: 10px; bottom: -4px; width: 1px; background: var(--border); }
.history-item:last-child::before { display: none; }
.history-item__node { position: relative; z-index: 1; width: 7px; height: 7px; margin-top: 5px; border-radius: 50%; background: var(--primary); flex: 0 0 auto; }
.history-item--internal .history-item__node { background: var(--warning); }
.history-item__meta { display: flex; justify-content: space-between; gap: 12px; }
.history-item__meta strong { font-size: 10px; }
.history-item__meta time { color: var(--muted); font-size: 9px; white-space: nowrap; }
.history-item p { margin-top: 4px; color: #344054; font-size: 11px; line-height: 1.55; white-space: pre-wrap; }
.history-item small { display: block; margin-top: 4px; color: var(--muted); font-size: 8px; }
.history-empty { color: var(--muted); font-size: 11px; }

.pdf-preview { margin-top: 12px; }
.pdf-preview summary { display: flex; align-items: center; gap: 7px; color: var(--primary); font-size: 10px; font-weight: 700; cursor: pointer; }
.pdf-preview iframe { width: 100%; height: 360px; margin-top: 8px; border: 1px solid var(--border); border-radius: 6px; background: #fff; }
.compact-file-input { min-height: inherit; }

/* --- Faza 1-4 əlavələri --- */
.form-alert--success { color: #05603a; background: #ecfdf3; border: 1px solid #a6f4c5; margin-bottom: 18px; }
.form-alert code { font-size: 14px; font-weight: 700; background: #fff; border: 1px dashed #12b76a; border-radius: 6px; padding: 2px 8px; user-select: all; }
a.link-button { text-decoration: none; display: inline-flex; align-items: center; }
.range-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.mail-outbox { margin-top: 20px; }
.mail-outbox table { width: 100%; }
.mail-outbox .status-sent, .mail-outbox .status-logged { color: #027a48; }
.mail-outbox .status-failed { color: #b42318; }
.mail-outbox .status-pending { color: #b54708; }
