/* Login Page - Dark Green Theme with Lighting Effects */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --accent: #00e68a;
    --accent-dim: #00cc7a;
    --accent-glow: rgba(0, 230, 138, 0.35);
    --accent-glow-soft: rgba(0, 230, 138, 0.08);
    --bg-dark: #0a0f0d;
    --bg-card: rgba(14, 24, 18, 0.7);
    --bg-input: rgba(10, 18, 14, 0.6);
    --border: rgba(0, 230, 138, 0.12);
    --border-focus: rgba(0, 230, 138, 0.4);
    --text-primary: #e8f5ee;
    --text-secondary: #8fa89a;
    --text-muted: #5a7568;
    --danger: #ff5c5c;
    --danger-bg: rgba(255, 92, 92, 0.1);
    --danger-border: rgba(255, 92, 92, 0.25);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

/* Ambient background lighting */
body::before {
    content: '';
    position: fixed;
    top: -40%;
    left: -20%;
    width: 80%;
    height: 80%;
    background: radial-gradient(ellipse, rgba(0, 230, 138, 0.07) 0%, transparent 70%);
    pointer-events: none;
    animation: ambientFloat 12s ease-in-out infinite alternate;
}

body::after {
    content: '';
    position: fixed;
    bottom: -30%;
    right: -20%;
    width: 70%;
    height: 70%;
    background: radial-gradient(ellipse, rgba(0, 180, 110, 0.05) 0%, transparent 70%);
    pointer-events: none;
    animation: ambientFloat 10s ease-in-out infinite alternate-reverse;
}

@keyframes ambientFloat {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(40px, -30px) scale(1.1); }
}

.login-container {
    width: 100%;
    max-width: 380px;
    padding: 10px;
    position: relative;
    z-index: 1;
    max-height: 98vh;
    overflow-y: auto;
}

.login-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 28px 24px;
    border: 1px solid var(--border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
    box-shadow:
        0 0 40px rgba(0, 230, 138, 0.04),
        0 20px 60px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(0, 230, 138, 0.08);
}

/* Top edge glow line */
.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0.6;
}

/* Corner glow accent */
.login-card::after {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(0, 230, 138, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.login-header {
    text-align: center;
    margin-bottom: 18px;
    position: relative;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--accent), #00b36b);
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    box-shadow: 0 0 30px rgba(0, 230, 138, 0.25), 0 4px 12px rgba(0, 0, 0, 0.3);
    position: relative;
}

.logo-icon svg {
    width: 20px;
    height: 20px;
    color: var(--bg-dark);
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.login-header h1 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
    letter-spacing: -0.02em;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 400;
}

/* Error message */
.error-message {
    background: var(--danger-bg);
    color: var(--danger);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    margin-bottom: 12px;
    border: 1px solid var(--danger-border);
    backdrop-filter: blur(4px);
}

/* Form styles */
.form-group {
    margin-bottom: 12px;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.75rem;
    margin-bottom: 4px;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper .input-icon {
    position: absolute;
    left: 10px;
    width: 14px;
    height: 14px;
    color: var(--text-muted);
    display: flex;
    transition: var(--transition);
    pointer-events: none;
}

.input-wrapper input {
    width: 100%;
    padding: 10px 12px 10px 36px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 0.8rem;
    font-family: inherit;
    transition: var(--transition);
    outline: none;
    background: var(--bg-input);
    color: var(--text-primary);
}

.input-wrapper input:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(0, 230, 138, 0.08), 0 0 20px rgba(0, 230, 138, 0.06);
}

.input-wrapper input:focus + .input-icon,
.input-wrapper input:focus ~ .input-icon {
    color: var(--accent);
}

.input-wrapper input::placeholder {
    color: var(--text-muted);
}

.password-toggle {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    padding: 2px;
    transition: var(--transition);
    width: 16px;
    height: 16px;
}

.password-toggle:hover {
    color: var(--accent);
}

/* Remember me & Forgot password row */
.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    font-size: 0.7rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--text-secondary);
}

.remember-me input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border: 1px solid var(--border);
    border-radius: 3px;
    background: var(--bg-input);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.remember-me input[type="checkbox"]:checked {
    background: var(--accent);
    border-color: var(--accent);
}

.remember-me input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 4.5px;
    top: 1.5px;
    width: 5px;
    height: 8px;
    border: solid var(--bg-dark);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.forgot-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.forgot-link:hover {
    color: var(--accent-dim);
    text-decoration: underline;
}

/* Buttons */
.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px 16px;
    border: none;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), #00b36b);
    color: var(--bg-dark);
    box-shadow: 0 0 20px rgba(0, 230, 138, 0.2), 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 0 30px rgba(0, 230, 138, 0.35), 0 6px 16px rgba(0, 0, 0, 0.25);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

/* Arrow icon in button */
.btn-arrow {
    transition: transform 0.3s ease;
}

.btn-primary:hover .btn-arrow {
    transform: translateX(3px);
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    margin: 12px 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.divider span {
    padding: 0 10px;
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 500;
    white-space: nowrap;
}

/* OAuth buttons */
.oauth-buttons {
    display: flex;
    gap: 12px;
}

.btn-oauth {
    flex: 1;
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 9px 12px;
    font-weight: 500;
    font-size: 0.75rem;
}

.btn-oauth:hover:not(:disabled) {
    background: rgba(0, 230, 138, 0.05);
    border-color: var(--border-focus);
    box-shadow: 0 0 15px rgba(0, 230, 138, 0.06);
}

.btn-oauth svg {
    width: 18px;
    height: 18px;
}

/* Toggle auth link */
.toggle-auth {
    text-align: center;
    margin-top: 12px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.toggle-auth a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    margin-left: 4px;
    transition: var(--transition);
}

.toggle-auth a:hover {
    text-decoration: underline;
}

/* Footer */
.footer-text {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.7rem;
    margin-top: 8px;
    margin-bottom: 0;
}

/* Logo container */
.logo-container {
    position: relative;
    display: inline-block;
    width: 100%;
    text-align: center;
}

/* Terms checkbox */
.terms-check {
    margin-bottom: 14px;
}

.terms-check .remember-me a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

.terms-check .remember-me a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 480px) {
    .login-card {
        padding: 20px 18px;
        border-radius: 14px;
    }

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

/* Admin login link */
.admin-link {
    text-align: center;
    margin-top: 6px;
}

.admin-link a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.65rem;
    font-weight: 500;
    transition: var(--transition);
}

.admin-link a:hover {
    color: var(--accent);
}
