/* 
 * Common Authentication & Account Management Styles
 * Shared CSS for all authentication pages and user settings
 */

:root {
    /* Main Layout Color Variables - Matching main.handlebars design system */
    --primary-color-ml: #0d9488;
    --primary-light-color-ml-ml: #ccfbf1;
    --primary-light-color-ml: #ccfbf1;
    --primary-dark-color-ml: #0f766e;
    --secondary-color-ml: #2c7a7b;
    --dark-color-ml: #1a202c;
    --light-color-ml: #f7fafc;
    --gray-color-ml: #718096;
    --gray-light-color-ml: #e2e8f0;
    --danger-color-ml: #e53e3e;
    --success-color-ml: #38a169;
    --warning-color-ml: #dd6b20;
    --info-color-ml: #2b6cb0;
    --border-radius-r-ml: 0.5rem;
    --border-radius-sm-ml: 0.25rem;
    --border-radius-lg-ml: 0.75rem;
    --shadow-s-ml: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md-ml: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg-ml: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition-base-ml: all 0.2s ease;
    --transition-fast-ml: all 0.15s ease;
    
    /* Primary Colors - Updated to match dashboard */
    --primary: var(--primary-color-ml);
    --primary-dark: var(--primary-dark-color-ml);
    --primary-light: var(--primary-light-color-ml);
    --secondary: var(--secondary-color-ml);
    --secondary-light: rgba(44, 122, 123, 0.1);
    
    /* Theme Colors - Updated to match dashboard */
    --dark: var(--dark-color-ml);
    --dark-light: #2d3748;
    --darker: #171923;
    --light: var(--light-color-ml);
    --lighter: #ffffff;
    --gray: var(--gray-color-ml);
    --gray-dark: #4a5568;
    
    /* Status Colors */
    --success: var(--success-color-ml);
    --warning: var(--warning-color-ml);
    --danger: var(--danger-color-ml);
    
    /* Gradients */
    --gradient: linear-gradient(135deg, var(--primary), var(--primary-dark));
    --glass: rgba(45, 55, 72, 0.5);
    --glass-border: var(--gray-light-color-ml);
    
    /* Transitions */
    --transition: var(--transition-base-ml);
    
    /* Shadows */
    --shadow-sm: var(--shadow-s-ml);
    --shadow-md: var(--shadow-md-ml);
    --shadow-lg: var(--shadow-lg-ml);
    
    /* Border Radius */
    --radius-sm: var(--border-radius-sm-ml);
    --radius-md: var(--border-radius-r-ml);
    --radius-lg: var(--border-radius-lg-ml);
    --radius-xl: 1rem;

    /* Font Family */
    --font-family: "Inter", -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Global Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-family);
}

/* Body Styles - Updated to match dashboard background */
body {
    background: linear-gradient(135deg, #f5f7fb 0%, #f0f4f8 100%);
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-size: 14px;
}

/* Header Styles - Updated to match dashboard header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition);
    background: white;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--gray-light-color-ml);
    box-shadow: var(--shadow-sm);
}

nav {
    padding: 1rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo Styles - Updated to match dashboard logo */
.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.logo img {
    height: 30px;
    width: auto;
    transition: var(--transition);
}

.logo:hover img {
    transform: scale(1.05);
}

.logo-text {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
}

/* Container Styles - Updated to match dashboard design */
.login-container,
.verification-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 5% 80px;
    position: relative;
    overflow: hidden;
    background: transparent;
}

/* Box Styles - Updated to match dashboard cards */
.login-box,
.verification-box,
.twofa-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem;
    width: 100%;
    max-width: 450px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-light-color-ml);
    position: relative;
    z-index: 2;
    transition: var(--transition);
}

.login-box:hover,
.verification-box:hover,
.twofa-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

/* Title Styles - Updated to match dashboard */
.login-title,
.verification-title {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.5rem;
    font-weight: 700;
    position: relative;
    color: var(--dark);
}

.login-title::after,
.verification-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--gradient);
    border-radius: 2px;
}

/* Form Styles - Updated to match dashboard form inputs */
.form-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: white;
    border: 2px solid var(--gray-light-color-ml);
    border-radius: var(--radius-md);
    color: var(--dark);
    font-size: 1rem;
    transition: var(--transition);
    font-family: var(--font-family);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}

.form-input:valid:not(:placeholder-shown) {
    border-color: var(--success);
}

.form-input:invalid:not(:placeholder-shown) {
    border-color: var(--danger);
}

.form-label {
    position: absolute;
    top: 0.75rem;
    left: 1rem;
    color: var(--gray);
    transition: var(--transition);
    pointer-events: none;
    background: white;
    padding: 0 0.25rem;
    font-size: 1rem;
}

.form-input:focus + .form-label,
.form-input:not(:placeholder-shown) + .form-label {
    top: -0.5rem;
    left: 0.75rem;
    font-size: 0.875rem;
    color: var(--primary);
}

/* Icon Styles - Updated for clean dashboard look */
.input-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
}

.input-icon:hover {
    color: var(--primary);
}

/* Button Styles - Updated to match dashboard buttons */
.btn-login,
.btn-verify,
.buttons,
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 1.5rem;
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    background: var(--gradient);
    color: white;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    text-align: center;
    margin-bottom: 1rem;
    font-family: var(--font-family);
}

.btn-login:hover,
.btn-verify:hover,
.buttons:hover,
.btn:hover {
    background: transparent;
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-login:disabled,
.btn-verify:disabled {
    background: var(--gray-light-color-ml);
    border-color: var(--gray-light-color-ml);
    color: var(--gray);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Button Variants */
.btn-save {
    background: var(--success);
    border-color: var(--success);
}

.btn-save:hover {
    background: #2f855a;
    border-color: #2f855a;
}

.btn-danger {
    background: var(--danger);
    border-color: var(--danger);
}

.btn-danger:hover {
    background: #c53030;
    border-color: #c53030;
}

.btn-resend {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}

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

.btn-resend:disabled {
    background: transparent;
    color: var(--gray-dark);
    border-color: var(--gray-dark);
    cursor: not-allowed;
}

/* Link Styles - Updated to match dashboard links */
.login-links,
.verification-links {
    text-align: center;
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.login-link,
.verification-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    font-size: 0.9rem;
}

.login-link:hover,
.verification-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Special Input Styles - Updated OTP inputs to match dashboard */
.otp-input-container {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.otp-input {
    width: 50px;
    height: 50px;
    text-align: center;
    font-size: 1.25rem;
    font-weight: 600;
    background: white;
    border: 2px solid var(--gray-light-color-ml);
    border-radius: var(--radius-md);
    color: var(--dark);
    transition: var(--transition);
    font-family: var(--font-family);
}

.otp-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.otp-input.filled {
    border-color: var(--success);
    background: rgba(76, 201, 240, 0.1);
}

/* Remember Me Styles */
.remember-me {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 1rem 0;
}

.remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border: 2px solid var(--glass-border);
    border-radius: 4px;
    background: var(--darker);
    cursor: pointer;
    position: relative;
}

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

.remember-me input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: -2px;
    left: 2px;
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.remember-me label {
    color: var(--gray);
    cursor: pointer;
    transition: var(--transition);
}

.remember-me label:hover {
    color: var(--light);
}

/* Status Displays */
.twofastatus {
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    text-align: center;
    font-weight: 700;
    font-size: 1.1rem;
    margin: 1.5rem 0;
    box-shadow: var(--shadow-sm);
    border: 2px solid;
    position: relative;
    overflow: hidden;
}

.twofastatus::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.twofastatus.true {
    background: linear-gradient(135deg, var(--success) 0%, #2f855a 100%);
    color: white;
    border-color: var(--success);
}

.twofastatus.true::before {
    background: linear-gradient(90deg, #2f855a, var(--success));
}

.twofastatus.false {
    background: linear-gradient(135deg, var(--danger) 0%, #c53030 100%);
    color: white;
    border-color: var(--danger);
}

.twofastatus.false::before {
    background: linear-gradient(90deg, #c53030, var(--danger));
}

/* Message Styles - Updated to match dashboard */
.error,
.message-container {
    background: white;
    color: var(--danger);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    text-align: center;
    margin: 1rem 0;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--danger);
    border-left: 4px solid var(--danger);
}

.message-container.success {
    color: var(--success);
    border-color: var(--success);
    border-left-color: var(--success);
}

.message-container.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Info Text - Updated for better readability */
.info-text,
.verification-subtitle {
    text-align: center;
    color: var(--gray);
    margin: 1rem 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Email Display - Updated to match dashboard cards */
.email-display {
    background: var(--primary-light-color-ml);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    text-align: center;
    margin-bottom: 2rem;
    border: 1px solid var(--primary);
    border-left: 4px solid var(--primary);
}

.email-display strong {
    color: var(--primary-dark);
    font-weight: 600;
}

/* Card Styles */
.card-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
}

.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.card-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.card-body {
    padding: 2rem;
}

/* Section Headers */
.section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 2rem 0 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--glass-border);
}

.section-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--light);
    margin: 0;
}

/* Action Grid */
.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

/* AI Elements - Hidden for clean dashboard look */
.ai-element {
    display: none;
}

/* Animations */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* Animations - Updated for cleaner dashboard feel */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Responsive Design */
@media (max-width: 768px) {
    .card-body {
        padding: 1.5rem;
    }

    .card-title {
        font-size: 1.25rem;
    }

    .action-grid {
        grid-template-columns: 1fr;
    }

    .login-container,
    .verification-container {
        padding: 100px 5% 60px;
    }

    .login-box,
    .verification-box,
    .twofa-card {
        padding: 1.5rem;
    }

    .otp-input-container {
        gap: 8px;
    }

    .otp-input {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
}

@media (max-width: 576px) {
    .card-body {
        padding: 1rem;
    }

    .card-header {
        padding: 1rem;
    }

    .login-box,
    .verification-box,
    .twofa-card {
        padding: 1rem;
    }

    .login-title,
    .verification-title {
        font-size: 1.5rem;
    }

    .otp-input {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .ai-element {
        font-size: 1.5rem;
    }
}

/* Legacy Styles for Backward Compatibility */
.info-icon {
    position: absolute;
    top: 70%;
    right: 10px;
    transform: translateY(-50%);
    cursor: pointer;
}

.info-icon i {
    font-size: 1.125rem;
    line-height: 1;
    color: var(--gray);
    transition: var(--transition);
    margin-bottom: 1.25rem;
}

.info-icon i:hover {
    color: var(--primary);
}

input[readonly] {
    background-color: var(--gray-light-color-ml);
    color: var(--gray);
    border: 1px solid var(--gray-light-color-ml);
    cursor: not-allowed;
    opacity: 0.8;
}

.admin {
    color: var(--warning);
    font-weight: 600;
}

.close-btn {
    width: 23px;
    height: 23px;
    border-radius: 8px;
    z-index: 999999;
    position: absolute;
    top: 7px;
    right: 3px;
    background: url(https://account.pemaish.pk/Assets/Images/close-icon.svg) 0 0 / 23px 23px no-repeat;
    transition: all 0.4s ease;
}

.close-btn:hover {
    opacity: 0.2;
    transition: all 0.4s ease;
}


    .terms-info {
      margin-top: 2rem;
      font-size: 0.8rem;
      color: var(--gray);
      text-align: center;
    }

/* Warning Box Styles - Updated to match dashboard */
.WarningboxInfo {
    background: white;
    border: 1px solid var(--warning);
    border-left: 4px solid var(--warning);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    color: var(--warning);
    font-size: 0.9rem;
    font-weight: 500;
    margin: 1rem 0;
    text-align: center;
    box-shadow: var(--shadow-sm);
    display: none;
}

.WarningboxInfo.show {
    display: block;
    animation: fadeInUp 0.3s ease;
}

.WarningboxInfo.error,
.WarningboxInfo p[style*="color:red"] {
    border-color: var(--danger);
    border-left-color: var(--danger);
    color: var(--danger);
}

.WarningboxInfo.success,
.WarningboxInfo p[style*="color:green"] {
    border-color: var(--success);
    border-left-color: var(--success);
    color: var(--success);
}

.WarningboxInfo a {
    color: inherit;
    font-weight: 600;
    text-decoration: underline;
}

.WarningboxInfo a:hover {
    opacity: 0.8;
}

/* Loading Spinner - Updated for dashboard consistency */
.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 0.5rem;
}

/* Terms Link Styles */
.terms-info {
    margin-top: 2rem;
    font-size: 0.8rem;
    color: var(--gray);
    text-align: center;
    line-height: 1.5;
}

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

.terms-link:hover {
    text-decoration: underline;
}

/* Social Login Styles */
.social-login {
    margin: 1rem 0;
}

/* Remember Me Checkbox Improvements */
.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.remember-me input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
}

.remember-me label {
    font-size: 0.9rem;
    color: var(--gray);
    cursor: pointer;
    user-select: none;
}

/* Resend Button Styles */
.btn-resend {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: var(--radius-md);
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    margin-bottom: 1rem;
    font-family: var(--font-family);
}

.btn-resend:hover:not(:disabled) {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-resend:disabled {
    background: transparent;
    color: var(--gray);
    border-color: var(--gray-light-color-ml);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Countdown Timer */
.countdown-timer {
    text-align: center;
    color: var(--primary);
    font-weight: 600;
    margin-top: 1rem;
    font-size: 0.9rem;
}

/* Success State */
.success-state {
    text-align: center;
}

.success-state i {
    color: var(--success);
    margin-bottom: 1rem;
}

/* Alert Box */
.alert-box {
    background: white;
    border: 1px solid var(--gray-light-color-ml);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius-md);
    padding: 1rem 1.5rem;
    margin: 1rem 0;
    box-shadow: var(--shadow-sm);
}

.alert-box.show {
    display: block;
    animation: fadeInUp 0.3s ease;
}

/* Info Section Styles */
.info-section {
    background: var(--primary-light-color-ml);
    border: 1px solid var(--primary);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.info-title {
    color: var(--primary-dark);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-list {
    list-style: none;
    padding: 0;
}

.info-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    color: var(--gray);
    font-size: 0.875rem;
}

.info-list li:last-child {
    margin-bottom: 0;
}

.info-list i {
    color: var(--primary);
    margin-top: 0.125rem;
    flex-shrink: 0;
}

.form-help {
    color: var(--gray);
    font-size: 0.75rem;
    margin-top: 0.25rem;
    display: block;
}

