/* ===================================
   Modern Login Page Design
   Split Screen Layout
   =================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: Tahoma, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333333;
    background: #f4f4f4;
    overflow-x: hidden;
    min-height: 100vh;
    width: 100%;
    position: relative;
}

#wrap {
    padding: 0;
    margin: 0;
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
}

/* ===================================
   Login Container - Split Screen
   =================================== */
.login-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    direction: rtl;
    flex-direction: row-reverse;
    position: relative;
    overflow: hidden;
}

/* ===================================
   Left Side - GPS Banner (Background Image)
   =================================== */
.login-banner {
    flex: 2;
    background-image: url('/application/layouts/modern/images/gps-tracking-banner.png');
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    position: relative;
    min-height: 100vh;
}

/* Banner content - simplified for background image only */
.banner-content,
.banner-overlay,
.banner-image,
.banner-text,
.banner-features,
.feature-item {
    display: none;
}

/* ===================================
   Right Side - Login Form
   =================================== */
.login-form-container {
    flex: 3;
    background: #f4f4f4;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    overflow-y: auto;
    min-height: 100vh;
}

.login-form-wrapper {
    width: 100%;
    /*max-width: 400px;*/
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Language Switcher - Custom Select */
.language-switcher-wrapper {
    margin-bottom: 20px;
    width: 100%;
    max-width: 200px;
}

.custom-select-language {
    position: relative;
    width: 100%;
    font-family: Tahoma, sans-serif;
}

/* Selected item (what shows) */
.select-selected {
    background-color: #fff;
    padding: 10px 14px;
    border: 1px solid RGBA(46, 90, 166, 0.5);
    border-radius: 0.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    user-select: none;
}

.select-selected:hover {
    background-color: #f8f9fa;
    border-color: #2E5AA6;
}

.select-selected img {
    width: 24px;
    height: 18px;
    object-fit: cover;
    border-radius: 3px;
    flex-shrink: 0;
}

.select-selected span {
    flex: 1;
    font-size: 14px;
    color: #2d3748;
    font-weight: 500;
}

.select-arrow {
    width: 16px;
    height: 16px;
    stroke: #718096;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.select-arrow-active .select-arrow {
    transform: rotate(180deg);
}

/* Dropdown items */
.select-items {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background-color: white;
    border: 1px solid RGBA(46, 90, 166, 0.5);
    border-radius: 0.3rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 99;
    overflow: hidden;
}

.select-items div {
    padding: 10px 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s ease;
}

.select-items div:hover {
    background-color: #f8f9fa;
}

.select-items div img {
    width: 24px;
    height: 18px;
    object-fit: cover;
    border-radius: 3px;
    flex-shrink: 0;
}

.select-items div span {
    font-size: 14px;
    color: #2d3748;
    font-weight: 500;
}

/* Hide dropdown by default */
.select-hide {
    display: none;
}

/* Active state */
.select-arrow-active {
    background-color: #f8f9fa;
    border-color: #2E5AA6;
}

/* Page Headers */
.page-header {
    color: #2E5AA6;
    font-size: 1.2rem;
    text-align: center;
    font-weight: 700;
    margin-top: 2rem;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.page-header2 {
    color: #2E5AA6;
    font-size: 2rem;
    text-align: center;
    font-weight: 700;
    margin-top: 0.6rem;
    margin-bottom: 30px;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

/* Login Brand */
.login-brand {
    text-align: center;
    margin-bottom: 0;
    width: 100%;
}

.brand-icon {
    display: none;
}

.login-brand h2 {
    color: #2E5AA6;
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 5px;
    font-family: Tahoma, sans-serif;
}

.login-subtitle {
    font-size: 0.9rem;
    color: #666;
    font-family: Tahoma, sans-serif;
    margin-bottom: 20px;
}

/* Alert Messages */
.alert-modern {
    padding: 12px 15px;
    margin-bottom: 20px;
    border-radius: 0.3rem;
    font-size: 0.9rem;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-error svg {
    display: none;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.alert-info svg {
    display: none;
}

/* Login Form Content */
.login-form-content {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid RGBA(46, 90, 166, 0.5);
    padding: 30px;
    border-radius: 0.4rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.login-form-content form {
    width: 100%;
}

/* Reset Zend Form wrapper styles */
.login-form-content form > div,
.login-form-content form > dl,
.login-form-content form > dt,
.login-form-content form > dd {
    width: 100%;
    margin: 0;
    padding: 0;
}

/* Form elements wrapper */
.login-form-content .form-element,
.login-form-content dt,
.login-form-content dd {
    width: 100% !important;
    margin: 0 0 15px 0 !important;
    padding: 0 !important;
    float: none !important;
    display: block !important;
}

/* Input fields */
.login-form-content input[type="text"],
.login-form-content input[type="password"] {
    width: 100% !important;
    padding: 12px 20px;
    border: 1px solid RGBA(46, 90, 166, 0.5);
    border-radius: 0.3rem;
    font-size: 14px;
    font-family: Tahoma, sans-serif;
    transition: border-color 0.3s;
    margin: 0 !important;
    background-color: #FAFAFA;
    direction: rtl;
    box-sizing: border-box;
}

.login-form-content input[type="text"]:focus,
.login-form-content input[type="password"]:focus {
    outline: none;
    border-color: #2E5AA6;
    background-color: #FAFAFA;
}

/* Placeholder styles */
.login-form-content input[type="text"]::placeholder,
.login-form-content input[type="password"]::placeholder {
    color: #a0aec0;
    opacity: 1;
    font-family: Tahoma, sans-serif;
    font-size: 14px;
}

.login-form-content input[type="text"]::-webkit-input-placeholder,
.login-form-content input[type="password"]::-webkit-input-placeholder {
    color: #a0aec0;
    opacity: 1;
    font-family: Tahoma, sans-serif;
}

.login-form-content input[type="text"]::-moz-placeholder,
.login-form-content input[type="password"]::-moz-placeholder {
    color: #a0aec0;
    opacity: 1;
    font-family: Tahoma, sans-serif;
}

.login-form-content input[type="text"]:-ms-input-placeholder,
.login-form-content input[type="password"]:-ms-input-placeholder {
    color: #a0aec0;
    opacity: 1;
    font-family: Tahoma, sans-serif;
}

/* Password Field Wrapper with Toggle Button */
.password-field-wrapper {
    position: relative;
    width: 100%;
}

.password-field-wrapper input[type="password"],
.password-field-wrapper input[type="text"] {
    padding-left: 50px !important; /* Make room for the button */
}

.password-toggle-btn {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 50px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 0;
    outline: none;
}

.password-toggle-btn:hover {
    background: rgba(46, 90, 166, 0.1);
}

.password-toggle-btn:active {
    background: rgba(46, 90, 166, 0.2);
}

.password-toggle-btn .eye-icon {
    stroke: #718096;
    transition: stroke 0.3s ease;
}

.password-toggle-btn:hover .eye-icon {
    stroke: #2E5AA6;
}

.password-toggle-btn.password-visible .eye-icon {
    stroke: #2E5AA6;
}

/* Submit button */
.login-form-content input[type="submit"],
.login-form-content button[type="submit"] {
    width: 100% !important;
    padding: 12px 20px;
    background: #2E5AA6;
    color: #fff;
    border: none;
    border-radius: 0.5rem;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
    font-family: Tahoma, sans-serif;
    text-shadow: 0 1px 1px rgba(0,0,0,.3);
    box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.42);
    margin: 1rem 0 0 !important;
    box-sizing: border-box;
    outline: none;
    text-align: center;
}

.login-form-content input[type="submit"]:hover,
.login-form-content button[type="submit"]:hover {
    background: #1e4080;
}

.login-form-content input[type="submit"]:active,
.login-form-content button[type="submit"]:active {
    background: #1e4080;
}

/* Hide default labels */
#login-label,
#forget-label,
#username-label,
#password-label,
#mobile-label,
.login-form-content label {
    display: none!important;
}

/* Element containers */
#login-element,
#forget-element,
#username-element,
#password-element,
#mobile-element,
#email-element,
#revert-element,
#send-element,
#sendpassword-element {
    width: 100% !important;
    margin: 0 0 16px 0 !important;
    padding: 0 !important;
    float: none !important;
    clear: both !important;
}

/* Clear floats */
.login-form-content::after,
.login-form-content form::after {
    content: "";
    display: table;
    clear: both;
}

/* Forget Password Link */
.forget-password-link {
    text-align: center;
    margin-top: 1rem;
}

.forget-password-link a {
    color: #2E5AA6;
    font-size: 0.9rem;
    text-decoration: none;
    font-family: Tahoma, sans-serif;
    transition: color 0.3s;
    display: block;
}

.forget-password-link a:hover {
    color: #1e4080;
    text-decoration: underline;
}

/* Social Line */
.social-line {
    text-align: center;
    padding: 1rem 0;
    margin-top: 20px;
}

.social-line img {
    max-width: 200px;
    width: 100%;
    height: auto;
}

/* Social Networks */
.socialnetworks {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-top: 10px;
}

.socialnetworks a img {
    width: 40px;
    height: 40px;
    transition: transform 0.3s;
}

.socialnetworks a:hover img {
    transform: scale(1.1);
}

/* App Downloads */
.appdownloads {
    display: flex;
    gap: 1rem;
    max-width: 300px;
    margin: 2rem auto 0;
    width: 100%;
}

.appdownloads a {
    flex: 1;
}

.appdownloads img {
    width: 100%;
    height: auto;
    transition: transform 0.3s;
}

.appdownloads a:hover img {
    transform: scale(1.05);
}

/* Support Phones */
.support-phones {
    display: flex;
    gap: 0.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.support-phones > a {
    display: flex;
    background: #fff;
    border: 1px solid RGBA(46, 90, 166, 0.5);
    padding: 10px 15px;
    gap: 0.5rem;
    border-radius: 0.4rem;
    font-size: 0.85rem;
    text-decoration: none;
    color: #333;
    align-items: center;
    transition: all 0.3s;
}

.support-phones > a:hover {
    background: #2E5AA6;
    color: #fff;
    border-color: #2E5AA6;
}

.support-phones img {
    width: 18px;
    height: 18px;
}

/* ===================================
   Responsive Design
   =================================== */

/* Tablet - iPad (768px - 1024px) */
@media screen and (max-width: 1024px) {
    .login-banner {
        width: 40%;
    }

    .login-form-container {
        width: 60%;
    }

    .login-form-content {
        padding: 25px;
    }

    .page-header {
        font-size: 1.1rem;
    }

    .page-header2 {
        font-size: 1.7rem;
    }
}

/* Mobile Landscape & Small Tablets (576px - 768px) */
@media screen and (max-width: 768px) {
    .login-container {
        flex-direction: column;
        min-height: auto;
    }

    .login-banner {
        display: none;
    }

    .login-form-container {
        width: 100%;
        flex: 1;
        min-height: 100vh;
        padding: 15px;
    }

    .login-form-wrapper {
        max-width: 100%;
        width: 100%;
    }

    .page-header {
        font-size: 1.1rem;
        font-weight: 800;
        margin-top: 1rem;
        color: #1e4080;
        letter-spacing: 0.8px;
        text-shadow: 0 2px 3px rgba(0, 0, 0, 0.2);
    }

    .page-header2 {
        font-size: 1.6rem;
        font-weight: 800;
        margin-bottom: 20px;
        color: #1e4080;
        letter-spacing: 1px;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
    }

    .login-form-content {
        padding: 20px;
        max-width: 100%;
    }

    .socialnetworks {
        gap: 1rem;
    }

    .socialnetworks a img {
        width: 35px;
        height: 35px;
    }

    .appdownloads {
        max-width: 250px;
        margin: 1.5rem auto 0;
    }

    .support-phones {
        margin-top: 1.5rem;
        gap: 0.4rem;
    }

    .support-phones > a {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
}

/* Mobile Portrait (up to 576px) */
@media screen and (max-width: 576px) {
    body {
        font-size: 14px;
    }

    .login-form-container {
        padding: 10px;
    }

    .login-form-wrapper {
        max-width: 100%;
        width: 100%;
    }

    .login-form-content {
        padding: 15px;
    }

    .page-header {
        margin-top: 0.5rem;
        font-size: 1rem;
        font-weight: 900;
        color: #1e4080;
        letter-spacing: 1px;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
    }

    .page-header2 {
        font-size: 1.4rem;
        font-weight: 900;
        color: #1e4080;
        letter-spacing: 1.2px;
        text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    }

    .login-brand h2 {
        font-size: 1rem;
    }

    .login-subtitle {
        font-size: 0.85rem;
    }

    .login-form-content input[type="text"],
    .login-form-content input[type="password"] {
        padding: 10px 16px;
        font-size: 14px;
    }

    .login-form-content input[type="submit"],
    .login-form-content button[type="submit"] {
        padding: 10px 18px;
        font-size: 15px;
    }

    .social-line img {
        max-width: 150px;
    }

    .socialnetworks {
        gap: 0.8rem;
    }

    .socialnetworks a img {
        width: 32px;
        height: 32px;
    }

    .appdownloads {
        max-width: 200px;
        gap: 0.5rem;
    }

    .support-phones {
        flex-direction: column;
        width: 100%;
    }

    .support-phones > a {
        width: 100%;
        justify-content: center;
    }
}