/* Peptide Lab - Modern Design System v2.0 */

/* ============================================
   CSS VARIABLES - Premium Color Palette
   ============================================ */
:root {
    /* Colors - Modern Emerald/Navy palette */
    --primary: #10b981;
    --primary-light: #34d399;
    --primary-dark: #059669;
    --primary-glow: rgba(16, 185, 129, 0.4);

    --navy: #0f172a;
    --navy-light: #1e293b;
    --navy-lighter: #334155;
    --navy-gradient: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);

    --teal: #10b981;
    --teal-dark: #059669;
    --green: #22c55e;
    --green-light: #4ade80;
    --red: #ef4444;
    --red-light: #f87171;
    --yellow: #eab308;
    --orange: #f97316;
    --violet: #8b5cf6;

    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;

    /* Surfaces */
    --surface-border: rgba(255, 255, 255, 0.08);
    --surface-hover: rgba(255, 255, 255, 0.05);
    --glass: rgba(30, 41, 59, 0.8);
    --glass-border: rgba(255, 255, 255, 0.1);

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.35);
    --shadow-glow: 0 0 40px var(--primary-glow);

    /* Radius - More generous */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 9999px;

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Transitions */
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ============================================
   LIGHT MODE - Clean, professional theme
   ============================================ */
[data-theme="light"] {
    /* Colors - Light mode palette */
    --primary: #059669;
    --primary-light: #10b981;
    --primary-dark: #047857;
    --primary-glow: rgba(5, 150, 105, 0.15);

    --navy: #ffffff;
    --navy-light: #f8fafc;
    --navy-lighter: #f1f5f9;
    --navy-gradient: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);

    --white: #0f172a;
    --gray-50: #0f172a;
    --gray-100: #1e293b;
    --gray-200: #334155;
    --gray-300: #475569;
    --gray-400: #64748b;
    --gray-500: #94a3b8;
    --gray-600: #cbd5e1;
    --gray-700: #e2e8f0;

    /* Surfaces */
    --surface-border: rgba(0, 0, 0, 0.08);
    --surface-hover: rgba(0, 0, 0, 0.03);
    --glass: rgba(255, 255, 255, 0.9);
    --glass-border: rgba(0, 0, 0, 0.08);

    /* Shadows - lighter for light mode */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
    --shadow-glow: 0 0 40px var(--primary-glow);

    color-scheme: light;
}

[data-theme="light"] body::before {
    background:
        radial-gradient(ellipse at 20% 20%, rgba(5, 150, 105, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(139, 92, 246, 0.03) 0%, transparent 50%),
        #ffffff;
}

[data-theme="light"] .app-header {
    background: rgba(255, 255, 255, 0.9);
    border-bottom-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .logo-icon {
    box-shadow: 0 4px 15px rgba(5, 150, 105, 0.2);
}

[data-theme="light"] .bottom-nav {
    background: rgba(255, 255, 255, 0.95);
    border-top-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .stat-card,
[data-theme="light"] .peptide-card,
[data-theme="light"] .log-item,
[data-theme="light"] .chapter-card,
[data-theme="light"] .calculator-card {
    background: var(--navy-light);
    border-color: var(--surface-border);
}

[data-theme="light"] .modal {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .form-input,
[data-theme="light"] .form-select,
[data-theme="light"] .form-textarea {
    background: #ffffff;
    border-color: #e2e8f0;
    color: #0f172a;
}

[data-theme="light"] .form-input:focus,
[data-theme="light"] .form-select:focus,
[data-theme="light"] .form-textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

[data-theme="light"] .tracking-tab {
    color: #64748b;
}

[data-theme="light"] .tracking-tab.active {
    color: var(--primary);
    border-color: var(--primary);
}

[data-theme="light"] .btn-secondary {
    background: #f1f5f9;
    color: #334155;
    border-color: #e2e8f0;
}

[data-theme="light"] .btn-secondary:hover {
    background: #e2e8f0;
}

[data-theme="light"] .severity-btn {
    background: #f8fafc;
}

[data-theme="light"] .severity-btn.selected {
    background: #f1f5f9;
}

[data-theme="light"] .login-container {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 0, 0, 0.08);
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color-scheme: dark;
}

body {
    font-family: var(--font-sans);
    background: var(--navy);
    color: var(--white);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Subtle animated gradient background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(16, 185, 129, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(139, 92, 246, 0.05) 0%, transparent 50%),
        var(--navy);
    z-index: -1;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-light);
}

/* ============================================
   APP LAYOUT
   ============================================ */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ============================================
   HEADER - More breathing room
   ============================================ */
.app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    padding: 0 1.5rem;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.logo:hover {
    color: var(--primary-light);
}

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--teal-dark) 100%);
    border-radius: var(--radius-md);
    box-shadow: 0 4px 15px var(--primary-glow);
}

.logo-icon svg {
    color: var(--white);
    width: 24px;
    height: 24px;
}

.logo-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Navigation Tabs */
.nav-tabs {
    display: flex;
    gap: 0.5rem;
    background: var(--navy-light);
    padding: 6px;
    border-radius: var(--radius-lg);
}

.nav-tab {
    padding: 0.6rem 1.25rem;
    border-radius: var(--radius-md);
    color: var(--gray-400);
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition);
    position: relative;
}

.nav-tab:hover {
    color: var(--white);
    background: var(--surface-hover);
}

.nav-tab.active {
    background: var(--primary);
    color: var(--navy);
    font-weight: 600;
    box-shadow: 0 2px 10px var(--primary-glow);
}

/* User Menu */
.user-menu {
    position: relative;
}

.user-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--violet) 100%);
    border: none;
    border-radius: var(--radius-full);
    color: var(--white);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 700;
    font-size: 1rem;
}

.user-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 20px var(--primary-glow);
}

.avatar-initial {
    font-size: 1.1rem;
    font-weight: 700;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 0.75rem);
    right: 0;
    background: var(--glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    min-width: 240px;
    box-shadow: var(--shadow-lg);
    z-index: 150;
    overflow: hidden;
}

.user-info {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--surface-border);
}

.user-email {
    font-size: 0.9rem;
    color: var(--gray-300);
}

.user-dropdown hr {
    border: none;
    border-top: 1px solid var(--surface-border);
    margin: 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.875rem 1.25rem;
    text-align: left;
    background: none;
    border: none;
    color: var(--gray-200);
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
}

.dropdown-item:hover {
    background: var(--surface-hover);
    color: var(--white);
}

.logout-btn:hover {
    color: var(--red);
}

/* Language Toggle */
.lang-code {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--gray-400);
    padding: 0.5rem;
    transition: var(--transition);
}

#lang-toggle:hover .lang-code {
    color: var(--primary);
}

/* Back Button */
.back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--navy-light);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-md);
    color: var(--gray-400);
    cursor: pointer;
    transition: var(--transition);
}

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

.back-btn.hidden {
    display: none;
}

/* ============================================
   BOTTOM NAVIGATION - Premium FAB
   ============================================ */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--glass-border);
    display: none;
    justify-content: space-around;
    align-items: flex-end;
    padding: 0.5rem 0.5rem;
    padding-bottom: calc(0.5rem + env(safe-area-inset-bottom));
    z-index: 100;
}

.bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    color: var(--gray-500);
    font-size: 0.65rem;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-md);
    transition: var(--transition);
    min-width: 56px;
}

.bottom-nav a svg {
    width: 24px;
    height: 24px;
    transition: var(--transition);
}

.bottom-nav a.active {
    color: var(--primary);
}

.bottom-nav a.active svg {
    transform: scale(1.1);
}

/* Central FAB Button */
.bottom-nav .inject-btn {
    position: relative;
    top: -24px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--teal-dark) 100%);
    border-radius: var(--radius-full);
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    box-shadow:
        0 8px 25px var(--primary-glow),
        0 0 0 4px rgba(16, 185, 129, 0.15);
    transition: var(--transition);
}

.bottom-nav .inject-btn svg {
    width: 28px;
    height: 28px;
}

.bottom-nav .inject-btn:hover {
    transform: scale(1.08);
    box-shadow:
        0 12px 35px var(--primary-glow),
        0 0 0 6px rgba(16, 185, 129, 0.2);
}

.bottom-nav .inject-btn:active {
    transform: scale(0.95);
}

.bottom-nav .inject-btn span {
    display: none;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.app-main {
    flex: 1;
    padding: 2rem 1.5rem;
    padding-bottom: 120px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* ============================================
   VIEWS
   ============================================ */
.view {
    display: none;
    animation: viewFadeIn 0.4s ease-out;
}

.view.active {
    display: block;
}

@keyframes viewFadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* View Header */
.view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.view-header h1 {
    font-size: 2rem;
    background: linear-gradient(135deg, var(--white) 0%, var(--gray-300) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.view-subtitle {
    color: var(--gray-400);
    font-size: 1rem;
    width: 100%;
    margin-top: -0.5rem;
}

/* ============================================
   LOGIN VIEW - Glassmorphism
   ============================================ */
.view-login {
    display: none;
    min-height: calc(100vh - 72px);
}

.view-login.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    position: relative;
    background: var(--glass);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 3rem 2.5rem;
    max-width: 420px;
    width: 100%;
    text-align: center;
    margin: 1rem;
    box-shadow: var(--shadow-lg);
}

/* Decorative glow */
.login-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at center, rgba(16, 185, 129, 0.1) 0%, transparent 60%);
    z-index: -1;
    animation: loginGlow 8s ease-in-out infinite;
}

@keyframes loginGlow {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(5%, 5%) scale(1.1); }
}

.login-header {
    margin-bottom: 2.5rem;
}

.login-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.login-logo svg {
    width: 72px;
    height: 72px;
    color: var(--primary);
    filter: drop-shadow(0 0 20px var(--primary-glow));
}

.login-header h1 {
    font-size: 2rem;
    color: var(--white);
    margin-bottom: 0.5rem;
}

.login-subtitle {
    color: var(--gray-400);
    font-size: 1rem;
}

.login-form {
    text-align: left;
}

.login-form .form-group {
    margin-bottom: 1.75rem;
}

.login-form label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray-300);
    margin-bottom: 0.5rem;
}

.login-form input[type="email"] {
    width: 100%;
    padding: 1rem 1.25rem;
    background: var(--navy);
    border: 2px solid var(--surface-border);
    border-radius: var(--radius-md);
    color: var(--white);
    font-size: 1rem;
    transition: var(--transition);
}

.login-form input[type="email"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

.login-form input[type="email"]::placeholder {
    color: var(--gray-500);
}

.login-success {
    padding: 2.5rem 0;
}

.login-success .success-icon {
    margin-bottom: 1.5rem;
}

.login-success .success-icon svg {
    filter: drop-shadow(0 0 15px rgba(34, 197, 94, 0.5));
}

.login-success h2 {
    font-size: 1.35rem;
    color: var(--white);
    margin-bottom: 0.75rem;
}

.login-success p {
    color: var(--gray-400);
    font-size: 0.95rem;
    line-height: 1.6;
}

.login-success .spam-notice {
    margin-top: 1.25rem;
    padding: 0.875rem 1.25rem;
    background: rgba(234, 179, 8, 0.1);
    border: 1px solid rgba(234, 179, 8, 0.3);
    border-radius: var(--radius-md);
    color: var(--yellow);
    font-size: 0.85rem;
}

.login-footer {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--surface-border);
}

.login-disclaimer {
    color: var(--gray-500);
    font-size: 0.8rem;
    line-height: 1.6;
}

/* ============================================
   LOADING VIEW
   ============================================ */
.view-loading {
    display: none;
    min-height: calc(100vh - 72px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

.view-loading.active {
    display: flex;
}

.view-loading p {
    color: var(--gray-400);
    font-size: 0.95rem;
}

.loading-spinner {
    width: 56px;
    height: 56px;
    border: 3px solid var(--surface-border);
    border-top-color: var(--primary);
    border-radius: var(--radius-full);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   BUTTONS - Premium Design
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.875rem 1.75rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--teal-dark) 100%);
    color: var(--white);
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--primary-glow);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--primary);
    color: var(--navy);
    transform: translateY(-2px);
}

.btn-danger {
    background: linear-gradient(135deg, var(--red) 0%, #dc2626 100%);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4);
}

.btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem;
    min-width: 44px;
    min-height: 44px;
    background: var(--navy-light);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-md);
    color: var(--gray-400);
    cursor: pointer;
    transition: var(--transition);
}

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

.btn-icon.btn-danger:hover {
    color: var(--red);
    border-color: var(--red);
    background: rgba(239, 68, 68, 0.1);
}

.btn-sm {
    padding: 0.6rem 1.25rem;
    font-size: 0.85rem;
}

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

.btn-block {
    width: 100%;
}

/* Button Spinner */
.spinner-small {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: var(--radius-full);
    animation: spin 0.8s linear infinite;
}

/* ============================================
   CARDS - Premium Glass Effect
   ============================================ */
.card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    transition: var(--transition);
}

.card:hover {
    border-color: rgba(16, 185, 129, 0.3);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

/* ============================================
   STAT CARDS - Enhanced
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}

.stat-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--violet) 100%);
    opacity: 0;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: rgba(16, 185, 129, 0.3);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(139, 92, 246, 0.1) 100%);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    color: var(--primary);
}

.stat-value {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--white);
    font-family: var(--font-display);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-label {
    color: var(--gray-400);
    font-size: 0.85rem;
    font-weight: 500;
}

/* ============================================
   DASHBOARD SECTIONS
   ============================================ */
.dashboard-section {
    margin-bottom: 2.5rem;
}

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

.section-header h2 {
    font-size: 1.25rem;
    color: var(--white);
}

.link-more {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--primary);
}

.link-more:hover {
    color: var(--primary-light);
}

/* Badge */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 0.75rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--teal-dark) 100%);
    color: var(--white);
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    box-shadow: 0 2px 8px var(--primary-glow);
}

/* ============================================
   QUICK ACTIONS
   ============================================ */
.quick-actions {
    display: flex;
    gap: 1rem;
}

.quick-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.875rem;
    flex: 1;
    padding: 1.25rem 1.5rem;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    color: var(--gray-200);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.quick-action-btn svg {
    color: var(--primary);
    transition: var(--transition);
}

.quick-action-btn:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.quick-action-btn:hover svg {
    transform: scale(1.1);
}

/* ============================================
   ACTIVITY LIST
   ============================================ */
.activity-list,
.log-list,
.schedule-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.activity-item,
.log-item,
.schedule-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.activity-item:hover,
.log-item:hover {
    border-color: rgba(16, 185, 129, 0.3);
    transform: translateX(4px);
}

.activity-icon,
.log-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: var(--radius-sm);
    color: var(--primary);
}

.activity-content,
.log-content {
    flex: 1;
}

.activity-title,
.log-title {
    font-weight: 600;
    color: var(--white);
}

.activity-detail,
.log-detail {
    font-size: 0.85rem;
    color: var(--gray-400);
}

.activity-time,
.log-time {
    font-size: 0.8rem;
    color: var(--gray-500);
}

/* ============================================
   PEPTIDE CARDS - Enhanced
   ============================================ */
.peptides-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
}

.peptide-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.peptide-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--violet) 100%);
}

.peptide-card:hover {
    transform: translateY(-4px);
    border-color: rgba(16, 185, 129, 0.3);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.peptide-card.expired::before {
    background: linear-gradient(90deg, var(--red) 0%, var(--orange) 100%);
}

.peptide-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.25rem;
}

.peptide-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--white);
}

.peptide-actions {
    display: flex;
    gap: 0.5rem;
}

.peptide-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.peptide-stat {
    background: var(--navy);
    padding: 0.875rem;
    border-radius: var(--radius-md);
    text-align: center;
}

.peptide-stat .stat-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-500);
    margin-bottom: 0.25rem;
}

.peptide-stat .stat-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
}

.peptide-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--surface-border);
    font-size: 0.8rem;
    color: var(--gray-400);
}

.peptide-expiry {
    font-weight: 600;
}

.peptide-expiry.warning {
    color: var(--yellow);
}

.peptide-expiry.expired {
    color: var(--red);
}

/* Expiration Progress Bar */
.peptide-progress {
    height: 6px;
    background: var(--navy);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 0.75rem;
}

.peptide-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--green) 100%);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.peptide-progress-fill.warning {
    background: linear-gradient(90deg, var(--yellow) 0%, var(--orange) 100%);
}

.peptide-progress-fill.expired {
    background: linear-gradient(90deg, var(--red) 0%, var(--red-light) 100%);
}

.peptide-quick-actions {
    margin-top: 1rem;
}

.peptide-quick-actions .btn {
    width: 100%;
}

/* ============================================
   BODY MAP - Enhanced
   ============================================ */
.body-map-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.body-map-tabs {
    display: flex;
    gap: 0.5rem;
    background: var(--navy-light);
    padding: 6px;
    border-radius: var(--radius-lg);
}

.body-map-tab {
    padding: 0.75rem 2rem;
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    color: var(--gray-400);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.body-map-tab.active {
    background: var(--primary);
    color: var(--navy);
    font-weight: 600;
    box-shadow: 0 2px 10px var(--primary-glow);
}

.body-map {
    position: relative;
    width: 280px;
    max-width: 100%;
}

.body-svg {
    width: 100%;
    height: auto;
}

/* Injection Sites - Larger, more visible */
.injection-site {
    cursor: pointer;
    transition: var(--transition);
}

.injection-site:hover {
    transform: scale(1.3);
}

.site-circle {
    fill: var(--primary);
    stroke: var(--white);
    stroke-width: 1.5;
    transition: var(--transition);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.site-circle.green {
    fill: var(--green);
}

.site-circle.yellow {
    fill: var(--yellow);
}

.site-circle.red {
    fill: var(--red);
}

.injection-site.selected .site-circle {
    fill: var(--white);
    stroke: var(--primary);
    stroke-width: 3;
    filter: drop-shadow(0 0 10px var(--primary-glow));
}

/* Site pulse animation */
.site-circle.green {
    animation: sitePulse 2s ease-in-out infinite;
}

@keyframes sitePulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.15);
        opacity: 0.8;
    }
}

.site-hitbox {
    cursor: pointer;
}

/* Site Legend */
.site-legend {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    font-size: 0.85rem;
    color: var(--gray-400);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: var(--radius-full);
}

.dot.green { background: var(--green); }
.dot.yellow { background: var(--yellow); }
.dot.red { background: var(--red); }

/* Selected Site Card */
.selected-site {
    background: var(--glass);
    border: 2px solid var(--primary);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    text-align: center;
    width: 100%;
    max-width: 280px;
    box-shadow: 0 0 20px var(--primary-glow);
}

.site-name {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.site-last-used {
    font-size: 0.85rem;
    color: var(--gray-400);
}

/* ============================================
   TRACKING TABS
   ============================================ */
.tracking-tabs {
    display: flex;
    gap: 0;
    background: var(--navy-light);
    padding: 6px;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
}

.tracking-tab {
    flex: 1;
    padding: 0.875rem 1.5rem;
    background: transparent;
    border: none;
    color: var(--gray-400);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.tracking-tab:hover {
    color: var(--white);
}

.tracking-tab.active {
    background: var(--primary);
    color: var(--navy);
    font-weight: 600;
    box-shadow: 0 2px 10px var(--primary-glow);
}

.tracking-content {
    animation: viewFadeIn 0.3s ease;
}

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

.tab-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--white);
}

/* ============================================
   CHARTS - Enhanced
   ============================================ */
.chart-container {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.chart-container canvas {
    width: 100% !important;
    max-height: 280px;
}

/* Weight Stats */
.weight-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.weight-current {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
}

.weight-value {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary);
    font-family: var(--font-display);
    line-height: 1;
}

.weight-unit {
    font-size: 1.25rem;
    color: var(--gray-400);
}

.weight-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.weight-stat {
    background: var(--navy);
    padding: 1rem;
    border-radius: var(--radius-md);
    text-align: center;
}

.weight-stat .stat-value {
    font-size: 1.25rem;
}

.weight-stat .stat-value.up { color: var(--green); }
.weight-stat .stat-value.down { color: var(--red); }
.weight-stat .stat-value.neutral { color: var(--gray-400); }

/* ============================================
   PROGRESS BAR
   ============================================ */
.progress-bar-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.progress-bar {
    flex: 1;
    height: 10px;
    background: var(--navy-light);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--green) 100%);
    border-radius: var(--radius-full);
    transition: width 0.5s ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.2) 50%, transparent 100%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-text {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--gray-300);
}

/* ============================================
   CHAPTERS GRID
   ============================================ */
.chapters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.chapter-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    cursor: pointer;
    transition: var(--transition);
}

.chapter-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.chapter-card.completed {
    border-color: var(--green);
}

.chapter-card.locked {
    opacity: 0.5;
    cursor: not-allowed;
}

.chapter-card.locked:hover {
    transform: none;
}

.chapter-icon {
    font-size: 2rem;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--navy);
    border-radius: var(--radius-md);
}

.chapter-info {
    flex: 1;
}

.chapter-number {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.chapter-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--white);
}

.chapter-status svg {
    width: 24px;
    height: 24px;
}

/* ============================================
   CALCULATOR
   ============================================ */
.calculator-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    margin-top: 2rem;
}

.calculator-header h3 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--white);
}

.calc-row {
    margin-bottom: 1.25rem;
}

.calc-row label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--gray-300);
    margin-bottom: 0.5rem;
}

.input-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.input-group .form-input {
    flex: 1;
}

.input-suffix {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--gray-400);
    min-width: 40px;
}

.calc-result {
    background: linear-gradient(135deg, var(--navy) 0%, rgba(16, 185, 129, 0.1) 100%);
    border: 2px solid var(--primary);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
    margin-top: 1.5rem;
    box-shadow: 0 0 30px var(--primary-glow);
}

.result-label {
    font-size: 0.95rem;
    color: var(--gray-400);
}

.result-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    font-family: var(--font-display);
    display: block;
    margin: 0.5rem 0;
}

.result-units {
    font-size: 0.85rem;
    color: var(--gray-400);
}

/* ============================================
   HALF-LIFE VIEW
   ============================================ */
.halflife-selector {
    margin-bottom: 1.5rem;
}

.halflife-selector label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--gray-300);
    margin-bottom: 0.5rem;
}

.halflife-chart {
    height: 300px;
}

.halflife-info {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.halflife-card {
    background: var(--navy);
    border-radius: var(--radius-md);
    padding: 1rem;
}

.halflife-name {
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.halflife-stats {
    display: flex;
    gap: 1rem;
}

.halflife-stat {
    flex: 1;
}

.halflife-stat .stat-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--gray-500);
}

.halflife-stat .stat-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--white);
}

/* ============================================
   SETTINGS
   ============================================ */
.settings-section {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.25rem;
}

.settings-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray-200);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--surface-border);
}

.setting-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.setting-row:first-of-type {
    padding-top: 0;
}

.setting-row > label {
    font-size: 0.95rem;
    color: var(--gray-200);
}

/* Toggle Switch - Premium */
.toggle {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 30px;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--gray-600);
    border-radius: var(--radius-full);
    transition: var(--transition);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    height: 24px;
    width: 24px;
    left: 3px;
    bottom: 3px;
    background: var(--white);
    border-radius: var(--radius-full);
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.toggle input:checked + .toggle-slider {
    background: var(--primary);
}

.toggle input:checked + .toggle-slider::before {
    transform: translateX(22px);
}

/* Danger Zone */
.danger-zone {
    border-color: rgba(239, 68, 68, 0.3);
}

.danger-zone h3 {
    color: var(--red);
}

/* ============================================
   FORMS - Premium
   ============================================ */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray-300);
    margin-bottom: 0.5rem;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.875rem 1.25rem;
    background: var(--navy);
    border: 2px solid var(--surface-border);
    border-radius: var(--radius-md);
    color: var(--white);
    font-size: 1rem;
    font-family: var(--font-sans);
    transition: var(--transition);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

.form-input::placeholder {
    color: var(--gray-500);
}

.form-textarea {
    min-height: 100px;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

/* ============================================
   MODALS - Premium
   ============================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
}

.modal-overlay.active {
    display: flex;
}

.modal {
    position: relative;
    display: none;
    flex-direction: column;
    background: var(--navy-light);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    animation: modalSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal.active {
    display: flex;
}

.modal-sm {
    max-width: 400px;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--surface-border);
}

.modal-header h2 {
    font-size: 1.25rem;
    color: var(--white);
}

.modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--navy);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-md);
    color: var(--gray-400);
    cursor: pointer;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--white);
    border-color: var(--primary);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--surface-border);
}

/* Paywall Modal */
.modal-paywall {
    max-width: 440px;
}

.paywall-hero {
    text-align: center;
    margin-bottom: 1.5rem;
}

.paywall-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(139, 92, 246, 0.1) 100%);
    color: var(--primary);
    margin-bottom: 1.25rem;
}

.paywall-tagline {
    color: var(--gray-300);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.paywall-price {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
}

.paywall-price-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.paywall-compare {
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--gray-500);
    text-decoration: line-through;
}

.paywall-amount {
    font-size: 3rem;
    font-weight: 800;
    color: var(--white);
    font-family: var(--font-display);
    line-height: 1;
}

.paywall-badge {
    background: var(--red);
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.3rem 0.75rem;
    border-radius: var(--radius-full);
    letter-spacing: 0.02em;
}

.paywall-period {
    font-size: 0.8rem;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.paywall-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem 0 0;
    border-top: 1px solid var(--surface-border);
}

.paywall-features li {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    font-size: 0.95rem;
    color: var(--gray-200);
}

.paywall-features li svg {
    flex-shrink: 0;
    color: var(--primary);
}

.paywall-footer {
    flex-direction: column;
    gap: 0.75rem;
}

.paywall-secure {
    width: 100%;
    text-align: center;
    font-size: 0.8rem;
    color: var(--gray-500);
}

/* ============================================
   SEVERITY SELECTOR
   ============================================ */
.severity-selector {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.severity-btn {
    flex: 1;
    font-size: 1.5rem;
    padding: 0.75rem;
    background: var(--navy);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    opacity: 0.5;
}

.severity-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}

.severity-btn.selected {
    opacity: 1;
    border-color: var(--primary);
    background: var(--navy-light);
    box-shadow: 0 0 15px var(--primary-glow);
}

.severity-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--gray-500);
}

/* ============================================
   TOASTS
   ============================================ */
.toast-container {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 400;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
}

.toast {
    background: var(--glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1rem 1.75rem;
    color: var(--white);
    font-size: 0.95rem;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition);
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-success {
    border-color: var(--green);
}

.toast-error {
    border-color: var(--red);
}

/* ============================================
   EMPTY STATES - Illustrated
   ============================================ */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--gray-400);
}

.empty-state svg {
    width: 80px;
    height: 80px;
    margin-bottom: 1.5rem;
    opacity: 0.4;
}

.empty-state h3 {
    font-size: 1.25rem;
    color: var(--gray-300);
    margin-bottom: 0.5rem;
}

.empty-state p {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

.empty-state-centered {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
}

.empty-state-cta {
    margin-top: 1rem;
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

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

/* ============================================
   SKELETON LOADING
   ============================================ */
.skeleton {
    background: linear-gradient(90deg, var(--navy-light) 25%, var(--navy-lighter) 50%, var(--navy-light) 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s infinite;
    border-radius: var(--radius-md);
}

.skeleton-text {
    height: 1rem;
    margin-bottom: 0.5rem;
}

.skeleton-text-sm {
    height: 0.75rem;
    width: 60%;
}

.skeleton-card {
    height: 120px;
}

.skeleton-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
}

@keyframes skeletonShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================
   UTILITIES
   ============================================ */
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-primary { color: var(--primary); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-muted { color: var(--gray-400); }
.text-sm { font-size: 0.85rem; }
.text-xs { font-size: 0.75rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.flex { display: flex; }
.flex-1 { flex: 1; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }

/* ============================================
   RESPONSIVE - TABLET
   ============================================ */
@media (max-width: 1024px) {
    .app-main {
        max-width: 100%;
        padding: 1.5rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================
   RESPONSIVE - MOBILE
   ============================================ */
@media (max-width: 768px) {
    /* Header */
    .app-header {
        padding: 0 1rem;
        height: 64px;
    }

    .app-header .nav-tabs {
        display: none;
    }

    .logo-text {
        display: none;
    }

    .logo-icon {
        width: 36px;
        height: 36px;
    }

    .logo-icon svg {
        width: 20px;
        height: 20px;
    }

    /* Bottom Navigation */
    .bottom-nav {
        display: flex;
    }

    /* Main content */
    .app-main {
        padding: 1.25rem 1rem;
        padding-bottom: 110px;
    }

    /* View Headers */
    .view-header h1 {
        font-size: 1.5rem;
    }

    .view-subtitle {
        font-size: 0.9rem;
    }

    /* Stats Grid - 2 columns */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .stat-card {
        padding: 1.25rem;
    }

    .stat-icon {
        width: 40px;
        height: 40px;
    }

    .stat-value {
        font-size: 1.75rem;
    }

    /* Quick Actions */
    .quick-actions {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
    }

    .quick-action-btn {
        flex-direction: column;
        padding: 1.25rem 0.5rem;
        font-size: 0.8rem;
        gap: 0.5rem;
    }

    /* Peptides */
    .peptides-list {
        grid-template-columns: 1fr;
    }

    /* Tracking Tabs */
    .tracking-tabs {
        margin-bottom: 1.5rem;
    }

    .tracking-tab {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }

    /* Weight Stats */
    .weight-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .weight-value {
        font-size: 2.5rem;
    }

    /* Body Map */
    .body-map {
        width: 240px;
    }

    /* Chapters */
    .chapters-grid {
        grid-template-columns: 1fr;
    }

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

    .form-input,
    .form-select,
    .form-textarea {
        font-size: 16px; /* Prevent iOS zoom */
    }

    /* Modals - Full screen */
    .modal-overlay {
        padding: 0;
    }

    .modal {
        max-width: 100%;
        max-height: 100%;
        height: 100%;
        border-radius: 0;
    }

    .modal.modal-sm {
        max-width: 90%;
        height: auto;
        max-height: 90vh;
        border-radius: var(--radius-xl);
        margin: auto;
    }

    /* Toasts */
    .toast-container {
        left: 1rem;
        right: 1rem;
        transform: none;
    }

    .toast {
        width: 100%;
    }

    /* Empty states */
    .empty-state {
        padding: 3rem 1.5rem;
    }

    .empty-state svg {
        width: 64px;
        height: 64px;
    }

    /* Login */
    .login-container {
        margin: 0.5rem;
        padding: 2rem 1.5rem;
    }

    .login-logo svg {
        width: 56px;
        height: 56px;
    }

    .login-header h1 {
        font-size: 1.5rem;
    }
}

/* Small phones */
@media (max-width: 375px) {
    .app-main {
        padding: 1rem 0.75rem;
        padding-bottom: 100px;
    }

    .view-header h1 {
        font-size: 1.35rem;
    }

    .stats-grid {
        gap: 0.5rem;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .quick-actions {
        gap: 0.5rem;
    }

    .quick-action-btn {
        padding: 1rem 0.25rem;
        font-size: 0.7rem;
    }

    .bottom-nav .inject-btn {
        width: 56px;
        height: 56px;
        top: -20px;
    }

    .body-map {
        width: 200px;
    }
}

/* Safe area insets */
@supports (padding: env(safe-area-inset-bottom)) {
    .bottom-nav {
        padding-bottom: calc(0.75rem + env(safe-area-inset-bottom));
    }

    .app-main {
        padding-bottom: calc(110px + env(safe-area-inset-bottom));
    }

    @media (max-width: 768px) {
        .modal {
            padding-top: env(safe-area-inset-top);
            padding-bottom: env(safe-area-inset-bottom);
        }
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--navy);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-600);
    border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-500);
}

/* Chapter Detail View */
.chapter-content {
    padding-bottom: 1.5rem;
}

.chapter-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.chapter-icon-large {
    font-size: 3rem;
}

.chapter-body {
    color: var(--gray-200);
    line-height: 1.8;
}

.chapter-body h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--white);
}

.chapter-body ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.chapter-body li {
    margin-bottom: 0.5rem;
}

.warning-box {
    background: rgba(234, 179, 8, 0.1);
    border: 1px solid rgba(234, 179, 8, 0.3);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    color: var(--yellow);
}

.chapter-nav {
    display: flex;
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--surface-border);
}

.chapter-nav .btn {
    flex: 1;
}

.complete-chapter-btn {
    margin-top: 2rem;
}

.chapter-completed-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 2rem;
    padding: 1rem;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: var(--radius-md);
    color: var(--green);
    font-weight: 600;
}

/* Effects/Side Effects */
.effects-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.effect-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
}

.effect-emoji {
    font-size: 1.5rem;
}

.log-notes {
    font-size: 0.85rem;
    color: var(--gray-400);
    margin-top: 0.25rem;
    font-style: italic;
}

.log-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Inject form styling */
.inject-form {
    margin-bottom: 1.5rem;
}

/* Hide nav elements based on auth */
body.auth-loading .nav-tabs,
body.auth-loading .user-menu,
body.not-authenticated .nav-tabs,
body.not-authenticated .user-menu {
    display: none;
}

.app-header.hidden,
.bottom-nav.hidden {
    display: none !important;
}
