/* SIPAGU MA Assafiiyah - Premium Modern Login Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary-emerald: #059669;
    --primary-emerald-hover: #047857;
    --emerald-glow: rgba(16, 185, 129, 0.4);
    --bg-dark: #0f172a;
    --bg-card: rgba(255, 255, 255, 0.94);
    --text-main: #1e293b;
    --text-muted: #64748b;
    --accent-gold: #f59e0b;
    --border-color: rgba(226, 232, 240, 0.8);
    --radius-lg: 18px;
    --radius-md: 12px;
}

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

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    min-height: 100vh;
    background-color: var(--bg-dark);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    position: relative;
}

/* Dynamic Animated Background Blobs */
.bg-animated-mesh {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.55;
    animation: floatBlob 18s ease-in-out infinite alternate;
}

.blob-1 {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, #059669 0%, #10b981 100%);
    top: -10%;
    left: -10%;
    animation-delay: 0s;
}

.blob-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #1e3c72 0%, #2a5298 100%);
    bottom: -15%;
    right: -10%;
    animation-delay: -5s;
}

.blob-3 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, #d97706 0%, #f59e0b 100%);
    top: 40%;
    left: 45%;
    opacity: 0.25;
    animation-delay: -10s;
}

@keyframes floatBlob {
    0% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(40px, 30px) scale(1.08);
    }
    100% {
        transform: translate(-30px, 50px) scale(0.95);
    }
}

/* Main Split Wrapper */
.auth-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1120px;
    min-height: 640px;
    margin: 2rem;
    display: flex;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 40px rgba(16, 185, 129, 0.15);
    overflow: hidden;
    animation: cardAppear 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

/* Left Hero Section */
.hero-side {
    flex: 1.1;
    position: relative;
    background: url('/assets/images/madrasah_hero.jpg') center/cover no-repeat;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 3.5rem 3rem;
    color: #ffffff;
    overflow: hidden;
}

.hero-side::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.88) 0%, rgba(5, 150, 105, 0.82) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.school-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1.2rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #ecfdf5;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.school-badge i {
    color: var(--accent-gold);
    font-size: 1.1rem;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #ffffff, #d1fae5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-description {
    font-size: 1.05rem;
    color: #cbd5e1;
    line-height: 1.6;
    max-width: 480px;
    margin-bottom: 2.5rem;
}

.hero-stats {
    display: flex;
    gap: 1.5rem;
    margin-top: auto;
}

.stat-item {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    flex: 1;
    text-align: center;
    transition: transform 0.3s ease, background 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.18);
}

.stat-number {
    font-size: 1.4rem;
    font-weight: 800;
    color: #fef08a;
    display: block;
}

.stat-label {
    font-size: 0.8rem;
    color: #e2e8f0;
    font-weight: 500;
}

/* Right Form Section */
.form-side {
    flex: 1;
    background: var(--bg-card);
    padding: 3.5rem 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.form-header {
    margin-bottom: 2rem;
    text-align: left;
}

.brand-icon-wrapper {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #059669, #10b981);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.75rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.35);
    position: relative;
}

.brand-icon-wrapper::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.6), transparent);
    z-index: -1;
    opacity: 0.7;
    filter: blur(4px);
}

.form-title {
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.form-subtitle {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
}

/* Demo Account Quick Buttons */
.demo-accounts-box {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: var(--radius-md);
    padding: 0.9rem 1rem;
    margin-bottom: 1.75rem;
}

.demo-title {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.demo-chips {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.demo-chip {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 0.35rem 0.75rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.demo-chip:hover {
    background: #ecfdf5;
    border-color: var(--primary-emerald);
    color: var(--primary-emerald);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(5, 150, 105, 0.15);
}

.demo-chip i {
    font-size: 0.75rem;
    color: var(--primary-emerald);
}

/* Input Fields */
.input-field-group {
    margin-bottom: 1.25rem;
}

.input-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.45rem;
    display: block;
}

.custom-input-box {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 1.1rem;
    color: #94a3b8;
    font-size: 1.1rem;
    transition: color 0.3s ease;
    pointer-events: none;
}

.form-control-custom {
    width: 100%;
    padding: 0.85rem 1rem 0.85rem 3rem;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--text-main);
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: var(--radius-md);
    outline: none;
    transition: all 0.25s ease;
}

.form-control-custom:focus {
    background: #ffffff;
    border-color: var(--primary-emerald);
    box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.12);
}

.form-control-custom:focus + .input-icon,
.custom-input-box:focus-within .input-icon {
    color: var(--primary-emerald);
}

.toggle-password-btn {
    position: absolute;
    right: 1rem;
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 0.2rem;
    font-size: 1.05rem;
    transition: color 0.2s ease;
}

.toggle-password-btn:hover {
    color: var(--primary-emerald);
}

/* Submit Button */
.btn-submit-custom {
    width: 100%;
    padding: 0.95rem;
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 10px 20px -5px rgba(5, 150, 105, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.btn-submit-custom:hover {
    background: linear-gradient(135deg, #047857 0%, #059669 100%);
    transform: translateY(-2px);
    box-shadow: 0 14px 25px -5px rgba(5, 150, 105, 0.5);
}

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

/* Shimmer shine effect */
.btn-submit-custom::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 50%;
    height: 200%;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: rotate(30deg);
    transition: all 0.6s ease;
}

.btn-submit-custom:hover::after {
    left: 130%;
}

/* Alert Styling */
.alert-custom {
    padding: 0.9rem 1.1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    animation: alertSlide 0.4s ease forwards;
}

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

.alert-custom-danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
}

.alert-custom-success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #047857;
}

/* Footer */
.form-footer {
    margin-top: 2rem;
    text-align: center;
    font-size: 0.825rem;
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 900px) {
    .auth-wrapper {
        flex-direction: column;
        max-width: 500px;
        margin: 1.5rem 1rem;
        border-radius: 20px;
    }

    .hero-side {
        padding: 2.5rem 2rem;
        min-height: 280px;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .hero-description {
        font-size: 0.925rem;
        margin-bottom: 1.5rem;
    }

    .hero-stats {
        display: none;
    }

    .form-side {
        padding: 2.5rem 2rem;
    }
}
