/* ========================================
   AUTH PAGES - DARK GRAY UI
   Login, Forgot Password, Reset Password
   ======================================== */

.auth-body {
  margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000000;
    overflow-x: hidden;
}

/* ========================================
   MAIN CONTAINER
   ======================================== */
.auth-container {
    display: grid;
    grid-template-columns: 45% 55%;
    width: 100%;
    max-width: 1600px;
    min-height: 100vh;
    background: var(--bg-primary);
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.5);
}

/* ========================================
   LEFT SIDE - BRANDING
   ======================================== */
.auth-branding {
    background: #1a1e28;
    padding: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.auth-branding::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(107, 114, 128, 0.1) 0%, transparent 70%);
    animation: pulse 8s ease-in-out infinite;
}

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

.branding-content {
    position: relative;
    z-index: 1;
    max-width: 500px;
}

.brand-logo {
    width: 80px;
    height: 80px;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-light);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 32px;
    color: var(--accent-light);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.branding-content h1 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--text-primary), var(--accent-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.branding-content p {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.6;
}

/* ========================================
   FEATURES LIST
   ======================================== */
.features-list {
    margin-bottom: 40px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: rgba(31, 36, 48, 0.5);
    border: 1px solid rgba(61, 67, 80, 0.3);
    border-radius: 10px;
    transition: all 0.2s ease;
}

.feature-item:hover {
    background: rgba(42, 47, 61, 0.7);
    border-color: rgba(61, 67, 80, 0.5);
    transform: translateX(4px);
}

.feature-item svg {
    flex-shrink: 0;
    color: var(--accent-light);
}

.feature-item span {
    font-size: 14px;
    color: var(--text-primary);
}

/* ========================================
   HELP BOX
   ======================================== */
.help-box {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 12px;
}

.help-box svg {
    flex-shrink: 0;
    color: var(--accent-purple);
}

.help-box strong {
    display: block;
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.help-box p {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
}

/* ========================================
   RIGHT SIDE - FORM
   ======================================== */
.auth-form-wrapper {
    background: #0a0d14;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
}

.auth-form-container {
    width: 100%;
    max-width: 440px;
}

/* ========================================
   AUTH HEADER
   ======================================== */
.auth-header {
    text-align: center;
    margin-bottom: 40px;
}

.auth-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.auth-header p {
    font-size: 15px;
    color: var(--text-secondary);
}

.icon-header {
      width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-light);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-light);
}

/* ========================================
   FORM ELEMENTS
   ======================================== */
.auth-form {
    width: 100%;
}

.form-group {
    margin-bottom: 24px;
}

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

.input-with-icon,
.password-input {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon-left {
    position: absolute;
    left: 16px;
    color: var(--text-tertiary);
    pointer-events: none;
    z-index: 1;
}

.input-status-icon {
    position: absolute;
    right: 16px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.5px;
    opacity: 0;
    transform: scale(0.96);
    transition: opacity 0.15s ease, transform 0.15s ease;
    pointer-events: none;
    z-index: 1;
}

.input-status-icon.is-ok {
    color: #10b981;
    opacity: 1;
    transform: scale(1);
}

.input-status-icon.is-bad {
    color: #ef4444;
    opacity: 1;
    transform: scale(1);
}

.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="text"] {
    width: 100%;
    padding: 14px 16px 14px 48px;
    background: #1f2430;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 15px;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.input-with-icon input {
    padding-right: 52px;
}

.auth-form input[aria-invalid="true"] {
    border-color: #ef4444;
}

.password-input input {
    padding-right: 52px;
}

.auth-form input::placeholder {
    color: var(--text-tertiary);
}

.auth-form input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.toggle-password {
    position: absolute;
    right: 16px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: var(--text-tertiary);
    transition: color 0.2s;
    padding: 4px;
}

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

.form-hint {
    display: block;
    font-size: 13px;
    color: var(--text-tertiary);
    margin-top: 6px;
}

.form-hint.has-icon {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.form-hint.has-icon .hint-ico {
    flex: 0 0 auto;
    margin-top: 1px;
}

.form-hint.has-icon .hint-text {
    flex: 1 1 auto;
    min-width: 0;
}

.form-hint.error {
    color: #ef4444;
}

.form-hint.success {
    color: #10b981;
}

/* ========================================
   FORM OPTIONS
   ======================================== */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checkbox-input {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-blue);
}

.checkbox-wrapper span {
    font-size: 14px;
    color: var(--text-secondary);
}

.forgot-link {
    font-size: 14px;
    color: var(--accent-light);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.forgot-link:hover {
    color: var(--text-primary);
}

/* ========================================
   BUTTONS
   ======================================== */
.btn-auth-primary {
     display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 14px 32px;
    background: #1f2430;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-auth-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.3);
}

.btn-auth-primary:active:not(:disabled) {
    transform: translateY(0);
}

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

.btn-auth-primary.is-loading {
    cursor: progress;
}

.btn-auth-primary.is-loading svg {
    opacity: 0;
}

.btn-auth-primary.is-loading::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-top-color: var(--accent-light);
    animation: btnSpin 0.8s linear infinite;
}

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

.btn-access-code {
    width: 100%;
    padding: 14px 24px;
    background: #151922;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-access-code:hover {
    background: var(--bg-hover);
    border-color: var(--border-light);
}

.btn-access-code svg {
    flex-shrink: 0;
    color: var(--accent-light);
}

/* ========================================
   DIVIDER
   ======================================== */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
    color: var(--text-tertiary);
    font-size: 14px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.auth-divider span {
    padding: 0 16px;
}

/* ========================================
   FOOTER
   ======================================== */
.auth-footer {
    text-align: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.auth-footer p {
    font-size: 14px;
    color: var(--text-secondary);
}

.signup-link {
    color: var(--accent-light);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.signup-link:hover {
    color: var(--text-primary);
}

/* ========================================
   BACK BUTTON
   ======================================== */
.back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    margin-bottom: 32px;
}

.back-button:hover {
    color: var(--text-primary);
}

/* ========================================
   ACCESS CODE INPUT
   ======================================== */
.code-input-group {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    margin-top: 12px;
}

.auth-form input.code-input {
    width: 100%;
    height: 64px;
    padding: 0;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    transition: all 0.2s ease;
    caret-color: var(--accent-gray);
}

.code-input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.code-input.filled {
    border-color: var(--accent-purple);
    background: rgba(139, 92, 246, 0.1);
}

.code-input.error {
    border-color: #ef4444;
    animation: shake 0.3s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

/* ========================================
   TIMER
   ======================================== */
.code-timer {
       display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.code-timer.expired {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
}

.code-timer strong {
    color: var(--text-primary);
}

/* ========================================
   RESEND CODE
   ======================================== */
.resend-code {
    text-align: center;
    margin-top: 20px;
}

.resend-code p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.btn-resend {
    background: none;
    border: none;
    color: var(--accent-light);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s;
}

.btn-resend:hover:not(:disabled) {
    color: var(--text-primary);
}

.btn-resend:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ========================================
   SECURITY TIPS
   ======================================== */
.security-tips {
    margin-top: 40px;
    padding: 24px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 12px;
}

.security-tips h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.security-tips ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.security-tips li {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
}

.security-tips li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #10b981;
}

/* ========================================
   INFO ALERT
   ======================================== */
.info-alert {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 10px;
}

.info-alert.error {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.22);
}

.info-alert.success {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.24);
}

.info-alert svg {
    flex-shrink: 0;
    color: #3b82f6;
}

.info-alert.error svg {
    color: #ef4444;
}

.info-alert.success svg {
    color: #10b981;
}

.info-alert strong {
    display: block;
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.info-alert p {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
}

/* ========================================
   PASSWORD STRENGTH INDICATOR
   ======================================== */
.password-strength {
    margin-top: -16px;
    margin-bottom: 8px;
}

.strength-bars {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-bottom: 8px;
}

.strength-bar {
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    transition: background 0.2s;
}

.strength-text {
    font-size: 13px;
    color: var(--text-tertiary);
}

.password-strength.weak .strength-bar:nth-child(-n+1) { background: #ef4444; }
.password-strength.fair .strength-bar:nth-child(-n+2) { background: #f59e0b; }
.password-strength.good .strength-bar:nth-child(-n+3) { background: #3b82f6; }
.password-strength.strong .strength-bar:nth-child(-n+4) { background: #10b981; }

.password-strength.weak .strength-text { color: #ef4444; }
.password-strength.fair .strength-text { color: #f59e0b; }
.password-strength.good .strength-text { color: #3b82f6; }
.password-strength.strong .strength-text { color: #10b981; }

/* ========================================
   PASSWORD REQUIREMENTS
   ======================================== */
.password-requirements {
    margin: 20px 0;
    padding: 20px;
    background: rgba(31, 36, 48, 0.4);
    border: 1px solid rgba(61, 67, 80, 0.3);
    border-radius: 12px;
}

.requirements-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.password-requirements ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.password-requirements li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    transition: color 0.2s;
}

.password-requirements li:last-child {
    margin-bottom: 0;
}

.password-requirements li svg {
    color: var(--text-tertiary);
    transition: color 0.2s;
}

.password-requirements li.valid {
    color: #10b981;
}

.password-requirements li.valid svg {
    color: #10b981;
}

/* ========================================
   MODAL
   ======================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.28);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    padding: 20px;
}

.modal-content {
    width: 100%;
    max-width: 420px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.modal-icon {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.modal-icon.success {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.24);
    color: #10b981;
}

.modal-content h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.modal-content p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 22px;
    line-height: 1.6;
}

.btn-auth-neutral {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 14px 32px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-decoration: none;
}

.btn-auth-neutral:hover:not(:disabled) {
    background: var(--bg-hover);
    border-color: var(--border-light);
    transform: translateY(-1px);
}

.btn-auth-neutral:active:not(:disabled) {
    transform: translateY(0);
}

.btn-auth-neutral:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.terms-link {
    color: var(--accent-light);
    text-decoration: none;
    font-weight: 600;
}

.terms-link:hover {
    color: var(--text-primary);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 980px) {
    .auth-container {
        grid-template-columns: 1fr;
    }
    .auth-branding {
        display: none;
    }
    .auth-form-wrapper {
        padding: 48px 20px;
    }
}
