/* AHA System Theme - Premium & Responsive */
:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --primary-color: #667eea;
    --primary-dark: #5a67d8;
    --text-main: #333;
    --text-muted: #64748b;
    --bg-light: #f8f9fa;
    --border-color: #dee2e6;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --radius-md: 8px;
    --radius-lg: 12px;
}

/* Global Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-main);
    line-height: 1.6;
    margin: 0;
    padding: 20px;
    min-height: 100vh;
}

/* --- Container & Layout --- */
.aha-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.header {
    background: var(--primary-gradient);
    color: white;
    padding: 40px 30px;
    text-align: center;
    margin-bottom: 0;
    /* Reset margin for card layout */
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 300;
    color: white;
    margin-bottom: 0.5rem;
}

.header p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
}

.content {
    padding: 40px 30px;
}

/* --- Forms & Inputs --- */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #495057;
}

input[type="text"],
input[type="password"],
input[type="email"],
textarea,
select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* --- Buttons --- */
.btn-primary,
.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 15px 30px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: 5px;
    font-weight: 500;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover,
.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* --- Utilities --- */
.row {
    display: flex;
    gap: 15px;
}

.col {
    flex: 1;
}

.text-center {
    text-align: center;
}

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

.mt-4 {
    margin-top: 1rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

/* --- Components --- */

/* Alert Boxes */
.alert {
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    border-left: 4px solid transparent;
}

.alert-error {
    background-color: #fef2f2;
    color: #991b1b;
    border-left-color: #ef4444;
}

.alert-info {
    background-color: #eff6ff;
    color: #1e40af;
    border-left-color: var(--primary-color);
}

/* Analysis Box (from original theme) */
.analysis-box {
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    margin-bottom: 30px;
}

.analysis-box h2 {
    color: #495057;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

/* Password Strength Meter */
.password-strength {
    height: 4px;
    background-color: #e2e8f0;
    border-radius: 2px;
    margin-top: 0.5rem;
    overflow: hidden;
}

.password-meter-bar {
    height: 100%;
    width: 0%;
    background-color: #ef4444;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.password-text {
    font-size: 0.875rem;
    margin-top: 0.25rem;
    text-align: right;
    font-weight: 500;
}

/* File Upload Preview & Progress */
.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 5px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.upload-area:hover {
    border-color: var(--primary-color);
    background: #f0f2ff;
}

.preview-container {
    margin-top: 1rem;
    display: none;
    text-align: center;
}

.preview-container img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 5px;
    box-shadow: var(--shadow-md);
}

.progress-container {
    margin-top: 1rem;
    display: none;
}

.progress-bar {
    height: 6px;
    background-color: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background-color: var(--primary-color);
    transition: width 0.1s linear;
}

/* --- Hero Features --- */
.hero-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.hero-feature {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 30px;
    text-align: center;
    transition: transform 0.3s ease;
}

.hero-feature:hover {
    transform: translateY(-5px);
}

.hero-feature-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.hero-feature-title {
    color: #333;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.hero-feature-description {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

/* --- Login Section --- */
.management-login-section {
    margin-top: 30px;
    margin-bottom: 20px;
    padding-top: 20px;
    border-top: 1px solid #e1e5e9;
}

.login-dropdown {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
}

.login-toggle {
    cursor: pointer;
    color: #666;
    font-weight: 500;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}

/* Hide marker in all browsers */
.login-toggle::-webkit-details-marker,
details>summary {
    display: none;
    list-style: none;
}

.login-toggle:focus {
    outline: none;
}

.login-form-container {
    margin-top: 15px;
}

.login-form-container h4 {
    color: #333;
    margin-bottom: 15px;
    font-size: 14px;
    font-weight: 600;
}

.management-login-form {
    max-width: 300px;
}

.login-submit-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.login-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.login-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.login-error {
    margin-top: 10px;
    padding: 8px 12px;
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 4px;
    color: #c33;
    font-size: 13px;
}

/* --- Privacy Note --- */
.privacy-note {
    margin: 20px 0;
    padding: 12px 15px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 6px;
    color: #667eea;
    font-weight: 500;
    font-size: 14px;
}

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.gap-2 {
    gap: 8px;
}

/* --- Animations --- */
.animate-fade-in {
    animation: fadeIn 0.8s ease-out;
}

.animate-slide-up {
    animation: slideUp 0.8s ease-out 0.2s both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {
    .aha-container {
        margin: 10px;
        border-radius: 0;
    }

    .row {
        flex-direction: column;
        gap: 0;
    }

    .form-group {
        margin-bottom: 1.25rem;
    }

    .header h1 {
        font-size: 2rem;
    }


    .content {
        padding: 20px;
    }
}

/* --- ReCAPTCHA Disclaimer --- */
.recaptcha-legal-text {
    text-align: center;
    font-size: 0.7rem;
    color: #6b7280;
    /* Removed truncation to allow multiple lines */
    margin-top: 1rem;
}

@media (max-width: 600px) {
    .recaptcha-legal-text {
        padding: 0 10px;
        /* Add some padding on mobile */
    }
}

.grecaptcha-badge {
    visibility: hidden !important;
}