/*
 * Puente brand stylesheet.
 *
 * Brand tokens are CSS custom properties on :root — change them here and
 * every surface updates. Surface-specific styles (signup, dashboard, etc.)
 * live in their own classes below.
 *
 * Convention: use --puente-* token names everywhere. If a surface needs
 * a value that's not a token yet, add the token first, then use it.
 */

:root {
    /* Brand colors */
    --puente-teal: #2dbeb5;
    --puente-teal-light: #5fd5cd;
    --puente-teal-dark: #25a499;
    --puente-navy: #1e5e8b;
    --puente-navy-dark: #174a6d;
    --puente-coral: #ff9b7d;          /* warm accent, used sparingly */
    --puente-coral-soft: #ffd4c4;
    --puente-bg: #ffffff;
    --puente-bg-soft: #f8fafc;
    --puente-bg-tinted: #f1f9f8;
    --puente-text: #0f172a;
    --puente-text-muted: #475569;
    --puente-text-faint: #94a3b8;
    --puente-border: #e2e8f0;
    --puente-border-strong: #cbd5e1;

    /* Triage semantic colors */
    --puente-urgent: #c92a2a;
    --puente-urgent-bg: #ffe3e3;
    --puente-priority: #e67700;
    --puente-priority-bg: #fff4e6;
    --puente-routine: #2f9e44;
    --puente-routine-bg: #ebfbee;

    /* Typography */
    --puente-font-display: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    --puente-font-body: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;

    /* Spacing scale */
    --puente-space-xs: 0.5rem;
    --puente-space-sm: 0.75rem;
    --puente-space-md: 1rem;
    --puente-space-lg: 1.5rem;
    --puente-space-xl: 2rem;
    --puente-space-2xl: 3rem;
    --puente-space-3xl: 4rem;
    --puente-space-4xl: 6rem;

    /* Radius scale */
    --puente-radius-sm: 8px;
    --puente-radius-md: 12px;
    --puente-radius-lg: 16px;
    --puente-radius-xl: 24px;
    --puente-radius-2xl: 32px;
    --puente-radius-pill: 999px;

    /* Shadows */
    --puente-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
    --puente-shadow-md: 0 4px 12px rgba(15, 23, 42, 0.06);
    --puente-shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.10);
    --puente-shadow-glow: 0 0 64px rgba(45, 190, 181, 0.25);

    /* Motion */
    --puente-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --puente-ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
    --puente-duration-fast: 180ms;
    --puente-duration-base: 280ms;
    --puente-duration-slow: 480ms;
    --puente-duration-cinematic: 900ms;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: var(--puente-font-body);
    color: var(--puente-text);
    background: var(--puente-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

* {
    box-sizing: border-box;
}

a {
    color: var(--puente-navy);
}

/*
 * Suppress focus outline on the H1 unconditionally.
 *
 * Blazor's <FocusOnNavigate Selector="h1" /> in Routes.razor programmatically
 * focuses the top H1 after every route change for screen-reader accessibility.
 *
 * First attempt was `h1:focus:not(:focus-visible)` which keeps a keyboard
 * focus ring while hiding mouse / programmatic focus. That works in Firefox
 * but Chrome's :focus-visible heuristic matches programmatic focus after
 * route navigation, so the rule never fired and the outline still showed.
 *
 * H1s aren't typically tab-targets (they're headings, not interactive
 * elements). The screen-reader announcement from FocusOnNavigate still
 * works without a visible outline — that's the actual a11y win. The visual
 * outline was just a side effect of how browsers paint :focus.
 */
h1:focus,
h1:focus-visible {
    outline: none;
}

/* ============================================================
 * SIGNUP SURFACE (/signup) — cinematic v2
 *
 * Tech AI leisure register. First 30 seconds matter most; everything
 * is choreographed to feel calm, premium, in-motion.
 * ============================================================ */

.signup-shell {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #fbfdfd;
    overflow: hidden;
}

/* ----- Atmospheric background: animated gradient mesh ----- */

.signup-shell::before,
.signup-shell::after {
    content: "";
    position: absolute;
    inset: -25%;
    z-index: 0;
    pointer-events: none;
    filter: blur(80px);
    opacity: 0.7;
    will-change: transform;
}

.signup-shell::before {
    background:
        radial-gradient(circle at 20% 20%, rgba(45, 190, 181, 0.45), transparent 40%),
        radial-gradient(circle at 80% 30%, rgba(30, 94, 139, 0.30), transparent 45%);
    animation: signup-drift-a 22s ease-in-out infinite;
}

.signup-shell::after {
    background:
        radial-gradient(circle at 70% 80%, rgba(255, 155, 125, 0.25), transparent 40%),
        radial-gradient(circle at 30% 70%, rgba(95, 213, 205, 0.30), transparent 45%);
    animation: signup-drift-b 28s ease-in-out infinite;
}

@keyframes signup-drift-a {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33%      { transform: translate(2%, -3%) rotate(8deg); }
    66%      { transform: translate(-2%, 4%) rotate(-6deg); }
}

@keyframes signup-drift-b {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50%      { transform: translate(3%, -2%) rotate(-7deg); }
}

/* All content sits above the mesh */
.signup-brand-shell,
.signup-main,
.signup-footer {
    position: relative;
    z-index: 1;
}

.signup-brand-shell {
    padding: var(--puente-space-lg) var(--puente-space-xl) 0;
}

.signup-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--puente-space-lg) var(--puente-space-xl) var(--puente-space-2xl);
}

.signup-content {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
}

/* ----- Two-column layout above the fold ----- */

.signup-fold {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: var(--puente-space-3xl);
    align-items: center;
    min-height: calc(100vh - 200px);
    margin-bottom: var(--puente-space-3xl);
}

@media (max-width: 880px) {
    .signup-fold {
        grid-template-columns: 1fr;
        gap: var(--puente-space-2xl);
        min-height: 0;
    }
}

.signup-hero {
    animation: signup-rise var(--puente-duration-cinematic) var(--puente-ease-out) both;
}

.signup-eyebrow {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    background: rgba(45, 190, 181, 0.12);
    color: var(--puente-teal-dark);
    border-radius: var(--puente-radius-pill);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: var(--puente-space-lg);
}

.signup-hero h1 {
    font-family: var(--puente-font-display);
    font-size: clamp(2.5rem, 6.5vw, 4.25rem);
    font-weight: 700;
    line-height: 1.02;
    letter-spacing: -0.035em;
    margin: 0 0 var(--puente-space-lg);
    background: linear-gradient(135deg, #0f172a 0%, var(--puente-navy) 50%, var(--puente-teal-dark) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.signup-hero-sub {
    font-size: 1.15rem;
    line-height: 1.6;
    color: var(--puente-text-muted);
    margin: 0 0 var(--puente-space-xl);
    max-width: 480px;
}

.signup-hero-points {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--puente-space-sm);
}

.signup-hero-point {
    display: flex;
    align-items: center;
    gap: var(--puente-space-sm);
    font-size: 1rem;
    color: var(--puente-text);
}

.signup-hero-point::before {
    content: "";
    display: inline-block;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--puente-teal) 0%, var(--puente-navy) 100%);
    box-shadow: 0 0 0 4px rgba(45, 190, 181, 0.10);
}

/* ----- Glass-morphism form card ----- */

.signup-form-card {
    position: relative;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: var(--puente-radius-2xl);
    padding: var(--puente-space-2xl);
    box-shadow:
        0 24px 60px -12px rgba(15, 23, 42, 0.14),
        0 0 0 1px rgba(15, 23, 42, 0.03),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    animation: signup-rise var(--puente-duration-cinematic) var(--puente-ease-out) 160ms both;
}

.signup-form-card::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(45, 190, 181, 0.35), rgba(30, 94, 139, 0.25), rgba(255, 155, 125, 0.20));
    z-index: -1;
    filter: blur(20px);
    opacity: 0.6;
}

.signup-form-title {
    font-family: var(--puente-font-display);
    font-size: 1.35rem;
    font-weight: 600;
    margin: 0 0 var(--puente-space-xs);
    color: var(--puente-text);
}

.signup-form-subtitle {
    font-size: 0.95rem;
    color: var(--puente-text-muted);
    margin: 0 0 var(--puente-space-xl);
    line-height: 1.5;
}

/* Floating-label form fields */

.signup-form-field {
    position: relative;
}

.signup-form-field + .signup-form-field {
    margin-top: var(--puente-space-lg);
}

.signup-form-input {
    width: 100%;
    padding: 1.5rem 1rem 0.6rem;
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.4;
    color: var(--puente-text);
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(203, 213, 225, 0.6);
    border-radius: var(--puente-radius-md);
    transition: border-color var(--puente-duration-base) var(--puente-ease-out),
                background var(--puente-duration-base) var(--puente-ease-out),
                box-shadow var(--puente-duration-base) var(--puente-ease-out);
}

.signup-form-input::placeholder {
    color: transparent;
}

.signup-form-input:focus {
    outline: none;
    border-color: var(--puente-teal);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 0 0 4px rgba(45, 190, 181, 0.15);
}

.signup-form-label {
    position: absolute;
    top: 1rem;
    left: 1rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--puente-text-muted);
    pointer-events: none;
    transform-origin: left top;
    transition: transform var(--puente-duration-base) var(--puente-ease-out),
                color var(--puente-duration-base) var(--puente-ease-out);
}

.signup-form-input:focus + .signup-form-label,
.signup-form-input:not(:placeholder-shown) + .signup-form-label {
    transform: translateY(-0.5rem) scale(0.75);
    color: var(--puente-teal-dark);
}

.signup-form-optional {
    font-weight: 400;
    color: var(--puente-text-faint);
    margin-left: 0.25rem;
}

.signup-form-helper {
    font-size: 0.85rem;
    color: var(--puente-text-muted);
    margin: var(--puente-space-xs) 0 0 0.5rem;
}

.signup-form-error {
    margin-top: var(--puente-space-md);
    padding: var(--puente-space-sm) var(--puente-space-md);
    background: var(--puente-urgent-bg);
    color: var(--puente-urgent);
    border-radius: var(--puente-radius-sm);
    font-size: 0.9rem;
}

.signup-form-actions {
    margin-top: var(--puente-space-xl);
}

.signup-form-submit {
    position: relative;
    width: 100%;
    padding: 1.15rem 1.5rem;
    font-family: inherit;
    font-size: 1.05rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, var(--puente-teal) 0%, var(--puente-navy) 100%);
    border: none;
    border-radius: var(--puente-radius-md);
    cursor: pointer;
    overflow: hidden;
    transition: transform var(--puente-duration-fast) var(--puente-ease-out),
                box-shadow var(--puente-duration-fast) var(--puente-ease-out),
                opacity var(--puente-duration-fast) var(--puente-ease-out);
    box-shadow: 0 8px 24px rgba(45, 190, 181, 0.30),
                inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.signup-form-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 16px 36px rgba(45, 190, 181, 0.42),
                inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.signup-form-submit:active:not(:disabled) {
    transform: translateY(0);
}

.signup-form-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.signup-form-fineprint {
    margin: var(--puente-space-lg) 0 0;
    font-size: 0.8rem;
    color: var(--puente-text-faint);
    text-align: center;
    line-height: 1.5;
}

/* ----- Below the fold: live chat preview + trust section ----- */

.signup-demo {
    margin-top: var(--puente-space-3xl);
    padding-top: var(--puente-space-3xl);
    border-top: 1px solid rgba(203, 213, 225, 0.5);
    display: grid;
    grid-template-columns: 1fr 0.9fr;
    gap: var(--puente-space-3xl);
    align-items: center;
}

@media (max-width: 880px) {
    .signup-demo {
        grid-template-columns: 1fr;
        gap: var(--puente-space-2xl);
    }
}

.signup-demo-prose .signup-demo-eyebrow {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--puente-coral);
    margin: 0 0 var(--puente-space-md);
}

.signup-demo-prose h2 {
    font-family: var(--puente-font-display);
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin: 0 0 var(--puente-space-md);
    color: var(--puente-text);
}

.signup-demo-prose p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--puente-text-muted);
    margin: 0 0 var(--puente-space-md);
    max-width: 460px;
}

.signup-demo-quote {
    margin-top: var(--puente-space-lg);
    padding-left: var(--puente-space-md);
    border-left: 3px solid var(--puente-teal);
    font-style: italic;
    color: var(--puente-text);
}

.signup-demo-quote-attribution {
    display: block;
    margin-top: var(--puente-space-xs);
    font-size: 0.85rem;
    font-style: normal;
    color: var(--puente-text-faint);
}

/* ----- Animated chat preview ----- */

.chat-preview {
    display: flex;
    justify-content: center;
    perspective: 1000px;
}

.chat-preview-phone {
    width: 300px;
    background: #1e2a3a;
    border-radius: 28px;
    padding: 8px;
    box-shadow:
        0 30px 60px -15px rgba(15, 23, 42, 0.4),
        0 0 0 1px rgba(15, 23, 42, 0.08);
    transform: rotateY(-6deg) rotateX(2deg);
    transition: transform var(--puente-duration-slow) var(--puente-ease-out);
    animation: signup-phone-float 6s ease-in-out infinite;
}

@keyframes signup-phone-float {
    0%, 100% { transform: rotateY(-6deg) rotateX(2deg) translateY(0); }
    50%      { transform: rotateY(-6deg) rotateX(2deg) translateY(-12px); }
}

.chat-preview-status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 14px 0;
    color: rgba(255, 255, 255, 0.85);
    font-size: 11px;
    font-weight: 600;
}

.chat-preview-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: #075e54;
    border-radius: 20px 20px 0 0;
    margin-top: 8px;
    color: white;
}

.chat-preview-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--puente-teal) 0%, var(--puente-navy) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: white;
}

.chat-preview-contact {
    font-weight: 600;
    font-size: 13px;
}

.chat-preview-presence {
    font-size: 11px;
    opacity: 0.85;
}

.chat-preview-stage {
    padding: 16px 12px 20px;
    min-height: 280px;
    background: #ece5dd;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.25), transparent 30%),
        radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.20), transparent 30%);
    border-radius: 0 0 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chat-preview-bubble {
    max-width: 80%;
    padding: 8px 12px;
    font-size: 12.5px;
    line-height: 1.4;
    border-radius: 14px;
    opacity: 0;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.06);
}

.chat-preview-bubble-patient {
    align-self: flex-end;
    background: #dcf8c6;
    color: #1a1a1a;
    border-bottom-right-radius: 4px;
    animation: chat-bubble-cycle-patient 12s ease-in-out infinite 0.4s;
}

.chat-preview-bubble-ai {
    align-self: flex-start;
    background: white;
    color: #1a1a1a;
    border-bottom-left-radius: 4px;
    animation: chat-bubble-cycle-ai 12s ease-in-out infinite;
}

.chat-preview-typing {
    align-self: flex-start;
    display: inline-flex;
    gap: 4px;
    padding: 10px 12px;
    background: white;
    border-radius: 14px;
    border-bottom-left-radius: 4px;
    opacity: 0;
    animation: chat-typing-cycle 12s ease-in-out infinite;
}

.chat-preview-typing span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--puente-text-faint);
    animation: chat-typing-dot 1.2s ease-in-out infinite;
}

.chat-preview-typing span:nth-child(2) { animation-delay: 0.15s; }
.chat-preview-typing span:nth-child(3) { animation-delay: 0.3s; }

@keyframes chat-bubble-cycle-patient {
    0%       { opacity: 0; transform: translateY(8px) scale(0.95); }
    5%       { opacity: 1; transform: translateY(0) scale(1); }
    80%      { opacity: 1; }
    90%, 100% { opacity: 0; }
}

@keyframes chat-bubble-cycle-ai {
    0%, 33%  { opacity: 0; transform: translateY(8px) scale(0.95); }
    38%      { opacity: 1; transform: translateY(0) scale(1); }
    80%      { opacity: 1; }
    90%, 100% { opacity: 0; }
}

@keyframes chat-typing-cycle {
    0%, 18%   { opacity: 0; }
    23%       { opacity: 1; }
    30%       { opacity: 1; }
    33%, 100% { opacity: 0; }
}

@keyframes chat-typing-dot {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30%           { transform: translateY(-4px); opacity: 1; }
}

/* ----- Success state ----- */

.signup-success {
    text-align: center;
    margin: var(--puente-space-3xl) auto;
    max-width: 560px;
    animation: signup-rise var(--puente-duration-cinematic) var(--puente-ease-out) both;
}

.signup-success-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 88px;
    height: 88px;
    margin: 0 auto var(--puente-space-xl);
    background: linear-gradient(135deg, var(--puente-teal) 0%, var(--puente-navy) 100%);
    border-radius: 50%;
    color: white;
    font-size: 2.5rem;
    font-weight: 700;
    box-shadow: 0 16px 40px rgba(45, 190, 181, 0.35), 0 0 0 12px rgba(45, 190, 181, 0.08);
    animation: signup-pop 700ms var(--puente-ease-out) 80ms both;
}

.signup-success h2 {
    font-family: var(--puente-font-display);
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin: 0 0 var(--puente-space-md);
    color: var(--puente-text);
}

.signup-success > p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--puente-text-muted);
    margin: 0 0 var(--puente-space-2xl);
}

.signup-success-preview-label {
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--puente-coral);
    margin: 0 0 var(--puente-space-md);
}

/* ----- Footer ----- */

.signup-footer {
    text-align: center;
    padding: var(--puente-space-xl);
    font-size: 0.85rem;
    color: var(--puente-text-muted);
    border-top: 1px solid rgba(203, 213, 225, 0.4);
}

.signup-footer strong {
    color: var(--puente-text);
}

/* ============================================================
 * ConversationCard component
 * Shared: signup success state AND dashboard queue.
 * ============================================================ */

.conv-card {
    background: var(--puente-bg);
    border: 1px solid var(--puente-border);
    border-radius: var(--puente-radius-lg);
    padding: var(--puente-space-lg);
    box-shadow: var(--puente-shadow-sm);
    text-align: left;
    transition: box-shadow var(--puente-duration-fast) var(--puente-ease-out),
                transform var(--puente-duration-fast) var(--puente-ease-out);
}

.conv-card:hover {
    box-shadow: var(--puente-shadow-md);
    transform: translateY(-1px);
}

.conv-card-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--puente-space-md);
    margin-bottom: var(--puente-space-md);
}

.conv-card-patient {
    font-family: var(--puente-font-display);
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--puente-text);
}

.conv-card-time {
    font-size: 0.85rem;
    color: var(--puente-text-faint);
}

.conv-card-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    border-radius: var(--puente-radius-pill);
}

.conv-card-badge.urgent {
    background: var(--puente-urgent-bg);
    color: var(--puente-urgent);
}

.conv-card-badge.priority {
    background: var(--puente-priority-bg);
    color: var(--puente-priority);
}

.conv-card-badge.routine {
    background: var(--puente-routine-bg);
    color: var(--puente-routine);
}

.conv-card-snippet {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--puente-text-muted);
    margin: 0 0 var(--puente-space-md);
}

.conv-card-symptoms {
    display: flex;
    flex-wrap: wrap;
    gap: var(--puente-space-xs);
    margin: 0;
    padding: 0;
    list-style: none;
}

.conv-card-symptom {
    padding: 0.25rem 0.625rem;
    background: var(--puente-bg-soft);
    border: 1px solid var(--puente-border);
    border-radius: var(--puente-radius-pill);
    font-size: 0.8rem;
    color: var(--puente-text-muted);
}

/* ============================================================
 * Animations (shared)
 * ============================================================ */

@keyframes signup-rise {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes signup-pop {
    from   { opacity: 0; transform: scale(0.7); }
    60%    { transform: scale(1.08); }
    to     { opacity: 1; transform: scale(1); }
}

/* ============================================================
 * Responsive
 * ============================================================ */

@media (max-width: 480px) {
    .signup-brand-shell {
        padding: var(--puente-space-md) var(--puente-space-lg) 0;
    }
    .signup-main {
        padding: var(--puente-space-md) var(--puente-space-lg) var(--puente-space-2xl);
    }
    .signup-form-card {
        padding: var(--puente-space-lg);
    }
}

/* ----- Booth kiosk surface (AB#161 — /chat) -----------------------------
 *
 * Sidebar-free public surface for the Congreso booth tablet. Inherits the
 * platform's .transcript / .msg bubble styles (defined in app.css) so the
 * booth surface and the physician conversation-detail surface look like
 * one product. Adds the booth-specific frame: 2-column grid with the chat
 * on the left and three stacked cards on the right (Brand / How-it-works /
 * QR + CTA).
 */

.booth-main {
    background: var(--puente-bg-soft);
    min-height: calc(100vh - 40px); /* leaves room for the demo banner */
}

.booth-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--puente-space-lg) var(--puente-space-lg);
}

.booth-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    gap: var(--puente-space-lg);
    align-items: start;
}

@media (max-width: 900px) {
    .booth-grid {
        grid-template-columns: 1fr;
    }
}

/* ----- Left column: the chat frame ----- */

.booth-chat {
    display: flex;
    flex-direction: column;
    background: var(--puente-bg);
    border: 1px solid var(--puente-border);
    border-radius: var(--puente-radius-lg);
    box-shadow: var(--puente-shadow-md);
    overflow: hidden;
    min-height: 70vh;
}

.booth-chat-header {
    display: flex;
    align-items: center;
    gap: var(--puente-space-sm);
    padding: var(--puente-space-md) var(--puente-space-lg);
    background: linear-gradient(135deg, var(--puente-teal) 0%, var(--puente-navy) 100%);
    color: white;
}

.booth-chat-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
}

.booth-chat-title {
    flex: 1;
}

.booth-chat-contact {
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.2;
}

.booth-chat-presence {
    font-size: 0.8rem;
    opacity: 0.9;
}

.booth-chat-reset {
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.4rem 0.85rem;
    border-radius: var(--puente-radius-pill);
    font-size: 0.85rem;
    cursor: pointer;
    font-family: inherit;
    transition: background var(--puente-duration-fast) var(--puente-ease-out);
}

.booth-chat-reset:hover {
    background: rgba(255, 255, 255, 0.28);
}

/* Transcript area — uses the existing .transcript / .msg classes from
 * app.css verbatim, with booth-specific padding + overflow. */
.booth-transcript {
    flex: 1;
    overflow-y: auto;
    padding: var(--puente-space-md);
    background: var(--puente-bg-soft);
    /* gap is provided by the .transcript class itself */
}

/* The typing-state placeholder mirrors a normal msg-assistant bubble. */
.booth-typing-msg {
    opacity: 0.85;
}

.booth-typing {
    display: inline-flex;
    gap: 5px;
    padding: 0.35rem 0;
}

.booth-typing span {
    width: 7px;
    height: 7px;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 50%;
    animation: booth-typing-bounce 1.2s ease-in-out infinite;
}

.booth-typing span:nth-child(2) { animation-delay: 0.15s; }
.booth-typing span:nth-child(3) { animation-delay: 0.30s; }

@keyframes booth-typing-bounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
    30% { transform: translateY(-5px); opacity: 1; }
}

/* Demo-prompt chips — shown only on the empty state, below the welcome
 * Asistente bubble. Click sends the prompt immediately. */
.booth-chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--puente-space-xs);
    margin-top: var(--puente-space-sm);
    padding: var(--puente-space-sm);
    border: 1px dashed var(--puente-border-strong);
    border-radius: var(--puente-radius-md);
    background: var(--puente-bg);
}

.booth-chip {
    background: var(--puente-bg-tinted);
    border: 1px solid var(--puente-teal-light);
    color: var(--puente-navy);
    padding: 0.45rem 0.95rem;
    border-radius: var(--puente-radius-pill);
    font-size: 0.85rem;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--puente-duration-fast) var(--puente-ease-out);
}

.booth-chip:hover:not(:disabled) {
    background: var(--puente-teal-light);
    color: white;
}

.booth-chip:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Input composer at the bottom of the chat frame. */
.booth-input {
    display: flex;
    gap: var(--puente-space-sm);
    padding: var(--puente-space-sm) var(--puente-space-md);
    background: var(--puente-bg);
    border-top: 1px solid var(--puente-border);
}

.booth-input-field {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--puente-border-strong);
    border-radius: var(--puente-radius-pill);
    font-size: 0.95rem;
    font-family: inherit;
    background: var(--puente-bg-soft);
    color: var(--puente-text);
    outline: none;
    transition: border-color var(--puente-duration-fast) var(--puente-ease-out);
}

.booth-input-field:focus {
    border-color: var(--puente-teal);
    background: var(--puente-bg);
}

.booth-input-send {
    background: var(--puente-teal);
    color: white;
    border: none;
    padding: 0 1.5rem;
    border-radius: var(--puente-radius-pill);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    font-family: inherit;
    transition: background var(--puente-duration-fast) var(--puente-ease-out);
}

.booth-input-send:hover:not(:disabled) {
    background: var(--puente-teal-dark);
}

.booth-input-send:disabled {
    background: var(--puente-text-faint);
    cursor: not-allowed;
}

/* ----- Right column: the three kiosk cards ----- */

.booth-rail {
    display: flex;
    flex-direction: column;
    gap: var(--puente-space-md);
}

/* Booth panels reuse the existing .panel class from app.css but with a
 * slightly cleaner border on white instead of the muted gray. */
.booth-rail-panel {
    background: var(--puente-bg) !important;
    border: 1px solid var(--puente-border) !important;
    border-radius: var(--puente-radius-md);
    padding: var(--puente-space-md) var(--puente-space-lg) !important;
}

.booth-rail-panel h3 {
    margin: 0 0 var(--puente-space-sm) !important;
    color: var(--puente-navy) !important;
    font-size: 1.05rem;
}

.booth-rail-panel p {
    color: var(--puente-text);
    line-height: 1.5;
    font-size: 0.92rem;
}

.booth-rail-tagline {
    font-size: 1rem !important;
    color: var(--puente-text-muted) !important;
    font-weight: 500;
}

.booth-rail-cta {
    background: linear-gradient(135deg, var(--puente-bg-tinted) 0%, var(--puente-bg) 100%) !important;
}

.booth-rail-cta a {
    color: var(--puente-teal-dark);
    font-weight: 600;
}

.booth-rail-microcopy {
    font-size: 0.85rem !important;
    color: var(--puente-text-muted) !important;
    text-align: center;
    margin-top: var(--puente-space-sm) !important;
}

.booth-rail-microcopy a {
    color: var(--puente-teal-dark);
    font-weight: 600;
}

/* Brand card with the Puente wordmark anchoring the top */
.booth-rail-brand {
    text-align: center;
}

.booth-rail-wordmark {
    display: block;
    max-width: 180px;
    height: auto;
    margin: 0 auto var(--puente-space-sm);
}

.booth-rail-brand .booth-rail-tagline {
    margin-top: 0 !important;
    margin-bottom: var(--puente-space-sm) !important;
    text-align: center;
}

/* QR code presentation */
.booth-qr-wrap {
    text-align: center;
    margin: var(--puente-space-sm) 0;
}

.booth-qr {
    display: block;
    width: 160px;
    height: 160px;
    margin: 0 auto;
    border: 1px solid var(--puente-border);
    border-radius: var(--puente-radius-sm);
    background: white;
    padding: 8px;
}

/* Live evidence panel — mirrors the physician dashboard sidebar so booth
 * visitors can see impression / symptoms / citations populate as the chat
 * progresses. */
.booth-rail-evidence {
    display: flex;
    flex-direction: column;
    gap: var(--puente-space-sm);
}

.booth-evidence-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--puente-space-sm);
}

.booth-evidence-header h3 {
    margin: 0 !important;
}

.booth-evidence-live {
    font-size: 0.75rem;
    color: var(--puente-text-muted);
    background: var(--puente-bg-tinted);
    border: 1px solid var(--puente-border);
    border-radius: 999px;
    padding: 2px 0.55rem;
    white-space: nowrap;
}

.booth-evidence-section {
    padding-top: var(--puente-space-xs);
    border-top: 1px dashed var(--puente-border);
}

/* The first section follows the header div, so :first-of-type doesn't
 * match it (the header is also a div). Target it via the adjacent-
 * sibling combinator instead. */
.booth-evidence-header + .booth-evidence-section {
    border-top: none;
    padding-top: 0;
}

.booth-evidence-label {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--puente-text-muted);
    margin-bottom: 0.35rem;
}

.booth-evidence-empty {
    font-size: 0.85rem !important;
    color: var(--puente-text-muted) !important;
    font-style: italic;
    margin: 0 !important;
}

.booth-evidence-impression {
    margin: 0 0 0.35rem !important;
}

.booth-evidence-action {
    font-size: 0.88rem !important;
    color: var(--puente-text) !important;
    margin: 0 !important;
    line-height: 1.4;
}

.booth-symptom-chips {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.booth-symptom-chips li {
    font-size: 0.8rem;
    color: var(--puente-text);
    background: var(--puente-bg-tinted);
    border: 1px solid var(--puente-border);
    border-radius: 999px;
    padding: 2px 0.55rem;
}

.booth-citation-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.booth-citation-list li {
    font-size: 0.85rem;
    line-height: 1.35;
    margin-bottom: 0.4rem;
}

.booth-citation-list li:last-child {
    margin-bottom: 0;
}

.booth-citation-list a {
    color: var(--puente-teal-dark);
    font-weight: 500;
    text-decoration: none;
}

.booth-citation-list a:hover {
    text-decoration: underline;
}

.booth-citation-meta {
    display: block;
    font-size: 0.75rem;
    color: var(--puente-text-muted);
    margin-top: 1px;
}

/* Always-visible demo disclaimer inside the CTA panel */
.booth-demo-disclaimer {
    font-size: 0.72rem !important;
    color: var(--puente-text-muted) !important;
    text-align: center;
    margin: var(--puente-space-sm) 0 0 !important;
    font-style: italic;
    line-height: 1.35;
}

/* ----- Reconnect modal override (BoothLayout) -----
 * Blazor's default centered modal is too alarming for a booth visitor.
 * Replace with a quiet bottom strip that the operator can see without
 * scaring the parent at the tablet.
 */
.booth-reconnect {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--puente-navy);
    color: white;
    padding: 0.5rem var(--puente-space-md);
    text-align: center;
    font-size: 0.85rem;
    font-weight: 500;
    display: none;
    z-index: 200;
    box-shadow: 0 -2px 12px rgba(15, 23, 42, 0.15);
}

.booth-reconnect.components-reconnect-show,
.booth-reconnect.components-reconnect-failed,
.booth-reconnect.components-reconnect-rejected {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--puente-space-sm);
}

.booth-reconnect.components-reconnect-failed .booth-reconnect-text::after,
.booth-reconnect.components-reconnect-rejected .booth-reconnect-text::after {
    content: " — actualice la página";
    opacity: 0.85;
}

.booth-reconnect-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--puente-coral);
    animation: booth-reconnect-pulse 1.4s ease-in-out infinite;
}

@keyframes booth-reconnect-pulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* Honor reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .signup-shell::before,
    .signup-shell::after,
    .chat-preview-phone {
        animation: none !important;
    }
}

/* ============================================================
 * PREVIEW SURFACE (/preview) — asset review for Congreso
 * Public page where Karen + Martín check drafts on their own time.
 * Reuses the booth-rail visual rhythm (cards on white, brand wordmark
 * top-center) so the surface feels like part of the same product.
 * ============================================================ */

.preview-page {
    max-width: 880px;
    margin: 0 auto;
    padding: var(--puente-space-2xl) var(--puente-space-lg);
}

.preview-header {
    text-align: center;
    margin-bottom: var(--puente-space-2xl);
}

.preview-wordmark {
    display: block;
    max-width: 200px;
    height: auto;
    margin: 0 auto var(--puente-space-md);
}

.preview-header h1 {
    font-family: var(--puente-font-display);
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    font-weight: 700;
    color: var(--puente-navy);
    margin: 0 0 var(--puente-space-xs);
}

.preview-tagline {
    color: var(--puente-text-muted);
    font-size: 0.95rem;
    margin: 0;
}

.preview-intro {
    background: var(--puente-bg-tinted);
    border: 1px solid var(--puente-border);
    border-radius: var(--puente-radius-md);
    padding: var(--puente-space-md) var(--puente-space-lg);
    margin-bottom: var(--puente-space-xl);
}

.preview-intro p {
    margin: 0;
    line-height: 1.5;
    color: var(--puente-text);
}

.preview-assets {
    display: flex;
    flex-direction: column;
    gap: var(--puente-space-md);
    margin-bottom: var(--puente-space-2xl);
}

.preview-card {
    background: var(--puente-bg);
    border: 1px solid var(--puente-border);
    border-radius: var(--puente-radius-md);
    padding: var(--puente-space-lg);
    box-shadow: var(--puente-shadow-sm);
}

.preview-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--puente-space-md);
    margin-bottom: var(--puente-space-sm);
}

.preview-card-head h2 {
    font-family: var(--puente-font-display);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--puente-navy);
    margin: 0;
    line-height: 1.3;
}

.preview-status {
    flex-shrink: 0;
    display: inline-block;
    padding: 0.2rem 0.7rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}

.preview-status-borrador {
    background: #fff4e6;
    color: #b25500;
    border: 1px solid #f0d9a8;
}

.preview-status-revision {
    background: #e8f3ff;
    color: #1e5e8b;
    border: 1px solid #c6dcf2;
}

.preview-status-aprobado {
    background: #e9f5ec;
    color: #2c7a3e;
    border: 1px solid #c1e1c9;
}

.preview-status-entregado {
    background: #ecf0f3;
    color: #475569;
    border: 1px solid #cbd5e1;
}

.preview-card-desc {
    color: var(--puente-text);
    line-height: 1.5;
    margin: 0 0 var(--puente-space-sm);
    font-size: 0.95rem;
}

.preview-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--puente-space-sm) var(--puente-space-lg);
    margin: 0 0 var(--puente-space-sm);
}

.preview-card-meta div {
    margin: 0;
}

.preview-card-meta dt {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--puente-text-muted);
    margin: 0 0 2px;
}

.preview-card-meta dd {
    margin: 0;
    font-size: 0.88rem;
    color: var(--puente-text);
}

.preview-card-cta {
    display: inline-block;
    margin-top: var(--puente-space-xs);
    color: var(--puente-teal-dark);
    font-weight: 600;
    text-decoration: none;
}

.preview-card-cta:hover {
    text-decoration: underline;
}

.preview-card-pending {
    margin: var(--puente-space-xs) 0 0;
    font-size: 0.88rem;
    color: var(--puente-text-muted);
    font-style: italic;
}

.preview-footer {
    text-align: center;
    color: var(--puente-text-muted);
    font-size: 0.9rem;
    padding-top: var(--puente-space-lg);
    border-top: 1px solid var(--puente-border);
}

.preview-footer p {
    margin: 0;
}

.preview-footer a,
.preview-intro a {
    color: var(--puente-teal-dark);
    font-weight: 600;
}

/* ----- Dashboard polish (Mark 2026-07-03) ------------------------------
 *
 * The queue view was reading like a spreadsheet — flat rows, tiny badges,
 * no affordance for interactivity. This layer makes it feel like a product:
 * tier-colored row rails, hover lift, prominent chevrons, live indicator
 * in demo/kiosk mode. Applies broadly, not just in kiosk — the physician
 * view benefits from the same treatment.
 */

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: var(--puente-space-lg);
    margin: var(--puente-space-lg) 0 var(--puente-space-md);
    padding-bottom: var(--puente-space-md);
    border-bottom: 2px solid var(--puente-border);
}

.dashboard-header-copy { flex: 1 1 auto; }

.dashboard-eyebrow {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--puente-teal-dark);
    margin-bottom: 4px;
}

.dashboard-title {
    font-family: var(--puente-font-display);
    font-size: clamp(1.75rem, 3.5vw, 2.25rem);
    font-weight: 700;
    color: var(--puente-text);
    margin: 0;
    line-height: 1.15;
}

.dashboard-sub {
    margin: 8px 0 0;
    font-size: 1rem;
    color: var(--puente-text-muted);
    max-width: 720px;
    line-height: 1.5;
}

.dashboard-live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: rgba(45, 190, 181, 0.12);
    border: 1px solid rgba(45, 190, 181, 0.35);
    border-radius: var(--puente-radius-pill);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--puente-teal-dark);
    white-space: nowrap;
}

.dashboard-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--puente-teal);
    box-shadow: 0 0 0 0 rgba(45, 190, 181, 0.6);
    animation: dashboard-live-pulse 1.8s ease-in-out infinite;
}

@keyframes dashboard-live-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(45, 190, 181, 0.65); }
    70%  { box-shadow: 0 0 0 10px rgba(45, 190, 181, 0); }
    100% { box-shadow: 0 0 0 0 rgba(45, 190, 181, 0); }
}

/* --- Elevated card treatment --- */

.queue-card-elevated {
    border: 1px solid var(--puente-border);
    border-radius: var(--puente-radius-lg);
    box-shadow: var(--puente-shadow-md);
    padding: var(--puente-space-lg) var(--puente-space-xl);
    background: var(--puente-bg);
    margin: var(--puente-space-lg) 0;
    overflow: hidden;
}

.queue-card-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: var(--puente-space-md);
}

.queue-card-head h3 {
    margin: 0;
    font-family: var(--puente-font-display);
    font-size: 1.15rem;
    color: var(--puente-text);
    font-weight: 700;
}

.queue-card-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 26px;
    padding: 0 8px;
    border-radius: var(--puente-radius-pill);
    background: var(--puente-bg-tinted);
    color: var(--puente-teal-dark);
    font-size: 0.85rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.queue-card-count-urgent {
    background: var(--puente-urgent-bg);
    color: var(--puente-urgent);
}

/* --- Table rows with tier rails + hover lift + chevron --- */

.queue-card-elevated .queue-table {
    margin-top: 0;
}

.queue-card-elevated .queue-table th {
    padding: 8px 12px;
    font-size: 0.75rem;
    color: var(--puente-text-faint);
    border-bottom: 1px solid var(--puente-border);
}

.queue-card-elevated .queue-table td {
    padding: 14px 12px;
    border-bottom: 1px solid var(--puente-border);
    vertical-align: middle;
}

.queue-card-elevated .queue-row {
    cursor: pointer;
    transition: background var(--puente-duration-fast) var(--puente-ease-out),
                transform var(--puente-duration-fast) var(--puente-ease-out),
                box-shadow var(--puente-duration-fast) var(--puente-ease-out);
    position: relative;
}

.queue-card-elevated .queue-row:hover {
    background: var(--puente-bg-tinted);
}

.queue-card-elevated .queue-row:hover .queue-chevron {
    transform: translateX(4px);
    color: var(--puente-teal-dark);
}

/* Tier rail — a left border in the outcome color on the first cell.
 * Applied per-row so it accents the entire row without needing extra markup. */
.queue-card-elevated .queue-row .queue-tier-cell {
    border-left: 4px solid transparent;
    padding-left: 16px;
}

.queue-card-elevated .queue-row-urgent .queue-tier-cell   { border-left-color: var(--puente-urgent); }
.queue-card-elevated .queue-row-priority .queue-tier-cell { border-left-color: var(--puente-priority); }
.queue-card-elevated .queue-row-routine .queue-tier-cell  { border-left-color: var(--puente-routine); }
.queue-card-elevated .queue-row-unknown .queue-tier-cell  { border-left-color: var(--puente-text-faint); }

.queue-card-elevated .badge {
    padding: 5px 12px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    border-radius: var(--puente-radius-pill);
    text-transform: none;
}

.queue-card-elevated .badge-urgent {
    background: var(--puente-urgent);
    color: #ffffff;
    box-shadow: 0 0 0 3px rgba(201, 42, 42, 0.15);
}

.queue-card-elevated .badge-priority {
    background: var(--puente-priority);
    color: #ffffff;
}

.queue-card-elevated .badge-routine {
    background: var(--puente-routine);
    color: #ffffff;
}

.queue-card-elevated .queue-ts {
    line-height: 1.25;
}

.queue-ts-relative {
    font-size: 0.92rem;
    color: var(--puente-text);
    font-weight: 500;
}

.queue-ts-abs {
    font-size: 0.78rem;
    color: var(--puente-text-faint);
    margin-top: 2px;
}

.queue-preview {
    color: var(--puente-text-muted);
    max-width: 380px;
}

.queue-card-elevated .queue-phone a {
    color: var(--puente-navy);
    text-decoration: none;
    border-bottom: 1px dashed transparent;
    transition: border-bottom-color var(--puente-duration-fast) var(--puente-ease-out);
}

.queue-card-elevated .queue-row:hover .queue-phone a {
    border-bottom-color: var(--puente-navy);
}

.queue-th-chevron {
    width: 32px;
}

.queue-th-count {
    text-align: right;
    width: 4rem;
}

.queue-chevron {
    text-align: right;
    color: var(--puente-text-faint);
    font-size: 1.5rem;
    font-weight: 400;
    line-height: 1;
    transition: transform var(--puente-duration-fast) var(--puente-ease-out),
                color var(--puente-duration-fast) var(--puente-ease-out);
    width: 32px;
}

/* --- Metrics grid — polished cards, emphasized "today" tile --- */

.queue-card-elevated .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 0 0 var(--puente-space-sm);
}

.queue-card-elevated .metric {
    padding: var(--puente-space-md);
    border-radius: var(--puente-radius-md);
    border: 1px solid var(--puente-border);
    background: var(--puente-bg);
    text-align: left;
}

.queue-card-elevated .metric-emphasize {
    background: linear-gradient(135deg, var(--puente-teal) 0%, var(--puente-teal-dark) 100%);
    border-color: var(--puente-teal-dark);
    color: #ffffff;
}

.queue-card-elevated .metric-emphasize .metric-value,
.queue-card-elevated .metric-emphasize .metric-label {
    color: #ffffff;
}

.queue-card-elevated .metric-value {
    font-family: var(--puente-font-display);
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1;
    color: var(--puente-text);
    font-variant-numeric: tabular-nums;
}

.queue-card-elevated .metric-label {
    margin-top: 6px;
    font-size: 0.78rem;
    color: var(--puente-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.queue-card-elevated .stub-tag {
    margin: 0;
    font-size: 0.85rem;
    color: var(--puente-text-faint);
    font-style: italic;
}

/* --- Flag list styling refresh --- */

.queue-card-flags .flag-list li {
    padding: 10px 0;
    border-bottom: 1px solid var(--puente-border);
    gap: 10px;
}

.queue-card-flags .flag-list a {
    color: var(--puente-urgent);
    text-decoration: none;
    font-weight: 700;
}

.queue-card-flags .flag-list a:hover {
    text-decoration: underline;
}

/* ----- Kiosk mode (Congreso booth) -------------------------------------
 *
 * Full-bleed slideshow surface at /kiosk plus a fixed bottom nav strip
 * that persists across /kiosk, /chat, /dashboard when the ?kiosk=1 cookie
 * is set. Booth operator (José) taps between the three surfaces; walk-up
 * visitors see the auto-rotating deck.
 *
 * Kiosk implies demo — the Spanish MODO DEMO banner is up (rendered by
 * BoothLayout or MainLayout). Sidebar is hidden entirely in MainLayout
 * when kiosk is active so /dashboard fills the viewport like /chat.
 */

.booth-main-kiosk {
    /* leaves room for demo banner (top) + signup strip (~120px) + kiosk nav (88px) */
    min-height: calc(100vh - 40px - 208px);
    padding-bottom: 208px;
}

/* Mobile: signup strip is hidden, so reclaim the ~120px it reserved.
 * Only banner (~40px) + kiosk nav (88px) need to be reserved. */
@media (max-width: 780px) {
    .booth-main-kiosk {
        min-height: calc(100vh - 40px - 88px);
        padding-bottom: 88px;
    }
}

.page-kiosk {
    /* MainLayout without the sidebar column — single-column full width */
    display: block;
    padding-bottom: 88px;
}

.page-kiosk > main {
    max-width: none;
    padding: 0;
}

/* --- Slideshow stage --- */

.kiosk-stage {
    position: relative;
    min-height: calc(100vh - 40px - 208px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--puente-space-2xl) var(--puente-space-xl);
    background: linear-gradient(135deg, var(--puente-bg-tinted) 0%, var(--puente-bg) 60%);
    overflow: hidden;
}

@media (max-width: 780px) {
    .kiosk-stage {
        min-height: calc(100vh - 40px - 88px);
        padding: var(--puente-space-lg) var(--puente-space-md);
    }
}

.kiosk-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--puente-space-2xl) var(--puente-space-xl) 96px;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity var(--puente-duration-slow) var(--puente-ease-out),
                transform var(--puente-duration-slow) var(--puente-ease-out);
    pointer-events: none;
}

.kiosk-slide.is-active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.kiosk-slide-inner {
    max-width: 1100px;
    width: 100%;
    text-align: center;
}

.kiosk-two-col {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: var(--puente-space-2xl);
    align-items: center;
    text-align: left;
    max-width: 1180px;
}

@media (max-width: 900px) {
    .kiosk-two-col {
        grid-template-columns: 1fr;
        gap: var(--puente-space-xl);
    }
}

.kiosk-copy {
    text-align: left;
}

.kiosk-copy .kiosk-headline,
.kiosk-copy .kiosk-body,
.kiosk-copy .kiosk-eyebrow {
    text-align: left;
}

.kiosk-media {
    display: flex;
    align-items: center;
    justify-content: center;
}

.kiosk-centered {
    text-align: center;
}

/* --- Slide 1: Hero --- */

.kiosk-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--puente-space-md);
}

.kiosk-wordmark-img {
    display: block;
    height: clamp(80px, 12vw, 160px);
    width: auto;
    margin: var(--puente-space-md) auto var(--puente-space-lg);
    object-fit: contain;
}

.kiosk-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: var(--puente-space-lg);
    padding: 10px 20px;
    background: var(--puente-bg);
    border: 1px solid var(--puente-border);
    border-radius: var(--puente-radius-pill);
    box-shadow: var(--puente-shadow-sm);
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--puente-text-muted);
}

.kiosk-hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--puente-coral);
    box-shadow: 0 0 0 4px rgba(255, 155, 125, 0.2);
}

/* --- Dotted bullet lists (teal-dot style from signup) --- */

.kiosk-dot-list {
    list-style: none;
    padding: 0;
    margin: var(--puente-space-lg) 0 0;
    display: grid;
    gap: var(--puente-space-md);
}

.kiosk-dot-list li {
    position: relative;
    padding-left: 28px;
    font-size: clamp(1rem, 1.45vw, 1.15rem);
    line-height: 1.55;
    color: var(--puente-text);
}

.kiosk-dot-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--puente-teal);
    box-shadow: 0 0 0 4px rgba(45, 190, 181, 0.16);
}

.kiosk-body-sm {
    font-size: 0.98rem;
    color: var(--puente-text-muted);
    margin-top: var(--puente-space-md);
}

/* --- Slide 3: Cómo funciona (3-step) --- */

.kiosk-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--puente-space-lg);
    margin-top: var(--puente-space-2xl);
}

@media (max-width: 900px) {
    .kiosk-steps { grid-template-columns: 1fr; }
}

.kiosk-step {
    background: var(--puente-bg);
    border: 1px solid var(--puente-border);
    border-radius: var(--puente-radius-lg);
    padding: var(--puente-space-lg) var(--puente-space-lg) var(--puente-space-xl);
    text-align: left;
    box-shadow: var(--puente-shadow-sm);
    position: relative;
    overflow: hidden;
}

.kiosk-step::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: linear-gradient(90deg, var(--puente-teal), var(--puente-navy));
}

.kiosk-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--puente-teal);
    color: #ffffff;
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: var(--puente-space-md);
}

.kiosk-step-label {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--puente-text);
    margin-bottom: 6px;
}

.kiosk-step-body {
    font-size: 1rem;
    line-height: 1.5;
    color: var(--puente-text-muted);
}

/* --- Slide 4: Vista del médico (card stack) --- */

.kiosk-cards-stack {
    display: grid;
    gap: var(--puente-space-md);
    max-width: 420px;
}

.kiosk-cards-stack .conv-card {
    box-shadow: var(--puente-shadow-md);
}

/* --- Slide 5: Safety figure --- */

.kiosk-safety-inner {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: var(--puente-space-2xl);
    align-items: center;
    text-align: left;
    max-width: 1180px;
}

@media (max-width: 900px) {
    .kiosk-safety-inner {
        grid-template-columns: 1fr;
        gap: var(--puente-space-xl);
    }
}

.kiosk-safety-figure {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--puente-space-2xl);
    background: linear-gradient(135deg, var(--puente-navy) 0%, var(--puente-navy-dark) 100%);
    border-radius: var(--puente-radius-xl);
    color: #ffffff;
    box-shadow: var(--puente-shadow-lg);
    aspect-ratio: 1 / 1;
    max-width: 340px;
    margin: 0 auto;
}

.kiosk-safety-number {
    font-family: var(--puente-font-display);
    font-size: clamp(4.5rem, 10vw, 7rem);
    font-weight: 800;
    line-height: 1;
    color: var(--puente-teal-light);
    text-shadow: 0 0 32px rgba(95, 213, 205, 0.35);
}

.kiosk-safety-caption {
    margin-top: var(--puente-space-md);
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    color: rgba(255, 255, 255, 0.88);
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

/* --- Slide 6: Beta / CTA --- */

.kiosk-beta-inner {
    max-width: 780px;
}

.kiosk-cta-card {
    margin-top: var(--puente-space-xl);
    padding: var(--puente-space-xl) var(--puente-space-2xl);
    background: linear-gradient(135deg, var(--puente-bg-tinted) 0%, var(--puente-bg) 100%);
    border: 1px solid var(--puente-border);
    border-radius: var(--puente-radius-xl);
    box-shadow: var(--puente-shadow-md);
    display: inline-block;
    text-align: center;
}

.kiosk-cta-label {
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--puente-text-muted);
    margin-bottom: var(--puente-space-sm);
}

.kiosk-cta-email {
    display: block;
    font-family: var(--puente-font-display);
    font-size: clamp(1.6rem, 3.5vw, 2.2rem);
    font-weight: 700;
    color: var(--puente-teal-dark);
    text-decoration: none;
    margin-bottom: var(--puente-space-sm);
}

.kiosk-cta-email:hover { color: var(--puente-teal); }

.kiosk-cta-sub {
    font-size: 0.95rem;
    color: var(--puente-text-muted);
}

.kiosk-eyebrow {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--puente-teal-dark);
    margin-bottom: var(--puente-space-md);
}

.kiosk-headline {
    font-family: var(--puente-font-display);
    font-size: clamp(2rem, 4.5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.15;
    color: var(--puente-text);
    margin: 0 0 var(--puente-space-lg);
}

.kiosk-body {
    font-size: clamp(1.05rem, 1.6vw, 1.35rem);
    line-height: 1.55;
    color: var(--puente-text-muted);
    margin: 0 auto var(--puente-space-lg);
    max-width: 720px;
}

.kiosk-bullets {
    list-style: none;
    padding: 0;
    margin: var(--puente-space-lg) auto 0;
    max-width: 640px;
    text-align: left;
    display: grid;
    gap: var(--puente-space-md);
}

.kiosk-bullets li {
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    line-height: 1.5;
    color: var(--puente-text);
    padding: var(--puente-space-md) var(--puente-space-lg);
    background: var(--puente-bg);
    border: 1px solid var(--puente-border);
    border-left: 4px solid var(--puente-teal);
    border-radius: var(--puente-radius-md);
    box-shadow: var(--puente-shadow-sm);
}

.kiosk-footer {
    margin-top: var(--puente-space-xl);
    font-size: 0.95rem;
    color: var(--puente-text-muted);
}

.kiosk-footer a {
    color: var(--puente-teal-dark);
    font-weight: 600;
    text-decoration: none;
}

/* Slide-kind accents */
.kiosk-slide-safety .kiosk-eyebrow { color: var(--puente-priority); }
.kiosk-slide-beta .kiosk-eyebrow { color: var(--puente-navy); }

/* --- Progress dots --- */

.kiosk-progress {
    position: absolute;
    bottom: var(--puente-space-lg);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 2;
}

.kiosk-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border-radius: 50%;
    border: none;
    background: var(--puente-border-strong);
    cursor: pointer;
    transition: background var(--puente-duration-fast) var(--puente-ease-out),
                transform var(--puente-duration-fast) var(--puente-ease-out);
}

.kiosk-dot:hover { transform: scale(1.15); }

.kiosk-dot.is-active {
    background: var(--puente-teal);
    transform: scale(1.25);
}

/* --- Bottom nav strip --- */

.kiosk-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background: var(--puente-navy-dark);
    border-top: 4px solid var(--puente-teal);
    z-index: 100;
    box-shadow: 0 -6px 20px rgba(15, 23, 42, 0.15);
}

.kiosk-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 14px 12px;
    color: rgba(255, 255, 255, 0.78);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    transition: background var(--puente-duration-fast) var(--puente-ease-out),
                color var(--puente-duration-fast) var(--puente-ease-out);
}

.kiosk-nav-item:last-child { border-right: none; }

.kiosk-nav-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
}

.kiosk-nav-item.is-active {
    background: var(--puente-teal);
    color: #ffffff;
}

.kiosk-nav-icon {
    font-size: 1.35rem;
    line-height: 1;
}

.kiosk-nav-label {
    font-size: 0.95rem;
    letter-spacing: 0.01em;
}

@media (max-width: 480px) {
    .kiosk-nav-icon { font-size: 1.15rem; }
    .kiosk-nav-label { font-size: 0.82rem; }
    .kiosk-nav-item { padding: 10px 8px; }
}

/* --- Persistent signup strip (Karen 2026-07-04) ---
 *
 * Hidden on mobile: the strip is really for the locked booth-tablet
 * experience, where visitors can't easily click through to /signup.
 * Mobile visitors arrived from puente.health via Home (which has its
 * own signup CTA) or via a shared /kiosk link where dedicating ~30%
 * of the small viewport to a signup form obscures the deck they came
 * to see. Desktop / booth tablet keeps the strip. */

.kiosk-signup {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 88px; /* sits above the fixed .kiosk-nav (88px tall) */
    background: linear-gradient(135deg, var(--puente-bg) 0%, var(--puente-bg-tinted) 100%);
    border-top: 1px solid var(--puente-border);
    box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.06);
    padding: var(--puente-space-md) var(--puente-space-lg);
    z-index: 90;
}

@media (max-width: 780px) {
    .kiosk-signup {
        display: none;
    }
}

.kiosk-signup-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    gap: var(--puente-space-lg);
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

@media (max-width: 780px) {
    .kiosk-signup-form { grid-template-columns: 1fr; gap: var(--puente-space-md); }
}

.kiosk-signup-copy { text-align: left; }

.kiosk-signup-eyebrow {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--puente-teal-dark);
    margin-bottom: 3px;
}

.kiosk-signup-tagline {
    font-size: 0.95rem;
    color: var(--puente-text-muted);
    line-height: 1.35;
}

.kiosk-signup-fields {
    display: grid;
    grid-template-columns: minmax(140px, 1fr) minmax(180px, 1.4fr) auto;
    gap: 10px;
    align-items: stretch;
}

@media (max-width: 780px) {
    .kiosk-signup-fields { grid-template-columns: 1fr 1fr; grid-template-rows: auto auto; }
    .kiosk-signup-submit { grid-column: 1 / -1; }
}

.kiosk-signup-input {
    padding: 12px 14px;
    border: 1px solid var(--puente-border-strong);
    border-radius: var(--puente-radius-md);
    background: #ffffff;
    font-size: 1rem;
    font-family: var(--puente-font-body);
    color: var(--puente-text);
    transition: border-color var(--puente-duration-fast) var(--puente-ease-out),
                box-shadow var(--puente-duration-fast) var(--puente-ease-out);
}

.kiosk-signup-input:focus {
    outline: none;
    border-color: var(--puente-teal);
    box-shadow: 0 0 0 3px rgba(45, 190, 181, 0.18);
}

.kiosk-signup-input::placeholder {
    color: var(--puente-text-faint);
}

.kiosk-signup-submit {
    padding: 0 22px;
    border: none;
    border-radius: var(--puente-radius-md);
    background: linear-gradient(135deg, var(--puente-teal) 0%, var(--puente-teal-dark) 100%);
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
    font-family: var(--puente-font-body);
    cursor: pointer;
    transition: transform var(--puente-duration-fast) var(--puente-ease-out),
                box-shadow var(--puente-duration-fast) var(--puente-ease-out);
    white-space: nowrap;
    min-height: 46px;
}

.kiosk-signup-submit:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(45, 190, 181, 0.28);
}

.kiosk-signup-submit:disabled {
    opacity: 0.7;
    cursor: wait;
}

.kiosk-signup-error {
    grid-column: 1 / -1;
    margin: 8px 0 0;
    color: var(--puente-urgent);
    font-size: 0.9rem;
    font-weight: 600;
}

.kiosk-signup-success {
    display: flex;
    align-items: center;
    gap: var(--puente-space-md);
    justify-content: center;
    padding: var(--puente-space-sm) 0;
    max-width: 1200px;
    margin: 0 auto;
}

.kiosk-signup-success-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--puente-routine) 0%, #2c7a3e 100%);
    color: #ffffff;
    font-size: 1.6rem;
    font-weight: 700;
}

.kiosk-signup-success-copy {
    font-size: 1.05rem;
    color: var(--puente-text);
    line-height: 1.4;
}

.kiosk-signup-success-copy strong {
    color: var(--puente-teal-dark);
}
