/**
 * ═════════════════════════════════════════════════════════════════════════════
 * ADMIN AUTH LOGIN PAGE - UI/UX FIXES v8.0
 * ═════════════════════════════════════════════════════════════════════════════
 * 
 * Comprehensive fixes for login page UI/UX issues identified through live testing:
 * - Form labels not bold/distinct
 * - Input fields borders/focus state unclear
 * - Placeholder text hard to read
 * - Error messages unprofessional
 * - Button styling dated
 * - Icon colors muted
 * - Form card container flat
 * - Mobile responsiveness issues
 * 
 * Applied to: admin/index.php (admin auth login page)
 * ═════════════════════════════════════════════════════════════════════════════
 */

/* ─────────────────────────────────────────────────────────────────────────────
   FORM FIELD STYLING - Labels, Inputs, Focus States
   ───────────────────────────────────────────────────────────────────────────── */

.field {
    margin-bottom: 18px !important;
}

.field > label {
    display: block !important;
    font-weight: 600 !important;
    color: #0f1a15 !important;
    margin-bottom: 6px !important;
    font-size: 0.95rem !important;
}

.field > label .text-danger,
.field > label .required {
    color: #dc3545 !important;
    margin-left: 2px !important;
}

/* Input icon wrapper */
.input-icon {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
}

.input-icon > i,
.input-icon > [data-lucide] {
    position: absolute !important;
    left: 12px !important;
    color: #374151 !important;
    width: 18px !important;
    height: 18px !important;
    stroke-width: 2 !important;
    flex-shrink: 0 !important;
}

.input-icon > input,
.input-icon > select,
.input-icon > textarea {
    width: 100% !important;
    padding: 10px 12px 10px 40px !important;
    border: 1.5px solid #d1d5db !important;
    border-radius: 6px !important;
    font-size: 0.95rem !important;
    background-color: #fefffe !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
    color: #0f1a15 !important;
}

.input-icon > input::placeholder,
.input-icon > select::placeholder,
.input-icon > textarea::placeholder {
    color: #9ca3af !important;
    opacity: 0.7 !important;
}

.input-icon > input:focus,
.input-icon > select:focus,
.input-icon > textarea:focus {
    outline: none !important;
    border-color: #1a5f2a !important;
    box-shadow: 0 0 0 3px rgba(26, 95, 42, 0.1) !important;
    background-color: #ffffff !important;
}

.input-icon > input:disabled,
.input-icon > select:disabled,
.input-icon > textarea:disabled {
    background-color: #f3f4f6 !important;
    color: #9ca3af !important;
    opacity: 0.6 !important;
    cursor: not-allowed !important;
}

/* Focus outline for accessibility */
.field > label:focus,
.input-icon > input:focus,
.input-icon > select:focus,
.input-icon > textarea:focus {
    outline: 2px solid #1a5f2a !important;
    outline-offset: 2px !important;
}

/* ─────────────────────────────────────────────────────────────────────────────
   BUTTON STYLING - Submit Button, Hover Effects, Polish
   ───────────────────────────────────────────────────────────────────────────── */

.submit-btn {
    width: 100% !important;
    padding: 12px 16px !important;
    background-color: #1a5f2a !important;
    border: none !important;
    border-radius: 8px !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    font-size: 0.95rem !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    box-shadow: 0 2px 4px rgba(26, 95, 42, 0.15) !important;
}

.submit-btn:hover {
    background-color: #145620 !important;
    box-shadow: 0 4px 8px rgba(26, 95, 42, 0.25) !important;
    transform: translateY(-1px) !important;
}

.submit-btn:active {
    background-color: #0f401c !important;
    transform: translateY(0) !important;
}

.submit-btn:focus {
    outline: 2px solid #1a5f2a !important;
    outline-offset: 2px !important;
}

.submit-btn:disabled {
    background-color: #9ca3af !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
}

.submit-btn > i,
.submit-btn > [data-lucide] {
    width: 18px !important;
    height: 18px !important;
    stroke-width: 2 !important;
    flex-shrink: 0 !important;
}

/* ─────────────────────────────────────────────────────────────────────────────
   ALERT/ERROR STYLING - Professional Error Messages
   ───────────────────────────────────────────────────────────────────────────── */

.alert-error {
    background-color: rgba(220, 53, 69, 0.1) !important;
    border: 1.5px solid rgba(220, 53, 69, 0.3) !important;
    border-radius: 6px !important;
    padding: 12px 14px !important;
    margin-bottom: 16px !important;
    color: #b91c1c !important;
    font-size: 0.9rem !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.alert-error > i,
.alert-error > [data-lucide] {
    width: 18px !important;
    height: 18px !important;
    stroke-width: 2 !important;
    color: #b91c1c !important;
    flex-shrink: 0 !important;
}

/* Success alert variant */
.alert-success,
.alert-info-soft {
    background-color: rgba(22, 163, 74, 0.1) !important;
    border: 1.5px solid rgba(22, 163, 74, 0.3) !important;
    color: #15803d !important;
}

.alert-success > i,
.alert-success > [data-lucide],
.alert-info-soft > i,
.alert-info-soft > [data-lucide] {
    color: #15803d !important;
}

/* ─────────────────────────────────────────────────────────────────────────────
   FORM CARD STYLING - Container, Header, Body, Polish
   ───────────────────────────────────────────────────────────────────────────── */

.auth-card {
    background-color: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
    padding: 0 !important;
    overflow: hidden !important;
}

.auth-card .card-header {
    background-color: #f9fafb !important;
    border-bottom: 1px solid #e5e7eb !important;
    padding: 24px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 12px !important;
}

.auth-card .card-header .card-logo-wrap {
    width: 64px !important;
    height: 64px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 6px !important;
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 14px !important;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06) !important;
    overflow: hidden !important;
}

.auth-card .card-header .card-logo-wrap img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    display: block !important;
}

.auth-card .card-header .card-logo-icon {
    width: 64px !important;
    height: 64px !important;
    background-color: #e8f5e9 !important;
    border-radius: 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.auth-card .card-header .card-logo-icon > i,
.auth-card .card-header .card-logo-icon > [data-lucide] {
    width: 32px !important;
    height: 32px !important;
    color: #1a5f2a !important;
    stroke-width: 2 !important;
}

.auth-card .card-header .card-portal-label {
    font-weight: 600 !important;
    color: #0f1a15 !important;
    font-size: 1rem !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
}

.auth-card .card-header .card-portal-label > i,
.auth-card .card-header .card-portal-label > [data-lucide] {
    width: 18px !important;
    height: 18px !important;
    color: #1a5f2a !important;
}

.auth-card .card-body {
    padding: 28px !important;
}

.auth-card .card-title {
    font-weight: 700 !important;
    font-size: 1.25rem !important;
    color: #0f1a15 !important;
    margin-bottom: 8px !important;
}

.auth-card .card-sub {
    font-size: 0.9rem !important;
    color: #6b7280 !important;
    margin-bottom: 16px !important;
}

/* ─────────────────────────────────────────────────────────────────────────────
   SECURITY NOTE & INFO STYLING
   ───────────────────────────────────────────────────────────────────────────── */

.security-note {
    background-color: rgba(26, 95, 42, 0.05) !important;
    border-left: 3px solid #1a5f2a !important;
    border-radius: 4px !important;
    padding: 12px 14px !important;
    margin-top: 16px !important;
    font-size: 0.85rem !important;
    color: #145620 !important;
    display: flex !important;
    align-items: flex-start !important;
    gap: 8px !important;
}

.security-note > i,
.security-note > [data-lucide] {
    width: 16px !important;
    height: 16px !important;
    color: #1a5f2a !important;
    stroke-width: 2 !important;
    flex-shrink: 0 !important;
    margin-top: 2px !important;
}

.security-note-warning {
    background-color: rgba(217, 119, 6, 0.05) !important;
    border-left-color: #d97706 !important;
    color: #b45309 !important;
}

.security-note-warning > i,
.security-note-warning > [data-lucide] {
    color: #d97706 !important;
}

/* ─────────────────────────────────────────────────────────────────────────────
   COMPACT FIELDS - Less spacing variant
   ───────────────────────────────────────────────────────────────────────────── */

.field-compact {
    margin-bottom: 12px !important;
}

.field-compact .input-icon > input,
.field-compact .input-icon > select,
.field-compact .input-icon > textarea {
    padding: 8px 10px 8px 36px !important;
    font-size: 0.9rem !important;
}

/* ─────────────────────────────────────────────────────────────────────────────
   LINKS & TEXT STYLING
   ───────────────────────────────────────────────────────────────────────────── */

.link-primary-strong {
    color: #1a5f2a !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    transition: color 0.15s ease !important;
}

.link-primary-strong:hover {
    color: #145620 !important;
    text-decoration: underline !important;
}

.link-primary-strong:focus {
    outline: 2px solid #1a5f2a !important;
    outline-offset: 2px !important;
}

.text-secondary {
    color: #6b7280 !important;
}

.text-danger {
    color: #dc3545 !important;
}

.small {
    font-size: 0.85rem !important;
}

.mb-2 {
    margin-bottom: 8px !important;
}

.me-1 {
    margin-right: 4px !important;
}

/* ─────────────────────────────────────────────────────────────────────────────
   PAGE LAYOUT & BACKGROUND
   ───────────────────────────────────────────────────────────────────────────── */

.auth-portal-page {
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%) !important;
    min-height: 100vh !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 16px !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
}

/* Page back button */
.page-back {
    position: fixed !important;
    top: 16px !important;
    left: 16px !important;
    color: #374151 !important;
    text-decoration: none !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    font-size: 0.9rem !important;
    transition: color 0.15s ease !important;
    z-index: 100 !important;
}

.page-back:hover {
    color: #1a5f2a !important;
}

.page-back > i,
.page-back > [data-lucide] {
    width: 18px !important;
    height: 18px !important;
    stroke-width: 2 !important;
}

/* Language toggle */
.auth-lang-toggle {
    position: fixed !important;
    top: 16px !important;
    right: 16px !important;
    background-color: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 6px !important;
    padding: 8px 12px !important;
    color: #374151 !important;
    text-decoration: none !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    transition: all 0.15s ease !important;
    z-index: 100 !important;
}

.auth-lang-toggle:hover {
    background-color: #f9fafb !important;
    color: #1a5f2a !important;
    border-color: #1a5f2a !important;
}

.auth-lang-toggle > i,
.auth-lang-toggle > [data-lucide] {
    width: 16px !important;
    height: 16px !important;
    stroke-width: 2 !important;
}

/* ─────────────────────────────────────────────────────────────────────────────
   MOBILE RESPONSIVE - Touch targets, font sizes, layout
   ───────────────────────────────────────────────────────────────────────────── */

@media (max-width: 480px) {
    .auth-portal-page {
        padding: 12px !important;
    }

    .auth-card {
        border-radius: 8px !important;
    }

    .auth-card .card-header {
        padding: 20px 16px !important;
    }

    .auth-card .card-body {
        padding: 20px 16px !important;
    }

    .field {
        margin-bottom: 16px !important;
    }

    .field > label {
        font-size: 0.9rem !important;
    }

    .input-icon > input,
    .input-icon > select,
    .input-icon > textarea {
        font-size: 16px !important; /* Prevent iOS zoom */
        min-height: 44px !important;
        padding: 10px 12px 10px 40px !important;
    }

    .submit-btn {
        min-height: 44px !important;
        font-size: 1rem !important;
        padding: 10px 16px !important;
    }

    .page-back {
        top: 12px !important;
        left: 12px !important;
        font-size: 0.85rem !important;
    }

    .auth-lang-toggle {
        top: 12px !important;
        right: 12px !important;
        font-size: 0.8rem !important;
        padding: 6px 10px !important;
    }

    .alert-error {
        font-size: 0.85rem !important;
        padding: 10px 12px !important;
    }
}

@media (max-width: 768px) {
    .auth-card {
        max-width: 450px !important;
    }
}

/* Desktop - wider card */
@media (min-width: 769px) {
    .auth-card {
        max-width: 450px !important;
        width: 100% !important;
    }
}

/* ─────────────────────────────────────────────────────────────────────────────
   2FA SPECIFIC STYLING
   ───────────────────────────────────────────────────────────────────────────── */

.license-renew-on-login {
    background-color: rgba(217, 119, 6, 0.05) !important;
    border: 1px solid rgba(217, 119, 6, 0.2) !important;
    border-radius: 6px !important;
    padding: 16px !important;
    margin-bottom: 16px !important;
}

.license-renew-on-login h4 {
    font-weight: 600 !important;
    color: #b45309 !important;
    margin-bottom: 12px !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.license-renew-on-login h4 > i,
.license-renew-on-login h4 > [data-lucide] {
    width: 18px !important;
    height: 18px !important;
    color: #d97706 !important;
}

.mini-login-link {
    color: #d97706 !important;
    text-decoration: none !important;
    margin-left: auto !important;
}

.license-renew-success {
    background-color: rgba(22, 163, 74, 0.1) !important;
    border: 1px solid rgba(22, 163, 74, 0.3) !important;
    color: #15803d !important;
    padding: 12px 14px !important;
    border-radius: 4px !important;
    margin: 12px 0 !important;
    font-size: 0.9rem !important;
}

/* ═════════════════════════════════════════════════════════════════════════════
   END OF ADMIN AUTH LOGIN FIXES v8.0
   ═════════════════════════════════════════════════════════════════════════════ */
