/* ============================================================
   FALCONIUS HEALTH – Design System
   Premium dark-themed health dashboard
   ============================================================ */

/* === CSS Custom Properties === */
:root {
    /* Background */
    --bg-primary: #0a0a1a;
    --bg-secondary: #0f0f24;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.06);
    --bg-card-active: rgba(255, 255, 255, 0.08);
    --bg-input: rgba(255, 255, 255, 0.05);

    /* Borders */
    --border-card: rgba(255, 255, 255, 0.08);
    --border-card-hover: rgba(255, 255, 255, 0.15);
    --border-accent: rgba(58, 210, 159, 0.3);

    /* Accent Colors */
    --accent-cyan: #3ad29f;
    --accent-cyan-dim: rgba(58, 210, 159, 0.15);
    --accent-purple: #7c3aed;
    --accent-purple-dim: rgba(124, 58, 237, 0.15);
    --accent-gradient: linear-gradient(135deg, #3ad29f, #7c3aed);
    --accent-gradient-hover: linear-gradient(135deg, #5dddb5, #9b5cff);

    /* Semantic Colors */
    --trend-positive: #10b981;
    --trend-positive-dim: rgba(16, 185, 129, 0.15);
    --trend-negative: #f43f5e;
    --trend-negative-dim: rgba(244, 63, 94, 0.15);
    --trend-neutral: #94a3b8;

    /* Body Composition Colors */
    --comp-muscle: #3ad29f;
    --comp-muscle-dim: rgba(58, 210, 159, 0.25);
    --comp-fat: #ff6b35;
    --comp-fat-dim: rgba(255, 107, 53, 0.25);
    --comp-bone: #e2e8f0;
    --comp-bone-dim: rgba(226, 232, 240, 0.2);
    --comp-water: #06b6d4;
    --comp-water-dim: rgba(6, 182, 212, 0.25);

    /* Text */
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-tertiary: #64748b;
    --text-inverse: #0a0a1a;

    /* Shadows & Glows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow-cyan: 0 0 30px rgba(58, 210, 159, 0.12);
    --shadow-glow-purple: 0 0 30px rgba(124, 58, 237, 0.12);
    --shadow-glow-accent: 0 4px 24px rgba(58, 210, 159, 0.2);

    /* Radii */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);

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

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;

    /* Layout */
    --header-height: 56px;
    --content-max-width: 1200px;
    --space-lg: 16px;
    --space-xl: 24px;
    --space-2xl: 32px;
}


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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

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

a { color: var(--accent-cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; }

button {
    font-family: var(--font-sans);
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
}


/* === Utility Classes === */
.hidden { display: none !important; }
.sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0,0,0,0); border: 0;
}

.text-positive { color: var(--trend-positive); }
.text-negative { color: var(--trend-negative); }
.text-neutral { color: var(--trend-neutral); }
.text-secondary { color: var(--text-secondary); }
.text-accent { color: var(--accent-cyan); }

.fade-in {
    animation: fadeIn var(--transition-slow) ease both;
}

.slide-up {
    animation: slideUp var(--transition-slow) ease both;
}

.stagger-1 { animation-delay: 0.05s; }
.stagger-2 { animation-delay: 0.1s; }
.stagger-3 { animation-delay: 0.15s; }
.stagger-4 { animation-delay: 0.2s; }
.stagger-5 { animation-delay: 0.25s; }


/* === Keyframes === */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-16px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

@keyframes breathe {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.015); }
}

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

@keyframes glowPulse {
    0%, 100% { filter: drop-shadow(0 0 8px rgba(58, 210, 159, 0.3)); }
    50% { filter: drop-shadow(0 0 16px rgba(58, 210, 159, 0.5)); }
}

@keyframes waterWave {
    0% { d: path("M0,8 Q25,0 50,8 Q75,16 100,8 L100,100 L0,100 Z"); }
    50% { d: path("M0,8 Q25,16 50,8 Q75,0 100,8 L100,100 L0,100 Z"); }
    100% { d: path("M0,8 Q25,0 50,8 Q75,16 100,8 L100,100 L0,100 Z"); }
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}


/* === Header === */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: rgba(10, 10, 26, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-card);
    z-index: 100;
    animation: slideDown var(--transition) ease;
}

.header-inner {
    max-width: var(--content-max-width);
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-lg);
}

.header-brand {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.header-logo {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    object-fit: cover;
}

.header-title {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--text-primary);
}

.header-title-accent {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

/* ===== Footer ===== */
.app-footer {
    text-align: center;
    padding: var(--space-md) var(--space-lg);
    font-size: 0.65rem;
    color: var(--text-tertiary);
    letter-spacing: 0.04em;
    opacity: 0.5;
}

.btn-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    transition: all var(--transition);
}

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

.btn-icon:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}


/* === App Content === */
.app-content {
    min-height: 100vh;
}

.dashboard-content {
    padding-top: calc(var(--header-height) + var(--space-md));
    padding-bottom: var(--space-2xl);
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding-left: var(--space-md);
    padding-right: var(--space-md);
}


/* === Glass Card === */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all var(--transition);
}

.card:hover {
    border-color: var(--border-card-hover);
    background: var(--bg-card-hover);
}

.card-accent {
    border-color: var(--border-accent);
    box-shadow: var(--shadow-glow-cyan);
}

.card-title {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
}

.card-title-note {
    font-weight: 400;
    text-transform: none;
    color: var(--text-tertiary);
    letter-spacing: normal;
}

.card-title-icon {
    width: 16px;
    height: 16px;
    margin-right: var(--space-sm);
    vertical-align: middle;
    opacity: 0.6;
}


/* === Login Page === */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.login-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.login-bg-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.25;
    animation: float 8s ease-in-out infinite;
}

.login-bg-blob-1 {
    width: 500px;
    height: 500px;
    background: var(--accent-cyan);
    top: -150px;
    right: -100px;
    animation-delay: 0s;
}

.login-bg-blob-2 {
    width: 400px;
    height: 400px;
    background: var(--accent-purple);
    bottom: -100px;
    left: -100px;
    animation-delay: 2s;
}

.login-bg-blob-3 {
    width: 300px;
    height: 300px;
    background: var(--accent-cyan);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.08;
    animation-delay: 4s;
}

.login-card {
    position: relative;
    z-index: 1;
    background: rgba(15, 15, 36, 0.8);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-xl);
    padding: var(--space-3xl) var(--space-2xl);
    max-width: 480px;
    width: 100%;
    text-align: center;
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    box-shadow: var(--shadow-lg), var(--shadow-glow-cyan);
    animation: slideUp 0.6s ease both;
}

.login-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--space-lg);
    border-radius: var(--radius-lg);
    object-fit: cover;
    display: block;
}

.login-title {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    margin-bottom: var(--space-sm);
}

.login-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-2xl);
    line-height: 1.6;
}

.btn-connect {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    width: 100%;
    padding: var(--space-md) var(--space-xl);
    background: var(--accent-gradient);
    color: var(--text-inverse);
    font-size: 1rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    letter-spacing: 0.03em;
    transition: all var(--transition);
    box-shadow: var(--shadow-glow-accent);
    position: relative;
    overflow: hidden;
}

.btn-connect::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--accent-gradient-hover);
    opacity: 0;
    transition: opacity var(--transition);
}

.btn-connect:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(58, 210, 159, 0.35);
}

.btn-connect:hover::before {
    opacity: 1;
}

.btn-connect:active {
    transform: translateY(0);
}

.btn-connect svg {
    width: 22px;
    height: 22px;
    position: relative;
    z-index: 1;
}

.btn-connect span {
    position: relative;
    z-index: 1;
}

.login-footer {
    margin-top: var(--space-xl);
    font-size: 0.8rem;
    color: var(--text-tertiary);
    line-height: 1.6;
}

.login-footer a {
    color: var(--text-secondary);
}


/* === Dashboard Greeting === */
.dashboard-greeting {
    margin-bottom: var(--space-sm);
}

.greeting-text {
    font-size: 1.4rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.3;
}

.greeting-sub {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    margin-top: var(--space-xs);
}


/* === Dashboard Grid (Mobile-First) === */
.dashboard-grid {
    display: grid;
    gap: var(--space-md);
}

.dashboard-row-hero {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-md);
}

.dashboard-row-full {
    display: grid;
    grid-template-columns: 1fr;
}


/* === Hero Card === */
.hero-card {
    padding: var(--space-xl);
}

.hero-weight {
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.02em;
    margin-bottom: var(--space-sm);
}

.hero-weight-unit {
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--text-secondary);
    margin-left: var(--space-xs);
}

.hero-date {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
}

.hero-trend {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
}

.hero-trend.positive {
    background: var(--trend-positive-dim);
    color: var(--trend-positive);
}

.hero-trend.negative {
    background: var(--trend-negative-dim);
    color: var(--trend-negative);
}

.hero-trend.neutral {
    background: rgba(148, 163, 184, 0.12);
    color: var(--trend-neutral);
}

.hero-trend-icon {
    width: 16px;
    height: 16px;
}

.hero-sparkline {
    margin-top: var(--space-lg);
    height: 48px;
    opacity: 0.5;
}


/* === Quick Stats Card === */
.quick-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
    height: 100%;
    align-content: center;
}

.stat-item {
    text-align: center;
    padding: var(--space-md);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    transition: all var(--transition);
}

.stat-item:hover {
    border-color: var(--border-card-hover);
    transform: translateY(-2px);
}

.stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.2;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: var(--space-xs);
}

.stat-unit {
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--text-secondary);
}


/* === Trend Chart === */
.chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-lg);
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.chart-period-tabs {
    display: flex;
    gap: var(--space-xs);
    background: var(--bg-card);
    border-radius: var(--radius-full);
    padding: 3px;
    border: 1px solid var(--border-card);
}

.chart-period-tab {
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all var(--transition);
    letter-spacing: 0.02em;
}

.chart-period-tab:hover {
    color: var(--text-primary);
}

.chart-period-tab.active {
    background: var(--accent-gradient);
    color: var(--text-inverse);
    box-shadow: var(--shadow-glow-accent);
}

.chart-trend-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
}

.chart-container {
    position: relative;
    height: 220px;
}


/* === Body Composition === */
.composition-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-lg);
    align-items: center;
    justify-items: center;
}

.body-silhouette-container {
    position: relative;
    width: 200px;
    height: 380px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.body-silhouette-svg {
    width: 100%;
    height: 100%;
    animation: breathe 4s ease-in-out infinite;
}

.composition-details {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.composition-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    transition: all var(--transition);
}

.composition-item:hover {
    border-color: var(--border-card-hover);
    transform: translateX(4px);
}

.composition-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 8px currentColor;
}

.composition-dot.muscle { background: var(--comp-muscle); color: var(--comp-muscle); }
.composition-dot.fat { background: var(--comp-fat); color: var(--comp-fat); }
.composition-dot.bone { background: var(--comp-bone); color: var(--comp-bone); }
.composition-dot.water { background: var(--comp-water); color: var(--comp-water); }

.composition-info {
    flex: 1;
}

.composition-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.composition-value {
    font-size: 1.2rem;
    font-weight: 700;
}

.composition-percent {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 50px;
    text-align: right;
}

.composition-bar {
    margin-top: var(--space-lg);
    height: 8px;
    border-radius: var(--radius-full);
    display: flex;
    overflow: hidden;
    background: var(--bg-input);
}

.composition-bar-segment {
    height: 100%;
    transition: width 1s ease;
}

.composition-bar-segment.muscle { background: var(--comp-muscle); }
.composition-bar-segment.fat { background: var(--comp-fat); }
.composition-bar-segment.bone { background: var(--comp-bone); }
.composition-bar-segment.water { background: var(--comp-water); }

.composition-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: var(--space-sm);
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

.composition-total-value {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 0.9rem;
}


/* === Measurement Cards === */
.measurements-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.measurement-card {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-sm);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    transition: all var(--transition);
    align-items: center;
}

.measurement-card:hover {
    border-color: var(--border-card-hover);
    background: var(--bg-card-hover);
}

.measurement-card:first-child {
    border-color: var(--border-accent);
    box-shadow: var(--shadow-glow-cyan);
}

.measurement-date {
    font-size: 0.9rem;
    font-weight: 600;
}

.measurement-time {
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

.measurement-values {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.measurement-metric {
    display: flex;
    flex-direction: column;
    min-width: 65px;
}

.measurement-metric-value {
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.measurement-metric-label {
    font-size: 0.7rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.trend-arrow {
    width: 14px;
    height: 14px;
}

.trend-arrow.up { color: var(--trend-negative); }
.trend-arrow.down { color: var(--trend-positive); }
.trend-arrow.neutral { color: var(--trend-neutral); }


/* === AI Analysis Card (Purple/Violet Theme) === */
.card-ai {
    border-color: rgba(167, 139, 250, 0.25);
    box-shadow: 0 0 24px rgba(124, 58, 237, 0.1);
    background: rgba(124, 58, 237, 0.04);
}

.card-ai:hover {
    border-color: rgba(167, 139, 250, 0.4);
    background: rgba(124, 58, 237, 0.07);
}

.card-title-ai {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: #a78bfa;
}

.ai-sparkle-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    animation: glowPulseAI 3s ease-in-out infinite;
}

@keyframes glowPulseAI {
    0%, 100% { filter: drop-shadow(0 0 4px rgba(167, 139, 250, 0.4)); }
    50% { filter: drop-shadow(0 0 10px rgba(167, 139, 250, 0.7)); }
}

.ai-analysis-text {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-primary);
    letter-spacing: 0.01em;
}

.ai-analysis-fallback {
    color: var(--text-tertiary);
    font-style: italic;
}

.ai-loading {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.ai-loading-shimmer {
    height: 14px;
    border-radius: var(--radius-sm);
    background: linear-gradient(
        90deg,
        rgba(124, 58, 237, 0.06) 25%,
        rgba(167, 139, 250, 0.12) 50%,
        rgba(124, 58, 237, 0.06) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    width: 100%;
}

.ai-loading-shimmer.short {
    width: 65%;
}


/* === Loading States === */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--bg-card) 25%,
        var(--bg-card-hover) 50%,
        var(--bg-card) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-md);
}

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    padding: var(--space-3xl);
    color: var(--text-secondary);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-card);
    border-top-color: var(--accent-cyan);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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


/* === Error State === */
.error-state {
    text-align: center;
    padding: var(--space-2xl);
    color: var(--text-secondary);
}

.error-state-icon {
    font-size: 2.5rem;
    margin-bottom: var(--space-md);
}

.error-state-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.btn-retry {
    margin-top: var(--space-md);
    padding: var(--space-sm) var(--space-xl);
    background: var(--accent-gradient);
    color: var(--text-inverse);
    font-weight: 600;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    transition: all var(--transition);
}

.btn-retry:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow-accent);
}


/* === Responsive – Mobile First (min-width breakpoints) === */

/* Tablet (≥ 640px) */
@media (min-width: 640px) {
    :root {
        --header-height: 64px;
        --space-lg: 24px;
        --space-xl: 32px;
        --space-2xl: 48px;
    }

    .dashboard-content {
        padding-left: var(--space-lg);
        padding-right: var(--space-lg);
        padding-top: calc(var(--header-height) + var(--space-lg));
    }

    .dashboard-grid {
        gap: var(--space-lg);
    }

    .hero-weight {
        font-size: 3.2rem;
    }

    .greeting-text {
        font-size: 1.6rem;
    }

    .chart-container {
        height: 260px;
    }

    .measurement-card {
        grid-template-columns: 130px 1fr;
        gap: var(--space-md);
        padding: var(--space-md) var(--space-lg);
    }

    .body-silhouette-container {
        width: 210px;
        height: 400px;
    }
}

/* Desktop (≥ 768px) */
@media (min-width: 768px) {
    .dashboard-row-hero {
        grid-template-columns: 1.4fr 1fr;
        gap: var(--space-lg);
    }

    .composition-layout {
        grid-template-columns: auto 1fr;
        gap: var(--space-2xl);
        justify-items: start;
    }

    .hero-weight {
        font-size: 3.5rem;
    }

    .measurement-card:hover {
        transform: translateX(4px);
    }
}

/* Large Desktop (≥ 1024px) */
@media (min-width: 1024px) {
    .dashboard-content {
        padding-top: calc(var(--header-height) + var(--space-xl));
        padding-bottom: var(--space-3xl);
    }

    .hero-weight {
        font-size: 4rem;
    }

    .greeting-text {
        font-size: 1.8rem;
    }

    .chart-container {
        height: 300px;
    }

    .body-silhouette-container {
        width: 240px;
        height: 440px;
    }

    .measurement-card {
        grid-template-columns: 140px 1fr;
        gap: var(--space-lg);
    }
}


/* === Scrollbar === */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-card);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border-card-hover);
}


/* === Toast / Notifications === */
.toast {
    position: fixed;
    bottom: var(--space-lg);
    right: var(--space-lg);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    border: 1px solid var(--border-card);
    box-shadow: var(--shadow-lg);
    font-size: 0.9rem;
    z-index: 200;
    animation: slideUp var(--transition) ease both;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.toast.error {
    border-color: var(--trend-negative);
    box-shadow: 0 0 20px rgba(244, 63, 94, 0.15);
}

.toast.success {
    border-color: var(--trend-positive);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.15);
}


/* === No Data State === */
.no-data {
    text-align: center;
    padding: var(--space-2xl);
    color: var(--text-tertiary);
    font-size: 0.9rem;
}

.no-data-icon {
    font-size: 2rem;
    margin-bottom: var(--space-md);
    opacity: 0.5;
}
