/*
 * ===================================================================
 *  MAIN STYLESHEET (style.css)
 * ===================================================================
 *  This file contains base styles for the entire application,
 *  including public pages (login, register) and common form elements.
 */

/* --- Core & Theming Variables --- */
:root {
    --primary-color: #2E7D32; /* A strong, professional green */
    --primary-color-dark: #1B5E20;
    --secondary-color: #f4f4f4;
    --text-color: #333;
    --border-color: #ddd;
    --error-color: #D32F2F;
    --success-color: #388E3C;
    --font-family: 'Poppins', sans-serif;
    --box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
}

/* --- Global Resets & Body Styles --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background-color: var(--secondary-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* Specific body style for public pages to center content */
body.public-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.page-container {
    width: 100%;
    max-width: 480px; /* Slightly wider for more complex forms */
    margin: 20px;
}

/* --- Authentication & Onboarding Form Styling --- */
.auth-container {
    background-color: #fff;
    padding: 30px 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    animation: fadeIn 0.5s ease-in-out;
}

.auth-header {
    text-align: center;
    margin-bottom: 25px;
}

.auth-header h1 {
    color: var(--primary-color);
    margin-bottom: 5px;
    font-weight: 600;
}

.auth-header p {
    color: #777;
    font-size: 0.9rem;
}

/* --- Consistent Form Element Styling --- */
.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea,
.form-group select,
.form-control { /* A generic class for form elements */
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: var(--font-family);
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background-color: #fff;
    color: var(--text-color);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Custom dropdown arrow for select boxes */
.form-group select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%3E%3Cpath%20d%3D%22M5%208l5%205%205-5z%22%20fill%3D%22%23555%22/%3E%3C/svg%3E');
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 1em;
}

/* Focus styles for all form elements */
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus,
.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.2);
}

/* Disabled input style */
.form-group input:disabled,
.form-control:disabled {
    background-color: #e9ecef;
    opacity: 1;
    cursor: not-allowed;
}

/* --- Buttons --- */
.btn {
    display: inline-block; /* Changed for more flexibility */
    width: 100%; /* Default to full-width */
    padding: 12px;
    border: none;
    border-radius: var(--border-radius);
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn-primary {
    background-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-color-dark);
    transform: translateY(-2px);
}

/* --- Helper Classes & Links --- */
.text-center {
    text-align: center;
}
.text-muted {
    color: #6c757d !important;
}

.auth-link {
    margin-top: 20px;
    font-size: 0.9rem;
}

.auth-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.auth-link a:hover {
    text-decoration: underline;
}

/* --- Message/Alert Styling --- */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: var(--border-radius);
    text-align: center;
    animation: slideDown 0.4s ease-out;
    border: 1px solid transparent;
}
.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}
.alert-success {
    background-color: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}
.alert-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}
.alert-warning {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeeba;
}
.alert ul { text-align: left; }

/* --- Onboarding Progress Bar --- */
.progress-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    position: relative;
}
.progress-bar::before {
    content: '';
    position: absolute;
    top: 12px;
    left: 10%;
    right: 10%;
    height: 4px;
    background-color: var(--border-color);
    z-index: 1;
}
.progress-step {
    width: 25px;
    height: 25px;
    background-color: var(--border-color);
    color: #fff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 0.9rem;
    position: relative;
    z-index: 2;
    text-align: center;
}
.progress-step small {
    position: absolute;
    top: 120%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    color: #777;
    white-space: nowrap;
}
.progress-step.active {
    background-color: var(--primary-color);
}
.progress-step.active::before {
    content: '\2713'; /* Checkmark symbol */
}


/* --- Keyframe Animations --- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Mobile Responsiveness --- */
@media (max-width: 480px) {
    .auth-container {
        padding: 25px;
    }

    .auth-header h1 {
        font-size: 1.8rem;
    }
}