/* BeautyLens - shadcn/ui inspired design system */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --background: 0 0% 100%;
    --foreground: 240 10% 3.9%;
    --card: 0 0% 100%;
    --card-foreground: 240 10% 3.9%;
    --popover: 0 0% 100%;
    --primary: 171 100% 33%;
    --primary-foreground: 0 0% 100%;
    --secondary: 240 4.8% 95.9%;
    --secondary-foreground: 240 5.9% 10%;
    --muted: 240 4.8% 95.9%;
    --muted-foreground: 240 3.8% 46.1%;
    --accent: 240 4.8% 95.9%;
    --border: 240 5.9% 90%;
    --ring: 171 100% 33%;
    --radius: 0.75rem;
    --teal: #00A896;
    --teal-dark: #007A6D;
    --teal-light: #00D4AA;
    --pink: #F5B7C3;
    --pink-light: #FFF5F7;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: hsl(var(--foreground));
    background: hsl(var(--background));
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
}

/* ─── Login Page ─── */
.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8fffe 0%, var(--pink-light) 100%);
}

.login-container { width: 100%; max-width: 420px; padding: 1rem; }

.login-card {
    background: white;
    border-radius: var(--radius);
    border: 1px solid hsl(var(--border));
    padding: 2.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 8px 24px rgba(0,0,0,0.06);
}

.login-logo {
    text-align: center;
    margin-bottom: 2rem;
}
.login-logo .logo-icon {
    width: 56px; height: 56px;
    background: linear-gradient(135deg, var(--teal), var(--teal-dark));
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    margin-bottom: 1rem;
}
.login-logo h1 { font-size: 1.5rem; font-weight: 700; color: hsl(var(--foreground)); }
.login-logo p { font-size: 0.875rem; color: hsl(var(--muted-foreground)); margin-top: 0.25rem; }

.alert-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
    border-radius: calc(var(--radius) - 2px);
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-group { margin-bottom: 1.25rem; }
.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: hsl(var(--foreground));
}

.input-wrapper {
    position: relative;
}
.input-wrapper i {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: hsl(var(--muted-foreground));
    font-size: 0.9rem;
}
.input-wrapper input {
    width: 100%;
    height: 44px;
    padding: 0 1rem 0 2.5rem;
    border: 1px solid hsl(var(--border));
    border-radius: calc(var(--radius) - 2px);
    font-size: 0.875rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    background: white;
}
.input-wrapper input:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(0, 168, 150, 0.1);
}

.btn-login {
    width: 100%;
    height: 44px;
    background: linear-gradient(135deg, var(--teal), var(--teal-dark));
    color: white;
    border: none;
    border-radius: calc(var(--radius) - 2px);
    font-size: 0.875rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: opacity 0.15s, transform 0.1s;
}
.btn-login:hover { opacity: 0.9; }
.btn-login:active { transform: scale(0.98); }

.login-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid hsl(var(--border));
}
.login-footer a {
    font-size: 0.8rem;
    color: hsl(var(--muted-foreground));
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}
.login-footer a:hover { color: var(--teal); }

/* ─── Public Site ─── */
.pub-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid hsl(var(--border));
    height: 64px;
}
.pub-nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
}
.pub-nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.2rem;
    color: hsl(var(--foreground));
}
.pub-nav-brand .brand-icon {
    width: 32px; height: 32px;
    background: linear-gradient(135deg, var(--teal), var(--teal-dark));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
}
.pub-nav-links { display: flex; align-items: center; gap: 0.25rem; }
.pub-nav-links a {
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    color: hsl(var(--muted-foreground));
    padding: 0.5rem 0.875rem;
    border-radius: calc(var(--radius) - 2px);
    transition: color 0.15s, background 0.15s;
}
.pub-nav-links a:hover { color: hsl(var(--foreground)); background: hsl(var(--accent)); }
.pub-nav-links .nav-cta {
    background: hsl(var(--foreground));
    color: white;
    padding: 0.5rem 1rem;
    margin-left: 0.5rem;
}
.pub-nav-links .nav-cta:hover { opacity: 0.85; color: white; }

.pub-main { padding-top: 64px; }

/* Hero */
.hero {
    padding: 6rem 1.5rem 5rem;
    text-align: center;
    background: linear-gradient(180deg, white 0%, var(--pink-light) 100%);
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(0,168,150,0.06) 0%, transparent 70%);
    pointer-events: none;
}
.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 1.25rem;
    color: hsl(var(--foreground));
}
.hero h1 .text-gradient {
    background: linear-gradient(135deg, var(--teal), var(--teal-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero p {
    font-size: 1.125rem;
    color: hsl(var(--muted-foreground));
    max-width: 560px;
    margin: 0 auto 2.5rem;
    line-height: 1.7;
}
.hero-buttons { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }

/* Buttons */
.btn-primary-pub {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    height: 48px;
    padding: 0 1.75rem;
    background: linear-gradient(135deg, var(--teal), var(--teal-dark));
    color: white;
    border: none;
    border-radius: calc(var(--radius) - 2px);
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.15s, transform 0.1s;
}
.btn-primary-pub:hover { opacity: 0.9; color: white; }

.btn-outline-pub {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    height: 48px;
    padding: 0 1.75rem;
    background: white;
    color: hsl(var(--foreground));
    border: 1px solid hsl(var(--border));
    border-radius: calc(var(--radius) - 2px);
    font-size: 0.9rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s;
}
.btn-outline-pub:hover { background: hsl(var(--accent)); border-color: hsl(var(--muted-foreground)); color: hsl(var(--foreground)); }

/* Stats */
.stats-bar {
    display: flex;
    justify-content: center;
    gap: 3rem;
    padding: 2rem 1.5rem;
    margin-top: 2rem;
}
.stat-item { text-align: center; }
.stat-item .stat-num { font-size: 2rem; font-weight: 800; color: var(--teal); }
.stat-item .stat-label { font-size: 0.8rem; color: hsl(var(--muted-foreground)); margin-top: 0.25rem; }

/* Sections */
.section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 5rem 1.5rem;
}
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}
.section-header .badge-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--teal);
    background: rgba(0,168,150,0.08);
    padding: 0.35rem 0.875rem;
    border-radius: 100px;
    margin-bottom: 1rem;
}
.section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}
.section-header p {
    color: hsl(var(--muted-foreground));
    max-width: 520px;
    margin: 0.75rem auto 0;
}

/* Feature Cards */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}
.feature-card {
    background: white;
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    padding: 2rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.feature-card:hover {
    border-color: var(--teal);
    box-shadow: 0 4px 16px rgba(0,168,150,0.08);
}
.feature-icon {
    width: 44px; height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}
.feature-icon.teal { background: rgba(0,168,150,0.1); color: var(--teal); }
.feature-icon.blue { background: rgba(59,130,246,0.1); color: #3b82f6; }
.feature-icon.purple { background: rgba(139,92,246,0.1); color: #8b5cf6; }
.feature-icon.orange { background: rgba(249,115,22,0.1); color: #f97316; }
.feature-icon.pink { background: rgba(236,72,153,0.1); color: #ec4899; }
.feature-icon.green { background: rgba(34,197,94,0.1); color: #22c55e; }
.feature-card h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 0.5rem; }
.feature-card p { font-size: 0.875rem; color: hsl(var(--muted-foreground)); line-height: 1.6; }

/* Search */
.search-box {
    max-width: 600px;
    margin: 0 auto;
}
.search-input-wrapper {
    position: relative;
}
.search-input-wrapper i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: hsl(var(--muted-foreground));
}
.search-input-wrapper input {
    width: 100%;
    height: 52px;
    padding: 0 1rem 0 2.75rem;
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.search-input-wrapper input:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(0,168,150,0.1), 0 1px 3px rgba(0,0,0,0.04);
}

/* Result Table */
.result-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 1.5rem;
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    overflow: hidden;
    font-size: 0.9rem;
}
.result-table th {
    background: hsl(var(--muted));
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: hsl(var(--muted-foreground));
    padding: 0.75rem 1rem;
    text-align: left;
}
.result-table td {
    padding: 0.75rem 1rem;
    border-top: 1px solid hsl(var(--border));
}
.result-table tr:hover td { background: hsl(var(--accent)); }

.badge-ewg {
    display: inline-flex;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 100px;
}
.badge-ewg.safe { background: #dcfce7; color: #166534; }
.badge-ewg.moderate { background: #fef3c7; color: #92400e; }
.badge-ewg.caution { background: #fee2e2; color: #991b1b; }

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--teal), var(--teal-dark));
    color: white;
    text-align: center;
    padding: 5rem 1.5rem;
}
.cta-section h2 { font-size: 2rem; font-weight: 700; margin-bottom: 1rem; }
.cta-section p { opacity: 0.85; margin-bottom: 2rem; max-width: 480px; margin-left: auto; margin-right: auto; }
.btn-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    height: 48px;
    padding: 0 2rem;
    background: white;
    color: var(--teal-dark);
    border: none;
    border-radius: calc(var(--radius) - 2px);
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.15s;
}
.btn-cta:hover { opacity: 0.9; color: var(--teal-dark); }

/* Footer */
.pub-footer {
    border-top: 1px solid hsl(var(--border));
    padding: 3rem 1.5rem 2rem;
    text-align: center;
}
.pub-footer-inner { max-width: 1200px; margin: 0 auto; }
.pub-footer p { font-size: 0.8rem; color: hsl(var(--muted-foreground)); }
.pub-footer a { color: hsl(var(--muted-foreground)); text-decoration: none; }
.pub-footer a:hover { color: var(--teal); }

/* Responsive */
@media (max-width: 768px) {
    .hero { padding: 4rem 1.5rem 3rem; }
    .hero h1 { font-size: 2rem; }
    .stats-bar { gap: 1.5rem; }
    .pub-nav-links .nav-hide-mobile { display: none; }
}
