* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #f0f2f5;
  --surface: #ffffff;
  --primary: #fc5858;
  --primary-hover: #e04444;
  --primary-light: #fef2f2;
  --text: #1e293b;
  --text-secondary: #64748b;
  --border: #e2e8f0;
  --success: #10b981;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 25px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
  --radius: 12px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* Header */
.header {
  background: linear-gradient(135deg, var(--primary) 0%, #e04444 100%);
  color: white;
  padding: 2rem 0;
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-icon {
  width: 42px;
  height: 42px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.25rem;
}

.logo h1 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.subtitle {
  font-size: 0.9rem;
  opacity: 0.85;
}

/* Main */
.main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem;
}

/* Toolbar */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.search-box {
  position: relative;
  flex: 1;
  max-width: 400px;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  pointer-events: none;
}

.search-box input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
  box-shadow: var(--shadow-sm);
}

.search-box input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(252, 88, 88, 0.15);
}

.client-count {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Client Filters row */
.client-filters {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  align-items: flex-start;
}

/* Tag Filters */
.tag-filters {
  display: flex;
  gap: 0.4rem;
}

.tag-filters:empty {
  display: none;
}

.tag-filter-chip {
  padding: 0.3rem 0.7rem;
  border-radius: 20px;
  border: 1.5px solid var(--tag-bg);
  background: var(--surface);
  color: var(--tag-text);
  font-size: 0.775rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
}

.tag-filter-chip:hover {
  background: var(--tag-bg);
}

.tag-filter-chip.active {
  background: var(--tag-bg);
  border-color: var(--tag-text);
  font-weight: 600;
}

.tag-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.08);
  font-size: 0.65rem;
  font-weight: 700;
  margin-left: 4px;
  line-height: 1;
}

/* Grid */
.clients-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1rem;
}

/* Card */
.client-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.15s;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  animation: fadeIn 0.3s ease forwards;
  opacity: 0;
  cursor: pointer;
}

.client-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--primary);
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

.card-top {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.client-avatar {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  color: white;
  flex-shrink: 0;
}

.client-info {
  flex: 1;
  min-width: 0;
}

.client-name {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.client-org {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  background: var(--bg);
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  font-weight: 500;
  font-family: 'SF Mono', 'Fira Code', monospace;
}

/* Card tags */
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.card-tag {
  font-size: 0.7rem;
  font-weight: 500;
  padding: 0.15rem 0.5rem;
  border-radius: 20px;
  white-space: nowrap;
}

/* Churn badge */
.churn-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  flex-shrink: 0;
}

.churn-badge.low {
  background: #dcfce7;
  color: #166534;
}

.churn-badge.mid {
  background: #fef3c7;
  color: #92400e;
}

.churn-badge.high {
  background: #fee2e2;
  color: #991b1b;
}

.churn-badge.none {
  background: var(--bg);
  color: var(--text-secondary);
}

.churn-value {
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
}

.churn-label {
  font-size: 0.5rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.7;
  line-height: 1;
  margin-top: 1px;
}

/* Churn filter dropdown options */
.churn-filter {
  display: flex;
  gap: 0.4rem;
}

.tf-option input[type="radio"] {
  accent-color: var(--primary);
  width: 14px;
  height: 14px;
  cursor: pointer;
  flex-shrink: 0;
}

.churn-opt-low {
  background: #dcfce7 !important;
  color: #166534 !important;
}

.churn-opt-mid {
  background: #fef3c7 !important;
  color: #92400e !important;
}

.churn-opt-high {
  background: #fee2e2 !important;
  color: #991b1b !important;
}

.link-zendesk {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}

.link-zendesk:hover {
  background: var(--bg);
  color: var(--primary);
}

/* Status badge */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.15rem 0.5rem;
  border-radius: 20px;
}

.status-badge.active {
  background: #ecfdf5;
  color: #059669;
}

.status-badge.inactive {
  background: #fef2f2;
  color: #dc2626;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* Modal - Fullscreen */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--surface);
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  transform: translateY(20px);
  transition: transform 0.25s ease;
}

.modal-overlay.active .modal {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.modal-header h2 {
  font-size: 1.1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.churn-badge.modal-churn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  flex-shrink: 0;
}

.modal-close {
  width: 36px;
  height: 36px;
  border: none;
  background: var(--bg);
  border-radius: 8px;
  font-size: 1.35rem;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.modal-close:hover {
  background: var(--border);
}

/* Progress bar */
.progress-bar-container {
  height: 3px;
  background: var(--border);
  flex-shrink: 0;
  overflow: hidden;
}

.progress-bar-container.hidden {
  display: none !important;
}

.progress-bar {
  height: 100%;
  background: var(--primary);
  width: 0%;
  transition: width 0.3s ease;
}

.progress-bar.done {
  transition: width 0.3s ease;
}

.modal-body {
  flex: 1;
  display: flex;
  overflow: hidden;
}

/* Modal two-column layout */
.modal-columns {
  display: flex;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.modal-col-tickets {
  width: 420px;
  min-width: 320px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg);
}

.modal-col-summary {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Ticket count badge */
.ticket-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 20px;
  background: var(--primary);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  vertical-align: middle;
  margin-left: 4px;
}

.ticket-count-badge:empty {
  display: none;
}

/* Tickets toolbar */
.tickets-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem 0.5rem;
  gap: 0.75rem;
  flex-shrink: 0;
}

.tickets-search-box {
  position: relative;
  flex: 1;
  max-width: 220px;
}

.tickets-search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  pointer-events: none;
}

.tickets-search-input {
  width: 100%;
  padding: 0.45rem 0.7rem 0.45rem 2rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.8rem;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.tickets-search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(252, 88, 88, 0.12);
}

/* Ticket tag filter selectors */
.ticket-tag-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0 1rem 0.6rem;
  flex-shrink: 0;
}

.ticket-tag-filters:empty {
  display: none;
}

.tf-select {
  position: relative;
}

.tf-select-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  font-size: 0.75rem;
  font-weight: 500;
  font-family: inherit;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}

.tf-select-btn:hover {
  border-color: var(--primary);
}

.tf-select-btn.has-selection {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}

.tf-select-label {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tf-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 220px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  z-index: 50;
  overflow: hidden;
}

.tf-dropdown.open {
  display: block;
}

.tf-dropdown-search {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: none;
  border-bottom: 1px solid var(--border);
  font-size: 0.8rem;
  font-family: inherit;
  background: var(--bg);
  color: var(--text);
  outline: none;
}

.tf-dropdown-options {
  max-height: 180px;
  overflow-y: auto;
  padding: 0.3rem 0;
}

.tf-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.75rem;
  cursor: pointer;
  font-size: 0.8rem;
  transition: background 0.1s;
}

.tf-option:hover {
  background: var(--bg);
}

.tf-option input[type="checkbox"] {
  accent-color: var(--primary);
  width: 14px;
  height: 14px;
  cursor: pointer;
  flex-shrink: 0;
}

.tf-option-color {
  font-size: 0.725rem;
  font-weight: 500;
  padding: 0.1rem 0.45rem;
  border-radius: 20px;
  white-space: nowrap;
}

.tf-option-count {
  margin-left: auto;
  font-size: 0.675rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg);
  padding: 0.05rem 0.4rem;
  border-radius: 20px;
}

.tickets-list {
  flex: 1;
  overflow-y: auto;
  padding: 0 1rem 1rem;
}

.tickets-cards {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ticket-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.ticket-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.ticket-main {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.ticket-id-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ticket-id {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  font-family: 'SF Mono', 'Fira Code', monospace;
}

.ticket-status {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.1rem 0.45rem;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.ticket-status.open {
  background: #dcfce7;
  color: #166534;
}

.ticket-status.pending {
  background: #fef3c7;
  color: #92400e;
}

.ticket-status.closed {
  background: #f1f5f9;
  color: #64748b;
}

.ticket-subject {
  font-size: 0.825rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.35;
}

.ticket-tags-grouped {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.ticket-tag-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.ticket-tag-group-label {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-secondary);
  margin-right: 0.15rem;
}

.ticket-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.ticket-tag {
  font-size: 0.625rem;
  font-weight: 500;
  padding: 0.1rem 0.4rem;
  border-radius: 20px;
  white-space: nowrap;
}

.tickets-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 120px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-align: center;
  padding: 1rem;
}

/* Modal full layout */
.modal-full {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* Section labels */
.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

/* Summary date */
.summary-date {
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: normal;
  color: var(--text-secondary);
  opacity: 0.8;
  margin-left: 6px;
}

.summary-date:empty {
  display: none;
}

/* Summary panel */
.summary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem 0.5rem;
  flex-shrink: 0;
}

.summary-actions {
  display: flex;
  gap: 0.4rem;
}

.btn-copy {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 0.725rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.btn-copy:hover {
  background: var(--bg);
  color: var(--text);
}

.btn-copy.copied {
  border-color: var(--success);
  color: var(--success);
}

.btn-regenerate:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.summary-text {
  font-size: 0.875rem;
  line-height: 1.75;
  color: var(--text);
  padding: 0.75rem 1.5rem 1.5rem;
  flex: 1;
  overflow-y: auto;
}

.summary-text h1,
.summary-text h2,
.summary-text h3,
.summary-text h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 1rem 0 0.4rem;
  color: var(--text);
}

.summary-text h1:first-child,
.summary-text h2:first-child,
.summary-text h3:first-child {
  margin-top: 0;
}

.summary-text p {
  margin: 0 0 0.6rem;
}

.summary-text ul,
.summary-text ol {
  margin: 0 0 0.6rem;
  padding-left: 1.4rem;
}

.summary-text li {
  margin-bottom: 0.25rem;
}

.summary-text strong {
  font-weight: 600;
  color: var(--text);
}

.summary-text code {
  background: rgba(0,0,0,0.06);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.8rem;
}

.summary-text pre {
  background: rgba(0,0,0,0.06);
  padding: 0.75rem;
  border-radius: 6px;
  overflow-x: auto;
  margin: 0 0 0.6rem;
}

.summary-text pre code {
  background: none;
  padding: 0;
}

.summary-text blockquote {
  border-left: 3px solid var(--border);
  margin: 0 0 0.6rem;
  padding: 0.25rem 0.75rem;
  color: var(--text-secondary);
}

.summary-text table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 0.6rem;
  font-size: 0.825rem;
}

.summary-text th,
.summary-text td {
  border: 1px solid var(--border);
  padding: 0.4rem 0.6rem;
  text-align: left;
}

.summary-text th {
  background: rgba(0,0,0,0.03);
  font-weight: 600;
}

.summary-text hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0.75rem 0;
}

/* No summary state */
.no-summary {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  height: 100%;
  min-height: 200px;
  color: var(--text-secondary);
  text-align: center;
}

.no-summary svg {
  opacity: 0.35;
}

.no-summary p {
  font-size: 0.875rem;
  max-width: 240px;
}

.btn-generate {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  border: none;
  border-radius: 8px;
  background: var(--primary);
  color: white;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  margin-top: 0.25rem;
}

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

.btn-generate:active {
  transform: scale(0.97);
}

.summary-loading {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-secondary);
  font-size: 0.85rem;
  padding: 1rem 0;
}

.spinner-summary {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Info table */
.info-table {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.info-row {
  display: flex;
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--border);
}

.info-row:last-child {
  border-bottom: none;
}

.info-row:nth-child(even) {
  background: var(--bg);
}

.info-label {
  flex: 0 0 40%;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: capitalize;
}

.info-value {
  flex: 1;
  color: var(--text);
  word-break: break-word;
}

/* Modal zendesk link */
.modal-zendesk-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--primary);
  text-decoration: none;
  padding: 0.5rem 0;
  transition: opacity 0.15s;
}

.modal-zendesk-link:hover {
  opacity: 0.75;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--text-secondary);
}

.empty-state svg {
  margin-bottom: 1rem;
  opacity: 0.4;
}

.empty-state p {
  font-size: 0.95rem;
}

/* Hidden utility */
.hidden {
  display: none !important;
}

/* Login Screen */
.login-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 1rem;
}

.login-overlay.hidden {
  display: none !important;
}

.login-card {
  background: var(--surface);
  border-radius: 20px;
  padding: 2.5rem;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.4s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-logo {
  text-align: center;
  margin-bottom: 2rem;
}

.login-logo-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--primary), #e04444);
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.5rem;
  color: white;
  margin-bottom: 0.75rem;
}

.login-logo h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.login-logo p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.form-group {
  margin-bottom: 1.15rem;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.form-group input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.9rem;
  font-family: inherit;
  background: var(--bg);
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(252, 88, 88, 0.15);
  background: white;
}

.login-error {
  font-size: 0.8rem;
  color: #dc2626;
  min-height: 1.25rem;
  margin-bottom: 0.25rem;
}

.btn-login {
  width: 100%;
  padding: 0.8rem 1rem;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), #e04444);
  color: white;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-login:hover {
  opacity: 0.92;
}

.btn-login:active {
  transform: scale(0.98);
}

.btn-login:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-login.loading .btn-text {
  display: none;
}

.btn-login .spinner {
  display: none;
}

.btn-login.loading .spinner {
  display: block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* Header right with logout */
.header-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.btn-logout {
  padding: 0.4rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 0.8rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-logout:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Responsive */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  .clients-grid {
    grid-template-columns: 1fr;
  }

  .modal-columns {
    flex-direction: column;
  }

  .modal-col-tickets {
    width: 100%;
    min-width: 0;
    max-height: 40vh;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
}

