﻿:root {
    --primary: #0d8b38;
    --primary-hover: #0a6d2c;
    --secondary: #c79429;
    --secondary-hover: #b08124;
    --light: #e8f5ed;
    --dark: #0b100b;
    --color-white: #fff;
    --color-white-rgb: 255,255,255;
    --color-black-rgb: 0,0,0;
    --primary-rgb: 13, 139, 56;
    --secondary-rgb: 199, 148, 41;
    --light-rgb: 232, 245, 237;
    --danger: #e74c3c;
    --success: #27ae60;
    --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 20px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #1e1e1e url('/Images/Shared/register_bg.jpg') center/cover no-repeat fixed;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    position: relative;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

    body::before {
        content: '';
        position: fixed;
        inset: 0;
        background: linear-gradient(135deg, rgba(11, 16, 11, 0.70) 0%, rgba(13, 139, 56, 0.60) 100%);
        pointer-events: none;
        z-index: 1;
    }

.bg-shape-1,
.bg-shape-2 {
    position: fixed;
    border-radius: 50%;
    z-index: 2;
    will-change: transform;
    filter: blur(40px);
}

.bg-shape-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(var(--secondary-rgb), 0.08) 0%, transparent 70%);
    top: -300px;
    right: -300px;
    animation: float 12s ease-in-out infinite;
}

.bg-shape-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(var(--primary-rgb), 0.08) 0%, transparent 70%);
    bottom: -250px;
    left: -250px;
    animation: float 14s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(20px, -20px) scale(1.03);
    }

    66% {
        transform: translate(-15px, 15px) scale(0.97);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 rgba(var(--secondary-rgb), 0.3);
    }

    50% {
        box-shadow: 0 0 0 10px rgba(var(--secondary-rgb), 0);
    }
}

.login-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 500px;
    padding: 20px;
}

.login-card {
    background: rgba(22, 22, 22, 0.75);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid rgba(var(--secondary-rgb), 0.18);
    border-radius: var(--border-radius-lg);
    padding: 48px 42px;
    box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(var(--color-white-rgb), 0.06);
    animation: slideUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.logo-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 84px;
    height: 84px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 50%;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(var(--primary-rgb), 0.3);
    position: relative;
    animation: pulse 4s infinite;
}

    .logo-circle img {
        width: 50px;
        height: auto;
        z-index: 1;
        filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
    }

.login-header h1 {
    color: var(--color-white);
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.login-header p {
    color: rgba(var(--light-rgb), 0.75);
    font-size: 15px;
    font-weight: 400;
}

.form-group {
    margin-bottom: 22px;
}

    .form-group label {
        display: block;
        color: rgba(var(--light-rgb), 0.85);
        font-size: 13px;
        font-weight: 700;
        margin-bottom: 8px;
        letter-spacing: 0.3px;
        text-transform: uppercase;
    }

.input-group {
    position: relative;
}

.form-control,
.form-select {
    background: rgba(var(--primary-rgb), 0.12);
    border: 2px solid rgba(var(--secondary-rgb), 0.18);
    border-radius: var(--border-radius-md) !important;
    padding: 15px 15px 15px 46px;
    color: var(--color-white) !important;
    font-size: 15px;
    font-weight: 500;
    transition: var(--transition-fast);
    width: 100%;
    outline: none;
}

.form-select {
    padding: 15px 15px 15px 46px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23c79429' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
    color: #555 !important;
}

.form-control::placeholder {
    color: rgba(var(--color-white-rgb), 0.35);
}

.form-control:hover,
.form-select:hover {
    border-color: rgba(var(--secondary-rgb), 0.3);
    background: rgba(var(--primary-rgb), 0.18);
}

.form-control:focus,
.form-select:focus {
    background: rgba(var(--primary-rgb), 0.22);
    border-color: var(--secondary);
    box-shadow: 0 0 0 4px rgba(var(--secondary-rgb), 0.1);
}

.form-control.is-valid {
    border-color: var(--success);
    background: rgba(39, 174, 96, 0.08);
}

.form-control.is-invalid {
    border-color: var(--danger);
    background: rgba(231, 76, 60, 0.08);
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--secondary);
    font-size: 18px;
    pointer-events: none;
    transition: var(--transition-fast);
}

.form-control:focus ~ .input-icon {
    transform: translateY(-50%) scale(1.1);
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(var(--light-rgb), 0.55);
    cursor: pointer;
    font-size: 18px;
    padding: 8px;
    transition: var(--transition-fast);
    border-radius: var(--border-radius-sm);
}

    .toggle-password:hover {
        color: var(--secondary);
        background: rgba(var(--secondary-rgb), 0.08);
    }

.form-check {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 24px 0;
}

.form-check-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-check-input {
    width: 20px;
    height: 20px;
    margin: 0;
    background: rgba(var(--primary-rgb), 0.12);
    border: 2px solid rgba(var(--secondary-rgb), 0.22);
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition-fast);
    flex-shrink: 0;
}

    .form-check-input:hover {
        border-color: rgba(var(--secondary-rgb), 0.35);
    }

    .form-check-input:checked {
        background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
        border-color: var(--secondary);
    }

    .form-check-input:focus {
        box-shadow: 0 0 0 4px rgba(var(--secondary-rgb), 0.12);
    }

.form-check-label {
    color: rgba(var(--light-rgb), 0.8);
    font-size: 14px;
    margin: 0;
    cursor: pointer;
    font-weight: 500;
    user-select: none;
}

.forgot-link a,
a {
    color: var(--secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition-fast);
}

    .forgot-link a:hover,
    a:hover {
        color: var(--primary);
    }

.btn-signin {
    width: 100%;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
    border: none;
    color: var(--color-white);
    padding: 16px;
    border-radius: var(--border-radius-md);
    font-weight: 700;
    font-size: 16px;
    margin-top: 8px;
    transition: var(--transition-smooth);
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(var(--primary-rgb), 0.22);
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
}

    .btn-signin::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 0;
        height: 0;
        border-radius: 50%;
        background: rgba(255,255,255,0.2);
        transform: translate(-50%, -50%);
        transition: width 0.6s, height 0.6s;
    }

    .btn-signin:hover:not(:disabled)::after {
        width: 300px;
        height: 300px;
    }

    .btn-signin:hover:not(:disabled) {
        transform: translateY(-2px);
        box-shadow: 0 12px 28px rgba(var(--primary-rgb), 0.32);
    }

    .btn-signin:active:not(:disabled) {
        transform: translateY(0);
    }

    .btn-signin:disabled {
        opacity: 0.55;
        cursor: not-allowed;
        transform: none;
    }

.divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 32px 0 28px;
    color: rgba(var(--secondary-rgb), 0.45);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
}

    .divider::before,
    .divider::after {
        content: '';
        flex: 1;
        height: 1px;
        background: linear-gradient(to right, transparent, rgba(var(--secondary-rgb), 0.22), transparent);
    }

    .divider span {
        margin: 0 16px;
    }

.login-footer {
    text-align: center;
    color: rgba(var(--light-rgb), 0.65);
    font-size: 14px;
    font-weight: 500;
}

    .login-footer a {
        color: var(--secondary);
        font-weight: 700;
    }

.alert {
    margin-bottom: 24px;
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.22);
    border-radius: var(--border-radius-md);
    color: #ffaaaa;
    padding: 14px 16px;
    font-size: 14px;
}

.btn-close {
    filter: brightness(0) invert(1) opacity(0.7);
}

.error {
    color: #ff6b6b !important;
    font-size: 13px;
    margin-top: 6px;
    display: block;
    font-weight: 500;
}

    .error::before {
        content: '⚠ ';
        font-weight: 700;
    }

@media (max-width: 480px) {
    .login-card {
        padding: 36px 28px;
    }

    .login-header h1 {
        font-size: 26px;
    }

    .logo-circle {
        width: 74px;
        height: 74px;
    }

    .form-check {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
