/* ── Variables Integra Hotel ─────────────────────────────── */
:root {
    --brand-primary: #1b305b;
    --brand-primary-light: #e8edf5;
    --brand-primary-dark: #122040;
    --brand-accent: #f8823a;
    --brand-accent-light: #fff0e8;
    --brand-accent-dark: #e06820;

    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-700: #374151;
    --gray-900: #111827;

    --success-bg: #ecfdf5;
    --success-text: #065f46;
    --warning-bg: #fffbeb;
    --warning-text: #92400e;
    --error-bg: #fef2f2;
    --error-text: #991b1b;
    --info-bg: var(--brand-primary-light);
    --info-text: var(--brand-primary);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.07);

    --transition: 200ms ease;

    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'Courier New', monospace;
}

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

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    background: var(--gray-50);
    color: var(--gray-900);
    line-height: 1.5;
    min-height: 100dvh;
}

/* ── Tipografía ──────────────────────────────────────────── */
h1 {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.3;
}

h2 {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.3;
}

h3 {
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.4;
}

p {
    font-size: 0.9375rem;
    line-height: 1.6;
}

/* ── Botones ─────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: background var(--transition), transform var(--transition);
    width: 100%;
    text-decoration: none;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: var(--brand-accent);
    color: #fff;
}

.btn-primary:hover {
    background: var(--brand-accent-dark);
}

.btn-secondary {
    background: #fff;
    color: var(--brand-primary);
    border: 1.5px solid var(--brand-primary);
}

.btn-secondary:hover {
    background: var(--brand-primary-light);
}

.btn-ghost {
    background: transparent;
    color: var(--gray-500);
    border: 1.5px solid var(--gray-200);
}

.btn-ghost:hover {
    background: var(--gray-100);
}

/* ── Inputs ──────────────────────────────────────────────── */
.input-field {
    width: 100%;
    background: #fff;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    font-size: 0.9375rem;
    font-family: var(--font-sans);
    color: var(--gray-900);
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}

.input-field:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgb(27 48 91 / 0.12);
}

.input-field.valid {
    border-color: #059669;
    box-shadow: 0 0 0 3px rgb(5 150 105 / 0.1);
}

.input-field.error {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgb(220 38 38 / 0.1);
}

.input-field.curp {
    font-family: var(--font-mono);
    font-size: 1rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.input-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 6px;
}

.input-hint {
    font-size: 0.75rem;
    color: var(--gray-400);
    margin-top: 4px;
}

.input-error {
    font-size: 0.75rem;
    color: #dc2626;
    margin-top: 4px;
}

/* ── Cards ───────────────────────────────────────────────── */
.card {
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-100);
    box-shadow: var(--shadow-sm);
    padding: 20px;
}

/* ── Badges ──────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
}

.badge-success {
    background: var(--success-bg);
    color: var(--success-text);
}

.badge-warning {
    background: var(--warning-bg);
    color: var(--warning-text);
}

.badge-error {
    background: var(--error-bg);
    color: var(--error-text);
}

.badge-info {
    background: var(--info-bg);
    color: var(--info-text);
}

/* ── Top bar ─────────────────────────────────────────────── */
.top-bar {
    background: var(--brand-primary);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.top-bar-title {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
}

.top-bar-sub {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.65);
    margin-top: 1px;
}

.top-bar-logo {
    background: var(--brand-accent);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: var(--radius-full);
}

/* ── Nav bar inferior ────────────────────────────────────── */
.nav-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid var(--gray-100);
    display: flex;
    padding: 8px 0 max(8px, env(safe-area-inset-bottom));
    z-index: 100;
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    font-size: 0.6875rem;
    color: var(--gray-400);
    cursor: pointer;
    text-decoration: none;
    padding: 4px 0;
    transition: color var(--transition);
}

.nav-item svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.nav-item.active {
    color: var(--brand-primary);
}

/* ── Stat cards ──────────────────────────────────────────── */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.stat-card {
    background: var(--gray-50);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    border: 1px solid var(--gray-100);
}

.stat-num {
    font-size: 1.75rem;
    font-weight: 600;
    line-height: 1;
    margin-bottom: 4px;
}

.stat-lbl {
    font-size: 0.6875rem;
    color: var(--gray-400);
    font-weight: 500;
}

/* ── Alert banner ────────────────────────────────────────── */
.alert-banner {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    border-left: 3px solid var(--brand-accent);
    background: var(--brand-accent-light);
    margin-bottom: 12px;
}

.alert-banner svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    stroke: var(--brand-accent);
    fill: none;
    stroke-width: 2;
    margin-top: 1px;
}

.alert-text {
    font-size: 0.8125rem;
    color: #92400e;
    line-height: 1.5;
}

/* ── Check-in list ───────────────────────────────────────── */
.checkin-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-100);
}

.checkin-row:last-child {
    border-bottom: none;
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--brand-primary-light);
    color: var(--brand-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
}

.checkin-info {
    flex: 1;
    min-width: 0;
}

.checkin-name {
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.checkin-curp {
    font-size: 0.75rem;
    color: var(--gray-400);
    font-family: var(--font-mono);
    margin-top: 2px;
}

/* ── Scan box ────────────────────────────────────────────── */
.scan-box {
    background: var(--brand-primary);
    border-radius: var(--radius-lg);
    padding: 24px 20px;
    text-align: center;
    cursor: pointer;
    transition: background var(--transition);
}

.scan-box:hover {
    background: var(--brand-primary-dark);
}

.scan-box svg {
    width: 48px;
    height: 48px;
    stroke: rgba(255, 255, 255, 0.5);
    fill: none;
    stroke-width: 1.5;
    margin-bottom: 8px;
}

.scan-text {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
}

.scan-text strong {
    color: var(--brand-accent);
    font-weight: 500;
}

/* ── Divider ─────────────────────────────────────────────── */
.divider {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.75rem;
    color: var(--gray-400);
    margin: 14px 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--gray-200);
}

/* ── Confirm card ────────────────────────────────────────── */
.confirm-card {
    background: var(--success-bg);
    border: 1px solid #a7f3d0;
    border-radius: var(--radius-lg);
    padding: 20px;
    text-align: center;
    margin-bottom: 16px;
}

.confirm-card svg {
    width: 40px;
    height: 40px;
    stroke: #059669;
    fill: none;
    stroke-width: 1.75;
    margin-bottom: 8px;
}

.confirm-title {
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--success-text);
}

.confirm-sub {
    font-size: 0.8125rem;
    color: #059669;
    margin-top: 2px;
}

/* ── Detail rows ─────────────────────────────────────────── */
.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--gray-100);
    font-size: 0.875rem;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-key {
    color: var(--gray-500);
}

.detail-val {
    font-weight: 500;
}

/* ── Privacy box ─────────────────────────────────────────── */
.privacy-box {
    background: var(--brand-primary-light);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    margin: 14px 0;
}

.privacy-text {
    font-size: 0.75rem;
    color: var(--brand-primary);
    line-height: 1.6;
}

/* ── Main content padding (para nav bar fija) ────────────── */
.page-content {
    padding: 16px 16px 90px;
    width: 100%;
    box-sizing: border-box;
}

/* ── Login page ──────────────────────────────────────────── */
.login-hero {
    background: var(--brand-primary);
    padding: 48px 24px 32px;
    text-align: center;
}

.login-icon {
    width: 64px;
    height: 64px;
    background: var(--brand-accent);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
}

.login-icon svg {
    width: 36px;
    height: 36px;
    stroke: #fff;
    fill: none;
    stroke-width: 1.75;
}

.login-title {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
}

.login-sub {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
    margin-top: 4px;
}

.login-body {
    padding: 28px 24px;
    max-width: 400px;
    margin: 0 auto;
}

/* ── Responsive desktop ──────────────────────────────────── */
@media (min-width: 768px) {
    .page-content {
        padding: 24px 24px 100px;
    }

    .nav-bar {
        max-width: 480px;
        left: 50%;
        transform: translateX(-50%);
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        border: 1px solid var(--gray-100);
        border-bottom: none;
    }
}