/* assets/css/style.css - MIN 1 Kota Malang E-Learning Design System */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Primary Islamic Emerald & Modern Forest */
    --primary: #059669;
    --primary-dark: #064e3b;
    --primary-light: #10b981;
    --primary-subtle: #d1fae5;
    --primary-glow: rgba(5, 150, 105, 0.25);

    /* Secondary Luxury Gold / Amber */
    --accent: #f59e0b;
    --accent-dark: #b45309;
    --accent-light: #fef3c7;
    --accent-glow: rgba(245, 158, 11, 0.3);

    /* Neutral & Backgrounds (Light Mode) */
    --bg-main: #f8fafc;
    --bg-surface: #ffffff;
    --bg-surface-trans: rgba(255, 255, 255, 0.85);
    --bg-subtle: #f1f5f9;
    --border-color: #e2e8f0;
    --border-focus: #10b981;

    /* Text Colors */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --text-inverted: #ffffff;

    /* Status Colors */
    --success: #10b981;
    --success-subtle: #d1fae5;
    --warning: #f59e0b;
    --warning-subtle: #fef3c7;
    --danger: #ef4444;
    --danger-subtle: #fee2e2;
    --info: #0ea5e9;
    --info-subtle: #e0f2fe;

    /* Role Distinct Colors */
    --role-admin: #dc2626;
    --role-admin-bg: #fee2e2;
    --role-guru: #2563eb;
    --role-guru-bg: #dbeafe;
    --role-siswa: #059669;
    --role-siswa-bg: #d1fae5;
    --role-wali: #7c3aed;
    --role-wali-bg: #ede9fe;
    --role-kamad: #d97706;
    --role-kamad-bg: #fef3c7;

    /* Shadows & Radii */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 9999px;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 6px 18px -4px rgba(0, 0, 0, 0.08), 0 2px 6px -2px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 14px 30px -8px rgba(5, 150, 105, 0.12), 0 6px 12px -4px rgba(0, 0, 0, 0.05);
    --shadow-glow: 0 0 25px rgba(5, 150, 105, 0.2);

    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dark Mode Overrides */
[data-theme="dark"] {
    --bg-main: #0b131e;
    --bg-surface: #131f2d;
    --bg-surface-trans: rgba(19, 31, 45, 0.9);
    --bg-subtle: #1c2b3d;
    --border-color: #24374e;
    --border-focus: #34d399;

    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --shadow-md: 0 8px 24px -6px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 16px 36px -8px rgba(0, 0, 0, 0.6);
}

/* Global Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    transition: background-color var(--transition-smooth), color var(--transition-smooth);
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

/* Typography Utility */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 700;
    line-height: 1.25;
}

/* Auth Page Layout - MIN 1 Kota Malang */
body.login-body {
    background-color: #1a5e38;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 30px 30px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 1.5rem;
    font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, sans-serif;
}

.auth-page-wrapper {
    width: 100%;
    max-width: 1024px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-card-min1 {
    width: 100%;
    min-height: 540px;
    background: #ffffff;
    border-radius: 28px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
    display: grid;
    grid-template-columns: 55% 45%;
    overflow: hidden;
    animation: fadeInScale 0.5s ease-out;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.97) translateY(8px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Left Hero Illustration Panel */
.auth-hero-pane {
    background-color: #c4d554;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    min-height: 100%;
}

.auth-hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* Right Form Section */
.auth-form-pane {
    background: #ffffff;
    padding: 44px 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-form-header {
    text-align: center;
    margin-bottom: 24px;
}

.auth-title-min1 {
    font-family: "Montserrat", "Plus Jakarta Sans", sans-serif;
    font-size: 3.2rem;
    font-weight: 900;
    color: #0e532b;
    letter-spacing: 0.5px;
    line-height: 1.1;
    margin-bottom: 8px;
}

.auth-subtitle-min1 {
    color: #374151;
    font-size: 0.92rem;
    line-height: 1.45;
    margin: 0 auto;
    max-width: 320px;
}

/* Form Controls */
.auth-form-min1 {
    width: 100%;
}

.form-group-min1 {
    margin-bottom: 18px;
}

.form-label-min1 {
    display: block;
    color: #0e532b;
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: 1.02rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.form-input-min1 {
    width: 100%;
    background-color: #074c26;
    color: #ffffff;
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    padding: 13px 20px;
    border: 2px solid transparent;
    border-radius: 12px;
    outline: none;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.form-input-min1::placeholder {
    color: rgba(255, 255, 255, 0.55);
    font-weight: 500;
}

.form-input-min1:focus {
    background-color: #063e20;
    border-color: #9ec03f;
    box-shadow: 0 0 0 4px rgba(158, 192, 63, 0.25);
}

.password-wrapper-min1 {
    position: relative;
    width: 100%;
}

.password-wrapper-min1 .form-input-min1 {
    padding-right: 54px;
}

.btn-toggle-eye {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #9ec03f;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    transition: color 0.15s ease, transform 0.15s ease;
}

.btn-toggle-eye:hover {
    color: #c4d554;
    transform: translateY(-50%) scale(1.1);
}

.btn-submit-min1 {
    width: 100%;
    background-color: #074c26;
    color: #ffffff;
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: 1.15rem;
    font-weight: 800;
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-submit-min1:hover {
    background-color: #053b1d;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(7, 76, 38, 0.35);
}

.btn-submit-min1:active {
    transform: translateY(0);
}

.tagline-min1 {
    text-align: center;
    margin-top: 16px;
    color: #0e532b;
    font-weight: 800;
    font-style: italic;
    font-size: 0.88rem;
    letter-spacing: 0.3px;
}

/* Quick Role Switcher Showcase Accordion */
.demo-role-container {
    margin-top: 20px;
}

.demo-accordion {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    padding: 8px 12px;
    transition: background-color 0.2s ease;
}

.demo-accordion[open] {
    background: #f1f5f9;
}

.demo-accordion-trigger {
    font-size: 0.78rem;
    font-weight: 700;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
    list-style: none;
}

.demo-accordion-trigger::-webkit-details-marker {
    display: none;
}

.demo-accordion .chevron-icon {
    transition: transform 0.2s ease;
}

.demo-accordion[open] .chevron-icon {
    transform: rotate(180deg);
}

.demo-buttons-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-top: 8px;
}

.btn-demo-role {
    padding: 0.5rem 0.65rem;
    font-size: 0.78rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
}

.btn-demo-role:hover {
    border-color: var(--primary);
    background: var(--primary-subtle);
    color: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-demo-role span.role-tag {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
}

/* Responsive Styles for Login Card */
@media (max-width: 860px) {
    .auth-card-min1 {
        grid-template-columns: 1fr;
        max-width: 460px;
    }
    .auth-hero-pane {
        min-height: 220px;
        max-height: 260px;
    }
    .auth-form-pane {
        padding: 32px 24px;
    }
    .auth-title-min1 {
        font-size: 2.5rem;
    }
    .demo-buttons-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Flash Messages / Alerts */
.alert {
    padding: 0.85rem 1.15rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.25rem;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideDown 0.3s var(--transition-smooth);
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.alert-error {
    background: var(--danger-subtle);
    border: 1px solid #fca5a5;
    color: #991b1b;
}

.alert-success {
    background: var(--success-subtle);
    border: 1px solid #86efac;
    color: #166534;
}

.alert-info {
    background: var(--info-subtle);
    border: 1px solid #93c5fd;
    color: #1e40af;
}

/* Floating Quick Switcher Bar (Bottom) */
.quick-floating-bar {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 999;
    display: flex;
    align-items: center;
    background: var(--bg-surface-trans);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    padding: 0.4rem 0.6rem;
    box-shadow: var(--shadow-lg);
    gap: 0.35rem;
    animation: fadeIn 0.5s ease;
}

.quick-bar-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    padding: 0 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.quick-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    font-size: 0.78rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    text-decoration: none;
    transition: all var(--transition-fast);
    border: 1px solid transparent;
}

.quick-chip:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}

.chip-admin { background: var(--role-admin-bg); color: var(--role-admin); }
.chip-guru { background: var(--role-guru-bg); color: var(--role-guru); }
.chip-siswa { background: var(--role-siswa-bg); color: var(--role-siswa); }
.chip-wali { background: var(--role-wali-bg); color: var(--role-wali); }
.chip-kamad { background: var(--role-kamad-bg); color: var(--role-kamad); }

/* Responsive */
@media (max-width: 900px) {
    .auth-container {
        grid-template-columns: 1fr;
    }
    .auth-hero {
        display: none;
    }
    .auth-form-side {
        padding: 2.5rem 1.75rem;
    }
    .quick-floating-bar {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
        overflow-x: auto;
        white-space: nowrap;
    }
}
