/* === Reset & Base === */
*,*::before,*::after{margin:0;padding:0;box-sizing:border-box}
html{font-size:16px;-webkit-text-size-adjust:100%}
body{font-family:'Inter',sans-serif;color:#1e293b;background:#f0f2f5;min-height:100vh;overflow-x:hidden}

/* === Login Page === */
.login-page{background:linear-gradient(135deg,#0f0c29 0%,#302b63 50%,#24243e 100%);display:flex;align-items:center;justify-content:center;min-height:100vh}
.login-container{width:100%;max-width:420px;padding:1.5rem}
.login-card{background:#fff;border-radius:16px;padding:2.5rem 2rem;box-shadow:0 25px 50px rgba(0,0,0,0.25)}
.login-header{text-align:center;margin-bottom:2rem}
.login-icon{margin-bottom:1rem}
.login-header h1{font-size:1.5rem;font-weight:700;color:#1e293b}
.login-header p{color:#64748b;font-size:0.9rem;margin-top:0.5rem}
.login-tabs{display:flex;gap:0;background:#f1f5f9;border-radius:10px;padding:4px;margin-bottom:1.5rem}
.login-tabs .tab{flex:1;padding:0.6rem;border:none;background:transparent;font-family:inherit;font-size:0.9rem;font-weight:500;color:#64748b;cursor:pointer;border-radius:8px;transition:all .2s}
.login-tabs .tab.active{background:#fff;color:#1e293b;box-shadow:0 1px 3px rgba(0,0,0,0.1)}
.tab-content{display:none}
.tab-content.active{display:block}
#login-form input{width:100%;padding:0.85rem 1rem;border:2px solid #e2e8f0;border-radius:10px;font-family:inherit;font-size:0.95rem;outline:none;transition:border-color .2s}
#login-form input:focus{border-color:#6366f1}
.error-msg{color:#ef4444;font-size:0.85rem;min-height:1.5rem;margin:0.75rem 0;text-align:center}
.btn-login{width:100%;padding:0.85rem;background:#6366f1;color:#fff;border:none;border-radius:10px;font-family:inherit;font-size:1rem;font-weight:600;cursor:pointer;transition:background .2s}
.btn-login:hover{background:#4f46e5}

/* === App Layout === */
.app{display:flex;min-height:100vh}
.sidebar{position:fixed;top:0;left:0;width:240px;height:100vh;background:#1a1a2e;color:#fff;display:flex;flex-direction:column;z-index:100;transition:transform .3s ease}
.sidebar-header{display:flex;align-items:center;gap:0.75rem;padding:1.5rem 1.25rem;border-bottom:1px solid rgba(255,255,255,0.08)}
.sidebar-header h2{font-size:1.15rem;font-weight:700}
.sidebar-nav{flex:1;padding:1rem 0.75rem;overflow-y:auto}
.nav-item{display:flex;align-items:center;gap:0.75rem;padding:0.7rem 1rem;border-radius:10px;color:rgba(255,255,255,0.6);text-decoration:none;font-size:0.9rem;font-weight:500;transition:all .2s;margin-bottom:2px}
.nav-item:hover{color:#fff;background:rgba(255,255,255,0.06)}
.nav-item.active{color:#fff;background:#6366f1}
.sidebar-footer{padding:0.75rem;border-top:1px solid rgba(255,255,255,0.08)}
.sidebar-btn{display:flex;align-items:center;gap:0.6rem;width:100%;padding:0.6rem 0.85rem;border:none;background:transparent;color:rgba(255,255,255,0.5);font-family:inherit;font-size:0.82rem;font-weight:500;cursor:pointer;border-radius:8px;transition:all .2s}
.sidebar-btn:hover{color:#fff;background:rgba(255,255,255,0.06)}

/* === Mobile Header === */
.mobile-header{display:none;position:sticky;top:0;z-index:90;background:#1a1a2e;color:#fff;padding:0.75rem 1rem;align-items:center;gap:0.75rem}
.mobile-header h2{font-size:1.05rem;font-weight:600}
.hamburger{background:none;border:none;color:#fff;cursor:pointer;padding:4px}
.overlay{display:none;position:fixed;inset:0;background:rgba(0,0,0,0.5);z-index:99}
.overlay.active{display:block}

/* === Main Content === */
.content{margin-left:240px;flex:1;padding:2rem;min-height:100vh;width:calc(100% - 240px)}
.page-loading{display:flex;align-items:center;justify-content:center;min-height:60vh}
.spinner{width:40px;height:40px;border:4px solid #e2e8f0;border-top-color:#6366f1;border-radius:50%;animation:spin .8s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}

/* === Page Header === */
.page-header{margin-bottom:1.75rem}
.page-header h1{font-size:1.6rem;font-weight:700;color:#1e293b}
.page-header p{color:#64748b;font-size:0.9rem;margin-top:0.25rem}

/* === Stats Grid === */
.stats-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:1rem;margin-bottom:1.5rem}
.stat-card{background:#fff;border-radius:12px;padding:1.25rem;box-shadow:0 1px 3px rgba(0,0,0,0.08);transition:box-shadow .2s}
.stat-card:hover{box-shadow:0 4px 12px rgba(0,0,0,0.1)}
.stat-icon{width:42px;height:42px;border-radius:10px;display:flex;align-items:center;justify-content:center;margin-bottom:0.75rem}
.stat-icon.kcal{background:#fef3c7;color:#f59e0b}
.stat-icon.protein{background:#dbeafe;color:#3b82f6}
.stat-icon.weight{background:#ede9fe;color:#6366f1}
.stat-icon.steps{background:#dcfce7;color:#22c55e}
.stat-value{font-size:1.6rem;font-weight:700;line-height:1.2}
.stat-label{color:#64748b;font-size:0.82rem;font-weight:500;margin-top:0.2rem}
.stat-sub{font-size:0.78rem;margin-top:0.4rem;font-weight:500}
.stat-sub.up{color:#22c55e}
.stat-sub.down{color:#ef4444}
.stat-sub.neutral{color:#64748b}

/* === Progress Ring === */
.progress-ring{position:relative;width:50px;height:50px;float:right;margin-top:-3.5rem}
.progress-ring svg{transform:rotate(-90deg)}
.progress-ring circle{fill:none;stroke-width:4}
.progress-ring .bg{stroke:#e2e8f0}
.progress-ring .fg{stroke:#6366f1;stroke-linecap:round;transition:stroke-dashoffset .6s ease}

/* === Charts === */
.charts-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:1rem;margin-bottom:1.5rem}
.chart-card{background:#fff;border-radius:12px;padding:1.25rem;box-shadow:0 1px 3px rgba(0,0,0,0.08)}
.chart-card h3{font-size:0.95rem;font-weight:600;margin-bottom:1rem;color:#1e293b}
.chart-card.full{grid-column:1/-1}

/* === Date Range === */
.date-range{display:flex;align-items:center;gap:0.5rem;margin-bottom:1.5rem;flex-wrap:wrap}
.date-btn{padding:0.45rem 1rem;border:1px solid #e2e8f0;background:#fff;border-radius:8px;font-family:inherit;font-size:0.82rem;font-weight:500;cursor:pointer;transition:all .2s;color:#64748b}
.date-btn:hover,.date-btn.active{background:#6366f1;color:#fff;border-color:#6366f1}
.date-input{padding:0.4rem 0.65rem;border:1px solid #e2e8f0;border-radius:8px;font-family:inherit;font-size:0.82rem;color:#1e293b}

/* === Data Table === */
.data-table-wrap{background:#fff;border-radius:12px;box-shadow:0 1px 3px rgba(0,0,0,0.08);overflow:hidden;margin-bottom:1.5rem}
.data-table-wrap h3{font-size:0.95rem;font-weight:600;padding:1rem 1.25rem 0.75rem;color:#1e293b}
.data-table{width:100%;border-collapse:collapse}
.data-table th{text-align:left;padding:0.65rem 1rem;font-size:0.78rem;font-weight:600;color:#64748b;text-transform:uppercase;letter-spacing:0.03em;border-bottom:1px solid #f1f5f9;background:#f8fafc}
.data-table td{padding:0.7rem 1rem;font-size:0.88rem;border-bottom:1px solid #f1f5f9}
.data-table tr:last-child td{border-bottom:none}
.data-table tr:hover td{background:#f8fafc}
.data-table tr.expandable{cursor:pointer}
.data-table tr.expandable:hover td{background:#f0f4ff}
.meal-detail{background:#f8fafc}
.meal-detail td{padding:0.5rem 1rem 0.5rem 2.5rem;font-size:0.82rem;color:#64748b}
.meal-category-badge{display:inline-block;padding:0.15rem 0.5rem;border-radius:5px;font-size:0.72rem;font-weight:600;text-transform:uppercase}
.meal-cat-snidane{background:#fef3c7;color:#b45309}
.meal-cat-obed{background:#dbeafe;color:#1d4ed8}
.meal-cat-vecere{background:#ede9fe;color:#6d28d9}
.meal-cat-svacina{background:#dcfce7;color:#15803d}
.meal-cat-other{background:#f1f5f9;color:#64748b}

/* === Day List (Log) === */
.day-list{display:flex;flex-direction:column;gap:0.5rem;margin-bottom:1.5rem}
.day-card{background:#fff;border-radius:12px;padding:1rem 1.25rem;box-shadow:0 1px 3px rgba(0,0,0,0.08);cursor:pointer;transition:all .2s;display:flex;align-items:center;justify-content:space-between}
.day-card:hover{box-shadow:0 4px 12px rgba(0,0,0,0.1)}
.day-card.active{border-left:4px solid #6366f1}
.day-card .day-date{font-weight:600;font-size:0.95rem}
.day-card .day-kcal{font-size:0.88rem;font-weight:600}
.day-card .day-kcal.under{color:#22c55e}
.day-card .day-kcal.over{color:#f59e0b}
.day-card .day-kcal.way-over{color:#ef4444}
.day-card .day-macros{font-size:0.78rem;color:#64748b}
.kcal-bar{height:4px;border-radius:2px;background:#e2e8f0;margin-top:0.5rem;overflow:hidden}
.kcal-bar-fill{height:100%;border-radius:2px;transition:width .3s}
.kcal-bar-fill.under{background:#22c55e}
.kcal-bar-fill.over{background:#f59e0b}
.kcal-bar-fill.way-over{background:#ef4444}

/* === Meal Detail Panel === */
.meal-panel{background:#fff;border-radius:12px;box-shadow:0 1px 3px rgba(0,0,0,0.08);overflow:hidden}
.meal-panel h3{font-size:0.95rem;font-weight:600;padding:1rem 1.25rem 0.5rem}
.meal-group{margin-bottom:0.5rem}
.meal-group-header{padding:0.5rem 1.25rem;font-size:0.78rem;font-weight:600;text-transform:uppercase;color:#64748b;background:#f8fafc;letter-spacing:0.03em}
.meal-item{display:flex;justify-content:space-between;align-items:center;padding:0.6rem 1.25rem;border-bottom:1px solid #f1f5f9;font-size:0.88rem}
.meal-item:last-child{border-bottom:none}
.meal-item-name{flex:1}
.meal-item-qty{color:#64748b;font-size:0.82rem;margin-right:1rem;min-width:80px}
.meal-item-macros{display:flex;gap:0.75rem;font-size:0.82rem;color:#64748b;min-width:200px;justify-content:flex-end}
.meal-total{display:flex;justify-content:space-between;padding:0.75rem 1.25rem;background:#f8fafc;font-weight:600;font-size:0.88rem;border-top:2px solid #e2e8f0}

/* === Empty State === */
.empty-state{text-align:center;padding:4rem 2rem;color:#64748b}
.empty-state svg{margin-bottom:1rem;opacity:0.4}
.empty-state h3{color:#1e293b;font-size:1.1rem;margin-bottom:0.5rem}

/* === Steps Tiles === */
.steps-tiles{display:grid;grid-template-columns:repeat(3,1fr);gap:0.65rem;padding:0.25rem 0}
.steps-tile{background:#f8fafc;border-radius:10px;padding:0.85rem;display:flex;flex-direction:column;gap:0.35rem;transition:box-shadow .2s}
.steps-tile:hover{box-shadow:0 2px 8px rgba(0,0,0,0.06)}
.steps-tile-accent{background:linear-gradient(135deg,#6366f1,#818cf8);color:#fff}
.steps-tile-accent .steps-tile-lbl{color:rgba(255,255,255,0.75)}
.steps-tile-accent .steps-tile-icon{background:rgba(255,255,255,0.2);color:#fff}
.steps-tile-icon{width:32px;height:32px;border-radius:8px;display:flex;align-items:center;justify-content:center;background:#e0e7ff;color:#6366f1;flex-shrink:0}
.steps-tile-val{font-size:1.3rem;font-weight:700;color:#1e293b;line-height:1.2;display:flex;align-items:center;gap:0.4rem}
.steps-tile-accent .steps-tile-val{color:#fff}
.steps-tile-lbl{font-size:0.75rem;color:#64748b;font-weight:500;line-height:1.3}
.steps-tile-badge{display:inline-block;font-size:0.65rem;font-weight:700;color:#fff;padding:0.1rem 0.4rem;border-radius:6px;vertical-align:middle}

/* === Fitness / Training === */
.fit-add-btn{display:inline-flex;align-items:center;gap:0.4rem;padding:0.55rem 1.1rem;background:#6366f1;color:#fff;border:none;border-radius:10px;font-family:inherit;font-size:0.88rem;font-weight:600;cursor:pointer;transition:background .2s;margin-bottom:1rem}
.fit-add-btn:hover{background:#4f46e5}
.fit-exercise-card{background:#fff;border-radius:12px;box-shadow:0 1px 3px rgba(0,0,0,0.08);margin-bottom:1rem;overflow:hidden}
.fit-ex-header{display:flex;align-items:center;gap:0.75rem;padding:0.85rem 1.25rem;border-bottom:1px solid #f1f5f9;flex-wrap:wrap}
.fit-ex-name{font-weight:700;font-size:1rem;color:#1e293b}
.fit-ex-link{color:#6366f1;text-decoration:none;display:inline-flex;align-items:center;gap:0.3rem}
.fit-ex-link:hover{text-decoration:underline}
.fit-ex-note{font-size:0.8rem;color:#64748b;font-weight:500}
.fit-ex-actions{margin-left:auto;display:flex;gap:0.25rem}
.fit-icon-btn{background:none;border:none;color:#94a3b8;cursor:pointer;padding:0.3rem;border-radius:6px;transition:all .2s}
.fit-icon-btn:hover{color:#1e293b;background:#f1f5f9}
.fit-table-wrap{overflow-x:auto}
.fit-table{width:100%;border-collapse:collapse;font-size:0.85rem;border:1px solid #e2e8f0}
.fit-table th{padding:0.45rem 0.6rem;font-size:0.72rem;font-weight:600;color:#64748b;text-transform:uppercase;letter-spacing:0.03em;background:#f8fafc;border:1px solid #e2e8f0;white-space:nowrap;text-align:center}
.fit-th-date{background:#eef2ff;color:#4338ca;font-size:0.78rem;letter-spacing:0;text-transform:none;border-bottom:none}
.fit-th-sub{font-size:0.62rem;padding:0.25rem 0.4rem;color:#94a3b8;border-top:1px solid #e2e8f0}
.fit-th-set{width:36px;text-align:center}
.fit-th-add{width:44px;border:1px solid #e2e8f0}
.fit-table td{padding:0.4rem 0.6rem;border:1px solid #f1f5f9;text-align:center;white-space:nowrap;font-variant-numeric:tabular-nums}
.fit-td-set{font-weight:700;color:#94a3b8;background:#f8fafc;width:36px}
.fit-td-val{font-weight:500;color:#1e293b;min-width:40px}
.fit-td-weight{color:#6366f1;font-weight:600}
.fit-td-rir{color:#94a3b8;font-size:0.8rem}
.fit-empty{color:#e2e8f0}
.fit-add-col{width:32px;height:32px;border-radius:8px;border:2px dashed #d1d5db;background:none;font-size:1.1rem;font-weight:700;color:#94a3b8;cursor:pointer;transition:all .2s;display:flex;align-items:center;justify-content:center}
.fit-add-col:hover{border-color:#6366f1;color:#6366f1;background:#f0f0ff}
.fit-table tr:hover td:not(.fit-td-set){background:#f8fafc}

/* Fitness Modal */
.fit-modal-overlay{position:fixed;inset:0;background:rgba(0,0,0,0.5);z-index:200;display:flex;align-items:center;justify-content:center;padding:1rem}
.fit-modal{background:#fff;border-radius:14px;padding:1.5rem;width:100%;max-width:420px;max-height:85vh;overflow-y:auto;box-shadow:0 25px 50px rgba(0,0,0,0.25)}
.fit-modal h3{font-size:1.1rem;font-weight:700;margin-bottom:1rem}
.fit-modal label{display:block;font-size:0.78rem;font-weight:600;color:#64748b;text-transform:uppercase;letter-spacing:0.03em;margin:0.75rem 0 0.3rem}
.fit-modal input[type="text"],.fit-modal input[type="url"],.fit-modal input[type="date"]{width:100%;padding:0.6rem 0.75rem;border:2px solid #e2e8f0;border-radius:8px;font-family:inherit;font-size:0.9rem;outline:none;transition:border-color .2s}
.fit-modal input:focus{border-color:#6366f1}
.fit-modal-btns{display:flex;gap:0.5rem;margin-top:1.25rem;justify-content:flex-end}
.fit-btn-cancel{padding:0.55rem 1rem;border:1px solid #e2e8f0;background:#fff;border-radius:8px;font-family:inherit;font-size:0.88rem;cursor:pointer;color:#64748b;font-weight:500}
.fit-btn-save{padding:0.55rem 1.25rem;border:none;background:#6366f1;color:#fff;border-radius:8px;font-family:inherit;font-size:0.88rem;font-weight:600;cursor:pointer}
.fit-btn-save:hover{background:#4f46e5}

/* Workout set rows */
.fit-set-row{display:flex;align-items:center;gap:0.4rem;margin-bottom:0.4rem}
.fit-set-num{width:24px;font-weight:600;color:#94a3b8;font-size:0.85rem;text-align:center;flex-shrink:0}
.fit-set-input{width:70px;padding:0.45rem 0.5rem;border:2px solid #e2e8f0;border-radius:8px;font-family:inherit;font-size:0.88rem;text-align:center;outline:none;transition:border-color .2s}
.fit-set-input:focus{border-color:#6366f1}
.fit-set-rir{width:55px}
.fit-set-del{background:none;border:none;color:#d1d5db;font-size:1.1rem;cursor:pointer;padding:0.2rem 0.4rem;border-radius:6px}
.fit-set-del:hover{color:#ef4444;background:#fef2f2}
.fit-add-set-btn{display:block;width:100%;padding:0.5rem;border:2px dashed #e2e8f0;border-radius:8px;background:none;font-family:inherit;font-size:0.82rem;font-weight:500;color:#94a3b8;cursor:pointer;margin:0.5rem 0;transition:all .2s}
.fit-add-set-btn:hover{border-color:#6366f1;color:#6366f1}

/* === PrivateGym Page === */
.gym-nav{display:flex;align-items:center;justify-content:space-between;gap:0.5rem;margin-bottom:1.25rem}
.gym-nav-btn{padding:0.5rem 1rem;border:1px solid #e2e8f0;background:#fff;border-radius:8px;font-family:inherit;font-size:0.82rem;font-weight:600;cursor:pointer;color:#6366f1;transition:all .2s}
.gym-nav-btn:hover:not(:disabled){background:#6366f1;color:#fff;border-color:#6366f1}
.gym-nav-btn:disabled{opacity:0.3;cursor:default}
.gym-nav-label{font-weight:600;font-size:0.9rem;color:#1e293b}

.gym-days{display:flex;flex-direction:column;gap:0.75rem;margin-bottom:1.5rem}
.gym-day{background:#fff;border-radius:12px;padding:1rem 1.25rem;box-shadow:0 1px 3px rgba(0,0,0,0.08);transition:box-shadow .2s}
.gym-day:hover{box-shadow:0 4px 12px rgba(0,0,0,0.1)}
.gym-day.gym-today{border-left:4px solid #6366f1}
.gym-day.gym-full{opacity:0.5}
.gym-day-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:0.65rem}
.gym-day-name{font-weight:600;font-size:0.95rem;color:#1e293b}
.gym-day-count{font-size:0.78rem;font-weight:700;padding:0.2rem 0.6rem;border-radius:20px}
.gym-day-count.green{background:#f0fdf4;color:#22c55e}
.gym-day-count.red{background:#fef2f2;color:#ef4444}
.gym-empty{font-size:0.82rem;color:#94a3b8;font-style:italic}
.gym-slots{display:flex;flex-wrap:wrap;gap:0.4rem}
.gym-slot{display:inline-flex;align-items:center;gap:0.4rem;padding:0.35rem 0.65rem;border-radius:8px;font-size:0.78rem;font-weight:500;text-decoration:none;transition:all .15s;border:1px solid transparent;cursor:pointer}
.gym-slot:hover{transform:translateY(-1px);box-shadow:0 2px 6px rgba(0,0,0,0.12)}
.gym-slot.low{background:#f0fdf4;color:#15803d;border-color:#bbf7d0}
.gym-slot.std{background:#eff6ff;color:#1d4ed8;border-color:#bfdbfe}
.gym-slot.peak{background:#fefce8;color:#a16207;border-color:#fde68a}
.gym-slot-time{font-weight:700}
.gym-slot-price{font-size:0.7rem;opacity:0.7}
.gym-legend{display:flex;gap:1.25rem;padding:0.75rem 1rem;background:#fff;border-radius:10px;box-shadow:0 1px 3px rgba(0,0,0,0.08);font-size:0.78rem;color:#64748b;flex-wrap:wrap}
.gym-leg{display:flex;align-items:center;gap:0.35rem}
.gym-dot{width:10px;height:10px;border-radius:3px}
.gym-dot.low{background:#bbf7d0}
.gym-dot.std{background:#bfdbfe}
.gym-dot.peak{background:#fde68a}

/* === Progress Page === */
.pg-goals{display:grid;grid-template-columns:repeat(2,1fr);gap:1rem;margin-bottom:1.5rem}
.pg-card{background:#fff;border-radius:14px;padding:1.25rem;box-shadow:0 1px 3px rgba(0,0,0,0.08);transition:box-shadow .2s}
.pg-card:hover{box-shadow:0 4px 12px rgba(0,0,0,0.1)}
.pg-card.pg-bad{border-left:4px solid #ef4444}
.pg-card.pg-ok{border-left:4px solid #22c55e}
.pg-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:0.75rem}
.pg-icon{width:42px;height:42px;border-radius:10px;display:flex;align-items:center;justify-content:center}
.pg-icon-w{background:#ede9fe;color:#6366f1}
.pg-icon-bf{background:#fef3c7;color:#f59e0b}
.pg-tag{font-size:0.72rem;font-weight:700;padding:0.2rem 0.6rem;border-radius:20px}
.pg-tag.red{background:#fef2f2;color:#ef4444}
.pg-tag.green{background:#f0fdf4;color:#22c55e}
.pg-nums{display:flex;align-items:baseline;gap:0.5rem;margin-bottom:0.35rem}
.pg-measured{font-size:0.72rem;color:#94a3b8;margin-bottom:0.5rem}
.pg-now{font-size:1.8rem;font-weight:800;color:#1e293b}
.pg-arrow{color:#94a3b8;font-size:1.2rem}
.pg-goal-v{font-size:1.1rem;font-weight:600;color:#64748b}
.pg-track{height:8px;background:#e2e8f0;border-radius:4px;overflow:hidden;margin-bottom:0.6rem}
.pg-fill{height:100%;border-radius:4px;transition:width .6s ease}
.pg-meta{font-size:0.78rem;color:#64748b;line-height:1.5}
.pg-warn{color:#ef4444;font-weight:600}

.pg-section{background:#fff;border-radius:14px;padding:1.25rem;box-shadow:0 1px 3px rgba(0,0,0,0.08);margin-bottom:1.5rem}
.pg-section h3{font-size:0.95rem;font-weight:700;color:#1e293b;margin-bottom:1rem}
.pg-hint{font-weight:400;color:#94a3b8;font-size:0.8rem}

.pg-trends{display:grid;grid-template-columns:repeat(3,1fr);gap:0.5rem}
.pg-tr{padding:0.75rem;border-radius:10px;border:1px solid #e2e8f0}
.pg-tr.bad{background:#fef2f2;border-color:#fecaca}
.pg-tr.ok{background:#f8fafc;border-color:#e2e8f0}
.pg-tr-l{font-size:0.72rem;color:#64748b;font-weight:600;text-transform:uppercase;letter-spacing:0.03em;margin-bottom:0.25rem}
.pg-tr-v{font-size:0.95rem;font-weight:700;color:#1e293b}
.pg-tr.bad .pg-tr-v{color:#ef4444}

.pg-projs{display:grid;grid-template-columns:repeat(4,1fr);gap:0.65rem}
.pg-proj{background:#f8fafc;border-radius:10px;padding:0.85rem;border:1px solid #e2e8f0;transition:box-shadow .2s}
.pg-proj:hover{box-shadow:0 2px 8px rgba(0,0,0,0.06)}
.pg-proj.bad{background:#fef2f2;border-color:#fecaca}
.pg-proj.ok{background:#f0fdf4;border-color:#bbf7d0}
.pg-proj.mix{background:#fffbeb;border-color:#fde68a}
.pg-proj-t{font-size:0.78rem;font-weight:700;color:#64748b;text-transform:uppercase;letter-spacing:0.03em;margin-bottom:0.5rem}
.pg-proj-r{display:flex;justify-content:space-between;font-size:0.88rem;margin-bottom:0.2rem}
.pg-proj-r span{color:#64748b}
.pg-proj-r b.red{color:#ef4444}
.pg-proj-r b.green{color:#22c55e}

.pg-plans{display:grid;grid-template-columns:repeat(2,1fr);gap:1rem}
.pg-plan{background:#fff;border-radius:12px;box-shadow:0 1px 3px rgba(0,0,0,0.08);overflow:hidden}
.pg-plan-h{padding:0.85rem 1rem;font-weight:700;font-size:0.95rem;color:#1e293b;background:#f8fafc;border-bottom:1px solid #e2e8f0}
.pg-extreme{font-size:0.68rem;font-weight:700;color:#fff;background:#ef4444;padding:0.15rem 0.5rem;border-radius:10px;margin-left:0.5rem}
.pg-plan-b{padding:0.75rem 1rem}
.pg-plan-r{display:flex;justify-content:space-between;padding:0.45rem 0;border-bottom:1px solid #f1f5f9;font-size:0.88rem}
.pg-plan-r:last-child{border-bottom:none}
.pg-plan-r span{color:#64748b}
.pg-plan-r b{color:#1e293b}

/* === Health Metric Cards === */
.health-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:1rem;margin-bottom:1.5rem}

/* === Responsive: Tablet === */
@media(max-width:1024px){
  .stats-grid{grid-template-columns:repeat(2,1fr)}
  .charts-grid{grid-template-columns:1fr}
  .health-grid{grid-template-columns:1fr}
  .content{padding:1.5rem}
}

/* === Bottom Nav (mobile only) === */
.bottom-nav{display:none}

/* === Responsive: Mobile (iPhone 17 Pro ~393px) === */
@media(max-width:768px){
  /* Sidebar: hidden by default, slide-in for settings */
  .sidebar{display:none!important;transform:translateX(-100%);width:280px}
  .sidebar.open{display:flex!important;transform:translateX(0)}
  .mobile-header{display:flex;padding:0.6rem 1rem;gap:0.6rem}
  .mobile-header h2{font-size:1rem}

  /* Bottom tab bar — iOS-style */
  .bottom-nav{display:flex;position:fixed;bottom:0;left:0;right:0;z-index:95;background:#fff;border-top:1px solid #e2e8f0;justify-content:space-around;padding:0.4rem 0 0.25rem}
  .bnav-item{display:flex;flex-direction:column;align-items:center;gap:0.15rem;text-decoration:none;color:#94a3b8;font-size:0.62rem;font-weight:500;padding:0.2rem 0.5rem;transition:color .2s;-webkit-tap-highlight-color:transparent}
  .bnav-item.active{color:#6366f1}
  .bnav-item svg{transition:transform .15s}
  .bnav-item:active svg{transform:scale(0.9)}

  /* Content area */
  .content{margin-left:0;width:100%;padding:0.75rem;padding-top:0.5rem;padding-bottom:5rem}
  .page-header{margin-bottom:0.75rem}
  .page-header h1{font-size:1.2rem}
  .page-header p{font-size:0.8rem;margin-top:0.15rem}

  /* Stats grid — 2 columns, compact */
  .stats-grid{grid-template-columns:repeat(2,1fr);gap:0.5rem;margin-bottom:0.75rem}
  .stat-card{padding:0.75rem;border-radius:10px}
  .stat-icon{width:32px;height:32px;border-radius:8px;margin-bottom:0.4rem}
  .stat-icon svg{width:16px;height:16px}
  .stat-value{font-size:1.2rem}
  .stat-label{font-size:0.72rem}
  .stat-sub{font-size:0.68rem;margin-top:0.25rem}

  /* Charts — full width, compact */
  .charts-grid{grid-template-columns:1fr;gap:0.5rem;margin-bottom:0.75rem}
  .chart-card{padding:0.75rem;border-radius:10px}
  .chart-card h3{font-size:0.85rem;margin-bottom:0.5rem}

  /* Date range — pill buttons */
  .date-range{gap:0.25rem;margin-bottom:0.75rem}
  .date-btn{padding:0.35rem 0.75rem;font-size:0.75rem;border-radius:20px}

  /* Data table — responsive, no horizontal scroll */
  .data-table-wrap{border-radius:10px;margin-bottom:0.75rem;overflow:hidden}
  .data-table-wrap h3{padding:0.75rem 0.85rem 0.5rem;font-size:0.88rem}
  .data-table{font-size:0.75rem;width:100%;table-layout:fixed}
  .data-table th{padding:0.4rem 0.35rem;font-size:0.6rem;letter-spacing:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .data-table td{padding:0.45rem 0.35rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .data-table th:first-child,.data-table td:first-child{padding-left:0.6rem}
  .data-table th:last-child,.data-table td:last-child{padding-right:0.6rem}

  /* Meal detail rows inside table */
  .meal-detail td{padding:0.35rem 0.35rem 0.35rem 0.6rem;font-size:0.7rem}

  /* Fitness */
  .fit-ex-header{padding:0.65rem 0.85rem}
  .fit-ex-name{font-size:0.9rem}
  .fit-table{font-size:0.72rem}
  .fit-table th{padding:0.3rem 0.35rem;font-size:0.62rem}
  .fit-table td{padding:0.3rem 0.35rem}
  .fit-th-date{font-size:0.68rem}
  .fit-th-sub{font-size:0.55rem;padding:0.2rem 0.25rem}
  .fit-th-set{width:28px}
  .fit-td-val{min-width:30px;font-size:0.75rem}
  .fit-modal{padding:1.25rem;max-width:100%;border-radius:14px 14px 0 0;position:fixed;bottom:0;left:0;right:0;max-height:90vh}
  .fit-set-input{width:60px;padding:0.4rem;font-size:0.82rem}
  .fit-set-rir{width:48px}
  .meal-category-badge{font-size:0.58rem;padding:0.1rem 0.3rem}

  /* Steps tiles */
  .steps-tiles{grid-template-columns:repeat(2,1fr);gap:0.4rem}
  .steps-tile{padding:0.65rem;border-radius:8px}
  .steps-tile-icon{width:26px;height:26px;border-radius:6px}
  .steps-tile-icon svg{width:14px;height:14px}
  .steps-tile-val{font-size:1rem}
  .steps-tile-lbl{font-size:0.68rem}

  /* PrivateGym */
  .gym-nav{gap:0.25rem}
  .gym-nav-btn{padding:0.4rem 0.6rem;font-size:0.75rem}
  .gym-nav-label{font-size:0.78rem}
  .gym-day{padding:0.75rem 0.85rem;border-radius:10px}
  .gym-day-name{font-size:0.85rem}
  .gym-day-count{font-size:0.7rem}
  .gym-slot{padding:0.3rem 0.5rem;font-size:0.72rem}
  .gym-legend{font-size:0.7rem;gap:0.75rem}

  /* Progress */
  .pg-goals{grid-template-columns:1fr;gap:0.5rem;margin-bottom:0.75rem}
  .pg-card{padding:0.85rem;border-radius:10px}
  .pg-now{font-size:1.4rem}
  .pg-goal-v{font-size:0.95rem}
  .pg-trends{grid-template-columns:repeat(2,1fr);gap:0.35rem}
  .pg-tr{padding:0.55rem}
  .pg-tr-l{font-size:0.65rem}
  .pg-tr-v{font-size:0.82rem}
  .pg-projs{grid-template-columns:repeat(2,1fr);gap:0.4rem}
  .pg-proj{padding:0.65rem}
  .pg-proj-t{font-size:0.7rem}
  .pg-proj-r{font-size:0.8rem}
  .pg-plans{grid-template-columns:1fr;gap:0.5rem}
  .pg-section{padding:0.85rem;border-radius:10px;margin-bottom:0.75rem}
  .pg-section h3{font-size:0.88rem;margin-bottom:0.75rem}

  /* Health grid */
  .health-grid{grid-template-columns:1fr;gap:0.5rem}

  /* Log: stacked layout */
  .log-layout{flex-direction:column!important}
  .log-layout>div{min-width:0!important;flex:none!important;width:100%!important}
  .day-list{gap:0.35rem;margin-bottom:0.75rem}
  .day-card{padding:0.7rem 0.85rem;border-radius:10px}
  .day-card .day-date{font-size:0.85rem}
  .day-card .day-kcal{font-size:0.82rem}
  .day-card .day-macros{font-size:0.7rem}

  /* Meal panel — card items */
  .meal-panel{border-radius:10px}
  .meal-panel h3{font-size:0.85rem;padding:0.65rem 0.85rem 0.35rem}
  .meal-group-header{padding:0.35rem 0.85rem;font-size:0.68rem}
  .meal-item{padding:0.5rem 0.85rem;font-size:0.8rem;flex-wrap:wrap;gap:0.2rem}
  .meal-item-name{flex:1 1 100%;font-weight:500;font-size:0.82rem}
  .meal-item-qty{font-size:0.7rem;margin-right:auto;min-width:auto;color:#94a3b8}
  .meal-item-macros{min-width:auto;gap:0.5rem;font-size:0.7rem;flex:1 1 100%;justify-content:flex-start}
  .meal-total{padding:0.5rem 0.85rem;font-size:0.75rem;flex-wrap:wrap;gap:0.2rem}

  /* Login */
  .login-container{padding:1rem}
  .login-card{padding:1.75rem 1.25rem;border-radius:14px}
  .login-header h1{font-size:1.3rem}

  /* Empty state */
  .empty-state{padding:2rem 1.5rem}
  .empty-state h3{font-size:1rem}
}

/* === Pulmaraton === */
.pm-tabs{display:flex;gap:0.25rem;overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none;padding:0.25rem;background:#f1f5f9;border-radius:12px;margin-bottom:1.5rem}
.pm-tabs::-webkit-scrollbar{display:none}
.pm-tab{flex-shrink:0;padding:0.55rem 1rem;border:none;background:transparent;font-family:inherit;font-size:0.82rem;font-weight:500;color:#64748b;cursor:pointer;border-radius:8px;transition:all .2s;white-space:nowrap}
.pm-tab:hover{color:#1e293b;background:rgba(0,0,0,0.04)}
.pm-tab.active{background:#fff;color:#1e293b;box-shadow:0 1px 3px rgba(0,0,0,0.1)}
.pm-content{min-height:60vh}

/* Hero */
.pm-hero{background:linear-gradient(135deg,#312e81 0%,#4f46e5 50%,#6366f1 100%);border-radius:16px;padding:2rem;color:#fff;margin-bottom:1.5rem;position:relative;overflow:hidden}
.pm-hero::after{content:'';position:absolute;top:-50%;right:-20%;width:300px;height:300px;border-radius:50%;background:rgba(255,255,255,0.05)}
.pm-hero-title{font-size:1.4rem;font-weight:700;margin-bottom:0.25rem}
.pm-hero-race{font-size:0.9rem;opacity:0.8;margin-bottom:1rem}
.pm-hero-countdown{display:flex;gap:1.5rem;margin-bottom:1.5rem;flex-wrap:wrap}
.pm-hero-unit{text-align:center}
.pm-hero-unit-val{font-size:2rem;font-weight:700;line-height:1}
.pm-hero-unit-lbl{font-size:0.7rem;text-transform:uppercase;opacity:0.7;margin-top:0.25rem}
.pm-hero-targets{display:flex;gap:1.5rem;font-size:0.85rem;opacity:0.9;flex-wrap:wrap}
.pm-hero-targets span{display:flex;align-items:center;gap:0.35rem}

/* Summary cards */
.pm-summary{display:grid;grid-template-columns:repeat(4,1fr);gap:1rem;margin-bottom:1.5rem}
.pm-summary-card{background:#fff;border-radius:12px;padding:1.25rem;box-shadow:0 1px 3px rgba(0,0,0,0.08)}
.pm-summary-card-label{font-size:0.78rem;color:#64748b;margin-bottom:0.5rem;font-weight:500}
.pm-summary-card-value{font-size:1.5rem;font-weight:700;color:#1e293b;line-height:1.2}
.pm-summary-card-sub{font-size:0.78rem;color:#94a3b8;margin-top:0.35rem}
.pm-summary-card-value.green{color:#22c55e}
.pm-summary-card-value.yellow{color:#f59e0b}
.pm-summary-card-value.red{color:#ef4444}

/* Today's workout */
.pm-today{background:#fff;border-radius:12px;padding:1.5rem;box-shadow:0 1px 3px rgba(0,0,0,0.08);margin-bottom:1.5rem;border-left:4px solid #6366f1}
.pm-today h3{font-size:1rem;font-weight:600;margin-bottom:0.75rem;display:flex;align-items:center;gap:0.5rem}
.pm-today-type{display:inline-block;padding:0.2rem 0.6rem;border-radius:6px;font-size:0.75rem;font-weight:600;color:#fff}
.pm-today-details{display:flex;gap:1.5rem;flex-wrap:wrap;margin-top:0.75rem}
.pm-today-detail{font-size:0.85rem;color:#64748b}
.pm-today-detail strong{color:#1e293b}
.pm-today-notes{margin-top:0.75rem;font-size:0.85rem;color:#64748b;font-style:italic;border-top:1px solid #f1f5f9;padding-top:0.75rem}

/* Week view */
.pm-week-nav{display:flex;align-items:center;justify-content:space-between;margin-bottom:1rem}
.pm-week-nav h3{font-size:1rem;font-weight:600}
.pm-week-nav button{background:none;border:1px solid #e2e8f0;border-radius:8px;padding:0.4rem 0.75rem;font-family:inherit;font-size:0.85rem;cursor:pointer;color:#64748b;transition:all .2s}
.pm-week-nav button:hover{background:#f8fafc;color:#1e293b}
.pm-week-phase{display:inline-block;padding:0.2rem 0.6rem;border-radius:6px;font-size:0.72rem;font-weight:600;color:#fff;margin-left:0.5rem}
.pm-week-days{display:grid;grid-template-columns:repeat(7,1fr);gap:0.5rem;margin-bottom:1.5rem}
.pm-day-card{background:#fff;border-radius:10px;padding:0.75rem;box-shadow:0 1px 3px rgba(0,0,0,0.06);min-height:120px;cursor:pointer;transition:box-shadow .2s;position:relative}
.pm-day-card:hover{box-shadow:0 2px 8px rgba(0,0,0,0.12)}
.pm-day-card.today{border:2px solid #6366f1}
.pm-day-card-header{font-size:0.72rem;color:#94a3b8;font-weight:500;margin-bottom:0.5rem}
.pm-day-card-header strong{color:#1e293b;font-size:0.8rem}
.pm-workout-block{padding:0.5rem;border-radius:6px;margin-top:0.35rem}
.pm-workout-block-title{font-size:0.78rem;font-weight:600;color:#fff}
.pm-workout-block-info{font-size:0.7rem;color:rgba(255,255,255,0.85);margin-top:0.2rem}
.pm-day-status{position:absolute;top:0.5rem;right:0.5rem;font-size:0.85rem}
.pm-day-expanded{background:#f8fafc;border-radius:8px;padding:0.75rem;margin-top:0.5rem;font-size:0.78rem;color:#64748b}
.pm-day-expanded strong{color:#1e293b}

/* Strava */
.pm-strava-btn{display:inline-flex;align-items:center;gap:0.5rem;padding:0.75rem 1.5rem;background:#fc4c02;color:#fff;border:none;border-radius:10px;font-family:inherit;font-size:0.95rem;font-weight:600;cursor:pointer;transition:background .2s}
.pm-strava-btn:hover{background:#e04500}
.pm-sync-btn{display:inline-flex;align-items:center;gap:0.5rem;padding:0.5rem 1rem;background:#f1f5f9;color:#64748b;border:none;border-radius:8px;font-family:inherit;font-size:0.82rem;font-weight:500;cursor:pointer;margin-bottom:1rem}
.pm-sync-btn:hover{background:#e2e8f0;color:#1e293b}
.pm-activity-table{width:100%;border-collapse:collapse;font-size:0.82rem}
.pm-activity-table th{text-align:left;padding:0.6rem;border-bottom:2px solid #e2e8f0;color:#64748b;font-weight:500;font-size:0.75rem;text-transform:uppercase}
.pm-activity-table td{padding:0.6rem;border-bottom:1px solid #f1f5f9;color:#1e293b}
.pm-activity-table tr:hover td{background:#f8fafc}
.pm-match-icon{font-size:1rem}

/* Recovery */
.pm-recovery-score{background:#fff;border-radius:14px;padding:1.5rem;box-shadow:0 1px 3px rgba(0,0,0,0.08);margin-bottom:1.5rem;display:flex;align-items:center;gap:2rem}
.pm-recovery-big{font-size:3rem;font-weight:700;line-height:1;min-width:80px;text-align:center}
.pm-recovery-breakdown{display:flex;gap:1rem;flex-wrap:wrap;flex:1}
.pm-recovery-item{font-size:0.82rem;color:#64748b}
.pm-recovery-item strong{display:block;font-size:1rem;color:#1e293b}
.pm-recovery-charts{display:grid;grid-template-columns:repeat(2,1fr);gap:1rem}
.pm-recovery-chart{background:#fff;border-radius:12px;padding:1rem;box-shadow:0 1px 3px rgba(0,0,0,0.08)}
.pm-recovery-chart h4{font-size:0.85rem;font-weight:600;margin-bottom:0.75rem;color:#1e293b}

/* Coaching */
.pm-review-card{background:#fff;border-radius:12px;box-shadow:0 1px 3px rgba(0,0,0,0.08);margin-bottom:1rem;overflow:hidden}
.pm-review-header{padding:1rem 1.25rem;cursor:pointer;display:flex;align-items:center;justify-content:space-between;transition:background .2s}
.pm-review-header:hover{background:#f8fafc}
.pm-review-header h4{font-size:0.9rem;font-weight:600}
.pm-review-score{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:50%;font-weight:700;font-size:0.85rem;color:#fff}
.pm-review-body{padding:0 1.25rem 1.25rem;font-size:0.85rem;color:#475569;line-height:1.6;display:none}
.pm-review-body.open{display:block}
.pm-review-section{margin-bottom:1rem}
.pm-review-section h5{font-size:0.82rem;font-weight:600;color:#1e293b;margin-bottom:0.35rem}
.pm-adjustment{background:#f8fafc;border-radius:8px;padding:0.75rem;margin-bottom:0.5rem;border-left:3px solid #6366f1}
.pm-adjustment-btns{display:flex;gap:0.5rem;margin-top:0.5rem}
.pm-adjustment-btns button{padding:0.3rem 0.6rem;border:none;border-radius:6px;font-family:inherit;font-size:0.75rem;font-weight:500;cursor:pointer}
.pm-adj-accept{background:#dcfce7;color:#16a34a}
.pm-adj-accept:hover{background:#bbf7d0}
.pm-adj-reject{background:#fee2e2;color:#dc2626}
.pm-adj-reject:hover{background:#fecaca}
.pm-adj-edit{background:#e0e7ff;color:#4f46e5}
.pm-adj-edit:hover{background:#c7d2fe}

/* Race plan accordion */
.pm-accordion{margin-bottom:0.75rem}
.pm-accordion-header{display:flex;align-items:center;justify-content:space-between;padding:1rem 1.25rem;background:#fff;border-radius:12px;box-shadow:0 1px 3px rgba(0,0,0,0.08);cursor:pointer;font-weight:600;font-size:0.9rem;transition:all .2s}
.pm-accordion-header:hover{background:#f8fafc}
.pm-accordion-header.open{border-radius:12px 12px 0 0}
.pm-accordion-body{display:none;background:#fff;border-radius:0 0 12px 12px;padding:1.25rem;box-shadow:0 1px 3px rgba(0,0,0,0.08);font-size:0.85rem;color:#475569;line-height:1.6}
.pm-accordion-body.open{display:block}
.pm-pacing-table{width:100%;border-collapse:collapse;font-size:0.82rem;margin-top:0.75rem}
.pm-pacing-table th{text-align:center;padding:0.5rem;border-bottom:2px solid #e2e8f0;color:#64748b;font-weight:500;font-size:0.72rem;text-transform:uppercase}
.pm-pacing-table td{text-align:center;padding:0.4rem;border-bottom:1px solid #f1f5f9}
.pm-checklist{list-style:none}
.pm-checklist li{display:flex;align-items:center;gap:0.5rem;padding:0.5rem 0;border-bottom:1px solid #f1f5f9;font-size:0.85rem}
.pm-checklist input[type=checkbox]{width:18px;height:18px;accent-color:#6366f1}

/* Milestones */
.pm-milestones{display:grid;grid-template-columns:repeat(4,1fr);gap:1rem;margin-bottom:1.5rem}
.pm-milestone-card{background:#fff;border-radius:12px;padding:1.25rem;box-shadow:0 1px 3px rgba(0,0,0,0.08);text-align:center;border-top:3px solid #e2e8f0}
.pm-milestone-card.completed{border-top-color:#22c55e}
.pm-milestone-card.upcoming{border-top-color:#6366f1}
.pm-milestone-card.missed{border-top-color:#ef4444}
.pm-milestone-week{font-size:0.75rem;color:#64748b;text-transform:uppercase;font-weight:500}
.pm-milestone-dist{font-size:1.3rem;font-weight:700;color:#1e293b;margin:0.35rem 0}
.pm-milestone-target{font-size:0.78rem;color:#94a3b8}
.pm-milestone-result{font-size:0.85rem;font-weight:600;margin-top:0.5rem}
.pm-milestone-pred{font-size:0.75rem;color:#64748b;margin-top:0.25rem}

/* Strength */
.pm-strength-group{margin-bottom:1.5rem}
.pm-strength-group h4{font-size:0.85rem;font-weight:600;color:#64748b;text-transform:uppercase;margin-bottom:0.75rem;padding-bottom:0.35rem;border-bottom:1px solid #e2e8f0}
.pm-strength-card{display:flex;align-items:center;justify-content:space-between;background:#fff;border-radius:10px;padding:0.75rem 1rem;box-shadow:0 1px 3px rgba(0,0,0,0.06);margin-bottom:0.5rem}
.pm-strength-info{flex:1}
.pm-strength-name{font-size:0.88rem;font-weight:600;color:#1e293b}
.pm-strength-desc{font-size:0.75rem;color:#94a3b8;margin-top:0.15rem}
.pm-strength-reps{font-size:0.78rem;color:#6366f1;font-weight:500}
.pm-strength-checks{display:flex;gap:0.35rem}
.pm-strength-checks label{display:flex;flex-direction:column;align-items:center;gap:0.15rem;font-size:0.65rem;color:#94a3b8}
.pm-strength-checks input[type=checkbox]{width:16px;height:16px;accent-color:#6366f1}

/* Prevention alerts */
.pm-alert{border-radius:12px;padding:1rem 1.25rem;margin-bottom:0.75rem;display:flex;align-items:flex-start;gap:0.75rem;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,0.08);transition:opacity .3s}
.pm-alert.danger{border-left:4px solid #ef4444}
.pm-alert.warning{border-left:4px solid #f59e0b}
.pm-alert.info{border-left:4px solid #3b82f6}
.pm-alert-icon{font-size:1.2rem;flex-shrink:0;margin-top:0.1rem}
.pm-alert-content{flex:1}
.pm-alert-title{font-weight:600;font-size:0.88rem;color:#1e293b;margin-bottom:0.25rem}
.pm-alert-msg{font-size:0.82rem;color:#64748b}
.pm-alert-rec{font-size:0.78rem;color:#94a3b8;margin-top:0.35rem;font-style:italic}
.pm-alert-dismiss{background:none;border:none;color:#94a3b8;cursor:pointer;font-size:0.75rem;padding:0.25rem}
.pm-alert-dismiss:hover{color:#64748b}

/* OK state */
.pm-ok{background:#f0fdf4;border-radius:12px;padding:2rem;text-align:center;color:#16a34a}
.pm-ok h3{font-size:1.1rem;font-weight:600;margin-bottom:0.5rem}
.pm-ok p{font-size:0.85rem;opacity:0.8}

/* Generate / Action buttons */
.pm-btn{display:inline-flex;align-items:center;gap:0.5rem;padding:0.65rem 1.25rem;background:#6366f1;color:#fff;border:none;border-radius:10px;font-family:inherit;font-size:0.88rem;font-weight:600;cursor:pointer;transition:background .2s}
.pm-btn:hover{background:#4f46e5}
.pm-btn:disabled{opacity:0.5;cursor:not-allowed}
.pm-btn-outline{background:transparent;color:#6366f1;border:1.5px solid #6366f1}
.pm-btn-outline:hover{background:#eef2ff}
.pm-btn-sm{padding:0.4rem 0.85rem;font-size:0.8rem;border-radius:8px}
.pm-btn-danger{background:#ef4444}
.pm-btn-danger:hover{background:#dc2626}

/* Chart cards (reuse existing) */
.pm-chart-card{background:#fff;border-radius:12px;padding:1rem;box-shadow:0 1px 3px rgba(0,0,0,0.08);margin-bottom:1rem}
.pm-chart-card h3{font-size:0.9rem;font-weight:600;margin-bottom:0.75rem}
.pm-charts-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:1rem;margin-bottom:1.5rem}

/* Empty state */
.pm-empty{text-align:center;padding:3rem 2rem;color:#64748b}
.pm-empty h3{font-size:1.2rem;font-weight:600;color:#1e293b;margin-bottom:0.5rem}
.pm-empty p{font-size:0.9rem;margin-bottom:1.5rem}

/* Volume bar chart annotation */
.pm-volume-legend{display:flex;gap:1rem;justify-content:center;margin-top:0.5rem;font-size:0.75rem;color:#64748b}
.pm-volume-legend span{display:flex;align-items:center;gap:0.35rem}
.pm-volume-legend span::before{content:'';display:block;width:12px;height:12px;border-radius:3px}

/* Responsive */
@media(max-width:1024px){
  .pm-summary{grid-template-columns:repeat(2,1fr)}
  .pm-week-days{grid-template-columns:repeat(4,1fr)}
  .pm-milestones{grid-template-columns:repeat(2,1fr)}
  .pm-recovery-charts{grid-template-columns:1fr}
  .pm-charts-grid{grid-template-columns:1fr}
}
@media(max-width:768px){
  .pm-hero{padding:1.25rem}
  .pm-hero-title{font-size:1.1rem}
  .pm-hero-countdown{gap:1rem}
  .pm-hero-unit-val{font-size:1.5rem}
  .pm-summary{grid-template-columns:1fr 1fr}
  .pm-summary-card{padding:1rem}
  .pm-summary-card-value{font-size:1.2rem}
  .pm-week-days{grid-template-columns:1fr}
  .pm-day-card{min-height:auto}
  .pm-milestones{grid-template-columns:1fr 1fr}
  .pm-recovery-score{flex-direction:column;gap:1rem}
  .pm-recovery-big{font-size:2.5rem}
  .pm-strength-card{flex-direction:column;align-items:flex-start;gap:0.5rem}
  .pm-tabs{padding:0.15rem}
  .pm-tab{padding:0.45rem 0.75rem;font-size:0.78rem}
  .pm-charts-grid{grid-template-columns:1fr}
}

/* === Safe areas (Dynamic Island, home indicator) === */
@supports(padding:max(0px)){
  @media(max-width:768px){
    .mobile-header{padding-top:max(0.6rem,env(safe-area-inset-top));padding-left:max(1rem,env(safe-area-inset-left));padding-right:max(1rem,env(safe-area-inset-right))}
    .content{padding-left:max(0.75rem,env(safe-area-inset-left));padding-right:max(0.75rem,env(safe-area-inset-right))}
    .bottom-nav{padding-bottom:max(0.25rem,env(safe-area-inset-bottom))}
    .sidebar{padding-top:env(safe-area-inset-top)}
  }
}
