
:root {
            --primary-color: #4f46e5;
            --primary-dark: #3730a3;
            --secondary-color: #f8fafc;
            --accent-color: #06b6d4;
            --text-dark: #1e293b;
            --text-light: #64748b;
            --border-color: #e2e8f0;
            --success-color: #10b981;
            --error-color: #ef4444;
            --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
            --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
            --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
        }

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

        body {
            font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
            height: 100vh;
            display: flex;
            overflow: hidden;
            margin: 0;
            padding: 0;
        }

        .main-wrapper {
            width: 100%;
            max-width: 1200px;
            margin: 0 auto;
        }

        .login-container {
            display: flex;
            width: 100%;
            height: 100vh;
        }

        .image-section {
            flex: 1;
            background: linear-gradient(135deg, rgba(102, 126, 234, 0.9) 0%, rgba(118, 75, 162, 0.9) 100%), 
                        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 800"><defs><linearGradient id="grad1" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" style="stop-color:%23667eea;stop-opacity:1" /><stop offset="100%" style="stop-color:%23764ba2;stop-opacity:1" /></linearGradient></defs><rect width="1200" height="800" fill="url(%23grad1)"/><circle cx="200" cy="150" r="80" fill="rgba(255,255,255,0.1)"/><circle cx="800" cy="300" r="120" fill="rgba(255,255,255,0.05)"/><circle cx="400" cy="600" r="100" fill="rgba(255,255,255,0.08)"/><circle cx="1000" cy="600" r="90" fill="rgba(255,255,255,0.06)"/><path d="M0,400 Q300,200 600,400 T1200,400 L1200,800 L0,800 Z" fill="rgba(255,255,255,0.03)"/></svg>');
            background-size: cover;
            background-position: center;
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
        }

        .image-content {
            text-align: center;
            color: white;
            z-index: 2;
            padding: 20px;
        }

        .image-content h1 {
            font-size: 2.8rem;
            font-weight: 700;
            margin-bottom: 15px;
            text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
            line-height: 1.2;
        }

        .image-content p {
            font-size: 1.1rem;
            opacity: 0.9;
            margin-bottom: 20px;
            text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
        }

        .login-wrapper {
            flex: 1;
            display: flex;
            justify-content: center;
            align-items: center;
            background: #f8fafc;
            padding: 40px 20px;
            box-sizing: border-box;
            min-height: 100vh;
        }

        .loginbox {
            background: white;
            border-radius: 20px;
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
            overflow: hidden;
            position: relative;
            width: 100%;
            max-width: 420px;
            border: 1px solid #e2e8f0;
            margin: auto;
            transform: translateY(-10px);
            display: flex;
            flex-direction: column;
            align-items: center;
            text-align: center;
        }

        .login-header {
            background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
            padding: 40px 30px 30px;
            text-align: center;
            color: white;
            position: relative;
        }

        .login-header::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="%23ffffff" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>') repeat;
            opacity: 0.1;
        }

        .school-logo {
            width: 80px;
            height: 80px;
            margin: 0 auto 20px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.1);
            display: flex;
            align-items: center;
            justify-content: center;
            backdrop-filter: blur(10px);
            position: relative;
            z-index: 1;
        }

        .school-logo img {
            width: 60px;
            height: 60px;
            object-fit: contain;
        }

        .login-title {
            font-size: 28px;
            font-weight: 700;
            margin-bottom: 8px;
            position: relative;
            z-index: 1;
        }

        .login-subtitle {
            font-size: 16px;
            opacity: 0.9;
            font-weight: 400;
            position: relative;
            z-index: 1;
        }

        .login-body {
            padding: 30px 30px;
            padding-top: 40px;
            width: 100%;
            box-sizing: border-box;
            display: flex;
            flex-direction: column;
            align-items: center;
        }

        .navigation-buttons {
            display: flex;
            gap: 8px;
            margin-bottom: 20px;
            width: 100%;
            justify-content: center;
        }

        .nav-btn {
            flex: 1;
            padding: 8px 12px;
            border: 1px solid var(--border-color);
            background: white;
            color: var(--text-light);
            text-decoration: none;
            border-radius: 8px;
            font-weight: 500;
            text-align: center;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            font-size: 12px;
        }

        .nav-btn:hover {
            border-color: var(--primary-color);
            color: var(--primary-color);
            transform: translateY(-2px);
            box-shadow: var(--shadow-md);
            text-decoration: none;
        }

        .nav-btn.primary {
            background: var(--primary-color);
            border-color: var(--primary-color);
            color: white;
        }

        .nav-btn.primary:hover {
            background: var(--primary-dark);
            border-color: var(--primary-dark);
            color: white;
        }

        .form-group {
            margin-bottom: 15px;
            position: relative;
            width: 100%;
            text-align: left;
        }

        .form-group label {
            display: block;
            margin-bottom: 8px;
            font-weight: 500;
            color: var(--text-dark);
            font-size: 14px;
        }

        .login-danger {
            color: var(--error-color);
        }

        .form-control {
            width: 100%;
            padding: 14px 18px;
            border: 2px solid var(--border-color);
            border-radius: 12px;
            font-size: 15px;
            transition: all 0.3s ease;
            background: var(--secondary-color);
            position: relative;
            min-height: 50px;
        }

        .form-control:focus {
            outline: none;
            border-color: var(--primary-color);
            box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
            background: white;
        }

        .form-group .profile-views {
            position: absolute;
            right: 16px;
            top: 50%;
            transform: translateY(-50%);
            color: var(--text-light);
            cursor: pointer;
            font-size: 18px;
            margin-top: 16px;
            z-index: 10;
        }

        .form-group .profile-views:hover {
            color: var(--primary-color);
        }

        .forgotpass {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 30px;
            flex-wrap: wrap;
            gap: 10px;
            width: 100%;
        }

        .remember-me {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .custom_check {
            position: relative;
            cursor: pointer;
            font-size: 14px;
            color: var(--text-dark);
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .custom_check input[type="checkbox"] {
            width: 0;
            height: 0;
            opacity: 0;
            position: absolute;
        }

        .checkmark {
            width: 20px;
            height: 20px;
            border: 2px solid var(--border-color);
            border-radius: 4px;
            position: relative;
            transition: all 0.3s ease;
            background: white;
        }

        .custom_check input[type="checkbox"]:checked + .checkmark {
            background: var(--primary-color);
            border-color: var(--primary-color);
        }

        .custom_check input[type="checkbox"]:checked + .checkmark::after {
            content: '✓';
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            color: white;
            font-size: 12px;
            font-weight: bold;
        }

        .forgotpass a {
            color: var(--primary-color);
            text-decoration: none;
            font-size: 14px;
            font-weight: 500;
        }

        .forgotpass a:hover {
            text-decoration: underline;
        }

        .btn-login {
            width: 100%;
            padding: 14px;
            background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
            border: none;
            border-radius: 12px;
            color: white;
            font-size: 15px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
            min-height: 50px;
        }

        .btn-login:hover {
            transform: translateY(-2px);
            box-shadow: var(--shadow-lg);
        }

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

        .btn-login:disabled {
            opacity: 0.7;
            cursor: not-allowed;
            transform: none;
        }

        .spinner-border {
            width: 20px;
            height: 20px;
            margin-right: 8px;
        }

        .login-footer {
            text-align: center;
            margin-top: 30px;
            padding-top: 30px;
            border-top: 1px solid var(--border-color);
        }

        .login-footer p {
            color: var(--text-light);
            font-size: 14px;
            margin-bottom: 15px;
        }

        .login-footer a {
            color: var(--primary-color);
            text-decoration: none;
            font-weight: 600;
        }

        .login-footer a:hover {
            text-decoration: underline;
        }

        /* Mobile Responsive */
        @media (max-width: 1024px) {
            .login-container {
                flex-direction: column;
                height: 100vh;
                overflow: hidden;
            }

            .image-section {
                min-height: 35vh;
                max-height: 35vh;
                flex-shrink: 0;
            }

            .image-content {
                padding: 15px;
            }

            .image-content h1 {
                font-size: 2.2rem;
                margin-bottom: 8px;
            }

            .image-content p {
                font-size: 1rem;
                margin-bottom: 0;
            }

            .login-wrapper {
                flex: 1;
                min-height: 65vh;
                max-height: 65vh;
                overflow-y: auto;
                padding: 20px 15px;
                display: flex;
                align-items: center;
                justify-content: center;
            }
        }

        @media (max-width: 768px) {
            .login-container {
                height: 100vh;
                overflow: hidden;
            }

            .image-section {
                min-height: 30vh;
                max-height: 30vh;
                flex-shrink: 0;
            }

            .image-content {
                padding: 15px;
            }

            .image-content h1 {
                font-size: 1.8rem;
                margin-bottom: 6px;
            }

            .image-content p {
                font-size: 0.9rem;
                margin-bottom: 0;
            }

            .login-wrapper {
                flex: 1;
                min-height: 70vh;
                max-height: 70vh;
                overflow-y: auto;
                padding: 15px 10px;
                display: flex;
                align-items: flex-start;
                justify-content: center;
                padding-top: 20px;
            }

            .loginbox {
                border-radius: 16px;
                max-width: 100%;
                width: 100%;
                margin: 0;
            }

            .login-header {
                padding: 30px 20px 25px;
            }

            .school-logo {
                width: 70px;
                height: 70px;
                margin-bottom: 15px;
            }

            .school-logo img {
                width: 50px;
                height: 50px;
            }

            .login-title {
                font-size: 24px;
            }

            .login-subtitle {
                font-size: 14px;
            }

            .login-body {
                width: 100%;
                padding: 25px 20px;
            }

            .navigation-buttons {
                flex-direction: column;
                gap: 8px;
                margin-bottom: 20px;
            }

            .nav-btn {
                padding: 10px 16px;
                font-size: 14px;
            }

            .form-control {
                padding: 12px 16px;
                font-size: 14px;
                min-height: 48px;
            }

            .form-group .profile-views {
                right: 14px;
                margin-top: 14px;
            }

            .forgotpass {
                flex-direction: column;
                align-items: flex-start;
                gap: 15px;
            }

            .btn-login {
                padding: 16px;
                font-size: 16px;
                min-height: 48px;
            }
        }

        @media (max-width: 480px) {
            .login-container {
                height: 100vh;
                overflow: hidden;
            }

            .image-section {
                min-height: 25vh;
                max-height: 25vh;
                flex-shrink: 0;
            }

            .image-content {
                padding: 10px;
            }

            .image-content h1 {
                font-size: 1.5rem;
                margin-bottom: 4px;
            }

            .image-content p {
                font-size: 0.8rem;
                margin-bottom: 0;
            }

            .login-wrapper {
                flex: 1;
                min-height: 75vh;
                max-height: 75vh;
                overflow-y: auto;
                padding: 10px 8px;
                display: flex;
                align-items: flex-start;
                justify-content: center;
                padding-top: 15px;
            }

            .loginbox {
                width: 100%;
                margin: 0;
                border-radius: 12px;
            }

            .login-header {
                padding: 20px 15px 15px;
            }

            .login-body {
                padding: 20px 15px;
            }

            .login-title {
                font-size: 20px;
            }

            .school-logo {
                width: 55px;
                height: 55px;
            }

            .school-logo img {
                width: 40px;
                height: 40px;
            }
        }

        /* Loading spinner */
        #cover-spin {
            position: fixed;
            width: 100%;
            left: 0;
            right: 0;
            top: 0;
            bottom: 0;
            background-color: rgba(255, 255, 255, 0.7);
            z-index: 9999;
            display: none;
        }

        #cover-spin::after {
            content: '';
            display: block;
            position: absolute;
            left: 48%;
            top: 40%;
            width: 40px;
            height: 40px;
            border-style: solid;
            border-color: var(--primary-color);
            border-top-color: transparent;
            border-width: 4px;
            border-radius: 50%;
            animation: spin 1s linear infinite;
        }

        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }
