:root {
    --asis-primary: #1F3864;
    --asis-accent: #2E75B6;
    --asis-success: #548235;
    --asis-success-bg: #E2EFDA;
    --asis-danger: #C00000;
    --asis-danger-bg: #FCE4EC;
    --asis-warning: #ED7D31;
    --asis-warning-bg: #FFF2CC;
    --asis-muted: #D9D9D9;
    --asis-input-active: #FFFF99;
    --asis-bg: #f0f4f8;
    --asis-card: #ffffff;
    --asis-text: #1a1a2e;
    --asis-text-muted: #64748b;
    --asis-radius: 12px;
    --asis-shadow: 0 4px 20px rgba(31, 56, 100, 0.12);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--asis-bg);
    color: var(--asis-text);
    line-height: 1.6;
    min-height: 100vh;
}

/* HEADER */
.header {
    background: var(--asis-primary);
    color: white;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(31, 56, 100, 0.3);
}

.header h1 {
    font-size: 18px;
    font-weight: 700;
}

.server-clock {
    font-size: 24px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: 1px;
}

.clock-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
    text-align: right;
    display: block;
}

/* TOLERANCE BANNER */
.tolerance-banner {
    background: var(--asis-accent);
    color: white;
    text-align: center;
    padding: 8px;
    font-size: 13px;
    font-weight: 500;
}

/* MAIN CONTAINER */
.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 20px 16px;
}

/* STEPS */
.step {
    background: var(--asis-card);
    border-radius: var(--asis-radius);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--asis-shadow);
    transition: all 0.3s ease;
}

.step-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--asis-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.step-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--asis-text);
}

/* SELECT / DROPDOWN */
.select-wrapper {
    position: relative;
}

.select-wrapper select {
    width: 100%;
    min-height: 48px;
    padding: 12px 40px 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: white;
    color: var(--asis-text);
    font-size: 15px;
    font-family: inherit;
    appearance: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.select-wrapper select:focus {
    outline: none;
    border-color: var(--asis-accent);
    background-color: var(--asis-input-active);
    box-shadow: 0 0 0 3px rgba(46, 117, 182, 0.15);
}

.select-wrapper::after {
    content: '';
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid var(--asis-text-muted);
    pointer-events: none;
}

/* INFO CARD (reunión seleccionada / persona seleccionada) */
.info-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px 16px;
    margin-top: 12px;
    display: none;
}

.info-card.visible { display: block; }

.info-card .info-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 13px;
}

.info-card .info-label {
    color: var(--asis-text-muted);
    font-weight: 500;
}

.info-card .info-value {
    font-weight: 600;
    color: var(--asis-text);
}

/* VALIDATION INDICATOR */
.validation-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
    transition: all 0.3s ease;
}

.validation-indicator.neutral {
    background: #f1f5f9;
    color: var(--asis-text-muted);
    border: 1px solid #e2e8f0;
}

.validation-indicator.error {
    background: var(--asis-danger-bg);
    color: var(--asis-danger);
    border: 1px solid var(--asis-danger);
}

.validation-indicator.ready {
    background: var(--asis-success-bg);
    color: var(--asis-success);
    border: 1px solid var(--asis-success);
}

.validation-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.neutral .validation-dot { background: var(--asis-muted); }
.error .validation-dot { background: var(--asis-danger); }
.ready .validation-dot { background: var(--asis-success); }

/* REGISTER BUTTON */
.btn-registrar {
    width: 100%;
    min-height: 56px;
    border: none;
    border-radius: var(--asis-radius);
    background: var(--asis-success);
    color: white;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-registrar:hover:not(:disabled) {
    background: #476e2d;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(84, 130, 53, 0.4);
}

.btn-registrar:disabled {
    background: var(--asis-muted);
    color: #999;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* MODAL CONFIRM */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-overlay.active { display: flex; }

.modal {
    background: white;
    border-radius: var(--asis-radius);
    padding: 24px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal h2 {
    color: var(--asis-primary);
    margin-bottom: 16px;
    font-size: 18px;
}

.modal .detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 14px;
}

.modal .detail-label { color: var(--asis-text-muted); }
.modal .detail-value { font-weight: 600; }

.estatus-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

.estatus-badge.a-tiempo { background: var(--asis-success-bg); color: var(--asis-success); }
.estatus-badge.tardanza { background: var(--asis-warning-bg); color: var(--asis-warning); }

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.modal-actions button {
    flex: 1;
    padding: 12px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.btn-cancel {
    background: #f1f5f9;
    color: var(--asis-text);
}

.btn-confirm {
    background: var(--asis-success);
    color: white;
}

.btn-confirm:hover { background: #476e2d; }

/* SUCCESS MESSAGE */
.success-message {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(84, 130, 53, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    color: white;
    text-align: center;
    flex-direction: column;
    gap: 12px;
}

.success-message.active { display: flex; }

.success-message .checkmark {
    font-size: 64px;
    animation: popIn 0.4s ease;
}

.success-message h2 { font-size: 24px; }
.success-message p { font-size: 16px; opacity: 0.9; }

@keyframes popIn {
    0% { transform: scale(0); opacity: 0; }
    70% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

/* EMPTY STATE */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--asis-text-muted);
}

.empty-state .icon { font-size: 48px; margin-bottom: 12px; }
.empty-state p { font-size: 15px; }

/* NAV LINK */
.admin-link {
    text-align: center;
    padding: 20px;
    font-size: 13px;
}

.admin-link a {
    color: var(--asis-accent);
    text-decoration: none;
    font-weight: 500;
}

.admin-link a:hover { text-decoration: underline; }

/* ERROR TOAST */
.error-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--asis-danger);
    color: white;
    padding: 14px 28px;
    border-radius: var(--asis-radius);
    font-size: 14px;
    font-weight: 600;
    z-index: 3000;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(192, 0, 0, 0.3);
    text-align: center;
    max-width: 90%;
}

.error-toast.active {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* RESPONSIVE */
@media (max-width: 320px) {
    .header h1 { font-size: 15px; }
    .server-clock { font-size: 20px; }
    .step { padding: 16px; }
}
