@font-face {
  font-family: Inter; /* auteur-allow: FONT_DEFAULT_SLOP -- Inter este tipografia operațională TapTasty, conform DESIGN.md. */
  src: url('/inter-latin-ext-wght-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: Inter; /* auteur-allow: FONT_DEFAULT_SLOP -- A doua submulțime Inter păstrează diacriticele românești, conform DESIGN.md. */
  src: url('/inter-latin-wght-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;
  --canvas: #f4f6ff;
  --surface: #fff;
  --quiet-surface: #f9faff;
  --ink: #172f5d;
  --muted: #5e6376;
  --border: #e2e6f4;
  --control-border: #bec5d9;
  --accent: #6547d9;
  --accent-strong: #5034ba;
  --accent-soft: #f1edff;
  --accent-line: #e4dcff;
  --green: #166534;
  --green-soft: #effaf2;
  --gold: #75460e;
  --gold-soft: #fff7e6;
  --red: #a12323;
  --red-soft: #fef0f0;
  --blue: #1752a3;
  --blue-soft: #eef5ff;
  --radius: 10px;
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; /* auteur-allow: FONT_DEFAULT_SLOP -- Tipografia Inter urmează ghidul operațional TapTasty, conform DESIGN.md. */
  font-synthesis: none;
  font-size: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--canvas); color: var(--ink); line-height: 1.5; }
h1, h2, h3, p, ol { margin: 0; }
a { color: inherit; text-decoration: none; }
ol { list-style: none; padding: 0; }
button, input, select { font: inherit; color: inherit; }
button, select { cursor: pointer; }
button:disabled, select:disabled { cursor: wait; }
button:disabled { color: var(--muted); background: var(--quiet-surface); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
time, .quiet-count, .issue-ref, .issue-meta { font-variant-numeric: tabular-nums; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  clip-path: inset(50%);
  white-space: nowrap;
  overflow: hidden;
}
.skip {
  position: fixed;
  top: 8px;
  left: 12px;
  z-index: 3;
  padding: 8px 16px;
  border-radius: var(--radius);
  background: var(--surface);
  transform: translateY(-160%);
}
.skip:focus { transform: translateY(0); }
.frame { width: min(1536px, calc(100% - 72px)); margin-inline: auto; }
.icon {
  flex: none;
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.topbar { background: var(--surface); border-bottom: 1px solid var(--border); }
.bar-inner, .brand, .bar-actions { display: flex; align-items: center; }
.bar-inner { justify-content: space-between; min-height: 66px; gap: 12px; }
.brand { gap: 18px; }
.brand a { display: inline-flex; align-items: center; min-height: 44px; }
.brand img { display: block; max-width: 120px; height: auto; }
.brand-section {
  padding-inline-start: 18px;
  border-inline-start: 1px solid var(--border);
  font-size: .875rem;
  font-weight: 600;
  color: var(--muted);
}
.bar-actions { gap: 12px; }
.demo-mark {
  font-size: .75rem;
  font-weight: 600;
  color: var(--gold);
  background: var(--gold-soft);
  border-radius: 999px;
  padding: 4px 9px;
  white-space: nowrap;
}
.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid var(--control-border);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: .8125rem;
  font-weight: 600;
  transition: background-color 140ms ease, border-color 140ms ease;
}
.button .icon { width: 16px; height: 16px; }
.button.primary { color: white; border-color: var(--accent); background: var(--accent); }
.button.primary:disabled { color: var(--muted); background: var(--quiet-surface); border-color: var(--control-border); }
.button.text { border-color: transparent; background: transparent; color: var(--accent-strong); padding-inline: 8px; }
.button.icon-button { padding: 8px; min-height: 36px; width: 36px; color: var(--muted); }
.button:active:not(:disabled) { transform: translateY(1px); }

.login-shell {
  display: grid;
  align-items: center;
  justify-items: center;
  min-height: 100dvh;
  padding: 24px 16px;
}
.login-panel {
  width: min(100%, 440px);
  padding: clamp(22px, 5vw, 38px);
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 16px 44px #172f5d0c;
}
.login-brand { display: block; margin-bottom: 28px; }
.login-panel h1 { font-size: clamp(1.65rem, 4vw, 2.05rem); line-height: 1.16; letter-spacing: -.035em; }
.login-intro { margin: 9px 0 24px; color: var(--muted); font-size: .92rem; }
.login-field + .login-field { margin-top: 15px; }
.login-field label { display: block; margin-bottom: 5px; font-weight: 650; }
.login-field input {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 9px 10px;
  border: 1px solid var(--control-border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font-size: 1rem;
}
.login-password-row { display: flex; gap: 6px; }
.login-password-row .button { flex: 0 0 auto; min-height: 44px; padding-inline: 6px; }
.login-panel .primary { width: 100%; min-height: 44px; margin-top: 22px; font-size: .9rem; }
.login-error {
  margin: 0 0 14px;
  padding: 10px 11px;
  border: 1px solid #ecc9c9;
  border-radius: var(--radius);
  background: #fff4f4;
  color: #8a2c30;
}

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  padding-block: 37px 24px;
}
.page-head h1 { font-size: clamp(1.75rem, 3.2vw, 2.375rem); line-height: 1.12; letter-spacing: -.036em; font-weight: 750; }
.page-head p { color: var(--muted); margin-top: 8px; font-size: .9375rem; }
.connection { display: grid; justify-items: end; gap: 3px; text-align: right; min-width: min(250px, 32%); }
.connection-state { display: inline-flex; align-items: center; gap: 7px; font-size: .8125rem; font-weight: 600; }
.status-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.connection-state[data-tone='ready'] { color: var(--green); }
.connection-state[data-tone='neutral'] { color: var(--muted); }
.connection-state[data-tone='attention'] { color: var(--gold); }
.connection-time { color: var(--muted); font-size: .75rem; }
.alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  padding: 7px 12px 7px 14px;
  border-radius: var(--radius);
  background: var(--gold-soft);
  color: var(--gold);
  font-size: .875rem;
}

.workspace {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr) minmax(0, .97fr);
  align-items: stretch;
  min-height: 640px;
  border: 1px solid var(--border);
  border-radius: 16px;
  margin-bottom: 28px;
  background: var(--surface);
  box-shadow: 0 2px 5px #1b265a06;
}
.workspace[data-tab='messages'] { grid-template-columns: 224px minmax(0, 1fr); }
.workspace[data-tab='messages'] .detail { display: none; }
.group-pane { min-width: 0; border-radius: 16px 0 0 16px; padding: 22px 13px; background: var(--quiet-surface); }
.group-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding-inline: 9px;
  margin-bottom: 15px;
  font-size: .8125rem;
  font-weight: 700;
}
.quiet-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  min-width: 22px;
  padding: 1px 6px;
  border-radius: 6px;
  background: #edf0fa;
  font-size: .75rem;
  line-height: 1.5;
  font-weight: 700;
  color: var(--muted);
}
.quiet-count:empty { display: none; }
.group-pane .search-wrap { margin: 0 3px 11px; }
.groups { display: grid; gap: 3px; max-height: 590px; overflow-y: auto; scrollbar-width: thin; padding: 3px; }
.group-link {
  display: grid;
  grid-template-columns: 20px 1fr auto;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 6px 7px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: .8125rem;
  font-weight: 600;
}
.group-link .group-label { overflow-wrap: anywhere; }
.group-link .icon { color: var(--muted); }
.group-link .group-active { font-size: .75rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.group-link[aria-current='page'] { color: var(--accent-strong); border-color: var(--accent-line); background: var(--accent-soft); }
.group-link[aria-current='page'] .icon, .group-link[aria-current='page'] .group-active { color: inherit; }
.group-link:focus-visible { outline-offset: -2px; }
.mobile-groups { display: none; }
.mobile-groups label { font-size: .8125rem; font-weight: 600; }

.inbox { min-width: 0; border-inline-start: 1px solid var(--border); }
.inbox-header { padding: 19px 23px 0; }
.scope-header { display: flex; align-items: center; gap: 8px; min-height: 34px; }
.scope-header h2 { font-size: 1.25rem; line-height: 1.3; letter-spacing: -.022em; font-weight: 700; overflow-wrap: anywhere; }
.scope-stats { color: var(--muted); font-size: .8125rem; margin-top: 2px; }
.scope-stats .urgent-text { color: var(--red); font-weight: 600; }
.tabs { display: flex; gap: 20px; margin-top: 13px; border-bottom: 1px solid var(--border); }
.tabs a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-inline: 2px;
  min-height: 42px;
  border-bottom: 2px solid transparent;
  font-size: .875rem;
  font-weight: 600;
  color: var(--muted);
}
.tabs a[aria-current='page'] { color: var(--accent-strong); border-bottom-color: var(--accent); }
.tabs a[aria-current='page'] .quiet-count { color: inherit; background: var(--accent-soft); }
.filters { display: flex; gap: 9px; align-items: stretch; padding: 13px 23px; border-bottom: 1px solid var(--border); }
.search-wrap { position: relative; flex: 1; min-width: 0; }
.search-wrap > .icon { position: absolute; top: 50%; left: 11px; transform: translateY(-50%); width: 17px; color: var(--muted); pointer-events: none; }
.search-wrap input, .select-wrap select, #alias {
  width: 100%;
  min-height: 41px;
  border: 1px solid var(--control-border);
  border-radius: 8px;
  background: var(--surface);
  padding: 7px 10px;
  font-size: .8125rem;
}
.search-wrap input { padding-inline-start: 34px; }
input::placeholder { opacity: 1; color: var(--muted); }
.select-wrap { position: relative; min-width: 0; }
.select-wrap select { appearance: none; padding-inline-end: 32px; font-weight: 600; }
.select-wrap > .icon { position: absolute; right: 8px; width: 17px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.filter-wrap { flex: none; width: 125px; }

.issue-row {
  display: grid;
  grid-template-columns: 29px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: start;
  min-height: 79px;
  padding: 14px 23px;
  border-bottom: 1px solid var(--border);
}
.issue-row[aria-current='true'] { background: var(--accent-soft); }
.issue-row:focus-visible { outline-offset: -2px; }
.issue-row .issue-title { display: block; font-size: .875rem; letter-spacing: -.008em; font-weight: 700; overflow-wrap: anywhere; }
.priority-mark {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #edf0fa;
  color: var(--muted);
}
.priority-mark[data-priority='urgent'] { background: var(--red-soft); color: var(--red); }
.priority-mark[data-priority='high'] { background: var(--gold-soft); color: var(--gold); }
.priority-mark .icon { width: 16px; height: 16px; }
.issue-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 3px 7px; margin-top: 6px; font-size: .75rem; color: var(--muted); }
.issue-meta span { overflow-wrap: anywhere; }
.issue-meta .icon { width: 14px; height: 14px; }
.message-meter { display: inline-flex; align-items: center; gap: 3px; }
.issue-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.issue-side time { color: var(--muted); font-size: .75rem; white-space: nowrap; }
.chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 6px;
  padding: 2px 7px;
  color: var(--muted);
  background: #edf0fa;
  font-size: .75rem;
  line-height: 1.55;
  font-weight: 600;
  white-space: nowrap;
}
.chip[data-tone='new'], .chip[data-tone='pending'] { background: var(--blue-soft); color: var(--blue); }
.chip[data-tone='working'], .chip[data-tone='high'] { background: var(--gold-soft); color: var(--gold); }
.chip[data-tone='resolved'], .chip[data-tone='linked'] { background: var(--green-soft); color: var(--green); }
.chip[data-tone='urgent'], .chip[data-tone='failed'] { background: var(--red-soft); color: var(--red); }

.detail { min-width: 0; border-inline-start: 1px solid var(--border); }
.detail-content { padding: 23px 23px 12px; }
.back-to-list { display: none; }
.detail-ref { display: flex; gap: 6px 9px; align-items: center; flex-wrap: wrap; color: var(--muted); font-size: .8125rem; }
.issue-ref { font-weight: 700; color: var(--accent-strong); }
.detail-title { margin-top: 8px; line-height: 1.23; font-size: clamp(1.2rem, 1.8vw, 1.56rem); font-weight: 700; letter-spacing: -.025em; overflow-wrap: anywhere; }
.detail-meta { display: flex; align-items: center; justify-content: space-between; column-gap: 10px; row-gap: 6px; flex-wrap: wrap; margin-block: 10px 16px; }
.detail-meta > .select-wrap { flex: none; }
.detail-meta select { min-width: 121px; }
.summary {
  padding: 15px 16px 16px;
  border-radius: 11px;
  border: 1px solid var(--accent-line);
  background: #f7f5ff;
}
.summary h3 { display: flex; align-items: center; gap: 7px; font-size: .8125rem; color: var(--accent-strong); font-weight: 700; }
.summary h3 .icon { width: 17px; height: 17px; }
.summary p { max-width: 65ch; font-size: .875rem; line-height: 1.6; margin-top: 7px; overflow-wrap: anywhere; }
.detail-messages { margin-top: 22px; }
.detail-messages h3 { display: flex; gap: 8px; align-items: center; font-size: .9375rem; font-weight: 700; }
.timeline { margin-top: 5px; }
.timeline-row { display: grid; grid-template-columns: 29px minmax(0, 1fr); gap: 10px; padding-block: 12px; border-bottom: 1px solid var(--border); }
.timeline-row:last-child { border-bottom: 0; }
.avatar { display: grid; place-items: center; font-size: .6875rem; font-weight: 700; width: 29px; height: 29px; border-radius: 8px; background: #eef0fa; color: var(--ink); }
.timeline-meta { display: flex; gap: 5px 10px; justify-content: space-between; align-items: baseline; flex-wrap: wrap; color: var(--muted); font-size: .75rem; }
.timeline-meta strong { color: var(--ink); font-size: .8125rem; font-weight: 600; overflow-wrap: anywhere; }
.timeline p, .activity-row p { margin-top: 4px; color: var(--ink); font-size: .875rem; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }

.activity-row { padding: 14px 23px; border-bottom: 1px solid var(--border); }
.activity-meta, .activity-links { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; font-size: .8125rem; color: var(--muted); }
.activity-meta strong { color: var(--ink); font-weight: 700; overflow-wrap: anywhere; }
.activity-links { margin-top: 7px; }
.activity-links a { padding: 6px 0; color: var(--accent-strong); min-height: 34px; font-weight: 600; overflow-wrap: anywhere; }
.activity-links .icon { display: inline-block; width: 15px; height: 15px; vertical-align: text-bottom; }
.screen-message { color: var(--muted); font-size: .875rem; padding: 20px 23px; }
.detail .screen-message { padding-inline: 0; }
.empty-state { padding: 24px 23px; }
.empty-state .icon { color: var(--muted); display: block; margin-bottom: 9px; }
.empty-state h3 { font-size: .9375rem; margin-bottom: 5px; }
.empty-state p { color: var(--muted); font-size: .875rem; max-width: 45ch; }
.pagination { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 23px; color: var(--muted); font-size: .8125rem; }
.detail .pagination { padding-inline: 0; }

dialog { width: min(450px, calc(100% - 32px)); padding: 23px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); color: var(--ink); box-shadow: 0 18px 54px #23346129; }
dialog::backdrop { background: #172f5d4d; }
dialog h2 { font-size: 1.25rem; letter-spacing: -.021em; }
dialog label { display: block; margin-block: 17px 5px; font-size: .875rem; font-weight: 600; }
#alias { font-size: 1rem; }
.dialog-note { margin-top: 5px; color: var(--muted); font-size: .8125rem; overflow-wrap: anywhere; }
.form-error { color: var(--red); margin-top: 8px; font-size: .8125rem; }
.dialog-actions { display: flex; justify-content: end; gap: 8px; margin-top: 18px; }
.group-settings-button { margin-inline-start: auto; flex: 0 0 auto; white-space: nowrap; }
#group-settings-dialog { width: min(540px, calc(100% - 24px)); max-height: calc(100dvh - 28px); }
#settings-fields { min-width: 0; margin: 10px 0 0; padding: 0; border: 0; }
#settings-fields .setting-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 64px; margin: 0; padding: 11px 0; border-bottom: 1px solid var(--border);
}
.setting-row span { min-width: 0; }
.setting-row strong { display: block; }
.setting-row small, .member-option small, .optional { color: var(--muted); font-weight: 400; }
.setting-row small { display: block; margin-top: 4px; line-height: 1.4; }
#settings-fields input[type="checkbox"] { width: 1.1rem; height: 1.1rem; flex: 0 0 auto; padding: 0; accent-color: var(--accent); }
.settings-members { margin-top: 17px; }
.settings-members h3 { font-size: .9rem; }
.members-list:not(:empty) { max-height: 196px; overflow: auto; margin-top: 6px; }
#settings-fields .member-option {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  min-height: 44px; margin: 0; padding: 6px 4px; overflow-wrap: anywhere;
}
.member-option small { margin-left: auto; }
#reload-members { margin-top: 6px; }

@media (hover: hover) {
  .button:not(:disabled):hover, .group-link:not([aria-current]):hover, .issue-row:not([aria-current]):hover { background: var(--quiet-surface); }
  .button.primary:not(:disabled):hover { background: var(--accent-strong); border-color: var(--accent-strong); }
  .tabs a:hover, .activity-links a:hover { color: var(--accent-strong); text-decoration: underline; text-underline-offset: 3px; }
}

@media (max-width: 1120px) {
  .frame { width: calc(100% - 48px); }
  .workspace { grid-template-columns: minmax(0, 1fr) minmax(0, .98fr); }
  .workspace[data-tab='messages'] { grid-template-columns: minmax(0, 1fr); }
  .group-pane { grid-column: 1 / -1; border-radius: 16px 16px 0 0; padding: 10px 16px; border-bottom: 1px solid var(--border); }
  .group-heading, .groups, .group-pane .search-wrap { display: none; }
  .mobile-groups { display: grid; grid-template-columns: auto minmax(0, 290px); gap: 12px; align-items: center; }
  .inbox { border-inline-start: 0; }
}
@media (max-width: 800px) {
  .workspace { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .detail { display: none; border-inline-start: 0; }
  .workspace[data-tab='issues'][data-detail-open='true'] .inbox { display: none; }
  .workspace[data-tab='issues'][data-detail-open='true'] .detail { display: block; }
  .back-to-list { display: inline-flex; margin-bottom: 9px; }
  .page-head { padding-block: 26px 18px; }
}
@media (max-width: 520px) {
  .frame { width: calc(100% - 28px); }
  .bar-inner { min-height: 59px; }
  .brand-section { display: none; }
  .brand img { max-width: 102px; }
  .bar-actions { gap: 6px; }
  .bar-actions .button { padding-inline: 8px; }
  .bar-actions .button .icon { display: none; }
  .page-head { display: block; }
  .page-head p { font-size: .875rem; }
  .connection { margin-top: 12px; justify-items: start; text-align: left; }
  .group-pane { padding-inline: 12px; }
  .mobile-groups { grid-template-columns: auto minmax(0, 1fr); gap: 8px; }
  .inbox-header, .filters, .issue-row, .activity-row, .detail-content, .empty-state, .pagination { padding-inline: 12px; }
  .filter-wrap { width: 105px; }
  .filters, .issue-row { gap: 7px; }
  .issue-row { grid-template-columns: 25px minmax(0, 1fr) auto; }
  .priority-mark { width: 25px; height: 25px; }
  .search-wrap input, .select-wrap select, .button { min-height: 44px; }
  .search-wrap input { font-size: 1rem; }
  .scope-header h2 { font-size: 1.125rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0ms !important; }
}
