/* ================================================================
   Ocean Blue Authentication Theme
   Unified styles for Login, 2FA, and all Auth-related pages
   ================================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ================================================================
   Color Palette
   ================================================================ */
:root {
    --ob-rich-black: #00171f;
    --ob-prussian-blue: #003459;
    --ob-cerulean: #007ea7;
    --ob-picton-blue: #00a8e8;
    --ob-white: #ffffff;
    --ob-light-blue: #e8f4fd;
    --ob-shadow: rgba(0, 52, 89, 0.3);
}

/* ================================================================
   Base Layout
   ================================================================ */
body {
    font-family: 'Source Sans Pro', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    background: linear-gradient(135deg, var(--ob-prussian-blue) 0%, var(--ob-cerulean) 50%, var(--ob-picton-blue) 100%);
    position: relative;
}

/* ================================================================
   Animated Ocean Waves Background
   ================================================================ */
.ocean-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 200%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120" preserveAspectRatio="none"><path d="M0,50 C150,80 350,0 600,50 C850,100 1050,20 1200,50 L1200,120 L0,120 Z" fill="%23003459" fill-opacity="0.3"/></svg>') repeat-x;
    animation: wave 20s linear infinite;
}

.wave:nth-child(2) {
    bottom: -20px;
    animation: wave 15s linear infinite reverse;
    opacity: 0.5;
}

.wave:nth-child(3) {
    bottom: -40px;
    animation: wave 25s linear infinite;
    opacity: 0.3;
}

@keyframes wave {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ================================================================
   Main Container - Used by all pages
   ================================================================ */
.auth-container {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.auth-card {
    display: flex;
    background: var(--ob-white);
    border-radius: 20px;
    box-shadow: 0 20px 60px var(--ob-shadow);
    overflow: hidden;
    width: 100%;
    max-width: 1000px;
    min-height: 550px;
}

/* Large card for complex 2FA pages */
.auth-card.large {
    max-width: 1100px;
    min-height: 600px;
}

/* Medium card for simple forms */
.auth-card.medium {
    max-width: 900px;
    min-height: 500px;
}

/* Small card for minimal pages */
.auth-card.small {
    max-width: 800px;
    min-height: 450px;
}

/* ================================================================
   Left Side - Branding Section
   ================================================================ */
.auth-brand {
    flex: 1;
    background: linear-gradient(135deg, var(--ob-prussian-blue) 0%, var(--ob-cerulean) 100%);
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--ob-white);
    position: relative;
    overflow: hidden;
}

/* Wider brand section for 2FA pages */
.auth-brand.wide {
    flex: 0 0 400px;
}

.auth-brand::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 168, 232, 0.2) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.brand-content {
    position: relative;
    z-index: 1;
    text-align: center;
    width: 100%;
}

/* Brand Logo (for login/main pages) */
.brand-logo {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.brand-logo span {
    color: var(--ob-picton-blue);
}

/* Brand Icon (for 2FA/other pages) */
.brand-icon {
    font-size: 80px;
    margin-bottom: 30px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Alternative icon style */
.brand-icon-circle {
    width: 100px;
    height: 100px;
    background: rgba(0, 168, 232, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    font-size: 48px;
    color: var(--ob-picton-blue);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.brand-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.brand-subtitle {
    font-size: 16px;
    opacity: 0.95;
    font-weight: 300;
    line-height: 1.6;
    margin-bottom: 30px;
}

/* Brand Features List */
.brand-features {
    margin-top: 40px;
    text-align: left;
}

.feature-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    font-size: 14px;
}

.feature-item i {
    width: 30px;
    height: 30px;
    background: var(--ob-picton-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 14px;
}

/* Brand Steps (for password reset, etc.) */
.brand-steps {
    text-align: left;
    margin-top: 30px;
}

.step-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
    font-size: 14px;
}

.step-number {
    width: 28px;
    height: 28px;
    background: var(--ob-picton-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}

.step-text {
    padding-top: 4px;
}

/* ================================================================
   Right Side - Content/Form Section
   ================================================================ */
.auth-content {
    flex: 1;
    padding: 60px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow-y: auto;
    max-height: 100vh;
}

.auth-header {
    margin-bottom: 30px;
}

.auth-header h2 {
    color: var(--ob-prussian-blue);
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
}

.auth-header h3 {
    color: var(--ob-prussian-blue);
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
}

.auth-header p {
    color: var(--ob-cerulean);
    font-size: 14px;
    line-height: 1.6;
}

/* ================================================================
   Alert Messages
   ================================================================ */
.alert-container {
    margin-bottom: 20px;
}

.alert-custom {
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.6;
    border-left: 4px solid;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
}

.alert-custom i {
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 2px;
}

.alert-custom .alert-text {
    flex: 1;
}

.alert-custom .alert-text p {
    margin: 0;
    padding: 0;
}

.alert-custom .alert-text ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.alert-custom .alert-text li {
    margin: 0;
    padding: 0;
}

.alert-error {
    background-color: #fff5f5;
    border-color: #e53e3e;
    color: #c53030;
}

.alert-error i {
    color: #e53e3e;
}

.alert-success {
    background-color: #f0fff4;
    border-color: #38a169;
    color: #22543d;
}

.alert-success i {
    color: #38a169;
}

.alert-warning {
    background-color: #fffaf0;
    border-color: #dd6b20;
    color: #7c2d12;
}

.alert-warning i {
    color: #dd6b20;
}

.alert-info {
    background-color: #e6f7ff;
    border-color: var(--ob-picton-blue);
    color: var(--ob-prussian-blue);
}

.alert-info i {
    color: var(--ob-picton-blue);
}

/* ================================================================
   Form Elements
   ================================================================ */
.form-group-auth {
    margin-bottom: 25px;
    position: relative;
}

.form-group-auth label {
    display: block;
    color: var(--ob-prussian-blue);
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
}

.input-wrapper-auth {
    position: relative;
}

.input-wrapper-auth i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ob-cerulean);
    font-size: 16px;
}

.form-control-auth {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
    font-family: 'Source Sans Pro', sans-serif;
}

.form-control-auth:focus {
    outline: none;
    border-color: var(--ob-picton-blue);
    box-shadow: 0 0 0 3px rgba(0, 168, 232, 0.1);
}

/* Special code input for 2FA/verification */
.code-input-auth {
    text-align: center;
    font-size: 32px;
    letter-spacing: 8px;
    font-family: 'Courier New', monospace;
	padding: 20px;
	display: block;
	width: 100%;
	max-width: 460px;
	margin: 20px auto;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    transition: all 0.3s;
}

.code-input-auth:focus {
    outline: none;
    border-color: var(--ob-picton-blue);
    box-shadow: 0 0 0 3px rgba(0, 168, 232, 0.1);
}

/* Checkbox */
.checkbox-wrapper-auth {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
}

.checkbox-wrapper-auth input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    cursor: pointer;
    accent-color: var(--ob-picton-blue);
}

.checkbox-wrapper-auth label {
    color: #666;
    font-size: 14px;
    cursor: pointer;
    user-select: none;
}

/* ================================================================
   Buttons
   ================================================================ */
.btn-auth {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--ob-picton-blue) 0%, var(--ob-cerulean) 100%);
    border: none;
    border-radius: 8px;
    color: var(--ob-white);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 168, 232, 0.3);
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-auth:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 168, 232, 0.4);
    color: var(--ob-white);
    text-decoration: none;
}

.btn-auth:active {
    transform: translateY(0);
}

.btn-auth:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Secondary button variant */
.btn-auth-secondary {
    background: var(--ob-white);
    border: 2px solid var(--ob-cerulean);
    color: var(--ob-cerulean);
    box-shadow: none;
}

.btn-auth-secondary:hover {
    background: var(--ob-cerulean);
    color: var(--ob-white);
}

/* Not full width button */
.btn-auth.inline {
    width: auto;
    padding: 14px 30px;
}

/* Loading State */
.btn-auth.loading {
    position: relative;
    color: transparent !important;
}

.btn-auth.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ================================================================
   Links
   ================================================================ */
.auth-links {
    margin-top: 25px;
    text-align: center;
}

.auth-links a {
    color: var(--ob-picton-blue);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.auth-links a:hover {
    color: var(--ob-cerulean);
    text-decoration: underline;
}

.auth-links .divider {
    margin: 0 10px;
    color: #ddd;
}

.link-back {
    color: var(--ob-picton-blue);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.link-back:hover {
    color: var(--ob-cerulean);
    text-decoration: none;
}

/* ================================================================
   Method Selection (2FA Setup)
   ================================================================ */
.method-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 15px 0;
}

.method-option {
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    color: inherit;
    display: block;
    background: var(--ob-white);
}

.method-option:hover {
    border-color: var(--ob-picton-blue);
    background: var(--ob-light-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 168, 232, 0.2);
    text-decoration: none;
    color: inherit;
}

.method-option-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.method-icon {
    font-size: 32px;
    color: var(--ob-picton-blue);
}

.method-title {
    color: var(--ob-prussian-blue);
    font-size: 16px;
    font-weight: 700;
    margin: 0;
}

.method-description {
    color: #666;
    font-size: 14px;
    margin: 0 0 5px 0;
}

.method-features {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 12px;
    color: var(--ob-cerulean);
}

.method-features i {
    margin-right: 5px;
}

/* Method Tabs (for verification page) */
.method-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.method-tab {
    padding: 12px 20px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    background: var(--ob-white);
    color: #666;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.method-tab-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.method-tab-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
}

.method-tab-hint {
    font-size: 11px;
    opacity: 0.75;
    font-weight: 400;
    white-space: nowrap;
}

.method-tab:hover {
    border-color: var(--ob-picton-blue);
    background: var(--ob-light-blue);
}

.method-tab.active {
    background: var(--ob-picton-blue);
    color: var(--ob-white);
    border-color: var(--ob-picton-blue);
}

/* ================================================================
   Progress Steps
   ================================================================ */
.progress-steps {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
    gap: 10px;
}

.progress-step {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #e1e8ed;
    transition: all 0.3s;
}

.progress-step.active {
    width: 40px;
    border-radius: 6px;
    background: var(--ob-picton-blue);
}

.progress-step.completed {
    background: var(--ob-cerulean);
}

/* ================================================================
   Footer
   ================================================================ */
.auth-footer {
    position: fixed;
    bottom: 20px;
    left: 0;
    right: 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    z-index: 1;
}

/* ================================================================
   Responsive Design
   ================================================================ */
@media (max-width: 992px) {
    .auth-card {
        flex-direction: column;
        min-height: auto;
    }
    
    .auth-brand {
        flex: 0 0 auto;
        padding: 40px 30px;
    }
    
    .auth-brand.wide {
        flex: 0 0 auto;
    }
    
    .brand-features,
    .brand-steps {
        display: none;
    }
    
    .auth-content {
        padding: 40px 30px;
        max-height: none;
    }
}

@media (max-width: 768px) {
    .auth-header h2 {
        font-size: 24px;
    }
    
    .auth-header h3 {
        font-size: 22px;
    }
    
    .brand-logo {
        font-size: 36px;
    }
    
    .brand-icon {
        font-size: 60px;
    }
    
    .brand-icon-circle {
        width: 80px;
        height: 80px;
        font-size: 38px;
    }
    
    .brand-title {
        font-size: 28px;
    }
    
    .brand-subtitle {
        font-size: 14px;
    }
    
    .method-tabs {
        flex-direction: column;
    }
    
    .method-tab {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .auth-container {
        padding: 10px;
    }
    
    .auth-card {
        border-radius: 15px;
    }
    
    .auth-content {
        padding: 30px 20px;
    }
    
    .brand-content {
        padding: 30px 20px;
    }
}

/* ================================================================
   Utility Classes
   ================================================================ */
.text-center {
    text-align: center;
}

.mb-10 {
    margin-bottom: 10px;
}

.mb-15 {
    margin-bottom: 15px;
}

.mb-20 {
    margin-bottom: 20px;
}

.mb-30 {
    margin-bottom: 30px;
}

.mt-10 {
    margin-top: 10px;
}

.mt-15 {
    margin-top: 15px;
}

.mt-20 {
    margin-top: 20px;
}

.mt-30 {
    margin-top: 30px;
}

