:root {
    --primary: #4e73df;
    --primary-hover: #6e8fe6;
    --secondary: #6c757d;
    --light: #212529;
    --dark: #f8f9fa;
    --success: #1cc88a;
    --danger: #e74a3b;
    --warning: #f6c23e;
    --info: #36b9cc;
    --gray-100: #1a1d21;
    --gray-200: #2d333b;
    --gray-300: #444c56;
    --gray-400: #5c636a;
    --gray-500: #6c757d;
    --gray-600: #adb5bd;
    --gray-700: #ced4da;
    --gray-800: #e9ecef;
    --gray-900: #f8f9fa;
    --body-bg: #0a0f0f;
    --card-bg: #121a1a;
    --input-bg: #0d1117;
    --input-border: #30363d;
    --input-text: #e6edf3;
    --text-muted: #8b949e;
}

body {
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--body-bg);
    background-image: linear-gradient(135deg, #0a0f0f 0%, #0c1a1a 100%);
    color: var(--gray-800);
    height: 100vh;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.login-container {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    padding: 1rem;
}

.card {
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 0.5rem;
    background-color: var(--card-bg);
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.4);
    overflow: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    background-color: rgba(18, 26, 26, 0.8);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.75rem 2rem rgba(0, 0, 0, 0.5);
    border-color: rgba(78, 115, 223, 0.3);
}

.card-body {
    padding: 2.5rem;
}

.logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 2rem auto;
    padding-bottom: 1.5rem;
    position: relative;
    width: 100%;
}

.logo-container::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 25%;
    right: 25%;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(78, 115, 223, 0.5), transparent);
    border-radius: 3px;
}

.logo {
    height: 100px;
    width: auto;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 1rem;
    transition: all 0.3s ease;
    display: block;
}

h1, h2 {
    color: var(--primary);
    font-weight: 700;
    font-size: 1.75rem;
    margin: 1.5rem 0 2rem 0;
    text-align: center;
    letter-spacing: 0.5px;
    position: relative;
    padding-top: 0.5rem;
}

.form-label {
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.form-control {
    padding: 0.75rem 1rem;
    background-color: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 0.35rem;
    color: var(--input-text);
    font-size: 0.9rem;
    height: auto;
    transition: all 0.2s ease-in-out;
}

.form-control:focus {
    background-color: var(--input-bg);
    border-color: var(--primary);
    color: var(--gray-800);
    box-shadow: 0 0 0 0.25rem rgba(78, 115, 223, 0.25);
}

.input-group-text {
    background-color: var(--gray-200);
    border: 1px solid var(--input-border);
    color: var(--gray-600);
    cursor: pointer;
    transition: all 0.2s ease;
}

.input-group-text:hover {
    background-color: var(--gray-300);
    color: var(--gray-500);
}

.password-toggle {
    cursor: pointer;
    transition: color 0.2s ease;
}

.password-toggle:hover {
    color: var(--primary);
}

.btn-primary {
    background-color: #2e8b57;
    border: none;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    width: 100%;
    color: white;
    background-image: linear-gradient(135deg, #2e8b57 0%, #3cb371 100%);
}

.btn-primary:hover {
    background-image: linear-gradient(135deg, #3cb371 0%, #4caf50 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(46, 139, 87, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1.5rem 0;
    font-size: 0.875rem;
    color: var(--gray-600);
}

.form-text {
    color: var(--text-muted) !important;
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

.back-to-login {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-300);
    font-size: 0.9rem;
    color: var(--gray-600);
}

.back-to-login a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.back-to-login a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.invalid-feedback {
    color: #ff6b6b;
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.alert {
    border: none;
    color: #fff;
    background-color: rgba(231, 74, 59, 0.2);
    border-left: 4px solid var(--danger);
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}

.alert-success {
    color: #6bcb77;
    background-color: rgba(107, 203, 119, 0.1);
    border-left-color: #6bcb77;
}

.alert-danger {
    color: #ff6b6b;
    background-color: rgba(255, 107, 107, 0.1);
}

.btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
    opacity: 0.7;
}

.btn-close:hover {
    opacity: 1;
}

::placeholder {
    color: var(--gray-600) !important;
    opacity: 0.8 !important;
}

:-ms-input-placeholder {
    color: var(--gray-600) !important;
}

::-ms-input-placeholder {
    color: var(--gray-600) !important;
}

/* Password strength indicator */
.password-strength {
    height: 4px;
    background-color: var(--gray-300);
    border-radius: 2px;
    margin: 0.5rem 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.password-strength-bar {
    height: 100%;
    width: 0;
    background-color: var(--danger);
    transition: width 0.3s ease, background-color 0.3s ease;
}

.password-requirements {
    margin: 1rem 0;
    padding: 0.75rem;
    background-color: rgba(13, 17, 23, 0.5);
    border-radius: 0.35rem;
    border-left: 3px solid var(--primary);
}

.password-requirements ul {
    margin: 0.5rem 0 0 0;
    padding-left: 1.25rem;
}

.password-requirements li {
    margin-bottom: 0.25rem;
    font-size: 0.8rem;
    color: var(--gray-600);
    transition: color 0.2s ease;
}

.password-requirements li.valid {
    color: var(--success);
}

.password-requirements li.valid::before {
    content: '✓ ';
    color: var(--success);
}

.spinner-border {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
    margin-right: 0.5rem;
    vertical-align: text-top;
}

/* Responsive styles */
@media (max-width: 576px) {
    .card-body {
        padding: 2rem 1.5rem;
    }
    
    .login-container {
        padding: 0 1rem;
    }
    
    .logo {
        height: 80px;
    }
}
