/* =============================================================================
   client.css – tyrol.dev Client Area Styles
   Extends global style.css tokens. Import AFTER style.css.
   ============================================================================= */

/* --------------------------------------------------------------------------
   1. Client layout
   -------------------------------------------------------------------------- */
.client-body {
  background: var(--gray-50);
  min-height: 100svh;
}

/* --------------------------------------------------------------------------
   2. Client navbar
   -------------------------------------------------------------------------- */
.client-nav {
  background: var(--navy);
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.client-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.client-nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.client-user {
  font-size: .875rem;
  color: rgba(255,255,255,.65);
}
.client-user strong { color: var(--white); }

.btn-logout {
  font-size: .8125rem;
  font-weight: 600;
  padding: .375rem .875rem;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.7);
  border: 1px solid rgba(255,255,255,.12);
  transition: var(--transition);
}
.btn-logout:hover {
  background: rgba(255,255,255,.14);
  color: var(--white);
}

/* --------------------------------------------------------------------------
   3. Dashboard layout
   -------------------------------------------------------------------------- */
.dashboard {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

.dashboard-welcome {
  margin-bottom: 2rem;
}
.dashboard-welcome h1 {
  font-size: 1.6rem;
  color: var(--navy);
  margin-bottom: .25rem;
}
.dashboard-welcome p { font-size: .9375rem; }

/* --------------------------------------------------------------------------
   4. Cards (shared)
   -------------------------------------------------------------------------- */
.dash-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.dash-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.dash-card-title {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   5. Phase progress bar
   -------------------------------------------------------------------------- */
.phases-track {
  display: flex;
  align-items: flex-start;
  gap: 0;
  overflow-x: auto;
  padding-bottom: .5rem;
}

.phase-step {
  flex: 1;
  min-width: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .375rem;
  position: relative;
}

/* Connecting line */
.phase-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 14px;
  left: calc(50% + 14px);
  right: calc(-50% + 14px);
  height: 2px;
  background: var(--gray-200);
  z-index: 0;
}
.phase-step.done:not(:last-child)::after,
.phase-step.active:not(:last-child)::after {
  background: var(--green);
}

.phase-circle {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid var(--gray-200);
  background: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: .7rem;
  font-weight: 700;
  color: var(--gray-400);
  position: relative;
  z-index: 1;
  transition: var(--transition);
}

.phase-step.done .phase-circle {
  background: var(--green);
  border-color: var(--green);
  color: white;
}

.phase-step.active .phase-circle {
  background: var(--white);
  border-color: var(--green);
  color: var(--green);
  box-shadow: 0 0 0 4px rgba(74,124,89,.15);
}

.phase-label {
  font-size: .7rem;
  font-weight: 600;
  color: var(--gray-400);
  text-align: center;
  line-height: 1.3;
}

.phase-step.done   .phase-label { color: var(--green); }
.phase-step.active .phase-label { color: var(--navy); font-weight: 700; }

/* --------------------------------------------------------------------------
   6. Payment status
   -------------------------------------------------------------------------- */
.payment-list {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.payment-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .875rem 1rem;
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-200);
}

.payment-item-left {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.payment-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.payment-dot.paid    { background: var(--green); }
.payment-dot.pending { background: var(--gray-300); }
.payment-dot.due     { background: #f59e0b; }

.payment-item-label { font-size: .9375rem; font-weight: 500; color: var(--navy); }
.payment-item-sub   { font-size: .8125rem; color: var(--text-muted); }

.payment-badge {
  font-size: .75rem;
  font-weight: 700;
  padding: .25rem .625rem;
  border-radius: 100px;
  letter-spacing: .04em;
}
.payment-badge.paid    { background: #dcfce7; color: #166534; }
.payment-badge.pending { background: var(--gray-100); color: var(--gray-600); }
.payment-badge.due     { background: #fef3c7; color: #92400e; }

/* --------------------------------------------------------------------------
   7. Preview & Files
   -------------------------------------------------------------------------- */
.preview-link {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .9375rem;
  font-weight: 600;
  color: var(--green);
  padding: .625rem 1rem;
  border: 1.5px solid var(--green);
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  transition: var(--transition);
}
.preview-link:hover { background: var(--green-pale); }
.preview-link svg   { width: 15px; height: 15px; }

.files-list {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .75rem 1rem;
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-200);
}

.file-name {
  display: flex;
  align-items: center;
  gap: .625rem;
  font-size: .875rem;
  font-weight: 500;
  color: var(--navy);
}
.file-name svg { width: 16px; height: 16px; color: var(--green); }

.file-download {
  font-size: .8125rem;
  font-weight: 600;
  color: var(--green);
  transition: opacity var(--transition);
}
.file-download:hover { opacity: .7; }

.updated-at {
  font-size: .8125rem;
  color: var(--text-muted);
  margin-top: .875rem;
}

/* --------------------------------------------------------------------------
   8. Notes / Messages
   -------------------------------------------------------------------------- */
.notes-list {
  display: flex;
  flex-direction: column;
  gap: .875rem;
}

.note-item {
  background: var(--gray-50);
  border-left: 3px solid var(--green);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: .875rem 1rem;
}

.note-date {
  font-size: .75rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: .375rem;
  letter-spacing: .04em;
}

.note-text {
  font-size: .9375rem;
  color: var(--navy);
  line-height: 1.6;
}

.empty-state {
  font-size: .9375rem;
  color: var(--text-muted);
  padding: .5rem 0;
}

/* --------------------------------------------------------------------------
   9. Login page
   -------------------------------------------------------------------------- */
.login-wrap {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--navy);
  padding: 2rem 1.25rem;
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow-lg);
}

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

.login-logo .nav-logo { font-size: 1.25rem; }
.login-logo p { font-size: .875rem; margin-top: .375rem; }

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: .375rem;
}
.login-field label { font-size: .875rem; font-weight: 600; color: var(--navy); }
.login-field input {
  padding: .75rem 1rem;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: .9375rem;
  color: var(--navy);
  transition: border-color var(--transition);
}
.login-field input:focus { outline: none; border-color: var(--green); }

.login-submit {
  width: 100%;
  justify-content: center;
  margin-top: .5rem;
}

.login-back {
  text-align: center;
  margin-top: 1.25rem;
}
.login-back a {
  font-size: .8125rem;
  color: var(--text-muted);
  transition: color var(--transition);
}
.login-back a:hover { color: var(--navy); }

.timeout-notice {
  background: #fef3c7;
  border: 1px solid #fde68a;
  color: #92400e;
  padding: .75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  margin-bottom: 1rem;
}
