/* SRS Practice Login - Matching Session Theme */

:root {
    /* Color Palette - Matches session.css */
    --primary: #4a90e2;
    --primary-hover: #357abd;
    --success: #10b981;
    --danger: #ef4444;
    --bg-white: #ffffff;
    --bg-light: #f8f9fa;
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --text-muted: #adb5bd;
    --border-light: #dee2e6;
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);

    /* Typography */
    --font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-light);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    gap: 1rem;
}

/* GROW Tree Animation - Above Card */
.grow-animation-container {
    width: 200px;
    height: 200px;
    margin-bottom: 0;
}

.grow-tree-animation {
    width: 100%;
    height: 100%;
}

.login-container {
    width: 100%;
    max-width: 480px;
    animation: fadeInUp 0.5s ease-out;
}

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

.login-card {
    background: var(--bg-white);
    border-radius: 12px;
    box-shadow: none;
    border: 1px solid var(--border-light);
    overflow: hidden;
}

.login-header {
    background: var(--bg-white);
    color: var(--text-primary);
    padding: 2rem 2rem 1.5rem;
    text-align: center;
    border-bottom: 1px solid var(--border-light);
}

/* GROW Title */
.grow-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
    line-height: 1;
    color: var(--text-primary);
}

.grow-subtitle {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin: 0 0 1rem 0;
    line-height: 1.3;
}

.description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 400;
    margin: 0;
    line-height: 1.5;
}

.brand {
    font-size: 0.8rem;
    opacity: 0.7;
    font-weight: 300;
    margin: 0;
    font-style: italic;
}

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

/* Login Method Toggle */
.login-method-toggle {
    margin-bottom: 2rem;
}

.login-method-toggle .btn-group {
    display: flex;
    gap: 0;
    border-radius: 10px;
    overflow: hidden;
    background: var(--bg-light);
    padding: 0.25rem;
}

.login-method-toggle .btn {
    flex: 1;
    padding: 0.875rem 1rem;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.login-method-toggle .btn.active {
    background: #000;
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.login-method-toggle .btn:hover:not(.active) {
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.05);
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    border: 2px solid var(--border-light);
    border-radius: 12px;
    transition: all 0.2s ease;
    font-family: var(--font-family);
}

.form-control:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.form-control-lg {
    padding: 1rem 1.25rem;
    font-size: 1.125rem;
}

.form-text {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.875rem;
}

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

/* Buttons */
.btn {
    display: inline-block;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    font-family: var(--font-family);
}

.btn-primary {
    color: #fff;
    background-color: #000;
    border-color: #000;
}

.btn-primary:hover {
    background-color: #333;
    border-color: #333;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

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

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
    border-radius: 12px;
}

.btn-block {
    display: block;
    width: 100%;
}

/* Alerts */
.alert {
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    border-radius: 12px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
}

.alert-info {
    color: #055160;
    background-color: #cff4fc;
    border: 1px solid #b6effb;
}

/* QR Scanner Section */
.qr-scanner-container {
    text-align: center;
}

#qr-reader {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    background: #333;
    margin: 0 auto;
}

#qr-reader video {
    border-radius: 12px;
    display: block;
    width: 100%;
}

.scanner-instructions {
    color: var(--text-secondary);
    margin-top: 1.5rem;
}

.scanner-instructions i {
    display: block;
    margin-bottom: 0.75rem;
    font-size: 2.5rem;
    color: var(--primary);
}

.scanner-instructions p {
    margin: 0;
    font-size: 1rem;
}

/* Logo Below Card */
.logo-container-bottom {
    text-align: center;
    margin-top: 1.5rem;
}

.brand-logo-bottom {
    width: 150px;
    height: auto;
    opacity: 0.6;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.brand-logo-bottom:hover {
    opacity: 0.9;
    transform: scale(1.05);
}

/* Utility Classes */
.mb-0 { margin-bottom: 0; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.me-2 { margin-right: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.d-block { display: block; }
.text-center { text-align: center; }

/* Responsive Design */
@media (max-width: 576px) {
    body {
        padding: 10px;
        gap: 0.5rem;
    }

    .grow-animation-container {
        width: 160px;
        height: 160px;
    }

    .login-header {
        padding: 1.5rem 1.5rem 1.25rem;
    }

    .grow-title {
        font-size: 1.75rem;
    }

    .grow-subtitle {
        font-size: 0.875rem;
    }

    .description {
        font-size: 0.8rem;
    }

    .brand-logo-bottom {
        width: 130px;
    }

    .login-body {
        padding: 2rem 1.5rem;
    }

    .login-method-toggle .btn {
        padding: 0.75rem 0.5rem;
        font-size: 0.875rem;
    }

    .scanner-instructions i {
        font-size: 2rem;
    }
}

@media (max-width: 400px) {
    .grow-animation-container {
        width: 140px;
        height: 140px;
    }

    .login-header {
        padding: 1.25rem 1rem 1rem;
    }

    .grow-title {
        font-size: 1.5rem;
    }

    .grow-subtitle {
        font-size: 0.8rem;
    }

    .description {
        font-size: 0.75rem;
    }

    .brand-logo-bottom {
        width: 120px;
    }

    .login-body {
        padding: 1.5rem 1rem;
    }
}
