/* Login Page Styles */

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

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #2c5364 0%, #667eea 25%, #764ba2 45%, #f093fb 65%, #f5576c 85%, #ff6b9d 100%);
    min-height: 100vh;
    min-height: -webkit-fill-available;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
    overflow-x: hidden;
    padding: 20px 0;
    background-attachment: scroll;
    background-size: cover;
}

/* Animated background shapes */
body::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    top: -250px;
    right: -250px;
    animation: float 20s infinite ease-in-out;
}

body::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 50%;
    bottom: -200px;
    left: -200px;
    animation: float 15s infinite ease-in-out reverse;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-30px) rotate(180deg); }
}

.login-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 450px;
    padding: 20px;
    margin: auto;
}

.login-card {
    background: transparent;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: visible;
    animation: slideUp 0.6s ease-out;
}

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

.login-header {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 2.5rem 2rem;
    text-align: center;
    position: relative;
}

.logo-icon {
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    backdrop-filter: blur(10px);
}

.logo-icon i {
    font-size: 2rem;
    color: white;
}

.login-header h4 {
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 1.75rem;
}

.login-header p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    margin: 0;
}

.login-body {
    padding: 2.5rem 2rem;
    background: #ffffff;
}

.form-label {
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 16px;
}

.input-group {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    overflow: visible;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    position: relative;
}

.input-group:focus-within {
    box-shadow: 0 4px 12px rgba(44, 62, 80, 0.15);
    transform: translateY(-2px);
    border-color: #2c3e50;
}

.input-group-text {
    background: #f8f9fa;
    border: none;
    color: #5a6c7d;
    transition: all 0.3s ease;
}

.input-group:focus-within .input-group-text {
    border-color: transparent;
}

.form-control {
    border: none;
    padding: 0.75rem 1rem;
    font-size: 16px;
    transition: all 0.3s ease;
}

/* iOS zoom prevention */
input[type="text"],
input[type="password"],
textarea,
select {
    font-size: 16px !important;
}

.form-control:focus {
    border: none;
    box-shadow: none;
}

.form-check {
    padding-left: 1.75rem;
}

.form-check-input:checked {
    background-color: #2c3e50;
    border-color: #2c3e50;
}

.form-check-label {
    color: #5a6c7d;
    font-size: 0.9rem;
}

.btn-login {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    border: none;
    padding: 0.875rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transition: left 0.5s ease;
}

.btn-login:hover::before {
    left: 100%;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(44, 62, 80, 0.4);
}

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

.alert {
    border-radius: 8px;
    border: none;
    padding: 1rem;
    font-size: 0.9rem;
    animation: shake 0.5s ease;
}

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

.alert-danger {
    background: #fee;
    color: #c33;
}

.login-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e0e0e0;
}

.login-footer p {
    color: #7f8c8d;
    font-size: 0.85rem;
    margin: 0;
}

/* Error Tooltip Styling */
.error-tooltip {
    position: absolute;
    background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(238, 90, 111, 0.4);
    z-index: 1000;
    white-space: nowrap;
    animation: tooltipSlideIn 0.3s ease-out;
    pointer-events: none;
    left: calc(100% + 15px);
    top: 50%;
    transform: translateY(-50%);
}

.error-tooltip::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -6px;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-right: 6px solid #ff6b6b;
}

@keyframes tooltipSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50%) translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(-50%) translateX(0);
    }
}

.input-group.error input {
    border-color: #ff6b6b !important;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1) !important;
}

.input-group.error .input-group-text {
    border-color: #ff6b6b !important;
    background: rgba(255, 107, 107, 0.1);
    color: #ff6b6b;
}

/* Animation for error state */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.input-group.error {
    animation: shake 0.3s ease-in-out;
}
