/* =========================================================
   RESERVORA
   Hoja de estilos principal
   ========================================================= */

:root {
    --coral: #ff5a3c;
    --coral-dark: #e8472d;
    --orange: #ff8a3d;
    --pink: #e83e6f;
    --green: #21b573;
    --yellow: #f4a629;

    --cream: #fff7f2;
    --cream-dark: #fbeee7;
    --white: #ffffff;

    --ink: #302a2a;
    --muted: #746a68;
    --muted-light: #a59895;

    --line: #f1ded6;
    --line-light: #f8ebe5;

    --shadow-sm: 0 8px 24px rgba(112, 57, 39, 0.08);
    --shadow-md: 0 20px 50px rgba(112, 57, 39, 0.12);
    --shadow-lg: 0 35px 80px rgba(112, 57, 39, 0.16);

    --radius-sm: 14px;
    --radius-md: 20px;
    --radius-lg: 28px;
    --radius-pill: 999px;
}

/* =========================================================
   BASE
   ========================================================= */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    background: #fffdfb;
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
}

button,
input,
select,
textarea {
    font: inherit;
}

main {
    min-height: calc(100vh - 144px);
}

/* =========================================================
   CABECERA
   ========================================================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 253, 251, 0.9);
    border-bottom: 1px solid rgba(241, 222, 214, 0.75);
    backdrop-filter: blur(18px);
}

.nav-shell {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    color: var(--ink);
    font-size: 1.45rem;
    font-weight: 850;
    letter-spacing: -0.04em;
    text-decoration: none;
}

.brand:hover {
    color: var(--ink);
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    color: var(--white);
    background: linear-gradient(
        135deg,
        var(--coral),
        var(--orange)
    );
    border-radius: 13px 13px 13px 4px;
    box-shadow: 0 9px 22px rgba(255, 90, 60, 0.28);
}

.nav-link-soft {
    color: var(--ink);
    font-weight: 650;
    text-decoration: none;
}

.nav-link-soft:hover {
    color: var(--coral);
}

.user-chip {
    color: var(--muted);
    font-size: 0.9rem;
}

/* =========================================================
   BOTONES
   ========================================================= */

.btn {
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        background-color 0.18s ease,
        border-color 0.18s ease;
}

.btn-coral {
    color: var(--white);
    background: linear-gradient(
        135deg,
        var(--coral),
        var(--orange)
    );
    border: 0;
    border-radius: var(--radius-pill);
    font-weight: 750;
    box-shadow: 0 10px 25px rgba(255, 90, 60, 0.22);
}

.btn-coral:hover,
.btn-coral:focus {
    color: var(--white);
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(255, 90, 60, 0.3);
}

.btn-outline-coral {
    color: var(--coral);
    background: transparent;
    border: 1px solid var(--coral);
    border-radius: var(--radius-pill);
}

.btn-outline-coral:hover {
    color: var(--white);
    background: var(--coral);
}

.btn-light-soft {
    color: var(--ink);
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    font-weight: 700;
}

.btn-light-soft:hover {
    color: var(--coral);
    background: var(--white);
    border-color: rgba(255, 90, 60, 0.4);
    transform: translateY(-1px);
}

/* =========================================================
   ELEMENTOS GENERALES
   ========================================================= */

.eyebrow {
    display: inline-flex;
    padding: 0.5rem 0.85rem;
    margin-bottom: 1.2rem;
    color: var(--coral);
    background: rgba(255, 90, 60, 0.09);
    border-radius: var(--radius-pill);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.alert {
    border: 0;
    border-radius: 16px;
}

.alert-danger {
    color: #812d24;
    background: #fff0ed;
}

.alert-success {
    color: #146746;
    background: #e9f8f1;
}

/* =========================================================
   FORMULARIOS GENERALES
   ========================================================= */

.form-label {
    margin-bottom: 0.55rem;
    color: var(--ink);
    font-weight: 700;
}

.form-control,
.form-select {
    color: var(--ink);
    background-color: var(--white);
    border-color: var(--line);
    border-radius: var(--radius-sm);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 0.25rem rgba(255, 138, 61, 0.14);
}

.form-control::placeholder {
    color: #b8aaa7;
}

.form-text {
    margin-top: 0.55rem;
    color: var(--muted);
}

.input-group-text {
    color: var(--muted);
    background: var(--cream);
    border-color: var(--line);
}

/* =========================================================
   HOME
   ========================================================= */

.hero {
    overflow: hidden;
    padding: 7rem 0;
    background:
        radial-gradient(
            circle at 88% 16%,
            rgba(255, 138, 61, 0.28),
            transparent 26%
        ),
        radial-gradient(
            circle at 12% 88%,
            rgba(232, 62, 111, 0.14),
            transparent 24%
        ),
        var(--cream);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: 6rem;
}

.hero h1 {
    max-width: 720px;
    font-size: clamp(3rem, 6vw, 5.6rem);
    line-height: 0.98;
    letter-spacing: -0.065em;
    font-weight: 880;
}

.hero h1 span {
    color: var(--coral);
}

.hero-copy {
    max-width: 640px;
    margin: 1.8rem 0;
    color: var(--muted);
    font-size: 1.18rem;
    line-height: 1.75;
}

.trust-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
    margin-top: 2rem;
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 650;
}

.calendar-card {
    padding: 1.3rem;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    transform: none;
}

.calendar-top {
    display: flex;
    justify-content: space-between;
    padding: 0.4rem 0.3rem 1.2rem;
}

.calendar-top small,
.appointment small {
    display: block;
    color: var(--muted);
}

.live-pill {
    align-self: center;
    padding: 0.4rem 0.7rem;
    color: #16835a;
    background: #e4f8ef;
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: 750;
}

.appointment,
.free-slot {
    display: grid;
    grid-template-columns: 70px 1fr;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    margin: 0.7rem 0;
    border-radius: 18px;
}

.appointment > span,
.free-slot > span {
    font-weight: 800;
}

.appointment.orange {
    background: #fff0e6;
    border-left: 5px solid var(--orange);
}

.appointment.pink {
    background: #fff0f4;
    border-left: 5px solid var(--pink);
}

.appointment.yellow {
    background: #fff8dd;
    border-left: 5px solid var(--yellow);
}

.free-slot {
    grid-template-columns: 70px 1fr auto;
    color: #16835a;
    border: 2px dashed #aadfc8;
}

.free-slot button {
    width: 36px;
    height: 36px;
    color: var(--white);
    background: var(--green);
    border: 0;
    border-radius: 50%;
    font-size: 1.35rem;
}

.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    padding-top: 6rem;
    padding-bottom: 6rem;
}

.features article,
.dashboard-grid article {
    padding: 2rem;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 24px;
}

.features article > span {
    color: var(--coral);
    font-weight: 850;
}

.features h2 {
    margin-top: 1.1rem;
    font-size: 1.35rem;
}

.features p {
    color: var(--muted);
    line-height: 1.65;
}

/* =========================================================
   LOGIN
   ========================================================= */

.auth-section {
    min-height: calc(100vh - 144px);
    display: grid;
    place-items: center;
    padding: 4rem 1rem;
    background: var(--cream);
}

.auth-card {
    width: min(100%, 520px);
    padding: 3rem;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--white);
    border-radius: 30px;
    box-shadow: var(--shadow-md);
}

.auth-card h1 {
    font-weight: 850;
    letter-spacing: -0.04em;
}

.auth-card > p {
    color: var(--muted);
}

/* =========================================================
   INSTALADOR
   ========================================================= */

.install-section {
    min-height: calc(100vh - 144px);
    padding: 4rem 1rem;
    background: var(--cream);
}

.install-shell {
    width: min(1100px, 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 0.82fr 1.18fr;
    align-items: center;
    gap: 3rem;
}

.install-intro h1 {
    max-width: 500px;
    font-size: clamp(2.6rem, 5vw, 4.3rem);
    line-height: 1;
    letter-spacing: -0.06em;
    font-weight: 880;
}

.install-intro > p {
    max-width: 510px;
    color: var(--muted);
    line-height: 1.7;
}

.install-steps {
    margin: 2.3rem 0 0;
    padding: 0;
    list-style: none;
}

.install-steps li {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1rem 0;
    color: #aa9e9b;
}

.install-steps li > span {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 50%;
    font-weight: 800;
}

.install-steps li strong,
.install-steps li small {
    display: block;
}

.install-steps li.active {
    color: var(--ink);
}

.install-steps li.active > span {
    color: var(--white);
    background: var(--coral);
    border-color: var(--coral);
}

.install-card {
    padding: 2.7rem;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.95);
    border-radius: 30px;
    box-shadow: var(--shadow-md);
}

.install-card h2 {
    font-weight: 850;
    letter-spacing: -0.04em;
}

.install-card > p {
    color: var(--muted);
}

.form-section-label {
    margin: 1.5rem 0 0.85rem;
    color: var(--coral);
    font-size: 0.76rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* =========================================================
   DASHBOARD
   ========================================================= */

.dashboard-hero {
    min-height: calc(100vh - 144px);
    padding: 5rem 0;
    background: var(--cream);
}

.dashboard-hero h1 {
    font-size: 3rem;
    font-weight: 850;
    letter-spacing: -0.05em;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
    margin-top: 2.5rem;
}

.dashboard-grid strong,
.dashboard-grid span {
    display: block;
}

.dashboard-grid strong {
    color: var(--coral);
    font-size: 2.4rem;
}

.dashboard-grid span {
    color: var(--muted);
}

/* =========================================================
   PÁGINAS DE ERROR
   ========================================================= */

.error-page {
    min-height: calc(100vh - 144px);
    display: grid;
    place-items: center;
    padding: 4rem 1rem;
    text-align: center;
    background: var(--cream);
}

.error-code {
    display: block;
    color: var(--coral);
    font-size: 6rem;
    font-weight: 900;
    letter-spacing: -0.08em;
    line-height: 1;
}

.error-content {
    width: min(100%, 680px);
    margin: 0 auto;
    padding: 3rem;
    text-align: center;
}

.error-content .eyebrow {
    margin: 1rem 0 1.25rem;
}

.error-content h1 {
    margin-bottom: 1rem;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 850;
    letter-spacing: -0.05em;
}

.error-content p {
    max-width: 560px;
    margin: 0 auto 2rem;
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.7;
}

/* =========================================================
   LISTADO DE RECURSOS
   ========================================================= */

.resources-page {
    min-height: calc(100vh - 144px);
    padding: 4rem 0 6rem;
    background:
        radial-gradient(
            circle at 95% 0,
            rgba(255, 138, 61, 0.13),
            transparent 25%
        ),
        var(--cream);
}

.page-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.page-heading .eyebrow {
    margin-bottom: 0.9rem;
}

.page-heading h1 {
    margin: 0;
    font-size: clamp(2.8rem, 6vw, 4.6rem);
    font-weight: 880;
    letter-spacing: -0.065em;
}

.page-heading p {
    max-width: 680px;
    margin: 0.8rem 0 0;
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.7;
}

.resource-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.summary-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.3rem;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
}

.summary-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 15px;
    font-weight: 850;
}

.summary-icon-coral {
    color: var(--coral);
    background: rgba(255, 90, 60, 0.11);
}

.summary-icon-green {
    color: #16835a;
    background: rgba(33, 181, 115, 0.12);
}

.summary-icon-pink {
    color: var(--pink);
    background: rgba(232, 62, 111, 0.11);
}

.summary-card strong,
.summary-card span {
    display: block;
}

.summary-card strong {
    color: var(--ink);
    font-size: 1.5rem;
    line-height: 1.1;
}

.summary-card div > span {
    margin-top: 0.25rem;
    color: var(--muted);
    font-size: 0.86rem;
}

.resource-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 1.4rem;
}

.resource-toolbar strong,
.resource-toolbar span {
    display: block;
}

.resource-toolbar > div:first-child > span {
    margin-top: 0.25rem;
    color: var(--muted);
    font-size: 0.88rem;
}

.resource-legend {
    display: flex;
    gap: 1rem;
}

.resource-legend > span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--muted);
    font-size: 0.82rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    display: inline-block;
    border-radius: 50%;
}

.status-dot.active {
    background: var(--green);
}

.status-dot.inactive {
    background: #b9aeab;
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.4rem;
}

.resource-card {
    position: relative;
    overflow: hidden;
    padding: 1.6rem;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: var(--shadow-sm);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        opacity 0.2s ease;
}

.resource-card::before {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 4px;
    content: "";
    background: var(--resource-color, var(--coral));
}

.resource-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.resource-card-inactive {
    opacity: 0.72;
    background: #fbf9f8;
}

.resource-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.resource-identity {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.resource-avatar {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    color: var(--white);
    background: var(--resource-color, var(--coral));
    border-radius: 17px 17px 17px 6px;
    font-size: 1.3rem;
    font-weight: 850;
    box-shadow: 0 10px 24px
        color-mix(
            in srgb,
            var(--resource-color, var(--coral)) 30%,
            transparent
        );
}

.resource-type {
    display: block;
    margin-bottom: 0.2rem;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.resource-identity h2 {
    overflow: hidden;
    margin: 0;
    font-size: 1.25rem;
    font-weight: 820;
    letter-spacing: -0.03em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.resource-status {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    flex: 0 0 auto;
    padding: 0.38rem 0.65rem;
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: 750;
}

.resource-status i {
    width: 7px;
    height: 7px;
    display: inline-block;
    border-radius: 50%;
}

.resource-status.is-active {
    color: #16714e;
    background: #e7f8f0;
}

.resource-status.is-active i {
    background: var(--green);
}

.resource-status.is-inactive {
    color: #766b68;
    background: #f1ecea;
}

.resource-status.is-inactive i {
    background: #a99e9b;
}

.resource-description {
    min-height: 52px;
    margin: 1.3rem 0;
    color: var(--muted);
    line-height: 1.6;
}

.resource-description-empty {
    color: var(--muted-light);
    font-style: italic;
}

.resource-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
    padding: 1rem;
    background: var(--cream);
    border-radius: 17px;
}

.resource-details > div {
    min-width: 0;
}

.resource-details span,
.resource-details strong {
    display: block;
}

.resource-details span {
    margin-bottom: 0.2rem;
    color: var(--muted);
    font-size: 0.72rem;
}

.resource-details strong {
    overflow: hidden;
    color: var(--ink);
    font-size: 0.88rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.resource-card-footer {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-top: 1.3rem;
}

.resource-card-footer form {
    flex: 1;
    margin: 0;
}

.resource-edit-button,
.resource-toggle-button {
    width: 100%;
    padding: 0.65rem 1rem;
    border-radius: var(--radius-pill);
    font-size: 0.86rem;
    font-weight: 750;
}

.resource-edit-button {
    flex: 1;
    color: var(--ink);
    background: var(--white);
    border: 1px solid var(--line);
}

.resource-edit-button:hover {
    color: var(--coral);
    border-color: rgba(255, 90, 60, 0.4);
}

.resource-toggle-button.deactivate {
    color: #8b5149;
    background: #fff4f1;
    border: 1px solid #f5d9d2;
}

.resource-toggle-button.deactivate:hover {
    color: #a03729;
    background: #ffe8e2;
}

.resource-toggle-button.activate {
    color: #16714e;
    background: #eaf9f2;
    border: 1px solid #cceede;
}

.resource-toggle-button.activate:hover {
    color: #0f6040;
    background: #dcf6ea;
}

/* =========================================================
   ESTADO VACÍO DE RECURSOS
   ========================================================= */

.empty-resource-state {
    max-width: 720px;
    margin: 2rem auto 0;
    padding: 4rem 2rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid var(--line);
    border-radius: 30px;
    box-shadow: var(--shadow-md);
}

.empty-resource-illustration {
    position: relative;
    width: 150px;
    height: 95px;
    margin: 0 auto 2rem;
}

.empty-resource-illustration span {
    position: absolute;
    bottom: 0;
    width: 62px;
    height: 72px;
    border-radius: 22px 22px 22px 8px;
    box-shadow: var(--shadow-sm);
}

.empty-resource-illustration span:nth-child(1) {
    left: 0;
    background: var(--coral);
    transform: rotate(-8deg);
}

.empty-resource-illustration span:nth-child(2) {
    left: 44px;
    z-index: 2;
    height: 90px;
    background: var(--orange);
}

.empty-resource-illustration span:nth-child(3) {
    right: 0;
    background: var(--pink);
    transform: rotate(8deg);
}

.empty-resource-state h2 {
    margin-bottom: 0.8rem;
    font-size: 2rem;
    font-weight: 850;
    letter-spacing: -0.045em;
}

.empty-resource-state p {
    max-width: 520px;
    margin: 0 auto 1.8rem;
    color: var(--muted);
    line-height: 1.7;
}

/* =========================================================
   FORMULARIO DE RECURSOS
   ========================================================= */

.resource-form-page {
    min-height: calc(100vh - 144px);
    padding: 3rem 0 6rem;
    background:
        radial-gradient(
            circle at 100% 0,
            rgba(255, 138, 61, 0.13),
            transparent 28%
        ),
        var(--cream);
}

.form-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 2rem;
    color: var(--muted);
    font-size: 0.85rem;
}

.form-breadcrumb a {
    color: var(--muted);
    text-decoration: none;
}

.form-breadcrumb a:hover {
    color: var(--coral);
}

.form-breadcrumb > span:last-child {
    color: var(--ink);
    font-weight: 700;
}

.resource-form-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 2rem;
}

.resource-form-heading .eyebrow {
    margin-bottom: 0.8rem;
}

.resource-form-heading h1 {
    margin: 0;
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 880;
    letter-spacing: -0.06em;
}

.resource-form-heading p {
    max-width: 680px;
    margin: 0.8rem 0 0;
    color: var(--muted);
    line-height: 1.7;
}

.resource-heading-actions {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.resource-form-errors {
    margin-bottom: 1.5rem;
    padding: 1.2rem 1.4rem;
}

.resource-form-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.55fr);
    align-items: start;
    gap: 1.4rem;
}

.resource-form-main {
    display: grid;
    gap: 1.4rem;
}

.resource-form-sidebar {
    position: sticky;
    top: 96px;
    display: grid;
    gap: 1.1rem;
}

.form-card {
    overflow: hidden;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: var(--shadow-sm);
}

.form-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.4rem 1.6rem;
    background: linear-gradient(
        180deg,
        #ffffff,
        #fffaf7
    );
    border-bottom: 1px solid var(--line-light);
}

.form-card-header h2 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 820;
    letter-spacing: -0.025em;
}

.form-card-header p {
    margin: 0.25rem 0 0;
    color: var(--muted);
    font-size: 0.83rem;
}

.form-card-number {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    color: var(--coral);
    background: rgba(255, 90, 60, 0.1);
    border-radius: 13px;
    font-size: 0.78rem;
    font-weight: 850;
}

.form-card-body {
    padding: 1.6rem;
}

.required-mark {
    color: var(--coral);
}

/* =========================================================
   TIPOS DE RECURSO
   ========================================================= */

.resource-type-options {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.7rem;
}

.resource-type-option {
    cursor: pointer;
}

.resource-type-option input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.resource-type-option-content {
    min-height: 130px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 17px;
    transition:
        border-color 0.18s ease,
        background-color 0.18s ease,
        box-shadow 0.18s ease,
        transform 0.18s ease;
}

.resource-type-option-content i {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    margin-bottom: 0.8rem;
    color: var(--coral);
    background: rgba(255, 90, 60, 0.1);
    border-radius: 11px;
    font-size: 0.8rem;
    font-style: normal;
    font-weight: 850;
}

.resource-type-option-content strong {
    font-size: 0.9rem;
}

.resource-type-option-content small {
    margin-top: 0.3rem;
    color: var(--muted);
    line-height: 1.4;
}

.resource-type-option:hover .resource-type-option-content {
    border-color: rgba(255, 90, 60, 0.35);
    transform: translateY(-1px);
}

.resource-type-option input:checked
    + .resource-type-option-content {
    background: #fff7f3;
    border-color: var(--coral);
    box-shadow: 0 0 0 3px rgba(255, 90, 60, 0.08);
}

.member-field {
    padding: 1rem;
    margin-bottom: 1.5rem;
    background: var(--cream);
    border-radius: 17px;
}

.member-field-notice {
    margin-top: 0.8rem;
    padding: 0.75rem;
    color: #8b654c;
    background: #fff4dd;
    border-radius: 12px;
    font-size: 0.82rem;
}

/* =========================================================
   VISTA PREVIA Y COLORES
   ========================================================= */

.resource-preview {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1rem;
    background:
        linear-gradient(
            135deg,
            color-mix(
                in srgb,
                var(--preview-color, var(--coral)) 10%,
                white
            ),
            white
        );
    border: 1px solid
        color-mix(
            in srgb,
            var(--preview-color, var(--coral)) 22%,
            var(--line)
        );
    border-radius: 17px;
}

.resource-preview-avatar {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    color: var(--white);
    background: var(--preview-color, var(--coral));
    border-radius: 15px 15px 15px 5px;
    font-size: 1.15rem;
    font-weight: 850;
}

.resource-preview small,
.resource-preview strong {
    display: block;
}

.resource-preview small {
    margin-bottom: 0.2rem;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
}

.resource-preview strong {
    overflow: hidden;
    max-width: 190px;
    color: var(--ink);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.color-field {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.7rem;
    background: var(--cream);
    border: 1px solid var(--line);
    border-radius: 14px;
}

.color-field input[type="color"] {
    width: 44px;
    height: 38px;
    padding: 0;
    background: transparent;
    border: 0;
    cursor: pointer;
}

.color-field input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-field input[type="color"]::-webkit-color-swatch {
    border: 0;
    border-radius: 10px;
}

.color-field span {
    color: var(--muted);
    font-family: ui-monospace, monospace;
    font-size: 0.85rem;
    font-weight: 700;
}

.color-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 0.8rem;
}

.color-preset {
    width: 28px;
    height: 28px;
    padding: 0;
    background: var(--preset-color);
    border: 3px solid var(--white);
    border-radius: 50%;
    box-shadow: 0 0 0 1px var(--line);
    cursor: pointer;
    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease;
}

.color-preset:hover {
    transform: scale(1.12);
    box-shadow:
        0 0 0 2px var(--white),
        0 0 0 3px var(--preset-color);
}

/* =========================================================
   INTERRUPTOR DE ESTADO
   ========================================================= */

.status-form-card .form-card-body {
    padding: 1.2rem 1.4rem;
}

.resource-status-switch {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
}

.resource-status-switch span {
    min-width: 0;
}

.resource-status-switch strong,
.resource-status-switch small {
    display: block;
}

.resource-status-switch strong {
    font-size: 0.95rem;
}

.resource-status-switch small {
    margin-top: 0.3rem;
    color: var(--muted);
    line-height: 1.45;
}

.resource-status-switch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.resource-status-switch i {
    position: relative;
    width: 48px;
    height: 28px;
    background: #d8cfcc;
    border-radius: var(--radius-pill);
    transition: background-color 0.2s ease;
}

.resource-status-switch i::after {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 20px;
    height: 20px;
    content: "";
    background: var(--white);
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(48, 42, 42, 0.18);
    transition: transform 0.2s ease;
}

.resource-status-switch input:checked + i {
    background: var(--green);
}

.resource-status-switch input:checked + i::after {
    transform: translateX(20px);
}

.resource-status-switch input:focus-visible + i {
    box-shadow: 0 0 0 4px rgba(33, 181, 115, 0.16);
}

.resource-form-actions {
    display: grid;
    gap: 0.7rem;
}

/* =========================================================
   FOOTER
   ========================================================= */

.site-footer {
    color: var(--muted);
    background: #fffdfb;
    border-top: 1px solid var(--line);
    font-size: 0.88rem;
}

.footer-row {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1100px) {
    .resource-type-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .resource-form-layout {
        grid-template-columns: minmax(0, 1fr) 320px;
    }
}

@media (max-width: 900px) {
    .hero {
        padding: 4rem 0;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .calendar-card {
        transform: none;
    }

    .features,
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .install-shell {
        grid-template-columns: 1fr;
    }

    .user-chip {
        display: none;
    }

    .page-heading,
    .resource-form-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .resource-summary {
        grid-template-columns: repeat(3, 1fr);
    }

    .resources-grid {
        grid-template-columns: 1fr;
    }

    .resource-form-layout {
        grid-template-columns: 1fr;
    }

    .resource-form-sidebar {
        position: static;
    }
}

@media (max-width: 700px) {
    .resources-page,
    .resource-form-page {
        padding-top: 2.5rem;
    }

    .resource-summary {
        grid-template-columns: 1fr;
    }

    .resource-toolbar {
        align-items: flex-start;
        flex-direction: column;
        gap: 1rem;
    }

    .resource-type-options {
        grid-template-columns: 1fr 1fr;
    }

    .resource-heading-actions {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 520px) {
    .nav-link-soft {
        display: none;
    }

    .hero h1 {
        font-size: 3.1rem;
    }

    .auth-card,
    .install-card {
        padding: 2rem 1.4rem;
    }

    .page-heading h1,
    .resource-form-heading h1 {
        font-size: 2.7rem;
    }

    .resource-card {
        padding: 1.2rem;
    }

    .resource-card-top {
        align-items: flex-start;
        flex-direction: column;
    }

    .resource-status {
        align-self: flex-start;
    }

    .resource-details {
        grid-template-columns: 1fr;
    }

    .resource-card-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .resource-card-footer form {
        width: 100%;
    }

    .resource-type-options {
        grid-template-columns: 1fr;
    }

    .resource-type-option-content {
        min-height: auto;
    }

    .form-card-header,
    .form-card-body {
        padding: 1.2rem;
    }

    .footer-row {
        flex-direction: column;
        justify-content: center;
        gap: 0.35rem;
    }
}

/* =========================================================
   ADMINISTRACIÓN DE PLATAFORMA
   Negocios, propietarios y formularios
   ========================================================= */

.page-shell {
    min-height: calc(100vh - 144px);
    padding: 2.5rem 0 5rem;
    background:
        radial-gradient(
            circle at top right,
            rgba(255, 138, 61, 0.1),
            transparent 32rem
        ),
        #fffdfb;
}

/* Migas de pan */

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin: 0 0 1.5rem;
    padding: 0;
    color: var(--muted);
    background: transparent;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: var(--muted);
    text-decoration: none;
    transition: color 0.18s ease;
}

.breadcrumb a:hover {
    color: var(--coral);
}

.breadcrumb span[aria-hidden="true"] {
    color: var(--muted-light);
}

/* Cabecera de página */

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 2rem;
}

.page-header__eyebrow {
    margin-bottom: 0.55rem;
    color: var(--coral);
    font-size: 0.78rem;
    font-weight: 850;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.page-header h1 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(2rem, 4vw, 3.15rem);
    font-weight: 880;
    letter-spacing: -0.055em;
    line-height: 1.05;
}

.page-header p {
    max-width: 720px;
    margin: 0.85rem 0 0;
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.65;
}

.page-header__title-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.85rem;
}

.page-header__actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    flex-shrink: 0;
}

/* Botones utilizados en las nuevas vistas */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 44px;
    padding: 0.75rem 1.25rem;
    color: var(--ink);
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    font-weight: 750;
    line-height: 1;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition:
        color 0.18s ease,
        background 0.18s ease,
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        transform 0.18s ease;
}

.button:hover {
    color: var(--coral);
    border-color: rgba(255, 90, 60, 0.45);
    transform: translateY(-1px);
}

.button--primary {
    color: var(--white);
    background: linear-gradient(
        135deg,
        var(--coral),
        var(--orange)
    );
    border-color: transparent;
    box-shadow: 0 10px 24px rgba(255, 90, 60, 0.22);
}

.button--primary:hover,
.button--primary:focus {
    color: var(--white);
    box-shadow: 0 14px 30px rgba(255, 90, 60, 0.3);
}

.button--secondary {
    color: var(--ink);
    background: var(--white);
    border-color: var(--line);
}

.button--secondary:hover {
    color: var(--coral);
    background: var(--cream);
}

.button--ghost {
    color: var(--coral);
    background: transparent;
    border-color: transparent;
}

.button--ghost:hover {
    color: var(--coral-dark);
    background: var(--cream);
}

.button--success {
    color: #14764f;
    background: #eaf8f1;
    border-color: #bfe8d3;
}

.button--success:hover {
    color: #0e6040;
    background: #dff4e9;
    border-color: #9ddbbc;
}

.button--danger {
    color: #b52d2d;
    background: #fff0f0;
    border-color: #f2c1c1;
}

.button--danger:hover {
    color: #992121;
    background: #ffe4e4;
    border-color: #e9a5a5;
}

.button--small {
    min-height: 36px;
    padding: 0.55rem 0.85rem;
    font-size: 0.83rem;
}

/* Tarjetas de estadísticas */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.stat-card__icon {
    display: grid;
    place-items: center;
    width: 50px;
    height: 50px;
    flex: 0 0 50px;
    border-radius: 17px;
    font-size: 1.25rem;
    font-weight: 850;
}

.stat-card__icon--orange {
    color: var(--coral-dark);
    background: #fff0e6;
}

.stat-card__icon--green {
    color: #14764f;
    background: #e8f8f0;
}

.stat-card__icon--yellow {
    color: #94640d;
    background: #fff7d9;
}

.stat-card__icon--red {
    color: #b52d2d;
    background: #fff0f0;
}

.stat-card__content {
    min-width: 0;
}

.stat-card__label {
    display: block;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 650;
    text-overflow: ellipsis;
}

.stat-card__value {
    display: block;
    margin-top: 0.15rem;
    color: var(--ink);
    font-size: 1.75rem;
    font-weight: 880;
    letter-spacing: -0.04em;
}

/* Paneles */

.panel {
    overflow: hidden;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.panel__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.5rem 1.75rem;
    border-bottom: 1px solid var(--line-light);
}

.panel__header h2 {
    margin: 0;
    color: var(--ink);
    font-size: 1.25rem;
    font-weight: 820;
}

.panel__header p {
    margin: 0.4rem 0 0;
    color: var(--muted);
    line-height: 1.55;
}

/* Tablas */

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 1rem 1.15rem;
    border-bottom: 1px solid var(--line-light);
    text-align: left;
    vertical-align: middle;
}

.data-table th {
    color: var(--muted);
    background: #fffaf7;
    font-size: 0.73rem;
    font-weight: 850;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    white-space: nowrap;
}

.data-table td {
    color: var(--ink);
    font-size: 0.9rem;
}

.data-table tbody tr {
    transition: background 0.18s ease;
}

.data-table tbody tr:hover {
    background: #fffaf7;
}

.data-table tbody tr:last-child td {
    border-bottom: 0;
}

.data-table__row--selected {
    background: #fff5ef;
}

.data-table__actions-heading {
    text-align: right !important;
}

.table-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.inline-form {
    display: inline-flex;
    margin: 0;
}

/* Celdas de negocio y usuario */

.business-cell,
.user-cell {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 210px;
}

.business-cell__avatar,
.user-cell__avatar {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    color: var(--white);
    background: linear-gradient(
        135deg,
        var(--coral),
        var(--orange)
    );
    border-radius: 15px 15px 15px 5px;
    font-weight: 850;
    box-shadow: 0 8px 18px rgba(255, 90, 60, 0.2);
}

.business-cell__content,
.user-cell__content {
    min-width: 0;
}

.business-cell__content strong,
.business-cell__content span,
.user-cell__content strong,
.user-cell__content a {
    display: block;
}

.business-cell__content strong,
.user-cell__content strong {
    color: var(--ink);
    font-weight: 780;
}

.business-cell__content > span,
.user-cell__content a {
    overflow: hidden;
    margin-top: 0.15rem;
    color: var(--muted);
    font-size: 0.78rem;
    text-decoration: none;
    text-overflow: ellipsis;
}

.user-cell__content a:hover {
    color: var(--coral);
}

.current-business-label {
    width: max-content;
    margin-top: 0.35rem !important;
    padding: 0.2rem 0.5rem;
    color: var(--coral-dark) !important;
    background: #fff0e6;
    border-radius: var(--radius-pill);
    font-size: 0.68rem !important;
    font-weight: 800;
}

/* Estados */

.status-badge,
.count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: max-content;
    padding: 0.35rem 0.65rem;
    border-radius: var(--radius-pill);
    font-size: 0.72rem;
    font-weight: 800;
    white-space: nowrap;
}

.count-badge {
    min-width: 30px;
    color: var(--coral-dark);
    background: #fff0e6;
}

.status-badge--active {
    color: #14764f;
    background: #e8f8f0;
}

.status-badge--trial {
    color: #94640d;
    background: #fff7d9;
}

.status-badge--suspended {
    color: #a15b10;
    background: #fff0df;
}

.status-badge--expired,
.status-badge--closed,
.status-badge--inactive {
    color: #a72a2a;
    background: #fff0f0;
}

.assignment-summary {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 180px;
}

.assignment-summary__names {
    display: block;
    max-width: 260px;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.83rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.muted-text {
    color: var(--muted-light);
    font-size: 0.85rem;
}

/* Estados vacíos */

.empty-state {
    padding: 4rem 2rem;
    text-align: center;
}

.empty-state--compact {
    padding: 2rem;
    background: var(--cream);
    border: 1px dashed var(--line);
    border-radius: var(--radius-md);
}

.empty-state__icon {
    display: grid;
    place-items: center;
    width: 68px;
    height: 68px;
    margin: 0 auto 1.25rem;
    background: var(--cream);
    border-radius: 22px;
    font-size: 1.8rem;
}

.empty-state h3 {
    margin: 0;
    font-weight: 820;
}

.empty-state p {
    max-width: 560px;
    margin: 0.65rem auto 1.4rem;
    color: var(--muted);
    line-height: 1.6;
}

/* Alertas nuevas */

.alert--error,
.alert--warning,
.alert--info,
.alert--success {
    margin-bottom: 1.5rem;
    padding: 1rem 1.15rem;
    border: 1px solid;
    border-radius: var(--radius-md);
}

.alert--error {
    color: #8d2020;
    background: #fff0f0;
    border-color: #efbbbb;
}

.alert--warning {
    color: #80520e;
    background: #fff8df;
    border-color: #efd991;
}

.alert--info {
    color: #744430;
    background: #fff3ec;
    border-color: #f3cdbd;
}

.alert--success {
    color: #126544;
    background: #eaf8f1;
    border-color: #bce4cf;
}

.alert--error p,
.alert--warning p,
.alert--info p,
.alert--success p {
    margin: 0.35rem 0 0;
}

.alert--error ul {
    margin: 0.65rem 0 0;
    padding-left: 1.25rem;
}

/* Formularios de plataforma */

.entity-form {
    display: grid;
    gap: 1.25rem;
}

.form-card {
    overflow: hidden;
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.form-card__header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.4rem 1.6rem;
    background:
        linear-gradient(
            135deg,
            rgba(255, 90, 60, 0.06),
            rgba(255, 138, 61, 0.02)
        );
    border-bottom: 1px solid var(--line-light);
}

.form-card__icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 15px;
    font-size: 1.2rem;
    box-shadow: var(--shadow-sm);
}

.form-card__header h2 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 820;
}

.form-card__header p {
    margin: 0.35rem 0 0;
    color: var(--muted);
    line-height: 1.55;
}

.form-card__body {
    padding: 1.6rem;
}

.form-grid {
    display: grid;
    gap: 1.15rem;
}

.form-grid--two-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-group {
    min-width: 0;
}

.form-group label {
    display: block;
    margin-bottom: 0.45rem;
    color: var(--ink);
    font-size: 0.87rem;
    font-weight: 750;
}

.form-group input,
.form-group select,
.form-group textarea {
    display: block;
    width: 100%;
    min-height: 48px;
    padding: 0.75rem 0.9rem;
    color: var(--ink);
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 14px;
    outline: none;
    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease;
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--coral);
    box-shadow: 0 0 0 4px rgba(255, 90, 60, 0.1);
}

.form-help {
    display: block;
    margin-top: 0.45rem;
    color: var(--muted);
    font-size: 0.76rem;
    line-height: 1.45;
}

.required-mark {
    color: var(--coral);
}

.form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    padding-top: 0.4rem;
}

/* Contraseñas */

.password-field {
    display: flex;
    align-items: stretch;
}

.password-field input {
    border-radius: 14px 0 0 14px;
}

.password-field__toggle {
    padding: 0 0.9rem;
    color: var(--coral);
    background: var(--cream);
    border: 1px solid var(--line);
    border-left: 0;
    border-radius: 0 14px 14px 0;
    font-size: 0.78rem;
    font-weight: 750;
    cursor: pointer;
}

.password-field__toggle:hover {
    color: var(--coral-dark);
    background: var(--cream-dark);
}

/* Asignación de negocios */

.assignment-toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.assignment-toolbar__search {
    width: min(360px, 100%);
}

.assignment-toolbar__actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.business-selection-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

.business-selection-card {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 1rem;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 18px;
    cursor: pointer;
    transition:
        background 0.18s ease,
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        transform 0.18s ease;
}

.business-selection-card:hover {
    border-color: rgba(255, 90, 60, 0.45);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.business-selection-card:has(input:checked) {
    background: #fff6f1;
    border-color: var(--coral);
    box-shadow: 0 10px 25px rgba(255, 90, 60, 0.1);
}

.business-selection-card input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.business-selection-card__control {
    position: relative;
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    background: var(--white);
    border: 2px solid #d6c1b8;
    border-radius: 7px;
}

.business-selection-card input:checked
+ .business-selection-card__control {
    background: linear-gradient(
        135deg,
        var(--coral),
        var(--orange)
    );
    border-color: var(--coral);
}

.business-selection-card input:checked
+ .business-selection-card__control::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 6px;
    width: 6px;
    height: 11px;
    border: solid var(--white);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.business-selection-card__content {
    min-width: 0;
}

.business-selection-card__content strong,
.business-selection-card__content small {
    display: block;
}

.business-selection-card__content strong {
    color: var(--ink);
}

.business-selection-card__content small {
    margin: 0.15rem 0 0.55rem;
    color: var(--muted);
}

.assignment-counter {
    margin-top: 0.8rem;
    color: var(--coral);
    font-weight: 750;
}

/* Utilidad accesible */

.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* =========================================================
   RESPONSIVE DE PLATAFORMA
   ========================================================= */

@media (max-width: 1199.98px) {
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .page-header {
        flex-direction: column;
    }

    .page-header__actions {
        width: 100%;
    }

    .business-selection-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .page-shell {
        padding-top: 1.5rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .panel {
        border-radius: var(--radius-md);
    }

    .panel__header {
        padding: 1.2rem;
    }

    .data-table th,
    .data-table td {
        padding: 0.85rem;
    }

    .form-grid--two-columns {
        grid-template-columns: 1fr;
    }

    .form-card__header,
    .form-card__body {
        padding: 1.2rem;
    }

    .assignment-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .assignment-toolbar__search {
        width: 100%;
    }

    .form-actions {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .form-actions .button {
        width: 100%;
    }
}

@media (max-width: 575.98px) {
    .page-header h1 {
        font-size: 2rem;
    }

    .page-header__actions .button {
        width: 100%;
    }

    .table-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .table-actions .button,
    .table-actions .inline-form,
    .table-actions .inline-form .button {
        width: 100%;
    }
}


/* ============================================================
   RESERVORA · SERVICIOS, HORARIOS Y ASIGNACIÓN DE RECURSOS
   ============================================================ */

:root {
    --rv-coral: #ff5a3c;
    --rv-orange: #ff8a3d;
    --rv-red: #ef3e3e;
    --rv-amber: #ffb547;
    --rv-ink: #28242b;
    --rv-muted: #766f79;
    --rv-border: #ebe5e7;
    --rv-surface: #ffffff;
    --rv-soft: #fff7f3;
    --rv-soft-strong: #ffede5;
    --rv-success: #20875a;
    --rv-danger: #c93636;
    --rv-warning: #a66014;
    --rv-shadow: 0 14px 38px rgba(71, 40, 34, 0.08);
    --rv-shadow-hover: 0 20px 48px rgba(255, 90, 60, 0.16);
}

/* ------------------------------------------------------------
   Estructuras compartidas
   ------------------------------------------------------------ */

.page-shell {
    min-height: calc(100vh - 160px);
    padding: 2.25rem 0 4rem;
    background:
        radial-gradient(
            circle at 95% 4%,
            rgba(255, 138, 61, 0.12),
            transparent 24rem
        ),
        radial-gradient(
            circle at 3% 94%,
            rgba(255, 90, 60, 0.08),
            transparent 27rem
        ),
        #fbfaf9;
}

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 1.75rem;
}

.page-header > div:first-child {
    max-width: 760px;
}

.page-header h1 {
    margin: 0.25rem 0 0.6rem;
    color: var(--rv-ink);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.045em;
}

.page-eyebrow,
.form-card__eyebrow {
    display: inline-block;
    color: var(--rv-coral);
    font-size: 0.75rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.page-description {
    max-width: 680px;
    margin: 0;
    color: var(--rv-muted);
    font-size: 1.02rem;
    line-height: 1.65;
}

.page-back-link {
    display: block;
    width: max-content;
    margin-bottom: 1rem;
    color: var(--rv-muted);
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    transition:
        color 160ms ease,
        transform 160ms ease;
}

.page-back-link:hover {
    color: var(--rv-coral);
    transform: translateX(-3px);
}

.page-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
}

.panel {
    overflow: hidden;
    border: 1px solid var(--rv-border);
    border-radius: 22px;
    background: var(--rv-surface);
    box-shadow: var(--rv-shadow);
}

.panel__header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--rv-border);
}

.panel__header h2 {
    margin: 0 0 0.25rem;
    color: var(--rv-ink);
    font-size: 1.15rem;
    font-weight: 800;
}

.panel__header p {
    margin: 0;
    color: var(--rv-muted);
    line-height: 1.5;
}

.button {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.7rem 1.05rem;
    border: 1px solid transparent;
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.91rem;
    font-weight: 750;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition:
        transform 160ms ease,
        box-shadow 160ms ease,
        color 160ms ease,
        border-color 160ms ease,
        background-color 160ms ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button--primary {
    border-color: var(--rv-coral);
    color: #fff;
    background:
        linear-gradient(
            135deg,
            var(--rv-coral),
            var(--rv-orange)
        );
    box-shadow: 0 9px 20px rgba(255, 90, 60, 0.23);
}

.button--primary:hover {
    border-color: #ef4b2f;
    color: #fff;
    box-shadow: 0 13px 27px rgba(255, 90, 60, 0.3);
}

.button--secondary {
    border-color: var(--rv-border);
    color: var(--rv-ink);
    background: #fff;
}

.button--secondary:hover {
    border-color: #ffc1ae;
    color: var(--rv-coral);
    background: var(--rv-soft);
}

.button--small {
    min-height: 36px;
    padding: 0.5rem 0.78rem;
    border-radius: 10px;
    font-size: 0.82rem;
}

.button-link {
    display: inline;
    padding: 0;
    border: 0;
    color: var(--rv-muted);
    background: transparent;
    font: inherit;
    font-size: 0.84rem;
    font-weight: 750;
    cursor: pointer;
}

.button-link:hover {
    color: var(--rv-coral);
    text-decoration: underline;
}

.button-link--danger {
    color: var(--rv-danger);
}

.button-link--warning {
    color: var(--rv-warning);
}

.text-link,
.stat-card__link {
    color: var(--rv-coral);
    font-weight: 750;
    text-decoration: none;
}

.text-link:hover,
.stat-card__link:hover {
    color: var(--rv-red);
    text-decoration: underline;
}

/* ------------------------------------------------------------
   Estadísticas
   ------------------------------------------------------------ */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    position: relative;
    overflow: hidden;
    min-height: 138px;
    padding: 1.25rem;
    border: 1px solid var(--rv-border);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.91);
    box-shadow: 0 9px 26px rgba(63, 42, 38, 0.055);
}

.stat-card::after {
    position: absolute;
    top: -35px;
    right: -25px;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(255, 138, 61, 0.11);
    content: "";
}

.stat-card__label {
    display: block;
    position: relative;
    z-index: 1;
    margin-bottom: 0.3rem;
    color: var(--rv-muted);
    font-size: 0.78rem;
    font-weight: 750;
    letter-spacing: 0.035em;
    text-transform: uppercase;
}

.stat-card__value {
    display: block;
    position: relative;
    z-index: 1;
    margin-bottom: 0.25rem;
    color: var(--rv-ink);
    font-size: 2rem;
    font-weight: 850;
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.stat-card__hint,
.stat-card__link {
    display: block;
    position: relative;
    z-index: 1;
    color: var(--rv-muted);
    font-size: 0.82rem;
    line-height: 1.45;
}

/* ------------------------------------------------------------
   Estados
   ------------------------------------------------------------ */

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.28rem 0.55rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.035em;
    text-transform: uppercase;
}

.status-badge--active {
    color: #15734b;
    background: #e5f7ee;
}

.status-badge--inactive {
    color: #786f73;
    background: #efebed;
}

.empty-state {
    padding: 4rem 1.5rem;
    border: 1px dashed #e2d7da;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.78);
    text-align: center;
}

.empty-state__icon {
    display: inline-flex;
    width: 62px;
    height: 62px;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    border-radius: 18px;
    color: #fff;
    background:
        linear-gradient(
            135deg,
            var(--rv-coral),
            var(--rv-orange)
        );
    box-shadow: 0 14px 28px rgba(255, 90, 60, 0.22);
    font-size: 1.65rem;
}

.empty-state h2 {
    margin: 0 0 0.55rem;
    color: var(--rv-ink);
    font-size: 1.45rem;
    font-weight: 800;
}

.empty-state p {
    max-width: 570px;
    margin: 0 auto 1.35rem;
    color: var(--rv-muted);
    line-height: 1.6;
}

/* ------------------------------------------------------------
   Tarjetas de servicios
   ------------------------------------------------------------ */

.service-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 1.25rem;
}

.service-card {
    transition:
        transform 180ms ease,
        box-shadow 180ms ease,
        border-color 180ms ease;
}

.service-card:hover {
    transform: translateY(-3px);
    border-color: #ffd0bf;
    box-shadow: var(--rv-shadow-hover);
}

.service-card--inactive {
    opacity: 0.77;
    filter: saturate(0.7);
}

.service-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.35rem;
    border-bottom: 1px solid var(--rv-border);
}

.service-card__identity {
    display: flex;
    min-width: 0;
    align-items: flex-start;
    gap: 0.9rem;
}

.service-card__color {
    flex: 0 0 auto;
    width: 14px;
    height: 48px;
    border-radius: 99px;
    box-shadow: 0 5px 14px rgba(51, 38, 36, 0.14);
}

.service-card__title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
}

.service-card__title-row h2 {
    margin: 0;
    color: var(--rv-ink);
    font-size: 1.2rem;
    font-weight: 820;
    line-height: 1.25;
}

.service-card__price {
    display: block;
    margin-top: 0.28rem;
    color: var(--rv-muted);
    font-size: 0.83rem;
    font-weight: 650;
}

.service-card__body {
    padding: 1.35rem;
}

.service-card__description {
    min-height: 3.1rem;
    margin: 0 0 1.1rem;
    color: #625b65;
    line-height: 1.6;
}

.service-card__description--empty {
    color: #aaa2a7;
    font-style: italic;
}

.service-duration-summary {
    overflow: hidden;
    border: 1px solid #f1e6e3;
    border-radius: 16px;
    background:
        linear-gradient(
            145deg,
            #fff9f6,
            #fff
        );
}

.service-duration-summary__main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid #f1e6e3;
}

.service-duration-summary__main span {
    color: var(--rv-muted);
    font-size: 0.83rem;
    font-weight: 650;
}

.service-duration-summary__main strong {
    color: var(--rv-coral);
    font-size: 1.08rem;
    font-weight: 850;
}

.service-duration-summary__details {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.service-duration-summary__details > span {
    padding: 0.8rem 0.65rem;
    color: var(--rv-muted);
    font-size: 0.7rem;
    text-align: center;
}

.service-duration-summary__details > span + span {
    border-left: 1px solid #f1e6e3;
}

.service-duration-summary__details strong {
    display: block;
    margin-top: 0.18rem;
    color: var(--rv-ink);
    font-size: 0.8rem;
}

.service-buffer-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 0.9rem;
    padding: 0.75rem 0.9rem;
    border-radius: 12px;
    color: #795c40;
    background: #fff4dc;
    font-size: 0.78rem;
}

.service-buffer-summary__title {
    font-weight: 800;
}

.service-buffer-summary > div {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.7rem;
}

.service-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.35rem;
    border-top: 1px solid var(--rv-border);
    background: #fffdfc;
}

.service-card__footer-actions {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.service-card__footer form {
    margin: 0;
}

/* ------------------------------------------------------------
   Formulario de servicios
   ------------------------------------------------------------ */

.form-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    align-items: start;
    gap: 1.25rem;
}

.form-layout__main {
    display: grid;
    gap: 1.25rem;
}

.form-card {
    overflow: hidden;
    border: 1px solid var(--rv-border);
    border-radius: 22px;
    background: #fff;
    box-shadow: var(--rv-shadow);
}

.form-card--sticky {
    position: sticky;
    top: 1rem;
}

.form-card__header {
    padding: 1.35rem 1.5rem 1rem;
    border-bottom: 1px solid var(--rv-border);
}

.form-card__header h2 {
    margin: 0.25rem 0 0.3rem;
    color: var(--rv-ink);
    font-size: 1.2rem;
    font-weight: 820;
}

.form-card__header p {
    margin: 0;
    color: var(--rv-muted);
    font-size: 0.87rem;
    line-height: 1.5;
}

.form-card__body {
    padding: 1.5rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.1rem;
}

.form-grid--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid--four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.form-group--wide {
    grid-column: 1 / -1;
}

.form-label {
    display: block;
    margin-bottom: 0.42rem;
    color: var(--rv-ink);
    font-size: 0.83rem;
    font-weight: 750;
}

.form-help {
    display: block;
    margin-top: 0.38rem;
    color: #958d92;
    font-size: 0.73rem;
    line-height: 1.45;
}

.form-control,
.form-select {
    width: 100%;
    min-height: 45px;
    padding: 0.68rem 0.78rem;
    border: 1px solid #ddd4d7;
    border-radius: 11px;
    color: var(--rv-ink);
    background-color: #fff;
    font: inherit;
    font-size: 0.9rem;
    outline: none;
    transition:
        border-color 160ms ease,
        box-shadow 160ms ease;
}

textarea.form-control {
    min-height: 125px;
    resize: vertical;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--rv-orange);
    box-shadow: 0 0 0 4px rgba(255, 138, 61, 0.12);
}

.duration-explanation {
    display: flex;
    gap: 0.9rem;
    margin-bottom: 1.25rem;
    padding: 1rem;
    border: 1px solid #ffdfd1;
    border-radius: 15px;
    background: var(--rv-soft);
}

.duration-explanation__icon {
    display: flex;
    flex: 0 0 auto;
    width: 39px;
    height: 39px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #fff;
    background:
        linear-gradient(
            135deg,
            var(--rv-coral),
            var(--rv-orange)
        );
}

.duration-explanation strong {
    color: var(--rv-ink);
    font-size: 0.88rem;
}

.duration-explanation p {
    margin: 0.2rem 0 0;
    color: var(--rv-muted);
    font-size: 0.79rem;
    line-height: 1.5;
}

.duration-preview {
    margin-top: 1.15rem;
    padding: 1rem;
    border-radius: 14px;
    background: #f8f5f4;
}

.duration-preview__label {
    display: block;
    margin-bottom: 0.6rem;
    color: var(--rv-muted);
    font-size: 0.76rem;
    font-weight: 750;
    text-transform: uppercase;
}

.duration-preview__values {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.duration-chip {
    display: inline-flex;
    padding: 0.37rem 0.65rem;
    border: 1px solid #e5dadd;
    border-radius: 999px;
    color: #675f64;
    background: #fff;
    font-size: 0.75rem;
    font-weight: 750;
}

.duration-chip--default {
    border-color: var(--rv-orange);
    color: #fff;
    background:
        linear-gradient(
            135deg,
            var(--rv-coral),
            var(--rv-orange)
        );
}

.duration-preview__warning {
    color: var(--rv-danger);
    font-size: 0.8rem;
    font-weight: 700;
}

.input-with-suffix {
    display: flex;
}

.input-with-suffix .form-control {
    border-radius: 11px 0 0 11px;
}

.input-with-suffix__suffix {
    display: flex;
    min-width: 45px;
    align-items: center;
    justify-content: center;
    border: 1px solid #ddd4d7;
    border-left: 0;
    border-radius: 0 11px 11px 0;
    color: var(--rv-muted);
    background: #f8f5f4;
    font-weight: 750;
}

.color-field {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.55rem;
    border: 1px solid #ddd4d7;
    border-radius: 11px;
}

.color-field__picker {
    width: 48px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
}

.color-field__value {
    color: var(--rv-muted);
    font-size: 0.82rem;
    font-weight: 750;
}

.form-switch-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--rv-border);
    border-radius: 14px;
    background: #fbf9f8;
}

.form-switch-card__label {
    display: block;
    color: var(--rv-ink);
    font-size: 0.85rem;
    font-weight: 800;
}

.form-switch-card small {
    display: block;
    margin-top: 0.16rem;
    color: var(--rv-muted);
    font-size: 0.7rem;
}

.switch {
    position: relative;
    flex: 0 0 auto;
    width: 48px;
    height: 27px;
}

.switch input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.switch__slider {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: #ccc4c7;
    cursor: pointer;
    transition: background 160ms ease;
}

.switch__slider::after {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 19px;
    height: 19px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 6px rgba(40, 36, 43, 0.22);
    content: "";
    transition: transform 160ms ease;
}

.switch input:checked + .switch__slider {
    background:
        linear-gradient(
            135deg,
            var(--rv-coral),
            var(--rv-orange)
        );
}

.switch input:checked + .switch__slider::after {
    transform: translateX(21px);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.35rem;
}

/* ------------------------------------------------------------
   Horarios
   ------------------------------------------------------------ */

.schedule-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 1.25rem;
}

.schedule-card {
    transition:
        transform 180ms ease,
        box-shadow 180ms ease;
}

.schedule-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--rv-shadow-hover);
}

.schedule-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.35rem;
    border-bottom: 1px solid var(--rv-border);
}

.schedule-card__identity {
    display: flex;
    min-width: 0;
    gap: 0.9rem;
}

.schedule-card__color {
    flex: 0 0 auto;
    width: 13px;
    height: 47px;
    border-radius: 99px;
}

.schedule-card__identity h2 {
    margin: 0;
    color: var(--rv-ink);
    font-size: 1.15rem;
    font-weight: 820;
}

.schedule-card__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
    margin-top: 0.3rem;
    color: var(--rv-muted);
    font-size: 0.77rem;
}

.schedule-card__body {
    padding: 0.75rem 1.35rem;
}

.weekly-schedule__day {
    display: grid;
    grid-template-columns: 105px minmax(0, 1fr);
    align-items: center;
    gap: 0.75rem;
    min-height: 53px;
    padding: 0.65rem 0;
}

.weekly-schedule__day + .weekly-schedule__day {
    border-top: 1px solid #f0ebed;
}

.weekly-schedule__name {
    color: var(--rv-ink);
    font-size: 0.8rem;
    font-weight: 780;
}

.weekly-schedule__periods {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.4rem;
}

.weekly-schedule__period {
    padding: 0.35rem 0.56rem;
    border-radius: 9px;
    color: #873b27;
    background: var(--rv-soft-strong);
    font-size: 0.74rem;
    font-weight: 750;
}

.weekly-schedule__closed {
    color: #aaa1a6;
    font-size: 0.75rem;
    font-style: italic;
}

.schedule-empty {
    padding: 2rem 0.5rem;
    text-align: center;
}

.schedule-empty p {
    margin: 0 0 0.45rem;
    color: var(--rv-muted);
}

.schedule-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.35rem;
    border-top: 1px solid var(--rv-border);
    background: #fffdfc;
}

.schedule-card__footer form {
    margin: 0;
}

/* ------------------------------------------------------------
   Asignación de recursos
   ------------------------------------------------------------ */

.service-assignment-summary {
    display: grid;
    grid-template-columns: minmax(0, 2fr) repeat(2, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.service-assignment-summary__service,
.service-assignment-summary__stat {
    display: flex;
    min-height: 92px;
    align-items: center;
    padding: 1.15rem;
    border: 1px solid var(--rv-border);
    border-radius: 17px;
    background: #fff;
    box-shadow: 0 8px 23px rgba(63, 42, 38, 0.05);
}

.service-assignment-summary__service {
    gap: 0.85rem;
}

.service-assignment-summary__color {
    width: 13px;
    height: 48px;
    border-radius: 99px;
}

.service-assignment-summary__label,
.service-assignment-summary__stat span {
    display: block;
    color: var(--rv-muted);
    font-size: 0.73rem;
    font-weight: 730;
    text-transform: uppercase;
}

.service-assignment-summary__service strong {
    display: block;
    margin-top: 0.2rem;
    color: var(--rv-ink);
    font-size: 1.05rem;
}

.service-assignment-summary__stat {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}

.service-assignment-summary__stat strong {
    margin-top: 0.12rem;
    color: var(--rv-coral);
    font-size: 1.7rem;
    font-weight: 850;
}

.assignment-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.assignment-panel__tools {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.resource-assignment-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    padding: 1.25rem;
}

.resource-assignment-card {
    display: flex;
    position: relative;
    min-height: 135px;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    border: 1px solid var(--rv-border);
    border-radius: 16px;
    background: #fff;
    cursor: pointer;
    transition:
        transform 160ms ease,
        border-color 160ms ease,
        box-shadow 160ms ease,
        background-color 160ms ease;
}

.resource-assignment-card:hover {
    transform: translateY(-2px);
    border-color: #ffc7b5;
    box-shadow: 0 12px 25px rgba(255, 90, 60, 0.09);
}

.resource-assignment-card--selected {
    border-color: var(--rv-orange);
    background:
        linear-gradient(
            145deg,
            #fff5ef,
            #fff
        );
    box-shadow: 0 10px 25px rgba(255, 90, 60, 0.1);
}

.resource-assignment-card--inactive {
    opacity: 0.58;
    cursor: not-allowed;
    filter: grayscale(0.35);
}

.resource-assignment-card__input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.resource-assignment-card__check {
    display: flex;
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 24px;
    height: 24px;
    align-items: center;
    justify-content: center;
    border: 1px solid #dcd4d7;
    border-radius: 8px;
    color: transparent;
    background: #fff;
    font-size: 0.75rem;
    font-weight: 900;
    transition:
        color 160ms ease,
        border-color 160ms ease,
        background-color 160ms ease;
}

.resource-assignment-card--selected
.resource-assignment-card__check {
    border-color: var(--rv-coral);
    color: #fff;
    background: var(--rv-coral);
}

.resource-assignment-card__color {
    flex: 0 0 auto;
    width: 10px;
    height: 45px;
    border-radius: 99px;
}

.resource-assignment-card__content {
    display: block;
    min-width: 0;
    width: 100%;
    padding-right: 1.5rem;
}

.resource-assignment-card__top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
}

.resource-assignment-card__top strong {
    overflow: hidden;
    max-width: 100%;
    color: var(--rv-ink);
    font-size: 0.93rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.resource-assignment-card__meta {
    display: block;
    margin-top: 0.35rem;
    color: var(--rv-muted);
    font-size: 0.74rem;
}

.resource-assignment-card__description {
    display: -webkit-box;
    overflow: hidden;
    margin-top: 0.55rem;
    color: #746d72;
    font-size: 0.75rem;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.resource-assignment-card__warning {
    display: block;
    margin-top: 0.55rem;
    color: var(--rv-warning);
    font-size: 0.7rem;
    font-weight: 700;
}

/* ------------------------------------------------------------
   Responsive
   ------------------------------------------------------------ */

@media (max-width: 1100px) {
    .form-grid--four {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .resource-assignment-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .page-header {
        flex-direction: column;
    }

    .page-actions {
        justify-content: flex-start;
    }

    .stats-grid,
    .service-grid,
    .schedule-grid {
        grid-template-columns: 1fr;
    }

    .form-layout {
        grid-template-columns: 1fr;
    }

    .form-card--sticky {
        position: static;
    }

    .service-assignment-summary {
        grid-template-columns: 1fr 1fr;
    }

    .service-assignment-summary__service {
        grid-column: 1 / -1;
    }
}

@media (max-width: 640px) {
    .page-shell {
        padding-top: 1.25rem;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    .page-actions,
    .page-actions .button {
        width: 100%;
    }

    .stats-grid,
    .form-grid,
    .form-grid--two,
    .form-grid--four,
    .resource-assignment-grid,
    .service-assignment-summary {
        grid-template-columns: 1fr;
    }

    .service-assignment-summary__service {
        grid-column: auto;
    }

    .service-card__header,
    .schedule-card__header,
    .assignment-panel__header {
        flex-direction: column;
    }

    .service-card__header .button,
    .schedule-card__header .button {
        width: 100%;
    }

    .service-card__footer,
    .schedule-card__footer {
        align-items: stretch;
        flex-direction: column;
    }

    .service-card__footer .button {
        width: 100%;
    }

    .service-card__footer-actions {
        justify-content: space-between;
    }

    .service-duration-summary__details {
        grid-template-columns: 1fr;
    }

    .service-duration-summary__details > span + span {
        border-top: 1px solid #f1e6e3;
        border-left: 0;
    }

    .weekly-schedule__day {
        grid-template-columns: 1fr;
    }

    .weekly-schedule__periods {
        justify-content: flex-start;
    }

    .assignment-panel__tools,
    .assignment-panel__tools .button {
        width: 100%;
    }

    .form-actions {
        flex-direction: column-reverse;
    }

    .form-actions .button {
        width: 100%;
    }
}

/* ============================================================
   RECURSOS ASIGNADOS EN LAS TARJETAS DE SERVICIOS
   ============================================================ */

.service-resources-summary {
    margin-top: 1rem;
    padding: 1rem;
    border: 1px solid #eee4e5;
    border-radius: 15px;
    background:
        linear-gradient(
            145deg,
            #fcfaf9,
            #ffffff
        );
}

.service-resources-summary__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.service-resources-summary__header > div {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.service-resources-summary__label {
    color: #766f79;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.035em;
    text-transform: uppercase;
}

.service-resources-summary__header strong {
    display: inline-flex;
    min-width: 25px;
    height: 25px;
    align-items: center;
    justify-content: center;
    padding: 0 0.4rem;
    border-radius: 999px;
    color: #fff;
    background:
        linear-gradient(
            135deg,
            #ff5a3c,
            #ff8a3d
        );
    font-size: 0.72rem;
    font-weight: 850;
}

.service-resources-summary__header .text-link {
    color: #ff5a3c;
    font-size: 0.78rem;
    font-weight: 800;
    text-decoration: none;
}

.service-resources-summary__header .text-link:hover {
    color: #e7442a;
    text-decoration: underline;
}

.service-resource-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.48rem;
}

.service-resource-chip {
    display: inline-flex;
    max-width: 190px;
    min-height: 32px;
    align-items: center;
    gap: 0.38rem;
    padding: 0.32rem 0.58rem;
    border: 1px solid #e8dfe1;
    border-radius: 999px;
    color: #494249;
    background: #fff;
    box-shadow: 0 3px 9px rgba(64, 41, 37, 0.045);
    font-size: 0.75rem;
    font-weight: 720;
    line-height: 1;
    transition:
        transform 150ms ease,
        border-color 150ms ease,
        box-shadow 150ms ease;
}

.service-resource-chip:hover {
    transform: translateY(-1px);
    border-color: #ffc5b3;
    box-shadow: 0 6px 14px rgba(255, 90, 60, 0.1);
}

.service-resource-chip__color {
    flex: 0 0 auto;
    width: 9px;
    height: 20px;
    border-radius: 999px;
}

.service-resource-chip__icon {
    flex: 0 0 auto;
    color: #a39ba0;
    font-size: 0.56rem;
}

.service-resource-chip__name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.service-resource-chip--more {
    min-width: 38px;
    justify-content: center;
    border-color: #ffd1c2;
    color: #d94c31;
    background: #fff1eb;
    font-weight: 850;
}

.service-resources-summary__empty {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.72rem 0.8rem;
    border: 1px dashed #f0bba9;
    border-radius: 11px;
    color: #8a5b4e;
    background: #fff5f1;
}

.service-resources-summary__empty > span {
    display: inline-flex;
    flex: 0 0 auto;
    width: 23px;
    height: 23px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    background: #ff8a3d;
    font-size: 0.75rem;
    font-weight: 900;
}

.service-resources-summary__empty p {
    margin: 0;
    font-size: 0.77rem;
    line-height: 1.4;
}

@media (max-width: 640px) {
    .service-resources-summary__header {
        align-items: flex-start;
    }

    .service-resource-chip {
        max-width: 100%;
    }
}

/* ============================================================
   RESERVORA · GESTIÓN DE RESERVAS
   ============================================================ */

/* Filtros */

.booking-filter-panel {
    margin-bottom: 1.25rem;
}

.booking-filters {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(135px, 0.8fr))
        repeat(3, minmax(150px, 1fr));
    align-items: end;
    gap: 1rem;
    padding: 1.25rem;
}

.booking-filters__actions {
    display: flex;
    grid-column: 1 / -1;
    justify-content: flex-end;
    gap: 0.65rem;
}

/* Listado de reservas */

.booking-list-panel {
    margin-top: 1.25rem;
}

.booking-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.booking-list {
    padding: 0 1.25rem 1.25rem;
}

.booking-day-divider {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 1.35rem 0 0.65rem;
    color: #5d555c;
    font-size: 0.8rem;
    font-weight: 850;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.booking-day-divider::after {
    flex: 1;
    height: 1px;
    background: #eee7e8;
    content: "";
}

.booking-day-divider strong {
    padding: 0.23rem 0.48rem;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, #ff5a3c, #ff8a3d);
    font-size: 0.65rem;
}

.booking-row {
    display: grid;
    grid-template-columns:
        72px
        8px
        minmax(0, 1fr)
        minmax(100px, auto)
        auto;
    align-items: center;
    gap: 1rem;
    min-height: 92px;
    padding: 0.9rem 1rem;
    border: 1px solid #ece5e7;
    border-radius: 15px;
    background: #fff;
    transition:
        transform 160ms ease,
        border-color 160ms ease,
        box-shadow 160ms ease;
}

.booking-row + .booking-row {
    margin-top: 0.65rem;
}

.booking-row:hover {
    transform: translateY(-2px);
    border-color: #ffc8b7;
    box-shadow: 0 10px 23px rgba(255, 90, 60, 0.09);
}

.booking-row__time {
    text-align: center;
}

.booking-row__time strong {
    display: block;
    color: #28242b;
    font-size: 1.12rem;
    font-weight: 850;
}

.booking-row__time span {
    display: block;
    margin-top: 0.12rem;
    color: #8e858b;
    font-size: 0.72rem;
}

.booking-row__color {
    width: 8px;
    height: 49px;
    border-radius: 999px;
}

.booking-row__main {
    min-width: 0;
}

.booking-row__title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
}

.booking-row__title > strong {
    overflow: hidden;
    color: #28242b;
    font-size: 0.95rem;
    font-weight: 820;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.booking-row__details {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.35rem;
    color: #766f79;
    font-size: 0.75rem;
}

.booking-row__details span + span::before {
    margin-right: 0.75rem;
    color: #d0c6ca;
    content: "•";
}

.booking-row__secondary {
    text-align: right;
}

.booking-row__price {
    display: block;
    color: #3e373e;
    font-size: 0.82rem;
    font-weight: 800;
}

.booking-row__source {
    display: block;
    margin-top: 0.2rem;
    color: #958d92;
    font-size: 0.68rem;
}

/* Estados */

.booking-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.31rem 0.58rem;
    border-radius: 999px;
    font-size: 0.66rem;
    font-weight: 850;
    line-height: 1;
    letter-spacing: 0.035em;
    text-transform: uppercase;
}

.booking-status--large {
    min-height: 40px;
    padding: 0.55rem 0.85rem;
    font-size: 0.73rem;
}

.booking-status--pending {
    color: #8c5a16;
    background: #fff0cc;
}

.booking-status--confirmed {
    color: #176e4a;
    background: #ddf5e8;
}

.booking-status--cancelled {
    color: #9a3c3c;
    background: #fbe4e4;
}

.booking-status--completed {
    color: #315e96;
    background: #e4effc;
}

.booking-status--no-show {
    color: #655b65;
    background: #ece8eb;
}

/* Selector de cliente */

.customer-mode-selector {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.customer-mode-option {
    display: flex;
    min-height: 62px;
    align-items: center;
    gap: 0.7rem;
    padding: 0.8rem 1rem;
    border: 1px solid #e1d9dc;
    border-radius: 13px;
    color: #6e666c;
    background: #fff;
    font-size: 0.85rem;
    font-weight: 750;
    cursor: pointer;
    transition:
        border-color 160ms ease,
        color 160ms ease,
        background-color 160ms ease,
        box-shadow 160ms ease;
}

.customer-mode-option:hover {
    border-color: #ffc5b2;
    color: #d94b30;
}

.customer-mode-option--active {
    border-color: #ff8a3d;
    color: #d9472e;
    background: #fff5f0;
    box-shadow: 0 0 0 3px rgba(255, 138, 61, 0.09);
}

.customer-mode-option input {
    accent-color: #ff5a3c;
}

/* Selector de slots */

.booking-slot-section {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid #eee7e8;
}

.booking-slot-message {
    padding: 1.2rem;
    border: 1px dashed #e1d7da;
    border-radius: 13px;
    color: #837a80;
    background: #faf8f8;
    font-size: 0.83rem;
    text-align: center;
}

.booking-slot-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.7rem;
}

.booking-slot {
    display: flex;
    min-height: 85px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.7rem;
    border: 1px solid #e6dddf;
    border-radius: 13px;
    color: #4d464c;
    background: #fff;
    font-family: inherit;
    cursor: pointer;
    transition:
        transform 150ms ease,
        border-color 150ms ease,
        color 150ms ease,
        background-color 150ms ease,
        box-shadow 150ms ease;
}

.booking-slot:hover {
    transform: translateY(-2px);
    border-color: #ffbda7;
    color: #d9482d;
    box-shadow: 0 8px 18px rgba(255, 90, 60, 0.1);
}

.booking-slot strong {
    font-size: 1.05rem;
    font-weight: 850;
}

.booking-slot > span {
    margin-top: 0.15rem;
    color: #8e858b;
    font-size: 0.68rem;
}

.booking-slot small {
    display: block;
    overflow: hidden;
    width: 100%;
    margin-top: 0.35rem;
    color: #a0989d;
    font-size: 0.65rem;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.booking-slot--selected {
    border-color: #ff5a3c;
    color: #fff;
    background: linear-gradient(135deg, #ff5a3c, #ff8a3d);
    box-shadow: 0 10px 22px rgba(255, 90, 60, 0.25);
}

.booking-slot--selected > span,
.booking-slot--selected small {
    color: rgba(255, 255, 255, 0.83);
}

/* Resumen de creación */

.booking-summary {
    overflow: hidden;
    margin-bottom: 1.2rem;
    border: 1px solid #ebe3e5;
    border-radius: 13px;
    background: #fcfaf9;
}

.booking-summary__row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.7rem;
    padding: 0.72rem 0.8rem;
}

.booking-summary__row + .booking-summary__row {
    border-top: 1px solid #eee7e8;
}

.booking-summary__row span {
    color: #8b8288;
    font-size: 0.72rem;
}

.booking-summary__row strong {
    max-width: 60%;
    color: #363037;
    font-size: 0.76rem;
    text-align: right;
}

.booking-submit-button,
.booking-action-button {
    width: 100%;
}

.booking-submit-button:disabled {
    border-color: #d9d2d5;
    color: #999196;
    background: #e7e2e4;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

/* Detalle */

.booking-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    align-items: start;
    gap: 1.25rem;
}

.booking-detail-layout__main {
    display: grid;
    gap: 1.25rem;
}

.booking-appointment-card__header {
    display: grid;
    grid-template-columns: 12px minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
    padding: 1.4rem;
    border-bottom: 1px solid #ebe5e7;
    background:
        linear-gradient(
            145deg,
            #fff8f4,
            #fff
        );
}

.booking-appointment-card__color {
    width: 12px;
    height: 58px;
    border-radius: 999px;
}

.booking-appointment-card__header > div > span {
    color: #8e858b;
    font-size: 0.72rem;
    font-weight: 750;
    text-transform: uppercase;
}

.booking-appointment-card__header h2 {
    margin: 0.15rem 0 0;
    color: #28242b;
    font-size: 1.35rem;
    font-weight: 850;
}

.booking-appointment-card__time {
    text-align: right;
}

.booking-appointment-card__time strong {
    display: block;
    color: #ff5a3c;
    font-size: 1.65rem;
    font-weight: 900;
}

.booking-appointment-card__time span {
    display: block;
    color: #887f85;
    font-size: 0.73rem;
}

.booking-detail-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.booking-detail-item {
    min-height: 105px;
    padding: 1.15rem;
}

.booking-detail-item:nth-child(n + 4) {
    border-top: 1px solid #eee8e9;
}

.booking-detail-item:not(:nth-child(3n + 1)) {
    border-left: 1px solid #eee8e9;
}

.booking-detail-item > span {
    display: block;
    margin-bottom: 0.35rem;
    color: #928a8f;
    font-size: 0.68rem;
    font-weight: 750;
    text-transform: uppercase;
}

.booking-detail-item strong {
    display: block;
    color: #383238;
    font-size: 0.9rem;
    font-weight: 800;
}

.booking-detail-item small {
    display: block;
    margin-top: 0.25rem;
    color: #9a9297;
    font-size: 0.68rem;
}

/* Cliente */

.booking-customer-card__body {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
}

.booking-customer-avatar {
    display: flex;
    flex: 0 0 auto;
    width: 54px;
    height: 54px;
    align-items: center;
    justify-content: center;
    border-radius: 17px;
    color: #fff;
    background: linear-gradient(135deg, #ff5a3c, #ff8a3d);
    box-shadow: 0 9px 20px rgba(255, 90, 60, 0.2);
    font-size: 1.15rem;
    font-weight: 900;
}

.booking-customer-card__identity strong,
.booking-customer-card__identity a {
    display: block;
}

.booking-customer-card__identity strong {
    margin-bottom: 0.28rem;
    color: #302a31;
    font-size: 1rem;
}

.booking-customer-card__identity a {
    width: max-content;
    max-width: 100%;
    margin-top: 0.15rem;
    color: #766f79;
    font-size: 0.78rem;
    text-decoration: none;
}

.booking-customer-card__identity a:hover {
    color: #ff5a3c;
}

/* Notas */

.booking-notes-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.booking-notes-grid article {
    padding: 1.25rem;
}

.booking-notes-grid article + article {
    border-left: 1px solid #eee7e8;
}

.booking-notes-grid span {
    color: #92898f;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
}

.booking-notes-grid p {
    margin: 0.5rem 0 0;
    color: #5d565c;
    font-size: 0.84rem;
    line-height: 1.6;
}

/* Acciones */

.booking-action-list {
    display: grid;
    gap: 0.75rem;
}

.booking-action-list form {
    margin: 0;
}

.booking-cancel-section {
    margin-top: 0.45rem;
    padding-top: 1rem;
    border-top: 1px solid #ece5e7;
}

.booking-cancel-section h3 {
    margin: 0 0 0.3rem;
    color: #973b3b;
    font-size: 0.9rem;
    font-weight: 820;
}

.booking-cancel-section > p {
    margin: 0 0 0.85rem;
    color: #8b8288;
    font-size: 0.73rem;
    line-height: 1.45;
}

.booking-cancel-button {
    width: 100%;
    margin-top: 0.75rem;
    border-color: #e9b8b8;
    color: #a43737;
    background: #fff4f4;
}

.booking-cancel-button:hover {
    border-color: #d95151;
    color: #fff;
    background: #d95151;
}

.booking-cancelled-info,
.booking-closed-info {
    padding: 0.9rem;
    border-radius: 12px;
    font-size: 0.76rem;
}

.booking-cancelled-info {
    color: #8d3f3f;
    background: #fce9e9;
}

.booking-cancelled-info strong,
.booking-cancelled-info span {
    display: block;
}

.booking-cancelled-info p {
    margin: 0.55rem 0 0;
}

.booking-closed-info {
    color: #5d626b;
    background: #eef1f5;
}

.booking-metadata {
    display: grid;
    gap: 0.4rem;
    margin-top: 1rem;
    padding: 0 0.25rem;
    color: #999095;
    font-size: 0.67rem;
}

.booking-metadata code {
    overflow-wrap: anywhere;
    color: #776f75;
}

/* Responsive */

@media (max-width: 1100px) {
    .booking-filters {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .booking-slot-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .booking-detail-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .booking-detail-item:nth-child(n) {
        border-top: 0;
        border-left: 0;
    }

    .booking-detail-item:nth-child(n + 3) {
        border-top: 1px solid #eee8e9;
    }

    .booking-detail-item:nth-child(even) {
        border-left: 1px solid #eee8e9;
    }
}

@media (max-width: 900px) {
    .booking-detail-layout {
        grid-template-columns: 1fr;
    }

    .booking-row {
        grid-template-columns:
            62px
            7px
            minmax(0, 1fr)
            auto;
    }

    .booking-row__secondary {
        display: none;
    }
}

@media (max-width: 700px) {
    .booking-filters,
    .customer-mode-selector,
    .booking-notes-grid {
        grid-template-columns: 1fr;
    }

    .booking-filters__actions {
        grid-column: auto;
    }

    .booking-notes-grid article + article {
        border-top: 1px solid #eee7e8;
        border-left: 0;
    }

    .booking-slot-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .booking-row {
        grid-template-columns: 55px 6px minmax(0, 1fr);
        gap: 0.7rem;
    }

    .booking-row > .button {
        grid-column: 1 / -1;
        width: 100%;
    }
}

@media (max-width: 520px) {
    .booking-detail-grid {
        grid-template-columns: 1fr;
    }

    .booking-detail-item:nth-child(n) {
        border-top: 0;
        border-left: 0;
    }

    .booking-detail-item + .booking-detail-item {
        border-top: 1px solid #eee8e9;
    }

    .booking-appointment-card__header {
        grid-template-columns: 10px 1fr;
    }

    .booking-appointment-card__time {
        grid-column: 2;
        text-align: left;
    }

    .booking-filters__actions {
        flex-direction: column-reverse;
    }

    .booking-filters__actions .button {
        width: 100%;
    }
}

/* ============================================================
   RESERVORA · RECORDATORIOS DE RESERVAS
   ============================================================ */

/* Formulario de creación */

.booking-reminder-card {
    overflow: hidden;
    border: 1px solid #f0ded8;
    border-radius: 16px;
    background:
        linear-gradient(
            145deg,
            #fff8f4,
            #ffffff
        );
}

.booking-reminder-card__toggle {
    display: flex;
    min-height: 90px;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.1rem;
}

.booking-reminder-card__title {
    display: block;
    margin: 0;
    color: #332d33;
    font-size: 0.92rem;
    font-weight: 820;
    cursor: pointer;
}

.booking-reminder-card__toggle p {
    margin: 0.25rem 0 0;
    color: #80777d;
    font-size: 0.76rem;
    line-height: 1.45;
}

.booking-reminder-card__options {
    padding: 1rem 1.1rem;
    border-top: 1px solid #f0ded8;
    background: rgba(255, 244, 238, 0.58);
}

.booking-reminder-card__options[hidden] {
    display: none;
}

/* Detalle del recordatorio */

.booking-reminder-detail .panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.booking-reminder-detail__body {
    padding: 1.25rem;
}

.booking-reminder-state {
    display: inline-flex;
    flex: 0 0 auto;
    min-height: 29px;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    font-size: 0.66rem;
    font-weight: 850;
    letter-spacing: 0.035em;
    text-transform: uppercase;
}

.booking-reminder-state--scheduled {
    color: #9a581b;
    background: #fff0d2;
}

.booking-reminder-state--sent {
    color: #15734b;
    background: #dff5e9;
}

.booking-reminder-state--disabled {
    color: #6e666c;
    background: #eeeaec;
}

.booking-reminder-information {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: hidden;
    margin-bottom: 1rem;
    border: 1px solid #ece4e6;
    border-radius: 13px;
    background: #fcfaf9;
}

.booking-reminder-information > div {
    padding: 1rem;
}

.booking-reminder-information > div + div {
    border-left: 1px solid #ece4e6;
}

.booking-reminder-information span {
    display: block;
    margin-bottom: 0.3rem;
    color: #92898f;
    font-size: 0.68rem;
    font-weight: 780;
    letter-spacing: 0.025em;
    text-transform: uppercase;
}

.booking-reminder-information strong {
    display: block;
    color: #3a343a;
    font-size: 0.85rem;
    font-weight: 800;
}

.booking-reminder-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 230px auto;
    align-items: end;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee7e8;
}

.booking-reminder-form .form-switch-card {
    min-height: 75px;
}

.booking-reminder-form__timing {
    margin: 0;
}

.booking-reminder-error {
    margin-bottom: 1rem;
    padding: 0.85rem 1rem;
    border: 1px solid #efc4c4;
    border-radius: 12px;
    color: #913a3a;
    background: #fff1f1;
}

.booking-reminder-error strong {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.75rem;
}

.booking-reminder-error p {
    margin: 0;
    font-size: 0.73rem;
    line-height: 1.45;
}

/* Indicador para listados, si se añade posteriormente */

.booking-reminder-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: #d65a35;
    font-size: 0.7rem;
    font-weight: 750;
}

.booking-reminder-indicator::before {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ff8a3d;
    content: "";
}

/* Responsive */

@media (max-width: 900px) {
    .booking-reminder-form {
        grid-template-columns: 1fr 1fr;
    }

    .booking-reminder-form > .button {
        grid-column: 1 / -1;
        width: 100%;
    }
}

@media (max-width: 640px) {
    .booking-reminder-detail .panel__header {
        align-items: flex-start;
        flex-direction: column;
    }

    .booking-reminder-information,
    .booking-reminder-form {
        grid-template-columns: 1fr;
    }

    .booking-reminder-information > div + div {
        border-top: 1px solid #ece4e6;
        border-left: 0;
    }

    .booking-reminder-form > .button {
        grid-column: auto;
    }

    .booking-reminder-card__toggle {
        align-items: flex-start;
    }
}

/* ============================================================
   RESERVORA · CALENDARIO VISUAL DAYPILOT
   ============================================================ */

/* Barra principal */

.calendar-toolbar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
}

.calendar-toolbar__navigation,
.calendar-toolbar__views {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.calendar-toolbar__views {
    justify-content: flex-end;
}

.calendar-toolbar__period {
    color: #332d33;
    font-size: 0.95rem;
    text-align: center;
    text-transform: capitalize;
}

.calendar-view-button {
    min-height: 39px;
    padding: 0.55rem 0.75rem;
    border: 1px solid #e3dadd;
    border-radius: 10px;
    color: #70686e;
    background: #fff;
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 780;
    cursor: pointer;
    transition:
        transform 150ms ease,
        border-color 150ms ease,
        color 150ms ease,
        background-color 150ms ease,
        box-shadow 150ms ease;
}

.calendar-view-button:hover {
    transform: translateY(-1px);
    border-color: #ffc3af;
    color: #e34d31;
    background: #fff7f3;
}

.calendar-view-button--active {
    border-color: #ff5a3c;
    color: #fff;
    background:
        linear-gradient(
            135deg,
            #ff5a3c,
            #ff8a3d
        );
    box-shadow: 0 7px 16px rgba(255, 90, 60, 0.21);
}

/* Filtros */

.calendar-filter-panel {
    margin-bottom: 1rem;
}

.calendar-filters {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(160px, 1fr))
        auto;
    align-items: end;
    gap: 1rem;
    padding: 1rem;
}

/* Leyenda */

.calendar-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem 1.15rem;
    margin-bottom: 1rem;
    padding: 0 0.25rem;
}

.calendar-legend > span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #766f79;
    font-size: 0.72rem;
    font-weight: 720;
}

.calendar-legend i {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 4px;
}

.calendar-legend__pending {
    border: 1px solid #e4a837;
    background: #fff0cc;
}

.calendar-legend__confirmed {
    border: 1px solid #ff8a3d;
    background: #ffece0;
}

.calendar-legend__completed {
    border: 1px solid #5688c7;
    background: #e4effc;
}

.calendar-legend__cancelled {
    border: 1px solid #b89fa4;
    background: #f4edee;
}

.calendar-legend__no-show {
    border: 1px solid #827680;
    background: #ece8eb;
}

/* Mensajes */

.calendar-message {
    margin-bottom: 0.75rem;
    padding: 0.8rem 1rem;
    border: 1px solid #ebdfe1;
    border-radius: 12px;
    color: #736b70;
    background: #fbf8f8;
    font-size: 0.78rem;
    text-align: center;
}

.calendar-message[hidden] {
    display: none;
}

.calendar-message--error {
    border-color: #edbaba;
    color: #963c3c;
    background: #fff0f0;
}

/* Panel del calendario */

.visual-calendar-panel {
    position: relative;
    overflow: hidden;
    min-height: 490px;
    padding: 0;
    border-color: #e8dfe1;
    background: #fff;
}

#bookingCalendar {
    min-height: 490px;
}

/* ------------------------------------------------------------
   Personalización del tema estándar de DayPilot
   ------------------------------------------------------------ */

.scheduler_default_main {
    border: 0 !important;
    color: #393339 !important;
    background: #fff !important;
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif !important;
}

.scheduler_default_corner,
.scheduler_default_corner_inner {
    border-color: #ebe3e5 !important;
    color: #776f75 !important;
    background:
        linear-gradient(
            145deg,
            #fff5ef,
            #fff
        ) !important;
}

.scheduler_default_timeheadergroup,
.scheduler_default_timeheadergroup_inner,
.scheduler_default_timeheadercol,
.scheduler_default_timeheadercol_inner {
    border-color: #ebe3e5 !important;
    color: #554e54 !important;
    background: #fcfaf9 !important;
    font-size: 0.72rem !important;
    font-weight: 780 !important;
    text-transform: capitalize;
}

.scheduler_default_timeheadergroup_inner {
    padding: 0.55rem 0.4rem !important;
}

.scheduler_default_timeheadercol_inner {
    padding: 0.4rem 0.25rem !important;
    color: #8a8187 !important;
    font-size: 0.66rem !important;
}

.scheduler_default_rowheader,
.scheduler_default_rowheader_inner {
    border-color: #ebe3e5 !important;
    color: #383238 !important;
    background: #fff !important;
}

.scheduler_default_rowheader_inner {
    display: flex !important;
    align-items: center !important;
    padding: 0 0.85rem !important;
    font-size: 0.78rem !important;
    font-weight: 800 !important;
}

.scheduler_default_rowheader:hover
.scheduler_default_rowheader_inner {
    color: #e64e32 !important;
    background: #fff7f3 !important;
}

.scheduler_default_matrix {
    background: #fff !important;
}

.scheduler_default_matrix_vertical_line {
    background: #f0eaec !important;
}

.scheduler_default_matrix_horizontal_line {
    background: #ebe4e6 !important;
}

.scheduler_default_cell,
.scheduler_default_cell_inner {
    background: #fff !important;
}

.scheduler_default_cell.scheduler_default_cell_business
.scheduler_default_cell_inner {
    background: #fff !important;
}

.scheduler_default_cell:hover
.scheduler_default_cell_inner {
    background: #fff4ee !important;
}

.scheduler_default_event {
    border-radius: 10px !important;
}

.scheduler_default_event_inner {
    overflow: hidden !important;
    padding: 0.4rem 0.55rem !important;
    border-width: 1px !important;
    border-radius: 10px !important;
    box-shadow: 0 5px 13px rgba(58, 39, 35, 0.11) !important;
    font-size: 0.7rem !important;
    line-height: 1.25 !important;
    white-space: normal !important;
    transition:
        filter 150ms ease,
        box-shadow 150ms ease,
        transform 150ms ease !important;
}

.scheduler_default_event:hover
.scheduler_default_event_inner {
    filter: saturate(1.08);
    box-shadow: 0 8px 18px rgba(255, 90, 60, 0.17) !important;
}

.scheduler_default_event_inner strong {
    display: block;
    overflow: hidden;
    font-size: 0.73rem;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.scheduler_default_event_inner span {
    display: block;
    overflow: hidden;
    margin-top: 0.12rem;
    opacity: 0.82;
    font-size: 0.64rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.scheduler_default_shadow_inner {
    border: 1px solid #ff8a3d !important;
    border-radius: 10px !important;
    background: rgba(255, 138, 61, 0.18) !important;
}

.scheduler_default_divider,
.scheduler_default_divider_horizontal,
.scheduler_default_resourcedivider {
    background: #e8dfe1 !important;
}

.scheduler_default_scrollable {
    scrollbar-color: #d6c8cc #f7f3f4;
    scrollbar-width: thin;
}

.scheduler_default_scrollable::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.scheduler_default_scrollable::-webkit-scrollbar-track {
    background: #f7f3f4;
}

.scheduler_default_scrollable::-webkit-scrollbar-thumb {
    border: 2px solid #f7f3f4;
    border-radius: 999px;
    background: #d3c4c8;
}

.scheduler_default_scrollable::-webkit-scrollbar-thumb:hover {
    background: #bda9af;
}

/* Fines de semana */

.scheduler_default_cell[data-day-of-week="0"]
.scheduler_default_cell_inner,
.scheduler_default_cell[data-day-of-week="6"]
.scheduler_default_cell_inner {
    background: #fdfafa !important;
}

/* Selección de rango */

.scheduler_default_timeheader_float,
.scheduler_default_timeheader_float_inner {
    border-color: #ffb99f !important;
    color: #a7432d !important;
    background: #fff0e9 !important;
}

/* Responsive */

@media (max-width: 1100px) {
    .calendar-toolbar {
        grid-template-columns: 1fr 1fr;
    }

    .calendar-toolbar__period {
        grid-column: 1 / -1;
        grid-row: 1;
    }

    .calendar-toolbar__navigation {
        grid-column: 1;
        grid-row: 2;
    }

    .calendar-toolbar__views {
        grid-column: 2;
        grid-row: 2;
    }

    .calendar-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .calendar-toolbar {
        grid-template-columns: 1fr;
    }

    .calendar-toolbar__period,
    .calendar-toolbar__navigation,
    .calendar-toolbar__views {
        grid-column: 1;
        grid-row: auto;
    }

    .calendar-toolbar__navigation,
    .calendar-toolbar__views {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        width: 100%;
    }

    .calendar-toolbar .button,
    .calendar-view-button {
        width: 100%;
        padding-right: 0.4rem;
        padding-left: 0.4rem;
    }

    .calendar-filters {
        grid-template-columns: 1fr;
    }

    .calendar-filters .button {
        width: 100%;
    }

    .calendar-legend {
        gap: 0.55rem 0.8rem;
    }

    .visual-calendar-panel,
    #bookingCalendar {
        min-height: 430px;
    }
}

@media (max-width: 500px) {
    .calendar-toolbar__navigation {
        grid-template-columns: 1fr 1fr;
    }

    #calendarToday {
        grid-column: 1 / -1;
        grid-row: 1;
    }

    .calendar-toolbar__views {
        grid-template-columns: 1fr;
    }

    .calendar-toolbar__period {
        font-size: 0.82rem;
    }
}

/* ==========================================================================
   RESERVORA · VISTA COMPACTA DEL CALENDARIO
   Añadir al FINAL de public/assets/css/app.css
   ========================================================================== */

.compact-calendar-panel {
    --compact-resource-width: 180px;
    --compact-line: rgba(92, 61, 52, 0.12);
    --compact-hour-line: rgba(255, 91, 61, 0.18);
    position: relative;
    overflow: hidden;
    min-height: 180px;
    background:
        linear-gradient(180deg, #fff 0%, #fffaf7 100%);
    border: 1px solid var(--line, #eaded8);
    border-radius: 22px;
    box-shadow: 0 18px 45px rgba(105, 54, 38, 0.08);
}

.compact-calendar-panel[hidden] {
    display: none !important;
}

.compact-calendar-panel.is-loading::after {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: grid;
    place-items: center;
    color: #8d4c3b;
    background: rgba(255, 250, 247, 0.75);
    backdrop-filter: blur(2px);
    content: "Actualizando agenda…";
    font-weight: 750;
}

.compact-calendar-header,
.compact-calendar-row {
    display: grid;
    grid-template-columns:
        var(--compact-resource-width)
        minmax(720px, 1fr);
}

.compact-calendar-header {
    position: sticky;
    top: 0;
    z-index: 12;
    min-width: calc(
        var(--compact-resource-width) + 720px
    );
    background: #fff7f1;
    border-bottom: 1px solid var(--line, #eaded8);
}

.compact-calendar-corner {
    display: flex;
    align-items: center;
    min-height: 54px;
    padding: 0.75rem 1rem;
    color: #765447;
    border-right: 1px solid var(--line, #eaded8);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.compact-calendar-hours {
    position: relative;
    min-height: 54px;
    margin-right: 18px;
}

.compact-calendar-hour {
    position: absolute;
    top: 50%;
    color: #78635c;
    font-size: 0.72rem;
    font-weight: 750;
    line-height: 1;
    transform: translate(-50%, -50%);
    white-space: nowrap;
}

.compact-calendar-hour:first-child {
    transform: translate(0, -50%);
}

.compact-calendar-hour:last-child {
    transform: translate(-100%, -50%);
}

.compact-calendar-grid {
    overflow-x: auto;
    width: 100%;
}

.compact-calendar-row {
    min-width: calc(
        var(--compact-resource-width) + 720px
    );
    min-height: 68px;
    border-bottom: 1px solid var(--line, #eaded8);
}

.compact-calendar-row:last-child {
    border-bottom: 0;
}

.compact-calendar-resource {
    position: sticky;
    left: 0;
    z-index: 8;
    display: flex;
    align-items: center;
    min-width: 0;
    padding: 0.8rem 1rem;
    overflow: hidden;
    color: #3f302c;
    background: #fffdfb;
    border-right: 1px solid var(--line, #eaded8);
    font-size: 0.88rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.compact-calendar-track {
    position: relative;
    min-height: 68px;
    margin-right: 18px;
    background-color: #fff;
    background-image:
        repeating-linear-gradient(
            to right,
            transparent 0,
            transparent calc(3.125% - 1px),
            var(--compact-line) calc(3.125% - 1px),
            var(--compact-line) 3.125%
        ),
        repeating-linear-gradient(
            to right,
            transparent 0,
            transparent calc(12.5% - 1px),
            var(--compact-hour-line) calc(12.5% - 1px),
            var(--compact-hour-line) 12.5%
        );
}

.compact-calendar-track--selectable {
    cursor: crosshair;
}

.compact-calendar-track--selectable:hover {
    background-color: #fffaf4;
}

.compact-calendar-track--selectable:active {
    background-color: #fff3e9;
}

.compact-booking {
    position: absolute;
    top: 9px;
    z-index: 4;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 20px;
    height: 50px;
    padding: 0.28rem 0.48rem;
    overflow: hidden;
    border: 1px solid;
    border-left-width: 4px;
    border-radius: 10px;
    box-shadow:
        0 5px 14px rgba(77, 48, 38, 0.11);
    cursor: pointer;
    text-align: left;
    transition:
        transform 150ms ease,
        box-shadow 150ms ease,
        filter 150ms ease;
}

.compact-booking:hover,
.compact-booking:focus-visible {
    z-index: 7;
    outline: none;
    box-shadow:
        0 9px 22px rgba(77, 48, 38, 0.2);
    filter: saturate(1.08);
    transform: translateY(-2px);
}

.compact-booking strong,
.compact-booking span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.compact-booking strong {
    font-size: 0.73rem;
    font-weight: 850;
    line-height: 1.1;
}

.compact-booking span {
    margin-top: 0.2rem;
    font-size: 0.65rem;
    font-weight: 650;
    line-height: 1.1;
    opacity: 0.82;
}

.compact-booking--pending {
    background: #fff4da !important;
    border-color: #e5a629 !important;
    color: #76500a !important;
}

.compact-booking--completed {
    background: #e5f7ee !important;
    border-color: #2da56d !important;
    color: #175b3d !important;
}

.compact-booking--cancelled {
    background: #f4edee !important;
    border-color: #b89fa4 !important;
    color: #7d6b70 !important;
    opacity: 0.78;
}

.compact-booking--cancelled strong,
.compact-booking--cancelled span {
    text-decoration: line-through;
}

.compact-booking--no-show {
    background: #fce8e6 !important;
    border-color: #d9544d !important;
    color: #812e2a !important;
}

.compact-calendar-now {
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 6;
    width: 2px;
    background: #f04438;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.65);
    pointer-events: none;
}

.compact-calendar-now::before {
    position: absolute;
    top: -4px;
    left: 50%;
    width: 8px;
    height: 8px;
    background: #f04438;
    border-radius: 50%;
    content: "";
    transform: translateX(-50%);
}

.compact-calendar-empty {
    padding: 3rem 1.25rem;
    color: var(--muted, #786b66);
    text-align: center;
}

.compact-calendar-empty[hidden] {
    display: none !important;
}

@media (max-width: 991.98px) {
    .compact-calendar-panel {
        --compact-resource-width: 145px;
        border-radius: 18px;
    }

    .compact-calendar-header,
    .compact-calendar-row {
        grid-template-columns:
            var(--compact-resource-width)
            minmax(660px, 1fr);
    }

    .compact-calendar-header,
    .compact-calendar-row {
        min-width: calc(
            var(--compact-resource-width) + 660px
        );
    }
}

@media (max-width: 575.98px) {
    .compact-calendar-panel {
        --compact-resource-width: 112px;
        margin-right: -0.25rem;
        margin-left: -0.25rem;
        border-radius: 14px;
    }

    .compact-calendar-corner,
    .compact-calendar-resource {
        padding-right: 0.65rem;
        padding-left: 0.65rem;
    }

    .compact-calendar-resource {
        font-size: 0.78rem;
    }

    .compact-calendar-header,
    .compact-calendar-row {
        grid-template-columns:
            var(--compact-resource-width)
            minmax(620px, 1fr);
    }

    .compact-calendar-header,
    .compact-calendar-row {
        min-width: calc(
            var(--compact-resource-width) + 620px
        );
    }
}

/* ==========================================================================
   RESERVORA · PORTAL PÚBLICO DE RESERVAS
   Añadir al FINAL de public/assets/css/app.css
   ========================================================================== */

.public-booking-page,
.public-booking-success-page {
    --booking-primary: #ff5a3c;
    --booking-secondary: #ff8a3d;
    min-height: calc(100vh - 150px);
    color: #352c30;
    background:
        radial-gradient(
            circle at 8% 3%,
            color-mix(
                in srgb,
                var(--booking-secondary) 15%,
                transparent
            ),
            transparent 32rem
        ),
        linear-gradient(180deg, #fffaf7 0%, #fff 44%);
}

.public-booking-hero {
    position: relative;
    overflow: hidden;
    padding: 3.5rem 0 5rem;
    color: #fff;
    background:
        linear-gradient(
            125deg,
            color-mix(
                in srgb,
                var(--booking-primary) 94%,
                #932714
            ),
            var(--booking-secondary)
        );
}

.public-booking-hero::before,
.public-booking-hero::after {
    position: absolute;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    content: "";
    pointer-events: none;
}

.public-booking-hero::before {
    top: -13rem;
    right: -8rem;
    width: 30rem;
    height: 30rem;
}

.public-booking-hero::after {
    right: 18%;
    bottom: -12rem;
    width: 19rem;
    height: 19rem;
}

.public-booking-hero__content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
}

.public-booking-brand {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    max-width: 760px;
}

.public-booking-logo,
.public-booking-logo-placeholder {
    flex: 0 0 auto;
    width: 88px;
    height: 88px;
    border: 1px solid rgba(255, 255, 255, 0.36);
    border-radius: 26px;
    box-shadow: 0 16px 35px rgba(83, 28, 14, 0.2);
}

.public-booking-logo {
    object-fit: cover;
}

.public-booking-logo-placeholder {
    display: grid;
    place-items: center;
    color: var(--booking-primary);
    background: #fff;
    font-size: 2.15rem;
    font-weight: 900;
}

.public-booking-eyebrow {
    display: inline-block;
    margin-bottom: 0.45rem;
    color: inherit;
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    opacity: 0.82;
}

.public-booking-brand h1 {
    max-width: 700px;
    margin: 0;
    color: #fff;
    font-size: clamp(2rem, 5vw, 3.65rem);
    font-weight: 900;
    letter-spacing: -0.045em;
    line-height: 1.03;
}

.public-booking-brand p {
    max-width: 620px;
    margin: 0.8rem 0 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 1.06rem;
}

.public-booking-contact {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.35rem;
    padding: 0.9rem 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 18px;
    backdrop-filter: blur(10px);
}

.public-booking-contact a {
    color: #fff;
    font-weight: 800;
    text-decoration: none;
}

.public-booking-container {
    position: relative;
    z-index: 5;
    margin-top: -2rem;
    padding-bottom: 4.5rem;
}

.public-booking-alert,
.public-booking-session-card,
.public-booking-customer-chip {
    margin-bottom: 1.25rem;
    border-radius: 20px;
}

.public-booking-alert {
    padding: 1rem 1.2rem;
}

.public-booking-alert--error {
    color: #7c2821;
    background: #fff0ed;
    border: 1px solid #f7b8af;
}

.public-booking-alert ul {
    margin: 0.55rem 0 0;
    padding-left: 1.2rem;
}

.public-booking-session-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 1.1rem 1.25rem;
    background: #fff;
    border: 1px solid #edddd6;
    box-shadow: 0 14px 35px rgba(83, 48, 36, 0.08);
}

.public-booking-session-card p {
    margin: 0.25rem 0 0;
    color: #796b66;
}

.public-booking-session-actions {
    display: flex;
    flex: 0 0 auto;
    gap: 0.7rem;
}

.public-booking-customer-chip {
    width: fit-content;
    padding: 0.7rem 1rem;
    color: #664235;
    background: #fff6ef;
    border: 1px solid #f1d2c5;
}

.public-booking-customer-chip strong {
    margin-left: 0.25rem;
}

.public-booking-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    align-items: start;
    gap: 1.5rem;
}

.public-booking-steps {
    display: grid;
    gap: 1.25rem;
}

.public-booking-card,
.public-booking-summary__card,
.public-booking-empty {
    background: #fff;
    border: 1px solid #edddd6;
    border-radius: 24px;
    box-shadow: 0 15px 40px rgba(83, 48, 36, 0.07);
}

.public-booking-card {
    overflow: hidden;
}

.public-booking-card__header {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 1.15rem 1.35rem;
    background:
        linear-gradient(
            100deg,
            color-mix(
                in srgb,
                var(--booking-primary) 6%,
                #fff
            ),
            #fff
        );
    border-bottom: 1px solid #f0e3dd;
}

.public-booking-card__header > span {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 38px;
    height: 38px;
    color: #fff;
    background: linear-gradient(
        135deg,
        var(--booking-primary),
        var(--booking-secondary)
    );
    border-radius: 13px;
    font-size: 0.9rem;
    font-weight: 900;
    box-shadow:
        0 8px 18px
        color-mix(
            in srgb,
            var(--booking-primary) 24%,
            transparent
        );
}

.public-booking-card__header h2 {
    margin: 0;
    color: #392d29;
    font-size: 1.08rem;
    font-weight: 850;
}

.public-booking-card__header p {
    margin: 0.15rem 0 0;
    color: #806f69;
    font-size: 0.85rem;
}

.public-booking-card__body {
    padding: 1.35rem;
}

.public-booking-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.public-booking-page .form-control,
.public-booking-page .form-select {
    min-height: 48px;
    border-color: #e8d9d2;
    border-radius: 13px;
}

.public-booking-page textarea.form-control {
    min-height: 105px;
}

.public-booking-page .form-control:focus,
.public-booking-page .form-select:focus {
    border-color: var(--booking-primary);
    box-shadow:
        0 0 0 0.22rem
        color-mix(
            in srgb,
            var(--booking-primary) 17%,
            transparent
        );
}

.public-booking-slots {
    margin-top: 1.15rem;
    padding-top: 1.15rem;
    border-top: 1px solid #f0e3dd;
}

.public-booking-slot-message {
    padding: 0.85rem 1rem;
    color: #766963;
    background: #fff9f5;
    border: 1px dashed #e9cfc3;
    border-radius: 14px;
    text-align: center;
}

.public-booking-slot-grid {
    display: grid;
    grid-template-columns: repeat(
        auto-fill,
        minmax(132px, 1fr)
    );
    gap: 0.7rem;
}

.public-booking-slot {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-height: 84px;
    padding: 0.75rem 0.85rem;
    color: #483630;
    background: #fff;
    border: 1px solid #ead9d1;
    border-radius: 15px;
    cursor: pointer;
    text-align: left;
    transition:
        border-color 150ms ease,
        box-shadow 150ms ease,
        transform 150ms ease;
}

.public-booking-slot:hover,
.public-booking-slot:focus-visible {
    border-color: var(--booking-secondary);
    outline: none;
    box-shadow:
        0 8px 20px
        color-mix(
            in srgb,
            var(--booking-secondary) 18%,
            transparent
        );
    transform: translateY(-2px);
}

.public-booking-slot--selected {
    color: #fff;
    background: linear-gradient(
        135deg,
        var(--booking-primary),
        var(--booking-secondary)
    );
    border-color: transparent;
    box-shadow:
        0 11px 24px
        color-mix(
            in srgb,
            var(--booking-primary) 28%,
            transparent
        );
}

.public-booking-slot strong {
    font-size: 1rem;
    font-weight: 900;
}

.public-booking-slot span {
    margin-top: 0.12rem;
    font-size: 0.76rem;
    opacity: 0.85;
}

.public-booking-slot small {
    margin-top: auto;
    padding-top: 0.38rem;
    overflow: hidden;
    font-size: 0.68rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.public-booking-summary {
    position: sticky;
    top: 1.2rem;
}

.public-booking-summary__card {
    padding: 1.4rem;
    border-top: 5px solid var(--booking-primary);
}

.public-booking-summary__card h2 {
    margin: 0 0 1.25rem;
    color: #392d29;
    font-size: 1.35rem;
    font-weight: 900;
}

.public-booking-summary__card dl {
    display: grid;
    gap: 0;
    margin: 0 0 1.3rem;
}

.public-booking-summary__card dl > div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f0e4de;
}

.public-booking-summary__card dt {
    color: #85746e;
    font-size: 0.79rem;
    font-weight: 650;
}

.public-booking-summary__card dd {
    margin: 0;
    color: #3e302b;
    font-size: 0.82rem;
    font-weight: 800;
    text-align: right;
}

.public-booking-summary__card .button {
    width: 100%;
}

.public-booking-summary__card .button--primary,
.public-booking-session-actions .button--primary,
.public-booking-success__actions .button--primary {
    color: #fff;
    background: linear-gradient(
        135deg,
        var(--booking-primary),
        var(--booking-secondary)
    );
    border-color: transparent;
}

.public-booking-summary__card .button:disabled {
    cursor: not-allowed;
    filter: grayscale(0.55);
    opacity: 0.55;
}

.public-booking-summary__note {
    margin: 0.75rem 0 0;
    color: #887872;
    font-size: 0.72rem;
    line-height: 1.45;
    text-align: center;
}

.public-booking-empty {
    padding: 4rem 1.5rem;
    text-align: center;
}

.public-booking-empty > span {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    color: var(--booking-primary);
    background:
        color-mix(
            in srgb,
            var(--booking-primary) 10%,
            #fff
        );
    border-radius: 22px;
    font-size: 1.7rem;
}

/* Confirmación pública */

.public-booking-success-page {
    display: grid;
    place-items: start center;
    padding: 4rem 0;
}

.public-booking-success-container {
    max-width: 850px;
}

.public-booking-success {
    position: relative;
    overflow: hidden;
    padding: clamp(1.4rem, 4vw, 2.6rem);
    background: #fff;
    border: 1px solid #eadbd4;
    border-top: 6px solid var(--booking-primary);
    border-radius: 30px;
    box-shadow: 0 24px 65px rgba(83, 48, 36, 0.13);
    text-align: center;
}

.public-booking-success::before {
    position: absolute;
    top: -8rem;
    right: -8rem;
    width: 19rem;
    height: 19rem;
    background:
        color-mix(
            in srgb,
            var(--booking-secondary) 9%,
            transparent
        );
    border-radius: 50%;
    content: "";
}

.public-booking-success__icon {
    position: relative;
    display: grid;
    place-items: center;
    width: 72px;
    height: 72px;
    margin: 0 auto 1rem;
    color: #fff;
    background: linear-gradient(
        135deg,
        var(--booking-primary),
        var(--booking-secondary)
    );
    border-radius: 24px;
    box-shadow:
        0 15px 28px
        color-mix(
            in srgb,
            var(--booking-primary) 27%,
            transparent
        );
    font-size: 2rem;
    font-weight: 900;
}

.public-booking-success--cancelled {
    border-top-color: #b89fa4;
}

.public-booking-success--cancelled
.public-booking-success__icon {
    background: #9b858a;
    box-shadow: 0 15px 28px rgba(102, 79, 84, 0.2);
}

.public-booking-success h1 {
    position: relative;
    margin: 0.7rem 0 0;
    color: #352b28;
    font-size: clamp(1.8rem, 5vw, 2.7rem);
    font-weight: 900;
    letter-spacing: -0.035em;
}

.public-booking-success__lead {
    position: relative;
    max-width: 590px;
    margin: 0.75rem auto 1.4rem;
    color: #786a65;
    font-size: 1rem;
}

.public-booking-status {
    position: relative;
    display: inline-flex;
    padding: 0.35rem 0.72rem;
    color: #9b3e29;
    background: #fff0e9;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.public-booking-status--cancelled {
    color: #725f64;
    background: #f3edef;
}

.public-booking-status--completed {
    color: #1e6a46;
    background: #e4f6ed;
}

.public-booking-status--pending {
    color: #805a0d;
    background: #fff2d2;
}

.public-booking-success__business {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 1.5rem;
    padding: 0.55rem 0.85rem;
    background: #fff9f5;
    border: 1px solid #efddd4;
    border-radius: 16px;
}

.public-booking-success__business img,
.public-booking-success__business > span {
    width: 35px;
    height: 35px;
    border-radius: 11px;
}

.public-booking-success__business img {
    object-fit: cover;
}

.public-booking-success__business > span {
    display: grid;
    place-items: center;
    color: #fff;
    background: var(--booking-primary);
    font-weight: 900;
}

.public-booking-confirmation-grid {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
    margin: 0;
    text-align: left;
}

.public-booking-confirmation-item {
    padding: 1rem;
    background: #fffaf7;
    border: 1px solid #f0e1da;
    border-radius: 16px;
}

.public-booking-confirmation-item dt {
    color: #8a7871;
    font-size: 0.7rem;
    font-weight: 750;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.public-booking-confirmation-item dd {
    margin: 0.35rem 0 0;
    color: #3e302b;
    font-size: 0.95rem;
    font-weight: 850;
}

.public-booking-reminder-note,
.public-booking-customer-note {
    position: relative;
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 16px;
    text-align: left;
}

.public-booking-reminder-note {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #5f493d;
    background: #fff4df;
    border: 1px solid #f3d69c;
}

.public-booking-reminder-note > span {
    font-size: 1.35rem;
}

.public-booking-reminder-note p,
.public-booking-customer-note p {
    margin: 0;
}

.public-booking-customer-note {
    background: #f8f4f2;
    border: 1px solid #e8dcda;
}

.public-booking-customer-note p {
    margin-top: 0.35rem;
    color: #71635e;
}

.public-booking-reference {
    position: relative;
    display: flex;
    justify-content: center;
    gap: 0.55rem;
    margin-top: 1.15rem;
    color: #806f68;
    font-size: 0.78rem;
}

.public-booking-reference strong {
    color: #44342f;
    letter-spacing: 0.08em;
}

.public-booking-success__actions {
    position: relative;
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.public-booking-success__footer {
    position: relative;
    margin: 1rem 0 0;
    color: #94847e;
    font-size: 0.72rem;
}

@media (max-width: 991.98px) {
    .public-booking-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .public-booking-summary {
        position: static;
    }

    .public-booking-summary__card dl {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 1rem;
    }
}

@media (max-width: 767.98px) {
    .public-booking-hero {
        padding: 2.5rem 0 4rem;
    }

    .public-booking-hero__content,
    .public-booking-session-card {
        align-items: stretch;
        flex-direction: column;
    }

    .public-booking-contact {
        align-items: flex-start;
        width: fit-content;
    }

    .public-booking-session-actions {
        flex-wrap: wrap;
    }

    .public-booking-fields,
    .public-booking-confirmation-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 575.98px) {
    .public-booking-brand {
        align-items: flex-start;
        flex-direction: column;
        gap: 1rem;
    }

    .public-booking-logo,
    .public-booking-logo-placeholder {
        width: 68px;
        height: 68px;
        border-radius: 21px;
    }

    .public-booking-container {
        margin-top: -1.3rem;
    }

    .public-booking-card,
    .public-booking-summary__card {
        border-radius: 18px;
    }

    .public-booking-card__header,
    .public-booking-card__body,
    .public-booking-summary__card {
        padding-right: 1rem;
        padding-left: 1rem;
    }

    .public-booking-slot-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .public-booking-summary__card dl {
        grid-template-columns: minmax(0, 1fr);
    }

    .public-booking-success-page {
        padding: 1.5rem 0;
    }

    .public-booking-success {
        border-radius: 22px;
    }

    .public-booking-success__actions {
        flex-direction: column;
    }

    .public-booking-success__actions .button {
        width: 100%;
    }
}


/*
|--------------------------------------------------------------------------
| Reservora · Personalización visual por negocio
|--------------------------------------------------------------------------
| Pegar este bloque AL FINAL de public/assets/css/app.css.
*/

/* Fondo real del negocio. El header añadirá la clase business-branded
   y la variable --business-background-image al elemento body. */

body.business-branded {
    position: relative;
    isolation: isolate;
    min-height: 100vh;
    background:
        linear-gradient(
            145deg,
            #fff8f4 0%,
            #fffdfb 48%,
            #fff4ed 100%
        );
}

body.business-branded::before,
body.business-branded::after {
    position: fixed;
    inset: 0;
    z-index: 0;
    display: block;
    pointer-events: none;
    content: "";
}

body.business-branded::before {
    inset: -20px;
    background-image: var(
        --business-background-image
    );
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    filter: blur(5px);
    opacity: 0.78;
    transform: scale(1.035);
}

body.business-branded::after {
    z-index: 0;
    background:
        linear-gradient(
            135deg,
            rgba(255, 250, 247, 0.25),
            rgba(255, 255, 255, 0.38) 48%,
            rgba(255, 244, 237, 0.3)
        );
}

body.business-branded > * {
    position: relative;
    z-index: 1;
}

/*
 * El encabezado debe conservar una capa superior. Sin esta excepción,
 * la regla anterior reduce su z-index y los menús quedan detrás de
 * formularios, calendarios y selectores.
 */
body.business-branded > .site-header {
    position: sticky;
    z-index: 1000;
}

.site-header .header-dropdown {
    z-index: 1100;
}

.site-header .header-dropdown-menu {
    z-index: 1200;
}

body.business-branded > section,
body.business-branded > main {
    background: transparent;
}

body.business-branded .form-card,
body.business-branded .resource-card,
body.business-branded .service-card,
body.business-branded .dashboard-card,
body.business-branded .booking-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
}

/* Pantalla de configuración */

.branding-page {
    position: relative;
    padding: 2rem 0 4.5rem;
}

.branding-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
    margin: 1.1rem 0 2rem;
}

.branding-heading h1 {
    max-width: 760px;
    margin: 0.25rem 0 0.65rem;
    color: #2f272a;
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    font-weight: 850;
    line-height: 0.98;
    letter-spacing: -0.055em;
}

.branding-heading p {
    max-width: 720px;
    margin: 0;
    color: #75696d;
    font-size: 1.05rem;
    line-height: 1.65;
}

.branding-layout {
    display: grid;
    grid-template-columns:
        minmax(0, 1.35fr)
        minmax(310px, 0.65fr);
    gap: 1.5rem;
    align-items: start;
}

.branding-fields {
    display: grid;
    gap: 1.25rem;
    min-width: 0;
}

.branding-form .form-card {
    overflow: hidden;
    margin: 0;
    border: 1px solid rgba(78, 52, 60, 0.09);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow:
        0 18px 45px rgba(70, 42, 49, 0.08),
        0 2px 7px rgba(70, 42, 49, 0.035);
}

.branding-form .form-card-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.4rem 1.5rem 1.2rem;
    border-bottom: 1px solid rgba(78, 52, 60, 0.08);
    background:
        linear-gradient(
            135deg,
            color-mix(
                in srgb,
                var(--business-secondary, var(--orange)) 9%,
                rgba(255, 255, 255, 0.96)
            ),
            rgba(255, 255, 255, 0.98)
        );
}

.branding-form .form-card-header h2 {
    margin: 0 0 0.25rem;
    color: #362c30;
    font-size: 1.08rem;
    font-weight: 800;
}

.branding-form .form-card-header p {
    margin: 0;
    color: #84767a;
    font-size: 0.91rem;
    line-height: 1.5;
}

.branding-form .form-card-number {
    display: grid;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 14px;
    color: #fff;
    background:
        linear-gradient(
            135deg,
            var(--business-primary, var(--coral)),
            var(--business-secondary, var(--orange))
        );
    box-shadow:
        0 9px 20px
        color-mix(
            in srgb,
            var(--business-primary, var(--coral)) 25%,
            transparent
        );
    font-size: 0.78rem;
    font-weight: 850;
}

.branding-form .form-card-body {
    padding: 1.5rem;
}

.branding-name-control {
    position: relative;
}

.branding-name-control .form-control {
    padding-right: 5rem;
}

.branding-character-count {
    position: absolute;
    top: 50%;
    right: 0.9rem;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    color: var(--business-primary, var(--coral));
    background:
        color-mix(
            in srgb,
            var(--business-primary, var(--coral)) 9%,
            #ffffff
        );
    font-size: 0.76rem;
    font-weight: 800;
    transform: translateY(-50%);
}

.branding-form .form-help {
    margin: 0.65rem 0 0;
    color: #897b7f;
    font-size: 0.84rem;
    line-height: 1.5;
}

.branding-upload-row {
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr);
    gap: 1.25rem;
    align-items: center;
}

.branding-logo-thumb {
    display: grid;
    overflow: hidden;
    width: 118px;
    height: 118px;
    place-items: center;
    border: 1px dashed
        color-mix(
            in srgb,
            var(--business-primary, var(--coral)) 42%,
            transparent
        );
    border-radius: 28px;
    background:
        linear-gradient(
            145deg,
            color-mix(
                in srgb,
                var(--business-secondary, var(--orange)) 10%,
                #ffffff
            ),
            #ffffff
        );
}

.branding-logo-thumb img {
    display: block;
    width: calc(100% - 20px);
    height: calc(100% - 20px);
    object-fit: contain;
}

.branding-default-mark,
.branding-preview-logo > span {
    display: grid;
    place-items: center;
    color: #fff;
    background:
        linear-gradient(
            145deg,
            var(--business-primary, var(--coral)),
            var(--business-secondary, var(--orange))
        );
    box-shadow:
        0 10px 24px
        color-mix(
            in srgb,
            var(--business-primary, var(--coral)) 28%,
            transparent
        );
    font-weight: 900;
}

.branding-default-mark {
    width: 72px;
    height: 72px;
    border-radius: 23px;
    font-size: 2rem;
}

.branding-upload-fields {
    min-width: 0;
}

.branding-remove-option {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 0.9rem;
    color: #6f6065;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 650;
}

.branding-remove-option input {
    width: 1.05rem;
    height: 1.05rem;
    margin: 0;
    accent-color:
        var(--business-primary, var(--coral));
}

/* Previsualización lateral */

.branding-preview-column {
    min-width: 0;
}

.branding-preview-sticky {
    position: sticky;
    top: 1.25rem;
    padding: 1.15rem;
    border: 1px solid rgba(78, 52, 60, 0.09);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow:
        0 20px 50px rgba(70, 42, 49, 0.1);
    backdrop-filter: blur(16px);
}

.branding-preview {
    position: relative;
    overflow: hidden;
    min-height: 490px;
    margin-top: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 22px;
    isolation: isolate;
    background:
        linear-gradient(
            145deg,
            color-mix(
                in srgb,
                var(--business-primary, var(--coral)) 10%,
                #ffffff
            ),
            color-mix(
                in srgb,
                var(--business-secondary, var(--orange)) 20%,
                #ffffff
            )
        );
}

.branding-preview-background {
    position: absolute;
    z-index: 0;
    inset: -14px;
    background-image:
        var(--branding-preview-image);
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    filter: blur(5px);
    opacity: 0.48;
    transform: scale(1.04);
}

.branding-preview::after {
    position: absolute;
    z-index: 1;
    inset: 0;
    content: "";
    background:
        linear-gradient(
            145deg,
            color-mix(
                in srgb,
                var(--business-secondary, var(--orange)) 8%,
                rgba(255, 255, 255, 0.76)
            ),
            rgba(255, 255, 255, 0.84)
        );
}

.branding-preview-content {
    position: relative;
    z-index: 2;
    display: flex;
    min-height: 490px;
    flex-direction: column;
    padding: 1rem;
}

.branding-preview-header {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.76);
    box-shadow:
        0 8px 25px rgba(72, 43, 50, 0.08);
    backdrop-filter: blur(12px);
}

.branding-preview-header strong {
    overflow: hidden;
    color: #372d31;
    font-size: 0.95rem;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.branding-preview-logo {
    display: grid;
    flex: 0 0 40px;
    overflow: hidden;
    width: 40px;
    height: 40px;
    place-items: center;
    border-radius: 13px;
    background: #fff;
}

.branding-preview-logo img {
    display: block;
    width: 34px;
    height: 34px;
    object-fit: contain;
}

.branding-preview-logo > span {
    width: 40px;
    height: 40px;
    border-radius: 13px;
    font-size: 1rem;
}

.branding-preview-card {
    margin: auto 0;
    padding: 1.35rem;
    border: 1px solid rgba(255, 255, 255, 0.82);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.84);
    box-shadow:
        0 20px 45px rgba(75, 44, 51, 0.12);
    backdrop-filter: blur(14px);
}

.branding-preview-kicker {
    color:
        var(--business-primary, var(--coral));
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.branding-preview-card h3 {
    margin: 0.45rem 0 0.6rem;
    color: #342b2e;
    font-size: 1.4rem;
    font-weight: 850;
    letter-spacing: -0.035em;
}

.branding-preview-card p {
    margin: 0;
    color: #7c6e72;
    font-size: 0.85rem;
    line-height: 1.55;
}

.branding-preview-actions {
    display: grid;
    grid-template-columns: 1fr 0.65fr;
    gap: 0.55rem;
    margin-top: 1.1rem;
}

.branding-preview-actions span {
    height: 35px;
    border-radius: 11px;
    background:
        linear-gradient(
            135deg,
            var(--business-primary, var(--coral)),
            var(--business-secondary, var(--orange))
        );
}

.branding-preview-actions span:last-child {
    background:
        color-mix(
            in srgb,
            var(--business-secondary, var(--orange)) 14%,
            #ffffff
        );
}

.branding-preview-note {
    margin: 0.85rem 0 0;
    color: #88797d;
    font-size: 0.79rem;
    line-height: 1.5;
}

.branding-form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding: 1rem;
    border: 1px solid rgba(78, 52, 60, 0.08);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow:
        0 12px 32px rgba(70, 42, 49, 0.07);
}

@media (max-width: 1050px) {
    .branding-layout {
        grid-template-columns: 1fr;
    }

    .branding-preview-column {
        order: -1;
    }

    .branding-preview-sticky {
        position: static;
    }

    .branding-preview {
        min-height: 360px;
    }

    .branding-preview-content {
        min-height: 360px;
    }
}

@media (max-width: 720px) {
    .branding-page {
        padding-top: 1.25rem;
    }

    .branding-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .branding-heading h1 {
        font-size: 2.45rem;
    }

    .branding-upload-row {
        grid-template-columns: 1fr;
    }

    .branding-logo-thumb {
        width: 105px;
        height: 105px;
    }

    .branding-form-actions {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .branding-form-actions .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .branding-form .form-card-header,
    .branding-form .form-card-body {
        padding: 1.1rem;
    }

    .branding-preview-sticky {
        padding: 0.8rem;
        border-radius: 22px;
    }

    .branding-preview {
        min-height: 330px;
    }

    .branding-preview-content {
        min-height: 330px;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.business-branded::before {
        transform: none;
    }
}
