
/* Phase 9: auth pages */
/* from templates/auth/login.html */
* {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        body {
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            overflow: hidden;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
            text-rendering: optimizeLegibility;
        }
        
        .auth-container {
            display: flex;
            height: 100vh;
            width: 100vw;
        }
        
        /* Left Panel - Logo & Branding */
        .auth-left {
            flex: 1;
            background: #1F2937;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 4rem;
            position: relative;
            overflow: hidden;
        }
        
        .auth-left::before {
            content: '';
            position: absolute;
            width: 500px;
            height: 500px;
            background: radial-gradient(circle, rgba(20, 184, 166, 0.15) 0%, transparent 70%);
            border-radius: 50%;
            top: -100px;
            left: -100px;
        }
        
        .auth-left::after {
            content: '';
            position: absolute;
            width: 400px;
            height: 400px;
            background: radial-gradient(circle, rgba(20, 184, 166, 0.1) 0%, transparent 70%);
            border-radius: 50%;
            bottom: -80px;
            right: -80px;
        }
        
        .brand-content {
            position: relative;
            z-index: 10;
            text-align: center;
            max-width: 500px;
        }
        
        .brand-logo {
            margin-bottom: 3rem;
        }
        
        .brand-logo img {
            width: 100%;
            max-width: 320px;
            height: auto;
            filter: drop-shadow(0 10px 40px rgba(0, 0, 0, 0.3));
        }
        
        .brand-tagline {
            color: #CBD5E1;
            font-size: var(--az-type-section-title);
            font-weight: 700;
            letter-spacing: 0.5px;
            line-height: 1.6;
        }
        
        /* Right Panel - Login Form */
        .auth-right {
            flex: 1;
            background: #FFFFFF;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 4rem;
        }
        
        .login-box {
            width: 100%;
            max-width: 440px;
        }
        
        .tenant-context {
            display: flex;
            align-items: center;
            gap: 1rem;
            margin-bottom: 1.5rem;
            padding: 0.75rem 1rem;
            border: 1px solid #E2E8F0;
            border-radius: 12px;
            background: #F8FAFC;
        }
        
        .tenant-logo {
            max-height: 56px;
            max-width: 120px;
            height: auto;
            width: auto;
            border-radius: 8px;
        }
        
        .tenant-name span {
            color: #64748B;
            font-size: var(--az-type-small);
            display: block;
        }
        
        .tenant-name strong {
            color: #1F2937;
            font-size: var(--az-type-card-title);
        }
        
        .login-header {
            margin-bottom: 2.5rem;
        }
        
        .login-header h1 {
            color: #1F2937;
            font-size: var(--az-type-page-title);
            font-weight: 700;
            margin-bottom: 0.5rem;
        }
        
        .login-header p {
            color: #64748B;
            font-size: var(--az-type-card-body);
        }
        
        .form-label {
            color: #475569;
            font-weight: 500;
            font-size: var(--az-type-card-body);
            margin-bottom: 0.5rem;
        }
        
        .input-group {
            margin-bottom: 1.25rem;
        }
        
        .input-group-text {
            background: #F8FAFC;
            border: 1px solid #E2E8F0;
            border-right: none;
            color: #64748B;
        }
        
        .form-control {
            border: 1px solid #E2E8F0;
            border-radius: 8px;
            padding: 0.75rem 1rem;
            font-size: var(--az-type-card-body);
            transition: all 0.2s ease;
        }
        
        .input-group .form-control {
            border-left: none;
            border-radius: 0 8px 8px 0;
        }
        
        .input-group-text {
            border-radius: 8px 0 0 8px;
        }
        
        .form-control:focus {
            border-color: #14B8A6;
            box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.1);
            outline: none;
        }
        
        .input-group .form-control:focus {
            border-left-color: transparent;
        }
        
        .input-group:focus-within .input-group-text {
            border-color: #14B8A6;
            background: #F0FDFA;
            color: #14B8A6;
        }
        
        .form-check {
            margin-bottom: 1.5rem;
        }
        
        .form-check-input {
            border-color: #CBD5E1;
            cursor: pointer;
        }
        
        .form-check-input:checked {
            background-color: #14B8A6;
            border-color: #14B8A6;
        }
        
        .form-check-label {
            color: #64748B;
            font-size: var(--az-type-card-body);
            cursor: pointer;
        }
        
        .btn-login {
            width: 100%;
            background: linear-gradient(135deg, #0F766E 0%, #14B8A6 100%);
            border: none;
            border-radius: 8px;
            padding: 0.875rem 1.5rem;
            font-size: var(--az-type-card-body);
            font-weight: 600;
            color: white;
            transition: all 0.3s ease;
            box-shadow: 0 4px 12px rgba(20, 184, 166, 0.3);
        }
        
        .btn-login:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(20, 184, 166, 0.4);
        }
        
        .btn-login:active {
            transform: translateY(0);
        }
        
        .password-toggle {
            border: 1px solid #E2E8F0;
            border-left: none;
            background: #F8FAFC;
            color: #64748B;
            border-radius: 0 8px 8px 0;
            padding: 0 0.75rem;
            transition: all 0.2s ease;
        }
        
        .password-toggle:hover {
            background: #F1F5F9;
            color: #475569;
        }
        
        .password-toggle:focus {
            outline: none;
            box-shadow: none;
        }
        
        .input-group:focus-within .password-toggle {
            border-color: #14B8A6;
            background: #F0FDFA;
            color: #14B8A6;
        }

        /* Hide browser-native password reveal/clear icons (Edge/IE) */
        input[type="password"]::-ms-reveal,
        input[type="password"]::-ms-clear {
            display: none;
        }

        .forgot-password {
            text-align: center;
            margin-top: 1rem;
        }

        .forgot-password a {
            color: #0F766E;
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            font-size: var(--az-type-card-body);
            font-weight: 600;
            letter-spacing: 0.15px;
            text-decoration: none;
            transition: color 0.2s ease;
        }

        .forgot-password a:hover {
            color: #14B8A6;
            text-decoration: underline;
        }
        
        .invalid-feedback {
            display: none;
            color: #EF4444;
            font-size: var(--az-type-card-body);
            margin-top: 0.25rem;
        }
        
        .was-validated .form-control:invalid ~ .invalid-feedback {
            display: block;
        }
        
        /* Responsive */
        @media (max-width: 992px) {
            .auth-container {
                flex-direction: column;
            }
            
            .auth-left {
                min-height: 40vh;
                padding: 2rem;
            }
            
            .brand-tagline {
                font-size: var(--az-type-page-title);
            }
            
            .auth-right {
                padding: 2rem;
                min-height: 60vh;
            }
            
            .login-header h1 {
                font-size: var(--az-type-page-title);
            }
        }
        
        @media (max-width: 576px) {
            .auth-left {
                padding: 1.5rem;
            }
            
            .brand-logo img {
                max-width: 200px;
            }
            
            .brand-tagline {
                font-size: var(--az-type-card-body);
            }
            
            .auth-right {
                padding: 1.5rem;
            }
            
            .login-header h1 {
                font-size: var(--az-type-section-title);
            }
        }

/* from templates/auth/forgot_password.html */
* {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            overflow: hidden;
        }

        .auth-container {
            display: flex;
            height: 100vh;
            width: 100vw;
        }

        .auth-left {
            flex: 1;
            background: #1F2937;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 4rem;
            position: relative;
            overflow: hidden;
        }

        .auth-left::before {
            content: '';
            position: absolute;
            width: 500px;
            height: 500px;
            background: radial-gradient(circle, rgba(20, 184, 166, 0.15) 0%, transparent 70%);
            border-radius: 50%;
            top: -100px;
            left: -100px;
        }

        .auth-left::after {
            content: '';
            position: absolute;
            width: 400px;
            height: 400px;
            background: radial-gradient(circle, rgba(20, 184, 166, 0.1) 0%, transparent 70%);
            border-radius: 50%;
            bottom: -80px;
            right: -80px;
        }

        .brand-content {
            position: relative;
            z-index: 10;
            text-align: center;
            max-width: 500px;
        }

        .brand-logo {
            margin-bottom: 3rem;
        }

        .brand-logo img {
            width: 100%;
            max-width: 320px;
            height: auto;
            filter: drop-shadow(0 10px 40px rgba(0, 0, 0, 0.3));
        }

        .brand-tagline {
            color: #CBD5E1;
            font-size: var(--az-type-section-title);
            font-weight: 700;
            letter-spacing: 0.5px;
            line-height: 1.6;
        }

        .auth-right {
            flex: 1;
            background: #FFFFFF;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 4rem;
        }

        .content-box {
            width: 100%;
            max-width: 440px;
        }

        .content-header h1 {
            color: #1F2937;
            font-size: var(--az-type-page-title);
            font-weight: 700;
            margin-bottom: 0.5rem;
        }

        .content-header p {
            color: #64748B;
            margin-bottom: 1.75rem;
        }

        .form-label {
            color: #475569;
            font-weight: 500;
            font-size: var(--az-type-card-body);
            margin-bottom: 0.5rem;
        }

        .input-group-text {
            background: #F8FAFC;
            border: 1px solid #E2E8F0;
            border-right: none;
            color: #64748B;
            border-radius: 8px 0 0 8px;
        }

        .form-control {
            border: 1px solid #E2E8F0;
            border-left: none;
            border-radius: 0 8px 8px 0;
            padding: 0.75rem 1rem;
            font-size: var(--az-type-card-body);
        }

        .form-control:focus {
            border-color: #14B8A6;
            box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.1);
        }

        .input-group:focus-within .input-group-text {
            border-color: #14B8A6;
            background: #F0FDFA;
            color: #14B8A6;
        }

        .btn-primary {
            width: 100%;
            background: linear-gradient(135deg, #0F766E 0%, #14B8A6 100%);
            border: none;
            border-radius: 8px;
            padding: 0.875rem 1.5rem;
            font-size: var(--az-type-card-body);
            font-weight: 600;
            color: #FFFFFF;
            box-shadow: 0 4px 12px rgba(20, 184, 166, 0.3);
        }

        .btn-primary:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(20, 184, 166, 0.4);
            background: linear-gradient(135deg, #0F766E 0%, #14B8A6 100%);
        }

        .aux-link {
            color: #0F766E;
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            font-size: var(--az-type-card-body);
            font-weight: 600;
            letter-spacing: 0.15px;
            text-decoration: none;
            transition: color 0.2s ease;
        }

        .aux-link:hover {
            color: #14B8A6;
            text-decoration: underline;
        }

/* from templates/auth/password_reset.html */
* {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            overflow: hidden;
        }

        .auth-container {
            display: flex;
            height: 100vh;
            width: 100vw;
        }

        .auth-left {
            flex: 1;
            background: #1F2937;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 4rem;
            position: relative;
            overflow: hidden;
        }

        .auth-left::before {
            content: '';
            position: absolute;
            width: 500px;
            height: 500px;
            background: radial-gradient(circle, rgba(20, 184, 166, 0.15) 0%, transparent 70%);
            border-radius: 50%;
            top: -100px;
            left: -100px;
        }

        .auth-left::after {
            content: '';
            position: absolute;
            width: 400px;
            height: 400px;
            background: radial-gradient(circle, rgba(20, 184, 166, 0.1) 0%, transparent 70%);
            border-radius: 50%;
            bottom: -80px;
            right: -80px;
        }

        .brand-content {
            position: relative;
            z-index: 10;
            text-align: center;
            max-width: 500px;
        }

        .brand-logo {
            margin-bottom: 3rem;
        }

        .brand-logo img {
            width: 100%;
            max-width: 320px;
            height: auto;
            filter: drop-shadow(0 10px 40px rgba(0, 0, 0, 0.3));
        }

        .brand-tagline {
            color: #CBD5E1;
            font-size: var(--az-type-section-title);
            font-weight: 700;
            letter-spacing: 0.5px;
            line-height: 1.6;
        }

        .auth-right {
            flex: 1;
            background: #FFFFFF;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 4rem;
        }

        .content-box {
            width: 100%;
            max-width: 460px;
        }

        .content-header h1 {
            color: #1F2937;
            font-size: var(--az-type-page-title);
            font-weight: 700;
            margin-bottom: 0.5rem;
        }

        .content-header p {
            color: #64748B;
            margin-bottom: 1.5rem;
        }

        .policy-box {
            background: #F8FAFC;
            border: 1px solid #E2E8F0;
            border-radius: 10px;
            padding: 0.75rem 1rem;
            margin-bottom: 1rem;
            color: #475569;
            font-size: var(--az-type-card-body);
        }

        .form-label {
            color: #475569;
            font-weight: 500;
            font-size: var(--az-type-card-body);
            margin-bottom: 0.5rem;
        }

        .input-group-text {
            background: #F8FAFC;
            border: 1px solid #E2E8F0;
            border-right: none;
            color: #64748B;
            border-radius: 8px 0 0 8px;
        }

        .form-control {
            border: 1px solid #E2E8F0;
            border-left: none;
            border-radius: 0 8px 8px 0;
            padding: 0.75rem 1rem;
            font-size: var(--az-type-card-body);
        }

        .form-control:focus {
            border-color: #14B8A6;
            box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.1);
        }

        .input-group:focus-within .input-group-text {
            border-color: #14B8A6;
            background: #F0FDFA;
            color: #14B8A6;
        }

        .btn-primary {
            width: 100%;
            background: linear-gradient(135deg, #0F766E 0%, #14B8A6 100%);
            border: none;
            border-radius: 8px;
            padding: 0.875rem 1.5rem;
            font-size: var(--az-type-card-body);
            font-weight: 600;
            color: #FFFFFF;
            box-shadow: 0 4px 12px rgba(20, 184, 166, 0.3);
        }

        .btn-primary:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(20, 184, 166, 0.4);
            background: linear-gradient(135deg, #0F766E 0%, #14B8A6 100%);
        }

/* from templates/auth/select_tenant.html */
* {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        body {
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            overflow: hidden;
        }
        
        .auth-container {
            display: flex;
            height: 100vh;
            width: 100vw;
        }
        
        .auth-left {
            flex: 1;
            background: #1F2937;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 4rem;
            position: relative;
            overflow: hidden;
        }
        
        .auth-left::before {
            content: '';
            position: absolute;
            width: 500px;
            height: 500px;
            background: radial-gradient(circle, rgba(20, 184, 166, 0.15) 0%, transparent 70%);
            border-radius: 50%;
            top: -100px;
            left: -100px;
        }
        
        .auth-left::after {
            content: '';
            position: absolute;
            width: 400px;
            height: 400px;
            background: radial-gradient(circle, rgba(20, 184, 166, 0.1) 0%, transparent 70%);
            border-radius: 50%;
            bottom: -80px;
            right: -80px;
        }
        
        .brand-content {
            position: relative;
            z-index: 10;
            text-align: center;
            max-width: 500px;
        }
        
        .brand-logo {
            margin-bottom: 3rem;
        }
        
        .brand-logo img {
            width: 100%;
            max-width: 320px;
            height: auto;
            filter: drop-shadow(0 10px 40px rgba(0, 0, 0, 0.3));
        }
        
        .brand-tagline {
            color: #CBD5E1;
            font-size: var(--az-type-section-title);
            font-weight: 700;
            letter-spacing: 0.5px;
            line-height: 1.6;
        }
        
        .auth-right {
            flex: 1;
            background: #FFFFFF;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 4rem;
        }
        
        .login-box {
            width: 100%;
            max-width: 440px;
        }
        
        .login-header {
            margin-bottom: 2rem;
        }
        
        .login-header h1 {
            color: #1F2937;
            font-size: var(--az-type-page-title);
            font-weight: 700;
            margin-bottom: 0.5rem;
            white-space: nowrap;
        }
        
        .login-header p {
            color: #64748B;
            font-size: var(--az-type-card-body);
        }

        .login-header .tenant-hint {
            color: #1F2937;
            font-weight: 600;
            font-size: var(--az-type-card-title);
            margin-top: 0.25rem;
        }
        
        .form-label {
            color: #475569;
            font-weight: 500;
            font-size: var(--az-type-card-body);
            margin-bottom: 0.5rem;
        }
        
        .form-control {
            border: 1px solid #E2E8F0;
            border-radius: 8px;
            padding: 0.75rem 1rem;
            font-size: var(--az-type-card-body);
            transition: all 0.2s ease;
        }
        
        .form-control:focus {
            border-color: #14B8A6;
            box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.1);
            outline: none;
        }
        
        .helper-text {
            color: #64748B;
            font-size: var(--az-type-small);
        }
        
        .btn-login {
            width: 100%;
            background: linear-gradient(135deg, #0F766E 0%, #14B8A6 100%);
            border: none;
            border-radius: 8px;
            padding: 0.875rem 1.5rem;
            font-size: var(--az-type-card-body);
            font-weight: 600;
            color: white;
            transition: all 0.3s ease;
            box-shadow: 0 4px 12px rgba(20, 184, 166, 0.3);
        }
        
        .btn-login:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(20, 184, 166, 0.4);
        }
        
        @media (max-width: 992px) {
            .auth-container {
                flex-direction: column;
            }
            
            .auth-left {
                min-height: 40vh;
                padding: 2rem;
            }
            
            .auth-right {
                padding: 2rem;
                min-height: 60vh;
            }
        }
        
        @media (max-width: 576px) {
            .auth-left {
                padding: 1.5rem;
            }
            
            .brand-logo img {
                max-width: 200px;
            }
            
            .auth-right {
                padding: 1.5rem;
            }
        }

/* from templates/auth/simple_login.html */
body.simple-login-flow {
            font-family: Arial, sans-serif;
            background: #f8f9fa;
            margin: 0;
            padding: 20px;
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
            text-rendering: optimizeLegibility;
        }
        .login-container {
            background: white;
            padding: 40px;
            border-radius: 8px;
            box-shadow: 0 4px 6px rgba(0,0,0,0.1);
            width: 100%;
            max-width: 400px;
        }
        .logo {
            text-align: center;
            margin-bottom: 30px;
        }
        .logo h1 {
            color: var(--az-primary);
            margin: 0;
            font-size: var(--az-type-page-title);
        }
        .form-group {
            margin-bottom: 20px;
        }
        label {
            display: block;
            margin-bottom: 5px;
            font-weight: bold;
            color: #333;
        }
        input[type="text"], input[type="email"], input[type="password"] {
            width: 100%;
            padding: 12px;
            border: 1px solid #ddd;
            border-radius: 4px;
            font-size: var(--az-type-card-title);
            box-sizing: border-box;
        }
        .btn {
            width: 100%;
            padding: 12px;
            background: var(--az-primary);
            color: white;
            border: none;
            border-radius: 4px;
            font-size: var(--az-type-card-title);
            cursor: pointer;
        }
        .btn:hover {
            background: var(--az-primary-dark);
        }
        .checkbox-group {
            margin: 15px 0;
        }
        .checkbox-group input {
            width: auto;
            margin-right: 8px;
        }
        .status {
            text-align: center;
            margin-bottom: 20px;
            padding: 10px;
            border-radius: 4px;
        }
        .success { background: #d4edda; color: #155724; }
        .error { background: #f8d7da; color: #721c24; }
        .az-sl-remember-label { display: inline; font-weight: normal; }
        .az-sl-links-wrap { text-align: center; margin-top: 20px; }
        .az-sl-link-primary { color: var(--az-primary); }
