/* ==========================================================
   MODERN LOGIN PAGE STYLES
   ========================================================== */

/* Import Modern Font */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    overflow-x: hidden;
}

/* ==========================================================
   ANIMATED BACKGROUND
   ========================================================== */
.modern-login {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
}

.login-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #4facfe 75%, #00f2fe 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

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

.bg-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
    animation: float 20s infinite ease-in-out;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.3);
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.2);
    bottom: -50px;
    right: -50px;
    animation-delay: 5s;
}

.shape-3 {
    width: 250px;
    height: 250px;
    background: rgba(255, 255, 255, 0.25);
    top: 50%;
    right: 10%;
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    33% {
        transform: translate(30px, -30px) rotate(120deg);
    }
    66% {
        transform: translate(-20px, 20px) rotate(240deg);
    }
}

/* ==========================================================
   FORM CONTAINER
   ========================================================== */
.modern-login .form-outer {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    padding: 40px 20px;
}

.modern-form-inner {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 50px 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    position: relative;
    animation: slideUp 0.6s ease-out;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

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

/* ==========================================================
   LOGO SECTION
   ========================================================== */
.logo-section {
    text-align: center;
    margin-bottom: 40px;
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.logo-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 15px 40px rgba(102, 126, 234, 0.6);
    }
}

.logo-icon i {
    font-size: 36px;
    color: #fff;
}

.logo h1 {
    font-size: 32px;
    font-weight: 700;
    color: #2d3748;
    margin: 0 0 10px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.welcome-text {
    font-size: 15px;
    color: #718096;
    margin: 0;
    font-weight: 400;
}

/* ==========================================================
   FORM STYLES
   ========================================================== */
.modern-login-form {
    margin-top: 30px;
}

.modern-form-group {
    margin-bottom: 28px;
    position: relative;
    padding-left: 50px;
}

.input-wrapper {
    position: relative;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: -45px;
    top: 50%;
    transform: translateY(-50%);
    color: #a0aec0;
    font-size: 20px;
    z-index: 2;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.modern-input {
    width: 100%;
    padding: 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    color: #2d3748;
    background: #f7fafc;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Inter', sans-serif;
}

.modern-input:focus {
    outline: none;
    border-color: #667eea;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.modern-input:focus + .modern-label .label-content,
.modern-input:not(:placeholder-shown) + .modern-label .label-content {
    transform: translateY(-24px) translateX(-10px) scale(0.85);
    color: #667eea;
    background: #fff;
    padding: 0 8px;
}

.modern-input:focus ~ .input-icon {
    color: #667eea;
    transform: translateY(-50%) scale(1.05);
    background: rgba(102, 126, 234, 0.1);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.modern-label {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.label-content {
    display: inline-block;
    color: #a0aec0;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.input-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 0 0 12px 12px;
}

.modern-input:focus ~ .input-line {
    width: 100%;
}

.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #a0aec0;
    cursor: pointer;
    padding: 8px;
    transition: all 0.3s ease;
    z-index: 2;
}

.password-toggle:hover {
    color: #667eea;
    transform: translateY(-50%) scale(1.1);
}

.password-toggle:focus {
    outline: none;
}

.modern-error {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #e53e3e;
    font-size: 14px;
    margin-top: 8px;
    padding-left: 4px;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.modern-error i {
    font-size: 16px;
}

/* ==========================================================
   FORM OPTIONS
   ========================================================== */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 12px;
}

.remember-me {
    display: flex;
    align-items: center;
}

.remember-me .custom-control-input:checked ~ .custom-control-label::before {
    background-color: #667eea;
    border-color: #667eea;
}

.remember-me .custom-control-label {
    color: #4a5568;
    font-size: 14px;
    cursor: pointer;
    user-select: none;
}

.modern-forgot-link {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.modern-forgot-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #667eea;
    transition: width 0.3s ease;
}

.modern-forgot-link:hover {
    color: #764ba2;
    text-decoration: none;
}

.modern-forgot-link:hover::after {
    width: 100%;
}

/* ==========================================================
   LOGIN BUTTON
   ========================================================== */
.modern-login-btn {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    font-family: 'Inter', sans-serif;
    text-transform: none;
    letter-spacing: 0.5px;
}

.modern-login-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.modern-login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

.modern-login-btn:active {
    transform: translateY(0);
}

.modern-login-btn:hover::before {
    width: 300px;
    height: 300px;
}

.modern-login-btn:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.3);
}

.btn-text {
    position: relative;
    z-index: 1;
}

.btn-loader {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
}

.modern-login-btn.loading .btn-text {
    opacity: 0;
}

.modern-login-btn.loading .btn-loader {
    display: block;
}

/* ==========================================================
   DEMO BUTTONS
   ========================================================== */
.demo-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 30px;
    flex-wrap: wrap;
}

.btn-demo {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    border: 2px solid;
    background: transparent;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-demo i {
    font-size: 14px;
}

.admin-btn {
    color: #48bb78;
    border-color: #48bb78;
}

.admin-btn:hover {
    background: #48bb78;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(72, 187, 120, 0.3);
}

.staff-btn {
    color: #4299e1;
    border-color: #4299e1;
}

.staff-btn:hover {
    background: #4299e1;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(66, 153, 225, 0.3);
}

.client-btn {
    color: #ed8936;
    border-color: #ed8936;
}

.client-btn:hover {
    background: #ed8936;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(237, 137, 54, 0.3);
}

.demo-notice {
    text-align: center;
    margin-top: 20px;
    padding: 12px;
    background: #fff5f5;
    border-left: 4px solid #fc8181;
    border-radius: 6px;
    color: #c53030;
    font-size: 13px;
    font-style: italic;
}

.demo-notice i {
    margin-right: 6px;
}

/* ==========================================================
   ALERT MESSAGES
   ========================================================== */
.modern-form-inner .alert {
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 24px;
    border: none;
    animation: slideDown 0.4s ease-out;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

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

.modern-form-inner .alert-danger {
    background: #fed7d7;
    color: #c53030;
}

.modern-form-inner .alert-success {
    background: #c6f6d5;
    color: #22543d;
}

.modern-form-inner .alert-info {
    background: #bee3f8;
    color: #2c5282;
}

.modern-form-inner .alert ul {
    margin: 0;
    padding-left: 20px;
}

.modern-form-inner .alert li {
    margin-bottom: 4px;
}

/* ==========================================================
   FOOTER
   ========================================================== */
.modern-copyrights {
    position: relative;
    z-index: 1;
    margin-top: 30px;
    padding-top: 20px;
}

.modern-copyrights p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.modern-footer-link {
    color: rgba(255, 255, 255, 1);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

.modern-footer-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.9);
    transition: width 0.3s ease;
}

.modern-footer-link:hover {
    color: rgba(255, 255, 255, 1);
    text-decoration: none;
}

.modern-footer-link:hover::after {
    width: 100%;
}

/* ==========================================================
   RESPONSIVE DESIGN
   ========================================================== */
@media (max-width: 768px) {
    .modern-form-inner {
        padding: 40px 30px;
        border-radius: 20px;
        margin: 20px;
    }

    .logo-icon {
        width: 70px;
        height: 70px;
    }

    .logo-icon i {
        font-size: 30px;
    }

    .logo h1 {
        font-size: 28px;
    }

    .welcome-text {
        font-size: 14px;
    }

    .modern-form-group {
        padding-left: 45px;
    }

    .modern-input {
        padding: 14px;
        font-size: 15px;
    }

    .input-icon {
        font-size: 18px;
        left: -40px;
        width: 36px;
        height: 36px;
    }

    .modern-label {
        left: 14px;
    }

    .modern-input:focus + .modern-label .label-content,
    .modern-input:not(:placeholder-shown) + .modern-label .label-content {
        transform: translateY(-22px) translateX(-8px) scale(0.85);
    }

    .input-line {
        left: 0;
    }

    .modern-input:focus ~ .input-line {
        width: 100%;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
    }

    .demo-buttons {
        flex-direction: column;
    }

    .btn-demo {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .modern-form-inner {
        padding: 30px 20px;
    }

    .logo h1 {
        font-size: 24px;
    }

    .modern-login-btn {
        padding: 14px;
        font-size: 15px;
    }
}

/* ==========================================================
   ACCESSIBILITY
   ========================================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus visible for keyboard navigation */
.modern-input:focus-visible,
.modern-login-btn:focus-visible,
.password-toggle:focus-visible {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

