/* Login Page Styles */

:root {
    --primary-color: #1A1A1A;      /* Deep Dark Grey */
    --secondary-color: #2B2B2B;    /* Industrial Grey */
    --accent-color: #D32F2F;       /* TTPD Red */
    --input-border: #D32F2F;       /* TTPD Red Border */
    --button-blue: #D32F2F;        /* TTPD Red Action */
    --text-primary: #000;
    --text-secondary: #666;
    --bg-light: #e8f1f6;
    --border-radius: 8px;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
}

body.login-page {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    min-height: 100vh;
    display: flex;
}

/* Login Wrapper - Two Column Layout */
.login-wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* Left Side - Truck Image */
.login-image-section {
    flex: 1;
    position: relative;
    overflow: hidden;
    display: flex;
}

.truck-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 60px 40px;
}

.image-text {
    color: white;
    font-weight: 900;
    line-height: .85;
    margin-left: 100px;
    width: 100%;
}

.image-text h2 {
    font-size: 52px;
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 900;
    font-family: 'Segoe UI', Arial, sans-serif;
}

.image-text p {
    font-size: 22px;
    margin: 15px 0 0 0;
    letter-spacing: 1.5px;
    font-weight: 700;
    font-family: 'Segoe UI', Arial, sans-serif;
}

/* Right Side - Login Form */
.login-form-section {
    flex: 1;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 520px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.auth-wide-container {
    max-width: 680px;
}

/* Header with Logo */
.login-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 0;
    width: 100%;
}

.brand-title {
    font-size: 48px;
    font-weight: 900;
    letter-spacing: -0.5px;
    margin: 0;
    line-height: 1.1;
    word-break: break-word;
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--primary-color);
}

.brand-primary {
    color: var(--primary-color);
    display: block;
    font-weight: 900;
    font-size: 44px;
}

.brand-secondary {
    color: var(--primary-color);
    font-weight: 900;
    font-size: 44px;
    display: inline-block;
}

.brand-accent {
    color: var(--accent-color);
    font-weight: 900;
    font-size: 44px;
    margin-left: 8px;
    display: inline-block;
}

/* Login Card */
.login-card {
    background: white;
    border-radius: 16px;
    padding: 40px 35px;
/*    box-shadow: 0 2px 8px rgba(26, 26, 26, 0.1), 0 4px 16px rgba(26, 26, 26, 0.05);*/
    width: 100%;
/*    border: 1px solid #E0E0E0;*/
}

.auth-switcher {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin: -18px 0 26px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
}

.auth-switcher a {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 7px 12px;
    border: 1px solid var(--input-border);
    border-radius: 999px;
    color: var(--accent-color);
    background: #f8fbfd;
    text-decoration: none;
    font-weight: 800;
    transition: border-color .2s ease, background .2s ease, color .2s ease;
}

.auth-switcher a:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    background: #fff1f1;
}

/* Form Groups */
.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.form-label {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Input Fields */
.login-input {
    padding: 15px 16px;
    font-size: 15px;
    border: 2px solid var(--input-border);
    border-radius: 6px;
    background-color: #e8f1f6;
    transition: all 0.3s ease;
    color: var(--text-primary);
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
    width: 100%;
    font-weight: 400;
}

.login-input::placeholder {
    color: #999;
    font-weight: 400;
}

.login-input:focus {
    outline: none;
    border-color: var(--button-blue);
    background-color: white;
    box-shadow: 0 0 0 4px rgba(211, 47, 47, 0.12);
}

/* Password Input Wrapper */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.password-input-wrapper .login-input {
    width: 100%;
    padding-right: 45px;
}

.password-toggle {
    position: absolute;
    right: 15px;
    cursor: pointer;
    color: #bbb;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
    background: none;
    border: none;
    touch-action: manipulation;
}

.password-toggle:hover {
    color: var(--button-blue);
}

.password-toggle:active {
    color: var(--button-blue);
}

.password-toggle.active {
    color: var(--button-blue);
}

.password-toggle svg {
    width: 22px;
    height: 22px;
    pointer-events: none;
}

/* Checkbox */
.form-check {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    gap: 10px;
}

.form-check-input {
    width: 20px;
    height: 20px;
    min-width: 20px;
    margin: 0;
    cursor: pointer;
    border: 2px solid #ddd;
    border-radius: 4px;
    accent-color: var(--button-blue);
    flex-shrink: 0;
}

.form-check-label {
    cursor: pointer;
    font-size: 16px;
    color: var(--text-primary);
    font-weight: 500;
    margin: 0;
}

/* Buttons */
.btn-signin {
    background: linear-gradient(180deg, #D32F2F 0%, #9F2424 100%);
    color: white;
    border: none;
    padding: 16px 20px;
    font-size: 18px;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    width: 100%;
    margin-bottom: 25px;
    font-family: inherit;
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
}

.btn-signin:hover {
    background: linear-gradient(180deg, #9F2424 0%, #D32F2F 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(211, 47, 47, 0.28);
}

.btn-signin:active {
    transform: translateY(0);
}

.btn-commercial {
    background: white;
    color: var(--accent-color);
    border: 2.5px solid var(--accent-color);
    padding: 12px 8px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
/*    letter-spacing: 0px;*/
    width: 100%;
    margin-bottom: 30px;
    font-family: inherit;
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    text-decoration: none;
}

.btn-commercial:hover {
/*    background: var(--);
    color: white;*/
    box-shadow: 0 8px 16px rgba(211, 47, 47, 0.25);
}

.btn-commercial:active {
    transform: translateY(0);
}

/* Links */
.forgot-password-container {
    text-align: center;
    margin-bottom: 20px;
}

.forgot-password-link {
    color: var(--button-blue);
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
}

.forgot-password-link:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

/* Footer */
.login-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid #E0E0E0;
    font-size: 14px;
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
}

.login-footer a {
    color: var(--button-blue);
    text-decoration: none;
    transition: color 0.2s ease;
}

.login-footer a:hover {
    color: var(--accent-color);
}

.footer-divider {
    color: #bbb;
    margin: 0 10px;
}

/* Alert Messages */
.alert {
    border-radius: var(--border-radius);
    border: none;
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-danger {
    background-color: #FFEBEE;
    color: #D32F2F;
    border-left: 4px solid #D32F2F;
}

.alert-success {
    background-color: #F5F5F5;
    color: #1A1A1A;
    border-left: 4px solid #D32F2F;
}

.auth-page-header {
    margin-bottom: 20px;
}

.auth-card {
    padding-top: 30px;
}

.auth-card-title {
    margin-bottom: 24px;
    text-align: center;
}

.auth-card-title h2 {
    margin: 0 0 8px;
    color: var(--primary-color);
    font-size: 28px;
    font-weight: 900;
    line-height: 1.1;
}

.auth-card-title p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 15px;
}

.auth-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.login-input:is(select) {
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, #6b7280 50%), linear-gradient(135deg, #6b7280 50%, transparent 50%);
    background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

/* ========== TABLET RESPONSIVE (iPad and Tablets - 770px and below) ========== */
@media (max-width: 770px) {
    .login-wrapper {
        flex-direction: column;
    }

    .login-image-section {
        display: flex;
        min-height: 300px;
        order: -1;
    }

    .login-form-section {
        flex: 1;
    }

    .image-overlay {
        padding: 40px 30px;
    }

    .image-text h2 {
        font-size: 32px;
        margin-bottom: 8px;
    }

    .image-text p {
        font-size: 16px;
    }

    .login-container {
        max-width: 100%;
    }

    .auth-wide-container {
        max-width: 100%;
    }

    .login-header {
        margin-bottom: 25px;
    }

    .brand-title {
        font-size: 40px;
    }

    .brand-secondary {
        font-size: 36px;
    }

    .brand-accent {
        font-size: 36px;
    }

    .brand-primary {
        font-size: 36px;
    }

    .login-card {
        padding: 35px 28px;
        border-radius: 14px;
    }

    .auth-switcher {
        justify-content: center;
        margin-top: -12px;
    }

    .auth-form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .form-label {
        font-size: 15px;
    }

    .btn-signin {
        padding: 14px 18px;
        font-size: 16px;
    }

    .btn-commercial {
        padding: 12px 4px;
        font-size: 14px;
    }
}

/* ========== SMALL PHONES (480px and below) ========== */
@media (max-width: 480px) {
    .login-image-section {
        display: flex;
        min-height: 250px;
        order: -1;
    }

    body.login-page {
        padding: 0;
    }

    .login-wrapper {
        flex-direction: column;
    }

    .login-form-section {
        padding: 20px 16px;
    }

    .login-container {
        max-width: 100%;
    }

    .image-overlay {
        padding: 30px 20px;
    }

    .image-text h2 {
        font-size: 28px;
        margin-bottom: 6px;
    }

    .image-text p {
        font-size: 14px;
    }

    .login-header {
        margin-bottom: 20px;
    }

    .brand-title {
        font-size: 32px;
    }

    .brand-primary {
        font-size: 28px;
    }

    .brand-secondary {
        font-size: 28px;
    }

    .brand-accent {
        font-size: 28px;
    }

    .login-card {
        padding: 28px 20px;
        border-radius: 12px;
    }

    .auth-switcher {
        flex-wrap: wrap;
        gap: 8px;
        margin-bottom: 22px;
    }

    .form-label {
        font-size: 14px;
        margin-bottom: 8px;
    }

    .login-input {
        padding: 13px 14px;
        font-size: 14px;
    }

    .form-check-label {
        font-size: 14px;
    }

    .btn-signin {
        padding: 12px 16px;
        font-size: 15px;
        margin-bottom: 20px;
    }

    .btn-commercial {
        padding: 12px 8px;
        font-size: 12px;
        margin-bottom: 25px;
    }

    .forgot-password-link {
        font-size: 14px;
    }

    .login-footer {
        font-size: 12px;
    }
}

/* ========== EXTRA SMALL PHONES (under 380px) ========== */
@media (max-width: 380px) {
    .brand-title {
        font-size: 28px;
    }

    .brand-primary {
        font-size: 28px;
    }

    .brand-secondary {
        font-size: 24px;
    }

    .brand-accent {
        font-size: 24px;
        margin-left: 3px;
    }

    .login-card {
        padding: 25px 18px;
    }

    .btn-signin {
        font-size: 14px;
        padding: 12px 14px;
    }

    .btn-commercial {
        font-size: 11px;
        padding: 10px 4px;
    }

    .image-text h2 {
        font-size: 24px;
    }

    .image-text p {
        font-size: 12px;
    }
}

/* ========== DESKTOP (1200px and above) ========== */
@media (min-width: 1200px) {
    .login-image-section {
        display: flex;
    }

    .login-form-section {
        max-width: 50%;
    }
}
