/* --- GLOBAL VARIABLES & RESET --- */
:root {
    --bg-cream: #F9F8F6;
    --text-navy: #1A2A3A;
    --brand-orange: #E07A5F; /* Matches the hand in your logo */
    --brand-orange-hover: #D06950;
    --safe-green: #2E7D32;
    --safe-green-light: #E8F5E9;
    --danger-red: #D9534F;
    --danger-red-light: #FDEDED;
    --white: #FFFFFF;
    --gray-light: #E2E8F0;
    --gray-text: #64748B;
}

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

body {
    font-family: 'Nunito', sans-serif;
    background-color: var(--bg-cream);
    color: var(--text-navy);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* --- LAYOUT & CONTAINERS --- */
.page-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.logo-container {
    margin-bottom: 24px;
    text-align: center;
}

.brand-logo {
    max-width: 180px;
    height: auto;
}

.card-container {
    background-color: var(--white);
    width: 100%;
    max-width: 450px; /* Perfect size for mobile and desktop */
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(26, 42, 58, 0.08);
    padding: 40px 30px;
    text-align: center;
}

/* --- TYPOGRAPHY --- */
h2 {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 10px;
    color: var(--text-navy);
}

.subtitle {
    font-size: 15px;
    color: var(--gray-text);
    margin-bottom: 24px;
}

.status-message {
    font-size: 18px;
    font-weight: 600;
    margin: 15px 0;
}

.child-name {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-navy);
    margin: 10px 0;
}

/* --- FORMS & INPUTS --- */
.form-group {
    text-align: left;
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-navy);
}

input[type="text"],
input[type="tel"],
input[type="email"] {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--gray-light);
    border-radius: 12px;
    font-size: 16px;
    font-family: 'Nunito', sans-serif;
    color: var(--text-navy);
    transition: border-color 0.3s ease;
}

input:focus {
    outline: none;
    border-color: var(--brand-orange);
}

/* --- BUTTONS --- */
.btn-primary, .btn-emergency {
    display: block;
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 800;
    font-family: 'Nunito', sans-serif;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.3s ease;
}

.btn-primary {
    background-color: var(--brand-orange);
    color: var(--white);
    margin-top: 10px;
}

.btn-primary:hover {
    background-color: var(--brand-orange-hover);
    transform: translateY(-2px);
}

.btn-emergency {
    background-color: var(--danger-red);
    color: var(--white);
    margin-top: 20px;
    box-shadow: 0 4px 15px rgba(217, 83, 79, 0.3);
}

.btn-emergency:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(217, 83, 79, 0.4);
}

/* --- STATUS VIEWS & ICONS --- */
.status-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 800;
    margin: 0 auto 15px auto;
}

.safe-icon {
    background-color: var(--safe-green-light);
    color: var(--safe-green);
}

.safe-title {
    color: var(--safe-green);
}

.danger-icon {
    background-color: var(--danger-red-light);
    color: var(--danger-red);
}

.danger-title {
    color: var(--danger-red);
}

/* --- UTILITIES --- */
.hidden {
    display: none !important;
}

.divider {
    border: 0;
    height: 1px;
    background: var(--gray-light);
    margin: 25px 0;
}

.link-btn {
    color: var(--brand-orange);
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
}

.link-btn:hover {
    text-decoration: underline;
}

/* --- LOADING SPINNER --- */
.spinner {
    border: 4px solid var(--gray-light);
    border-top: 4px solid var(--brand-orange);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}