/* Master Aesthetic Light Mode Design Tokens */
:root {
    --primary: #059669;
    --primary-hover: #047857;
    --primary-light: #ecfdf5;
    --secondary: #0f172a;
    --secondary-hover: #1e293b;
    --accent: #d97706;
    --danger: #dc2626;
    --emerald-glow: 0 8px 24px -4px rgba(5, 150, 105, 0.22);
    --dark: #0f172a;
    --dark-card: #ffffff;
    --dark-border: #e2e8f0;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --bg-gradient: #ffffff;
    --card-bg: #ffffff;
    --glass-border: 1px solid #e2e8f0;
    --glass-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.04);
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    background: #ffffff;
    color: #0f172a;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Crisp Clean Glass & Glow utilities */
.luxury-glass {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.04);
}

.glow-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.glow-hover:hover {
    transform: translateY(-3px);
    border-color: #a7f3d0;
    box-shadow: 0 12px 28px -6px rgba(5, 150, 105, 0.12);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    color: #047857;
}

/* Layout & Navbar */
.navbar {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 1.5rem;
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.04);
}

.navbar-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.25rem;
    font-weight: 800;
    color: #0f172a;
}

.logo-badge {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
    padding: 0.35rem 0.7rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
}

.nav-links {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    flex-wrap: wrap;
}

.nav-link {
    color: #475569;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-sm);
}

.nav-link:hover, .nav-link.active {
    color: #059669;
    background: #ecfdf5;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1.2rem;
    flex: 1;
    width: 100%;
}

/* White Clean Cards */
.card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.03);
    padding: 1.6rem;
    margin-bottom: 1.5rem;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 20px 30px -10px rgba(0, 0, 0, 0.08);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    font-weight: 700;
    padding: 0.7rem 1.5rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-primary {
    background: #059669;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(5, 150, 105, 0.28);
}

.btn-primary:hover {
    background: #047857;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(5, 150, 105, 0.38);
    color: #ffffff;
}

.btn-secondary {
    background: #ffffff;
    color: #0f172a;
    border: 1.5px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.btn-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #059669;
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #ffffff;
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #ffffff;
}

.btn-block {
    width: 100%;
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.4rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: var(--radius-sm);
    color: #0f172a;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

/* Alerts */
.alert {
    padding: 0.9rem 1.2rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.2rem;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.alert-success {
    background: #ecfdf5;
    border: 1px solid #6ee7b7;
    color: #065f46;
}

.alert-danger {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
}

.alert-warning {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

/* Grid System */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.2rem;
}

/* Water Tracker Interactive Widget */
.water-widget {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    text-align: center;
}

.water-glasses-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: center;
    margin: 1.2rem 0;
    max-width: 380px;
}

.water-glass-icon {
    font-size: 1.6rem;
    cursor: pointer;
    transition: transform 0.2s ease, filter 0.2s ease;
    opacity: 0.4;
    filter: grayscale(1);
    user-select: none;
}

.water-glass-icon.filled {
    opacity: 1;
    filter: none;
    transform: scale(1.1);
}

.water-glass-icon:hover {
    transform: scale(1.2);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.65rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-trial {
    background: #fef3c7;
    color: #b45309;
    border: 1px solid #fcd34d;
}

.badge-active {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.badge-expired {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* Table styles */
.table-responsive {
    overflow-x: auto;
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.custom-table th, .custom-table td {
    padding: 1rem 1.1rem;
    text-align: left;
    border-bottom: 1px solid #f1f5f9;
}

.custom-table th {
    background: #f8fafc;
    color: #475569;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.78rem;
    letter-spacing: 0.05em;
}

.custom-table tr:hover {
    background: #f8fafc;
}

/* Phone Mockup */
.phone-mockup {
    width: 310px;
    background: #ffffff;
    border: 8px solid #0f172a;
    border-radius: 36px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    position: relative;
    margin: 0 auto;
}

.phone-notch {
    width: 120px;
    height: 18px;
    background: #0f172a;
    margin: 0 auto 8px auto;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

.wa-bubble-in {
    background: #ffffff;
    color: #0f172a;
    border-radius: 14px 14px 14px 2px;
    padding: 0.75rem 0.9rem;
    font-size: 0.8rem;
    line-height: 1.45;
    margin-bottom: 0.75rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    border-left: 3px solid #10b981;
}

.wa-bubble-out {
    background: #dcf8c6;
    color: #064e3b;
    border-radius: 14px 14px 2px 14px;
    padding: 0.65rem 0.85rem;
    font-size: 0.78rem;
    line-height: 1.4;
    margin-left: auto;
    margin-bottom: 0.75rem;
    max-width: 85%;
    text-align: right;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

/* FAQ */
.faq-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    margin-bottom: 0.8rem;
    overflow: hidden;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.faq-item:hover {
    border-color: #10b981;
}

.faq-question {
    padding: 1.2rem 1.4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 700;
    font-size: 1.02rem;
    color: #0f172a;
    user-select: none;
}

.faq-answer {
    padding: 0 1.4rem 1.2rem 1.4rem;
    color: #475569;
    font-size: 0.92rem;
    line-height: 1.6;
    display: none;
}

.faq-item.open .faq-answer {
    display: block;
}

.faq-item.open .faq-icon {
    transform: rotate(180deg);
    color: #10b981;
}

.faq-icon {
    transition: transform 0.25s ease;
    font-size: 1.1rem;
    color: #64748b;
}

/* Language Selector Pill */
.lang-selector {
    display: inline-flex;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 9999px;
    padding: 3px;
    gap: 2px;
}

.lang-btn {
    background: transparent;
    border: none;
    color: #475569;
    padding: 0.35rem 0.85rem;
    font-size: 0.82rem;
    font-weight: 700;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lang-btn:hover {
    color: #0f172a;
}

.lang-btn.active {
    background: #10b981;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

/* Tab buttons */
.tab-btn {
    padding: 0.75rem 1.25rem;
    font-size: 0.88rem;
    font-weight: 700;
    color: #64748b;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 8px 8px 0 0;
}

.tab-btn:hover {
    color: #0f172a;
    background: rgba(241, 245, 249, 0.8);
}

.tab-btn.active {
    color: #059669;
    border-bottom-color: #059669;
    background: #ffffff;
    box-shadow: 0 -2px 6px rgba(0,0,0,0.02);
}

/* White Luxury Card Accents */
.card-luxury {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    position: relative;
    overflow: hidden;
    box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.05), 0 5px 15px rgba(0, 0, 0, 0.02);
}

.card-luxury::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #059669;
}

.kpi-spark {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.kpi-spark-up {
    background: #ecfdf5;
    color: #065f46;
}

.kpi-spark-neutral {
    background: #f1f5f9;
    color: #334155;
}

/* ========================================================================= */
/* Mobile Responsiveness & Adaptive Viewports                                */
/* ========================================================================= */

.nav-toggle-btn {
    display: none;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 0.45rem 0.7rem;
    font-size: 1.25rem;
    color: #0f172a;
    cursor: pointer;
    line-height: 1;
}

.nav-toggle-btn:focus {
    outline: 2px solid #10b981;
}

@media (max-width: 991px) {
    .navbar {
        padding: 0.75rem 1rem;
    }
    .navbar-container {
        flex-wrap: wrap;
    }
    .nav-toggle-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border-radius: 8px;
        background: #f8fafc;
        border: 1.5px solid #cbd5e1;
        cursor: pointer;
        transition: all 0.2s ease;
    }
    .nav-toggle-btn:hover {
        background: #e2e8f0;
        border-color: #94a3b8;
    }
    .nav-links {
        display: none !important;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0.8rem;
        padding: 1rem 0.5rem;
        margin-top: 0.75rem;
        border-top: 1px solid #e2e8f0;
        background: #ffffff;
        border-radius: 0 0 12px 12px;
    }
    .nav-links.open {
        display: flex !important;
        animation: fadeInDown 0.2s ease-out;
    }
    .lang-selector {
        width: 100%;
        display: flex;
        justify-content: space-between;
    }
    .lang-btn {
        flex: 1;
        text-align: center;
        padding: 0.4rem 0.2rem;
    }
    .nav-link {
        text-align: center;
        padding: 0.6rem;
    }
    .btn-block-mobile {
        width: 100% !important;
        text-align: center;
    }
}

@media (max-width: 768px) {
    body {
        font-size: 15px;
    }
    .container {
        padding: 0 1rem;
        margin: 1rem auto;
    }
    .card {
        padding: 1.25rem;
        border-radius: 16px;
    }
    .card-luxury {
        padding: 1.25rem !important;
        border-radius: 16px !important;
    }
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }
    .logo {
        font-size: 1.05rem;
    }
    .logo-badge {
        font-size: 0.8rem;
        padding: 0.25rem 0.5rem;
    }
    .phone-mockup {
        width: 100%;
        max-width: 295px;
        border-width: 6px;
        border-radius: 28px;
    }
    .table-responsive {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .custom-table th, .custom-table td {
        padding: 0.75rem 0.6rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .logo span:last-child {
        display: none; /* Hide 'Wellness Companion' on very small phones so logo never overlaps */
    }
    .card {
        padding: 1rem;
    }
    .custom-table {
        min-width: 540px; /* Ensure table remains readable and scrollable on small phones */
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
