/* Identidad visual y componentes de BarberTurnos. */
:root {
  --gold: #dcae57;
  --gold-light: #f2ce84;
  --ink: #090909;
  --panel: rgba(24, 24, 24, 0.9);
  --line: rgba(255, 255, 255, 0.13);
  --muted: #aaa49a;
  color-scheme: dark;
}

* { box-sizing: border-box; }
button, input, select, textarea { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }

body {
  background:
    radial-gradient(circle at 20% 10%, rgba(220,174,87,.08), transparent 28rem),
    radial-gradient(circle at 85% 85%, rgba(220,174,87,.05), transparent 32rem),
    #080808;
}

.bot-field {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.consent-row {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  margin-top: 1rem;
  color: var(--muted);
  font-size: .75rem;
  line-height: 1.5;
}
.consent-row input { flex: 0 0 auto; width: 1rem; height: 1rem; margin-top: .12rem; accent-color: var(--gold); }
.consent-row a, .legal-document a { color: var(--gold-light); text-decoration: underline; text-underline-offset: 2px; }

.legal-page { min-height: 100vh; color: #eeeae3; font-family: Inter, system-ui, sans-serif; }
.legal-document { width: min(760px, calc(100% - 2rem)); margin: 0 auto; padding: 3rem 0 5rem; }
.legal-document h1 { margin-top: .65rem; font-family: Georgia, serif; font-size: clamp(2rem, 7vw, 3.2rem); line-height: 1.05; }
.legal-document h2 { margin-top: 2rem; color: var(--gold-light); font-family: Georgia, serif; font-size: 1.3rem; }
.legal-document p { margin-top: .75rem; color: #c6c0b7; font-size: .95rem; line-height: 1.75; }
.legal-document .legal-updated { color: var(--muted); font-size: .8rem; }
.legal-back { display: inline-block; margin-bottom: 2rem; color: var(--gold-light); text-decoration: none !important; }
.site-legal-footer { position: relative; z-index: 1; display: flex; justify-content: center; gap: .65rem; margin-top: -2.5rem; padding: 0 1rem 2rem; color: var(--muted); font-size: .72rem; }
.site-legal-footer a { color: #c8b17d; text-decoration: none; }
.site-legal-footer.is-private-hidden { display: none; }
.profile-legal-links { display: flex; justify-content: center; gap: .65rem; margin-top: 2rem; padding-bottom: .5rem; color: var(--muted); font-size: .72rem; }
.profile-legal-links a { color: #c8b17d; text-decoration: none; }

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .16;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.28'/%3E%3C/svg%3E");
}

.eyebrow { color: var(--gold); font-size: .67rem; font-weight: 700; letter-spacing: .2em; }
.app-stage {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  padding: 2rem 1rem 4rem;
}

.device-shell {
  position: relative;
  width: 100%;
  min-height: 780px;
  overflow: hidden;
  border: 7px solid #242424;
  border-radius: 3rem;
  background: #0c0c0c;
  box-shadow: 0 32px 90px rgba(0,0,0,.65), inset 0 0 0 1px #3b3b3b;
}
.device-shell.is-wide { width: min(870px, 100%); min-height: 720px; border-radius: 1.7rem; }
.device-notch { position: absolute; z-index: 20; top: .65rem; left: 50%; width: 7rem; height: 1.7rem; transform: translateX(-50%); border-radius: 999px; background: #020202; }
.device-shell.is-wide .device-notch { display: none; }
.app-screen { min-height: inherit; }

.barber-bg {
  position: relative;
  overflow: hidden;
  min-height: inherit;
  background:
    linear-gradient(to bottom, rgba(7,7,7,.48), #0a0a0a 34%, #0a0a0a),
    radial-gradient(circle at 50% 4%, rgba(220,174,87,.22), transparent 21rem),
    linear-gradient(130deg, #201c17, #090909 52%, #18130e);
}

.barber-bg::after { position: absolute; z-index: 0; inset: 0; background: linear-gradient(to bottom, rgba(7,7,7,.55), #0a0a0a 38%, rgba(10,10,10,.98)); content: ''; pointer-events: none; }
.brand-background-image { position: absolute; z-index: 0; inset: 0; width: 100%; height: min(38rem, 58vh); object-fit: cover; object-position: center top; }
.screen-content { position: relative; z-index: 1; min-height: inherit; padding: 3.25rem 1.35rem 6rem; }
.brand-hero { text-align: center; padding: .5rem 0 1.3rem; }
.brand-mark { display: grid; flex: 0 0 6.4rem; place-items: center; width: 6.4rem; min-width: 6.4rem; height: 6.4rem; min-height: 6.4rem; aspect-ratio: 1; overflow: hidden; margin: 0 auto .75rem; border: 2px solid var(--gold); border-radius: 50%; background: radial-gradient(circle at 50% 30%, #3f362a, #111 70%); box-shadow: 0 0 0 5px rgba(0,0,0,.3), 0 10px 35px rgba(0,0,0,.55); font-family: Georgia, serif; color: var(--gold-light); font-size: 2rem; }
.brand-mark img { display: block; width: 100%; min-width: 100%; height: 100%; min-height: 100%; object-fit: cover; }
.brand-name { font-family: Georgia, serif; font-size: 1.35rem; letter-spacing: .08em; }
.gold-rule { width: 4rem; height: 1px; margin: .65rem auto 0; background: linear-gradient(90deg, transparent, var(--gold), transparent); }

.display-title { font-family: Georgia, serif; font-size: 2rem; line-height: 1.1; }
.section-kicker { margin-top: .4rem; color: var(--gold-light); font-size: .88rem; }
.label { display: block; margin-bottom: .5rem; color: #e7e2d9; font-size: .84rem; font-weight: 500; }
.muted { color: var(--muted); }

.date-strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(4.5rem, 1fr); gap: .5rem; margin-top: .75rem; overflow-x: auto; padding-bottom: .25rem; scrollbar-width: thin; }
.professional-strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(7rem, 1fr); gap: .65rem; margin-top: .75rem; overflow-x: auto; padding-bottom: .25rem; }
.professional-card { display: grid; min-height: 6.75rem; place-items: center; gap: .45rem; padding: .75rem; border: 1px solid var(--line); border-radius: 1rem; background: rgba(24,24,24,.86); color: var(--muted); text-align: center; }
.professional-card img, .professional-card > span { width: 3.25rem; height: 3.25rem; border-radius: 999px; object-fit: cover; display: grid; place-items: center; background: #292929; }
.professional-card.is-selected { border-color: var(--gold); background: linear-gradient(135deg,#f5d77d,#bd842e); color: #15100a; box-shadow: 0 8px 24px rgba(217,169,75,.2); }
.date-card, .time-card { border: 1px solid var(--line); border-radius: .7rem; background: rgba(28,28,28,.82); color: #eeeae3; transition: .18s ease; }
.date-card { padding: .7rem .2rem; font-size: .77rem; text-align: center; }
.date-card span { display: block; margin-top: .2rem; color: #908b83; font-size: .68rem; }
.date-card.is-selected, .time-card.is-selected { border-color: #edc878; color: #090909; background: linear-gradient(135deg, var(--gold-light), var(--gold)); box-shadow: 0 7px 25px rgba(220,174,87,.16); }
.date-card.is-selected span { color: #3a2b13; }
.time-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin-top: .75rem; }
.time-card { padding: .75rem .25rem; text-align: center; font-size: .9rem; }
.time-card:hover, .date-card:hover { border-color: rgba(220,174,87,.55); }

.btn-primary, .btn-secondary, .btn-danger, .btn-ghost { width: 100%; min-height: 3rem; border-radius: .72rem; font-weight: 650; transition: .18s ease; }
.btn-primary { color: #0b0b0b; background: linear-gradient(135deg, var(--gold-light), var(--gold)); box-shadow: 0 10px 30px rgba(220,174,87,.12); }
.btn-primary:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn-primary:disabled { cursor: not-allowed; opacity: .38; filter: grayscale(.35); transform: none; }
.btn-secondary { border: 1px solid var(--line); color: #eee9df; background: #1b1b1b; }
.btn-secondary:hover { border-color: rgba(220,174,87,.5); }
.btn-danger { border: 1px solid rgba(239,92,92,.45); color: #ff9a9a; background: rgba(150,30,30,.12); }
.btn-ghost { color: #bbb5ab; background: transparent; }
.text-link { color: var(--gold-light); font-size: .82rem; }

.form-field { margin-top: 1rem; }
.input, .select, .textarea { width: 100%; min-height: 3rem; border: 1px solid var(--line); border-radius: .7rem; outline: none; background: rgba(24,24,24,.92); padding: .75rem .9rem; color: white; transition: .18s ease; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(220,174,87,.1); }
.textarea { min-height: 5.5rem; resize: vertical; }
.phone-field { display: grid; grid-template-columns: 4.2rem 1fr; gap: .5rem; }
.prefix { display: grid; place-items: center; border: 1px solid var(--line); border-radius: .7rem; background: #181818; color: #d8d2c7; }

.summary-card, .stat-card, .list-card, .notice { border: 1px solid var(--line); border-radius: .8rem; background: linear-gradient(145deg, rgba(31,31,31,.9), rgba(18,18,18,.94)); }
.summary-card { padding: 1rem; }
.notice { padding: .8rem .9rem; color: #c7c0b5; font-size: .78rem; line-height: 1.45; }
.notice.gold { border-color: rgba(220,174,87,.35); background: rgba(220,174,87,.08); color: #ecd6aa; }
.notice.available { border-color: rgba(80,190,91,.38); background: rgba(53,151,62,.12); color: #b8ecbc; }
.notice.red { border-color: rgba(239,92,92,.3); background: rgba(135,22,22,.1); color: #ffb0b0; }

.success-icon { display: grid; place-items: center; width: 4.5rem; height: 4.5rem; margin: 1rem auto; border-radius: 50%; color: white; background: linear-gradient(135deg, #57a967, #267737); box-shadow: 0 0 0 8px rgba(68,150,83,.1); font-size: 2rem; }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.icon-button { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border: 1px solid var(--line); border-radius: .65rem; color: var(--gold-light); background: #161616; }

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; margin: 1rem 0; }
.stat-card { padding: .9rem; }
.stat-card strong { color: var(--gold-light); font-size: 1.35rem; }
.stat-card.available strong { color: #70d17b; }
.appointment-list { display: grid; gap: .5rem; }
.appointment { display: grid; grid-template-columns: 3.5rem 1fr auto; align-items: center; gap: .75rem; min-height: 4.25rem; padding: .75rem; border: 1px solid var(--line); border-radius: .75rem; background: rgba(24,24,24,.85); text-align: left; }
.appointment-time { color: var(--gold-light); font-weight: 700; }
.appointment.available .appointment-time, .appointment.available .appointment-name { color: #6fd478; }
.appointment.blocked { opacity: .55; }
.appointment-name { font-size: .87rem; }
.appointment-meta { margin-top: .15rem; color: #8f8a82; font-size: .68rem; }

.bottom-nav { position: absolute; z-index: 5; right: 0; bottom: 0; left: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border-top: 1px solid var(--line); background: rgba(12,12,12,.95); backdrop-filter: blur(16px); }
.nav-item { position: relative; padding: .85rem .2rem 1rem; color: #88837b; font-size: .7rem; text-align: center; }
.nav-item span { display: block; margin-bottom: .2rem; font-size: 1.1rem; }
.nav-item.is-active { color: var(--gold-light); }
.nav-item.is-active::after { content: ""; position: absolute; right: 32%; bottom: .35rem; left: 32%; height: 2px; border-radius: 3px; background: var(--gold); }

.day-pills { display: grid; grid-template-columns: repeat(7,1fr); gap: .35rem; }
.day-pill { aspect-ratio: 1; border: 1px solid var(--line); border-radius: .65rem; color: #9f9a91; font-size: .7rem; }
.day-pill.is-selected { border-color: var(--gold); color: #0b0b0b; background: var(--gold); }
.two-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
.two-cols > * { min-width: 0; }
.two-cols .input, .two-cols .select { min-width: 0; max-width: 100%; }
.appointment-date-time label { min-width: 0; overflow: hidden; }
.appointment-date-time input[type="date"],
.appointment-date-time input[type="time"] {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-inline-size: 0;
}
.specific-schedule-date-field { min-width: 0; overflow: hidden; }
.specific-schedule-date-field input[type="date"] {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-inline-size: 0;
}
.check-row { display: flex; align-items: center; gap: .65rem; color: #ddd7ce; font-size: .82rem; cursor: pointer; }
.check-row input { width: 1.1rem; height: 1.1rem; accent-color: var(--gold); }
.preview-times { display: flex; flex-wrap: wrap; gap: .35rem; }
.preview-times span { padding: .35rem .5rem; border-radius: .4rem; background: #242424; color: #bbb5ac; font-size: .65rem; }
.schedule-mode { display: grid; grid-template-columns: 1fr 1fr; gap: .35rem; padding: .3rem; border: 1px solid var(--line); border-radius: .8rem; background: rgba(18,18,18,.82); }
.schedule-mode button { padding: .7rem .5rem; border-radius: .55rem; color: var(--muted); font-size: .75rem; font-weight: 650; }
.schedule-mode button.is-active { color: #0b0b0b; background: linear-gradient(135deg, var(--gold-light), var(--gold)); }

.upload-zone { display: grid; place-items: center; min-height: 8rem; border: 1px dashed rgba(220,174,87,.42); border-radius: .8rem; background: radial-gradient(circle, rgba(220,174,87,.12), rgba(20,20,20,.8)); color: #cfc7ba; text-align: center; }
.branding-background-preview { display: grid; place-items: center; min-height: 10rem; overflow: hidden; border: 1px solid rgba(220,174,87,.35); border-radius: .8rem; background: radial-gradient(circle, rgba(220,174,87,.12), rgba(20,20,20,.8)); }
.branding-background-preview img { width: 100%; height: 10rem; object-fit: cover; }

body.is-cropping-logo { overflow: hidden; }
.logo-crop-modal { position: fixed; z-index: 200; inset: 0; display: grid; place-items: center; overflow-y: auto; padding: 1rem; background: rgba(0,0,0,.86); backdrop-filter: blur(10px); }
.logo-crop-dialog { width: min(25rem, 100%); padding: 1.25rem; border: 1px solid rgba(220,174,87,.4); border-radius: 1.15rem; background: #141414; box-shadow: 0 24px 80px rgba(0,0,0,.75); }
.logo-crop-dialog h3 { margin-top: .3rem; font-family: Georgia, serif; font-size: 1.65rem; }
.logo-crop-dialog .muted { margin-top: .4rem; font-size: .78rem; line-height: 1.5; }
.logo-crop-stage { display: grid; place-items: center; width: min(17.5rem, 76vw); aspect-ratio: 1; margin: 1.2rem auto; border: 2px solid var(--gold); border-radius: 50%; overflow: hidden; background: #050505; box-shadow: 0 0 0 999px rgba(0,0,0,.08), 0 10px 35px rgba(0,0,0,.5); }
.logo-crop-stage canvas { display: block; width: 100%; height: 100%; border-radius: 50%; cursor: grab; touch-action: none; user-select: none; }
.logo-crop-stage canvas:active { cursor: grabbing; }
.logo-crop-zoom { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: .8rem; margin: 0 0 1.15rem; color: #e7e2d9; font-size: .8rem; }
.logo-crop-zoom input { width: 100%; accent-color: var(--gold); }

.admin-layout { min-height: 720px; background: #0c0c0c; }
.admin-header { display: flex; align-items: center; justify-content: space-between; padding: 1.15rem 1.4rem; border-bottom: 1px solid var(--line); }
.admin-body { display: grid; grid-template-columns: 13rem 1fr; min-height: 650px; }
.admin-sidebar { padding: 1rem; border-right: 1px solid var(--line); background: #101010; }
.admin-sidebar button { display: block; width: 100%; padding: .75rem; border-radius: .6rem; color: #918c84; text-align: left; font-size: .8rem; }
.admin-sidebar button.is-active { color: var(--gold-light); background: rgba(220,174,87,.08); }
.admin-main { padding: 1.5rem; }
.admin-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: .7rem; }
.shop-row { display: grid; grid-template-columns: 1fr 8rem 8rem auto; align-items: center; gap: 1rem; padding: .9rem; border-bottom: 1px solid var(--line); font-size: .78rem; }
.status { width: fit-content; padding: .25rem .5rem; border-radius: 999px; font-size: .65rem; font-weight: 700; }
.status.active { color: #8ce797; background: rgba(65,159,81,.13); }
.status.trial { color: #f2ce84; background: rgba(220,174,87,.13); }
.status.pending { color: #b7b1a7; background: rgba(255,255,255,.07); }
.status.suspended { color: #ff9797; background: rgba(210,50,50,.12); }
.history-row { padding: .85rem 1rem; border-bottom: 1px solid var(--line); font-size: .75rem; }
.history-row:last-child { border-bottom: 0; }
.mfa-qr { display: grid; place-items: center; width: min(15rem, 100%); margin-inline: auto; padding: .8rem; border-radius: 1rem; background: white; }
.mfa-qr img { display: block; width: 100%; height: auto; }
.mfa-secret { overflow-wrap: anywhere; color: var(--gold-light); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .78rem; letter-spacing: .08em; }

.toast { position: fixed; z-index: 100; right: 1.25rem; bottom: 1.25rem; max-width: 22rem; padding: .8rem 1rem; border: 1px solid rgba(220,174,87,.35); border-radius: .75rem; background: #1c1a17; color: #eee5d6; box-shadow: 0 15px 50px rgba(0,0,0,.55); font-size: .78rem; opacity: 0; transform: translateY(1rem); pointer-events: none; transition: .25s ease; }
.toast.is-visible { opacity: 1; transform: translateY(0); }

@media (max-width: 700px) {
  .app-stage { display: block; padding: 0; }
  .device-shell, .device-shell.is-wide { min-height: 100vh; border-width: 0; border-radius: 0; }
  .device-notch { display: none; }
  .admin-body { display: block; }
  .admin-sidebar { display: none; }
  .admin-grid { grid-template-columns: 1fr; }
  .shop-row { grid-template-columns: 1fr auto; }
  .shop-row > :nth-child(3) { display: none; }
  .schedule-time-fields { grid-template-columns: 1fr; }
  .schedule-time-fields label { width: 100%; min-width: 0; overflow: hidden; }
  .schedule-time-fields input[type="time"] {
    display: block;
    -webkit-appearance: none;
    appearance: none;
    width: -webkit-fill-available;
    min-width: 0;
    max-width: 100%;
    min-inline-size: 0;
    text-align: left;
  }
  .schedule-time-fields input[type="time"]::-webkit-date-and-time-value {
    width: 100%;
    min-width: 0;
    text-align: left;
  }
  .appointment-date-time input[type="date"],
  .appointment-date-time input[type="time"] {
    -webkit-appearance: none;
    appearance: none;
    width: -webkit-fill-available;
    padding-right: .6rem;
    padding-left: .6rem;
    font-size: .82rem;
  }
  .appointment-date-time input::-webkit-date-and-time-value {
    width: 100%;
    min-width: 0;
    text-align: center;
  }
  .specific-schedule-date-field input[type="date"] {
    -webkit-appearance: none;
    appearance: none;
    width: -webkit-fill-available;
  }
  .specific-schedule-date-field input::-webkit-date-and-time-value {
    width: 100%;
    min-width: 0;
    text-align: center;
  }
}
