/* Authentication Pages Styles - كشك */

:root {
    --primary-color: #4f46e5;
    --primary-dark: #4338ca;
    --secondary-color: #0ea5e9;
    --accent-color: #f59e0b;
    --dark-color: #1f2937;
    --light-color: #f3f4f6;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --border-radius: 16px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 20px 50px rgba(0, 0, 0, 0.15);
}

body {
    background: #f8fafc;
    min-height: 100vh;
    font-family: 'Cairo', sans-serif;
}

/* Home Button */
.home-btn {
    position: absolute;
    right: 30px;
    top: 30px;
    z-index: 10;
}

.home-btn a {
    background: white;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    transition: all 0.25s ease;
    color: var(--primary-color) !important;
    text-decoration: none;
}

.home-btn a:hover {
    box-shadow: var(--shadow-lg);
    background: var(--primary-color);
    color: white !important;
}

/* Account Pages */
.account-pages {
    padding: 60px 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

/* Card Styles */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    overflow: visible !important;
    background: white;
}

/* Logo Header */
.bg-login {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%) !important;
    padding: 50px 0 !important;
    border-radius: var(--border-radius) var(--border-radius) 0 0 !important;
    position: relative;
    overflow: hidden;
}

.bg-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('/images/pattern.png') repeat;
    opacity: 0.08;
}

.bg-login .position-relative {
    position: relative;
    z-index: 2;
}

.bg-login h5 {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.bg-login img {
    filter: brightness(0) invert(1);
    max-height: 80px;
    width: auto;
}

.bg-login-overlay {
    display: none !important;
}

/* Register Card Header */
.register-card {
    border-radius: 24px;
    overflow: hidden;
}

.register-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    padding: 3rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-radius: 24px;
}

.register-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
    opacity: 0.6;
}

.register-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('/images/pattern.png') repeat;
    opacity: 0.03;
}

.header-content {
    position: relative;
    z-index: 2;
}

.logo-register {
    display: inline-block;
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease;
}

.logo-register:hover {
    transform: scale(1.05);
}

.logo-register img {
    filter: brightness(0) invert(1);
    max-height: 70px;
}

.register-title {
    color: white;
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.register-subtitle {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.1rem;
    margin-bottom: 0;
    font-weight: 400;
}

/* Card Body */
.card-body {
    padding: 3rem 2.5rem;
}

/* Form Elements */
.form-group {
    margin-bottom: 1.75rem;
}

.form-group label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.625rem;
    font-size: 0.9375rem;
    display: block;
}

.form-control {
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.875rem 1.125rem;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
    background: #fafbfc;
    line-height: 1.5;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
    background: white;
    outline: none;
}

.form-control::placeholder {
    color: #94a3b8;
}

.form-control.is-invalid {
    border-color: var(--danger-color);
    background: #fef2f2;
}

.form-control.is-invalid:focus {
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.08);
}

/* Invalid Feedback */
.invalid-feedback {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.8125rem;
    color: var(--danger-color);
    font-weight: 500;
}

/* Custom Checkbox */
.custom-control-label {
    font-weight: 500;
    color: #64748b;
    font-size: 0.9375rem;
}

.custom-control-input:checked ~ .custom-control-label::before {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.custom-control-input:focus ~ .custom-control-label::before {
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}

/* Buttons */
.btn {
    padding: 0.875rem 1.75rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
    border: none;
    line-height: 1.5;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%) !important;
    color: white !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
}

.btn-primary:active {
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.btn-block {
    width: 100%;
    display: block;
}

/* Links */
.text-muted {
    color: #64748b !important;
    text-decoration: none;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
    font-weight: 500;
}

.text-muted:hover {
    color: var(--primary-color) !important;
}

.text-muted i {
    margin-left: 6px;
}

/* Alert */
.alert {
    border: none;
    border-radius: 12px;
    padding: 1.125rem 1.5rem;
    font-weight: 500;
    font-size: 0.9375rem;
}

.alert-warning {
    background-color: #fef3c7;
    color: #92400e;
    border-left: 4px solid #f59e0b;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border-left: 4px solid #10b981;
}

.alert-danger {
    background-color: #fee2e2;
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

.alert-info {
    background-color: #dbeafe;
    color: #1e40af;
    border-left: 4px solid #2563eb;
}

/* Responsive Row Adjustments */
.row.justify-content-between {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.row.justify-content-between > div {
    flex: 1;
    min-width: 200px;
}

/* File Upload Styling */
.file-input-wrapper {
    position: relative;
    overflow: hidden;
    display: inline-block;
    width: 100%;
}

.file-input-wrapper input[type=file] {
    position: absolute;
    left: -9999px;
}

.file-input-label {
    background: #f9fafb;
    border: 2px dashed #e5e7eb;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
}

.file-input-label:hover {
    border-color: var(--primary-color);
    background: #f0f9ff;
}

/* Textarea */
textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

/* Select Dropdown */
select.form-control,
.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: left 0.75rem center;
    background-size: 16px 12px;
    padding-left: 2.5rem;
    padding-right: 1.125rem;
    padding-top: 0;
    padding-bottom: 0;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

/* Fix for dselect dropdown */
.dselect-wrapper {
    position: relative;
}

.dselect-wrapper .form-select {
    cursor: pointer;
    padding-right: 1rem;
}

.dselect-wrapper .dropdown-menu {
    direction: rtl;
    text-align: right;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    border: 1px solid #e2e8f0;
    max-height: 300px;
    overflow-y: auto;
}

.dselect-wrapper .dropdown-item {
    padding: 0.75rem 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: right;
    direction: rtl;
}

.dselect-wrapper .dropdown-item:hover {
    background-color: #f3f4f6;
    color: var(--primary-color);
}

.dselect-wrapper .dropdown-item.active {
    background-color: var(--primary-color);
    color: white;
}

.dselect-wrapper .form-control,
.dselect-wrapper .form-select,
.dselect-wrapper select {
    text-align: right;
    direction: rtl;
    padding: 0.875rem 1rem;
    padding-left: 2.5rem;
}

/* Multilingual Tabs */
.nav-tabs {
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 1.5rem;
}

.nav-tabs .nav-link {
    border: none;
    color: #6b7280;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 8px 8px 0 0;
}

.nav-tabs .nav-link.active {
    background: var(--primary-color);
    color: white;
}

.nav-tabs .nav-link:hover:not(.active) {
    color: var(--primary-color);
    background: #f0f9ff;
}

/* Responsive Design */
@media (max-width: 768px) {
    .account-pages {
        padding: 40px 0;
    }

    .card-body {
        padding: 1.5rem;
    }

    .row.justify-content-between {
        flex-direction: column;
    }

    .row.justify-content-between > div {
        width: 100%;
    }

    .home-btn {
        right: 15px;
        top: 15px;
    }

    .home-btn a {
        width: 45px;
        height: 45px;
    }
}

/* Loading State */
.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Form Focus States */
.form-control:focus,
.custom-control-input:focus ~ .custom-control-label::before {
    outline: none;
}

/* Success State */
.form-control.is-valid {
    border-color: var(--success-color);
}

.form-control.is-valid:focus {
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Card Title */
.card-title {
    font-size: 1.625rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 1.75rem;
    text-align: center;
    letter-spacing: -0.02em;
}

/* Additional spacing for register form */
.register-form .row {
    margin-bottom: 1.125rem;
}

/* Map container */
#map,
#address-map-container {
    border-radius: 16px;
    overflow: hidden;
    border: 2px solid #e2e8f0;
    min-height: 400px;
    margin-top: 1rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

#address-map-container:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

#address-map {
    cursor: crosshair;
}

.map-input {
    margin-bottom: 1rem !important;
}

/* Parsley Validation */
.parsley-errors-list {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0 0;
}

.parsley-errors-list li {
    color: var(--danger-color);
    font-size: 0.8125rem;
    font-weight: 500;
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.5rem 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e2e8f0;
}

.divider span {
    padding: 0 1rem;
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Password Toggle */
.password-toggle {
    position: relative;
}

.password-toggle-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #64748b;
    transition: color 0.2s ease;
}

.password-toggle-icon:hover {
    color: var(--primary-color);
}

/* Split Login Card Design */
.login-split-card {
    border: none;
    border-radius: 40px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    min-height: 600px;
}

.login-split-card .row {
    min-height: 600px;
}

/* Login Form Section (Left) */
.login-form-section {
    padding: 3rem 2.5rem;
    background: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 600px;
    border-radius: 40px;
    box-shadow: -4px 0 12px rgba(0, 0, 0, 0.08);
}

.logo-small {
    display: inline-block;
    transition: transform 0.3s ease;
}

.logo-small:hover {
    transform: scale(1.05);
}

.login-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--dark-color);
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.login-subtitle {
    font-size: 1rem;
    color: #64748b;
    margin-bottom: 2.5rem;
    font-weight: 400;
}

.login-form-section .form-group {
    margin-bottom: 1.5rem;
}

.login-form-section label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.login-form-section .input-group-text {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-right: none;
    color: #64748b;
    border-radius: 0 20px 20px 0;
    padding: 0 1rem;
}

.login-form-section .form-control {
    border: 1px solid #e2e8f0;
    border-left: none;
    border-radius: 20px 0 0 20px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    text-align: right;
}

.login-form-section .input-group .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: none;
}

.login-form-section .input-group .form-control:focus + .input-group-text,
.login-form-section .input-group-text:has(+ .form-control:focus) {
    border-color: var(--primary-color);
}

.forgot-password {
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.forgot-password:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.btn-login {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border: none;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.register-link {
    color: var(--primary-color);
    font-weight: 700;
    text-decoration: none;
    margin-right: 0.5rem;
    transition: color 0.2s ease;
}

.register-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Welcome Section (Left) */
.login-welcome-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 3rem 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    border-radius: 40px;
    box-shadow: 4px 0 12px rgba(0, 0, 0, 0.08);
}

.login-welcome-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
    opacity: 0.6;
}

.login-welcome-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('/images/pattern.png') repeat;
    opacity: 0.03;
}

.welcome-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.welcome-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
    color: white;
}

.welcome-text {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 3rem;
    opacity: 0.95;
    max-width: 450px;
    margin-left: auto;
    margin-right: auto;
}

.welcome-features {
    text-align: right;
    margin-bottom: 3rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.feature-item {
    display: flex;
    align-items: center;
    margin-bottom: 1.25rem;
    font-size: 1.05rem;
    gap: 1rem;
}

.feature-item i {
    font-size: 1.25rem;
    color: #4ade80;
    flex-shrink: 0;
}

.feature-item span {
    flex: 1;
}

.welcome-illustration {
    margin-top: 2rem;
    opacity: 0.2;
}

.welcome-illustration img {
    max-width: 200px;
    filter: brightness(0) invert(1);
}

/* Responsive Design */
@media (max-width: 991px) {
    .login-split-card .row {
        min-height: auto;
    }

    .login-welcome-section {
        border-radius: 40px;
        margin-bottom: 1.5rem;
    }

    .login-form-section {
        border-radius: 40px;
    }

    .login-form-section,
    .login-welcome-section {
        min-height: auto;
        padding: 2.5rem 2rem;
    }

    .welcome-title {
        font-size: 2rem;
    }

    .welcome-text {
        font-size: 1rem;
    }

    .welcome-features {
        margin-bottom: 2rem;
    }

    .login-title {
        font-size: 1.75rem;
    }
}

@media (max-width: 575px) {
    .login-form-section {
        padding: 2rem 1.5rem;
    }

    .login-welcome-section {
        padding: 2rem 1.5rem;
    }

    .login-title {
        font-size: 1.5rem;
    }

    .welcome-title {
        font-size: 1.75rem;
    }

    .welcome-icon {
        width: 80px;
        height: 80px;
    }

    .welcome-icon i {
        font-size: 2.5rem;
    }
}
