/* --- BEACHY TYPOGRAPHY & RESET --- */

:root {
    /* "Midnight Beach Party" Palette */
    --bg-deep: #020617; /* Deepest Night */
    --bg-glass: rgba(15, 23, 42, 0.6); /* Transparent Glass */
    
    /* Accents */
    --ocean-blue: #0ea5e9; /* Vivid Sky Blue */
    --foam-white: #f0f9ff;
    --sand-gold: #fbbf24; /* Golden Sand */
    --sunset-pink: #f472b6; /* Subtle accent */
    
    /* Effects */
    --glass-border: 1px solid rgba(255, 255, 255, 0.1);
    --gold-glow: 0 0 25px rgba(251, 191, 36, 0.2);
    --blue-glow: 0 0 25px rgba(14, 165, 233, 0.2);
    
    --radius-bubble: 24px; /* Super Round */
    --transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); /* Bouncy transition */
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-deep);
    /* Palm Trees & Night Beach Background */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--foam-white);
    overflow: hidden; 
    color-scheme: dark; /* Helps browser defaults */
}

/* --- APP CONTAINER (The "Glass Tablet") --- */
#appContainer {
    background: rgba(2, 6, 23, 0.7);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8), inset 0 0 20px rgba(14, 165, 233, 0.05);
    border-radius: 32px;
    width: 95%;
    max-width: 1600px;
    height: 92vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

/* --- LOGIN CARD SPECIFIC --- */
.login-card {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(251, 191, 36, 0.3); /* Gold Border */
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5), inset 0 0 30px rgba(251, 191, 36, 0.05);
    border-radius: 32px;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

/* Palm Leaf Decoration (CSS Shapes) */
.palm-decor {
    position: absolute;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(20px);
    pointer-events: none;
}

/* --- TYPOGRAPHY --- */
h1.workspace-title {
    font-family: 'Poppins', sans-serif; /* Bubbly Header */
    letter-spacing: 0.02em;
    background: linear-gradient(to right, var(--sand-gold), #fff, var(--ocean-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 10px rgba(14, 165, 233, 0.4));
}

h2, h3 { font-weight: 700; letter-spacing: -0.01em; }

/* --- BUTTONS (Bubbly & Bouncy) --- */
.action-button {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    border-radius: 20px; /* Bubbly */
    transition: var(--transition);
    border: none;
    letter-spacing: 0.03em;
    cursor: pointer;
}

.btn-roblox {
    background: linear-gradient(135deg, #FF2D2D, #B91C1C); /* Roblox Red */
    color: white;
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 24px;
    font-size: 1.1rem;
}

.btn-roblox:hover {
    transform: scale(1.02) translateY(-2px);
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.6);
}

.btn-primary {
    background: linear-gradient(135deg, var(--ocean-blue), #0284c7);
    color: white;
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.3);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(56, 189, 248, 0.5);
}

/* Secondary Button (Added for Admin Views) */
.btn-secondary {
    background: rgba(30, 41, 59, 0.8);
    color: var(--foam-white);
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.btn-secondary:hover {
    background: rgba(51, 65, 85, 0.9);
    transform: translateY(-2px);
    border-color: var(--ocean-blue);
    color: var(--ocean-blue);
}

/* --- SIDEBAR --- */
#sidebar {
    background: rgba(2, 6, 23, 0.85);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-button {
    border-radius: 16px;
    margin-bottom: 6px;
    font-weight: 600;
    color: var(--text-muted);
    transition: var(--transition);
}

.sidebar-button:hover {
    background: rgba(14, 165, 233, 0.1);
    color: var(--foam-white);
    transform: translateX(6px);
}

.sidebar-button.active {
    background: linear-gradient(90deg, rgba(14, 165, 233, 0.2), transparent);
    color: var(--sand-gold);
    border-left: 4px solid var(--sand-gold);
}

/* --- GENERIC UTILS --- */
.text-sky-400 { color: var(--ocean-blue) !important; }
.text-amber-400, .text-yellow-400 { color: var(--sand-gold) !important; }
.bg-slate-800 { 
    background: rgba(30, 41, 59, 0.5) !important; 
    border-radius: 20px !important;
}

/* Custom Scrollbar */
.custom-scrollbar::-webkit-scrollbar { width: 6px; height: 6px; }
.custom-scrollbar::-webkit-scrollbar-track { background: rgba(0,0,0,0.1); }
.custom-scrollbar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 10px; }
.custom-scrollbar::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* --- FORM & UX FIXES (Screenshot Resolution) --- */

/* Force Inputs to have dark background and white text */
input, select, textarea, .form-input {
    background-color: rgba(15, 23, 42, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: white !important;
    width: 100%;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    transition: all 0.2s;
    display: block; /* Ensures they don't sit side-by-side unless in a grid */
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--ocean-blue) !important;
    box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.2);
}

/* Label Styling */
.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #94a3b8; /* slate-400 */
    letter-spacing: 0.05em;
}

/* Fix for Grid Gap Squashing */
form .grid, .grid.gap-4 {
    align-items: start !important;
    column-gap: 1.5rem; /* Ensure space between grid columns */
}

/* Ensure dynamic log forms (like in Department Logs) don't squash inputs */
#modal-dynamic-fields input {
    margin-top: 0.25rem;
}

/* --- APPLICATION MANAGER FIXES --- */

/* Tab Buttons */
.app-tab-btn {
    position: relative;
    padding-bottom: 12px;
    color: var(--text-muted);
    font-weight: 600;
    transition: all 0.3s ease;
}
.app-tab-btn:hover {
    color: var(--foam-white);
}
.app-tab-btn.text-sky-400 { /* Active */
    color: var(--ocean-blue) !important;
    border-bottom: 2px solid var(--ocean-blue) !important;
    text-shadow: 0 0 10px rgba(14, 165, 233, 0.4);
}

/* Status Toggle Switch */
input#app-status-toggle:checked ~ div {
    background-color: #10b981; /* Emerald 500 */
}
input#app-status-toggle:focus ~ div {
    box-shadow: 0 0 0 2px #0f172a, 0 0 0 4px #0ea5e9;
}

/* Pending Applications List Cards */
#apps-pending-list .bg-slate-900 {
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.4) 0%, rgba(15, 23, 42, 0.6) 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(5px);
}

/* Question Editor Modal */
#q-editor-backdrop .bg-slate-800 {
    background-color: rgba(15, 23, 42, 0.95) !important; /* Nearly opaque */
    border: 1px solid var(--ocean-blue);
    box-shadow: 0 0 100px rgba(0, 0, 0, 0.9);
}

/* Mobile */
@media (max-width: 768px) {
    #appContainer {
        border-radius: 0;
        height: 100vh;
        width: 100%;
        border: none;
    }
    h1.workspace-title { font-size: 2.5rem; }
}