/* Base Reset & Variables */
:root {
    --primary-color: #d32f2f;
    --primary-hover: #b71c1c;
    --secondary-color: #37474f;
    --secondary-hover: #263238;
    --text-color: #212121;
    --light-bg: #f5f5f5;
    --white: #ffffff;
    --border-color: #e0e0e0;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-color);
    background-color: var(--light-bg);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header Styling */
.site-header {
    background-color: var(--white);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Navigation & Buttons */
.main-nav {
    display: flex;
    gap: 1rem;
}

.btn-primary, .btn-secondary {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s ease;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-secondary {
    background-color: transparent;
    color: var(--secondary-color);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--light-bg);
}

.btn-large {
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
}

/* Main Content Area */
.main-content {
    flex: 1;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* Hero Section */
.hero-section {
    background-color: var(--white);
    border-radius: 8px;
    padding: 3.5rem 2rem;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin-bottom: 3rem;
}

.hero-content max-width {
    max-width: 800px;
    margin: 0 auto;
}

.hero-section h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
    line-height: 1.2;
}

.hero-section p {
    font-size: 1.2rem;
    color: #616161;
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Features Grid */
.features-section h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--secondary-color);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    transition: transform 0.2s ease;
}

.feature-card:hover {
    transform: translateY(-2px);
}

.feature-id {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
}

/* Footer Styling */
.site-footer {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 2rem 1.5rem;
    text-align: center;
    margin-top: auto;
}

.footer-container p {
    font-size: 0.9rem;
    opacity: 0.8;
}

.footer-note {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    opacity: 0.6;
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
    .header-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero-section h1 {
        font-size: 1.8rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .hero-buttons .btn-large {
        width: 100%;
    }
}

/* Authentication & Form Layouts */
.form-container {
    background-color: var(--white);
    max-width: 500px;
    margin: 2rem auto;
    padding: 2.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 6px rgba(0,0,0,0.03);
}

.dashboard-setup-container {
    background-color: var(--white);
    max-width: 800px;
    margin: 2rem auto;
    padding: 2.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 6px rgba(0,0,0,0.03);
}

.form-subtitle {
    color: #616161;
    margin-bottom: 2rem;
}

.form-section {
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.form-section h3 {
    margin-bottom: 1rem;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-num {
    background-color: var(--secondary-color);
    color: var(--white);
    font-size: 0.9rem;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.section-desc {
    font-size: 0.9rem;
    color: #757575;
    margin-bottom: 1.25rem;
}

.badge-optional {
    font-size: 0.75rem;
    background-color: #e0e0e0;
    color: #424242;
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
    font-weight: normal;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 0.65rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    color: var(--text-color);
    transition: border-color 0.2s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group input[readonly] {
    background-color: var(--light-bg);
    color: #757575;
    cursor: not-allowed;
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-row .form-group {
    flex: 1;
}

.btn-block {
    width: 100%;
}

.form-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.9rem;
}

.form-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.form-help {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.8rem;
    color: #757575;
}

/* Password Strength Indicator Styling */
.strength-meter {
    background-color: #e0e0e0;
    height: 6px;
    border-radius: 3px;
    margin-top: 0.5rem;
    overflow: hidden;
}

.strength-bar {
    height: 100%;
    width: 0%;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.strength-bar.weak { background-color: #e53935; }
.strength-bar.medium { background-color: #ffb300; }
.strength-bar.strong { background-color: #43a047; }

.strength-text {
    font-size: 0.8rem;
    font-weight: 600;
    display: block;
    margin-top: 0.25rem;
    text-align: right;
}

.password-requirements {
    list-style: none;
    margin-top: 0.5rem;
    font-size: 0.8rem;
}

.password-requirements li {
    padding-left: 1.2rem;
    position: relative;
    margin-bottom: 0.2rem;
}

.password-requirements li::before {
    content: "•";
    position: absolute;
    left: 0.2rem;
    font-size: 1.1rem;
    line-height: 1;
}

.password-requirements li.invalid { color: #b71c1c; }
.password-requirements li.valid { color: #2e7d32; }
.password-requirements li.valid::before { content: "✓"; font-size: 0.8rem; }

.match-text {
    font-size: 0.8rem;
    display: block;
    margin-top: 0.25rem;
}
.invalid-text { color: #b71c1c; }
.valid-text { color: #2e7d32; }

button:disabled {
    background-color: #cccccc !important;
    cursor: not-allowed;
}

/* Setup Profile Fields Proportions */
@media(min-width: 601px) {
    .field-city { flex: 2 !important; }
    .field-province { flex: 1 !important; }
    .field-postal { flex: 1 !important; }
}

@media(max-width: 600px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    .form-container, .dashboard-setup-container {
        padding: 1.5rem;
        margin: 1rem;
    }
}