body {
    font-family: sans-serif;
    width: 320px; /* Widened to give the warning box and buttons breathing room */
    min-height: 150px; /* Allows the popup to shrink perfectly when signed out */
    padding: 15px;
    text-align: center;
    margin: 0;
}

h1 {
    margin-top: 0;
    color: #0000AF; /* Brand Blue */
    font-size: 1.5em;
}

#auth-status {
    margin-bottom: 15px;
    font-size: 0.9em;
    color: #555;
    word-wrap: break-word;
}

/* Primary Buttons */
button {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    background-color: #0000AF; /* Brand Blue */
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.95em;
    transition: background-color 0.2s;
}
button:hover {
    background-color: #000080;
}

hr {
    border: 0;
    border-top: 1px solid #eee;
    margin: 15px 0;
}

/* Secondary Button (Website) */
.secondary-btn {
    background-color: white;
    color: #0000AF;
    border: 2px solid #0000AF;
}
.secondary-btn:hover {
    background-color: #f0f0ff;
}

/* Danger Button (Deactivate) */
.danger-btn {
    background-color: white;
    color: #dc3545;
    border: 1px solid #dc3545;
    font-size: 0.85em;
    margin-top: 10px;
}
.danger-btn:hover {
    background-color: #fff5f5;
}

/* Large Activate Button */
.primary-btn-large {
    background-color: #28a745; /* Green for ON */
    font-size: 1.2em;
    padding: 15px;
    margin-top: 10px;
}
.primary-btn-large:hover {
    background-color: #218838;
}

/* Universal Mobile & Tablet Optimizations */
/* Captures Phones, Foldables, Tablets (up to 1500px) */
@media screen and (max-width: 1500px) {
    body {
        /* 1. Make the body fill the screen */
        width: 100% !important;
        min-width: 300px !important;
        margin: 0 auto !important; 
        
        /* 2. SAFE ALIGNMENT (Top-Middle) */
        display: flex;
        flex-direction: column;
        align-items: center;      /* Horizontal Center (Fixes the "Left" look) */
        justify-content: flex-start; /* Vertical Top (Safe for Keyboards) */
        
        /* 3. Breathing Room */
        padding: 20px;            /* Side padding */
        padding-top: 15px;        /* Pushes content down so it doesn't hit the top edge */
        min-height: 100vh;        /* Ensures background covers the whole screen */
        box-sizing: border-box;
    }

    /* 4. The "App Card" Look */
    div, form, .container, #active-view {
        width: 100% !important;
        max-width: 500px !important; /* Keeps it neat on big iPads */
        margin: 0 auto; /* Extra insurance for centering */
    }

    /* 5. Big, touch-friendly inputs & buttons */
    button, .btn, input, select, textarea {
        width: 100% !important;
        max-width: 100% !important;
        margin-bottom: 15px;
        padding: 15px !important; 
        font-size: 16px !important; 
        height: auto !important;
    }
}