/* Google Fonts - Inter */
@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-weight: 700;
}

/* COZQ SSO Auth Pages - Split Screen Layout */
.cozqsso-auth-page {
    margin: 0;
    padding: 0;
    overflow: hidden;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    min-height: 100vh;
}

.cozqsso-layout {
    display: flex;
    min-height: 100vh;
    width: 100%;
    background-image: url('/assets/img/login.avif');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.cozqsso-layout::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(30, 58, 70, 0.85) 0%, rgba(45, 80, 95, 0.75) 50%, rgba(60, 100, 115, 0.7) 100%);
    z-index: 0;
}

/* Left Panel (2/3 width) */
.cozqsso-left-panel {
    flex: 0 0 66.666%;
    position: relative;
    z-index: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.cozqsso-logo-left {
    position: absolute;
    top: 40px;
    left: 60px;
    z-index: 10;
}

.cozqsso-logo-left img {
    height: 200px;
    width: auto;
    filter: brightness(0) invert(1);
}

/* Background pattern - hidden by default */
.cozqsso-background-pattern {
    display: none;
}

/* Hero Content Area */
.cozqsso-hero-content {
    position: relative;
    z-index: 5;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    height: 100%;
    padding: 100px 80px;
    color: white;
}

.cozqsso-hero-content h2 {
    font-size: 52px;
    font-weight: 300;
    line-height: 1.3;
    margin: 0 0 24px;
    letter-spacing: -0.5px;
    color: white;
}

.cozqsso-hero-content h2 span {
    font-weight: 600;
    color: white;
    background: none;
    -webkit-text-fill-color: inherit;
}

.cozqsso-hero-content p {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.7;
    max-width: 500px;
    margin: 0;
    font-weight: 300;
}

/* Feature Cards - hidden */
.cozqsso-features {
    display: none;
}

/* Floating Elements - hidden */
.cozqsso-floating-elements {
    display: none;
}

/* Right Panel - Login Form (1/3 width) */
.cozqsso-right-panel {
    flex: 0 0 33.333%;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    overflow-y: auto;
    position: relative;
    z-index: 1;
    min-height: 100vh;
}

.cozqsso-right-panel::before {
    display: none;
}

.cozqsso-form-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
    background: #ffffff;
    padding: 48px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.cozqsso-logo-right {
    margin-bottom: 16px;
}

.cozqsso-error-message {
    margin-bottom: 24px;
    padding: 12px 16px;
    background-color: #fef6f6;
    border: 1px solid #d13438;
    border-radius: 2px;
    font-size: 13px;
    color: #a4262c;
    line-height: 1.5;
}

.cozqsso-step {
    width: 100%;
}

.cozqsso-back-link {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.cozqsso-back-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
    border-radius: 2px;
}

.cozqsso-back-button:hover {
    background-color: #f3f2f1;
}

.cozqsso-email-display {
    font-size: 15px;
    color: #323130;
    font-weight: 400;
}

.cozqsso-auth-header {
    margin-bottom: 24px;
}

.cozqsso-auth-header h1 {
    font-size: 28px;
    font-weight: 600;
    color: #323130;
    margin: 0;
    line-height: 1.2;
}

.cozqsso-auth-form {
    margin-top: 0;
}

.cozqsso-form-group {
    margin-bottom: 16px;
}

.cozqsso-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #8c8c8c;
    border-radius: 2px;
    font-size: 15px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.5;
    color: #323130;
    background-color: #ffffff;
    transition: border-color 0.1s ease-in-out;
    box-sizing: border-box;
    height: 40px;
}

.cozqsso-input:focus {
    outline: none;
    border-color: #0078d4;
    border-width: 2px;
    padding: 7px 11px;
}

.cozqsso-input::placeholder {
    color: #605e5c;
}

.cozqsso-password-actions {
    margin-top: 8px;
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cozqsso-form-actions {
    margin-top: 16px;
}

.cozqsso-btn {
    display: inline-block;
    padding: 8px 20px;
    border: none;
    border-radius: 2px;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    cursor: pointer;
    transition: background-color 0.1s ease-in-out;
    text-decoration: none;
    text-align: center;
    min-width: 108px;
    height: 40px;
    line-height: 24px;
}

.cozqsso-btn-primary {
    background-color: #0078d4;
    color: #ffffff;
}

.cozqsso-btn-primary:hover {
    background-color: #106ebe;
}

.cozqsso-btn-primary:active {
    background-color: #005a9e;
}

.cozqsso-btn-block {
    width: 100%;
}

.cozqsso-link {
    color: #0078d4;
    text-decoration: none;
    font-size: 13px;
    font-weight: 400;
}

.cozqsso-link:hover {
    color: #106ebe;
    text-decoration: underline;
}

.cozqsso-alert {
    display: flex;
    align-items: flex-start;
    padding: 12px 16px;
    margin-bottom: 16px;
    border-radius: 2px;
    font-size: 13px;
    line-height: 1.5;
    background-color: #fef6f6;
    border: 1px solid #d13438;
    color: #a4262c;
}

.cozqsso-alert-text {
    flex: 1;
}

.cozqsso-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

.cozqsso-auth-footer {
    margin-top: 24px;
}

.cozqsso-footer-links {
    margin-bottom: 16px;
}

.cozqsso-info-message {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #edebe9;
    font-size: 12px;
    color: #605e5c;
    line-height: 1.5;
}

.cozqsso-info-message p {
    margin: 0;
}

/* Register Page - Full Page Background */
.cozqsso-register-page {
    margin: 0;
    padding: 0;
    overflow: hidden;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    min-height: 100vh;
    background-image: url('/assets/img/login.avif');
    background-size: cover;
    background-position: bottom center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    position: relative;
}

.cozqsso-register-page::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.85);
    z-index: 0;
}

.cozqsso-register-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    position: relative;
    z-index: 1;
}

.cozqsso-register-form-wrapper {
    width: 100%;
    max-width: 440px;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 4px;
    padding: 44px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.13);
    border: 1px solid #e1e1e1;
}

.cozqsso-logo-register {
    margin-bottom: 16px;
}

.cozqsso-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.cozqsso-email-wrapper {
    position: relative;
    display: flex;
    align-items: stretch;
    border: 1px solid #8c8c8c;
    border-radius: 2px;
    background-color: #ffffff;
    transition: border-color 0.1s ease-in-out;
}

.cozqsso-email-wrapper:focus-within {
    border-color: #0078d4;
    border-width: 2px;
}

.cozqsso-email-prefix {
    flex: 1;
    min-width: 0;
    border: none;
    border-radius: 0;
    padding: 8px 8px 8px 12px;
    background: transparent;
}

.cozqsso-email-prefix:focus {
    outline: none;
    border: none;
    padding: 7px 7px 7px 11px;
}

.cozqsso-email-at {
    font-size: 15px;
    color: #323130;
    font-weight: 500;
    padding: 0 4px;
    display: flex;
    align-items: center;
    background: transparent;
    border-left: 1px solid #e1e1e1;
    border-right: 1px solid #e1e1e1;
    margin: 4px 0;
}

.cozqsso-email-wrapper:focus-within .cozqsso-email-at {
    border-left-color: #0078d4;
    border-right-color: #0078d4;
}

.cozqsso-email-domain {
    flex: 0 0 auto;
    min-width: 160px;
    border: none;
    border-radius: 0;
    padding: 8px 32px 8px 8px;
    background: transparent;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23323130' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

.cozqsso-email-domain:focus {
    outline: none;
    padding: 7px 31px 7px 7px;
}

.cozqsso-email-domain option {
    padding: 8px;
}

.cozqsso-alert-success {
    background-color: #dff6dd;
    border: 1px solid #92c47c;
    color: #107c10;
}

/* 2FA Code Input Digits */
.cozqsso-2fa-digit {
    width: 48px;
    height: 56px;
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    border: 2px solid #e1e1e1;
    border-radius: 4px;
    padding: 0;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.cozqsso-2fa-digit:focus {
    outline: none;
    border-color: #0078d4;
    box-shadow: 0 0 0 2px rgba(0, 120, 212, 0.1);
}

.cozqsso-2fa-digit:invalid {
    border-color: #d13438;
}

/* Responsive - Large Tablets & Small Laptops (1025px - 1280px) */
@media (min-width: 1025px) and (max-width: 1280px) {
    .cozqsso-left-panel {
        flex: 0 0 55%;
    }
    
    .cozqsso-right-panel {
        flex: 0 0 45%;
        padding: 32px;
    }
    
    .cozqsso-form-container {
        max-width: 400px;
        padding: 40px;
    }
    
    .cozqsso-hero-content h2 {
        font-size: 42px;
    }
}

/* Responsive - Tablets (769px - 1024px) - iPad Mini, iPad Portrait */
@media (min-width: 769px) and (max-width: 1024px) {
    .cozqsso-left-panel {
        flex: 0 0 45%;
    }
    
    .cozqsso-right-panel {
        flex: 0 0 55%;
        padding: 24px;
    }
    
    .cozqsso-form-container {
        max-width: 380px;
        padding: 36px;
    }
    
    .cozqsso-hero-content {
        padding: 60px 40px;
    }
    
    .cozqsso-hero-content h2 {
        font-size: 36px;
    }
    
    .cozqsso-hero-content p {
        font-size: 15px;
    }
    
    .cozqsso-logo-left {
        top: 30px;
        left: 40px;
    }
    
    .cozqsso-logo-left img {
        height: 120px;
    }
}

/* Tablet Portrait Orientation */
@media (min-width: 769px) and (max-width: 1024px) and (orientation: portrait) {
    .cozqsso-layout {
        flex-direction: column;
    }
    
    .cozqsso-left-panel {
        flex: 0 0 35%;
        min-height: 35vh;
    }
    
    .cozqsso-right-panel {
        flex: 0 0 65%;
        min-height: 65vh;
        padding: 32px;
    }
    
    .cozqsso-form-container {
        max-width: 440px;
        padding: 40px;
    }
    
    .cozqsso-hero-content {
        justify-content: center;
        align-items: center;
        text-align: center;
        padding: 80px 40px 40px;
    }
    
    .cozqsso-hero-content h2 {
        font-size: 28px;
        margin-bottom: 12px;
    }
    
    .cozqsso-hero-content p {
        font-size: 14px;
        margin: 0;
        max-width: 400px;
    }
    
    .cozqsso-logo-left {
        position: relative;
        top: auto;
        left: auto;
        margin: 20px auto 0;
        text-align: center;
    }
    
    .cozqsso-logo-left img {
        height: 60px;
    }
}

/* Tablet Landscape Orientation */
@media (min-width: 769px) and (max-width: 1024px) and (orientation: landscape) {
    .cozqsso-left-panel {
        flex: 0 0 50%;
    }
    
    .cozqsso-right-panel {
        flex: 0 0 50%;
    }
    
    .cozqsso-form-container {
        max-width: 360px;
        padding: 32px;
    }
    
    .cozqsso-logo-left img {
        height: 100px;
    }
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    .cozqsso-layout {
        flex-direction: column;
    }
    
    .cozqsso-left-panel {
        display: none;
    }
    
    .cozqsso-right-panel {
        flex: 1;
        width: 100%;
        padding: 24px;
        background-image: url('/assets/img/login.avif');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
    }
    
    .cozqsso-right-panel::before {
        display: block;
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(255, 255, 255, 0.75);
        z-index: 0;
    }
    
    .cozqsso-register-form-wrapper {
        padding: 32px 24px;
    }
    
    .cozqsso-form-row {
        grid-template-columns: 1fr;
    }
    
    .cozqsso-form-container {
        background: transparent;
        padding: 0;
        border-radius: 0;
        box-shadow: none;
    }
}


.ms-auth-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    padding: 20px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.ms-auth-container {
    width: 100%;
    max-width: 440px;
    position: relative;
}

.ms-auth-card {
    background: #ffffff;
    border-radius: 4px;
    padding: 44px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.13);
    border: 1px solid #e1e1e1;
}

.ms-logo {
    margin-bottom: 24px;
}

.ms-logo svg text {
    fill: #000000;
}

.ms-auth-header {
    margin-bottom: 24px;
}

.ms-auth-header h1 {
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
    line-height: 1.2;
}

.ms-auth-form {
    margin-top: 0;
}

.ms-form-group {
    margin-bottom: 16px;
}

.ms-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #8c8c8c;
    border-radius: 2px;
    font-size: 15px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.5;
    color: #1a1a1a;
    background-color: #ffffff;
    transition: border-color 0.1s ease-in-out;
    box-sizing: border-box;
    height: 36px;
}

.ms-input:focus {
    outline: none;
    border-color: #0078d4;
    border-width: 2px;
    padding: 7px 11px;
}

.ms-input::placeholder {
    color: #605e5c;
}

.ms-password-actions {
    margin-top: 8px;
    text-align: right;
}

.ms-form-actions {
    margin-top: 16px;
}

.ms-btn {
    display: inline-block;
    padding: 6px 20px;
    border: none;
    border-radius: 2px;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    cursor: pointer;
    transition: background-color 0.1s ease-in-out;
    text-decoration: none;
    text-align: center;
    min-width: 108px;
    height: 32px;
    line-height: 20px;
}

.ms-btn-primary {
    background-color: #0078d4;
    color: #ffffff;
}

.ms-btn-primary:hover {
    background-color: #106ebe;
}

.ms-btn-primary:active {
    background-color: #005a9e;
}

.ms-btn-block {
    width: 100%;
}

.ms-link {
    color: #0078d4;
    text-decoration: none;
    font-size: 13px;
    font-weight: 400;
}

.ms-link:hover {
    color: #106ebe;
    text-decoration: underline;
}

.ms-alert {
    display: flex;
    align-items: flex-start;
    padding: 12px 16px;
    margin-bottom: 16px;
    border-radius: 2px;
    font-size: 13px;
    line-height: 1.5;
}

.ms-alert-error {
    background-color: #fef6f6;
    border: 1px solid #d13438;
    color: #a4262c;
}

.ms-alert-icon {
    margin-right: 8px;
    font-size: 16px;
    line-height: 1.2;
}

.ms-alert-text {
    flex: 1;
}

.ms-auth-footer {
    margin-top: 24px;
    text-align: center;
}

.ms-footer-links {
    margin-bottom: 16px;
}

.ms-auth-footer-bottom {
    margin-top: 24px;
    text-align: center;
    padding-top: 16px;
}

.ms-footer-bottom-content {
    font-size: 12px;
    color: #605e5c;
}

.ms-footer-link {
    color: #0078d4;
    text-decoration: none;
    font-size: 12px;
}

.ms-footer-link:hover {
    text-decoration: underline;
}

.ms-footer-separator {
    margin: 0 8px;
    color: #605e5c;
}

/* Legacy support for register page */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    padding: 20px;
}

.auth-container {
    width: 100%;
    max-width: 450px;
}

.auth-card {
    background: #ffffff;
    border-radius: 4px;
    padding: 44px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.13);
    border: 1px solid #e1e1e1;
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h1 {
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.auth-header p {
    color: #605e5c;
    font-size: 14px;
}

.auth-form {
    margin-top: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #1a1a1a;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #8c8c8c;
    border-radius: 2px;
    font-size: 15px;
    transition: border-color 0.1s;
    height: 36px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #0078d4;
    border-width: 2px;
    padding: 7px 11px;
}

.form-group small {
    display: block;
    margin-top: 4px;
    color: #605e5c;
    font-size: 12px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.btn {
    display: inline-block;
    padding: 6px 20px;
    border: none;
    border-radius: 2px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.1s;
    text-decoration: none;
    text-align: center;
    height: 32px;
    line-height: 20px;
}

.btn-primary {
    background-color: #0078d4;
    color: white;
}

.btn-primary:hover {
    background-color: #106ebe;
}

.btn-secondary {
    background-color: #605e5c;
    color: white;
}

.btn-danger {
    background-color: #d13438;
    color: white;
}

.btn-block {
    width: 100%;
}

.alert {
    padding: 12px 16px;
    border-radius: 2px;
    margin-bottom: 20px;
    font-size: 13px;
}

.alert-error {
    background-color: #fef6f6;
    color: #a4262c;
    border: 1px solid #d13438;
}

.alert-success {
    background-color: #dff6dd;
    color: #107c10;
    border: 1px solid #92c47c;
}

.auth-footer {
    margin-top: 24px;
    text-align: center;
    font-size: 13px;
    color: #605e5c;
}

.auth-footer a {
    color: #0078d4;
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 640px) {
    .auth-card {
        padding: 30px 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}
