/* =========================================================
   CALENDARIO.CSS — LOGIN / ADMIN CALENDARIO
   Estilo premium alineado con SK Wellness Center
   ========================================================= */

:root{
  --bg: #f7f3ed;
  --paper: #fffdf9;
  --surface: #ffffff;
  --surface-soft: #f9f4ec;

  --ink: #1f1a16;
  --muted: #6c6258;

  --brand: #1f3b2c;
  --brand-dark: #163023;
  --gold: #b58a3a;
  --gold-2: #d0a553;
  --gold-soft: #f4dfb0;

  --line: #eadfce;
  --line-strong: #e5cfb0;

  --shadow-sm: 0 10px 24px rgba(20,20,20,.05);
  --shadow-md: 0 18px 40px rgba(20,20,20,.08);
  --shadow-lg: 0 28px 60px rgba(20,20,20,.12);

  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-xl: 30px;

  --ring: 0 0 0 4px rgba(181,138,58,.18);
}

/* =========================================================
   BASE
   ========================================================= */

html,
body{
  margin: 0;
  padding: 0;
}

body{
  min-height: 100vh;
  font-family: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(900px 500px at 0% 0%, rgba(181,138,58,.08), transparent 58%),
    radial-gradient(800px 500px at 100% 100%, rgba(31,59,44,.06), transparent 56%),
    linear-gradient(180deg, #faf7f2 0%, #f3ece2 100%);
}

*,
*::before,
*::after{
  box-sizing: border-box;
}

img{
  max-width: 100%;
  display: block;
}

a{
  color: inherit;
}

:focus-visible{
  outline: none;
  box-shadow: var(--ring);
  border-radius: 12px;
}

/* =========================================================
   LAYOUT
   ========================================================= */

.container{
  width: min(1120px, calc(100% - 28px));
  margin: 0 auto;
}

.page-shell{
  padding: 28px 0 44px;
}

.page-head{
  margin-bottom: 22px;
  text-align: center;
}

.page-kicker{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 14px;
  margin-bottom: 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(244,236,224,.96));
  border: 1px solid rgba(181,138,58,.18);
  color: #8a6a30;
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.92),
    0 8px 20px rgba(31,24,19,.04);
}

.page-title{
  margin: 0 0 10px;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.02;
  letter-spacing: -.04em;
  color: #1f1813;
}

.page-subtitle{
  max-width: 760px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.8;
}

/* =========================================================
   TOPBAR / NAV
   ========================================================= */

.nav-login{
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(247,243,238,.88);
  border-bottom: 1px solid rgba(0,0,0,.06);
}

.nav-login .container{
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.nav-login .brand{
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.nav-login .brand-badge{
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-grid;
  place-items: center;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(135deg, #d6a24a, #9f7426);
  box-shadow: 0 10px 24px rgba(181,138,58,.28);
}

.nav-login .brand-text{
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.nav-login .brand-title{
  font-weight: 900;
  font-size: .98rem;
  line-height: 1.1;
  color: #1f1a16;
}

.nav-login .brand-subtitle{
  margin-top: 2px;
  color: #75685b;
  font-size: .82rem;
  line-height: 1.3;
}

.nav-login .nav-actions{
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.nav-login a,
.nav-login button{
  appearance: none;
  border: 2px solid var(--brand, #1f3b2c) !important;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  background: #fff;
  color: var(--brand, #1f3b2c) !important;
  text-decoration: none;
  font-weight: 800;
  font-size: .94rem;
  cursor: pointer;
  transition:
    transform .18s ease,
    box-shadow .22s ease,
    background .22s ease,
    color .22s ease,
    border-color .22s ease;
  box-shadow: 0 10px 22px rgba(31,24,19,.05);
}

.nav-login a:hover,
.nav-login button:hover{
  transform: translateY(-1px);
  background: var(--brand, #1f3b2c) !important;
  color: #fff !important;
  box-shadow: 0 16px 30px rgba(31,59,44,.22);
}

.nav-login .is-gold{
  border-color: rgba(171,116,38,.18) !important;
  background: linear-gradient(135deg, var(--gold) 0%, #9b6d24 100%);
  color: #fffdf8 !important;
  box-shadow: 0 12px 24px rgba(181,138,58,.24);
}

.nav-login .is-gold:hover{
  background: linear-gradient(135deg, #c79643 0%, #8e641f 100%) !important;
  color: #fff !important;
  box-shadow: 0 18px 34px rgba(181,138,58,.30);
}

/* =========================================================
   GRID GENERAL
   ========================================================= */

.admin-grid{
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  gap: 22px;
  align-items: start;
}

.admin-grid--single{
  grid-template-columns: 1fr;
}

.card-admin{
  position: relative;
  min-width: 0;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(181,138,58,.14);
  background:
    radial-gradient(260px 140px at 0% 0%, rgba(181,138,58,.08), transparent 72%),
    linear-gradient(180deg, rgba(255,255,255,.99) 0%, rgba(246,239,229,.98) 100%);
  box-shadow:
    0 22px 44px rgba(31,24,19,.08),
    0 8px 18px rgba(31,24,19,.04),
    inset 0 1px 0 rgba(255,255,255,.96);
}

.card-admin::after{
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 27px;
  border: 1px solid rgba(255,255,255,.42);
  pointer-events: none;
}

.card-admin > *{
  position: relative;
  z-index: 1;
}

.card-head{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 22px 22px 0;
  flex-wrap: wrap;
}

.card-head h2,
.card-head h3{
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.25rem, 2vw, 1.7rem);
  line-height: 1.1;
  letter-spacing: -.03em;
  color: #1f1813;
}

.card-head p{
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: .95rem;
}

.card-body{
  padding: 22px;
}

.card-foot{
  padding: 0 22px 22px;
}

/* =========================================================
   KPI / STATS
   ========================================================= */

.stats-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.stat-card{
  min-width: 0;
  padding: 16px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(181,138,58,.12);
  box-shadow: 0 10px 24px rgba(31,24,19,.05);
}

.stat-label{
  color: #7c6d5f;
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.stat-value{
  margin-top: 8px;
  font-size: 1.5rem;
  font-weight: 900;
  color: #1f1a16;
  line-height: 1.1;
}

.stat-sub{
  margin-top: 6px;
  color: #6b6259;
  font-size: .9rem;
  line-height: 1.5;
}

/* =========================================================
   FORMULARIOS
   ========================================================= */

.form-grid{
  display: grid;
  gap: 14px;
}

.form-grid.cols-2{
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field{
  display: grid;
  gap: 8px;
  min-width: 0;
}

.field label{
  color: #5f5348;
  font-size: .9rem;
  font-weight: 800;
}

.field input,
.field select,
.field textarea{
  width: 100%;
  min-height: 50px;
  padding: 0 16px;
  border-radius: 16px;
  border: 1px solid rgba(181,138,58,.16);
  background: rgba(255,255,255,.98);
  color: #1f1a16;
  font: inherit;
  box-shadow:
    0 8px 18px rgba(31,24,19,.04),
    inset 0 1px 0 rgba(255,255,255,.9);
  transition:
    border-color .18s ease,
    box-shadow .18s ease,
    background .18s ease;
}

.field textarea{
  min-height: 120px;
  padding: 14px 16px;
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder{
  color: #9a8f84;
}

.field input:focus,
.field select:focus,
.field textarea:focus{
  outline: none;
  border-color: rgba(181,138,58,.38);
  box-shadow:
    0 0 0 4px rgba(181,138,58,.12),
    0 10px 18px rgba(31,24,19,.05);
  background: #fff;
}

.form-actions{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.btn-admin{
  appearance: none;
  border: 1px solid transparent;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 800;
  font-size: .95rem;
  cursor: pointer;
  transition:
    transform .18s ease,
    box-shadow .22s ease,
    background .22s ease,
    color .22s ease,
    border-color .22s ease;
}

.btn-admin--primary{
  background: linear-gradient(135deg, var(--brand) 0%, #2f5a44 100%);
  color: #fffdf8;
  box-shadow: 0 14px 28px rgba(31,59,44,.20);
}

.btn-admin--primary:hover{
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(31,59,44,.26);
}

.btn-admin--gold{
  background: linear-gradient(135deg, var(--gold) 0%, #9b6d24 100%);
  color: #fffdf8;
  box-shadow: 0 14px 28px rgba(181,138,58,.24);
}

.btn-admin--gold:hover{
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(181,138,58,.30);
}

.btn-admin--ghost{
  background: #fff;
  border-color: rgba(181,138,58,.16);
  color: #7a5118;
  box-shadow:
    0 10px 22px rgba(31,24,19,.06),
    inset 0 1px 0 rgba(255,255,255,.92);
}

.btn-admin--ghost:hover{
  transform: translateY(-1px);
  border-color: rgba(181,138,58,.24);
  background: #fffdfa;
}

/* =========================================================
   TABLAS / LISTADOS
   ========================================================= */

.table-wrap{
  overflow-x: auto;
  border-radius: 20px;
  border: 1px solid rgba(181,138,58,.14);
  background: #fff;
  box-shadow: 0 12px 24px rgba(31,24,19,.05);
}

.table-admin{
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

.table-admin thead th{
  padding: 14px 14px;
  text-align: left;
  font-size: .8rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #7a6d61;
  border-bottom: 1px solid #efe6d8;
  background: #fffaf3;
}

.table-admin tbody td{
  padding: 14px 14px;
  border-bottom: 1px solid #f3eadf;
  color: #40362d;
  vertical-align: top;
}

.table-admin tbody tr:hover{
  background: #fffdf9;
}

.badge-level{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .04em;
  border: 1px solid transparent;
}

.badge-level.l1{
  background: #e8f5ea;
  color: #1b5e20;
  border-color: #d1ead5;
}

.badge-level.l2{
  background: #fff3d8;
  color: #8a4b00;
  border-color: #ffe3b2;
}

.badge-level.l3{
  background: #fde3e3;
  color: #7a0b0b;
  border-color: #f6c3c3;
}

.row-actions{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.row-actions button,
.row-actions a{
  appearance: none;
  border: 1px solid rgba(181,138,58,.16);
  background: #fff;
  color: #7a5118;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 999px;
  font-weight: 800;
  font-size: .84rem;
  text-decoration: none;
  cursor: pointer;
  transition: all .18s ease;
}

.row-actions button:hover,
.row-actions a:hover{
  transform: translateY(-1px);
  background: #fff8ec;
  border-color: rgba(181,138,58,.26);
}

.row-actions .danger{
  border-color: rgba(185,28,28,.14);
  color: #991b1b;
}

.row-actions .danger:hover{
  background: #fff1f1;
  border-color: rgba(185,28,28,.24);
}

/* =========================================================
   ALERTAS / MENSAJES
   ========================================================= */

.alert{
  padding: 14px 16px;
  border-radius: 16px;
  font-size: .94rem;
  line-height: 1.65;
  border: 1px solid transparent;
}

.alert + .alert{
  margin-top: 10px;
}

.alert-success{
  background: #edf8f0;
  color: #1f5f33;
  border-color: #d2ead8;
}

.alert-warning{
  background: #fff8e9;
  color: #8a5a08;
  border-color: #f4dfb0;
}

.alert-error{
  background: #fff1f1;
  color: #991b1b;
  border-color: #f3c6c6;
}

.alert-info{
  background: #f6f8fb;
  color: #465467;
  border-color: #dce3ea;
}

/* =========================================================
   LOGIN BOX
   ========================================================= */

.login-wrap{
  min-height: calc(100vh - 74px);
  display: grid;
  place-items: center;
  padding: 28px 0 44px;
}

.login-card{
  width: min(520px, calc(100% - 24px));
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  border: 1px solid rgba(181,138,58,.14);
  background:
    radial-gradient(260px 140px at 0% 0%, rgba(181,138,58,.10), transparent 72%),
    linear-gradient(180deg, rgba(255,255,255,.99) 0%, rgba(246,239,229,.98) 100%);
  box-shadow:
    0 28px 58px rgba(31,24,19,.10),
    0 10px 22px rgba(31,24,19,.05),
    inset 0 1px 0 rgba(255,255,255,.96);
}

.login-card::after{
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 29px;
  border: 1px solid rgba(255,255,255,.42);
  pointer-events: none;
}

.login-card > *{
  position: relative;
  z-index: 1;
}

.login-head{
  padding: 28px 26px 10px;
  text-align: center;
}

.login-badge{
  width: 70px;
  height: 70px;
  margin: 0 auto 16px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #d6a24a, #9f7426);
  color: #fff;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.4rem;
  font-weight: 800;
  box-shadow: 0 14px 28px rgba(181,138,58,.26);
}

.login-title{
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  line-height: 1.06;
  letter-spacing: -.03em;
  color: #1f1813;
}

.login-subtitle{
  margin: 12px auto 0;
  max-width: 34ch;
  color: var(--muted);
  line-height: 1.8;
  font-size: .97rem;
}

.login-body{
  padding: 18px 26px 28px;
}

/* =========================================================
   EMPTY / HELP BOX
   ========================================================= */

.empty-box{
  padding: 18px;
  border-radius: 18px;
  background: linear-gradient(180deg, #fff 0%, #fcf7f0 100%);
  border: 1px dashed rgba(181,138,58,.24);
  color: #6b5f54;
  line-height: 1.7;
}

.help-list{
  margin: 0;
  padding-left: 18px;
  color: #5f5348;
  line-height: 1.75;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 980px){
  .admin-grid{
    grid-template-columns: 1fr;
  }

  .stats-grid{
    grid-template-columns: 1fr;
  }

  .form-grid.cols-2{
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px){
  .nav-login .container{
    min-height: auto;
    padding: 12px 0;
    flex-direction: column;
    align-items: stretch;
  }

  .nav-login .brand{
    justify-content: center;
  }

  .nav-login .nav-actions{
    width: 100%;
  }

  .nav-login a,
  .nav-login button{
    width: 100%;
    justify-content: center;
  }

  .page-shell{
    padding: 22px 0 34px;
  }

  .card-admin{
    border-radius: 24px;
  }

  .card-admin::after{
    border-radius: 23px;
  }

  .card-head,
  .card-body,
  .card-foot{
    padding-left: 18px;
    padding-right: 18px;
  }

  .table-admin{
    min-width: 620px;
  }

  .login-card{
    border-radius: 24px;
  }

  .login-card::after{
    border-radius: 23px;
  }

  .login-head{
    padding: 24px 18px 10px;
  }

  .login-body{
    padding: 18px;
  }
}

@media (max-width: 560px){
  .container{
    width: min(1120px, calc(100% - 20px));
  }

  .card-head,
  .card-body,
  .card-foot{
    padding-left: 16px;
    padding-right: 16px;
  }

  .login-wrap{
    padding: 18px 0 28px;
  }

  .login-card{
    width: min(520px, calc(100% - 16px));
  }
}

@media (prefers-reduced-motion: reduce){
  *,
  *::before,
  *::after{
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}