/* ==========================================
   PORTAL SDM SERUT - STYLESHEET
   Modern Split-Screen Design
   ========================================== */

:root {
    --primary: #059669;
    --primary-dark: #046c4e;
    --primary-light: #10b981;
    --secondary: #10b981;
    --accent: #f59e0b;
    --danger: #ef4444;
    --purple: #8b5cf6;
    --blue: #3b82f6;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --bg: #f0fdf4;
    --card: #ffffff;
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: var(--bg);
    min-height: 100vh;
    overflow: auto;
}

.container {
    width: 100%;
    min-height: 100vh;
    height: auto;
    overflow-y: auto;
}

/* ==========================================
   LOGIN SCREEN - MODERN GREEN SPLIT CARD DESIGN
   ========================================== */

#loginScreen {
    min-height: 100vh;
    width: 100%;
    background: linear-gradient(135deg, #e8f5e9 0%, #d1fae5 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.login-wrapper {
    width: 100%;
    max-width: 1000px;
    display: flex;
    justify-content: center;
}

/* GREEN CONTAINER CARD */
.login-blue-card,
.login-green-card {
    width: 100%;
    background: linear-gradient(135deg, #046c4e 0%, #059669 45%, #10b981 100%);
    border-radius: 28px;
    box-shadow: 0 25px 65px rgba(4, 108, 78, 0.32);
    display: flex;
    flex-direction: row;
    position: relative;
    overflow: hidden;
    padding: 36px;
    gap: 36px;
    align-items: center;
}

/* BACKGROUND ABSTRACT SHAPES */
.bg-shape {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.bg-shape.shape-1 {
    bottom: -120px;
    left: -100px;
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0) 70%);
}

.bg-shape.shape-2 {
    top: -100px;
    left: 140px;
    width: 340px;
    height: 340px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0) 70%);
}

/* LEFT SIDE - WELCOME & PORTAL LOGO */
.login-left {
    flex: 1.1;
    padding: 20px 15px 20px 20px;
    position: relative;
    z-index: 1;
    color: white;
}

.welcome-content {
    position: relative;
    z-index: 1;
}

/* PORTAL LOGO BADGE */
.portal-logo-badge {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.28);
    padding: 10px 18px;
    border-radius: 18px;
    margin-bottom: 32px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

.logo-box {
    width: 44px;
    height: 44px;
    background: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.logo-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.portal-badge-text {
    display: flex;
    flex-direction: column;
}

.badge-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    color: #ffffff;
}

.badge-subtitle {
    font-size: 0.75rem;
    opacity: 0.85;
    color: #e2e8f0;
    font-weight: 500;
}

.welcome-title {
    font-family: 'Outfit', sans-serif;
    font-size: 2.8rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    margin-bottom: 6px;
    line-height: 1.1;
    color: #ffffff;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.headline-name {
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 22px;
}

.welcome-desc {
    font-size: 0.95rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.88);
    max-width: 430px;
}

/* RIGHT SIDE - WHITE LOGIN CARD */
.login-right {
    flex: 1;
    display: flex;
    justify-content: center;
    width: 100%;
}

.login-card {
    background: #ffffff;
    border-radius: 24px;
    padding: 38px 34px;
    width: 100%;
    max-width: 410px;
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.12);
    position: relative;
    z-index: 2;
    animation: slideInCard 0.5s ease;
}

@keyframes slideInCard {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    margin-bottom: 26px;
}

.login-header h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 2.2rem;
    font-weight: 800;
    color: #064e3b;
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}

.login-header p {
    color: #64748b;
    font-size: 0.88rem;
    font-weight: 500;
}

/* FORM CONTROLS */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
}

.input-container {
    position: relative;
    width: 100%;
}

.input-container input[type="text"],
.input-container input[type="password"] {
    width: 100%;
    height: 50px;
    padding: 0 16px;
    border: 1.5px solid #d1fae5;
    border-radius: 12px;
    font-size: 0.95rem;
    font-family: inherit;
    color: #0f172a;
    background: #ffffff;
    transition: all 0.25s ease;
    outline: none;
}

.input-container input:focus {
    border-color: #059669;
    box-shadow: 0 0 0 3.5px rgba(5, 150, 105, 0.15);
}

.input-container input::placeholder {
    color: #94a3b8;
    font-size: 0.9rem;
}

/* PASSWORD TOGGLE BUTTON */
.password-container input {
    padding-right: 75px !important;
}

.btn-toggle-password {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    font-size: 0.8rem;
    font-weight: 800;
    color: #059669;
    cursor: pointer;
    letter-spacing: 0.6px;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.btn-toggle-password:hover {
    background: rgba(5, 150, 105, 0.08);
}

/* REMEMBER ME & FORGOT PASSWORD ROW */
.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 14px;
    margin-bottom: 26px;
    font-size: 0.85rem;
}

.remember-me {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    color: #334155;
    font-weight: 600;
}

.remember-me input[type="checkbox"] {
    display: none;
}

.checkbox-box {
    width: 20px;
    height: 20px;
    border: 2px solid #cbd5e1;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    transition: all 0.2s ease;
}

.checkbox-box i {
    font-size: 14px;
    color: white;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.2s ease;
}

.remember-me input[type="checkbox"]:checked + .checkbox-box {
    background: #059669;
    border-color: #059669;
}

.remember-me input[type="checkbox"]:checked + .checkbox-box i {
    opacity: 1;
    transform: scale(1);
}

.forgot-password {
    color: #475569;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
}

.forgot-password:hover {
    color: #059669;
    text-decoration: underline;
}

/* LOGIN BUTTON */
.btn-login {
    width: 100%;
    height: 52px;
    background: linear-gradient(135deg, #046c4e 0%, #059669 100%);
    color: #ffffff;
    border: none;
    border-radius: 14px;
    font-size: 1.05rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 20px rgba(5, 150, 105, 0.35);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(5, 150, 105, 0.45);
    background: linear-gradient(135deg, #03523b 0%, #047857 100%);
}

.btn-login:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

.btn-login:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* FOOTER LINK */
.login-footer {
    margin-top: 26px;
    text-align: center;
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
}

.login-footer a {
    color: #059669;
    font-weight: 700;
    text-decoration: none;
    margin-left: 4px;
}

.login-footer a:hover {
    text-decoration: underline;
}

.login-footer a:hover {
    text-decoration: underline;
}

.error-message {
    background: #fee2e2;
    color: #dc2626;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 20px;
    display: none;
    align-items: center;
    gap: 10px;
    border-left: 4px solid #dc2626;
}

.error-message.show {
    display: flex;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* RESPONSIVE SPLIT CARD */
@media (max-width: 868px) {
    .login-blue-card {
        flex-direction: column;
        padding: 24px;
        gap: 24px;
        border-radius: 20px;
    }

    .login-left {
        text-align: center;
        padding: 10px 10px;
    }

    .portal-logo-badge {
        margin-bottom: 20px;
    }

    .welcome-title {
        font-size: 2.2rem;
    }

    .welcome-desc {
        max-width: 100%;
    }

    .login-card {
        max-width: 100%;
        padding: 30px 24px;
    }
}

/* ==========================================
   DASHBOARD SCREEN - VIBRANT GREEN GRADIENT TONE
   ========================================== */

#dashboardScreen {
    display: none;
    animation: fadeIn 0.6s ease;
    padding: 40px;
    overflow-y: auto;
    min-height: 100vh;
    background: linear-gradient(135deg, #046c4e 0%, #059669 45%, #10b981 100%);
}

#loginScreen {
    overflow: hidden;
}

@keyframes fadeIn {
    from { 
        opacity: 0;
        transform: translateY(20px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

.dashboard-header {
    background: white;
    border-radius: 24px;
    padding: 36px 40px;
    margin-bottom: 40px;
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.15);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
    border: none;
}

.welcome-text h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 2.2rem;
    font-weight: 800;
    color: #064e3b;
    margin-bottom: 8px;
}

.welcome-text p {
    color: var(--text-muted);
    font-size: 1.05rem;
    font-weight: 500;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-avatar {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #046c4e 0%, #059669 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
    box-shadow: 0 8px 20px rgba(5, 150, 105, 0.3);
}

.user-details h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
}

.user-details p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.btn-logout {
    background: #fee2e2;
    color: var(--danger);
    border: 2px solid transparent;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.btn-logout:hover {
    background: var(--danger);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.3);
}

/* ==========================================
   MENU GRID
   ========================================== */

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    max-width: 1400px;
    margin: 0 auto;
}

.menu-card {
    background: white;
    border-radius: 24px;
    padding: 28px;
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
    color: inherit;
    display: block;
    position: relative;
    overflow: hidden;
    border: none;
}

.menu-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 8px;
    background: linear-gradient(90deg, var(--card-color) 0%, var(--card-color-dark) 100%);
    box-shadow: 0 4px 10px var(--card-color);
}

.menu-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 0%, var(--card-color) 100%);
    opacity: 0;
    transition: opacity 0.4s;
}

.menu-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15);
    border-color: var(--card-color);
}

.menu-card:hover::after {
    opacity: 0.03;
}

.menu-card.presensi {
    --card-color: #10b981;
    --card-color-dark: #059669;
}

.menu-card.surat {
    --card-color: #ef4444;
    --card-color-dark: #dc2626;
}

.menu-card.spmb {
    --card-color: #8b5cf6;
    --card-color-dark: #7c3aed;
}

.menu-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    font-size: 42px;
    transition: all 0.4s;
    position: relative;
    z-index: 1;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.menu-card:hover .menu-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.menu-card.presensi {
    --card-color: #10b981;
    --card-color-dark: #059669;
}

.menu-card.presensi .menu-icon {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #059669;
}

.menu-card.surat {
    --card-color: #ef4444;
    --card-color-dark: #dc2626;
}

.menu-card.surat .menu-icon {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #dc2626;
}

.menu-card.spmb {
    --card-color: #8b5cf6;
    --card-color-dark: #7c3aed;
}

.menu-card.spmb .menu-icon {
    background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
    color: #7c3aed;
}

.menu-card.perpustakaan {
    --card-color: #0ea5e9;
    --card-color-dark: #0284c7;
}

.menu-card.perpustakaan .menu-icon {
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    color: #0284c7;
}

.menu-card.perpustakaan .arrow {
    color: #0284c7;
}

.menu-card.kepegawaian {
    --card-color: #7c3aed;
    --card-color-dark: #5b21b6;
}

.menu-card.kepegawaian .menu-icon {
    background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
    color: #7c3aed;
}

.menu-card.kepegawaian .arrow {
    color: #7c3aed;
}

.menu-card.kesiswaan {
    --card-color: #f59e0b;
    --card-color-dark: #d97706;
}

.menu-card.kesiswaan .menu-icon {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #d97706;
}

.menu-card.kesiswaan .arrow {
    color: #d97706;
}

.menu-card h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 12px;
    color: var(--text-main);
    position: relative;
    z-index: 1;
}

.menu-card p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
}

.menu-card .arrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.3s;
    position: relative;
    z-index: 1;
}

.menu-card.presensi .arrow {
    color: #059669;
}

.menu-card.surat .arrow {
    color: #dc2626;
}

.menu-card.spmb .arrow {
    color: #7c3aed;
}

.menu-card:hover .arrow {
    transform: translateX(8px);
}

.menu-card:hover .arrow i {
    animation: arrowBounce 0.6s ease infinite;
}

@keyframes arrowBounce {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(5px); }
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */

@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        text-align: center;
    }

    .welcome-text h1 {
        font-size: 1.5rem;
    }

    .menu-grid {
        grid-template-columns: 1fr;
    }
    
    .login-card {
        max-width: 100%;
    }
}
