/* ==========================================================================
   Authentication Pages - Login & Password Reset
   Page-specific styles for standalone auth pages (no template)
   Prefix: auth-
   ========================================================================== */

/* ==========================================================================
   RESET AND BASE STYLES
   ========================================================================== */

/* Reset and Mobile-First Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    background: #A6ACB2;
    overflow-x: hidden;
}

body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

/* ==========================================================================
   LOGO BAR COMPONENT
   ========================================================================== */

/* Logo Bar - Semi-transparent white backdrop */
.auth-logo-bar {
    background: rgba(255, 255, 255, 0.7);
    padding: 15px;
    text-align: center;
    margin-bottom: 25px;
    border-radius: 8px;
}

.auth-logo-image {
    max-width: 180px;
    display: inline-block;
    height: auto;
}

/* ==========================================================================
   LOGIN PAGE LAYOUTS
   ========================================================================== */

/* Login Container */
.auth-login-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 30px 20px;
    width: 100%;
}

.auth-login-wrapper {
    background: rgba(94, 145, 201, 0.03);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.auth-login-layout {
    display: flex;
    flex-direction: column;
    min-height: 500px;
}

/* Desktop: side-by-side layout */
@media (min-width: 769px) {
    .auth-login-layout {
        display: grid;
        grid-template-columns: 400px 1fr;
        flex-direction: unset;
    }
}

/* ==========================================================================
   WELCOME PANEL (LOGIN PAGE)
   ========================================================================== */

.auth-welcome {
    background: linear-gradient(135deg, #5e91c9 0%, #4a7ba7 100%);
    color: white;
    padding: 50px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-welcome-header h1 {
    font-size: 28px;
    font-weight: bold;
    margin: 0 0 15px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    line-height: 1.2;
}

.auth-welcome-subtitle {
    font-size: 16px;
    margin-bottom: 30px;
    opacity: 0.9;
    line-height: 1.4;
    font-weight: 400;
}

.auth-welcome-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.auth-welcome-features li {
    font-size: 14px;
    margin-bottom: 12px;
    padding-left: 20px;
    position: relative;
    color: white !important;
    line-height: 1.4;
    list-style: none !important;
}

.auth-welcome-features li:before {
    content: "•";
    color: #CC6600 !important;
    font-weight: bold;
    position: absolute;
    left: 0;
    font-size: 16px;
}

/* ==========================================================================
   LOGIN FORM SECTION
   ========================================================================== */

.auth-form-section {
    background: white;
    padding: 50px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-form-header {
    margin-bottom: 35px;
}

.auth-form-header h2 {
    color: #CC6600;
    font-size: 24px;
    font-weight: bold;
    margin: 0 0 8px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.auth-form-subtitle {
    color: #666;
    font-size: 14px;
    margin: 0;
    line-height: 1.4;
}

.auth-form-group {
    margin-bottom: 25px;
}

.auth-form-label {
    display: block;
    color: #333;
    font-weight: bold;
    font-size: 13px;
    margin-bottom: 6px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.auth-form-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px; /* Prevents iOS zoom */
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.2s;
    background: #fafafa;
    min-height: 44px; /* Touch-friendly minimum */
}

.auth-form-input:focus {
    border-color: #5e91c9;
    outline: none;
    background: white;
}

.auth-form-select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px; /* Prevents iOS zoom */
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    box-sizing: border-box;
    background: #fafafa;
    cursor: pointer;
    min-height: 44px; /* Touch-friendly minimum */
}

.auth-credentials-row {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
}

/* Desktop: side-by-side credentials */
@media (min-width: 769px) {
    .auth-credentials-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
}

.auth-login-btn {
    background: #5e91c9;
    color: white;
    border: 1px solid #4a7ba7;
    padding: 15px 25px;
    border-radius: 4px;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
    transition: background-color 0.2s;
    width: 100%;
    letter-spacing: 0.5px;
    min-height: 50px; /* Touch-friendly minimum */
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-login-btn:hover {
    background: #4a7ba7;
}

.auth-security-info {
    background: rgba(40, 167, 69, 0.08);
    border: 1px solid rgba(40, 167, 69, 0.2);
    border-radius: 4px;
    padding: 12px 15px;
    margin: 20px 0;
    font-size: 13px;
    color: #155724;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-security-info img {
    margin-right: 8px;
}

.auth-login-footer {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    font-size: 12px !important;
    color: #666 !important;
    text-align: center;
    line-height: 1.5;
}

.auth-login-footer * {
    font-size: 12px !important;
}

.auth-support-link {
    color: #5e91c9 !important;
    text-decoration: none !important;
    font-weight: bold !important;
    font-size: 12px !important;
}

.auth-support-link:hover {
    color: #4a7ba7 !important;
    text-decoration: underline !important;
}

/* ==========================================================================
   LOGOUT LAYOUT
   ========================================================================== */

.auth-logout-layout {
    background: white;
    padding: 60px 40px;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    max-width: 500px;
    margin: 0 auto;
}

.auth-logout-layout h1 {
    color: #CC6600;
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.auth-logout-btn {
    max-width: 200px;
    margin: 0 auto;
}

/* ==========================================================================
   PASSWORD RESET LAYOUTS
   ========================================================================== */

/* Reset Container */
.auth-reset-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 30px 20px;
    width: 100%;
}

.auth-reset-wrapper {
    background: rgba(94, 145, 201, 0.03);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.auth-reset-layout {
    display: flex;
    flex-direction: column;
    min-height: 500px;
}

/* Desktop: side-by-side layout */
@media (min-width: 769px) {
    .auth-reset-layout {
        display: grid;
        grid-template-columns: 400px 1fr;
        flex-direction: unset;
    }
}

/* Information Panel */
.auth-reset-info {
    background: linear-gradient(135deg, #5e91c9 0%, #4a7ba7 100%);
    color: white;
    padding: 50px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-info-header h1 {
    font-size: 28px;
    font-weight: bold;
    margin: 0 0 15px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    line-height: 1.2;
}

.auth-info-subtitle {
    font-size: 16px;
    margin-bottom: 30px;
    opacity: 0.9;
    line-height: 1.4;
    font-weight: 400;
}

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

.auth-info-features li {
    font-size: 14px;
    margin-bottom: 12px;
    padding-left: 20px;
    position: relative;
    color: white !important;
    line-height: 1.4;
    list-style: none !important;
}

.auth-info-features li:before {
    content: "•";
    color: #CC6600 !important;
    font-weight: bold;
    position: absolute;
    left: 0;
    font-size: 16px;
}

.auth-reset-btn {
    background: #5e91c9;
    color: white;
    border: 1px solid #4a7ba7;
    padding: 15px 25px;
    border-radius: 4px;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
    transition: background-color 0.2s;
    width: 100%;
    letter-spacing: 0.5px;
    min-height: 50px; /* Touch-friendly minimum */
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-reset-btn:hover {
    background: #4a7ba7;
}

.auth-back-link {
    display: block;
    text-align: center;
    margin-top: 20px;
    color: #5e91c9 !important;
    text-decoration: none !important;
    font-size: 14px;
    font-weight: 500;
}

.auth-back-link:hover {
    color: #4a7ba7 !important;
    text-decoration: underline !important;
}

.auth-security-notice {
    background: rgba(94, 145, 201, 0.08);
    border: 1px solid rgba(94, 145, 201, 0.2);
    border-radius: 4px;
    padding: 15px;
    margin: 25px 0;
    font-size: 13px;
    color: #2c5282;
    line-height: 1.5;
}

.auth-security-notice strong {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
}

.auth-reset-footer {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    font-size: 12px !important;
    color: #666 !important;
    text-align: center;
    line-height: 1.5;
}

.auth-reset-footer * {
    font-size: 12px !important;
}

/* ==========================================================================
   PASSWORD RESET CONFIRM PAGE
   ========================================================================== */

.auth-confirm-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 30px 20px;
    width: 100%;
}

.auth-confirm-wrapper {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.auth-confirm-header {
    background: linear-gradient(135deg, #5e91c9 0%, #4a7ba7 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.auth-confirm-header h1 {
    font-size: 26px;
    font-weight: bold;
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}

.auth-confirm-content {
    padding: 40px 30px;
}

.auth-section-title {
    color: #CC6600;
    font-size: 20px;
    font-weight: bold;
    margin: 0 0 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.auth-required {
    color: #dc3545;
    margin-left: 3px;
}

.auth-password-wrapper {
    position: relative;
}

.auth-password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 8px;
    font-size: 16px;
    transition: color 0.2s;
}

.auth-password-toggle:hover {
    color: #333;
}

.auth-requirements-box {
    background: rgba(94, 145, 201, 0.08);
    border: 1px solid rgba(94, 145, 201, 0.2);
    border-radius: 4px;
    padding: 15px;
    margin: 20px 0;
    font-size: 13px;
    line-height: 1.6;
}

.auth-requirements-box h4 {
    color: #4a7ba7;
    font-size: 14px;
    font-weight: bold;
    margin: 0 0 10px 0;
}

.auth-requirements-box ul {
    margin: 0;
    padding-left: 20px;
}

.auth-requirements-box li {
    margin-bottom: 5px;
}

.auth-security-warning {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 15px;
    margin: 20px 0;
    font-size: 13px;
    color: #856404;
    line-height: 1.5;
}

/* Additional auth page utilities */
.auth-link {
    color: #5e91c9;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
}

.auth-link:hover {
    color: #4a7ba7;
    text-decoration: underline;
}

/* ==========================================================================
   RESPONSIVE DESIGN - MOBILE
   ========================================================================== */

/* Tablet and below */
@media (max-width: 768px) {
    body {
        margin: 0;
        padding: 0;
    }

    .auth-login-container,
    .auth-reset-container {
        padding: 10px;
        max-width: 100%;
        margin: 0;
    }

    .auth-login-wrapper,
    .auth-reset-wrapper {
        border-radius: 0;
        box-shadow: none;
    }

    .auth-login-layout,
    .auth-reset-layout {
        min-height: auto;
        display: flex;
        flex-direction: column;
    }

    .auth-form-section {
        padding: 20px 15px;
        order: 1; /* Form first on mobile */
    }

    .auth-welcome,
    .auth-reset-info {
        padding: 20px 15px;
        text-align: center;
        order: 2; /* Info second on mobile */
    }

    .auth-credentials-row {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    .auth-welcome-header h1,
    .auth-info-header h1 {
        font-size: 22px;
        line-height: 1.3;
    }

    .auth-welcome-subtitle,
    .auth-info-subtitle {
        font-size: 14px;
        margin-bottom: 20px;
    }

    .auth-form-header h2 {
        font-size: 20px;
    }

    .auth-form-subtitle {
        font-size: 13px;
    }

    .auth-welcome-features li,
    .auth-info-features li {
        font-size: 13px;
        margin-bottom: 10px;
    }

    .auth-confirm-container {
        padding: 10px;
        margin: 10px auto;
    }

    .auth-confirm-wrapper {
        border-radius: 0;
    }

    .auth-confirm-header {
        padding: 20px 15px;
    }

    .auth-confirm-header h1 {
        font-size: 22px;
    }

    .auth-confirm-content {
        padding: 20px 15px;
    }

    .auth-section-title {
        font-size: 18px;
    }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
    * {
        box-sizing: border-box;
    }

    html, body {
        width: 100%;
        overflow-x: hidden;
    }

    .auth-login-container,
    .auth-reset-container {
        padding: 5px;
        margin: 0;
        width: 100%;
    }

    .auth-login-wrapper,
    .auth-reset-wrapper {
        width: 100%;
        margin: 0;
    }

    .auth-welcome,
    .auth-reset-info {
        padding: 15px 10px;
    }

    .auth-form-section {
        padding: 15px 10px;
    }

    .auth-welcome-header h1,
    .auth-info-header h1 {
        font-size: 20px;
    }

    .auth-form-header h2 {
        font-size: 18px;
    }

    .auth-form-group {
        margin-bottom: 15px;
        width: 100%;
    }

    .auth-form-input,
    .auth-form-select {
        width: 100% !important;
        max-width: 100%;
        font-size: 16px; /* Prevent iOS zoom */
    }

    .auth-login-btn,
    .auth-reset-btn {
        padding: 16px 20px;
        font-size: 16px;
        min-height: 52px;
        width: 100%;
    }

    .auth-logout-layout {
        padding: 20px 10px;
        margin: 5px;
        width: calc(100% - 10px);
    }

    .auth-login-footer,
    .auth-reset-footer {
        font-size: 12px !important;
        padding-top: 15px;
        text-align: left;
    }

    .auth-login-footer *,
    .auth-reset-footer * {
        font-size: 12px !important;
    }

    .auth-confirm-container {
        padding: 5px;
        margin: 5px auto;
    }

    .auth-confirm-header {
        padding: 15px 10px;
    }

    .auth-confirm-header h1 {
        font-size: 20px;
    }

    .auth-confirm-content {
        padding: 15px 10px;
    }

    .auth-section-title {
        font-size: 16px;
    }

    .auth-form-input {
        font-size: 16px; /* Prevent iOS zoom */
    }
}

/* Landscape orientation fixes */
@media (max-width: 768px) and (orientation: landscape) {
    .auth-welcome,
    .auth-reset-info {
        padding: 20px;
        min-height: auto;
    }

    .auth-form-section {
        padding: 20px;
    }

    .auth-welcome-features,
    .auth-info-features {
        display: none; /* Hide feature list in landscape to save space */
    }
}

/* Very small screens - iPhone SE, etc. */
@media (max-width: 320px) {
    .auth-login-container,
    .auth-reset-container {
        padding: 2px;
    }

    .auth-welcome,
    .auth-reset-info,
    .auth-form-section {
        padding: 12px 8px;
    }

    .auth-welcome-header h1,
    .auth-info-header h1 {
        font-size: 18px;
    }

    .auth-form-header h2 {
        font-size: 16px;
    }

    .auth-form-input,
    .auth-form-select {
        font-size: 16px; /* Keep 16px to prevent zoom */
        padding: 10px;
    }

    .auth-credentials-row {
        gap: 10px;
    }

    .auth-login-btn,
    .auth-reset-btn {
        min-height: 48px;
        font-size: 15px;
        padding: 14px 16px;
    }

    .auth-form-group {
        margin-bottom: 12px;
    }
}
