:root {
    --bg: #f4f6f9;
    --card: #ffffff;
    --primary: #1d4ed8;
    --primary-hover: #1e40af;
    --success: #15803d;
    --danger: #b91c1c;
    --warning-bg: #fef9c3;
    --warning-border: #eab308;
    --text: #0f172a;
    --muted: #64748b;
    --border: #e2e8f0;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

.top-nav {
    background: #0f172a;
    color: #fff;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.brand-logo-wrap {
    background: #ffffff;
    padding: 0.32rem 0.65rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.brand-logo-img {
    height: 36px;
    width: auto;
    display: block;
}

.brand-badge {
    background: #22c55e;
    color: #052e16;
    font-weight: 800;
    padding: 0.35rem 0.65rem;
    border-radius: 6px;
    font-size: 0.85rem;
}

.brand h1 {
    font-size: 1.15rem;
}

.subtitle {
    font-size: 0.8rem;
    color: #94a3b8;
}

.view-tabs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tab-btn, .reset-btn {
    padding: 0.55rem 0.9rem;
    border-radius: 6px;
    border: 1px solid #334155;
    background: #1e293b;
    color: #e2e8f0;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
}

.tab-btn.active {
    background: #3b82f6;
    border-color: #60a5fa;
    color: #fff;
}

.reset-btn {
    background: #3f1d1d;
    border-color: #7f1d1d;
    color: #fca5a5;
}

.workspace-container {
    max-width: 1280px;
    margin: 1.5rem auto;
    padding: 0 1.25rem;
}

.view-section {
    display: none;
}

.view-section.active {
    display: block;
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.muted { color: var(--muted); }
.small { font-size: 0.82rem; }
.hidden { display: none !important; }

/* Simulator Layout */
.simulator-layout {
    display: grid;
    grid-template-columns: 1fr 410px;
    gap: 2rem;
    align-items: start;
}

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

.persona-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 1rem 0;
}

.persona-btn {
    text-align: left;
    padding: 0.65rem 0.9rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #f8fafc;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.persona-btn.active {
    border-color: var(--primary);
    background: #eff6ff;
    font-weight: 600;
}

.badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 700;
}

.badge-volunteer { background: #dcfce7; color: #166534; }
.badge-student { background: #dbeafe; color: #1e40af; }
.badge-staff { background: #f3e8ff; color: #6b21a8; }
.badge-quarantine { background: #fef3c7; color: #92400e; }

/* Phone Frame */
.phone-frame {
    background: #0f172a;
    border-radius: 34px;
    padding: 14px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
}

.phone-notch {
    text-align: center;
    color: #94a3b8;
    font-size: 0.75rem;
    padding-bottom: 8px;
    font-weight: 600;
}

.phone-screen {
    background: #ffffff;
    border-radius: 22px;
    min-height: 600px;
    padding: 1.35rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
    overflow: hidden;
}

.phone-screen.kawaii-landing-mode {
    padding: 0;
    gap: 0;
    background: #f5f9fc;
    justify-content: space-between;
}

/* ============================================================================
   v1.5.0 KAWAII HEART QR LANDING DESIGN
   ============================================================================ */
.kawaii-hero-top {
    position: relative;
    background: linear-gradient(145deg, #c5f2e0 0%, #c8eeff 48%, #e2f5ff 100%);
    height: 325px;
    width: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.kawaii-top-bar {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 0.9rem 1rem 0 1rem;
    z-index: 3;
}

.kawaii-circle-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #ffffff;
    border: none;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #0f172a;
    cursor: pointer;
    transition: transform 0.15s ease;
}

.kawaii-circle-btn:hover {
    transform: scale(1.06);
}

.kawaii-logo-pill {
    background: rgba(255, 255, 255, 0.95);
    padding: 0.3rem 0.72rem;
    border-radius: 999px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.07);
    display: flex;
    align-items: center;
}

.kawaii-logo-pill img {
    height: 25px;
    width: auto;
    display: block;
}

.kawaii-character-stage {
    position: relative;
    width: 100%;
    margin-left: 0;
    margin-bottom: -8px;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    animation: kawaiiFloat 4.2s ease-in-out infinite;
}

.kawaii-character-svg {
    width: 92%;
    max-width: 345px;
    height: auto;
    display: block;
    filter: drop-shadow(0 -6px 16px rgba(56, 189, 248, 0.14));
}

@keyframes kawaiiFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(5px); }
}

.kawaii-eye {
    transform-origin: center;
    animation: kawaiiBlink 5.2s infinite;
}

@keyframes kawaiiBlink {
    0%, 92%, 100% { transform: scaleY(1); }
    95% { transform: scaleY(0.12); }
}

.kawaii-editorial-bottom {
    background: #f5f9fc;
    flex: 1;
    padding: 1.85rem 1.35rem 1.45rem 1.35rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    text-align: center;
}

.kawaii-serif-title {
    font-family: Georgia, "Times New Roman", "Playfair Display", serif;
    font-size: 2.02rem;
    line-height: 1.13;
    font-weight: 700;
    color: #111827;
    letter-spacing: -0.02em;
    margin-bottom: 0.65rem;
}

.kawaii-sans-subtitle {
    font-size: 0.89rem;
    color: #64748b;
    max-width: 285px;
    line-height: 1.45;
}

.kawaii-pill-cta-outer {
    background: #ffffff;
    padding: 7px;
    border-radius: 999px;
    box-shadow: 0 14px 32px rgba(56, 189, 248, 0.28), 0 4px 10px rgba(15, 23, 42, 0.07);
    width: 92%;
    max-width: 325px;
    border: none;
    cursor: pointer;
    transition: transform 0.16s ease, box-shadow 0.16s ease;
    margin-top: 1.25rem;
}

.kawaii-pill-cta-outer:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(56, 189, 248, 0.36), 0 5px 12px rgba(15, 23, 42, 0.09);
}

.kawaii-pill-cta-outer:active {
    transform: scale(0.98);
}

.kawaii-pill-cta-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 1.05rem 1.4rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #c4f0ff 0%, #99dcff 50%, #7dd3fc 100%);
    border: 2.5px solid #22b8f0;
    color: #0c4a6e;
    font-size: 1.18rem;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.kawaii-home-indicator {
    width: 115px;
    height: 4px;
    border-radius: 99px;
    background: #1e293b;
    margin-top: 1.05rem;
    opacity: 0.85;
}

.kawaii-form-mini-banner {
    background: linear-gradient(135deg, #cdeffd 0%, #c8f5e4 60%, #e0f7fa 100%);
    margin: -1.35rem -1.35rem 0.65rem -1.35rem;
    padding: 0.85rem 1.1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #bae6fd;
}

.giant-btn {
    width: 100%;
    padding: 1.35rem;
    font-size: 1.25rem;
    font-weight: 800;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    color: #fff;
    transition: transform 0.08s;
}

.giant-btn:active { transform: scale(0.98); }
.giant-checkin { background: var(--success); }
.giant-checkout { background: var(--danger); }

.warning-card {
    background: var(--warning-bg);
    border: 2px solid var(--warning-border);
    border-radius: 12px;
    padding: 1rem;
    font-size: 0.88rem;
}

.warning-card h4 {
    color: #854d0e;
    margin-bottom: 0.35rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 0.75rem;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
}

input[type="text"], input[type="tel"], input[type="email"], input[type="date"], input[type="time"], input[type="password"], input[type="number"], select {
    padding: 0.65rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.95rem;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 0.65rem 1.1rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

.btn-secondary {
    background: #e2e8f0;
    color: #1e293b;
    border: none;
    padding: 0.65rem 1.1rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

.btn-danger {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
    padding: 0.5rem 0.9rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

/* Tables & Grids */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.75rem;
}

th, td {
    text-align: left;
    padding: 0.75rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

th {
    background: #f8fafc;
    font-weight: 700;
}

.fire-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.admin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 1.25rem;
}

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

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin: 0.75rem 0;
}

.radio-option {
    border: 1px solid var(--border);
    padding: 0.65rem 0.85rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
}

.custom-toggles-box {
    background: #f8fafc;
    border: 1px dashed #94a3b8;
    border-radius: 8px;
    padding: 0.85rem;
    margin-top: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Report & Print Styles */
.report-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
    align-items: end;
}

.report-actions {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.pdf-sheet {
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 2.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.pdf-disclaimer {
    margin-top: 2rem;
    padding: 1rem;
    background: #f8fafc;
    border-left: 4px solid #1d4ed8;
    font-size: 0.85rem;
}

.email-draft-box {
    margin-top: 1rem;
    padding: 1rem;
    background: #eff6ff;
    border: 1px solid #93c5fd;
    border-radius: 8px;
    font-size: 0.9rem;
}

/* Real Smartphone Fullscreen QR Mode (?mode=mobile or narrow phone screen) */
body.real-smartphone-mode .top-nav,
body.real-smartphone-mode .simulator-controls,
body.real-smartphone-mode .phone-notch {
    display: none !important;
}

body.real-smartphone-mode .workspace-container {
    margin: 0;
    padding: 0;
    max-width: 100%;
}

body.real-smartphone-mode .simulator-layout {
    display: block;
}

body.real-smartphone-mode .phone-frame {
    background: transparent;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
}

body.real-smartphone-mode .phone-screen {
    border-radius: 0;
    min-height: 100vh;
}

@media print {
    .no-print { display: none !important; }
    body { background: #fff; }
    .workspace-container { max-width: 100%; margin: 0; padding: 0; }
    .pdf-sheet { border: none; box-shadow: none; padding: 0; }
}
