/* ============================================
   TLC Client Portal — Shared Styles
   Reuses the main site's brand: black, navy,
   magenta-to-gold gradient, warm cream.
   ============================================ */

:root {
  --navy: #0b0e23;
  --magenta: #e4257c;
  --gold: #f2b705;
  --cream: #faf6f0;
  --text-dark: #1a1a2e;
  --text-light: #f5f2ea;
  --gradient: linear-gradient(90deg, var(--magenta), var(--gold));
  --border: #e6e2d8;
}

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

body {
  font-family: 'Lato', Arial, sans-serif;
  color: var(--text-dark);
  background: var(--cream);
  line-height: 1.6;
}

h1, h2, h3, h4 {
  font-family: 'Playfair Display', Georgia, serif;
  color: var(--navy);
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

button, input, select, textarea { font-family: inherit; font-size: 15px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 15px;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.btn-primary { background: var(--gradient); color: var(--navy); }
.btn-primary:hover { transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  color: var(--navy);
  border: 2px solid var(--navy);
}

.btn-full { width: 100%; }

/* ---------- Auth pages (login/signup) ---------- */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  padding: 24px;
}

.auth-card {
  background: #fff;
  border-radius: 16px;
  padding: 44px;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

.auth-logo { text-align: center; margin-bottom: 10px; }
.auth-logo img { height: 90px; margin: 0 auto; }

.auth-card h1 {
  font-size: 24px;
  text-align: center;
  margin-bottom: 6px;
}

.auth-card p.sub {
  text-align: center;
  color: #666;
  font-size: 14px;
  margin-bottom: 28px;
}

.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 6px;
}
.field input,
.field select,
.field textarea,
#threadBox ~ #composeBox textarea,
.card select,
.card input[type="text"],
.card input[type="file"],
.card textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #ddd;
  border-radius: 8px;
  background: #fff;
  margin-bottom: 4px;
}
.field input:focus,
.field select:focus,
.field textarea:focus,
.card select:focus,
.card input:focus,
.card textarea:focus { outline: 2px solid var(--gold); border-color: transparent; }

/* ---------- Messages ---------- */
#composeBox textarea {
  padding: 12px 14px;
  border: 1.5px solid #ddd;
  border-radius: 8px;
}
.msg-clientlist select,
select#clientPicker { margin-bottom: 0; }

.auth-toggle {
  text-align: center;
  margin-top: 18px;
  font-size: 14px;
  color: #555;
}
.auth-toggle a { color: var(--magenta); font-weight: 700; }

.auth-message {
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 18px;
  display: none;
}
.auth-message.show { display: block; }
.auth-message.error { background: #fde8ee; color: #9c1c4c; }
.auth-message.success { background: #eafaf0; color: #1c6b3f; }

/* ---------- App Shell (post-login) ---------- */
.app-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: #000;
  color: var(--text-light);
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
}

.sidebar .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.sidebar .brand img { height: 60px; }

.sidebar .user-line {
  font-size: 13px;
  color: #b8b6cc;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.sidebar .user-line strong { color: var(--gold); display: block; font-size: 15px; }

.sidebar nav { flex: 1; }
.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 4px;
  color: #d8d6e8;
}
.sidebar nav a:hover { background: rgba(255,255,255,0.06); color: #fff; }
.sidebar nav a.active {
  background: var(--gradient);
  color: var(--navy);
}

.sidebar .signout {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.12);
}
.sidebar .signout button {
  background: none;
  border: 1.5px solid #666;
  color: #d8d6e8;
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
}
.sidebar .signout button:hover { border-color: var(--gold); color: var(--gold); }

.main-content { padding: 40px 48px; max-width: 1100px; }

.home-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 14px;
  color: var(--magenta);
  margin-bottom: 18px;
}
.home-link:hover { color: var(--navy); }

.page-title { font-size: 30px; margin-bottom: 6px; }
.page-sub { color: #666; margin-bottom: 34px; }

.card {
  background: #fff;
  border-radius: 14px;
  padding: 28px;
  box-shadow: 0 4px 20px rgba(11,14,35,0.06);
  margin-bottom: 24px;
}

/* ---------- Pipeline tracker ---------- */
.pipeline-track { display: flex; flex-direction: column; gap: 0; }
.pipeline-step {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 14px 0;
  position: relative;
}
.pipeline-step:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 42px;
  bottom: -14px;
  width: 2px;
  background: var(--border);
}
.pipeline-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #eee;
  color: #999;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  flex-shrink: 0;
  z-index: 1;
}
.pipeline-step.done .pipeline-dot { background: var(--gradient); color: var(--navy); }
.pipeline-step.current .pipeline-dot {
  background: var(--navy);
  color: var(--gold);
  box-shadow: 0 0 0 4px rgba(228,37,124,0.15);
}
.pipeline-step .label { font-weight: 700; padding-top: 5px; }
.pipeline-step.current .label { color: var(--magenta); }
.pipeline-step.done .label { color: var(--navy); }
.pipeline-step:not(.done):not(.current) .label { color: #aaa; }

/* ---------- Quick link cards ---------- */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.quick-card {
  background: #fff;
  border-radius: 14px;
  padding: 24px 20px;
  box-shadow: 0 4px 20px rgba(11,14,35,0.06);
  border-top: 4px solid transparent;
  border-image: var(--gradient);
  border-image-slice: 1;
}
.quick-card .icon { font-size: 26px; margin-bottom: 10px; }
.quick-card h4 { font-size: 16px; margin-bottom: 6px; }
.quick-card p { font-size: 13px; color: #777; }

@media (max-width: 860px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: sticky; top: 0; z-index: 50; }
  .quick-grid { grid-template-columns: repeat(2, 1fr); }
  .main-content { padding: 28px 20px; }
}
