/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2d7a3e;
    --primary-dark: #1e5a2e;
    --secondary-color: #f39c12;
    --text-dark: #333;
    --text-light: #666;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --border-color: #e0e0e0;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.15);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand .logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-color);
}

.nav-buttons {
    display: flex;
    gap: 1rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.625rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 0.95rem;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: var(--white);
}

.btn-outline-light {
    background: transparent;
    color: var(--white);
    border-color: var(--white);
}

.btn-outline-light:hover {
    background: var(--white);
    color: var(--primary-color);
}

.btn-lg {
    padding: 0.875rem 2rem;
    font-size: 1.1rem;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #2d7a3e 0%, #1e5a2e 100%);
    color: var(--white);
    padding: 5rem 0;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero .lead {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.hero p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.hero-image img {
    width: 100%;
    height: auto;
}

/* Sections */
section {
    padding: 4rem 0;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.section-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 3rem;
}

/* Features Section */
.features {
    background: var(--bg-light);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.feature-card p {
    color: var(--text-light);
}

/* How It Works Section */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.step {
    text-align: center;
}

.step-number {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 1rem;
}

.step h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.step p {
    color: var(--text-light);
}

/* Statistics Section */
.statistics {
    background: var(--primary-color);
    color: var(--white);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

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

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-item p {
    font-size: 1.1rem;
}

/* CTA Section */
.cta {
    background: linear-gradient(135deg, #2d7a3e 0%, #1e5a2e 100%);
    color: var(--white);
    text-align: center;
    padding: 5rem 0;
}

.cta h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Footer */
.footer {
    background: var(--text-dark);
    color: var(--white);
    padding: 3rem 0 1rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.footer h4 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.footer ul {
    list-style: none;
}

.footer ul li {
    margin-bottom: 0.5rem;
}

.footer a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s;
}

.footer a:hover {
    color: var(--white);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.social-links a:hover {
    background: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .nav-menu {
        display: none;
    }
    
    .hero-buttons,
    .cta-buttons {
        flex-direction: column;
    }
    
    .section-title {
        font-size: 2rem;
    }
}

/* ===========================
   Auth Pages (Login/Register)
   =========================== */
.auth-section {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #f0f7f2 0%, #e8f4ea 50%, #f8f9fa 100%);
    padding: 3rem 0;
}

.auth-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
}

.auth-card {
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    padding: 2.5rem 3rem;
    width: 100%;
    max-width: 520px;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h1 {
    font-size: 2rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: var(--text-light);
    font-size: 1rem;
}

/* Alert Messages */
.alert {
    padding: 0.875rem 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    line-height: 1.5;
}

.alert-danger {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alert ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.alert ul li {
    margin-bottom: 0.25rem;
}

.alert ul li:last-child {
    margin-bottom: 0;
}

/* Social Auth Buttons */
.social-auth {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s;
    border: 1px solid var(--border-color);
    color: var(--text-dark);
    background: var(--white);
}

.btn-social:hover {
    background: var(--bg-light);
    border-color: #ccc;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    font-weight: 700;
    font-size: 1rem;
}

.btn-google .social-icon {
    color: #ea4335;
}

.btn-facebook .social-icon {
    color: #1877f2;
}

/* Auth Divider */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
}

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

.auth-divider span {
    padding: 0 1rem;
    color: var(--text-light);
    font-size: 0.85rem;
    white-space: nowrap;
}

/* Auth Form */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 0.375rem;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="tel"] {
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
    color: var(--text-dark);
    transition: border-color 0.3s, box-shadow 0.3s;
    outline: none;
    width: 100%;
}

.form-group input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(45, 122, 62, 0.12);
}

.form-group input.input-error {
    border-color: #ef4444;
}

.field-error {
    color: #ef4444;
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

/* Form Options (Remember me / Forgot) */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-light);
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-color);
}

.checkbox-label a {
    color: var(--primary-color);
    text-decoration: none;
}

.checkbox-label a:hover {
    text-decoration: underline;
}

.forgot-link {
    font-size: 0.9rem;
    color: var(--primary-color);
    text-decoration: none;
}

.forgot-link:hover {
    text-decoration: underline;
}

/* Block button */
.btn-block {
    width: 100%;
    text-align: center;
}

/* Auth Footer */
.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.auth-footer p {
    color: var(--text-light);
    font-size: 0.9rem;
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

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

/* ── DEV-ONLY login shortcut ─────────────────────────────────── */
.dev-login-box {
    margin-top: 1.5rem;
    padding: 1rem 1.25rem;
    background: #fffbeb;
    border: 1.5px dashed #f59e0b;
    border-radius: 0.75rem;
    text-align: center;
}

.dev-login-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: #92400e;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.35rem;
}

.dev-login-creds {
    font-size: 0.82rem;
    color: #78350f;
    margin-bottom: 0.75rem;
}

.btn-dev {
    display: block;
    width: 100%;
    padding: 0.65rem 1rem;
    background: #f59e0b;
    color: #1c1917;
    font-weight: 700;
    font-size: 0.9rem;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
}

.btn-dev:hover {
    background: #d97706;
    text-decoration: none;
    color: #fff;
}

/* Two-column dev login row */
.dev-login-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.dev-login-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(0,0,0,0.04);
    border-radius: 0.5rem;
    padding: 0.75rem 0.5rem;
}

.dev-login-role {
    font-size: 0.82rem;
    font-weight: 700;
    color: #78350f;
    margin-bottom: 0.2rem;
}

.dev-login-col .dev-login-creds {
    margin-bottom: 0.5rem;
    font-size: 0.76rem;
}

/* Customer button variant – teal/blue tone */
.btn-dev--customer {
    background: #0ea5e9;
    color: #fff;
}

.btn-dev--customer:hover {
    background: #0284c7;
    color: #fff;
}

/* Admin button inherits default amber */
.btn-dev--admin {
    background: #f59e0b;
    color: #1c1917;
}

.btn-dev--admin:hover {
    background: #d97706;
    color: #fff;
}
/* ─────────────────────────────────────────────────────────────── */


.password-strength {
    height: 4px;
    border-radius: 2px;
    background: var(--border-color);
    margin-top: 0.375rem;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s, background 0.3s;
    width: 0;
}

.password-strength-text {
    font-size: 0.78rem;
    margin-top: 0.25rem;
    color: var(--text-light);
}

/* Auth responsive */
@media (max-width: 768px) {
    .auth-card {
        padding: 2rem 1.5rem;
        margin: 0 1rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* ================================================================
   DASHBOARD STYLES
   ================================================================ */

/* Hide the public navbar on dashboard pages */
body:has(.dashboard-wrapper) .navbar,
body:has(.dashboard-wrapper) .footer {
    display: none;
}

/* Dev banner */
.dev-banner {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 9999;
    background: #f59e0b;
    color: #1c1917;
    text-align: center;
    padding: 0.45rem 1rem;
    font-size: 0.82rem;
    font-weight: 500;
}

/* Layout */
.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
    background: #f3f4f6;
}

body:has(.dev-banner) .dashboard-sidebar {
    padding-top: 2.4rem;
}

/* Sidebar */
.dashboard-sidebar {
    width: 240px;
    min-width: 240px;
    background: #1e293b;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; bottom: 0; left: 0;
    overflow-y: auto;
    z-index: 100;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 1.4rem 1.25rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-logo { font-size: 1.5rem; }
.sidebar-title { font-size: 1.1rem; font-weight: 700; color: #fff; }

.sidebar-nav {
    flex: 1;
    padding: 0.75rem 0;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 1.25rem;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.15s, color 0.15s;
    border-radius: 0;
}

.sidebar-link:hover,
.sidebar-link.active {
    background: rgba(255,255,255,0.07);
    color: #fff;
    text-decoration: none;
}

.sidebar-link.active {
    border-left: 3px solid #4ade80;
}

.sidebar-footer {
    padding: 0.75rem 0 1rem;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.sidebar-logout { color: #f87171; }
.sidebar-logout:hover { background: rgba(248,113,113,0.1); color: #f87171; }

/* Main */
.dashboard-main {
    flex: 1;
    margin-left: 240px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Topbar */
.dashboard-topbar {
    background: #fff;
    padding: 1.25rem 1.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.topbar-greeting h1 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.2rem;
}

.topbar-greeting p {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.topbar-avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: #4ade80;
    color: #14532d;
    font-weight: 700;
    font-size: 1rem;
    display: flex; align-items: center; justify-content: center;
}

.topbar-user-info {
    display: flex;
    flex-direction: column;
}

.topbar-name { font-size: 0.88rem; font-weight: 600; color: #1e293b; }
.topbar-email { font-size: 0.77rem; color: #64748b; }

/* Stats */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    padding: 1.5rem 1.75rem 0;
}

.stat-card {
    background: #fff;
    border-radius: 0.75rem;
    padding: 1.25rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.stat-icon {
    width: 48px; height: 48px;
    border-radius: 0.6rem;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

.stat-icon--green  { background: #dcfce7; color: #16a34a; }
.stat-icon--blue   { background: #dbeafe; color: #2563eb; }
.stat-icon--yellow { background: #fef9c3; color: #ca8a04; }
.stat-icon--red    { background: #fee2e2; color: #dc2626; }

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value { font-size: 1.35rem; font-weight: 700; color: #1e293b; }
.stat-label { font-size: 0.8rem; color: #64748b; margin-top: 0.1rem; }

/* Dashboard grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 1.25rem;
    padding: 1.25rem 1.75rem 2rem;
}

.dashboard-card {
    background: #fff;
    border-radius: 0.75rem;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.card-header h2 { font-size: 1rem; font-weight: 700; color: #1e293b; margin: 0; }
.card-link { font-size: 0.82rem; color: #2563eb; text-decoration: none; }
.card-link:hover { text-decoration: underline; }

/* Activity list */
.activity-list { list-style: none; padding: 0; margin: 0; }
.activity-item { display: flex; gap: 0.75rem; padding: 0.6rem 0; border-bottom: 1px solid #f1f5f9; }
.activity-item:last-child { border-bottom: none; }

.activity-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    margin-top: 0.3rem;
    flex-shrink: 0;
}

.activity-dot--green  { background: #4ade80; }
.activity-dot--blue   { background: #60a5fa; }
.activity-dot--yellow { background: #facc15; }
.activity-dot--red    { background: #f87171; }

.activity-content { display: flex; flex-direction: column; }
.activity-title { font-size: 0.87rem; color: #334155; }
.activity-time { font-size: 0.77rem; color: #94a3b8; margin-top: 0.1rem; }

/* Quick actions */
.quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 0.9rem 0.5rem;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 0.6rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.quick-action-btn:hover { background: #e0f2fe; border-color: #7dd3fc; }
.qa-icon { font-size: 1.3rem; }

/* Scheme list */
.card-section-title {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    margin-bottom: 0.65rem;
}

.scheme-list { list-style: none; padding: 0; margin: 0; }
.scheme-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.55rem 0;
    border-bottom: 1px solid #f1f5f9;
}
.scheme-item:last-child { border-bottom: none; }
.scheme-name { font-size: 0.85rem; color: #334155; }

.scheme-badge {
    font-size: 0.73rem;
    font-weight: 600;
    padding: 0.15rem 0.6rem;
    border-radius: 9999px;
}

.scheme-badge--active  { background: #dcfce7; color: #15803d; }
.scheme-badge--pending { background: #fef9c3; color: #a16207; }

/* Dashboard responsive */
@media (max-width: 1024px) {
    .dashboard-stats { grid-template-columns: repeat(2, 1fr); }
    .dashboard-grid  { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .dashboard-sidebar { display: none; }
    .dashboard-main    { margin-left: 0; }
    .dashboard-stats   { grid-template-columns: repeat(2, 1fr); padding: 1rem; }
    .dashboard-grid    { padding: 1rem; }
}
