/* ============================================================
   Estudio de Cerámica — Clases · Hoja de estilos principal
   Re-skin CANARIAS-44: identidad del site nuevo (sistema v3)
   Tokens y lenguaje visual = estudiodeceramica.com
   ============================================================ */

:root {
  /* Paleta del site (globals.css del site nuevo) */
  --cream:        #fbfaf8;               /* blanco roto — fondo de página */
  --cream-dark:   #ece5da;               /* arena */
  --cream-mid:    #f4f0e9;               /* arena suave */
  --rose:         #cf8a89;               /* rosa del site, un punto más profundo para legibilidad */
  --rose-light:   #e8c4c3;
  --rose-dark:    #a86463;
  --rose-bg:      #f7eceb;
  --mustard:      #b08d57;               /* dorado arena (reemplaza mostaza) */
  --mustard-light:#dcc9a8;
  --mustard-bg:   #f4ecdf;
  --text:         #3f3b37;               /* tinta */
  --text-light:   #6e6963;               /* piedra */
  --text-muted:   #a09a92;
  --border:       rgba(63, 59, 55, 0.12);  /* hairline del site */
  --border-strong:rgba(63, 59, 55, 0.28);
  --green:        #7a8c6a;
  --green-bg:     #eef1e8;
  --radius:       4px;                   /* el site es cuadrado con esquinas mínimas */
  --radius-lg:    4px;
  --radius-pill:  0;                     /* pills del site: rectángulos outline */
  --font-serif:   "Fraunces", Georgia, serif;
  --font-sans:    "Inter", system-ui, -apple-system, sans-serif;
}

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

body {
  font-family: var(--font-sans);
  background: var(--cream);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── HEADER ── */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.header-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.logo-circle {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--cream-mid);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.logo-text {
  font-family: var(--font-serif);
  font-size: 17px;
  color: var(--text);
  font-weight: 600;
  letter-spacing: 0.03em;
}
.header-nav { display: flex; align-items: center; gap: 16px; }
.header-user { font-size: 13px; color: var(--text-light); }
.nav-link {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-light);
  text-decoration: none;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: transparent;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.nav-link:hover { color: var(--text); border-color: var(--text); background: transparent; }
.nav-logout { color: var(--rose-dark); border-color: var(--rose-light); }
.nav-logout:hover { color: var(--rose-dark); border-color: var(--rose-dark); }

/* ── MAIN ── */
.main-content { flex: 1; padding: 2.5rem 1.5rem; }
.container { max-width: 900px; margin: 0 auto; }
.container-sm { max-width: 460px; margin: 0 auto; }

/* ── CARD ── */
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 1.5rem;
}
.card-title {
  font-family: var(--font-serif);
  font-size: 20px;
  color: var(--text);
  font-weight: 500;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── FORMULARIOS ── */
.form-group { margin-bottom: 1rem; }
.form-group label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-light);
  margin-bottom: 6px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.form-group input,
.form-group select {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  appearance: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--text);
  box-shadow: 0 0 0 3px rgba(225, 156, 155, 0.25);
  background: #fff;
}

/* ── BOTONES (pills outline del site) ── */
.btn {
  display: inline-block;
  padding: 11px 22px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--text);
  background: transparent;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.btn:active { transform: none; }
.btn:hover { background: var(--text); color: #fff; }
.btn-primary { background: var(--text); color: #fff; width: 100%; padding: 12px; font-size: 12px; }
.btn-primary:hover { background: #2b2825; border-color: #2b2825; }
.btn-mustard { border-color: var(--mustard); color: var(--mustard); background: transparent; }
.btn-mustard:hover { background: var(--mustard); color: #fff; }
.btn-outline { background: transparent; color: var(--text-light); border: 1px solid var(--border-strong); }
.btn-outline:hover { background: transparent; color: var(--text); border-color: var(--text); }
.btn-danger {
  background: transparent; color: var(--rose-dark);
  border: 1px solid var(--rose-light);
  font-size: 10px; padding: 6px 12px;
}
.btn-danger:hover { background: transparent; color: var(--rose-dark); border-color: var(--rose-dark); }

/* ── AVISOS ── */
.notice {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; border-radius: var(--radius);
  font-size: 13px; margin-bottom: 1.25rem;
}
.notice-warning { background: var(--mustard-bg); border: 1px solid var(--mustard-light); color: var(--text); }
.notice-info    { background: var(--cream-mid);  border: 1px solid var(--border); color: var(--text); }
.notice-success { background: var(--green-bg);   border: 1px solid var(--green); color: #55663f; }
.notice-error   { background: var(--rose-bg);    border: 1px solid var(--rose); color: var(--rose-dark); }
.notice-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }

/* ── LOGO CENTRADO (login/registro) ── */
.page-logo {
  text-align: center;
  margin-bottom: 1.75rem;
}
.page-logo .logo-circle {
  width: 52px; height: 52px;
  margin: 0 auto 8px;
  font-size: 22px;
}
.page-logo .logo-text {
  font-size: 24px;
  display: block;
  margin-bottom: 4px;
}
.page-logo .logo-sub {
  font-size: 11px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-light);
}
.divider {
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
  letter-spacing: 2px;
  margin: 1rem 0;
}
.alt-link { text-align: center; font-size: 13px; color: var(--text-light); }
.alt-link a { color: var(--text); text-decoration: underline; text-decoration-color: var(--rose); text-underline-offset: 3px; }

/* ── CALENDARIO ── */
.week-nav {
  display: flex; align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.week-nav .week-title {
  font-family: var(--font-serif);
  font-size: 16px; font-weight: 500; color: var(--text);
}
.btn-week {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-light);
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.2s, border-color 0.2s;
}
.btn-week:hover { background: transparent; color: var(--text); border-color: var(--text); }

.cal-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-bottom: 1.5rem;
}
.day-col { display: flex; flex-direction: column; gap: 0; }
.day-header {
  text-align: center;
  padding: 6px 4px 8px;
}
.day-name {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.date-num {
  display: block;
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.2;
}
.date-num.hoy { color: var(--rose-dark); }

.clase-slot {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 10px 8px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  text-decoration: none;
  display: block;
  background: #fff;
}
.clase-slot:hover { border-color: var(--text); box-shadow: none; }
.clase-slot.apuntado { background: var(--rose-bg); border-color: var(--rose-light); }
.clase-slot.completa { background: var(--cream-mid); opacity: 0.65; cursor: default; pointer-events: none; }
.clase-slot.jueves   { border-left: 3px solid var(--mustard); }
.clase-slot.jueves.apuntado { background: var(--mustard-bg); border-color: var(--mustard-light); }
.clase-slot.sin-clase { background: none; border: none; cursor: default; pointer-events: none; }

.slot-time  { font-size: 10px; color: var(--text-muted); margin-bottom: 3px; }
.slot-spots { font-size: 12px; font-weight: 500; margin-bottom: 4px; }
.slot-spots.ok  { color: var(--green); }
.slot-spots.low { color: var(--mustard); }
.slot-spots.cero{ color: var(--text-muted); }
.slot-badge {
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 2px;
  padding: 2px 6px;
  display: inline-block;
  margin-bottom: 3px;
}
.slot-badge.rose    { background: var(--rose);    color: #fff; }
.slot-badge.mustard { background: var(--mustard); color: #fff; }
.slot-cancel {
  font-size: 10px; color: var(--rose-dark);
  border: none; background: none;
  cursor: pointer; text-decoration: underline;
  padding: 0; display: block; margin: 3px auto 0;
}
.slot-hint { font-size: 10px; color: var(--text-muted); margin-top: 4px; }

/* Leyenda */
.legend {
  display: flex; gap: 14px; flex-wrap: wrap;
  margin-bottom: 1rem;
}
.legend-item { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--text-light); }
.legend-dot  { width: 10px; height: 10px; border-radius: 2px; }

/* Mis clases */
.my-classes-title {
  font-family: var(--font-serif);
  font-size: 16px; font-weight: 500;
  color: var(--text); margin-bottom: 10px;
}
.my-class-item {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  background: var(--rose-bg);
  border: 1px solid var(--rose-light);
  border-radius: var(--radius);
  margin-bottom: 7px;
}
.my-class-item.jueves { background: var(--mustard-bg); border-color: var(--mustard-light); }
.my-class-info { font-size: 13px; font-weight: 500; color: var(--text); }
.my-class-meta { font-size: 11px; color: var(--text-light); margin-top: 2px; }

/* ── ADMIN ── */
.admin-table {
  width: 100%; border-collapse: collapse; font-size: 13px;
}
.admin-table th {
  text-align: left; padding: 8px 10px;
  font-size: 10px; font-weight: 500;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  text-transform: uppercase; letter-spacing: 0.1em;
}
.admin-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.admin-table tr:last-child td { border-bottom: none; }
.badge {
  font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase;
  border-radius: 2px; padding: 2px 8px; font-weight: 500;
}
.badge-active  { background: var(--green-bg); color: #55663f; }
.badge-pending { background: var(--mustard-bg); color: #7d6335; }
.badge-admin   { background: var(--rose-bg);   color: var(--rose-dark); }

.add-row { display: flex; gap: 8px; margin-top: 12px; }
.add-row select {
  flex: 1; padding: 8px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius); background: #fff;
  color: var(--text); font-family: var(--font-sans); font-size: 13px;
}

/* ── FOOTER ── */
.site-footer {
  background: var(--cream-mid);
  border-top: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
  text-align: center;
}
.footer-inner { max-width: 900px; margin: 0 auto; }
.site-footer p { font-size: 12px; color: var(--text-light); }
.site-footer a { color: var(--text); text-decoration: underline; text-decoration-color: var(--rose); text-underline-offset: 3px; }

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  .cal-grid { grid-template-columns: repeat(3, 1fr); }
  .cal-grid .day-col:nth-child(4),
  .cal-grid .day-col:nth-child(5) { grid-column: span 1; }
  .card { padding: 1.25rem; }
  .header-user { display: none; }
}
@media (max-width: 400px) {
  .cal-grid { grid-template-columns: repeat(2, 1fr); }
  .date-num { font-size: 18px; }
}

/* ── LOGO IMG ── */
.logo-img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 0;
}

/* ── ADMIN SUBMENU ── */
.admin-tabs {
  display: flex;
  gap: 18px;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
  flex-wrap: wrap;
}
.admin-tab {
  padding: 8px 2px 10px;
  border-radius: 0;
  border: none;
  border-bottom: 1px solid transparent;
  background: transparent;
  color: var(--text-light);
  cursor: pointer;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  text-decoration: none;
  display: inline-block;
  transition: color 0.2s, border-color 0.2s;
  margin-bottom: -1px;
}
.admin-tab:hover { background: transparent; color: var(--text); }
.admin-tab.active {
  background: transparent;
  color: var(--text);
  border-bottom-color: var(--rose);
}

/* ── CALENDARIO MENSUAL ── */
.cal-month-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.cal-month-header {
  text-align: center;
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
  padding: 6px 0;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.cal-month-day {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 6px 4px;
  min-height: 64px;
  background: #fff;
  font-size: 11px;
  cursor: pointer;
  transition: border-color 0.2s;
  position: relative;
}
.cal-month-day:hover { border-color: var(--text); }
.cal-month-day.vacio { background: none; border-color: transparent; cursor: default; }
.cal-month-day.finde { background: var(--cream-mid); cursor: default; }
.cal-month-day.hoy   { border-color: var(--rose-dark); }
.cal-month-day .day-n {
  font-size: 13px; font-weight: 500;
  color: var(--text); display: block; margin-bottom: 4px;
}
.cal-month-day.hoy .day-n { color: var(--rose-dark); }
.pill-clase {
  display: block;
  font-size: 9px;
  border-radius: 2px;
  padding: 2px 4px;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pill-libre    { background: var(--green-bg); color: #55663f; }
.pill-apuntado { background: var(--rose-bg);  color: var(--rose-dark); }
.pill-completa { background: var(--cream-mid); color: var(--text-muted); }

/* Vista anual */
.cal-year-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.cal-year-month { }
.cal-year-month-title {
  font-family: var(--font-serif);
  font-size: 14px; font-weight: 500;
  color: var(--text); margin-bottom: 6px;
}
.cal-year-mini {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.cal-year-mini span {
  font-size: 9px; text-align: center;
  padding: 2px 1px; border-radius: 2px;
  color: var(--text-light);
}
.cal-year-mini .has-clase { background: var(--rose-bg); color: var(--rose-dark); font-weight: 500; }
.cal-year-mini .apuntado  { background: var(--rose); color: #fff; font-weight: 500; }
.cal-year-mini .vacio     { color: transparent; }
.cal-year-mini .head      { color: var(--text-muted); font-weight: 500; }

@media (max-width: 600px) {
  .cal-year-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-tabs { gap: 12px; }
  .admin-tab  { padding: 7px 2px 9px; font-size: 10px; }
}

/* ── PANTALLA DE INICIO: DOS TARJETAS GRANDES ── */
.inicio-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}
.inicio-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
  padding: 2rem 1.25rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
  transition: border-color 0.2s;
  min-height: 200px;
  color: var(--text);
}
.inicio-card:hover {
  border-color: var(--text);
  box-shadow: none;
  transform: none;
}
.creditos-card  { border-color: var(--border); }
.calendario-card { border-color: var(--border); }
.creditos-card:hover  { border-color: var(--text); box-shadow: none; }
.calendario-card:hover { border-color: var(--text); box-shadow: none; }

.inicio-card-icon  { font-size: 2.6rem; margin-bottom: .6rem; }
.inicio-card-titulo {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: .5rem;
  letter-spacing: 0;
}
.inicio-card-valor {
  font-family: var(--font-serif);
  font-size: 3rem;
  font-weight: 600;
  line-height: 1;
  color: var(--rose-dark);
  margin-bottom: .3rem;
}
.creditos-card .inicio-card-valor { color: var(--mustard); }
.inicio-card-valor.sin-creditos   { color: var(--text-muted); }
.inicio-card-sub {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: .5rem;
}
.inicio-card-caduca {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: .25rem;
  line-height: 1.4;
}

@media (max-width: 480px) {
  .inicio-grid { grid-template-columns: 1fr; }
  .inicio-card { min-height: 160px; padding: 1.5rem 1rem; }
  .inicio-card-valor { font-size: 2.2rem; }
}

/* ── VISTA CRÉDITOS ── */
.credito-lote {
  background: var(--mustard-bg);
  border: 1px solid var(--mustard-light);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 10px;
}
.credito-cantidad {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  color: var(--mustard);
  margin-bottom: 3px;
}
.credito-caduca {
  font-size: 13px;
  color: var(--text-light);
}
.credito-notas {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  font-style: italic;
}
.credito-total {
  font-size: 14px;
  color: var(--text);
  border-top: 1px solid var(--border);
  padding-top: 12px;
  margin-top: 4px;
  text-align: right;
}
.credito-total strong { color: var(--mustard); }

/* ── BADGE DE CRÉDITOS EN VISTA SEMANA ── */
.creditos-badge-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding: 8px 12px;
  background: var(--mustard-bg);
  border: 1px solid var(--mustard-light);
  border-radius: var(--radius);
}
.creditos-badge {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}
.creditos-badge.sin-creditos { color: var(--rose-dark); }

/* ── VISTA MES: mejoras ── */
.pill-ultima { background: var(--mustard-bg); color: #7d6335; border: 1px solid var(--mustard-light); }
.cal-month-day.pasado { opacity: 0.5; }
.cal-month-day.pasado:hover { border-color: var(--border); }

/* ── HISTORIAL DE ASISTENCIA ── */
.my-class-item.pasado {
  background: var(--cream-mid);
  border-color: var(--border);
  opacity: 0.8;
}

/* Header compacto en mobile: wordmark en una línea */
@media (max-width: 480px) {
  .logo-text { font-size: 14px; }
  .logo-img  { width: 32px; height: 32px; }
  .header-nav { gap: 8px; }
  .nav-link { padding: 6px 10px; font-size: 10px; }
}

/* Navegador de semanas/meses cómodo en mobile */
@media (max-width: 480px) {
  .week-nav { gap: 8px; }
  .week-nav .week-title { font-size: 13px; text-align: center; flex: 1; }
  .btn-week { padding: 5px 10px; font-size: 9px; white-space: nowrap; }
}
/* En pantallas muy angostas con sesión iniciada, el gato solo ya identifica */
@media (max-width: 430px) {
  .site-header .logo-text { display: none; }
  .page-logo .logo-text { display: block; }
}
