/* ============================================ */
/* BASE & RESET                                 */
/* ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ============================================ */
/* VARIABLES & COLORS                           */
/* ============================================ */
:root {
    --bg-main: #1a1d2f;
    --card-bg: #000000;
    --text-primary: #ffffff;
    --text-secondary: #9ca3af;
    --border-color: #4a5568;
    --link-color: #3b82f6;
    --button-bg: #6b7280;
    --button-hover: #7a8494;
    --divider-color: #2d3748;
    --dropdown-bg: #2d3748;
    --dropdown-hover: #374151;
    --dropdown-active: #1e3a5f;
    --error-color: #ef4444;
    --success-color: #10b981;
}

/* ============================================ */
/* TYPOGRAPHY                                   */
/* ============================================ */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* ============================================ */
/* LAYOUT                                       */
/* ============================================ */
.container {
    width: 100%;
    max-width: 480px;
}

.card {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 30px 40px;
    position: relative;
}

/* ============================================ */
/* COMPONENTS - HEADER                          */
/* ============================================ */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.lock-icon {
    width: 18px;
    height: 18px;
    color: var(--text-primary);
}

/* ============================================ */
/* COMPONENTS - LOGO                            */
/* ============================================ */
.logo {
    text-align: center;
    margin-bottom: 20px;
}

.logo img {
    height: 40px;
}

/* ============================================ */
/* COMPONENTS - HEADINGS                        */
/* ============================================ */
h1 {
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 500;
    text-align: center;
    margin-bottom: 25px;
}

/* ============================================ */
/* COMPONENTS - FORMS                           */
/* ============================================ */
.login-form label {
    display: block;
    color: var(--text-primary);
    font-size: 13px;
    margin-bottom: 6px;
}

.input-field {
    width: 100%;
    padding: 10px 12px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 13px;
    margin-bottom: 12px;
    outline: none;
    transition: border-color 0.2s;
}

.input-field:focus {
    border-color: #6b7280;
}

.input-field.error {
    border-color: var(--error-color);
}

/* ============================================ */
/* COMPONENTS - CHECKBOX & REMEMBER             */
/* ============================================ */
.remember-section {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 30px;
}

.remember-section input[type="checkbox"] {
    width: 15px;
    height: 15px;
    cursor: pointer;
}

.remember-section label {
    color: var(--text-primary);
    font-size: 13px;
    margin: 0;
    cursor: pointer;
}

.info-icon {
    width: 15px;
    height: 15px;
    color: #6b7280;
    cursor: pointer;
}

/* ============================================ */
/* COMPONENTS - BUTTONS                         */
/* ============================================ */
.next-btn {
    background: var(--button-bg);
    color: var(--text-primary);
    border: none;
    padding: 8px 30px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.next-btn:hover {
    background: var(--button-hover);
}

.back-btn {
    background: transparent;
    color: var(--link-color);
    border: 1px solid var(--link-color);
    padding: 8px 30px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.back-btn:hover {
    background: var(--link-color);
    color: var(--text-primary);
}

/* ============================================ */
/* COMPONENTS - LINKS                           */
/* ============================================ */
.help-link {
    color: var(--link-color);
    font-size: 13px;
    text-decoration: none;
}

.help-link:hover {
    text-decoration: underline;
}

.get-started {
    color: var(--link-color);
    text-decoration: none;
    margin-left: 5px;
}

.get-started:hover {
    text-decoration: underline;
}

.learn-more {
    color: var(--link-color);
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.learn-more:hover {
    text-decoration: underline;
}

.arrow {
    font-size: 16px;
}

/* ============================================ */
/* COMPONENTS - LANGUAGE DROPDOWN               */
/* ============================================ */
.language-dropdown {
    color: var(--text-primary);
    font-size: 13px;
    cursor: pointer;
    position: relative;
}

.dropdown-arrow {
    font-size: 10px;
    margin-left: 5px;
}

.language-menu {
    background: var(--dropdown-bg);
    border-radius: 4px;
    padding: 8px 0;
    min-width: 200px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    animation: slideDown 0.2s ease-out;
    max-height: 300px;
    overflow-y: auto;
}

.language-item {
    padding: 10px 16px;
    color: var(--text-primary);
    font-size: 13px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
}

.language-item:hover {
    background: var(--dropdown-hover);
}

.language-item.active {
    background: var(--dropdown-active);
}

.check-icon {
    width: 16px;
    height: 16px;
    color: var(--link-color);
}

.language-menu::-webkit-scrollbar {
    width: 6px;
}

.language-menu::-webkit-scrollbar-track {
    background: #1f2937;
}

.language-menu::-webkit-scrollbar-thumb {
    background: #4b5563;
    border-radius: 3px;
}

.language-menu::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

/* ============================================ */
/* COMPONENTS - DIVIDER                         */
/* ============================================ */
.divider {
    height: 1px;
    background: var(--divider-color);
    margin: 20px 0;
}

/* ============================================ */
/* COMPONENTS - FORM FOOTER                     */
/* ============================================ */
.form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

/* ============================================ */
/* COMPONENTS - NEW USER SECTION                */
/* ============================================ */
.new-user {
    text-align: center;
    color: var(--text-primary);
    font-size: 13px;
    margin: 18px 0;
}

/* ============================================ */
/* COMPONENTS - MOBILE APP SECTION              */
/* ============================================ */
.mobile-app {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    margin-top: 20px;
}

.qr-code {
    width: 70px;
    height: 70px;
    flex-shrink: 0;
}

.app-info h3 {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
}

.app-info p {
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.5;
    margin-bottom: 8px;
}

/* ============================================ */
/* COMPONENTS - PASSWORD GROUP                  */
/* ============================================ */
.password-group {
    margin-top: 20px;
    animation: slideDown 0.3s ease-out;
}

/* ============================================ */
/* COMPONENTS - 2FA PASSCODE (OTP)              */
/* ============================================ */
.passcode-container {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 25px 0;
}

.passcode-input {
    width: 45px;
    height: 50px;
    text-align: center;
    font-size: 20px;
    font-weight: 600;
    background: transparent;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    outline: none;
    transition: all 0.2s;
}

.passcode-input:focus {
    border-color: var(--link-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.passcode-input.filled {
    border-color: var(--success-color);
}

.passcode-input.error {
    border-color: var(--error-color);
    animation: shake 0.3s;
}

/* ============================================ */
/* COMPONENTS - 2FA INFO TEXT                   */
/* ============================================ */
.info-text {
    text-align: center;
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 15px;
    line-height: 1.6;
}

.info-text strong {
    color: var(--text-primary);
    font-weight: 600;
}

.timer-text {
    text-align: center;
    color: var(--text-primary);
    font-size: 13px;
    margin-bottom: 25px;
    font-weight: 500;
}

.timer-text.warning {
    color: #f59e0b;
}

.timer-text.expired {
    color: var(--error-color);
}

/* ============================================ */
/* COMPONENTS - BUTTON GROUP                    */
/* ============================================ */
.button-group {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 25px;
}

/* ============================================ */
/* COMPONENTS - CUSTOM CONFIRM DIALOG           */
/* ============================================ */
.confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeIn 0.2s ease-out;
}

.confirm-dialog {
    background: #1f2937;
    border-radius: 8px;
    padding: 25px 30px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease-out;
}

.confirm-title {
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
}

.confirm-message {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 25px;
}

.confirm-buttons {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.confirm-btn {
    padding: 10px 24px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.confirm-btn.primary {
    background: var(--link-color);
    color: var(--text-primary);
}

.confirm-btn.primary:hover {
    background: #2563eb;
}

.confirm-btn.secondary {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.confirm-btn.secondary:hover {
    background: var(--border-color);
    color: var(--text-primary);
}

/* ============================================ */
/* ANIMATIONS                                   */
/* ============================================ */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================ */
/* UTILITIES                                    */
/* ============================================ */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.hidden {
    display: none;
}

/* ============================================ */
/* CUSTOM NOTIFICATION TOAST                    */
/* ============================================ */
.notification-toast {
    position: relative;
    background: #4a1d1d;
    border: 1px solid #7f2626;
    border-radius: 8px;
    padding: 16px 50px 16px 20px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    z-index: 10000;
    animation: slideDown 0.3s ease-out;
    margin-bottom: 20px;
}

.notification-toast.success {
    background: #1d4a1d;
    border-color: #267f26;
}

.notification-toast-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.notification-toast-icon svg {
    width: 100%;
    height: 100%;
}

.notification-toast-content {
    flex: 1;
    color: #ffffff;
    font-size: 14px;
    line-height: 1.5;
}

.notification-toast-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 24px;
    height: 24px;
    background: transparent;
    border: none;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s;
}

.notification-toast-close:hover {
    background: rgba(255, 255, 255, 0.1);
}