/* Mitraya Energy Admin Panel - Authentication Styles */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Roboto:wght@400;500;700&display=swap');

:root {
    --primary: #1D1D77;
    --primary-hover: #16165e;
    --primary-light: #EEF2FF;
    --accent: #FD7F26;
    --accent-hover: #E56E1A;
    --accent-light: #FFF7ED;
    --dark: #112337;
    --text-main: #1F2937;
    --text-muted: #64748B;
    --border-color: #E2E8F0;
    --border-focus: #1D1D77;
    --bg-page: #F8FAFC;
    --bg-card: #FFFFFF;
    --success: #10B981;
    --success-bg: #ECFDF5;
    --danger: #EF4444;
    --danger-bg: #FEF2F2;
    --warning: #F59E0B;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 25px -5px rgba(29, 29, 119, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
}

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

body.auth-body {
    font-family: 'Outfit', 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-page);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    position: relative;
    overflow-x: hidden;
}

/* Background Subtle Solar Accents */
.auth-body::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    top: -200px;
    right: -150px;
    background: radial-gradient(circle, rgba(253, 127, 38, 0.08) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
}

.auth-body::after {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    bottom: -200px;
    left: -150px;
    background: radial-gradient(circle, rgba(29, 29, 119, 0.07) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
}

/* Auth Container */
.auth-wrapper {
    width: 100%;
    max-width: 460px;
    position: relative;
    z-index: 1;
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 2.5rem 2.25rem;
    position: relative;
    overflow: hidden;
}

/* Top Accent Stripe */
.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
}

/* Auth Header */
.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo-link {
    display: inline-block;
    margin-bottom: 1.25rem;
    transition: transform 0.2s ease;
}

.auth-logo-link:hover {
    transform: scale(1.02);
}

.auth-logo-img {
    height: 52px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

.auth-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
    letter-spacing: -0.02em;
    margin-bottom: 0.35rem;
}

.auth-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Alerts */
.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    line-height: 1.45;
}

.auth-alert-success {
    background-color: var(--success-bg);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #065f46;
}

.auth-alert-danger {
    background-color: var(--danger-bg);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #991b1b;
}

.auth-alert-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 1px;
}

/* Form Groups */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.45rem;
}

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

.input-icon-left {
    position: absolute;
    left: 1rem;
    color: #94A3B8;
    font-size: 0.95rem;
    pointer-events: none;
    transition: color 0.2s ease;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.6rem;
    font-size: 0.925rem;
    font-family: inherit;
    color: var(--text-main);
    background-color: #FAFAFC;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.form-input:focus {
    outline: none;
    background-color: #FFFFFF;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(29, 29, 119, 0.12);
}

.form-input:focus + .input-icon-left,
.input-wrapper:focus-within .input-icon-left {
    color: var(--primary);
}

.form-input.is-invalid {
    border-color: var(--danger);
    background-color: #FFFDFD;
}

.form-input.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

/* Password Toggle Button */
.password-toggle-btn {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    color: #94A3B8;
    cursor: pointer;
    padding: 0.35rem 0.5rem;
    font-size: 0.95rem;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

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

.password-toggle-btn:focus-visible {
    outline: 2px solid var(--primary);
}

/* Error Text */
.form-error {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: var(--danger);
    margin-top: 0.35rem;
    font-weight: 500;
}

/* Remember Me & Forgot Password Row */
.form-options-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.remember-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    cursor: pointer;
    user-select: none;
}

.remember-checkbox-label input[type="checkbox"] {
    accent-color: var(--primary);
    width: 16px;
    height: 16px;
    cursor: pointer;
    border-radius: 4px;
}

.forgot-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

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

/* Submit Button */
.btn-submit {
    width: 100%;
    padding: 0.85rem 1.25rem;
    background-color: var(--primary);
    color: #FFFFFF;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: background-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 12px rgba(29, 29, 119, 0.25);
}

.btn-submit:hover:not(:disabled) {
    background-color: var(--primary-hover);
    box-shadow: 0 6px 16px rgba(29, 29, 119, 0.35);
}

.btn-submit:active:not(:disabled) {
    transform: translateY(1px);
}

.btn-submit:disabled {
    opacity: 0.75;
    cursor: not-allowed;
}

/* Loading Spinner */
.spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    border-top-color: #FFFFFF;
    animation: spin 0.8s linear infinite;
}

.btn-submit.is-loading .spinner {
    display: inline-block;
}

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

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

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

.auth-footer a:hover {
    color: var(--accent);
}

.auth-meta-footer {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.775rem;
    color: #94A3B8;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .auth-card {
        padding: 2rem 1.5rem;
    }

    .form-options-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}
