/* ============================================
   TRANSFORMLAB - Estilos v2.0
   Sistema de visualización de transformación física
   ============================================ */

/* ============================================
   START DATE PICKER OVERLAY
   ============================================ */
.start-date-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 5, 10, 0.95);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.start-date-overlay.visible {
    opacity: 1;
}

.start-date-card {
    width: 90%;
    max-width: 480px;
    background: linear-gradient(145deg, rgba(20, 20, 35, 0.95), rgba(10, 10, 20, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 
        0 25px 80px rgba(0, 0, 0, 0.5),
        0 0 100px rgba(0, 212, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transform: translateY(20px) scale(0.95);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.start-date-overlay.visible .start-date-card {
    transform: translateY(0) scale(1);
}

.start-date-header {
    text-align: center;
    margin-bottom: 2rem;
}

.start-date-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    animation: float 3s ease-in-out infinite;
}

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

.start-date-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    background: linear-gradient(135deg, #fff, #00d4ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.start-date-header p {
    color: var(--text-muted);
    font-size: 1rem;
    margin: 0;
}

.start-date-content {
    margin-bottom: 2rem;
}

.date-input-group {
    margin-bottom: 1.5rem;
}

.date-input-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.date-input-group input[type="date"] {
    width: 100%;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff;
    font-family: var(--font-main);
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.date-input-group input[type="date"]:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.2);
}

.date-input-group input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.date-input-group input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

.date-hint {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.quick-dates {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.quick-dates-label {
    width: 100%;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.quick-date-btn {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    color: var(--text-secondary);
    font-family: var(--font-main);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-date-btn:hover {
    background: rgba(0, 212, 255, 0.1);
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

.quick-date-btn.active {
    background: var(--accent-cyan);
    border-color: var(--accent-cyan);
    color: #000;
}

.start-date-footer {
    text-align: center;
}

.confirm-date-btn {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--accent-cyan), #0099cc);
    border: none;
    border-radius: 12px;
    color: #000;
    font-family: var(--font-main);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.3);
}

.confirm-date-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 212, 255, 0.4);
}

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

.btn-arrow {
    font-size: 1.3rem;
    transition: transform 0.2s;
}

.confirm-date-btn:hover .btn-arrow {
    transform: translateX(5px);
}

.date-note {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 1rem;
}

/* Settings mode variations */
.start-date-overlay.settings-mode .settings-card {
    max-width: 520px;
}

.current-date-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 1rem;
    background: rgba(0, 212, 255, 0.05);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.current-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.current-value {
    font-size: 1rem;
    font-weight: 500;
    color: var(--accent-cyan);
}

.warning-box {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(255, 159, 67, 0.1);
    border: 1px solid rgba(255, 159, 67, 0.3);
    border-radius: 12px;
    margin-top: 1.5rem;
}

.warning-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.warning-box p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--accent-orange);
    line-height: 1.4;
}

.settings-footer {
    display: flex;
    gap: 1rem;
}

.cancel-btn {
    flex: 1;
    padding: 1rem;
    background: transparent;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-secondary);
    font-family: var(--font-main);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.cancel-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--text-muted);
}

.settings-footer .confirm-date-btn {
    flex: 1.5;
}

/* Header settings button */
/* Mode Selector */
.mode-selector {
    display: flex;
    gap: 0.25rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 0.25rem;
}

.mode-btn {
    padding: 0.4rem 0.75rem;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-family: var(--font-main);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.mode-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.mode-btn.active {
    background: var(--accent-cyan);
    color: #000;
    font-weight: 600;
}

.mode-btn.active[data-mode="nomad"] {
    background: #22c55e;
}

.header-settings-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-family: var(--font-main);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.header-settings-btn:hover {
    background: rgba(0, 212, 255, 0.1);
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

.settings-icon {
    font-size: 1rem;
}

.start-date-label {
    opacity: 0.8;
}

/* Variables CSS */
:root {
    /* Colores base */
    --bg-dark: #0a0a0f;
    --bg-card: rgba(15, 15, 25, 0.8);
    --bg-card-hover: rgba(25, 25, 40, 0.9);
    
    /* Bordes y glass */
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-border-hover: rgba(255, 255, 255, 0.15);
    
    /* Textos */
    --text-primary: #ffffff;
    --text-secondary: #c0c0d0;
    --text-muted: #6b6b7b;
    
    /* Acentos */
    --accent-cyan: #00d4ff;
    --accent-green: #48bb78;
    --accent-coral: #ff6b6b;
    --accent-orange: #ff9f43;
    --accent-purple: #9f7aea;
    --accent-pink: #ed64a6;
    --accent-yellow: #faf089;
    --accent-teal: #4fd1c5;
    --accent-indigo: #667eea;
    
    /* Colores de fase */
    --phase-adaptation: #9b59b6;
    --phase-recomposition: #3498db;
    --phase-cut: #e74c3c;
    --phase-bulk: #27ae60;
    --phase-maintenance: #95a5a6;
    
    /* Tipografía */
    --font-main: 'Outfit', sans-serif;
    
    /* Radios */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    /* Sombras */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(0, 212, 255, 0.15);
}

/* Reset y base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

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

/* Cursor Glow */
.cursor-glow {
    position: fixed;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.08) 0%, transparent 70%);
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 0;
    will-change: left, top;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-dark);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    z-index: 9999;
}

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

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

.loading-overlay p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* App Container */
.app-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    position: relative;
    z-index: 1;
}

/* ============================================
   HEADER
   ============================================ */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border);
}

.header-brand {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.brand-accent {
    color: var(--accent-cyan);
}

.brand-tagline {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.header-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.header-period {
    text-align: right;
}

.period-label {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.period-date {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.phase-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: var(--phase-color, var(--accent-purple));
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ============================================
   NAVIGATION BAR
   ============================================ */
.nav-bar {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 0.75rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
}

/* Granularity Selector */
.granularity-selector {
    display: flex;
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-sm);
    padding: 4px;
    gap: 4px;
}

.granularity-btn {
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font-main);
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.granularity-btn:hover {
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
}

.granularity-btn.active {
    background: var(--accent-cyan);
    color: #000;
}

/* Timeline */
.timeline-container {
    flex: 1;
    padding: 0 1rem;
}

.timeline-bar {
    position: relative;
    height: 24px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    cursor: pointer;
    overflow: hidden;
}

.phase-markers {
    position: absolute;
    inset: 0;
    display: flex;
}

.phase-marker {
    height: 100%;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.phase-marker:hover {
    opacity: 1;
}

.timeline-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-green));
    border-radius: 12px;
    transition: width 0.3s ease;
    opacity: 0.3;
}

.timeline-position {
    position: absolute;
    top: 50%;
    width: 4px;
    height: 32px;
    background: var(--accent-cyan);
    border-radius: 2px;
    transform: translate(-50%, -50%);
    transition: left 0.3s ease;
    box-shadow: 0 0 10px var(--accent-cyan);
}

/* Navigation Controls */
.nav-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-btn {
    width: 36px;
    height: 36px;
    border: 1px solid var(--glass-border);
    background: transparent;
    color: var(--text-secondary);
    font-size: 1.3rem;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-btn:hover:not(:disabled) {
    background: var(--accent-cyan);
    color: #000;
    border-color: var(--accent-cyan);
}

.nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.nav-label {
    min-width: 120px;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.nav-btn-today {
    padding: 0.5rem 1rem;
    border: 1px solid var(--glass-border);
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font-main);
    font-size: 0.8rem;
    font-weight: 500;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-btn-today:hover {
    background: var(--accent-cyan);
    color: #000;
    border-color: var(--accent-cyan);
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* ============================================
   DASHBOARD ROW - METRIC CARDS
   ============================================ */
.dashboard-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.dashboard-row.nomad-dashboard {
    grid-template-columns: repeat(4, 1fr);
}

/* Nomad Card */
.metric-card.nomad {
    background: linear-gradient(145deg, rgba(34, 197, 94, 0.1), rgba(15, 15, 25, 0.8));
    border-color: rgba(34, 197, 94, 0.2);
}

.metric-card.nomad:hover {
    border-color: rgba(34, 197, 94, 0.4);
    box-shadow: 0 0 30px rgba(34, 197, 94, 0.15);
}

.nomad-stats {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.nomad-stat {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.nomad-stat.main {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(34, 211, 238, 0.1);
    border-radius: 12px;
    margin-bottom: 0.5rem;
}

.nomad-stat .stat-icon {
    font-size: 1.5rem;
}

.nomad-stat .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #22d3ee;
}

.nomad-stat .stat-value.small {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
}

.nomad-stat .stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.metric-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    transition: all 0.3s ease;
}

.metric-card:hover {
    border-color: var(--glass-border-hover);
    box-shadow: var(--shadow-glow);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--glass-border);
}

.card-icon {
    font-size: 1.3rem;
}

.card-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

.metric-grid.small {
    grid-template-columns: repeat(4, 1fr);
}

.metric-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.metric-item.wide {
    grid-column: span 2;
}

.metric-item.mini {
    text-align: center;
}

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

.metric-value {
    font-size: 1.3rem;
    font-weight: 700;
}

.metric-item.mini .metric-value {
    font-size: 1.1rem;
}

.metric-change {
    font-size: 0.75rem;
    font-weight: 500;
}

.metric-change.positive { color: var(--accent-green); }
.metric-change.negative { color: var(--accent-coral); }
.metric-change.neutral { color: var(--text-muted); }

.metric-bar-container {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin: 0.5rem 0;
}

.metric-bar {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
}

/* ============================================
   PHASE & GOALS ROW
   ============================================ */
.phase-goals-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Phase Indicator Card */
.phase-indicator-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

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

.phase-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.phase-info {
    flex: 1;
}

.phase-name {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.phase-timing {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.phase-progress-bar {
    position: relative;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.phase-progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.phase-progress-text {
    position: absolute;
    right: 0;
    top: -20px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.phase-description {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.phase-dates {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

/* Phase Stats Row (Nomad) */
.phase-stats-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
}

.phase-stat {
    display: flex;
    flex-direction: column;
    flex: 1;
    text-align: center;
}

.phase-stat .stat-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.phase-stat .stat-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Phase Extras/Tags */
.phase-extras {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.phase-tag {
    padding: 0.3rem 0.6rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.phase-changes {
    display: flex;
    gap: 1.5rem;
}

.phase-change {
    display: flex;
    flex-direction: column;
}

.change-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.change-value {
    font-size: 1rem;
    font-weight: 600;
}

.phase-change.positive .change-value { color: var(--accent-green); }
.phase-change.negative .change-value { color: var(--accent-coral); }

/* Goal Progress Card */
.goal-progress-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.goals-header h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
}

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

.goal-item {
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-sm);
}

.goal-item.complete {
    border: 1px solid var(--accent-green);
    background: rgba(72, 187, 120, 0.1);
}

.goal-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.goal-icon {
    font-size: 1rem;
}

.goal-name {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.goal-check {
    margin-left: auto;
    color: var(--accent-green);
    font-weight: bold;
}

.goal-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.goal-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.5s ease;
}

.goal-values {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
    font-size: 0.75rem;
}

.goal-current {
    font-weight: 600;
    color: var(--text-primary);
}

.goal-target {
    color: var(--text-muted);
}

.goal-percent {
    margin-left: auto;
    color: var(--accent-cyan);
    font-weight: 500;
}

/* ============================================
   CHART SECTION
   ============================================ */
.chart-section {
    margin-top: 0.5rem;
}

.chart-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

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

.chart-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
}

.metric-toggles {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.metric-toggle {
    padding: 0.4rem 0.8rem;
    border: 1px solid var(--glass-border);
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font-main);
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.metric-toggle:hover {
    border-color: var(--toggle-color, var(--accent-cyan));
    color: var(--toggle-color, var(--accent-cyan));
}

.metric-toggle.active {
    background: var(--toggle-color, var(--accent-cyan));
    color: #000;
    border-color: var(--toggle-color, var(--accent-cyan));
}

/* Hover Panel */
.hover-panel {
    padding: 1rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.05), rgba(168, 85, 247, 0.05));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    min-height: 100px;
    transition: all 0.3s ease;
}

.hover-panel.active {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.1);
}

.hover-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 60px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

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

.hover-date {
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent-cyan);
}

.hover-period {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.hover-phase {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--phase-color, var(--accent-purple));
    color: white;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 12px;
    margin-bottom: 0.75rem;
}

.hover-metrics {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.hover-metric {
    display: flex;
    flex-direction: column;
}

.hover-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.hover-value {
    font-size: 1rem;
    font-weight: 600;
}

/* Chart Wrapper */
.chart-wrapper {
    height: 400px;
    position: relative;
}

/* ============================================
   MILESTONES ROW
   ============================================ */
.milestones-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* ============================================
   INSIGHTS & ALERTS
   ============================================ */
.insights-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1rem;
}

.insights-panel {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
}

.insights-header h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
}

.insights-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.insight-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--accent-cyan);
}

.insight-item.success {
    border-left-color: var(--accent-green);
}

.insight-item.warning {
    border-left-color: var(--accent-orange);
}

.insight-item.info {
    border-left-color: var(--accent-cyan);
}

.insight-icon {
    font-size: 1.2rem;
}

.insight-content {
    flex: 1;
}

.insight-text {
    font-size: 0.85rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.insight-detail {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.insights-empty {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

/* Alerts Panel */
.alerts-panel {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
}

.alert-item {
    padding: 1rem;
    background: rgba(255, 159, 67, 0.1);
    border: 1px solid rgba(255, 159, 67, 0.3);
    border-radius: var(--radius-sm);
    margin-bottom: 0.75rem;
}

.alert-item.warning {
    background: rgba(255, 107, 107, 0.1);
    border-color: rgba(255, 107, 107, 0.3);
}

.alert-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.alert-title {
    font-weight: 600;
    font-size: 0.9rem;
}

.alert-message {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.alert-action {
    font-size: 0.75rem;
    color: var(--accent-cyan);
}

/* ============================================
   FOOTER
   ============================================ */
.app-footer {
    text-align: center;
    padding: 1.5rem;
    margin-top: 2rem;
    border-top: 1px solid var(--glass-border);
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* ============================================
   ERROR STATE
   ============================================ */
.error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem;
    text-align: center;
}

.error-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.error-state p {
    color: var(--text-muted);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1200px) {
    .dashboard-row {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .metric-grid.small {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .insights-row {
        grid-template-columns: 1fr;
    }
    
    .milestones-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .app-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .header-info {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .header-period {
        text-align: center;
    }
    
    .nav-bar {
        flex-direction: column;
        gap: 1rem;
    }
    
    .timeline-container {
        width: 100%;
        padding: 0;
    }
    
    .dashboard-row {
        grid-template-columns: 1fr;
    }
    
    .phase-goals-row {
        grid-template-columns: 1fr;
    }
    
    .goals-grid {
        grid-template-columns: 1fr;
    }
    
    .chart-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .metric-toggles {
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 480px) {
    .app-container {
        padding: 0.75rem;
    }
    
    .brand-title {
        font-size: 1.4rem;
    }
    
    .granularity-btn {
        padding: 0.4rem 0.6rem;
        font-size: 0.75rem;
    }
    
    .metric-value {
        font-size: 1.1rem;
    }
    
    .chart-wrapper {
        height: 300px;
    }
}

/* ============================================
   ONBOARDING WIZARD STYLES
   ============================================ */
.onboarding-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 5, 10, 0.98);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    transition: opacity 0.4s ease;
    overflow-y: auto;
    padding: 2rem;
}

.onboarding-overlay.visible {
    opacity: 1;
}

.onboarding-container {
    width: 100%;
    max-width: 600px;
    background: linear-gradient(145deg, rgba(20, 20, 35, 0.95), rgba(10, 10, 20, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 
        0 25px 80px rgba(0, 0, 0, 0.5),
        0 0 100px rgba(0, 212, 255, 0.1);
    transform: translateY(20px);
    transition: transform 0.4s ease;
}

.onboarding-overlay.visible .onboarding-container {
    transform: translateY(0);
}

.onboarding-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.onboarding-logo {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.onboarding-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    background: linear-gradient(135deg, #fff, #00d4ff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.onboarding-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-top: 0.5rem;
}

/* Progress Steps */
.onboarding-progress {
    margin-bottom: 2rem;
}

.progress-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.4;
    transition: opacity 0.3s ease;
}

.progress-step.active {
    opacity: 1;
}

.progress-step.current .step-number {
    background: var(--accent-cyan);
    color: #000;
    transform: scale(1.1);
}

.step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.step-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.progress-line {
    width: 40px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 0.5rem;
    margin-bottom: 1.5rem;
}

/* Step Content */
.step-content {
    min-height: 300px;
}

.step-content h2 {
    font-size: 1.4rem;
    margin: 0 0 0.5rem 0;
    color: #fff;
}

.step-description {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

/* Input Grid */
.input-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-group.full-width {
    grid-column: 1 / -1;
}

.input-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.input-group input,
.input-group select {
    padding: 0.85rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #fff;
    font-family: var(--font-main);
    font-size: 1rem;
    transition: all 0.2s ease;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: var(--accent-cyan);
    background: rgba(0, 212, 255, 0.05);
}

.input-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.auto-calc-hint {
    font-size: 0.75rem;
    color: var(--accent-cyan);
    font-style: italic;
}

.help-btn {
    background: none;
    border: none;
    color: var(--accent-cyan);
    font-size: 0.75rem;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}

/* Radio Groups */
.radio-group {
    display: flex;
    gap: 0.75rem;
}

.radio-group.vertical {
    flex-direction: column;
}

.radio-option {
    display: flex;
    flex-direction: column;
    padding: 0.85rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
}

.radio-option:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.radio-option.selected {
    border-color: var(--accent-cyan);
    background: rgba(0, 212, 255, 0.1);
}

.radio-option input {
    display: none;
}

.radio-label {
    font-weight: 500;
    font-size: 0.9rem;
}

.radio-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Composition Preview */
.composition-preview {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
}

.composition-bars {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.comp-bar {
    display: grid;
    grid-template-columns: 80px 1fr 80px;
    align-items: center;
    gap: 0.75rem;
}

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

.bar-track {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.bar-fill.fat { background: #ff6b6b; }
.bar-fill.muscle { background: #48bb78; }
.bar-fill.lean { background: #a855f7; }

.bar-value {
    font-size: 0.8rem;
    color: var(--text-primary);
    text-align: right;
}

.metabolism-info {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.metabolism-info strong {
    color: var(--accent-cyan);
}

/* Validation Panel */
.validation-panel {
    margin-top: 1rem;
}

.validation-success {
    padding: 0.75rem 1rem;
    background: rgba(72, 187, 120, 0.1);
    border: 1px solid rgba(72, 187, 120, 0.3);
    border-radius: 8px;
    color: #48bb78;
    font-size: 0.9rem;
}

.validation-errors,
.validation-warnings {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
}

.validation-errors {
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.3);
}

.validation-warnings {
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
    margin-top: 0.5rem;
}

.val-error { color: #ff6b6b; }
.val-warning { color: #fbbf24; }

/* Timeline Preview */
.timeline-preview {
    margin-top: 1.5rem;
}

.timeline-summary h4 {
    font-size: 0.9rem;
    margin: 0 0 1rem 0;
    color: var(--text-secondary);
}

.summary-stats {
    display: flex;
    justify-content: space-around;
    gap: 1rem;
}

.summary-stats .stat {
    text-align: center;
}

.summary-stats .stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-cyan);
}

.summary-stats .stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Confirm Grid */
.confirm-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.confirm-card {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.confirm-card.highlight {
    border-color: var(--accent-cyan);
    background: rgba(0, 212, 255, 0.05);
}

.confirm-card.timeline {
    grid-column: 1 / -1;
}

.confirm-card h3 {
    font-size: 0.9rem;
    margin: 0 0 0.75rem 0;
    color: var(--text-secondary);
}

.confirm-details {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.85rem;
}

.confirm-details strong {
    color: var(--accent-cyan);
}

/* Phases Preview */
.phases-preview {
    margin-bottom: 1.5rem;
}

.phases-preview h3 {
    font-size: 0.9rem;
    margin: 0 0 1rem 0;
    color: var(--text-secondary);
}

.phases-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.phase-item {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border-left: 3px solid var(--phase-color);
    align-items: center;
}

.phase-name {
    font-weight: 500;
    font-size: 0.9rem;
}

.phase-duration {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.phase-desc {
    display: none;
}

/* Warnings Panel */
.warnings-panel {
    padding: 1rem;
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 8px;
    margin-bottom: 1rem;
}

.warnings-panel h4 {
    font-size: 0.85rem;
    margin: 0 0 0.5rem 0;
    color: #fbbf24;
}

.warnings-panel p {
    font-size: 0.8rem;
    margin: 0.25rem 0;
    color: var(--text-secondary);
}

/* Methodology Note */
.methodology-note {
    padding: 0.75rem 1rem;
    background: rgba(0, 212, 255, 0.05);
    border-radius: 8px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Onboarding Footer */
.onboarding-footer {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.onboarding-btn {
    padding: 0.85rem 1.5rem;
    border-radius: 10px;
    font-family: var(--font-main);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.onboarding-btn.primary {
    background: linear-gradient(135deg, var(--accent-cyan), #0090b3);
    border: none;
    color: #000;
}

.onboarding-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.3);
}

.onboarding-btn.secondary {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: var(--text-secondary);
}

.onboarding-btn.secondary:hover {
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
}

/* Error Toast */
.error-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(255, 107, 107, 0.95);
    color: #fff;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    font-size: 0.9rem;
    z-index: 999999;
    opacity: 0;
    transition: all 0.3s ease;
}

.error-toast.visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Fat Guide Modal */
.fat-guide-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.fat-guide-modal.visible {
    opacity: 1;
}

.fat-guide-content {
    background: rgba(20, 20, 35, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.5rem;
    max-width: 400px;
    position: relative;
}

.close-guide {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.2rem;
}

.fat-guide-content h3 {
    font-size: 1.1rem;
    margin: 0 0 1rem 0;
}

.fat-guide-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.fat-example {
    display: flex;
    gap: 1rem;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
}

.fat-range {
    font-weight: 600;
    color: var(--accent-cyan);
    min-width: 60px;
}

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

.fat-note {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 1rem;
    font-style: italic;
}

/* Settings Sections */
.settings-section {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    margin-bottom: 1rem;
}

.settings-section h3 {
    font-size: 0.9rem;
    margin: 0 0 0.75rem 0;
    color: var(--text-secondary);
}

.settings-info {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.85rem;
}

.settings-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

.settings-action-btn {
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-secondary);
    font-family: var(--font-main);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.settings-action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.settings-action-btn.danger {
    border-color: rgba(255, 107, 107, 0.3);
}

.settings-action-btn.danger:hover {
    background: rgba(255, 107, 107, 0.1);
    border-color: rgba(255, 107, 107, 0.5);
    color: #ff6b6b;
}

/* Header Goal */
.header-goal {
    display: flex;
    align-items: center;
}

.goal-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
}

/* Error State */
.error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    text-align: center;
    gap: 1rem;
}

.error-state .error-icon {
    font-size: 3rem;
}

.error-state p {
    color: var(--text-secondary);
    max-width: 400px;
}

.reset-btn {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--accent-cyan), #0090b3);
    border: none;
    border-radius: 8px;
    color: #000;
    font-family: var(--font-main);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.reset-btn:hover {
    transform: translateY(-2px);
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-export-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(72, 187, 120, 0.1);
    border: 1px solid rgba(72, 187, 120, 0.3);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.header-export-btn:hover {
    background: rgba(72, 187, 120, 0.2);
    border-color: rgba(72, 187, 120, 0.5);
    transform: translateY(-2px);
}

/* Metabolic Card Styles */
.metric-card.metabolic {
    background: linear-gradient(145deg, rgba(246, 173, 85, 0.1), rgba(72, 187, 120, 0.05));
    border-color: rgba(246, 173, 85, 0.2);
}

.metabolic-info {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.info-badge {
    font-size: 0.7rem;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    white-space: nowrap;
}

/* ============================================
   RESPONSIVE DESIGN - TABLET (max-width: 900px)
   Less aggressive changes to preserve desktop feel
   ============================================ */
@media screen and (max-width: 900px) {
    .dashboard-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .phase-goals-row {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .phase-indicator-card,
    .goal-progress-card {
        width: 100%;
    }
    
    .metric-toggles {
        flex-wrap: wrap;
        gap: 0.25rem;
    }
    
    .metric-toggle {
        font-size: 0.8rem;
        padding: 0.4rem 0.6rem;
    }
    
    .insights-row {
        flex-direction: column;
    }
}

/* ============================================
   RESPONSIVE DESIGN - MOBILE (max-width: 680px)
   ============================================ */
@media screen and (max-width: 680px) {
    .app-container {
        padding: 0.5rem;
        gap: 0.75rem;
    }
    
    .app-header {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.75rem;
    }
    
    .header-brand {
        text-align: center;
    }
    
    .brand-title {
        font-size: 1.35rem;
    }
    
    .brand-tagline {
        font-size: 0.7rem;
    }
    
    .header-info {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.4rem;
    }
    
    .header-period,
    .header-phase,
    .header-goal {
        font-size: 0.8rem;
    }
    
    .phase-badge {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
    
    /* Navigation */
    .nav-bar {
        flex-direction: column;
        padding: 0.5rem;
        gap: 0.5rem;
    }
    
    .timeline-container {
        order: -1;
        width: 100%;
    }
    
    .granularity-selector {
        width: 100%;
        justify-content: center;
    }
    
    .nav-controls {
        width: 100%;
        justify-content: center;
    }
    
    .granularity-btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.75rem;
    }
    
    .timeline-bar {
        height: 8px;
    }
    
    .nav-controls {
        gap: 0.5rem;
    }
    
    .nav-btn {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
    
    .nav-label {
        font-size: 0.8rem;
        min-width: 80px;
    }
    
    .nav-btn-today {
        font-size: 0.7rem;
        padding: 0.4rem 0.6rem;
    }
    
    /* Dashboard Cards */
    .dashboard-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .metric-card {
        padding: 0.75rem;
        border-radius: 12px;
    }
    
    .card-header {
        margin-bottom: 0.5rem;
    }
    
    .card-icon {
        font-size: 1rem;
    }
    
    .card-title {
        font-size: 0.85rem;
    }
    
    .metric-grid {
        gap: 0.5rem;
    }
    
    .metric-item {
        padding: 0.5rem;
    }
    
    .metric-label {
        font-size: 0.65rem;
    }
    
    .metric-value {
        font-size: 1rem;
    }
    
    .metric-change {
        font-size: 0.6rem;
    }
    
    /* Phase & Goals */
    .phase-goals-row {
        gap: 0.5rem;
    }
    
    .phase-indicator-card,
    .goal-progress-card {
        padding: 0.75rem;
        border-radius: 12px;
    }
    
    /* Chart */
    .chart-section {
        margin-top: 0.5rem;
    }
    
    .chart-card {
        padding: 0.75rem;
        border-radius: 12px;
    }
    
    .chart-header {
        flex-direction: column;
        gap: 0.5rem;
        margin-bottom: 0.5rem;
    }
    
    .chart-header h2 {
        font-size: 1rem;
    }
    
    .metric-toggles {
        width: 100%;
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 0.25rem;
        -webkit-overflow-scrolling: touch;
    }
    
    .metric-toggle {
        font-size: 0.65rem;
        padding: 0.35rem 0.5rem;
        flex-shrink: 0;
    }
    
    .hover-panel {
        padding: 0.5rem;
        font-size: 0.75rem;
    }
    
    .chart-wrapper {
        height: 250px;
    }
    
    /* Milestones */
    .milestones-timeline-section {
        padding: 0.75rem;
    }
    
    .next-milestone-panel,
    .milestone-stats-panel {
        padding: 0.75rem;
    }
    
    .category-progress-section {
        padding: 0.75rem;
        overflow-x: auto;
    }
    
    /* Insights */
    .insights-panel,
    .alerts-panel {
        padding: 0.75rem;
    }
    
    /* Modals & Overlays */
    .start-date-card,
    .settings-card {
        width: 95%;
        padding: 1.25rem;
        border-radius: 16px;
    }
    
    .start-date-header h2 {
        font-size: 1.25rem;
    }
    
    /* Onboarding */
    .onboarding-container {
        padding: 1rem;
    }
    
    .onboarding-card {
        padding: 1.25rem;
        border-radius: 16px;
    }
    
    .input-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .input-group.full-width {
        grid-column: 1;
    }
    
    .radio-group.vertical {
        gap: 0.5rem;
    }
    
    .radio-option {
        padding: 0.75rem;
    }
    
    /* Footer */
    .app-footer {
        padding: 0.75rem;
        font-size: 0.7rem;
    }
    
    /* Metabolic card */
    .metabolic-info {
        gap: 0.35rem;
    }
    
    .info-badge {
        font-size: 0.6rem;
        padding: 0.2rem 0.4rem;
    }
}

/* ============================================
   RESPONSIVE DESIGN - SMALL MOBILE (max-width: 480px)
   ============================================ */
@media screen and (max-width: 480px) {
    .app-container {
        padding: 0.35rem;
    }
    
    .brand-title {
        font-size: 1.1rem;
    }
    
    .header-info {
        flex-direction: column;
        align-items: stretch;
    }
    
    .header-period,
    .header-phase,
    .header-goal {
        justify-content: center;
        text-align: center;
    }
    
    .granularity-btn {
        font-size: 0.7rem;
        padding: 0.35rem 0.6rem;
    }
    
    .nav-label {
        font-size: 0.7rem;
        min-width: 60px;
    }
    
    .metric-value {
        font-size: 0.9rem;
    }
    
    .chart-wrapper {
        height: 200px;
    }
    
    .metric-toggle {
        font-size: 0.6rem;
        padding: 0.3rem 0.4rem;
    }
}

/* ============================================
   TOUCH-FRIENDLY ENHANCEMENTS
   ============================================ */
@media (hover: none) and (pointer: coarse) {
    .nav-btn,
    .granularity-btn,
    .metric-toggle,
    .nav-btn-today {
        min-height: 44px;
        min-width: 44px;
    }
    
    .radio-option {
        min-height: 48px;
    }
    
    .cursor-glow {
        display: none;
    }
    
    .hover-panel .hover-placeholder {
        display: none;
    }
}

/* ============================================
   LANDSCAPE MOBILE
   ============================================ */
@media screen and (max-width: 680px) and (orientation: landscape) {
    .dashboard-row {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .chart-wrapper {
        height: 180px;
    }
    
    .onboarding-card {
        max-height: 85vh;
        overflow-y: auto;
    }
}
