:root {
    --verde: #3B8E7D;
    --verde-dark: #2F3A38;
    --verde-light: #e8f5f2;
    --gris: #f5f5f7;
    --border: #e0e6ed;
    --texto: #3C3C43;
    --sombra: 0 4px 20px rgba(0,0,0,0.08);
  }

  .turnos-page {
    max-width: 560px;
    margin: 40px auto 60px;
    padding: 0 16px;
  }

  .turnos-intro {
    text-align: center;
    margin-bottom: 28px;
  }
  .turnos-intro h1 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 800;
    color: var(--verde-dark);
    margin-bottom: 6px;
  }
  .turnos-intro p {
    color: #777;
    font-size: .95rem;
  }

  .t-card {
    background: #fff;
    border-radius: 18px;
    padding: 20px;
    box-shadow: var(--sombra);
    margin-bottom: 16px;
  }
  .t-card-title {
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--verde);
    margin-bottom: 14px;
  }

  .cal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
  }
  .cal-header .month-label {
    font-weight: 700;
    font-size: 1rem;
    color: var(--verde-dark);
  }
  .cal-arrows {
    display: flex;
    gap: 6px;
  }
  .cal-arrow {
    width: 32px; height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--gris);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: var(--verde-dark);
    transition: background .2s;
  }
  .cal-arrow:hover { background: var(--verde-light); }

  .cal-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    margin-bottom: 8px;
  }
  .cal-days span {
    font-size: .75rem;
    font-weight: 700;
    color: #aaa;
    padding: 4px 0;
  }

  .cal-dates {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    text-align: center;
  }
  .cal-dates span {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: .9rem;
    cursor: pointer;
    transition: all .15s;
    font-weight: 600;
  }
  .cal-dates span:not(.disabled):not(.full):not(.past):hover {
    background: var(--verde-light);
    color: var(--verde);
  }
  .cal-dates span.active {
    background: var(--verde);
    color: #fff;
  }
  .cal-dates span.disabled,
  .cal-dates span.past {
    color: #ddd;
    cursor: default;
    pointer-events: none;
  }
  .cal-dates span.today:not(.active) {
    border: 2px solid var(--verde);
    color: var(--verde);
  }
  .cal-dates span.full {
    color: #ccc;
    cursor: default;
    pointer-events: none;
    position: relative;
  }
  .cal-dates span.full::after {
    content: "";
    width: 4px; height: 4px;
    border-radius: 50%;
    background: #e74c3c;
    position: absolute;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
  }

  .horarios-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
  }
  @media (max-width: 400px) {
    .horarios-grid { grid-template-columns: repeat(3, 1fr); }
  }

  .hora-btn {
    padding: 10px 4px;
    border: 2px solid var(--border);
    border-radius: 10px;
    background: #fff;
    font-family: inherit;
    font-size: .88rem;
    font-weight: 700;
    color: var(--texto);
    cursor: pointer;
    transition: all .15s;
    text-align: center;
  }
  .hora-btn:hover:not(:disabled) {
    border-color: var(--verde);
    color: var(--verde);
    background: var(--verde-light);
  }
  .hora-btn.selected {
    background: var(--verde);
    border-color: var(--verde);
    color: #fff;
  }
  .hora-btn:disabled {
    opacity: .35;
    cursor: not-allowed;
    text-decoration: line-through;
  }
  .horarios-vacio {
    text-align: center;
    color: #aaa;
    font-size: .9rem;
    padding: 12px 0;
  }
  .horarios-placeholder {
    text-align: center;
    color: #bbb;
    font-size: .9rem;
    padding: 16px 0;
  }

  .cobertura-toggle {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
  }
  .cob-btn {
    flex: 1;
    padding: 10px;
    border: 2px solid var(--border);
    border-radius: 10px;
    background: #fff;
    font-family: inherit;
    font-size: .9rem;
    font-weight: 700;
    color: #888;
    cursor: pointer;
    transition: all .2s;
    text-align: center;
  }
  .cob-btn.active {
    border-color: var(--verde);
    background: var(--verde-light);
    color: var(--verde);
  }

  #obra-social-wrapper {
    display: none;
    animation: fadeDown .2s ease;
  }
  #obra-social-wrapper.show { display: block; }

  @keyframes fadeDown {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .t-input {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-family: inherit;
    font-size: .95rem;
    color: var(--texto);
    transition: border-color .2s;
    margin-bottom: 10px;
    background: #fff;
  }
  .t-input:focus {
    outline: none;
    border-color: var(--verde);
    box-shadow: 0 0 0 3px rgba(59,142,125,.1);
  }

  .resumen {
    background: var(--verde-light);
    border-radius: 10px;
    padding: 12px 14px;
    font-size: .88rem;
    color: var(--verde-dark);
    margin-bottom: 14px;
    display: none;
  }
  .resumen.show { display: block; }
  .resumen strong { color: var(--verde); }

  .btn-reservar {
    width: 100%;
    padding: 15px;
    background: var(--verde);
    color: #fff;
    border: none;
    border-radius: 14px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all .2s;
    box-shadow: 0 6px 16px rgba(59,142,125,.3);
    letter-spacing: .3px;
  }
  .btn-reservar:hover { background: #327a6b; transform: translateY(-1px); }
  .btn-reservar:active { transform: scale(.98); }
  .btn-reservar:disabled { opacity: .6; cursor: not-allowed; transform: none; }

  .modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.45);
    display: flex; align-items: center; justify-content: center;
    z-index: 9999; padding: 1rem;
    animation: fadeIn .15s ease;
  }
  @keyframes fadeIn { from { opacity:0 } to { opacity:1 } }

  .modal-box {
    background: #fff;
    border-radius: 20px;
    padding: 2rem;
    max-width: 360px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    animation: slideUp .2s ease;
  }
  @keyframes slideUp {
    from { transform: translateY(20px); opacity:0 }
    to { transform: translateY(0); opacity:1 }
  }

  .confirmado-box {
    background: #fff;
    border-radius: 20px;
    padding: 2.5rem 2rem;
    max-width: 380px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    animation: slideUp .3s ease;
  }
  .confirmado-check {
    width: 72px; height: 72px;
    background: var(--verde);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 20px;
    font-size: 2rem;
    animation: popIn .4s cubic-bezier(.34,1.56,.64,1);
  }
  @keyframes popIn {
    from { transform: scale(0); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
  }
  .confirmado-box h2 {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--verde-dark);
    margin-bottom: 8px;
  }
  .confirmado-box .conf-detalle {
    background: var(--verde-light);
    border-radius: 12px;
    padding: 14px;
    margin: 16px 0;
    font-size: .9rem;
    color: var(--verde-dark);
    line-height: 1.7;
  }
  .confirmado-box p.conf-email {
    font-size: .85rem;
    color: #888;
    margin-bottom: 20px;
  }

  .modal-icon { font-size: 2.5rem; margin-bottom: .5rem; }
  .modal-box h3 { margin: 0 0 .5rem; font-size: 1.1rem; color: var(--verde-dark); font-weight: 800; }
  .modal-box p { color: #666; font-size: .9rem; line-height: 1.5; }
  .modal-actions { display: flex; gap: .75rem; justify-content: center; margin-top: 1.5rem; }
  .modal-btn-ok {
    background: var(--verde); color: #fff;
    border: none; border-radius: 10px;
    padding: .65rem 1.5rem; font-size: .95rem;
    cursor: pointer; font-weight: 700; font-family: inherit;
  }
  .modal-btn-ok:hover { background: #327a6b; }
  .modal-btn-cancel {
    background: var(--gris); color: #333;
    border: none; border-radius: 10px;
    padding: .65rem 1.2rem; font-size: .95rem;
    cursor: pointer; font-family: inherit;
  }
  .modal-btn-cancel:hover { background: var(--border); }

  .cal-leyenda {
    display: flex;
    gap: 14px;
    justify-content: center;
    margin-top: 12px;
    flex-wrap: wrap;
  }
  .cal-leyenda span {
    font-size: .75rem;
    color: #888;
    display: flex;
    align-items: center;
    gap: 5px;
  }
  .leg-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    display: inline-block;
  }

  .spinner {
    display: inline-block;
    width: 16px; height: 16px;
    border: 2px solid rgba(255,255,255,.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .6s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
  }
  @keyframes spin { to { transform: rotate(360deg); } }

  @media (min-width: 600px) {
    .turnos-page { padding: 0 24px; }
    .t-card { padding: 24px; }
    .horarios-grid { grid-template-columns: repeat(4, 1fr); }
  }