:root {
  --accent: #0f766e;
  --ink: #172033;
  --muted: #667085;
  --line: #dce3eb;
  --surface: #ffffff;
  --soft: #f5f8fb;
  --rose: #be3455;
  --gold: #a16207;
  --teal-soft: #dff7f2;
  --shadow: 0 18px 44px rgba(22, 32, 51, 0.12);
}

/* Visual upgrade for the Estetic client portal and admin console. */
:root {
  --accent: #0f766e;
  --ink: #16202f;
  --muted: #647084;
  --line: #d9e2ec;
  --surface: #ffffff;
  --soft: #f3f7f9;
  --rose: #be3455;
  --gold: #a16207;
  --sky: #0369a1;
  --mint: #0f766e;
  --green: #047857;
  --shadow: 0 22px 58px rgba(22, 32, 51, 0.13);
}

body {
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.10) 0%, transparent 34%),
    linear-gradient(225deg, rgba(190, 52, 85, 0.10) 0%, transparent 30%),
    linear-gradient(180deg, #f8fbfd 0%, #edf4f5 100%);
}

.auth-panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 249, 249, 0.96));
}

.auth-card {
  border-color: rgba(15, 118, 110, 0.20);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 22px 60px rgba(22, 32, 51, 0.13);
}

.auth-copy span {
  display: inline-flex;
  margin-bottom: 14px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.22);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.welcome-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  border: 1px solid rgba(15, 118, 110, 0.24);
  border-radius: 8px;
  padding: 22px;
  color: #ffffff;
  background:
    linear-gradient(120deg, #0f766e 0%, #0369a1 54%, #be3455 100%);
  box-shadow: var(--shadow);
}

.welcome-band span {
  display: inline-flex;
  margin-bottom: 8px;
  border-radius: 8px;
  padding: 6px 9px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.welcome-band h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: 0;
}

.welcome-band p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.5;
}

.welcome-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.welcome-band .secondary-btn,
.welcome-band .primary-btn {
  background: #ffffff;
  color: #0f172a;
  box-shadow: none;
}

.welcome-band .secondary-btn {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.36);
}

.metric {
  position: relative;
  overflow: hidden;
  border-color: rgba(15, 118, 110, 0.16);
}

.metric::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: var(--accent);
}

.metric.sky::before { background: var(--sky); }
.metric.green::before { background: var(--green); }
.metric.rose::before { background: var(--rose); }
.metric.gold::before { background: var(--gold); }

.panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 252, 253, 0.98));
}

.feature-panel {
  border-color: rgba(3, 105, 161, 0.18);
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.panel-heading h2 {
  margin-bottom: 6px;
}

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

.service-option {
  border-left: 4px solid var(--accent);
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.service-option:nth-child(2n) {
  border-left-color: var(--rose);
}

.service-option:nth-child(3n) {
  border-left-color: var(--gold);
}

.service-option:hover,
.appointment:hover,
.admin-appointment-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 32px rgba(22, 32, 51, 0.10);
}

.profile-preview {
  display: grid;
  justify-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f5fbfa 100%);
}

.profile-preview strong {
  font-size: 16px;
}

.profile-preview span {
  max-width: 100%;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 13px;
}

.admin-stack {
  display: grid;
  gap: 18px;
}

.admin-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-color: rgba(190, 52, 85, 0.18);
}

.override-card {
  min-width: 220px;
  border: 1px solid rgba(15, 118, 110, 0.22);
  border-radius: 8px;
  padding: 14px;
  background: #effaf7;
}

.override-card span,
.service-admin-list span,
.admin-appointment-card span {
  color: var(--muted);
  font-size: 12px;
}

.override-card strong {
  display: block;
  margin-top: 6px;
  overflow-wrap: anywhere;
  color: var(--accent);
  font-size: 18px;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 18px;
  align-items: start;
}

.service-admin-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.service-admin-list article,
.service-edit-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #f8fafc;
}

.service-edit-card {
  display: grid;
  align-items: stretch;
}

.service-admin-list strong,
.admin-appointment-card strong {
  display: block;
  margin-bottom: 4px;
}

.edit-list {
  display: grid;
  gap: 12px;
}

.admin-appointment-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #ffffff;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

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

.pill.gold {
  color: #7a4d00;
  background: #fff3cf;
}

@media (max-width: 1040px) {
  .side-nav {
    grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  }

  .admin-grid,
  .admin-edit-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .dashboard {
    padding: 14px;
  }

  .welcome-band,
  .admin-hero,
  .panel-heading {
    display: grid;
  }

  .welcome-band h2 {
    font-size: 24px;
  }

  .welcome-actions,
  .welcome-actions .primary-btn,
  .welcome-actions .secondary-btn,
  .field-row {
    width: 100%;
  }

  .field-row,
  .account-grid {
    grid-template-columns: 1fr;
  }

  .profile-chip {
    overflow-wrap: anywhere;
  }
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--soft);
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #f7fafc 0%, #eef4f8 100%);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
}

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

.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
}

.auth-visual {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: #101828;
}

.auth-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.82;
}

.auth-copy {
  position: absolute;
  left: 36px;
  right: 36px;
  bottom: 36px;
  color: #ffffff;
  max-width: 640px;
}

.auth-copy h1 {
  margin: 0 0 12px;
  font-size: 42px;
  line-height: 1.04;
  letter-spacing: 0;
}

.auth-copy p {
  margin: 0;
  max-width: 520px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 16px;
  line-height: 1.6;
}

.auth-panel {
  min-height: 100vh;
  display: grid;
  align-items: center;
  padding: 40px;
  background: var(--surface);
}

.auth-card,
.panel,
.metric,
.appointment,
.service-option {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.auth-card {
  width: min(100%, 460px);
  margin: 0 auto;
  padding: 28px;
  box-shadow: none;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.auth-card h2,
.panel h2 {
  margin: 0 0 8px;
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: 0;
}

.auth-card p,
.panel p,
.muted {
  color: var(--muted);
}

.auth-card p,
.panel p {
  margin: 0 0 20px;
  line-height: 1.55;
}

.switcher {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 6px;
  background: #edf3f6;
  border-radius: 8px;
  margin-bottom: 20px;
}

.switcher button {
  min-height: 42px;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-weight: 750;
}

.switcher button.active {
  color: #ffffff;
  background: var(--accent);
}

.form-grid {
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 7px;
}

.field label {
  color: #344054;
  font-size: 13px;
  font-weight: 750;
}

.field-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid #cfd8e3;
  border-radius: 8px;
  padding: 11px 12px;
  color: var(--ink);
  background: #ffffff;
  outline: none;
}

.field textarea {
  min-height: 104px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.16);
}

.primary-btn,
.secondary-btn,
.danger-btn,
.ghost-btn {
  min-height: 44px;
  border-radius: 8px;
  padding: 0 16px;
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.primary-btn:hover,
.secondary-btn:hover,
.danger-btn:hover,
.ghost-btn:hover {
  transform: translateY(-1px);
}

.primary-btn {
  color: #ffffff;
  background: var(--accent);
  box-shadow: 0 12px 24px rgba(15, 118, 110, 0.2);
}

.secondary-btn {
  color: var(--accent);
  background: var(--teal-soft);
}

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

.ghost-btn {
  color: var(--ink);
  background: #edf3f6;
}

.full {
  width: 100%;
}

.dashboard {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 24px;
}

.topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  color: #ffffff;
  background: var(--accent);
  font-weight: 900;
}

.brand-lockup h1 {
  margin: 0;
  font-size: 24px;
  letter-spacing: 0;
}

.brand-lockup span {
  color: var(--muted);
  font-size: 14px;
}

.profile-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.avatar {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--teal-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-weight: 900;
}

.profile-chip strong,
.profile-chip small {
  display: block;
}

.profile-chip small {
  color: var(--muted);
}

.dashboard-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
}

.side-nav {
  position: sticky;
  top: 24px;
  align-self: start;
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.side-nav button {
  width: 100%;
  min-height: 46px;
  border-radius: 8px;
  padding: 0 12px;
  text-align: left;
  color: #344054;
  background: transparent;
  cursor: pointer;
  font-weight: 800;
}

.side-nav button.active {
  color: #ffffff;
  background: var(--accent);
}

.content-stack {
  display: grid;
  gap: 18px;
}

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

.metric {
  padding: 16px;
  box-shadow: none;
}

.metric span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.metric strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
  line-height: 1;
}

.panel {
  padding: 22px;
  box-shadow: none;
}

.schedule-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: start;
}

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

.service-option {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  box-shadow: none;
}

.service-option strong,
.appointment strong {
  display: block;
  margin-bottom: 5px;
}

.service-option span,
.appointment span {
  color: var(--muted);
  font-size: 13px;
}

.appointment-list {
  display: grid;
  gap: 12px;
}

.appointment {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 16px;
  box-shadow: none;
}

.appointment-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 8px;
  color: #344054;
  background: #edf3f6;
  font-size: 12px;
  font-weight: 800;
}

.pill.pending {
  color: #7a4d00;
  background: #fff3cf;
}

.pill.confirmed {
  color: #075985;
  background: #e0f2fe;
}

.pill.completed {
  color: #065f46;
  background: #dcfce7;
}

.pill.cancelled {
  color: #9f1239;
  background: #ffe4e6;
}

.empty {
  padding: 24px;
  border: 1px dashed #b8c4d1;
  border-radius: 8px;
  color: var(--muted);
  background: #f8fafc;
  text-align: center;
}

.account-grid {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.avatar-preview {
  width: 160px;
  height: 160px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--teal-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-size: 42px;
  font-weight: 900;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 10;
  width: min(420px, calc(100vw - 40px));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  color: #ffffff;
  background: #172033;
  box-shadow: var(--shadow);
}

.toast.error {
  background: var(--rose);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(16, 24, 40, 0.58);
}

.consent-modal {
  width: min(440px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.consent-modal h2 {
  margin: 0 0 10px;
  font-size: 24px;
  line-height: 1.2;
}

.consent-modal p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.consent-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.hidden {
  display: none !important;
}

@media (max-width: 1040px) {
  .auth-page,
  .dashboard-layout,
  .schedule-grid,
  .account-grid {
    grid-template-columns: 1fr;
  }

  .auth-visual {
    min-height: 320px;
  }

  .auth-panel {
    min-height: auto;
  }

  .side-nav {
    position: static;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .side-nav button {
    text-align: center;
  }

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

@media (max-width: 680px) {
  .auth-panel,
  .dashboard {
    padding: 18px;
  }

  .auth-copy {
    left: 20px;
    right: 20px;
    bottom: 20px;
  }

  .auth-copy h1 {
    font-size: 30px;
  }

  .auth-card,
  .panel {
    padding: 18px;
  }

  .topline,
  .appointment,
  .service-option {
    align-items: stretch;
    flex-direction: column;
  }

  .topline,
  .appointment {
    display: grid;
  }

  .profile-chip {
    width: 100%;
  }

  .side-nav,
  .metrics {
    grid-template-columns: 1fr;
  }

  .side-nav {
    gap: 8px;
  }

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

  .consent-actions {
    display: grid;
  }
}

/* Final layer: keep the upgraded look after the base layout rules. */
body {
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.10) 0%, transparent 34%),
    linear-gradient(225deg, rgba(190, 52, 85, 0.10) 0%, transparent 30%),
    linear-gradient(180deg, #f8fbfd 0%, #edf4f5 100%);
}

.auth-card {
  border-color: rgba(15, 118, 110, 0.20);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 22px 60px rgba(22, 32, 51, 0.13);
}

.panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 252, 253, 0.98));
}

.metric {
  position: relative;
  overflow: hidden;
  border-color: rgba(15, 118, 110, 0.16);
}

.metric::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: var(--accent);
}

.metric.sky::before { background: var(--sky); }
.metric.green::before { background: var(--green); }
.metric.rose::before { background: var(--rose); }
.metric.gold::before { background: var(--gold); }

.service-option {
  border-left: 4px solid var(--accent);
}

.service-option:nth-child(2n) {
  border-left-color: var(--rose);
}

.service-option:nth-child(3n) {
  border-left-color: var(--gold);
}

@media (max-width: 1040px) {
  .side-nav {
    grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  }
}

@media (max-width: 680px) {
  .welcome-band,
  .admin-hero,
  .panel-heading {
    display: grid;
  }

  .field-row,
  .account-grid {
    grid-template-columns: 1fr;
  }
}
