:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --line: #dbe4ef;
  --line-soft: #edf2f7;
  --text: #172033;
  --muted: #64748b;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --danger: #dc2626;
  --success: #15803d;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.app-body {
  min-height: 100vh;
}

.shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 18px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px 22px;
}

.brand-mark,
.auth-logo {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #ffffff;
  font-weight: 800;
  letter-spacing: -0.04em;
  border-radius: 13px;
  background: linear-gradient(135deg, #2563eb, #0f172a);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.28);
}

.brand-title {
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-subtitle,
.topbar-kicker,
.muted {
  color: var(--muted);
}

.brand-subtitle,
.topbar-kicker {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.nav {
  display: grid;
  gap: 6px;
  margin: 8px 0 24px;
}

.nav-link {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 10px 12px;
  color: #334155;
  border-radius: 12px;
  font-weight: 650;
}

.nav-link:hover {
  background: #eef4ff;
  color: var(--primary);
  text-decoration: none;
}

.sidebar-note {
  position: absolute;
  right: 18px;
  bottom: 20px;
  left: 18px;
  padding: 14px;
  color: var(--muted);
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: var(--surface-soft);
  font-size: 13px;
  line-height: 1.5;
}

.main {
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 32px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(244, 247, 251, 0.86);
  backdrop-filter: blur(16px);
}

.topbar h1 {
  margin: 3px 0 0;
  font-size: clamp(26px, 3vw, 36px);
  letter-spacing: -0.04em;
}

.topbar-actions,
.hero-actions,
.section-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-chip,
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: #334155;
  font-weight: 650;
  font-size: 13px;
}

.content {
  padding: 28px 32px 44px;
}

.hero-card,
.card,
.auth-card,
.public-card {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-card {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 24px;
  margin-bottom: 22px;
}

.hero-card h2,
.card h2,
.auth-card h1,
.public-card h1 {
  margin: 0 0 8px;
  letter-spacing: -0.035em;
}

.hero-card p,
.card p,
.auth-card p,
.public-card p {
  margin: 0;
  line-height: 1.6;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 14px;
  border: 1px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 750;
  transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}

.btn:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.58;
  transform: none;
}

.btn-primary {
  color: #ffffff;
  background: var(--primary);
  border-color: var(--primary);
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-secondary {
  color: #334155;
  background: #ffffff;
  border-color: var(--line);
}

.btn-danger {
  color: #ffffff;
  background: var(--danger);
  border-color: var(--danger);
}

.btn-small {
  min-height: 34px;
  padding: 6px 10px;
  font-size: 13px;
}

.btn-full {
  width: 100%;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.stat-card {
  padding: 18px;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.stat-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.stat-card strong {
  display: block;
  margin-top: 8px;
  font-size: 34px;
  line-height: 1;
  letter-spacing: -0.06em;
}

.two-column {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.two-column-wide-left {
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.8fr);
}

.card {
  padding: 22px;
}

.section-head {
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-head h2 {
  margin: 0;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.table th {
  color: var(--muted);
  text-align: left;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--surface-soft);
}

.table th,
.table td {
  padding: 12px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}

.table tr:last-child td {
  border-bottom: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 9px;
  color: #1e3a8a;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  font-size: 12px;
  font-weight: 750;
}

.badge-green {
  color: #166534;
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.badge-muted {
  color: #475569;
  border-color: #e2e8f0;
  background: #f8fafc;
}

.empty-state {
  padding: 28px;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 16px;
  background: var(--surface-soft);
  text-align: center;
}

.info-card {
  margin-top: 22px;
}

.auth-shell,
.public-body {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.12), transparent 34%),
    var(--bg);
}

.auth-card,
.public-card {
  width: min(100%, 460px);
  padding: 30px;
}

.auth-logo {
  margin-bottom: 18px;
}

.form-stack {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.compact-form {
  gap: 12px;
}

label {
  display: grid;
  gap: 7px;
  color: #334155;
  font-size: 14px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  background: #ffffff;
  font: inherit;
  font-weight: 500;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.13);
}

.alert {
  margin: 18px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  font-weight: 700;
}

.alert-error {
  color: #991b1b;
  border: 1px solid #fecaca;
  background: #fef2f2;
}

.placeholder-card {
  max-width: 760px;
}

.placeholder-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 18px;
  color: var(--primary);
  border-radius: 16px;
  background: #eff6ff;
  font-size: 24px;
  font-weight: 900;
}

.roadmap-box {
  margin: 18px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
}

.public-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.public-grid div {
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: var(--surface-soft);
}

.public-grid span,
.public-grid strong {
  display: block;
}

.public-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.public-grid strong {
  margin-top: 5px;
}

@media (max-width: 980px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .sidebar-note {
    position: static;
    margin-top: 16px;
  }

  .nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topbar,
  .hero-card,
  .topbar-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .content,
  .topbar {
    padding-right: 20px;
    padding-left: 20px;
  }

  .stats-grid,
  .two-column,
  .two-column-wide-left {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .nav {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .table {
    display: block;
    overflow-x: auto;
  }
}

/* alpha.2 - users and roles polish */
.nav-link.active {
  background: #eaf1ff;
  color: var(--primary);
  box-shadow: inset 3px 0 0 var(--primary);
}

.hero-card-compact {
  align-items: center;
}

.alert-page {
  margin: 0 0 18px;
}

.alert-success {
  color: #166534;
  border: 1px solid #bbf7d0;
  background: #f0fdf4;
}

.table-wrapper {
  width: 100%;
  overflow-x: auto;
}

.table-actions,
.page-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.page-actions {
  margin-bottom: 18px;
}

.inline-form {
  display: inline;
  margin: 0;
}

.tiny-muted {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.btn-danger-outline {
  color: var(--danger);
  border-color: #fecaca;
  background: #fff7f7;
}

.btn-danger-outline:hover {
  border-color: #fca5a5;
  background: #fef2f2;
}

.checkbox-row {
  display: flex;
  align-items: center;
  grid-template-columns: none;
  gap: 10px;
  color: #334155;
  font-weight: 750;
}

.checkbox-row input[type="checkbox"] {
  width: 18px;
  min-height: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.note-box {
  margin: 0 0 16px;
  padding: 12px 14px;
  color: #1e3a8a;
  border: 1px solid #bfdbfe;
  border-radius: 14px;
  background: #eff6ff;
  font-weight: 650;
  line-height: 1.5;
}

@media (max-width: 620px) {
  .table-actions,
  .page-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .table-actions .btn,
  .table-actions form,
  .page-actions .btn,
  .page-actions .pill,
  .page-actions .badge {
    width: 100%;
  }
}

/* alpha.3 - clients and buildings */
.two-column-even {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-card {
  padding: 22px;
}

.form-intro {
  margin-bottom: 16px !important;
}

textarea {
  width: 100%;
  resize: vertical;
  min-height: 88px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  color: var(--text);
  font: inherit;
  line-height: 1.45;
}

textarea:focus {
  border-color: var(--primary);
  outline: 3px solid rgba(37, 99, 235, 0.12);
}

.submit-bar {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 -8px 30px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(16px);
}

.section-spaced {
  margin-top: 22px;
  padding: 22px;
}

.building-grid {
  display: grid;
  gap: 16px;
}

.building-card {
  padding: 18px;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: var(--surface-soft);
}

.building-head {
  align-items: flex-start;
  margin-bottom: 14px;
}

.building-card h3 {
  margin: 0 0 4px;
  font-size: 18px;
  letter-spacing: -0.025em;
}

.form-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.building-toggle-form {
  display: block;
  margin-top: 10px;
}

@media (max-width: 980px) {
  .two-column-even,
  .form-grid-3 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .submit-bar {
    position: static;
    align-items: stretch;
    flex-direction: column;
  }

  .submit-bar .btn {
    width: 100%;
  }

  .building-card {
    padding: 14px;
  }
}


/* alpha.4 - problem types */
.problem-type-create {
  margin-bottom: 22px;
}

.table-form {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}

.table-form input[type="text"] {
  min-width: 220px;
}

.table-form .checkbox-row {
  white-space: nowrap;
}

.status-dot {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-weight: 750;
  font-size: 13px;
}

.status-dot::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #94a3b8;
}

.status-dot.active::before {
  background: var(--success);
}

.danger-note {
  margin-top: 8px;
  color: var(--danger);
  font-size: 12px;
  font-weight: 700;
}

@media (max-width: 780px) {
  .table-form {
    align-items: stretch;
    flex-direction: column;
  }

  .table-form input[type="text"] {
    min-width: 0;
  }
}

/* alpha.5 - main tickets */
.ticket-filter-card {
  margin-bottom: 22px;
  padding: 18px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.04);
}

.filter-form {
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(180px, 260px) auto;
  align-items: end;
  gap: 12px;
}

.filter-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.severity-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 9px;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 12px;
  font-weight: 800;
}

.ticket-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.ticket-state-stack {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  gap: 8px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.detail-grid div,
.timeline-meta div {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: var(--surface-soft);
}

.detail-grid span,
.timeline-meta span,
.public-description span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.detail-grid strong,
.timeline-meta strong {
  display: block;
  margin-top: 5px;
  overflow-wrap: anywhere;
}

.small-detail-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 0;
}

.description-box {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: #ffffff;
}

.description-box h3 {
  margin: 0 0 8px;
  letter-spacing: -0.025em;
}

.description-box p {
  white-space: pre-wrap;
}

.soft-box {
  background: var(--surface-soft);
}

.copy-input {
  margin-top: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
}

.mono-text {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
}

.timeline-meta {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.section-spaced-grid {
  margin-top: 22px;
}

.comment-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.comment-item {
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: var(--surface-soft);
}

.comment-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.comment-head strong {
  color: var(--text);
}

.comment-item p {
  margin-top: 8px;
  white-space: pre-wrap;
}

.timeline {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 12px;
}

.timeline-dot {
  width: 12px;
  height: 12px;
  margin-top: 4px;
  border: 3px solid #bfdbfe;
  border-radius: 999px;
  background: var(--primary);
}

.timeline-item p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.small-empty {
  margin-top: 14px;
  padding: 18px;
}

.public-card-wide {
  width: min(100%, 720px);
}

.public-description {
  margin: 18px 0;
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: var(--surface-soft);
}

.public-description p {
  margin-top: 8px;
  white-space: pre-wrap;
}

.public-note-box {
  margin: 16px 0;
}

@media (max-width: 980px) {
  .filter-form,
  .detail-grid,
  .small-detail-grid {
    grid-template-columns: 1fr;
  }

  .ticket-title-row {
    flex-direction: column;
  }

  .ticket-state-stack {
    align-items: flex-start;
    flex-direction: row;
  }
}

@media (max-width: 620px) {
  .filter-actions,
  .ticket-state-stack,
  .comment-head {
    align-items: stretch;
    flex-direction: column;
  }
}

/* alpha.6 - internal tickets */
.checkbox-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: var(--surface-soft);
}

.checkbox-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.checkbox-panel-head span {
  color: var(--muted);
  font-size: 13px;
}

.checkbox-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.role-checkbox-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.check-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
}

.check-card input {
  width: auto;
  margin-top: 3px;
}

.check-card span {
  display: grid;
  gap: 3px;
}

.check-card small {
  color: var(--muted);
  font-size: 12px;
}

.assignee-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.assignee-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 13px;
  font-weight: 700;
}

.assignee-chip small {
  color: #475569;
  font-weight: 600;
}

.assignee-chip-role {
  border-color: #ddd6fe;
  background: #f5f3ff;
  color: #5b21b6;
}

@media (max-width: 980px) {
  .checkbox-grid,
  .role-checkbox-grid {
    grid-template-columns: 1fr;
  }

  .checkbox-panel-head {
    flex-direction: column;
  }
}

/* alpha.7 - public ticket acceptance */
.public-ticket-card {
  position: relative;
}

.public-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.public-header h1 {
  margin-bottom: 0;
}

.public-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 18px;
}

.public-status-badge {
  min-height: 30px;
}

.public-alert {
  margin: 14px 0;
}

.public-contact-box {
  margin: 18px 0;
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: #ffffff;
}

.public-contact-box h2 {
  margin: 0 0 6px;
  font-size: 18px;
  letter-spacing: -0.025em;
}

.public-contact-box p {
  color: var(--muted);
}

.public-contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.public-contact-grid div {
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: var(--surface-soft);
}

.public-contact-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.public-contact-grid strong {
  display: block;
  margin-top: 5px;
  overflow-wrap: anywhere;
}

.public-confirm-form {
  margin-top: 16px;
}

.public-form-note {
  margin-top: 10px !important;
  font-size: 13px;
  text-align: center;
}

.public-confirmed-box {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

@media (max-width: 620px) {
  .public-header {
    align-items: flex-start;
  }

  .public-contact-grid {
    grid-template-columns: 1fr;
  }
}

/* alpha.8 - cleaner comments and unified activity timeline */
.section-head-wrap {
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 18px;
}

.section-head-wrap h2 {
  margin-bottom: 6px;
}

.sticky-actions-card {
  align-self: start;
}

.timeline-meta-clean {
  margin-top: 20px;
}

.activity-card,
.comment-panel-card {
  min-width: 0;
}

.activity-list {
  position: relative;
  display: grid;
  gap: 14px;
}

.activity-list::before {
  content: "";
  position: absolute;
  top: 14px;
  bottom: 14px;
  left: 13px;
  width: 2px;
  background: var(--line-soft);
}

.activity-item {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 12px;
}

.activity-marker {
  position: relative;
  z-index: 1;
  width: 28px;
  height: 28px;
  margin-top: 4px;
  border: 4px solid #ffffff;
  border-radius: 999px;
  background: #94a3b8;
  box-shadow: 0 0 0 1px var(--line);
}

.activity-comment .activity-marker {
  background: #2563eb;
}

.activity-status .activity-marker {
  background: #f59e0b;
}

.activity-public .activity-marker {
  background: #16a34a;
}

.activity-assignment .activity-marker {
  background: #7c3aed;
}

.activity-created .activity-marker {
  background: #0f172a;
}

.activity-body {
  min-width: 0;
  padding: 14px 15px;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: var(--surface-soft);
}

.activity-comment .activity-body {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.activity-status .activity-body {
  border-color: #fed7aa;
  background: #fff7ed;
}

.activity-public .activity-body {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.activity-assignment .activity-body {
  border-color: #ddd6fe;
  background: #f5f3ff;
}

.activity-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.activity-chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.01em;
}

.activity-chip-comment {
  background: #dbeafe;
  color: #1e40af;
}

.activity-chip-status {
  background: #ffedd5;
  color: #9a3412;
}

.activity-chip-public {
  background: #dcfce7;
  color: #166534;
}

.activity-chip-assignment {
  background: #ede9fe;
  color: #5b21b6;
}

.activity-chip-created {
  background: #e2e8f0;
  color: #0f172a;
}

.activity-time,
.activity-actor {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.activity-message {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.55;
  font-weight: 750;
}

.activity-comment .activity-message {
  font-weight: 600;
}

.activity-actor {
  margin-top: 8px;
}

.comment-panel-note {
  margin-bottom: 14px !important;
}

.comment-form-panel {
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: var(--surface-soft);
}

.comment-list-compact {
  margin-top: 16px;
}

.comment-item-clean {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.comment-item-clean p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

@media (max-width: 980px) {
  .section-head-wrap,
  .activity-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .activity-list::before {
    left: 13px;
  }
}

@media (max-width: 620px) {
  .activity-item {
    gap: 8px;
  }

  .activity-body {
    padding: 12px;
  }
}

/* alpha.9 - ticket email preview and logs */
.activity-email .activity-marker {
  background: #2563eb;
}

.activity-email .activity-body {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.activity-chip-email {
  background: #dbeafe;
  color: #1d4ed8;
}

.inline-action-row {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn-small {
  min-height: 34px;
  padding: 8px 12px;
  font-size: 13px;
}

.pill-green {
  background: #dcfce7;
  color: #166534;
  border-color: #bbf7d0;
}

.pill-muted {
  background: #f1f5f9;
  color: #64748b;
  border-color: #e2e8f0;
}

.email-log-panel {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
}

.email-log-list {
  display: grid;
  gap: 10px;
}

.email-log-item {
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: var(--surface-soft);
}

.email-log-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.email-log-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.email-log-subject {
  margin-top: 5px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.email-log-error {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #fef2f2;
  color: #991b1b;
  font-size: 13px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.email-preview-form textarea {
  min-height: 420px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  line-height: 1.45;
}

.split-actions {
  justify-content: space-between;
  gap: 12px;
}

.email-info-list {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.email-info-list div {
  display: grid;
  gap: 4px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
}

.email-info-list span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.email-info-list strong {
  overflow-wrap: anywhere;
}

@media (max-width: 620px) {
  .split-actions {
    flex-direction: column;
    align-items: stretch;
  }
}

/* alpha.10 - internal ticket notifications */
.recipient-list-textarea {
  min-height: 120px !important;
}

.recipient-preview-list {
  display: grid;
  gap: 8px;
  margin: 10px 0 16px;
}

.recipient-preview-list div {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: var(--surface-soft);
}

.recipient-preview-list span,
.recipient-preview-list small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.internal-email-log-list {
  margin-top: 12px;
}

/* alpha.11 - Excel exports */
.export-grid {
  align-items: stretch;
}

.export-card {
  display: flex;
  flex-direction: column;
}

.export-form {
  flex: 1;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.export-actions {
  margin-top: auto;
}

.export-note-card {
  margin-top: 22px;
}

.export-help {
  margin-top: 14px !important;
}

@media (max-width: 980px) {
  .form-grid-2 {
    grid-template-columns: 1fr;
  }
}

/* alpha.12 - UX stabilization, status colors and responsive polish */
.topbar-actions .btn-topbar {
  white-space: nowrap;
}

.nav-link span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-card-dashboard {
  align-items: center;
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.10), transparent 34%),
    var(--surface);
}

.stats-grid-alpha12 .stat-card {
  position: relative;
  overflow: hidden;
}

.stats-grid-alpha12 .stat-card::after {
  content: "";
  position: absolute;
  inset: auto 16px 16px auto;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
}

.stat-card small {
  display: block;
  margin-top: 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.stat-card-primary {
  border-color: #bfdbfe;
}

.stat-card-danger {
  border-color: #fecaca;
}

.stat-card-danger::after {
  background: rgba(220, 38, 38, 0.08) !important;
}

.compact-card {
  padding: 18px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.04);
}

.status-overview-grid {
  margin-bottom: 0;
}

.status-count-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.status-count-card {
  display: grid;
  gap: 10px;
  min-height: 82px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: var(--surface-soft);
  color: var(--text);
}

.status-count-card:hover {
  border-color: #bfdbfe;
  background: #f8fbff;
  text-decoration: none;
}

.status-count-card strong {
  font-size: 28px;
  line-height: 1;
  letter-spacing: -0.05em;
}

.table-compact th,
.table-compact td {
  padding-top: 10px;
  padding-bottom: 10px;
}

.empty-state-action {
  display: grid;
  justify-items: center;
  gap: 12px;
}

.empty-state-action strong {
  color: var(--text);
}

.badge.status-new,
.badge.status-assigned {
  color: #1e3a8a;
  border-color: #bfdbfe;
  background: #eff6ff;
}

.badge.status-accepted {
  color: #166534;
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.badge.status-progress {
  color: #92400e;
  border-color: #fde68a;
  background: #fffbeb;
}

.badge.status-resolved {
  color: #065f46;
  border-color: #a7f3d0;
  background: #ecfdf5;
}

.badge.status-returned {
  color: #991b1b;
  border-color: #fecaca;
  background: #fef2f2;
}

.badge.status-closed {
  color: #475569;
  border-color: #e2e8f0;
  background: #f8fafc;
}

.severity-pill.severity-critical,
.severity-pill.priority-critical {
  color: #991b1b;
  border-color: #fecaca;
  background: #fef2f2;
}

.severity-pill.severity-major,
.severity-pill.priority-high {
  color: #9a3412;
  border-color: #fed7aa;
  background: #fff7ed;
}

.severity-pill.severity-info,
.severity-pill.priority-normal {
  color: #1e3a8a;
  border-color: #bfdbfe;
  background: #eff6ff;
}

.severity-pill.priority-low {
  color: #475569;
  border-color: #e2e8f0;
  background: #f8fafc;
}

.card h3 {
  letter-spacing: -0.025em;
}

.table td {
  overflow-wrap: anywhere;
}

.detail-grid strong,
.email-log-subject,
.activity-message {
  overflow-wrap: anywhere;
}

@media (max-width: 1180px) {
  .topbar-actions .btn-topbar {
    display: none;
  }

  .status-count-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .status-count-grid {
    grid-template-columns: 1fr;
  }

  .status-count-card {
    min-height: 74px;
  }

  .topbar-actions {
    width: 100%;
  }

  .topbar-actions .user-chip,
  .topbar-actions form {
    width: 100%;
  }

  .topbar-actions form .btn {
    width: 100%;
  }
}

/* alpha.12c - dashboard card wording and table nowrap cleanup */
.stat-card-success {
  border-color: #bbf7d0;
}

.stat-card-success::after {
  background: rgba(22, 163, 74, 0.08) !important;
}

.dashboard-kpi-grid .stat-card span {
  min-height: 34px;
  line-height: 1.25;
}

.dashboard-kpi-grid .stat-card small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.dashboard-table-wrapper {
  overflow-x: auto;
}

.dashboard-table {
  min-width: 640px;
  table-layout: auto;
}

.dashboard-table th,
.dashboard-table td {
  overflow-wrap: normal;
  word-break: normal;
}

.dashboard-table .col-number {
  width: 104px;
  min-width: 104px;
}

.dashboard-table .col-status {
  width: 112px;
  min-width: 112px;
}

.dashboard-table .col-priority {
  width: 116px;
  min-width: 116px;
}

.dashboard-table .nowrap-cell,
.dashboard-table .col-number,
.dashboard-table .col-status,
.dashboard-table .col-priority {
  white-space: nowrap;
}

.badge.nowrap-badge,
.severity-pill.nowrap-badge,
.dashboard-table .badge,
.dashboard-table .severity-pill {
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: keep-all;
  flex-shrink: 0;
}

.dashboard-table .text-cell,
.dashboard-table .muted-description {
  overflow-wrap: anywhere;
  word-break: normal;
}

.dashboard-table .muted-description {
  color: var(--text);
}

@media (max-width: 1320px) {
  .dashboard-table {
    min-width: 700px;
  }
}

/* alpha.12d - remove decorative KPI circles from dashboard cards */
.dashboard-kpi-grid .stat-card::after,
.stats-grid-alpha12.dashboard-kpi-grid .stat-card::after,
.stats-grid-alpha12.dashboard-kpi-grid .stat-card-success::after,
.stats-grid-alpha12.dashboard-kpi-grid .stat-card-danger::after {
  content: none !important;
  display: none !important;
}

.dashboard-kpi-grid .stat-card {
  overflow: visible;
}

.dashboard-kpi-grid .stat-card small {
  padding-right: 0;
}

/* alpha.12e - global nowrap for framed labels and compact table actions */
.badge,
.severity-pill,
.pill,
.user-chip,
.status-dot,
.assignee-chip,
.activity-chip,
.public-status-badge,
.btn,
.btn-small {
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: keep-all;
  hyphens: none;
}

.table .badge,
.table .severity-pill,
.table .pill,
.table .status-dot,
.table .btn,
.table .btn-small {
  white-space: nowrap !important;
  overflow-wrap: normal !important;
  word-break: keep-all !important;
  min-width: max-content;
}

.table td.col-status,
.table td.col-priority,
.table td.col-actions,
.table td.table-actions-cell,
.table td:has(.badge),
.table td:has(.severity-pill),
.table td:has(.btn-small) {
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: keep-all;
}

.table th,
.table td {
  word-break: normal;
}

.table-wrapper {
  overflow-x: auto;
}

.table-wrapper .table {
  width: 100%;
}

.internal-ticket-table,
.ticket-table,
.users-table,
.clients-table,
.problem-types-table {
  min-width: 920px;
}

.table .btn-small {
  min-width: max-content;
  flex-shrink: 0;
}

.table-actions,
.inline-action-row,
.page-actions,
.filter-actions {
  flex-wrap: wrap;
}

@media (max-width: 980px) {
  .table-wrapper .table {
    min-width: 820px;
  }
}

/* alpha.12g - date filters for request dashboards */
.filter-form.filter-form-wide {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.dashboard-date-filter {
  grid-template-columns: minmax(150px, 1fr) minmax(150px, 1fr) auto;
  margin: 10px 0 16px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: #f8fafc;
}

.dashboard-date-filter label {
  font-size: 12px;
}

.dashboard-date-filter input[type="date"] {
  min-height: 38px;
  padding: 8px 10px;
}

.nowrap-cell {
  white-space: nowrap;
}

@media (max-width: 720px) {
  .dashboard-date-filter {
    grid-template-columns: 1fr;
  }
}

/* alpha.12h - eskalace hlavních požadavků */
.activity-escalation .activity-marker {
  background: #dc2626;
}

.activity-escalation .activity-body {
  border-color: #fecaca;
  background: #fef2f2;
}

.activity-chip-escalation {
  background: #fee2e2;
  color: #991b1b;
}

.escalation-panel {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
}

.escalation-form {
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: var(--surface-soft);
}

.escalation-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.escalation-item {
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: var(--surface-soft);
}

.escalation-item.escalation-active {
  border-color: #fed7aa;
  background: #fff7ed;
}

.escalation-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.escalation-contact {
  display: grid;
  gap: 4px;
  margin-bottom: 8px;
  font-size: 13px;
}

.escalation-contact span,
.escalation-meta {
  overflow-wrap: anywhere;
}

.escalation-item p {
  margin: 8px 0 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* alpha.12j - compact client escalation e-mails */
.form-subsection.escalation-email-only {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  background: #f8fafc;
  display: grid;
  gap: 12px;
}
.escalation-email-only h3 {
  margin: 0;
}
.escalation-email-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.escalation-prefill-note {
  margin: -2px 0 2px;
}
@media (max-width: 1100px) {
  .escalation-email-grid {
    grid-template-columns: 1fr;
  }
}


.public-workflow-box {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #f8fafc;
}

.public-workflow-box h2 {
  margin: 0 0 12px;
  font-size: 18px;
}


.status-review {
  background: #fff7ed;
  color: #9a3412;
  border-color: #fed7aa;
}

.stat-card-warning {
  border-color: #fed7aa;
}

.review-list-card {
  margin-top: 18px;
}

.review-alert-card {
  border-color: #fed7aa;
  background: linear-gradient(135deg, #fff7ed 0%, #ffffff 72%);
  margin-bottom: 18px;
}

.review-alert-card h2 {
  margin-bottom: 6px;
}

.review-action-box {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid #fed7aa;
  border-radius: 18px;
  background: #fff7ed;
}

.review-action-box h3 {
  margin: 0 0 6px;
}

.review-action-box form + form {
  margin-top: 14px;
}

.quick-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

/* alpha.12p - hover sidebar */
@media (min-width: 981px) {
  .shell {
    grid-template-columns: 78px minmax(0, 1fr);
    transition: grid-template-columns 0.22s ease;
  }

  .shell:has(.sidebar:hover),
  .shell:has(.sidebar:focus-within) {
    grid-template-columns: 280px minmax(0, 1fr);
  }

  .sidebar {
    z-index: 50;
    width: 100%;
    overflow: hidden;
    transition: box-shadow 0.22s ease;
  }

  .sidebar:hover,
  .sidebar:focus-within {
    box-shadow: 18px 0 45px rgba(15, 23, 42, 0.08);
  }

  .brand {
    min-width: 244px;
    white-space: nowrap;
  }

  .brand-mark {
    flex: 0 0 42px;
  }

  .brand > div:nth-child(2),
  .nav-link span,
  .sidebar-note {
    transition: opacity 0.16s ease, transform 0.16s ease;
  }

  .nav-link {
    gap: 10px;
    width: 244px;
    white-space: nowrap;
  }

  .nav-link::before {
    content: "";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    color: #475569;
    border-radius: 10px;
    background: #f1f5f9;
    font-size: 13px;
    font-weight: 850;
    letter-spacing: -0.02em;
  }

  .nav-link[href="/dashboard"]::before { content: "D"; }
  .nav-link[href="/exports"]::before { content: "E"; }
  .nav-link[href="/tickets"]::before { content: "P"; }
  .nav-link[href="/internal-tickets"]::before { content: "I"; }
  .nav-link[href="/clients"]::before { content: "K"; }
  .nav-link[href="/problem-types"]::before { content: "T"; }
  .nav-link[href="/users"]::before { content: "U"; }

  .nav-link.active::before,
  .nav-link:hover::before {
    color: var(--primary);
    background: #dbeafe;
  }

  .sidebar:not(:hover):not(:focus-within) .brand > div:nth-child(2),
  .sidebar:not(:hover):not(:focus-within) .nav-link span,
  .sidebar:not(:hover):not(:focus-within) .sidebar-note {
    opacity: 0;
    pointer-events: none;
  }

  .sidebar:not(:hover):not(:focus-within) .brand {
    min-width: 42px;
    padding-left: 0;
    padding-right: 0;
  }

  .sidebar:not(:hover):not(:focus-within) .nav-link {
    width: 42px;
    min-width: 42px;
    padding: 4px;
  }

  .sidebar:not(:hover):not(:focus-within) .nav-link span {
    transform: translateX(-6px);
  }

  .sidebar:not(:hover):not(:focus-within) .sidebar-note {
    transform: translateY(8px);
  }
}

/* alpha.12q - smooth hover sidebar */
@media (min-width: 981px) {
  .shell {
    transition: grid-template-columns 0.38s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: grid-template-columns;
  }

  .sidebar {
    transition:
      box-shadow 0.38s cubic-bezier(0.22, 1, 0.36, 1),
      background-color 0.28s ease,
      border-color 0.28s ease;
    will-change: box-shadow;
  }

  .brand,
  .nav-link {
    transition:
      width 0.38s cubic-bezier(0.22, 1, 0.36, 1),
      min-width 0.38s cubic-bezier(0.22, 1, 0.36, 1),
      padding 0.38s cubic-bezier(0.22, 1, 0.36, 1),
      gap 0.30s ease,
      background-color 0.22s ease,
      color 0.22s ease;
  }

  .brand > div:nth-child(2),
  .nav-link span,
  .sidebar-note {
    transition:
      opacity 0.24s ease,
      transform 0.32s cubic-bezier(0.22, 1, 0.36, 1),
      max-width 0.38s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
  }

  .sidebar:hover .brand > div:nth-child(2),
  .sidebar:focus-within .brand > div:nth-child(2),
  .sidebar:hover .nav-link span,
  .sidebar:focus-within .nav-link span,
  .sidebar:hover .sidebar-note,
  .sidebar:focus-within .sidebar-note {
    transition-delay: 0.07s;
    transform: translateX(0) translateY(0);
  }

  .sidebar:not(:hover):not(:focus-within) .brand > div:nth-child(2),
  .sidebar:not(:hover):not(:focus-within) .nav-link span,
  .sidebar:not(:hover):not(:focus-within) .sidebar-note {
    max-width: 0;
    transition-delay: 0s;
  }

  .nav-link::before {
    transition:
      background-color 0.22s ease,
      color 0.22s ease,
      transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .sidebar:hover .nav-link::before,
  .sidebar:focus-within .nav-link::before {
    transform: scale(1);
  }

  .sidebar:not(:hover):not(:focus-within) .nav-link::before {
    transform: scale(0.96);
  }
}

/* alpha.13 - email SMTP setup */
.email-settings-grid {
  align-items: start;
}
.compact-table th {
  width: 210px;
  color: #64748b;
  font-weight: 800;
}
.muted-block {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: #f8fafc;
  color: #64748b;
  line-height: 1.55;
}
.code-block {
  margin: 14px 0;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--line-soft);
  background: #0f172a;
  color: #e2e8f0;
  overflow-x: auto;
  white-space: pre-wrap;
}
.pill-green {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}
.pill-muted {
  border-color: var(--line-soft);
  background: #f8fafc;
  color: #64748b;
}



/* alpha.13 client importer */
.import-card input[type="file"] {
  padding: 10px;
  border: 1px dashed #cbd5e1;
  background: #f8fafc;
}
.import-summary-grid {
  margin: 14px 0;
}
.compact-list {
  margin: 8px 0 0;
  padding-left: 20px;
}
.compact-table td,
.compact-table th {
  white-space: normal;
}


/* alpha.13b client card sections */
.client-profile-hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  margin-bottom: 18px;
}
.client-profile-main {
  display: flex;
  gap: 18px;
  align-items: center;
  min-width: 0;
}
.client-avatar-lg {
  width: 64px;
  height: 64px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-weight: 900;
  letter-spacing: .04em;
  background: linear-gradient(135deg, #1d4ed8, #0f172a);
  box-shadow: 0 16px 35px rgba(37, 99, 235, .18);
  flex: 0 0 auto;
}
.client-profile-hero h2 {
  margin: 3px 0 6px;
  font-size: clamp(24px, 3vw, 34px);
}
.client-profile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.client-profile-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 13px;
  font-weight: 800;
}
.client-profile-address {
  margin: 8px 0 0;
}
.client-profile-side {
  display: flex;
  gap: 10px;
  flex: 0 0 auto;
}
.client-mini-stat {
  min-width: 112px;
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  background: #f8fafc;
}
.client-mini-stat strong {
  display: block;
  font-size: 24px;
  line-height: 1;
  color: #0f172a;
}
.client-mini-stat span {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 800;
  color: #64748b;
}
.client-layout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  gap: 18px;
  align-items: start;
}
.client-main-column,
.client-side-column {
  display: grid;
  gap: 18px;
}
.client-side-column {
  position: sticky;
  top: 18px;
}
.client-section-card,
.client-side-card {
  overflow: hidden;
}
.form-panel {
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 16px;
  background: #ffffff;
}
.form-panel h3,
.client-side-card h2,
.client-section-card h2 {
  margin-top: 0;
}
.submit-bar-inner {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
.building-grid-polished {
  gap: 16px;
}
.building-card-polished {
  border-color: #e2e8f0;
  background: #ffffff;
}
.client-new-layout {
  margin-bottom: 0;
}
@media (max-width: 1100px) {
  .client-layout-grid {
    grid-template-columns: 1fr;
  }
  .client-side-column {
    position: static;
  }
  .client-profile-hero {
    align-items: flex-start;
    flex-direction: column;
  }
  .client-profile-side {
    width: 100%;
  }
  .client-mini-stat {
    flex: 1;
  }
}
@media (max-width: 680px) {
  .client-profile-main {
    align-items: flex-start;
  }
  .client-profile-side,
  .client-profile-meta {
    flex-direction: column;
  }
  .client-mini-stat {
    width: 100%;
  }
}

/* alpha.13c - email google workspace */
.email-settings-grid { align-items: start; }
.compact-table th { width: 210px; color: #64748b; font-weight: 800; }
.muted-block { margin-top: 16px; padding: 14px; border: 1px solid var(--line-soft); border-radius: 14px; background: #f8fafc; color: #64748b; line-height: 1.55; }
.code-block { margin: 14px 0; padding: 14px; border-radius: 14px; border: 1px solid var(--line-soft); background: #0f172a; color: #e2e8f0; overflow-x: auto; white-space: pre-wrap; }
.pill-green { border-color: #bbf7d0; background: #f0fdf4; color: #166534; }
.pill-muted { border-color: var(--line-soft); background: #f8fafc; color: #64748b; }
.email-preview-form textarea { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; line-height: 1.55; }
.email-info-list { display: grid; gap: 12px; margin-top: 12px; }
.email-info-list div { display: grid; gap: 4px; padding-bottom: 10px; border-bottom: 1px solid var(--line-soft); }
.email-info-list span { color: #64748b; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.email-info-list strong { color: #0f172a; overflow-wrap: anywhere; }
.mono-text { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 12px; }
.email-log-panel { margin-top: 18px; }
.email-log-list { display: grid; gap: 10px; margin-top: 12px; }
.email-log-item { padding: 12px; border: 1px solid var(--line-soft); border-radius: 14px; background: #f8fafc; }
.email-log-head { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.email-log-subject { margin-top: 6px; font-weight: 800; }
.email-log-error { margin-top: 6px; color: #b91c1c; font-size: 13px; }
.small-empty { padding: 12px; }

