:root {
    --bs-primary: #0d9488;
    --bs-primary-rgb: 13, 148, 136;
    --bs-primary-text-emphasis: #134e4a;
    --bs-primary-bg-subtle: #ccfbf1;
    --bs-primary-border-subtle: #5eead4;
    --bs-link-color: #0d9488;
    --bs-link-color-rgb: 13, 148, 136;
    --bs-link-hover-color: #0f766e;
    --bs-link-hover-color-rgb: 15, 118, 110;
}

body {
    background: #f7fbfa;
}

a {
    color: var(--bs-link-color);
}

a:hover {
    color: var(--bs-link-hover-color);
}

.btn-primary {
    --bs-btn-bg: #0d9488;
    --bs-btn-border-color: #0d9488;
    --bs-btn-hover-bg: #0f766e;
    --bs-btn-hover-border-color: #0f766e;
    --bs-btn-active-bg: #115e59;
    --bs-btn-active-border-color: #115e59;
    --bs-btn-disabled-bg: #0d9488;
    --bs-btn-disabled-border-color: #0d9488;
    --bs-btn-focus-shadow-rgb: 13, 148, 136;
}

.btn-outline-primary {
    --bs-btn-color: #0d9488;
    --bs-btn-border-color: #0d9488;
    --bs-btn-hover-bg: #0d9488;
    --bs-btn-hover-border-color: #0d9488;
    --bs-btn-active-bg: #0d9488;
    --bs-btn-active-border-color: #0d9488;
    --bs-btn-focus-shadow-rgb: 13, 148, 136;
}

.text-primary {
    color: #0d9488 !important;
}

.bg-primary {
    background-color: #0d9488 !important;
}

.border-primary {
    border-color: #0d9488 !important;
}

.form-check-input:checked {
    background-color: #0d9488;
    border-color: #0d9488;
}

.form-control:focus,
.form-select:focus {
    border-color: #5eead4;
    box-shadow: 0 0 0 0.25rem rgba(13, 148, 136, 0.25);
}

.navbar-brand {
    font-weight: 700;
}

.navbar-brand .bi {
    color: #5eead4;
}

.guest-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.auth-card {
    width: 100%;
    max-width: 380px;
}

.auth-card-wide {
    max-width: 480px;
}

.auth-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #ccfbf1;
    color: #0d9488;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin: 0 auto 1rem;
}

code {
    font-size: 1.1rem;
}

.empty-hero {
    background: linear-gradient(135deg, #f0fdfa 0%, #ccfbf1 100%);
}

.empty-hero-icon {
    width: 76px;
    height: 76px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: #fff;
    color: #0d9488;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.25rem;
    box-shadow: 0 6px 18px rgba(13, 148, 136, 0.18);
}

.empty-step {
    position: relative;
    background: #fff;
    border: 1px solid #99f6e4;
    border-radius: 0.75rem;
    padding: 1.25rem 1rem 1rem;
}

.empty-step-done {
    border-color: #86efac;
    background: #f0fdf4;
}

.empty-step-number {
    position: absolute;
    top: -14px;
    left: 14px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #0d9488;
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-step-done .empty-step-number {
    background: #198754;
}

.table-responsive {
    border-radius: 0.375rem;
}

/* ---------- Agenda: calendario semana / mes ---------- */
.cal-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.cal-week {
    min-width: 760px;
}

.cal-head,
.cal-body {
    display: grid;
    grid-template-columns: 52px repeat(7, 1fr);
}

.cal-head {
    border-bottom: 1px solid #dee2e6;
    background: #f8fafa;
    position: sticky;
    top: 0;
    z-index: 3;
}

.cal-dayhead {
    text-align: center;
    padding: 0.4rem 0.25rem;
    color: #495057;
    text-decoration: none;
    border-left: 1px solid #e9ecef;
}

.cal-dayhead:hover {
    background: #e6f4f1;
}

.cal-dayhead.cal-today {
    background: #ccfbf1;
    color: #0f766e;
}

.cal-hours {
    border-right: 1px solid #e9ecef;
}

.cal-hour {
    position: relative;
    font-size: 0.7rem;
    color: #6c757d;
    text-align: right;
    padding-right: 6px;
}

.cal-hour span {
    position: relative;
    top: -0.5em;
    background: #fff;
    padding-left: 2px;
}

.cal-col {
    position: relative;
    border-left: 1px solid #e9ecef;
    background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--cal-hour) - 1px), #e9ecef calc(var(--cal-hour) - 1px), #e9ecef var(--cal-hour));
}

.cal-today-col {
    background-color: #f0fdfa;
}

.cal-slot {
    position: absolute;
    left: 0;
    right: 0;
    z-index: 1;
}

.cal-slot:hover {
    background: rgba(13, 148, 136, 0.12);
}

.cal-event {
    position: absolute;
    z-index: 2;
    overflow: hidden;
    border-radius: 6px;
    border-left: 4px solid;
    padding: 2px 5px;
    font-size: 0.72rem;
    line-height: 1.2;
    text-decoration: none;
    color: #212529;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

.cal-event:hover {
    z-index: 4;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
}

.cal-ev-sub {
    opacity: 0.75;
}

.cal-ev-pendiente { background: #fff3cd; border-color: #ffc107; }
.cal-ev-confirmada { background: #ccfbf1; border-color: #0d9488; }
.cal-ev-en_espera { background: #cff4fc; border-color: #0dcaf0; }
.cal-ev-atendida { background: #d1e7dd; border-color: #198754; }
.cal-ev-no_asistio { background: #e9ecef; border-color: #6c757d; }

.cal-now {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: #dc3545;
    z-index: 3;
    pointer-events: none;
}

.cal-now::before {
    content: "";
    position: absolute;
    left: -4px;
    top: -3px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #dc3545;
}

.cal-month {
    min-width: 680px;
}

.cal-month-head,
.cal-month-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.cal-month-head {
    background: #f8fafa;
    border-bottom: 1px solid #dee2e6;
}

.cal-cell {
    min-height: 104px;
    padding: 4px 6px;
    border-left: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
    color: #212529;
    text-decoration: none;
    overflow: hidden;
}

.cal-cell:hover {
    background: #f0fdfa;
}

.cal-cell-out {
    background: #fafafa;
    color: #adb5bd;
}

.cal-cell-today {
    background: #ccfbf1;
}

.cal-cell-day {
    font-weight: 600;
    font-size: 0.9rem;
}

.cal-mini {
    font-size: 0.7rem;
    border-left: 3px solid;
    border-radius: 4px;
    padding: 0 4px;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---------- Banner "Instalar app" (PWA) ---------- */
.pwa-banner {
    width: 100%;
    max-width: 380px;
    margin-top: 1rem;
    padding: 1rem 1.1rem;
    display: flex;
    gap: 0.9rem;
    align-items: flex-start;
    color: #fff;
    background: linear-gradient(135deg, #0f766e 0%, #0d9488 60%, #14b8a6 100%);
    border-radius: 1rem;
    box-shadow: 0 10px 28px rgba(13, 148, 136, 0.35);
}

.pwa-banner.d-none {
    display: none !important;
}

.pwa-banner-icon {
    flex: none;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.pwa-banner-title {
    font-weight: 700;
    line-height: 1.25;
}

.pwa-banner-text {
    margin: 0.2rem 0 0.6rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.88);
}

.pwa-ios {
    font-size: 0.82rem;
    background: rgba(255, 255, 255, 0.16);
    border-radius: 0.6rem;
    padding: 0.5rem 0.65rem;
    line-height: 1.6;
}

.pwa-ios i {
    font-size: 1rem;
    vertical-align: -1px;
}

.pw-toggle {
    border-color: #ced4da;
}
