/* Page Loader */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(-45deg, #ff6b35, #ff8c42, #4ecdc4, #45b7aa);
    background-size: 400% 400%;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-logo {
    font-size: 42px;
    font-weight: 900;
    background: linear-gradient(135deg, #fff, rgba(255, 255, 255, 0.8));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 4px;
    margin-bottom: 30px;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.9; }
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loader-text {
    color: white;
    font-size: 14px;
    margin-top: 20px;
    font-weight: 600;
    letter-spacing: 1px;
}

/* Default Light Mode - Animated Gradient Background - Orange & Light Blue */
.login-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(-45deg, #ff6b35, #ff8c42, #4ecdc4, #45b7aa);
    background-size: 400% 400%;
    animation: gradientBG 12s ease infinite;
    z-index: -1;
    overflow: hidden;
    transition: background 0.5s ease;
}

/* Dark Mode Background */
.login-background.dark-mode {
    background: linear-gradient(-45deg, #1a1a2e, #16213e, #0f3460, #1a1a2e);
    background-size: 400% 400%;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Floating POS Icons */
.pos-float {
    position: absolute;
    font-size: 50px;
    opacity: 0.12;
    color: white;
    animation: floatPOS 20s infinite linear;
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.1));
    transition: opacity 0.5s ease;
}

.login-background.dark-mode .pos-float {
    opacity: 0.06;
}

.pos-float:nth-child(1) { top: 8%; left: 8%; animation-duration: 18s; animation-delay: 0s; }
.pos-float:nth-child(2) { top: 15%; right: 12%; animation-duration: 22s; animation-delay: -3s; }
.pos-float:nth-child(3) { bottom: 20%; left: 15%; animation-duration: 25s; animation-delay: -5s; }
.pos-float:nth-child(4) { bottom: 12%; right: 8%; animation-duration: 20s; animation-delay: -8s; }
.pos-float:nth-child(5) { top: 40%; left: 5%; animation-duration: 28s; animation-delay: -2s; }
.pos-float:nth-child(6) { top: 35%; right: 6%; animation-duration: 24s; animation-delay: -10s; }
.pos-float:nth-child(7) { bottom: 35%; right: 18%; animation-duration: 26s; animation-delay: -6s; }
.pos-float:nth-child(8) { bottom: 45%; left: 8%; animation-duration: 21s; animation-delay: -12s; }
.pos-float:nth-child(9) { top: 60%; left: 20%; animation-duration: 23s; animation-delay: -4s; }
.pos-float:nth-child(10) { top: 25%; left: 25%; animation-duration: 27s; animation-delay: -7s; }

@keyframes floatPOS {
    0% { transform: translateY(0) rotate(0deg) scale(1); }
    25% { transform: translateY(-30px) rotate(90deg) scale(1.1); }
    50% { transform: translateY(-60px) rotate(180deg) scale(1); }
    75% { transform: translateY(-30px) rotate(270deg) scale(0.9); }
    100% { transform: translateY(0) rotate(360deg) scale(1); }
}

/* Dark Mode Toggle Button */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    padding: 10px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    animation: fadeIn 1s ease-out 1.5s both;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.theme-toggle i {
    font-size: 20px;
    color: white;
    transition: all 0.3s ease;
}

.theme-toggle .toggle-text {
    color: white;
    font-size: 14px;
    font-weight: 600;
}

/* Glassmorphism Card - Light Mode */
.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 28px;
    box-shadow: 0 35px 70px rgba(0, 0, 0, 0.12);
    animation: slideUp 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-width: 480px;
    width: 100%;
    position: relative;
    z-index: 10;
    transition: all 0.5s ease;
}

/* Glassmorphism Card - Dark Mode */
.login-card.dark-mode {
    background: rgba(30, 30, 50, 0.92);
    backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 35px 70px rgba(0, 0, 0, 0.4);
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(80px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Logo */
.login-logo {
    animation: fadeInDown 0.7s ease-out 1.2s both;
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Company Logo */
.company-logo {
    animation: fadeIn 1s ease-out 1.4s both;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

/* Simple Form Group */
.form-group {
    margin-bottom: 22px;
    animation: fadeInRight 0.6s ease-out both;
}

.form-group:nth-of-type(1) { animation-delay: 1.5s; }
.form-group:nth-of-type(2) { animation-delay: 1.65s; }

@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Simple Input Styling - Light Mode */
.login-form .form-control {
    width: 100%;
    padding: 16px 18px;
    border: 2.5px solid #e0e0e0;
    border-radius: 14px;
    font-size: 16px;
    background: #f9f9f9;
    transition: all 0.3s ease;
    color: #2d3436;
    font-weight: 500;
}

/* Simple Input Styling - Dark Mode */
.login-card.dark-mode .form-control {
    background: #1a1a2e;
    border-color: #3a3a5c;
    color: #e0e0e0;
}

.login-card.dark-mode .form-control::placeholder {
    color: #888;
}

.login-form .form-control:focus {
    outline: none;
    border-color: #ff6b35;
    background: #fff;
    box-shadow: 0 0 0 5px rgba(255, 107, 53, 0.12);
}

.login-card.dark-mode .form-control:focus {
    background: #252545;
    border-color: #ff6b35;
    box-shadow: 0 0 0 5px rgba(255, 107, 53, 0.2);
}

/* Password Field - Blue Accent */
.login-form .has-error .form-control {
    border-color: #e74c3c;
    background: #fff5f5;
}

.login-form .has-error .form-control:focus {
    border-color: #e74c3c;
    box-shadow: 0 0 0 5px rgba(231, 76, 60, 0.12);
}

/* Labels - Light Mode */
.login-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2d3436;
    font-size: 14px;
    transition: color 0.3s ease;
}

.login-form .form-group:nth-of-type(1) label {
    color: #ff6b35;
}

.login-form .form-group:nth-of-type(2) label {
    color: #4ecdc4;
}

/* Labels - Dark Mode */
.login-card.dark-mode label {
    color: #c0c0c0;
}

.login-card.dark-mode .form-group:nth-of-type(1) label {
    color: #ff9f6b;
}

.login-card.dark-mode .form-group:nth-of-type(2) label {
    color: #6ee7de;
}

/* Validation Error */
.help-block {
    color: #e74c3c;
    font-size: 13px;
    margin-top: 6px;
    font-weight: 500;
}

/* Submit Button */
.btn-login {
    background: linear-gradient(135deg, #ff6b35 0%, #4ecdc4 100%);
    border: none;
    border-radius: 14px;
    padding: 16px 32px;
    font-weight: 700;
    font-size: 17px;
    letter-spacing: 0.5px;
    transition: all 0.35s ease;
    position: relative;
    overflow: hidden;
    width: 100%;
    margin-top: 10px;
    color: white;
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
    transition: left 0.6s ease;
}

.btn-login:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 35px rgba(255, 107, 53, 0.35);
    color: white;
}

.btn-login:hover::before { left: 100%; }
.btn-login:active { transform: translateY(-2px); }

/* Loading State */
.btn-login.loading {
    pointer-events: none;
    color: transparent;
}

.btn-login.loading::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    top: 50%;
    left: 50%;
    margin-left: -11px;
    margin-top: -11px;
    border: 3px solid #fff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
}

/* Title - Light Mode */
.login-title {
    color: #2d3436;
    font-weight: 800;
    font-size: 28px;
    animation: fadeIn 0.8s ease-out 1.3s both;
    margin-bottom: 6px;
    transition: color 0.3s ease;
}

.login-subtitle {
    color: #636e72;
    font-size: 15px;
    animation: fadeIn 0.8s ease-out 1.4s both;
    font-weight: 500;
    transition: color 0.3s ease;
}

/* Title - Dark Mode */
.login-card.dark-mode .login-title {
    color: #e8e8e8;
}

.login-card.dark-mode .login-subtitle {
    color: #a0a0a0;
}

/* Card Body */
.login-card .card-body { padding: 48px 44px; }

/* Company Logo */
.company-logo img {
    border-radius: 20px;
    box-shadow: 0 10px 35px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}
.company-logo img:hover { transform: scale(1.05); }

/* Body Background */
body.background { background: transparent !important; }
body.show-spinner.no-footer { background: transparent; }

/* Footer */
.login-footer {
    animation: fadeIn 1s ease-out 1.8s both;
    color: rgba(255,255,255,0.85);
    font-size: 15px;
    margin-top: 25px;
    font-weight: 500;
    position: relative;
    z-index: 10;
}

/* Card Top Bar */
.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 55%;
    height: 5px;
    background: linear-gradient(90deg, #ff6b35, #4ecdc4);
    border-radius: 0 0 15px 15px;
    transition: background 0.5s ease;
}

/* Card Top Bar - Dark Mode */
.login-card.dark-mode::before {
    background: linear-gradient(90deg, #ff9f6b, #6ee7de);
}

/* Responsive */
@media (max-width: 576px) {
    .login-card .card-body { padding: 38px 26px; }
    .login-card { margin: 0 12px; }
    .pos-float { font-size: 35px; }
}

