/* =========================================================================
   Carbon (IBM) dizayn sistemi: tokenlər, komponentlər, qabıq, ticket görünüşü
   Mənbə: .claude/skills/carbon/DESIGN.md. Dəyərlər adlandırılmış tokenlərdir.
   ========================================================================= */
:root {
  /* DESIGN.md: colors */
  --c-primary: #0f62fe;
  --c-on-primary: #ffffff;
  --c-surface: #ffffff;
  --c-surface-variant: #f4f4f4;
  --c-on-surface: #161616;
  --c-on-surface-variant: #525252;
  --c-helper: #6f6f6f;
  --c-border-subtle: #e0e0e0;
  --c-border-strong: #8d8d8d;
  --c-success: #24a148;
  --c-warning: #f1c21b;
  --c-error: #da1e28;
  /* DESIGN.md: rounded / spacing (8px ritmi) */
  --r-sm: 2px;
  --s-xxs: 2px; --s-xs: 4px; --s-sm: 8px; --s-md: 16px; --s-lg: 24px; --s-xl: 32px; --s-2xl: 48px;
  --font: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --header-h: 48px;
  --nav-w: 256px;
  --ease: cubic-bezier(.2, 0, .38, .9);

  /* köhnə dəyişənlər Carbon tokenlərinə yönləndirilir */
  --primary: var(--c-primary);
  --primary-dark: var(--c-primary);
  --primary-soft: var(--c-surface-variant);
  --success: var(--c-on-surface);
  --success-soft: var(--c-surface-variant);
  --warning: var(--c-on-surface);
  --warning-soft: var(--c-surface-variant);
  --danger: var(--c-error);
  --danger-soft: var(--c-surface-variant);
  --teal: var(--c-primary);
  --navy: var(--c-on-surface);
  --surface: var(--c-surface);
  --background: var(--c-surface-variant);
  --text: var(--c-on-surface);
  --muted: var(--c-on-surface-variant);
  --subtle: var(--c-helper);
  --border: var(--c-border-subtle);
  --line: var(--c-border-subtle);
  --shadow: none;
  --sidebar-width: var(--nav-w);
}

html, body { font-family: var(--font); color: var(--c-on-surface); background: var(--c-surface-variant); font-size: 14px; line-height: 1.43; }
a, button, input, select, textarea, summary, .avatar { font-family: var(--font); }
h1, h2, h3, .login-brand__content h1, .login-form__heading h2, .confirmation-card h1, .stat-card > strong, .kpi-card > strong, .c-path__step > strong { font-family: var(--font); letter-spacing: 0; }
h1 { font-size: 24px; line-height: 1.3; font-weight: 600; }
h2 { font-size: 20px; line-height: 1.4; font-weight: 600; }
h3 { font-size: 14px; font-weight: 600; }
strong, b { font-weight: 600; }
input::placeholder, textarea::placeholder { color: var(--c-helper); }
:focus-visible { outline: 2px solid var(--c-primary); outline-offset: 1px; }
.ticket-number, .app-crumbs i, code, .mono { font-family: var(--mono); }
.ticket-number { font-size: 12px; font-weight: 500; letter-spacing: 0; color: var(--c-on-surface); }
.text-link { color: var(--c-primary); font-weight: 400; font-size: 14px; }
.text-link:hover { text-decoration: underline; }
.text-success, .text-warning { color: var(--c-on-surface) !important; }
.text-danger { color: var(--c-error) !important; }

/* ---- düymələr: 2px künc, solid primary, ikinci dərəcəli = primary mətn + primary haşiyə ---- */
.button { min-height: 40px; padding: 0 var(--s-md); border-radius: var(--r-sm); border: 1px solid transparent; font-size: 14px; font-weight: 400; gap: var(--s-sm); box-shadow: none; transition: background 110ms var(--ease), filter 110ms var(--ease); }
.button:hover:not(:disabled) { transform: none; }
.button--primary { background: var(--c-primary); color: var(--c-on-primary); box-shadow: none; }
.button--primary:hover:not(:disabled) { background: var(--c-primary); filter: brightness(.88); }
.button--secondary { background: var(--c-surface); color: var(--c-primary); border-color: var(--c-primary); }
.button--secondary:hover:not(:disabled) { background: var(--c-surface-variant); border-color: var(--c-primary); }
.button--ghost { background: transparent; color: var(--c-primary); padding-inline: var(--s-sm); }
.button--ghost:hover:not(:disabled) { background: var(--c-surface-variant); }
.button--small { min-height: 32px; padding: 0 12px; font-size: 13px; border-radius: var(--r-sm); }
.button--large { min-height: 48px; font-size: 14px; }
.button:disabled { opacity: 1; background: var(--c-border-subtle); color: var(--c-helper); border-color: transparent; cursor: not-allowed; }
.link-button { color: var(--c-primary); font-weight: 400; font-size: 13px; }
.link-button:hover { text-decoration: underline; }
.icon-button { border-radius: var(--r-sm); }
.icon-button:hover { background: var(--c-surface-variant); }
.text-danger.button, .button.text-danger { color: var(--c-error) !important; }

/* ---- sahələr: boz layer, yalnız alt haşiyə, fokusda 2px primary ---- */
.field { gap: var(--s-xs); margin-bottom: var(--s-md); }
.field > span, .field legend, .field-label { color: var(--c-on-surface-variant); font-size: 12px; font-weight: 400; letter-spacing: .02em; }
.field > span b { color: var(--c-error); }
.field input:not([type=radio]):not([type=checkbox]), .field textarea, .side-form select, .assign-popover select, .select-field, .search-field {
  background: var(--c-surface-variant); border: 0 !important; border-bottom: 1px solid var(--c-border-strong) !important; border-radius: var(--r-sm) var(--r-sm) 0 0 !important; box-shadow: none !important; color: var(--c-on-surface);
}
.field input:not([type=radio]):not([type=checkbox]), .side-form select { height: 40px; padding: 0 var(--s-md); font-size: 14px; }
.field textarea { padding: 11px var(--s-md); font-size: 14px; }
.field input:focus, .field textarea:focus, .side-form select:focus, .select-field:focus-within, .search-field:focus-within { outline: 2px solid var(--c-primary); outline-offset: -2px; border-bottom-color: transparent !important; box-shadow: none !important; }
.select-field, .search-field { height: 40px; }
.select-field select, .search-field input { font-size: 14px; background: transparent; }
.select-field--full { height: 40px; }
.dropzone { border: 1px dashed var(--c-border-strong); border-radius: var(--r-sm); background: var(--c-surface-variant); }
.dropzone:hover { border-color: var(--c-primary); background: var(--c-surface-variant); }
.dropzone > .icon { color: var(--c-primary); }
.role-options label span { border-radius: var(--r-sm); }
.role-options input:checked + span { background: var(--c-on-surface); color: #fff; border-color: var(--c-on-surface); }

/* ---- kartlar / tile ---- */
.card, .stat-card, .kpi-card, .chart-card, .table-card, .side-form, .settings-card, .form-card, .popover { background: var(--c-surface); border: 1px solid var(--c-border-subtle); border-radius: var(--r-sm); box-shadow: none; }
.popover { box-shadow: 0 2px 6px rgb(0 0 0 / 30%); }
.card__header { border-bottom: 1px solid var(--c-border-subtle); }
.stat-icon, .project-icon, .brand__mark { border-radius: var(--r-sm); background: var(--c-surface-variant); color: var(--c-on-surface); }
.stat-icon--blue, .stat-icon--orange, .stat-icon--green { background: var(--c-surface-variant); color: var(--c-on-surface); }
.brand__mark { background: var(--c-primary); color: #fff; }
.avatar { background: var(--c-border-subtle); color: var(--c-on-surface); font-weight: 600; font-family: var(--font); }

/* ---- cədvəl: başlıq sətri boz, 48px sətir, hover boz ---- */
.table-filters { gap: var(--s-sm); padding: var(--s-md); border-bottom: 1px solid var(--c-border-subtle); background: var(--c-surface); }
.data-table th { height: 48px; background: var(--c-border-subtle); color: var(--c-on-surface); border-bottom: 1px solid var(--c-border-strong); font-size: 14px; font-weight: 600; }
.data-table td { height: 48px; padding: var(--s-sm) var(--s-md); border-bottom: 1px solid var(--c-border-subtle); color: var(--c-on-surface); font-size: 14px; }
.data-table tbody tr:hover { background: var(--c-surface-variant); }
.data-table td > strong { font-size: 14px; }
.ticket-subject { color: var(--c-on-surface); font-weight: 400; max-width: 420px; }
.ticket-subject:hover, .ticket-number:hover { color: var(--c-primary); text-decoration: underline; }
.cell-subtitle { color: var(--c-helper); font-size: 12px; }
.table-footer { min-height: 48px; border-top: 1px solid var(--c-border-subtle); color: var(--c-on-surface-variant); font-size: 12px; }
.record-count { padding: 0; border: 0; background: none; color: var(--c-on-surface-variant); font-size: 14px; }
.empty-filter { color: var(--c-on-surface-variant); }

/* ---- status: semantik nöqtə + neytral mətn; prioritet: Carbon status/badge tokenləri ---- */
.badge { background: var(--c-surface-variant); color: var(--c-on-surface); border-radius: var(--r-sm); padding: 2px var(--s-sm); font-size: 12px; font-weight: 400; gap: 6px; }
.badge__dot { width: 8px; height: 8px; background: var(--c-border-strong); }
.badge--blue .badge__dot { background: transparent; box-shadow: inset 0 0 0 2px var(--c-helper); }
.badge--purple .badge__dot { background: transparent; box-shadow: inset 0 0 0 2px var(--c-primary); }
.badge--teal .badge__dot { background: var(--c-primary); }
.badge--green .badge__dot { background: var(--c-success); }
.badge--orange .badge__dot { background: var(--c-warning); }
.badge--red .badge__dot { background: var(--c-error); }
.badge--gray .badge__dot { background: var(--c-border-strong); }
.badge--blue, .badge--purple, .badge--teal, .badge--green, .badge--orange, .badge--red, .badge--gray { color: var(--c-on-surface); background: var(--c-surface-variant); }
.priority { font-size: 14px; font-weight: 400; gap: 6px; color: var(--c-on-surface-variant); }
.priority .icon { width: 14px; height: 14px; }
.priority--red { color: var(--c-error); font-weight: 600; }
.priority--orange { background: var(--c-warning); color: var(--c-on-surface); padding: 2px var(--s-sm); border-radius: var(--r-sm); font-size: 12px; }
.priority--blue { color: var(--c-on-surface); }
.priority--gray { color: var(--c-helper); }
.role-badge, .role-pill { background: var(--c-surface-variant); color: var(--c-on-surface); border-radius: var(--r-sm); font-weight: 400; }
.nav-count { background: var(--c-border-subtle); color: var(--c-on-surface); border-radius: 12px; }

/* ---- xəbərdarlıq / toast ---- */
.form-alert { border-radius: var(--r-sm); border: 0; border-left: 3px solid var(--c-primary); background: var(--c-surface-variant); color: var(--c-on-surface); }
.form-alert--error { border-left-color: var(--c-error); background: var(--c-surface-variant); color: var(--c-on-surface); }
.form-alert--success { border-left-color: var(--c-success); background: var(--c-surface-variant); color: var(--c-on-surface); }
.form-alert--warning { border-left-color: var(--c-warning); }
.toast { border-radius: var(--r-sm); box-shadow: 0 2px 6px rgb(0 0 0 / 30%); background: var(--c-on-surface); color: #fff; border: 0; border-left: 3px solid var(--c-primary); }
.toast--success { background: var(--c-on-surface); color: #fff; border-left-color: var(--c-success); }
.toast--error { background: var(--c-on-surface); color: #fff; border-left-color: var(--c-error); }
.form-hint { border-radius: var(--r-sm); background: var(--c-surface-variant); color: var(--c-on-surface-variant); }

/* ---- səhifə başlıqları ---- */
.page-heading { margin-bottom: var(--s-lg); }
.page-heading h1 { font-size: 28px; font-weight: 600; line-height: 1.25; }
.page-heading p { margin-top: var(--s-xs); color: var(--c-on-surface-variant); font-size: 14px; line-height: 1.5; max-width: 72ch; }
.page-heading--actions { align-items: flex-end; }
.breadcrumb { display: none; }

/* =========================================================================
   Qabıq: UI Shell (qara header + açıq yan menyu)
   ========================================================================= */
body.app-body { background: var(--c-surface-variant); overflow-x: hidden; }
.app-shell { display: grid; grid-template-columns: var(--nav-w) minmax(0, 1fr); grid-template-rows: var(--header-h) minmax(0, 1fr); grid-template-areas: "header header" "nav main"; min-height: 100vh; }
.app-header { grid-area: header; position: sticky; top: 0; z-index: 70; display: flex; align-items: center; gap: var(--s-md); height: var(--header-h); padding: 0 var(--s-md) 0 0; background: var(--c-on-surface); color: #fff; }
.app-header__menu { display: none; color: #fff; width: var(--header-h); height: var(--header-h); border-radius: 0; }
.app-header__menu:hover { background: rgb(255 255 255 / 12%); }
.app-brand { display: flex; align-items: center; gap: var(--s-sm); height: 100%; padding: 0 var(--s-md); color: #fff; }
.app-brand .brand__mark { width: 24px; height: 24px; background: var(--c-primary); color: #fff; border-radius: 0; }
.app-brand .brand__mark .icon { width: 14px; height: 14px; }
.app-brand strong { font-size: 14px; font-weight: 600; letter-spacing: .01em; }
.app-brand span.app-brand__role { font-weight: 400; opacity: .72; font-size: 14px; }
.app-crumbs { display: flex; align-items: center; gap: var(--s-sm); color: rgb(255 255 255 / 72%); font-size: 14px; white-space: nowrap; }
.app-crumbs i { font-style: normal; opacity: .5; }
.app-crumbs strong { color: #fff; font-weight: 400; }
.app-search.search-field { margin-left: auto; width: 320px; min-width: 0; height: 32px; background: rgb(255 255 255 / 12%); border-bottom: 1px solid rgb(255 255 255 / 40%) !important; color: #fff; border-radius: var(--r-sm) !important; }
.app-search.search-field .icon { color: rgb(255 255 255 / 72%); width: 16px; height: 16px; }
.app-search.search-field input { color: #fff; font-size: 14px; }
.app-search.search-field input::placeholder { color: rgb(255 255 255 / 64%); }
.app-search.search-field:focus-within { outline: 2px solid #fff; outline-offset: -2px; }
.app-header__actions { display: flex; align-items: center; gap: var(--s-xs); }
.app-header:not(:has(.app-search)) .app-header__actions { margin-left: auto; }
.app-header .icon-button, .app-header .notification-button { color: #fff; width: var(--header-h); height: var(--header-h); border-radius: 0; background: transparent; border: 0; }
.app-header .icon-button:hover, .app-header .notification-menu[open] .notification-button, .user-menu[open] summary { background: rgb(255 255 255 / 12%); }
.app-header .notification-button > span { top: 8px; right: 8px; border: 0; background: var(--c-error); min-width: 16px; height: 16px; font-size: 10px; border-radius: 8px; }
.app-header .button--primary { margin-right: var(--s-sm); }
.app-header__actions .notification-list { right: 0; top: var(--header-h); color: var(--c-on-surface); border-radius: 0; width: 360px; }
.notification-list a { border-radius: 0; border-bottom: 1px solid var(--c-border-subtle); }
.notification-list a:hover { background: var(--c-surface-variant); }
.notification-list a.notification-unread { background: var(--c-surface-variant); border-left: 3px solid var(--c-primary); }
.user-menu { position: relative; }
.user-menu summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: var(--s-sm); height: var(--header-h); padding: 0 var(--s-sm) 0 var(--s-md); border-radius: 0; color: #fff; }
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu summary:hover { background: rgb(255 255 255 / 12%); }
.user-menu summary .avatar { width: 28px; height: 28px; font-size: 11px; background: var(--c-border-subtle); }
.user-menu summary .icon { width: 14px; height: 14px; opacity: .72; }
.user-menu__name { font-size: 14px; }
.user-menu__list { right: 0; top: var(--header-h); min-width: 240px; padding: 0; border-radius: 0; display: flex; flex-direction: column; color: var(--c-on-surface); }
.user-menu__who { padding: var(--s-md); border-bottom: 1px solid var(--c-border-subtle); display: flex; flex-direction: column; gap: var(--s-xxs); }
.user-menu__who small { color: var(--c-helper); font-size: 12px; }
.user-menu__list a, .user-menu__list button { display: flex; align-items: center; gap: var(--s-sm); width: 100%; height: 40px; padding: 0 var(--s-md); border: 0; border-radius: 0; background: transparent; font-size: 14px; text-align: left; cursor: pointer; color: var(--c-on-surface); }
.user-menu__list a:hover, .user-menu__list button:hover { background: var(--c-surface-variant); }
.user-menu__list .icon { width: 16px; height: 16px; color: var(--c-on-surface-variant); }
.user-menu__list form { margin: 0; }

/* yan menyu */
.app-sidebar { grid-area: nav; position: sticky; top: var(--header-h); height: calc(100vh - var(--header-h)); z-index: 60; display: flex; flex-direction: column; padding: var(--s-sm) 0; background: var(--c-surface); border-right: 1px solid var(--c-border-subtle); }
.app-nav { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; }
.app-nav__section { padding: var(--s-md) var(--s-md) var(--s-xs); color: var(--c-helper); font-size: 12px; font-weight: 400; letter-spacing: .02em; }
.app-nav__section:first-child { padding-top: var(--s-sm); }
.app-nav__item { position: relative; display: flex; align-items: center; gap: var(--s-sm); min-height: 40px; padding: 0 var(--s-md); border-radius: 0; color: var(--c-on-surface-variant); font-size: 14px; font-weight: 400; }
.app-nav__item .icon { width: 16px; height: 16px; flex: 0 0 auto; color: var(--c-on-surface-variant); }
.app-nav__item > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-nav__item b { min-width: 24px; padding: 0 var(--s-sm); border-radius: 12px; background: var(--c-border-subtle); color: var(--c-on-surface); font-size: 12px; font-weight: 400; line-height: 20px; text-align: center; }
.app-nav__item b.alert { background: var(--c-error); color: #fff; }
.app-nav__item:hover { background: var(--c-surface-variant); color: var(--c-on-surface); }
.app-nav__item.active { background: var(--c-surface-variant); color: var(--c-on-surface); font-weight: 600; box-shadow: inset 3px 0 0 var(--c-primary); }
.app-nav__item.active .icon { color: var(--c-primary); }
.app-sidebar__foot { display: flex; align-items: center; gap: var(--s-sm); padding: var(--s-sm) var(--s-md); border-top: 1px solid var(--c-border-subtle); }
.app-sidebar__foot form { margin: 0; }
.app-sidebar__user { flex: 1; min-width: 0; display: flex; align-items: center; gap: var(--s-sm); }
.app-sidebar__user span { min-width: 0; display: flex; flex-direction: column; }
.app-sidebar__user strong { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-sidebar__user small { color: var(--c-helper); font-size: 12px; }
.app-sidebar__foot .icon-button { color: var(--c-on-surface-variant); width: 32px; height: 32px; }
.app-backdrop { display: none; }
.app-column { display: contents; }
.app-content { grid-area: main; min-width: 0; padding: var(--s-xl); }
.filter-note { border-radius: var(--r-sm); background: var(--c-surface); border: 1px solid var(--c-border-subtle); border-left: 3px solid var(--c-primary); color: var(--c-on-surface); font-weight: 400; }
.ticket-list .ticket-row { cursor: pointer; }
.ticket-list .ticket-row.selected { background: var(--c-surface-variant); box-shadow: inset 3px 0 0 var(--c-primary); }
.ticket-list .ticket-row.sla-row td:first-child { box-shadow: inset 3px 0 0 var(--c-error); }
.sla-row { background: var(--c-surface); }
.pager { display: flex; align-items: center; gap: var(--s-sm); }
.pager a, .pager span { min-width: 32px; height: 32px; padding: 0 var(--s-sm); display: inline-flex; align-items: center; justify-content: center; font-size: 14px; border-radius: var(--r-sm); color: var(--c-on-surface); }
.pager a:hover { background: var(--c-surface-variant); }
.pager .current { background: var(--c-on-surface); color: #fff; }
.pager .disabled { color: var(--c-helper); }

/* =========================================================================
   Ticket görünüşü (modal və iş masasında daxili)
   ========================================================================= */
.detail-backdrop { background: rgb(22 22 22 / 50%); backdrop-filter: none; }
.ticket-detail-modal.detail-expanded { top: var(--header-h); right: 0; bottom: 0; width: min(1120px, 100vw); padding: 0; overflow: hidden; display: flex; flex-direction: column; background: var(--c-surface); border: 0; border-left: 1px solid var(--c-border-strong); border-radius: 0; box-shadow: -8px 0 24px rgb(0 0 0 / 20%); }
.tv { flex: 1; min-height: 0; display: flex; flex-direction: column; background: var(--c-surface); }
.tv__header { flex: 0 0 auto; display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s-md); padding: var(--s-md) var(--s-lg); background: var(--c-surface); border-bottom: 1px solid var(--c-border-subtle); }
.tv__title { min-width: 0; }
.tv__title h2 { margin-top: var(--s-xs); font-size: 20px; line-height: 1.3; word-break: break-word; }
.tv__meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-sm) var(--s-md); }
.tv__sla { display: inline-flex; align-items: center; gap: var(--s-xs); color: var(--c-error); font-size: 12px; font-weight: 600; }
.tv__sla .icon { width: 14px; height: 14px; }
.tv__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: var(--s-sm); flex: 0 0 auto; }
.tv__actions form { margin: 0; }
.tv__scroll { flex: 1; min-height: 0; overflow-y: auto; padding: var(--s-lg); background: var(--c-surface-variant); }
.tv__grid { display: grid; grid-template-columns: minmax(0, 1fr) 296px; gap: var(--s-lg); align-items: start; }
.tv__main { min-width: 0; }
.tv__main .detail-description { margin: 0 0 var(--s-md); max-width: none; padding: var(--s-md); background: var(--c-surface); border: 1px solid var(--c-border-subtle); border-left: 3px solid var(--c-primary); border-radius: var(--r-sm); color: var(--c-on-surface); font-size: 14px; line-height: 1.5; white-space: pre-wrap; }
.tv__side { display: flex; flex-direction: column; gap: var(--s-md); position: sticky; top: 0; }
.tv-card { padding: var(--s-md); }
.tv-card h3 { margin-bottom: var(--s-sm); }
.tv-card .muted { margin: calc(var(--s-xs) * -1) 0 var(--s-md); font-size: 12px; color: var(--c-helper); }
.tv-meta { margin: 0; display: grid; gap: var(--s-md); }
.tv-meta dt { margin-bottom: var(--s-xxs); color: var(--c-helper); font-size: 12px; font-weight: 400; letter-spacing: .02em; text-transform: none; }
.tv-meta dd { margin: 0; display: flex; flex-direction: column; gap: var(--s-xxs); font-size: 14px; font-weight: 400; }
.tv-meta small { color: var(--c-helper); font-size: 12px; font-weight: 400; }
.tv-meta .text-link { margin-top: var(--s-xs); font-size: 13px; }
.tv-form .field { margin-bottom: var(--s-md); }
.tv__thread { display: flex; flex-direction: column; gap: var(--s-md); margin: var(--s-lg) 0; }
.tv__thread .message { display: flex; align-items: flex-start; gap: var(--s-sm); }
.tv__thread .message--own { flex-direction: row-reverse; }
.tv__thread .message__content { max-width: min(640px, 86%); }
.message__bubble { padding: var(--s-sm) var(--s-md); background: var(--c-surface); border: 1px solid var(--c-border-subtle); border-radius: var(--r-sm); color: var(--c-on-surface); font-size: 14px; line-height: 1.5; white-space: pre-wrap; }
.message--own .message__bubble { background: var(--c-border-subtle); border-color: var(--c-border-subtle); color: var(--c-on-surface); border-radius: var(--r-sm); }
.message--internal .message__bubble { background: var(--c-surface); border-left: 4px solid var(--c-warning); }
.message__meta { margin-top: var(--s-xs); color: var(--c-helper); font-size: 12px; }
.internal-label { display: flex; align-items: center; gap: var(--s-xs); margin-bottom: var(--s-xs); color: var(--c-on-surface-variant); font-size: 12px; }
.mention { color: var(--c-primary); background: transparent; font-weight: 600; }
.message--own .mention { background: transparent; color: var(--c-primary); }
.tv__empty { margin: var(--s-sm) 0; color: var(--c-helper); font-size: 14px; }
.tv__composer { position: static; z-index: auto; margin: var(--s-md) 0; padding: var(--s-md); background: var(--c-surface); border: 1px solid var(--c-border-subtle); border-top: 2px solid var(--c-on-surface); box-shadow: 0 -8px 12px var(--c-surface-variant); }
.tv__notice { display: flex; align-items: center; justify-content: space-between; gap: var(--s-md); margin: var(--s-md) 0; padding: var(--s-md); border: 1px solid var(--c-border-subtle); border-left: 3px solid var(--c-warning); background: var(--c-surface); font-size: 14px; }
.message__bubble--files { padding: 0 !important; background: transparent !important; border: 0 !important; }

.ticket-lifecycle { margin: var(--s-md) 0; }
.ticket-lifecycle li span { border-radius: 50%; background: var(--c-surface); border: 2px solid var(--c-border-strong); }
.ticket-lifecycle li.done span { background: var(--c-primary); border-color: var(--c-primary); }
.ticket-lifecycle li.current span { border-color: var(--c-primary); background: var(--c-surface); box-shadow: 0 0 0 3px var(--c-surface), 0 0 0 5px var(--c-primary); }
.ticket-lifecycle li small { color: var(--c-on-surface-variant); font-size: 12px; }
.ticket-lifecycle li.current small { color: var(--c-on-surface); font-weight: 600; }
.ticket-history { background: var(--c-surface); border: 1px solid var(--c-border-subtle); border-radius: var(--r-sm); }

/* ---- cavab qutusu (Carbon content switcher + text area) ---- */
.composer { position: relative; display: flex; flex-direction: column; gap: var(--s-sm); }
.composer__modes { display: inline-flex; align-self: flex-start; }
.composer__mode { position: relative; }
.composer__mode input { position: absolute; opacity: 0; pointer-events: none; }
.composer__mode span { display: inline-flex; align-items: center; gap: var(--s-sm); height: 32px; padding: 0 var(--s-md); border: 1px solid var(--c-border-strong); margin-left: -1px; color: var(--c-on-surface); font-size: 14px; cursor: pointer; background: var(--c-surface); }
.composer__mode:first-child span { margin-left: 0; }
.composer__mode .icon { width: 14px; height: 14px; }
.composer__mode input:checked + span { background: var(--c-on-surface); border-color: var(--c-on-surface); color: #fff; }
.composer__mode input:focus-visible + span { outline: 2px solid var(--c-primary); outline-offset: 1px; }
.composer textarea { width: 100%; min-height: 56px; max-height: 192px; padding: var(--s-sm) var(--s-md); border: 0; border-bottom: 1px solid var(--c-border-strong); border-radius: var(--r-sm) var(--r-sm) 0 0; outline: 0; resize: vertical; font-size: 14px; line-height: 1.5; background: var(--c-surface-variant); }
.composer textarea:focus { outline: 2px solid var(--c-primary); outline-offset: -2px; }
.composer:has(input[value="internal"]:checked) textarea { box-shadow: inset 4px 0 0 var(--c-warning); }
.composer__files { display: flex; flex-wrap: wrap; gap: var(--s-sm); }
.composer__files[hidden] { display: none; }
.chip { display: flex; align-items: center; gap: var(--s-sm); max-width: 300px; padding: var(--s-xs) var(--s-xs) var(--s-xs) var(--s-sm); border: 1px solid var(--c-border-subtle); border-radius: var(--r-sm); background: var(--c-surface); }
.chip__thumb { flex: 0 0 32px; width: 32px; height: 32px; border-radius: var(--r-sm); object-fit: cover; background: var(--c-border-subtle); color: var(--c-on-surface); display: grid; place-items: center; font-family: var(--mono); font-size: 10px; font-weight: 500; }
.chip__text { min-width: 0; display: flex; flex-direction: column; }
.chip__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.chip__size { color: var(--c-helper); font-size: 12px; }
.chip__remove { flex: 0 0 32px; width: 32px; height: 32px; padding: 0; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--c-on-surface-variant); cursor: pointer; display: grid; place-items: center; }
.chip__remove:hover { background: var(--c-surface-variant); color: var(--c-error); }
.chip__remove .icon { width: 14px; height: 14px; }
.composer__bar { display: flex; align-items: center; gap: var(--s-md); }
.composer__hint { flex: 1; min-width: 0; color: var(--c-helper); font-size: 12px; line-height: 1.34; }
.composer__hint--error { color: var(--c-error); font-weight: 600; }
.composer__attach { flex: 0 0 auto; cursor: pointer; }
.composer.drag-active::after { content: "Faylları göndərmək üçün buraxın"; position: absolute; inset: calc(var(--s-sm) * -1); z-index: 5; display: grid; place-items: center; border: 2px dashed var(--c-primary); background: rgb(244 244 244 / 94%); color: var(--c-primary); font-size: 14px; font-weight: 600; pointer-events: none; }

/* ---- fayl kartları (fayl adı yuxarıda) ---- */
.file-cards { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-sm); white-space: normal; }
.message__text + .file-cards { margin-top: var(--s-sm); }
.file-card { min-width: 264px; max-width: 424px; padding: var(--s-sm) var(--s-md) var(--s-sm) var(--s-sm); border: 1px solid var(--c-border-subtle); border-radius: var(--r-sm); background: var(--c-surface); color: var(--c-on-surface); }
.file-card__head { display: flex; align-items: center; gap: var(--s-sm); }
.file-card__icon { flex: 0 0 40px; height: 40px; border-radius: var(--r-sm); background: var(--c-surface-variant); color: var(--c-on-surface); display: grid; place-items: center; align-content: center; gap: 0; }
.file-card__icon .icon { width: 16px; height: 16px; }
.file-card__icon b { font-family: var(--mono); font-size: 9px; font-weight: 500; line-height: 1; }
.file-card__text { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.file-card__name { color: var(--c-on-surface); font-size: 14px; font-weight: 600; line-height: 1.3; word-break: break-word; }
.file-card__name:hover { color: var(--c-primary); text-decoration: underline; }
.file-card__text small { color: var(--c-helper); font-size: 12px; }
.file-card__links { display: flex; gap: var(--s-md); flex: 0 0 auto; color: var(--c-primary); font-size: 13px; }
.file-card__links a:hover { text-decoration: underline; }
.file-card__preview img { display: block; max-width: 100%; max-height: 224px; margin-top: var(--s-sm); border: 1px solid var(--c-border-subtle); border-radius: var(--r-sm); background: var(--c-surface); }
.file-card__pdf summary { margin-top: var(--s-sm); color: var(--c-primary); font-size: 13px; cursor: pointer; }
.file-card__pdf iframe { width: 100%; height: 320px; margin-top: var(--s-sm); border: 1px solid var(--c-border-subtle); border-radius: var(--r-sm); background: var(--c-surface); }

/* =========================================================================
   İdarəetmə: şirkət / layihə redaktəsi
   ========================================================================= */
.mgmt-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: var(--s-lg); align-items: start; }
.mgmt-card { padding: var(--s-lg); }
.mgmt-card + .mgmt-card { margin-top: var(--s-md); }
.mgmt-card h2 { font-size: 16px; margin-bottom: var(--s-md); }
.mgmt-card .muted { margin: calc(var(--s-sm) * -1) 0 var(--s-md); font-size: 14px; color: var(--c-on-surface-variant); }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--s-xs) var(--s-md); }
.check-grid label { display: flex; align-items: center; gap: var(--s-sm); min-height: 40px; padding: 0 var(--s-sm); border: 1px solid var(--c-border-subtle); border-radius: var(--r-sm); font-size: 14px; cursor: pointer; background: var(--c-surface); }
.check-grid label:hover { background: var(--c-surface-variant); }
.check-grid input { width: 16px; height: 16px; accent-color: var(--c-primary); }
.check-grid small { margin-left: auto; color: var(--c-helper); font-size: 12px; }
.mgmt-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--c-border-subtle); border: 1px solid var(--c-border-subtle); margin-bottom: var(--s-md); }
.mgmt-stats div { background: var(--c-surface); padding: var(--s-md); display: flex; flex-direction: column; gap: var(--s-xxs); }
.mgmt-stats strong { font-size: 28px; font-weight: 300; font-family: var(--font); }
.mgmt-stats span { color: var(--c-on-surface-variant); font-size: 12px; }
.danger-zone { border-left: 3px solid var(--c-error); }
.form-actions--inline { display: flex; gap: var(--s-sm); flex-wrap: wrap; margin-top: var(--s-md); }
.row-actions { display: flex; align-items: center; gap: var(--s-md); }
.row-actions form { margin: 0; }
.back-link { color: var(--c-primary); font-size: 14px; }

/* ---- giriş səhifəsi: Carbon tonu ---- */
.login-brand-panel { background: var(--c-on-surface); }
.login-brand-panel::after, .login-illustration { display: none; }
.login-brand__content p { color: rgb(255 255 255 / 72%); }
.login-features span { color: rgb(255 255 255 / 72%); }
.demo-accounts, .auth-simple-card, .login-form-panel { border-radius: var(--r-sm); }
.auth-simple-page { background: var(--c-surface-variant); }
.auth-simple-card { background: var(--c-surface); border: 1px solid var(--c-border-subtle); }
.auth-simple-icon, .confirmation-card__icon { border-radius: var(--r-sm); background: var(--c-surface-variant); color: var(--c-on-surface); }

/* ---- hesabat / icmal ---- */
.line-primary { stroke: var(--c-primary); }
.line-secondary { stroke: var(--c-border-strong); }
.line-dots circle:first-child { fill: var(--c-primary); }
.line-dots circle:last-child { fill: var(--c-border-strong); }
.mini-bar, .sla-track, .team-load > div { border-radius: 0; background: var(--c-border-subtle); }
.mini-bar i, .sla-track span, .team-load i { background: var(--c-primary); border-radius: 0; }
.bar-chart i { background: var(--c-primary); border-radius: 0; }
.bar-chart > div > div { border-radius: 0; background: var(--c-border-subtle); }
.kpi-card > strong, .stat-card > strong { font-weight: 300; font-size: 32px; letter-spacing: 0; }


/* ---- tab-lar sığsın, header ayırıcısı, bildiriş bağlama düyməsi ---- */
.app-crumbs { height: 24px; padding-left: var(--s-md); border-left: 1px solid rgb(255 255 255 / 24%); }
.toast { display: flex; align-items: flex-start; gap: var(--s-md); min-width: 280px; }
.toast span { flex: 1; font-size: 14px; line-height: 1.43; }
.toast__close { flex: 0 0 auto; width: 24px; height: 24px; padding: 0; border: 0; background: transparent; color: #fff; font-size: 20px; line-height: 1; cursor: pointer; opacity: .8; }
.toast__close:hover { opacity: 1; background: rgb(255 255 255 / 16%); }

.team-load i, .team-load i[class^="load-"], .sla-track span { background: var(--c-primary) !important; }
.donut::before { background: var(--c-surface); }
.donut-legend .dot { border-radius: 0; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* =========================================================================
   Kiçik ekranlar
   ========================================================================= */
@media (max-width: 1100px) {
  .tv__grid { grid-template-columns: minmax(0, 1fr); }
  .tv__side { position: static; order: -1; }
  .mgmt-grid { grid-template-columns: 1fr; }
}
@media (max-width: 980px) {
  .app-shell { grid-template-columns: minmax(0, 1fr); grid-template-areas: "header" "main"; }
  .app-sidebar { position: fixed; top: var(--header-h); bottom: 0; left: 0; height: auto; width: var(--nav-w); transform: translateX(-100%); transition: transform 150ms var(--ease); z-index: 80; }
  body.nav-open .app-sidebar { transform: none; box-shadow: 0 2px 6px rgb(0 0 0 / 30%); }
  body.nav-open .app-backdrop { display: block; position: fixed; inset: var(--header-h) 0 0 0; z-index: 75; background: rgb(22 22 22 / 50%); }
  .app-header__menu { display: inline-flex; }
  .app-search.search-field, .app-crumbs { display: none; }
  .app-header__actions { margin-left: auto; }
  .user-menu__name { display: none; }
  .app-content { padding: var(--s-md); }
  .ticket-detail-modal.detail-expanded { width: 100vw; }
  .tv__header, .tv__scroll { padding-left: var(--s-md); padding-right: var(--s-md); }
  .tv__header { flex-direction: column; }
  .tv__actions { justify-content: flex-start; }
  .composer__hint { display: none; }
}

/* iş masası: mobil boşluq qaydası ümumi qaydanı üstələsin; brend sətirə düşməsin */
.app-brand strong, .app-brand__role { white-space: nowrap; }
@media (max-width: 640px) { .app-brand__role { display: none; } }

/* ---- naviqasiya menyusu açılıb-bağlanır ---- */
.app-header__menu { display: inline-flex; }
[hidden] { display: none !important; }
@media (min-width: 981px) {
  html.nav-collapsed .app-shell { grid-template-columns: 0 minmax(0, 1fr); }
  html.nav-collapsed .app-sidebar { display: none; }
}
.ticket-history { margin-top: var(--s-lg); }
.history-item__meta strong { font-weight: 600; font-size: 14px; }
.history-item small { color: var(--c-helper); font-size: 12px; }

/* ---- mail səhifəsi ---- */
.mail-main { display: flex; flex-direction: column; gap: var(--s-md); min-width: 0; }
.mail-outbox .status-cancelled { color: var(--c-helper); }
.mail-list__heading { padding: var(--s-md) var(--s-md) var(--s-xs); color: var(--c-helper); font-size: 12px; display: flex; justify-content: space-between; }

/* ---- yazışma sürüşməsi: uzun mətn/fayl adı üfüqi sürüşdürməsin, daxili sürüşmə kənara keçməsin ---- */
.tv__scroll { overscroll-behavior: contain; scrollbar-gutter: stable; overflow-x: hidden; }
.tv__main, .tv__thread, .tv__thread .message, .message__content { min-width: 0; }
.message__bubble, .message__text, .detail-description, .history-item__meta, .tv__title h2 { overflow-wrap: anywhere; word-break: break-word; }
.file-card { min-width: 0; width: min(424px, 100%); }
.file-card__name { overflow-wrap: anywhere; }
.file-card__pdf iframe, .file-card__preview img { max-width: 100%; }
.composer textarea { scroll-margin-bottom: var(--s-xl); }
.mail-status { display: flex; align-items: center; justify-content: space-between; gap: var(--s-md); padding: var(--s-md) var(--s-lg); margin-bottom: var(--s-md); border-left: 4px solid var(--c-success); }
.mail-status--off { border-left-color: var(--c-error); }
.mail-status div { display: flex; flex-direction: column; gap: var(--s-xxs); }
.mail-status span { color: var(--c-on-surface-variant); font-size: 14px; }
.mail-status form { margin: 0; flex: 0 0 auto; }

/* ---- sıralana bilən cədvəl başlıqları ---- */
.sort-link { display: inline-flex; align-items: center; gap: var(--s-xs); color: inherit; text-decoration: none; white-space: nowrap; }
.sort-link:hover, .sort-link:focus-visible { color: var(--c-primary); }
.sort-link__arrow { font-size: 12px; opacity: .45; }
.sort-link.is-sorted { color: var(--c-primary); font-weight: 600; }
.sort-link.is-sorted .sort-link__arrow { opacity: 1; }
.mail-list__off { margin-left: auto; font-style: normal; font-size: 12px; color: var(--c-error); }
.login-brand__logo { height: 26px; width: auto; max-width: 220px; object-fit: contain; }

/* ---- yazışma: səliqəli düzülüş (sağda öz mesajlarım, solda digərləri; ardıcıl mesajlar qruplaşır) ---- */
.tv__thread { gap: var(--s-md); }
.tv__thread .message { display: flex; align-items: flex-end; gap: var(--s-sm); width: 100%; }
.tv__thread .message--own { flex-direction: row-reverse; }
.tv__thread .message, .tv__thread .message--own { justify-content: flex-start; } /* row-reverse-də flex-start = sağ kənar */
.tv__thread .message > .avatar { flex: 0 0 auto; align-self: flex-end; margin-bottom: 22px; }
.tv__thread .message--last > .avatar { margin-bottom: 22px; }
.tv__thread .message:not(.message--last) > .avatar { margin-bottom: 0; }
.tv__thread .message--cont > .avatar { visibility: hidden; }
.tv__thread .message__content { display: flex; flex-direction: column; align-items: flex-start; flex: 0 1 auto; width: fit-content; max-width: min(560px, calc(100% - 48px)); min-width: 0; }
.tv__thread .message--own .message__content { align-items: flex-end; }
.tv__thread .message__bubble { width: fit-content; max-width: 100%; min-width: 72px; box-sizing: border-box; text-align: left; }
.tv__thread .message__meta { text-align: left; white-space: normal; }
.tv__thread .message--own .message__meta { text-align: right; }
.tv__thread .message:not(.message--last) .message__meta { display: none; }
.tv__thread .message--cont { margin-top: calc(var(--s-xs) - var(--s-md)); }
.tv__thread .message--cont .message__bubble { }
.tv__thread .message__bubble--files { width: 100%; }
.tv__thread .internal-label { align-self: stretch; }
.tv__thread .message--own .internal-label { justify-content: flex-end; }
.field-hint { display: block; margin-top: var(--s-xs); color: var(--c-helper); font-size: 12px; }

/* ---- hesabatlar və idarə panelləri: köhnə "redaksiya" qatından qalan sıfır kənar boşluqlarını düzəldir ---- */
.chart-card .card__header, .team-card .card__header, .attention-card .card__header, .table-card > .card__header { padding: var(--s-md) var(--s-lg); }
.team-card, .attention-card, .coordinator-project-card, .chart-card { background: var(--c-surface); border: 1px solid var(--c-border-subtle); }
.coordinator-project-card { padding: var(--s-lg); border-top: 3px solid var(--c-primary); }
.team-card .team-row, .attention-card > * { padding-inline: var(--s-lg); }
.team-card .card__header a, .attention-card .card__header a { white-space: nowrap; }
.report-kpis { gap: var(--s-md); border: 0; margin-bottom: var(--s-lg); }
.report-kpis .kpi-card { border: 1px solid var(--c-border-subtle); background: var(--c-surface); padding: var(--s-lg); min-height: 136px; }
.kpi-card + .kpi-card { border-left: 1px solid var(--c-border-subtle); }
.kpi-card > span { font-size: 13px; color: var(--c-on-surface-variant); }
.kpi-card small { font-size: 12px; }
.workload-card { gap: var(--s-sm); }
.workload-card > div { grid-template-columns: 64px minmax(0, 1fr) 24px; gap: var(--s-sm); font-size: 12px; }
.workload-card .mini-bar { height: 6px; }
.report-charts { gap: var(--s-md); align-items: stretch; }
.chart-legend { font-size: 12px; flex-wrap: wrap; justify-content: flex-end; }
.line-chart { padding: var(--s-md) var(--s-lg) var(--s-md); }
.line-chart svg { height: 240px; }
.axis-y text { fill: var(--c-helper); font-size: 11px; }
.chart-dates { font-size: 12px; padding-left: calc(40 / 700 * 100%); padding-top: var(--s-xs); }
.donut-wrap { padding: var(--s-lg); }
.donut-legend { gap: var(--s-sm); }
.donut-legend li { font-size: 13px; }
.donut span { font-size: 12px; }
.category-card { margin-top: var(--s-md); }
.bar-chart { padding: var(--s-md) var(--s-lg); gap: var(--s-md); }
.bar-chart > div { grid-template-columns: minmax(96px, 180px) minmax(0, 1fr) 32px; font-size: 13px; }
.bar-chart > div > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-chart > div > div { height: 8px; }
.stats-grid { gap: var(--s-md); border: 0; margin-bottom: var(--s-lg); }
.stats-grid .stat-card { border: 1px solid var(--c-border-subtle); background: var(--c-surface); }
.stat-card + .stat-card { border-left: 1px solid var(--c-border-subtle); }
.coordinator-grid { gap: var(--s-md); }
.project-overview__stats span { font-size: 12px; }
@media (max-width: 1100px) { .report-kpis { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .report-kpis { grid-template-columns: 1fr; } .tv__thread .message__content { max-width: calc(100% - 44px); } }

/* ---- köhnə redaksiya qatının (redesign.css) kənar boşluqlarını sıfırlayan qaydaları Carbon kartlarına uyğunlaşdırır ---- */
.table-footer { padding: var(--s-sm) var(--s-md); }
.team-list { padding: var(--s-xs) var(--s-md) var(--s-md); }
.attention-list { padding: var(--s-xs) var(--s-md) var(--s-md); }
.attention-list a { padding: var(--s-sm) var(--s-xs); }
.attention-list strong { font-size: 13px; }
.attention-list span:not(.attention-icon) { font-size: 12px; }
.team-row strong { font-size: 14px; }
.team-row span { font-size: 12px; }
.team-card .team-row, .attention-card > * { padding-inline: 0; }
.team-card .card__header, .attention-card .card__header { padding: var(--s-md) var(--s-lg); }
.project-overview { padding: var(--s-lg); border: 1px solid var(--c-border-subtle); border-top: 3px solid var(--c-primary); background: var(--c-surface); }
.project-overview-grid { gap: var(--s-md); }

/* ---- yeni ticket: seçilmiş fayllar və açıqlamanın altındakı fayllar ---- */
.dropzone.drag-active { border-color: var(--c-primary); background: var(--c-surface); }
.file-picker { margin-top: var(--s-sm); border: 1px solid var(--c-border-subtle); background: var(--c-surface); }
.file-picker__title { margin: 0; padding: var(--s-sm) var(--s-md); border-bottom: 1px solid var(--c-border-subtle); font-size: 13px; font-weight: 600; }
.file-picker__problem { margin: 0; padding: var(--s-sm) var(--s-md); color: var(--c-error); font-size: 13px; border-bottom: 1px solid var(--c-border-subtle); }
.file-picker__list { list-style: none; margin: 0; padding: 0; }
.file-picker__list li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: var(--s-md); padding: var(--s-xs) var(--s-md); min-height: 40px; border-bottom: 1px solid var(--c-border-subtle); font-size: 14px; }
.file-picker__list li:last-child { border-bottom: 0; }
.file-picker__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-picker__list small { color: var(--c-helper); font-size: 12px; }
.file-picker__list button { border: 0; background: transparent; color: var(--c-primary); font: inherit; font-size: 13px; cursor: pointer; padding: var(--s-xs); }
.file-picker__list button:hover { text-decoration: underline; }
.initial-files { margin: var(--s-md) 0; }
.initial-files h4 { display: flex; align-items: center; gap: var(--s-xs); margin: 0 0 var(--s-sm); font-size: 14px; font-weight: 600; }
.initial-files h4 span { color: var(--c-helper); font-weight: 400; }

/* ---- səhifələmə paneli (həmişə görünür) ---- */
.pager-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s-md); flex-wrap: wrap; }
.pager-bar__count { color: var(--c-on-surface-variant); font-size: 13px; }
.pager-bar__size { display: flex; align-items: center; gap: var(--s-xs); color: var(--c-helper); font-size: 13px; }
.pager-bar__size a, .pager-bar__size b { min-width: 32px; height: 28px; display: inline-flex; align-items: center; justify-content: center; font-weight: 400; color: var(--c-primary); text-decoration: none; }
.pager-bar__size b { color: var(--c-on-surface); font-weight: 600; background: var(--c-surface-variant); }
.pager-bar__size a:hover { background: var(--c-surface-variant); }
.pager .gap { min-width: 24px; color: var(--c-helper); }
@media (max-width: 760px) { .pager-bar { justify-content: flex-start; } }

/* ---- mail şablonunun HTML önizləməsi ---- */
.mail-preview { margin-top: var(--s-md); overflow: hidden; }
.mail-preview__frame { display: block; width: 100%; height: 640px; border: 0; background: #f4f4f4; }

/* ---- boş vəziyyət ---- */
.empty-box { display: flex; flex-direction: column; align-items: center; gap: var(--s-sm); padding: var(--s-xl) var(--s-lg); text-align: center; border-top: 1px solid var(--c-border-subtle); }
.table-filters + .empty-box { border-top: 0; }
.empty-box__icon { width: 48px; height: 48px; display: grid; place-items: center; background: var(--c-surface-variant); color: var(--c-primary); }
.empty-box__icon .icon { width: 22px; height: 22px; }
.empty-box strong { font-size: 16px; font-weight: 600; color: var(--c-on-surface); }
.empty-box p { margin: 0; max-width: 420px; font-size: 14px; color: var(--c-on-surface-variant); }
.empty-box .button { margin-top: var(--s-xs); }

/* yazışma qutusu ekranda sabit qalmır: mesajların və tarixçənin üstünə çıxmasın */
.tv__composer { position: static !important; box-shadow: none; margin: var(--s-md) 0 var(--s-lg); }

/* ================= Ticketin gedişi (flow), açıqlama və əlavə fayllar ================= */
.tv-panel { margin: 0 0 var(--s-md); background: var(--c-surface); border: 1px solid var(--c-border-subtle); }
.tv-panel__head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: var(--s-xs) var(--s-md); padding: var(--s-sm) var(--s-md); border-bottom: 1px solid var(--c-border-subtle); }
.tv-panel__head h3 { margin: 0; font-size: 14px; font-weight: 600; }
.tv-panel__head span { color: var(--c-helper); font-size: 12px; }

/* axın: nömrələnmiş addımlar, tamamlananlarda ✓, aralarında xətt */
.tv-flow { padding: var(--s-md) var(--s-md) var(--s-sm); }
.flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.flow .flow__step { position: relative; display: flex; flex-direction: column; align-items: center; gap: var(--s-xs); padding: 0; border: 0; text-align: center; min-width: 0; }
.flow .flow__step::before { content: ""; position: absolute; top: 13px; right: 50%; width: 100%; height: 2px; background: var(--c-border-subtle); }
.flow .flow__step:first-child::before { display: none; }
.flow .flow__step.is-done::before, .flow .flow__step.is-current::before { background: var(--c-primary); }
.flow .flow__dot { position: relative; z-index: 1; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--c-surface); border: 2px solid var(--c-border-strong); color: var(--c-helper); font-size: 12px; font-weight: 600; box-shadow: none; }
.flow .flow__dot .icon { width: 14px; height: 14px; }
.flow .is-done .flow__dot { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.flow .is-current .flow__dot { border-color: var(--c-primary); color: var(--c-primary); box-shadow: 0 0 0 4px rgba(15, 98, 254, .16); }
.flow .flow__label { max-width: 100%; padding: 0 2px; color: var(--c-on-surface-variant); font-size: 12px; line-height: 1.3; overflow-wrap: anywhere; }
.flow .is-current .flow__label { color: var(--c-on-surface); font-weight: 600; }
.flow .flow__step:not(.is-current):not(.is-done) .flow__label { color: var(--c-helper); }
@media (max-width: 760px) {
  .flow .flow__step:not(.is-current) .flow__label { display: none; }
  .flow .flow__label { font-size: 13px; }
}

/* açıqlama */
.tv-request .detail-description { margin: 0; padding: var(--s-md); background: transparent; border: 0; border-radius: 0; font-size: 14px; line-height: 1.7; color: var(--c-on-surface); white-space: pre-wrap; }
.tv__main .tv-request .detail-description { padding: var(--s-md); border: 0; }

/* əlavə fayllar: yığcam kartlar şəbəkəsi */
.tv-request .initial-files { margin: 0; padding: var(--s-md); border-top: 1px solid var(--c-border-subtle); background: var(--c-surface-variant); }
.tv-request .initial-files h4 { margin: 0 0 var(--s-sm); }
.file-tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: var(--s-sm); }
.file-tile { display: flex; align-items: flex-start; gap: var(--s-sm); min-width: 0; padding: var(--s-sm); background: var(--c-surface); border: 1px solid var(--c-border-subtle); }
.file-tile__thumb { flex: 0 0 56px; width: 56px; height: 56px; display: grid; place-items: center; overflow: hidden; background: var(--c-surface-variant); border: 1px solid var(--c-border-subtle); color: var(--c-on-surface-variant); font-family: var(--mono); font-size: 12px; font-weight: 600; text-decoration: none; }
.file-tile__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.file-tile__body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.file-tile__name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--c-on-surface); font-size: 14px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; text-decoration: none; }
.file-tile__name:hover { color: var(--c-primary); text-decoration: underline; }
.file-tile__body small { color: var(--c-helper); font-size: 12px; }
.file-tile__actions { display: flex; gap: var(--s-md); margin-top: var(--s-xs); font-size: 13px; }
.file-tile__actions a { color: var(--c-primary); text-decoration: none; }
.file-tile__actions a:hover { text-decoration: underline; }

/* pəncərəni bağlayan düymə yalnız ikondur və ticketi bağlayan düymədən ayrı görünür */
.tv__actions { align-items: center; }
.tv__dismiss { width: 36px; min-width: 36px; padding: 0; justify-content: center; margin-left: var(--s-sm); border-color: transparent; background: transparent; color: var(--c-on-surface); }
.tv__dismiss:hover { background: var(--c-surface-variant); }
.tv__dismiss .icon { width: 18px; height: 18px; margin: 0; }
