/* ── Client header ─────────────────────────────────────── */
.client-header {
  background: var(--color-primary-dark);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.client-header-inner {
  max-width: 1020px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.client-brand {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -.015em;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 9px;
}
.client-brand:hover { text-decoration: none; }
.client-brand img { display: block; width: 150px; height: auto; }
.client-user-info {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: .84rem;
  color: #fff;
}
.client-header .btn-secondary { background: transparent; border-color: rgba(255,255,255,.45); color: #fff; }
.client-header .btn-secondary:hover { background: rgba(255,255,255,.12); border-color: #fff; }

/* ── Client nav ────────────────────────────────────────── */
.client-nav {
  background: #ffffff;
  border-bottom: 1px solid var(--color-border);
}
.client-nav-inner {
  max-width: 1020px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}
.client-nav-inner::-webkit-scrollbar { display: none; }
.client-nav a {
  padding: 12px 14px 11px;
  font-size: .85rem;
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color .12s, border-color .12s;
  white-space: nowrap;
  position: relative;
}
.client-nav a:hover { color: var(--color-text); }
.client-nav a.active {
  color: var(--color-primary-dark);
  border-bottom-color: var(--color-brand-accent);
  font-weight: 600;
}
.client-nav-count {
  position: absolute;
  top: 5px;
  right: -2px;
  min-width: 17px;
  padding: 1px 5px;
  border-radius: 10px;
  background: var(--color-danger);
  color: #fff;
  font-size: .6rem;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
}

.client-content {
  max-width: 1020px;
  margin: 0 auto;
  padding: 28px 24px 56px;
}

/* Client modal */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15,15,15,.52);
  backdrop-filter: blur(3px);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.active { display: flex; }
.modal {
  background: #fff;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 28px 30px;
  width: 100%;
  max-width: 480px;
  position: relative;
  border: 1px solid rgba(0,0,0,.04);
}
.modal-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 20px;
  letter-spacing: -.012em;
}
.modal > .modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 28px;
  height: 28px;
  background: transparent;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  color: var(--color-text-muted);
  font-size: 1.1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color .1s, color .1s;
}
.modal > .modal-close:hover { background: var(--color-bg); color: var(--color-text); }

/* ── Client login ──────────────────────────────────────── */
.client-login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: var(--color-bg);
  background-image:
    radial-gradient(circle at 15% 15%, rgba(29,78,216,.05), transparent 35%),
    radial-gradient(circle at 85% 85%, rgba(194,65,12,.04), transparent 40%);
}
.client-login-box {
  background: #fff;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  padding: 38px 40px 30px;
  width: 100%;
  max-width: 420px;
  border: 1px solid var(--color-border);
}
.client-login-logo { text-align: center; margin-bottom: 28px; }
.client-login-logo .brand {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -.02em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.client-login-logo .brand,
.login-logo-link {
  padding: 10px 18px;
  border-radius: 10px;
  background: var(--color-primary-dark);
}
.client-login-logo .brand img,
.login-logo-link img { display: block; width: 180px; height: auto; }
.login-return {
  margin-top: 18px;
  text-align: center;
  font-size: .82rem;
}
.client-login-logo .tagline {
  font-size: .72rem;
  color: var(--color-text-muted);
  margin-top: 6px;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-weight: 600;
}

/* ── Welcome banner ────────────────────────────────────── */
.welcome-banner {
  background: #111318;
  background-image:
    radial-gradient(circle at 100% 0%, rgba(29,78,216,.25), transparent 50%),
    linear-gradient(135deg, #1a1c22, #0f1116);
  color: #f5f5f2;
  border-radius: var(--radius-xl);
  padding: 26px 30px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border: 1px solid rgba(255,255,255,.04);
  position: relative;
  overflow: hidden;
}
.welcome-banner::after {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, transparent, #9cb4ff 40%, transparent);
  opacity: .6;
}
.welcome-banner h2 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 4px;
  letter-spacing: -.015em;
  color: #f5f5f2;
}
.welcome-banner p {
  font-size: .86rem;
  color: #b4b6bd;
  max-width: 52ch;
  line-height: 1.55;
}
.welcome-banner .btn {
  background: #ffffff;
  color: var(--color-text);
  border-color: #ffffff;
  font-weight: 600;
}
.welcome-banner .btn:hover { background: #f5f5f2; border-color: #f5f5f2; }

/* ── File input ────────────────────────────────────────── */
.file-input-wrapper {
  border: 1.5px dashed var(--color-border-strong);
  border-radius: var(--radius);
  padding: 22px;
  text-align: center;
  cursor: pointer;
  transition: border-color .12s, background-color .12s;
  background: var(--color-bg);
}
.file-input-wrapper:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-soft);
}
.file-input-wrapper input { display: none; }
.file-input-wrapper .file-icon {
  display: inline-flex;
  margin-bottom: 10px;
  color: var(--color-text-muted);
}
.file-input-wrapper:hover .file-icon { color: var(--color-primary); }
.file-input-wrapper p {
  font-size: .86rem;
  color: var(--color-text-soft);
  font-weight: 500;
}
.file-list { margin-top: 12px; }
.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-top: 6px;
  font-size: .82rem;
  color: var(--color-text-soft);
}
.file-item .file-item-name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.file-item .file-item-name svg { flex-shrink: 0; color: var(--color-text-muted); }
.file-remove {
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  transition: background-color .1s, color .1s;
}
.file-remove:hover { background: var(--color-danger-soft); color: var(--color-danger); }

/* ── Inline attachment chip (used in ticket detail) ────── */
.attachment-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-right: 8px;
  margin-bottom: 6px;
  padding: 5px 12px 5px 10px;
  font-size: .8rem;
  color: var(--color-text-soft);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  text-decoration: none;
  transition: border-color .1s, background-color .1s, color .1s;
}
.attachment-chip:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: var(--color-primary-soft);
  text-decoration: none;
}
.attachment-chip svg { flex-shrink: 0; color: var(--color-text-muted); }
.attachment-chip:hover svg { color: var(--color-primary); }

/* ── Character counter ─────────────────────────────────── */
.char-counter {
  font-size: .72rem;
  color: var(--color-text-muted);
  text-align: right;
  margin-top: 5px;
  font-variant-numeric: tabular-nums;
}
.char-counter.warn { color: var(--color-warning); }
.char-counter.error { color: var(--color-danger); }

/* ── Resolution box ────────────────────────────────────── */
.resolution-box {
  background: var(--color-success-soft);
  border: 1px solid #b8dfc5;
  border-left: 3px solid var(--color-success);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 20px;
}
.resolution-box h4 {
  font-size: .76rem;
  font-weight: 700;
  color: #14532d;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.resolution-box p {
  font-size: .88rem;
  color: #14532d;
  white-space: pre-wrap;
  line-height: 1.6;
}

/* ── Client timeline ───────────────────────────────────── */
.client-timeline { display: flex; flex-direction: column; gap: 0; }
.client-timeline .timeline-item { padding: 16px 0; border-bottom: 1px solid var(--color-border); }
.client-timeline .timeline-item:last-child { border-bottom: none; }

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 720px) {
  .welcome-banner { flex-direction: column; align-items: flex-start; padding: 22px 24px; }
}
@media (max-width: 600px) {
  .client-header-inner, .client-nav-inner { padding: 0 16px; }
  .client-content { padding: 20px 16px 40px; }
  .client-user-info { gap: 10px; font-size: .78rem; }
  .client-login-box { padding: 30px 26px; }
}
