/* STRICT GLASSMORPHISM UI - LIGHT & DARK MODE */
body.miox-fullscreen-app, .miox-portal-layout {
    background: linear-gradient(135deg, #ffffff, #f0f0f0, #e8e8e8, #ffffff) !important;
    background-size: 400% 400% !important;
    animation: miox-bg-shift 15s ease infinite !important;
    font-family: 'Poppins', sans-serif;
    color: #000000 !important;
    -webkit-font-smoothing: antialiased;
    margin: 0;
    padding: 0;
    transition: background 0.3s ease, color 0.3s ease;
}

@keyframes miox-bg-shift { 
    0% { background-position: 0% 50%; } 
    50% { background-position: 100% 50%; } 
    100% { background-position: 0% 50%; } 
}

.miox-portal-layout {
    display: block;
    min-height: 100vh;
    padding-bottom: 100px;
    position: relative;
}

/* ========================================= */
/* 1.5s SKELETON LOADER UI (First Load Only) */
/* ========================================= */
.miox-skeleton-overlay {
    display: none; 
    flex-direction: column; 
    gap: 15px; 
    position: absolute; 
    top: 20px; left: 20px; right: 20px; 
    z-index: 900;
}
.miox-skeleton-box {
    background: rgba(0,0,0,0.06);
    border-radius: 12px;
    width: 100%;
    animation: miox-pulse 1.5s infinite ease-in-out;
}
@keyframes miox-pulse { 
    0% { opacity: 1; } 
    50% { opacity: 0.4; } 
    100% { opacity: 1; } 
}

.miox-modules-loading .miox-module { opacity: 0 !important; pointer-events: none; }
.miox-module { transition: opacity 0.3s ease; opacity: 1; }

/* ========================================= */
/* WHATSAPP-STYLE TOAST NOTIFICATIONS */
/* ========================================= */
.miox-toast {
    position: fixed; 
    top: -100px; 
    left: 50%; 
    transform: translateX(-50%);
    background: #ffffff; 
    color: #000000; 
    padding: 12px 15px; 
    border-radius: 12px;
    z-index: 9999999; 
    font-size: 11px; 
    font-family: 'Poppins', sans-serif;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    transition: top 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    min-width: 280px; 
    max-width: 90%; 
    display: flex; 
    align-items: center; 
    gap: 12px;
    border-left: 4px solid #25D366; /* WhatsApp Green */
}
.miox-toast.show { top: 20px; }

/* ========================================= */
/* ACCORDION FOLDERS (For Attendance) */
/* ========================================= */
.miox-accordion {
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
    background: rgba(255,255,255,0.5);
}
.miox-accordion-header {
    background: rgba(0,0,0,0.03);
    padding: 12px 15px;
    font-size: 11px !important;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: inherit;
}
.miox-accordion-content {
    padding: 15px;
    display: none;
    border-top: 1px solid rgba(0,0,0,0.05);
}
.miox-accordion-header.active + .miox-accordion-content { display: block; }

/* Progress & Avatars */
.miox-progress-track { background: rgba(0,0,0,0.1); border-radius: 4px; height: 4px; width: 100%; margin-top: 8px; overflow: hidden; }
.miox-progress-fill { background: #000000; height: 100%; border-radius: 4px; width: 0%; transition: width 1.5s ease-out; }
.miox-avatar-initials { width: 40px; height: 40px; border-radius: 50%; background: #111111; color: #ffffff; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; letter-spacing: 1px; border: 2px solid #ffffff; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }

/* STRICT SIZING */
h1, h2, h3, h4, h5, h6, .miox-admin-wrap h1, .miox-admin-wrap h2, .miox-admin-wrap h3 { font-family: 'Poppins', sans-serif !important; font-size: 12px !important; font-weight: 600 !important; color: #000000 !important; margin-top: 0; }
p, span, label, td, th, div, .miox-admin-wrap p, .miox-admin-wrap span, .miox-admin-wrap label { font-family: 'Poppins', sans-serif; font-size: 10px !important; font-weight: 400; color: #333333 !important; line-height: 1.5; }
.miox-svg-icon { width: 14px; height: 14px; fill: none; stroke: #000000; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }

/* Cards & Layout */
.miox-card { background: rgba(255, 255, 255, 0.7) !important; backdrop-filter: blur(24px) !important; -webkit-backdrop-filter: blur(24px) !important; border: 1px solid rgba(0, 0, 0, 0.05) !important; border-radius: 12px !important; padding: 20px; margin-bottom: 15px; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02) !important; transition: transform 0.2s ease, box-shadow 0.2s ease; cursor: default; }
.miox-card:active { transform: scale(0.98); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important; }
.miox-main-content { padding: 20px; max-width: 1000px; margin: 0 auto; position: relative; }
.miox-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
@media (max-width: 768px) { .miox-grid { grid-template-columns: 1fr !important; } .miox-admin-wrap .miox-grid { grid-template-columns: 1fr !important; } }

/* Bottom Nav */
.miox-bottom-nav { position: fixed; bottom: 0; left: 0; width: 100%; background: rgba(255, 255, 255, 0.95) !important; backdrop-filter: blur(24px) !important; -webkit-backdrop-filter: blur(24px) !important; display: flex; justify-content: space-around; align-items: center; padding: 12px 0; padding-bottom: calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid rgba(0, 0, 0, 0.1) !important; z-index: 99999; }
.miox-nav-btn { background: transparent !important; border: none !important; display: flex; flex-direction: column; align-items: center; gap: 4px; color: #666666 !important; font-size: 10px !important; font-weight: 500 !important; cursor: pointer; text-decoration: none !important; }
.miox-nav-btn svg { width: 18px; height: 18px; stroke: #666666; fill: none; transition: 0.2s ease; }
.miox-nav-btn:hover, .miox-nav-btn.active { color: #000000 !important; font-weight: 600 !important; }
.miox-nav-btn:hover svg, .miox-nav-btn.active svg { stroke: #000000 !important; }

/* Buttons & Inputs */
.miox-btn-primary, .button-primary, .button { background-color: #000000 !important; color: #ffffff !important; border: 1px solid #000000 !important; border-radius: 8px !important; padding: 10px 14px !important; font-size: 10px !important; font-weight: 600 !important; cursor: pointer; text-align: center; text-decoration: none; }
.miox-btn-primary:hover, .button:hover { background-color: #333333 !important; color: #ffffff !important; }
.miox-btn-outline { background: transparent !important; color: #000000 !important; border: 1px solid #000000 !important; border-radius: 8px !important; padding: 10px 14px !important; font-size: 10px !important; font-weight: 600 !important; cursor: pointer; }
.miox-btn-outline:hover { background: #000000 !important; color: #ffffff !important; }
input[type="text"], input[type="date"], input[type="time"], input[type="password"], input[type="email"], input[type="number"], textarea, select { background: #ffffff !important; border: 1px solid #cccccc !important; border-radius: 6px !important; padding: 10px 12px !important; font-size: 10px !important; color: #000000 !important; width: 100%; box-sizing: border-box; }
input:focus, textarea:focus, select:focus { outline: none !important; border-color: #000000 !important; }
input[type="file"] { background: transparent !important; border: 1px dashed #cccccc !important; padding: 6px !important; color: #333333 !important; cursor: pointer; width: 100%; font-size: 10px !important; }
input[type="file"]::file-selector-button { background-color: #000000 !important; color: #ffffff !important; border: none !important; border-radius: 6px !important; padding: 6px 12px !important; font-size: 10px !important; font-weight: 600 !important; font-family: 'Poppins', sans-serif !important; cursor: pointer; margin-right: 10px; transition: 0.2s ease; }
input[type="file"]::file-selector-button:hover { background-color: #333333 !important; }

.status-badge { padding: 3px 6px; border-radius: 4px; font-size: 9px !important; font-weight: 600 !important; border: 1px solid #000000 !important; color: #000000 !important; background: transparent !important; }

/* DARK MODE */
body.miox-dark-mode, body.miox-dark-mode .miox-portal-layout { background: linear-gradient(135deg, #121212, #1e1e1e, #111111, #121212) !important; background-size: 400% 400% !important; animation: miox-bg-shift 15s ease infinite !important; color: #ffffff !important; }
body.miox-dark-mode h1, body.miox-dark-mode h2, body.miox-dark-mode h3, body.miox-dark-mode h4 { color: #ffffff !important; }
body.miox-dark-mode p, body.miox-dark-mode span, body.miox-dark-mode label { color: #aaaaaa !important; }
body.miox-dark-mode .miox-svg-icon { stroke: #ffffff !important; }
body.miox-dark-mode .miox-card, body.miox-dark-mode .miox-accordion-content { background: rgba(40, 40, 40, 0.7) !important; border: 1px solid rgba(255, 255, 255, 0.1) !important; }
body.miox-dark-mode .miox-accordion { border: 1px solid rgba(255, 255, 255, 0.1) !important; background: transparent !important; }
body.miox-dark-mode .miox-accordion-header { background: rgba(0,0,0,0.5) !important; color:#fff !important; }
body.miox-dark-mode .miox-skeleton-box { background: rgba(255,255,255,0.06); }
body.miox-dark-mode .miox-toast { background: #1e1e1e; color: #ffffff; border-left: 4px solid #25D366; }
body.miox-dark-mode .miox-progress-track { background: rgba(255,255,255,0.1); }
body.miox-dark-mode .miox-progress-fill { background: #ffffff; }
body.miox-dark-mode .miox-bottom-nav { background: rgba(30, 30, 30, 0.95) !important; border-top: 1px solid rgba(255, 255, 255, 0.1) !important; }
body.miox-dark-mode .miox-nav-btn { color: #888888 !important; }
body.miox-dark-mode .miox-nav-btn svg { stroke: #888888; }
body.miox-dark-mode .miox-nav-btn:hover, body.miox-dark-mode .miox-nav-btn.active { color: #ffffff !important; }
body.miox-dark-mode .miox-nav-btn:hover svg, body.miox-dark-mode .miox-nav-btn.active svg { stroke: #ffffff !important; }
body.miox-dark-mode .miox-btn-primary, body.miox-dark-mode input[type="file"]::file-selector-button { background: #ffffff !important; color: #000000 !important; border-color: #ffffff !important; }
body.miox-dark-mode .miox-btn-outline { background: transparent !important; color: #ffffff !important; border-color: #ffffff !important; }
body.miox-dark-mode input, body.miox-dark-mode textarea, body.miox-dark-mode select { background: #222222 !important; color: #ffffff !important; border-color: #555555 !important; }
body.miox-dark-mode .status-badge { border-color: #ffffff !important; color: #ffffff !important; }
