/* Login Page Styles - Professional & Elegant Design */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Cairo', Tahoma, Arial, sans-serif;
    direction: rtl;
    text-align: right;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    position: relative;
    overflow: hidden;
    padding: 20px;
}

/* Subtle professional pattern overlay */
.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(45deg, rgba(37, 99, 235, 0.02) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(37, 99, 235, 0.02) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(37, 99, 235, 0.02) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(37, 99, 235, 0.02) 75%);
    background-size: 80px 80px;
    background-position: 0 0, 0 40px, 40px -40px, -40px 0px;
    opacity: 1;
    pointer-events: none;
}

.login-card {
    background: #ffffff;
    box-shadow: 
        0 4px 6px rgba(0, 0, 0, 0.05),
        0 10px 25px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(0, 0, 0, 0.05);
    border-radius: 16px;
    position: relative;
    z-index: 1;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

/* Professional top accent line */
.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #2563eb 0%, #3b82f6 100%);
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    right: 16px;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 100%;
    color: #9ca3af;
    pointer-events: none;
    z-index: 1;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.input-icon svg {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 22px;
    max-height: 22px;
    stroke-width: 2;
}

.input-field {
    width: 100%;
    padding: 15px 50px 15px 18px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #ffffff;
    line-height: 1.5;
    font-family: 'Cairo', Tahoma, Arial, sans-serif;
    display: block;
    box-sizing: border-box;
    position: relative;
    z-index: 0;
    color: #1f2937;
}

.input-field::placeholder {
    line-height: 1.5;
    opacity: 0.5;
    padding-right: 0;
    color: #9ca3af;
}

.input-field:hover {
    border-color: #cbd5e1;
    background: #fafafa;
}

.input-field:focus {
    outline: none;
    border-color: #2563eb;
    background: #ffffff;
    box-shadow: 
        0 0 0 4px rgba(37, 99, 235, 0.1),
        0 2px 8px rgba(37, 99, 235, 0.1);
    transform: translateY(-1px);
}

.input-field:focus + .input-icon {
    color: #2563eb;
    transform: scale(1.1);
}

.input-field:not(:placeholder-shown) {
    border-color: #d1d5db;
}

/* Professional label styling */
label {
    display: block;
    line-height: 1.5;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 10px;
    font-size: 14px;
    letter-spacing: 0.01em;
}

/* Ensure consistent spacing */
.input-group {
    margin-top: 0;
}

/* Better icon positioning - ensure it doesn't overlap text */
.input-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.btn-primary {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 50%, #3b82f6 100%);
    color: white;
    font-weight: 700;
    font-size: 16px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 4px 15px rgba(37, 99, 235, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 8px 25px rgba(37, 99, 235, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.2) inset;
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 50%, #2563eb 100%);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 
        0 2px 10px rgba(37, 99, 235, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.btn-primary:focus {
    outline: none;
    box-shadow: 
        0 4px 15px rgba(37, 99, 235, 0.4),
        0 0 0 3px rgba(37, 99, 235, 0.2);
}

.logo-circle {
    width: 120px !important;
    height: 120px !important;
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-shadow: 
        0 4px 12px rgba(37, 99, 235, 0.25),
        0 0 0 1px rgba(37, 99, 235, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

/* Ensure logo circle size is consistent - override any conflicting styles */
.logo-circle img,
.logo-circle svg {
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    height: auto !important;
}

.logo-circle:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 6px 20px rgba(37, 99, 235, 0.3),
        0 0 0 1px rgba(37, 99, 235, 0.15);
}

/* Ensure logo image/svg takes proper size inside circle */
.logo-circle img,
.logo-circle svg {
    max-width: 75% !important;
    max-height: 75% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain;
}

/* Remove floating shapes for cleaner professional look */
.floating-shapes {
    display: none;
}

/* Additional Professional Enhancements */
.login-card {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo-section {
    animation: fadeInDown 0.6s ease-out;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Professional checkbox styling */
input[type="checkbox"] {
    accent-color: #2563eb;
    width: 18px;
    height: 18px;
    cursor: pointer;
    border-radius: 4px;
}

input[type="checkbox"]:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* Link hover effects */
a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Error message styling */
.text-red-600 {
    color: #dc2626;
    font-weight: 500;
}

/* Success message styling */
.bg-green-50 {
    background: #f0fdf4;
    border-color: #22c55e;
}

/* Mobile (Small devices) */
@media (max-width: 640px) {
    .login-container {
        padding: 16px;
        min-height: 100vh;
        align-items: flex-start;
        padding-top: 40px;
    }
    
    .login-card {
        margin: 0;
        border-radius: 18px;
        padding: 24px !important;
    }
    
    .logo-circle {
        width: 100px;
        height: 100px;
        margin-bottom: 16px;
    }
    
    .input-field {
        padding: 12px 45px 12px 14px;
        font-size: 16px; /* Prevents zoom on iOS */
        border-width: 1.5px;
        line-height: 1.5;
    }
    
    .input-icon {
        right: 12px;
        width: 18px;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        top: 0;
        bottom: 0;
    }
    
    .input-icon svg {
        max-width: 18px;
        max-height: 18px;
        display: block;
    }
    
    /* Better alignment for labels */
    label {
        display: block;
        line-height: 1.4;
        margin-bottom: 8px;
        font-weight: 600;
    }
    
    .btn-primary {
        padding: 14px;
        font-size: 16px;
        min-height: 48px; /* Touch-friendly */
    }
    
    .shape {
        display: none; /* Hide on very small screens */
    }
    
    h1 {
        font-size: 24px !important;
        margin-bottom: 8px !important;
    }
    
    h2 {
        font-size: 20px !important;
        margin-bottom: 8px !important;
    }
}

/* Tablet (Medium devices) */
@media (min-width: 641px) and (max-width: 1024px) {
    .login-container {
        padding: 24px;
    }
    
    .login-card {
        padding: 32px !important;
    }
    
    .logo-circle {
        width: 70px;
        height: 70px;
    }
    
    .input-field {
        padding: 13px 48px 13px 15px;
        font-size: 15px;
        line-height: 1.5;
    }
    
    .input-icon {
        right: 14px;
        width: 19px;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        top: 0;
        bottom: 0;
    }
    
    .input-icon svg {
        max-width: 19px;
        max-height: 19px;
    }
    
    label {
        line-height: 1.4;
        margin-bottom: 8px;
        font-weight: 600;
    }
    
    .shape:nth-child(3) {
        display: none; /* Hide one shape on tablet */
    }
}

/* Large screens */
@media (min-width: 1025px) {
    .login-container {
        padding: 40px;
        align-items: center;
        padding-top: 0;
    }
    
    .login-card {
        padding: 48px !important;
        margin-top: 0;
        position: relative;
        z-index: 2;
        max-width: 440px;
        width: 100%;
    }
    
    .logo-circle {
        width: 120px;
        height: 120px;
    }
    
    /* Logo section positioning */
    .logo-section {
        margin-bottom: 32px !important;
        margin-top: 0;
        position: relative;
        z-index: 3;
    }
    
    .desktop-form-container {
        margin-top: 0;
        position: relative;
        z-index: 2;
        max-width: 440px;
        width: 100%;
    }
    
    /* Professional text sizes on desktop */
    .logo-section h1 {
        font-size: 32px !important;
        margin-bottom: 8px !important;
        letter-spacing: -0.02em;
    }
    
    .logo-section p {
        font-size: 15px !important;
    }
}

/* Extra large screens */
@media (min-width: 1280px) {
    .login-container {
        padding: 50px;
    }
    
    .login-card {
        padding: 56px !important;
        max-width: 480px;
    }
    
    .logo-section {
        margin-bottom: 40px !important;
    }
    
    .logo-circle {
        width: 110px;
        height: 110px;
    }
    
    .logo-section h1 {
        font-size: 36px !important;
    }
    
    .logo-section p {
        font-size: 16px !important;
    }
}

/* Very small screens (landscape phones) */
@media (max-width: 480px) {
    .login-container {
        padding: 12px;
        padding-top: 20px;
    }
    
    .login-card {
        padding: 16px !important;
    }
    
    .logo-circle {
        width: 80px;
        height: 80px;
    }
    
    .input-field {
        padding: 11px 42px 11px 12px;
        font-size: 16px;
        line-height: 1.5;
    }
    
    .input-icon {
        right: 10px;
        width: 16px;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        top: 0;
        bottom: 0;
    }
    
    .input-icon svg {
        max-width: 16px;
        max-height: 16px;
    }
    
    label {
        line-height: 1.3;
        margin-bottom: 6px;
    }
    
    .btn-primary {
        padding: 12px;
        font-size: 15px;
    }
    
    h1 {
        font-size: 20px !important;
    }
    
    h2 {
        font-size: 18px !important;
    }
}

/* Landscape orientation */
@media (max-height: 600px) and (orientation: landscape) {
    .login-container {
        padding-top: 20px;
        padding-bottom: 20px;
    }
    
    .logo-circle {
        width: 90px !important;
        height: 90px !important;
        margin-bottom: 12px;
    }
    
    .logo-circle img,
    .logo-circle svg {
        max-width: 70% !important;
        max-height: 70% !important;
    }
    
    .login-card {
        padding: 24px !important;
    }
    
    .space-y-5 > * + * {
        margin-top: 12px;
    }
    
    .logo-section {
        margin-bottom: 16px !important;
    }
}

/* Professional scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

::-webkit-scrollbar-thumb {
    background: rgba(37, 99, 235, 0.5);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(37, 99, 235, 0.7);
}

/* Selection styling */
::selection {
    background: rgba(37, 99, 235, 0.2);
    color: #1f2937;
}

::-moz-selection {
    background: rgba(37, 99, 235, 0.2);
    color: #1f2937;
}

