/* ============================================
   GClient API - Login Page Styles (100% Screen Fit - NO SCROLL)
   Mobile Responsive with Dark Mode Support
   ============================================ */

/* CSS Variables for Theming */
:root {
    /* Light Mode Colors */
    --bg-primary: #f8f9fa;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --border-color: #e2e8f0;
    --input-bg: #ffffff;
    --input-border: #cbd5e0;
    --input-focus: #4299e1;
    
    /* Brand Colors */
    --brand-primary: #5a67d8;
    --brand-secondary: #ed64a6;
    --gradient-start: #5a67d8;
    --gradient-end: #ed64a6;
    
    /* Feature Colors */
    --feature-bg: #f7fafc;
    --feature-icon-bg: #ebf4ff;
    --feature-icon-color: #4299e1;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.15);
    
    /* Transitions */
    --transition-base: all 0.3s ease;
    --transition-fast: all 0.15s ease;
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --input-bg: #334155;
    --input-border: #475569;
    --input-focus: #60a5fa;
    
    --feature-bg: #1e293b;
    --feature-icon-bg: #1e40af;
    --feature-icon-color: #60a5fa;
    
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.6);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    transition: var(--transition-base);
}

/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    top: 15px;
    right: 15px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    font-size: 18px;
    cursor: pointer;
    z-index: 1000;
    transition: var(--transition-base);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    transform: scale(1.1) rotate(20deg);
    box-shadow: var(--shadow-lg);
}

/* Main Container - 100% Height NO SCROLL */
.login-container {
    display: flex;
    height: 100vh;
    position: relative;
    overflow: hidden;
}

/* Mobile Logo - Hidden on Desktop */
.mobile-logo {
    display: none;
}

/* ============================================
   INFO SECTION (Left Side) - NO SCROLL
   ============================================ */
.info-section {
    flex: 1;
    background: linear-gradient(135deg, #e0e7ff 0%, #fce7f3 100%);
    padding: 20px 30px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .info-section {
    background: linear-gradient(135deg, #1e3a8a 0%, #831843 100%);
}

.info-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: pulse 8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.info-content {
    max-width: 600px;
    width: 100%;
    position: relative;
    z-index: 1;
    margin: 0 auto;
}

/* Brand Header */
.brand-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.logo-circle {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: white;
}

.logo-circle img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand-text h1 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.brand-text .highlight {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand-text p {
    font-size: 12px;
    color: var(--text-muted);
}

/* Main Title */
.main-title {
    margin-bottom: 10px;
}

.main-title h2 {
    font-size: 30px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
}

.gradient-text {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 15px;
    line-height: 1.5;
}

/* Features - Compact */
.features {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.feature-item {
    display: flex;
    gap: 12px;
    padding: 10px;
    background: var(--feature-bg);
    border-radius: 8px;
    transition: var(--transition-base);
}

.feature-item:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 8px;
    background: var(--feature-icon-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--feature-icon-color);
    font-size: 16px;
}

.feature-text h3 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 3px;
}

.feature-text p {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Stats - Compact */
.stats {
    display: flex;
    gap: 25px;
    padding: 15px 0;
    border-top: 2px solid var(--border-color);
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 15px;
}

.stat-item {
    text-align: center;
    flex: 1;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 3px;
}

.stat-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 1px;
}

/* Quote - Compact */
.quote {
    display: flex;
    gap: 10px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    border-left: 3px solid var(--brand-primary);
}

[data-theme="dark"] .quote {
    background: rgba(0, 0, 0, 0.2);
}

.quote i {
    color: var(--brand-primary);
    font-size: 16px;
    flex-shrink: 0;
}

.quote p {
    font-size: 12px;
    font-style: italic;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ============================================
   FORM SECTION (Right Side) - Fixed Width
   ============================================ */
.form-section {
    flex: 0 0 420px;
    background: var(--bg-card);
    padding: 30px 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-xl);
    position: relative;
    overflow: hidden;
}

.form-wrapper {
    width: 100%;
    max-width: 360px;
}

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

.form-header h2 {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.form-header p {
    font-size: 13px;
    color: var(--text-muted);
}

/* Alert Messages */
.alert-message {
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 18px;
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: slideIn 0.3s ease;
}

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

.alert-message.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.alert-message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

.alert-message.warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #f59e0b;
}

[data-theme="dark"] .alert-message.success {
    background: #064e3b;
    color: #6ee7b7;
}

[data-theme="dark"] .alert-message.error {
    background: #7f1d1d;
    color: #fca5a5;
}

[data-theme="dark"] .alert-message.warning {
    background: #78350f;
    color: #fbbf24;
}

/* Form */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
}

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

.input-icon {
    position: absolute;
    left: 12px;
    color: var(--text-muted);
    font-size: 14px;
    pointer-events: none;
}

.input-wrapper input {
    width: 100%;
    padding: 11px 38px 11px 38px;
    border: 2px solid var(--input-border);
    border-radius: 8px;
    font-size: 13px;
    background: var(--input-bg);
    color: var(--text-primary);
    transition: var(--transition-base);
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--input-focus);
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

.input-wrapper input::placeholder {
    color: var(--text-muted);
}

.toggle-password {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 14px;
    transition: var(--transition-fast);
    padding: 4px;
}

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

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    margin-top: -4px;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    color: var(--text-secondary);
    user-select: none;
}

.checkbox-container input[type="checkbox"] {
    width: 15px;
    height: 15px;
    cursor: pointer;
    accent-color: var(--brand-primary);
}

.forgot-link {
    color: var(--brand-primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-fast);
}

.forgot-link:hover {
    color: var(--brand-secondary);
    text-decoration: underline;
}

/* Submit Button */
.btn-submit {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition-base);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.btn-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn-submit:hover::before {
    left: 100%;
}

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

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

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-icon {
    transition: var(--transition-fast);
}

.btn-submit:hover .btn-icon {
    transform: translateX(5px);
}

/* Divider */
.divider {
    position: relative;
    text-align: center;
    margin: 6px 0;
}

.divider span {
    background: var(--bg-card);
    padding: 0 10px;
    color: var(--text-muted);
    font-size: 11px;
    position: relative;
    z-index: 1;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border-color);
}

/* Contact Admin */
.contact-admin {
    text-align: center;
}

.contact-admin p {
    font-size: 12px;
    color: var(--text-secondary);
}

.contact-admin a {
    color: var(--brand-primary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-fast);
}

.contact-admin a:hover {
    color: var(--brand-secondary);
    text-decoration: underline;
}

/* Form Footer */
.form-footer {
    margin-top: 20px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.status-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10b981;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
    }
}

.status-text {
    font-size: 11px;
    color: var(--text-muted);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.loading-overlay.active {
    display: flex;
}

.loading-spinner {
    text-align: center;
    color: white;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-spinner p {
    font-size: 15px;
    font-weight: 500;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablets and Below (1024px) */
@media (max-width: 1024px) {
    .info-section {
        padding: 20px 25px;
    }
    
    .main-title h2 {
        font-size: 28px;
    }
    
    .form-section {
        flex: 0 0 400px;
        padding: 28px 25px;
    }
}

/* Mobile Landscape and Below (768px) - HIDE INFO SECTION */
@media (max-width: 768px) {
    html, body {
        overflow: auto;
    }
    
    .theme-toggle {
        top: 12px;
        right: 12px;
        width: 42px;
        height: 42px;
        font-size: 16px;
    }
    
    .login-container {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    }
    
    /* HIDE INFO SECTION ON MOBILE */
    .info-section {
        display: none;
    }
    
    /* SHOW MOBILE LOGO */
    .mobile-logo {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 40px 20px 20px;
        gap: 15px;
    }
    
    .mobile-logo .logo-circle {
        width: 70px;
        height: 70px;
        border-radius: 18px;
        /* background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end)); */
        background-color: white;
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        font-size: 32px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
        animation: logoFloat 3s ease-in-out infinite;
    }
    
    @keyframes logoFloat {
        0%, 100% { transform: translateY(0px); }
        50% { transform: translateY(-10px); }
    }
    
    .mobile-logo .brand-text {
        text-align: center;
    }
    
    .mobile-logo .brand-text h1 {
        font-size: 28px;
        font-weight: 700;
        color: white;
        margin-bottom: 5px;
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    }
    
    .mobile-logo .brand-text .highlight {
        background: linear-gradient(135deg, #fbbf24, #f59e0b);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }
    
    .mobile-logo .brand-text p {
        font-size: 14px;
        color: rgba(255, 255, 255, 0.9);
        font-weight: 500;
    }
    
    /* FORM SECTION FULL WIDTH ON MOBILE */
    .form-section {
        flex: 1;
        width: 100%;
        max-width: 450px;
        margin: 0 auto 40px;
        padding: 35px 25px;
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.2);
    }
    
    .form-header h2 {
        font-size: 26px;
    }
}

/* Mobile Portrait (480px) */
@media (max-width: 480px) {
    .theme-toggle {
        width: 38px;
        height: 38px;
        font-size: 15px;
        top: 15px;
        right: 15px;
    }
    
    .mobile-logo {
        padding: 30px 20px 15px;
    }
    
    .mobile-logo .logo-circle {
        width: 60px;
        height: 60px;
        font-size: 28px;
    }
    
    .mobile-logo .brand-text h1 {
        font-size: 24px;
    }
    
    .mobile-logo .brand-text p {
        font-size: 13px;
    }
    
    .form-section {
        padding: 30px 20px;
        margin-bottom: 20px;
    }
    
    .form-wrapper {
        max-width: 100%;
    }
    
    .form-header h2 {
        font-size: 24px;
    }
    
    .form-header p {
        font-size: 13px;
    }
    
    .login-form {
        gap: 18px;
    }
    
    .input-wrapper input {
        padding: 11px 38px 11px 38px;
        font-size: 14px;
    }
    
    .btn-submit {
        padding: 13px;
        font-size: 14px;
    }
    
    .form-options {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }
}

/* Extra Small Mobile (360px) */
@media (max-width: 360px) {
    .mobile-logo .logo-circle {
        width: 55px;
        height: 55px;
        font-size: 26px;
    }
    
    .mobile-logo .brand-text h1 {
        font-size: 22px;
    }
    
    .form-section {
        padding: 25px 15px;
    }
    
    .form-header h2 {
        font-size: 22px;
    }
}

/* Extra Large Screens */
@media (min-width: 1600px) {
    .info-content {
        max-width: 700px;
    }
    
    .main-title h2 {
        font-size: 36px;
    }
    
    .subtitle {
        font-size: 16px;
    }
    
    .feature-text h3 {
        font-size: 15px;
    }
    
    .feature-text p {
        font-size: 14px;
    }
    
    .form-section {
        flex: 0 0 480px;
    }
}

/* Print Styles */
@media print {
    .theme-toggle,
    .info-section,
    .mobile-logo,
    .loading-overlay {
        display: none !important;
    }
    
    .form-section {
        box-shadow: none;
        width: 100%;
    }
}
