/* ===================================

   AlkaGuide - Premium Design System

   =================================== */

/* CSS Variables - Updated for Premium Feel */

:root {

    --color-primary: #10b981;

    --color-primary-dark: #059669;

    --color-primary-light: #d1fae5;

    --color-secondary: #3b82f6;

    --color-success: #10b981;

    --color-error: #ef4444;

    --color-warning: #f59e0b;



    --color-text: #1f2937;

    --color-text-light: #6b7280;

    --color-text-lighter: #6b7280; /* ADA: darkened from #9ca3af (3.7:1) to #6b7280 (4.6:1 on white) */

    --color-bg: #ffffff;

    --color-bg-light: #f9fafb;

    --color-bg-gray: #f3f4f6;

    --color-border: #e5e7eb;

    --color-border-light: #f3f4f6;



    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', sans-serif;

    --border-radius: 12px;

    --border-radius-sm: 8px;

    --box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);

    --box-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);

    --box-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

    --transition: all 0.2s ease;

}

/* Reset & Base */

* {

    margin: 0;

    padding: 0;

    box-sizing: border-box;

}

body {

    font-family: var(--font-family);

    color: var(--color-text);

    background-color: var(--color-bg-light);

    line-height: 1.6;

    font-size: 16px;

    -webkit-font-smoothing: antialiased;

    -moz-osx-font-smoothing: grayscale;

}

.container {

    max-width: 1200px;

    margin: 0 auto;

    padding: 0 24px;

}

/* Typography */

h1, h2, h3, h4, h5, h6 {

    font-weight: 700;

    line-height: 1.2;

    margin-bottom: 1rem;

    color: var(--color-text);

    letter-spacing: -0.025em;

}

h1 { font-size: 2.5rem; }

h2 { font-size: 2rem; }

h3 { font-size: 1.5rem; }

p {

    margin-bottom: 1rem;

    color: var(--color-text-light);

    line-height: 1.7;

}

a {

    color: var(--color-primary);

    text-decoration: none;

    transition: var(--transition);

}

a:hover {

    color: var(--color-primary-dark);

}

/* Header & Navigation - Premium Style */

.header {

    background: white;

    border-bottom: 1px solid var(--color-border-light);

    padding: 1rem 0;

    position: sticky;

    top: 0;

    z-index: 100;

    backdrop-filter: blur(10px);

    background: rgba(255, 255, 255, 0.95);

}

.nav {

    display: flex;

    justify-content: space-between;

    align-items: center;

    height: 64px;

}

.logo {

    font-size: 1.75rem;

    font-weight: 800;

    text-decoration: none;

    letter-spacing: -0.025em;

    display: inline-flex;

    align-items: center;

    gap: 0.4rem;

}

.logo-icon {

    height: 2rem;

    width: 2rem;

    border-radius: 6px;

    flex-shrink: 0;

}

.logo-alka {

    color: var(--color-primary);

}

.logo-guide {

    color: var(--color-text);

}

.footer .logo-guide {
    color: #ffffff;
}

.nav-menu {

    display: flex;

    list-style: none;

    gap: 0.5rem;

    align-items: center;

}

.nav-menu a {

    color: var(--color-text);

    font-weight: 500;

    padding: 0.625rem 1rem;

    border-radius: var(--border-radius-sm);

    transition: var(--transition);

    font-size: 0.9375rem;

}

.nav-menu a:hover {

    background-color: var(--color-bg-gray);

    color: var(--color-text);

}

/* Buttons - Premium Style */

.btn-primary, .btn-secondary {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    padding: 0.75rem 1.5rem;

    border-radius: var(--border-radius-sm);

    font-weight: 600;

    text-align: center;

    cursor: pointer;

    border: none;

    transition: var(--transition);

    font-size: 0.9375rem;

    text-decoration: none;

}

.btn-primary {

    background: var(--color-primary);

    color: white;

    box-shadow: var(--box-shadow);

}

.btn-primary:hover {

    background: var(--color-primary-dark);

    color: white;

    transform: translateY(-1px);

    box-shadow: var(--box-shadow-md);

}

.btn-secondary {

    background: white;

    color: var(--color-text);

    border: 1px solid var(--color-border);

}

.btn-secondary:hover {

    background: var(--color-bg-gray);

    border-color: var(--color-border);

}

/* Main Content */

.main-content {

    min-height: calc(100vh - 200px);

    padding: 2rem 0 4rem;

}

/* Hero Section */

.hero {

    text-align: center;

    padding: 5rem 0;

    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);

    border-radius: var(--border-radius);

    margin: 2rem 0;

}

.hero h1 {

    font-size: 3.5rem;

    margin-bottom: 1.5rem;

    color: var(--color-text);

    font-weight: 800;

}

.hero p {

    font-size: 1.25rem;

    margin-bottom: 2.5rem;

    color: var(--color-text-light);

    max-width: 600px;

    margin-left: auto;

    margin-right: auto;

}

/* Cards - Premium Style */

.card {

    background: white;

    border-radius: var(--border-radius);

    box-shadow: var(--box-shadow);

    padding: 2rem;

    margin-bottom: 1.5rem;

    border: 1px solid var(--color-border-light);

    transition: var(--transition);

}

.card:hover {

    box-shadow: var(--box-shadow-md);

}

.card-header {

    margin-bottom: 1.5rem;

    padding-bottom: 1rem;

    border-bottom: 1px solid var(--color-border-light);

}

.card-title {

    font-size: 1.5rem;

    font-weight: 700;

    margin-bottom: 0.5rem;

}

.card-header p {

    color: var(--color-text-lighter);

    font-size: 0.9375rem;

    margin: 0;

}

/* Forms - Premium Style */

.form-group {

    margin-bottom: 1.5rem;

}

.form-label {

    display: block;

    margin-bottom: 0.5rem;

    font-weight: 600;

    color: var(--color-text);

    font-size: 0.9375rem;

}

.form-control {

    width: 100%;

    padding: 0.75rem 1rem;

    border: 1px solid var(--color-border);

    border-radius: var(--border-radius-sm);

    font-size: 1rem;

    font-family: var(--font-family);

    transition: var(--transition);

    background: white;

}

.form-control:focus {

    outline: 3px solid var(--color-primary);

    outline-offset: 1px;

    border-color: var(--color-primary);

    box-shadow: 0 0 0 3px var(--color-primary-light);

}

.form-text {

    display: block;

    margin-top: 0.5rem;

    font-size: 0.875rem;

    color: var(--color-text-lighter);

}

/* Alerts - Premium Style */

.alert {

    padding: 1rem 1.25rem;

    border-radius: var(--border-radius-sm);

    margin-bottom: 1.5rem;

    border-left: 4px solid;

    font-size: 0.9375rem;

}

.alert-success {

    background: #f0fdf4;

    border-color: var(--color-success);

    color: #166534;

}

.alert-error {

    background: #fef2f2;

    border-color: var(--color-error);

    color: #991b1b;

}

.alert-info {

    background: #eff6ff;

    border-color: var(--color-secondary);

    color: #1e40af;

}

/* Dashboard Specific Styles */

.dashboard-header {

    display: flex;

    justify-content: space-between;

    align-items: center;

    margin-bottom: 2rem;

    padding: 2rem;

    background: white;

    border-radius: var(--border-radius);

    box-shadow: var(--box-shadow);

    border: 1px solid var(--color-border-light);

}

.dashboard-header h1 {

    margin: 0;

    font-size: 2rem;

}

.dashboard-header p {

    margin: 0;

    color: var(--color-text-lighter);

}

.plan-card {

    padding: 2rem;

    border-radius: var(--border-radius);

    margin-bottom: 2rem;

}

.plan-urgent {

    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);

    border: 2px solid #ef4444;

}

.plan-moderate {

    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);

    border: 2px solid #f59e0b;

}

.plan-optimal {

    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);

    border: 2px solid #10b981;

}

.plan-card h3 {

    font-size: 1.75rem;

    margin-bottom: 1rem;

}

.plan-card ul {

    margin: 1.5rem 0;

    padding-left: 0;

    list-style: none;

}

.plan-card li {

    padding: 0.5rem 0;

    color: var(--color-text);

}

/* Action Grid */

.action-grid {

    display: grid;

    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));

    gap: 1.5rem;

    margin-top: 2rem;

}

.action-card {

    background: white;

    border: 1px solid var(--color-border-light);

    border-radius: var(--border-radius);

    padding: 2rem;

    transition: var(--transition);

    text-align: center;

}

.action-card:hover {

    box-shadow: var(--box-shadow-lg);

    transform: translateY(-2px);

}

.action-card h3 {

    font-size: 1.25rem;

    margin-bottom: 1rem;

}

.action-card p {

    font-size: 0.9375rem;

    margin-bottom: 1.5rem;

}

/* Footer - Premium Style */

.footer {

    background: var(--color-text);

    color: white;

    padding: 3rem 0 1.5rem;

    margin-top: 4rem;

    border-top: 1px solid var(--color-border);

}

.footer-content {

    display: grid;

    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));

    gap: 2rem;

    margin-bottom: 2rem;

}

.footer-brand p {

    color: rgba(255, 255, 255, 0.7);

    margin-top: 0.5rem;

    font-size: 0.9375rem;

}

.footer-links h4,

.footer-contact h4 {

    margin-bottom: 1rem;

    color: white;

    font-size: 1rem;

    font-weight: 600;

}

.footer-links ul {

    list-style: none;

}

.footer-links li {

    margin-bottom: 0.5rem;

}

.footer-links a {

    color: rgba(255, 255, 255, 0.7);

    font-size: 0.9375rem;

}

.footer-links a:hover {

    color: white;

}

.footer-contact p {

    color: rgba(255, 255, 255, 0.7);

    font-size: 0.9375rem;

}

.footer-bottom {

    text-align: center;

    padding-top: 2rem;

    border-top: 1px solid rgba(255, 255, 255, 0.1);

    color: rgba(255, 255, 255, 0.5);

    font-size: 0.875rem;

}

/* Responsive Design */

@media (max-width: 768px) {

    .nav-menu {

        gap: 0.25rem;

    }



    .nav-menu a {

        padding: 0.5rem 0.75rem;

        font-size: 0.875rem;

    }



    .hero {

        padding: 3rem 1rem;

    }



    .hero h1 {

        font-size: 2rem;

    }



    h1 { font-size: 2rem; }

    h2 { font-size: 1.5rem; }



    .dashboard-header {

        flex-direction: column;

        align-items: flex-start;

        gap: 1rem;

    }



    .card {

        padding: 1.5rem;

    }

}

/* Utility Classes */

.text-center { text-align: center; }

.text-muted { color: var(--color-text-lighter); }

.mt-1 { margin-top: 0.5rem; }

.mt-2 { margin-top: 1rem; }

.mt-3 { margin-top: 1.5rem; }

.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }

.mb-2 { margin-bottom: 1rem; }

.mb-3 { margin-bottom: 1.5rem; }

.mb-4 { margin-bottom: 2rem; }

/* ================================================================

   ADA / WCAG 2.1 Level AA — Global Accessibility Additions

   ================================================================ */

/* Skip Navigation Link (WCAG 2.4.1 Level A)

   Visually hidden until focused — allows keyboard users to skip nav */

.skip-nav {

    position: fixed;

    top: -100%;

    left: 0;

    background: #183a1d;

    color: #ffffff;

    padding: 0.75rem 1.5rem;

    font-size: 1rem;

    font-weight: 600;

    text-decoration: none;

    border-radius: 0 0 6px 0;

    z-index: 99999;

    transition: top 0.1s;

}

.skip-nav:focus {

    top: 0;

    outline: 3px solid #39b54a;

    outline-offset: 2px;

}

/* Screen Reader Only — visually hidden but accessible to screen readers

   Use class="sr-only" on labels that must exist but not be visible */

.sr-only {

    position: absolute;

    width: 1px;

    height: 1px;

    padding: 0;

    margin: -1px;

    overflow: hidden;

    clip: rect(0, 0, 0, 0);

    white-space: nowrap;

    border-width: 0;

}

/* Global focus ring for all interactive elements (WCAG 2.4.7 Level AA) */

a:focus,

button:focus,

input:focus,

select:focus,

textarea:focus,

[tabindex]:focus {

    outline: 3px solid #39b54a;

    outline-offset: 2px;

}

/* Remove focus ring only when using mouse (not keyboard) */

a:focus:not(:focus-visible),

button:focus:not(:focus-visible),

input:focus:not(:focus-visible),

select:focus:not(:focus-visible) {

    outline: none;

}

/* Restore visible ring for keyboard navigation */

a:focus-visible,

button:focus-visible,

input:focus-visible,

select:focus-visible,

textarea:focus-visible {

    outline: 3px solid #39b54a;

    outline-offset: 2px;

}

/* Form input class used in tracker views */

.form-input:focus {

    outline: 3px solid #39b54a;

    outline-offset: 1px;

    border-color: #39b54a;

}

/* Ensure emoji-only delete buttons have a visible focus state */

button[aria-label]:focus {

    outline: 3px solid #39b54a;

    outline-offset: 2px;

    border-radius: 4px;

}