:root {
  --bg: #050505; --card: #121212; --orange: #ff6600; --blue: #007bff;
  --green: #00e676; --green-safe: #00e676; --red: #ff3333; --red-pro: #d90429; --text: #ffffff;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; -webkit-tap-highlight-color: transparent; }
body { background: var(--bg); color: var(--text); display: flex; justify-content: center; min-height: 100vh; overflow-x: hidden; transition: background 0.3s, color 0.3s; }

/* ================= LIGHT MODE THEME ================= */
body[data-theme="light"] {
  --bg: #eef0f5; --card: #ffffff; --text: #1a1a1a; --green-safe: #009e52;
  color: var(--text);
}
body[data-theme="light"] #mobile-frame { background: var(--bg); }
body[data-theme="light"] .card { border-color: rgba(0,0,0,0.06); background: var(--card); box-shadow: 0 8px 30px rgba(0,0,0,0.06); }
body[data-theme="light"] input, body[data-theme="light"] select, body[data-theme="light"] textarea { background: #fdfdfd; border-color: #cbd0d5; color: #111; }
body[data-theme="light"] input:focus, body[data-theme="light"] select:focus { border-color: var(--orange); }
body[data-theme="light"] label, body[data-theme="light"] h4 { color: #555555 !important; }
body[data-theme="light"] .dock { background: rgba(255,255,255,0.98); border-color: #ddd; box-shadow: 2px 0 20px rgba(0,0,0,0.05); }
body[data-theme="light"] .date-nav { background: #fff; border-color: #cbd0d5; box-shadow: 0 4px 15px rgba(0,0,0,0.05);}
body[data-theme="light"] .date-nav .nav-btn { background: #f0f2f5; border-color: #cbd0d5; color: #333; }
body[data-theme="light"] .modal-box { background: #fff; border-color: #eee; box-shadow: 0 20px 60px rgba(0,0,0,0.15);}
body[data-theme="light"] .tracker-box { background: #fdfdfd; border-color: #cbd0d5; }
body[data-theme="light"] .tracker-latest-card { background: #fdfdfd; border-color: #eee; box-shadow: 0 4px 15px rgba(0,0,0,0.02); }
body[data-theme="light"] .mentor-box { background: linear-gradient(90deg, #fff, #f4f6f9); border: 1px solid #cbd0d5; border-left: 4px solid var(--orange); }
body[data-theme="light"] #mentor-msg { color: #333; }
body[data-theme="light"] .macro-table th { border-bottom-color: #cbd0d5; color:#555;}
body[data-theme="light"] .macro-table td { border-bottom-color: #eee; }
body[data-theme="light"] .macro-val { color: #111; }
body[data-theme="light"] .bal-pos { color: #555; }
body[data-theme="light"] .meal-btn { background: #fff; border-color: #cbd0d5; color: #444; }
body[data-theme="light"] .meal-btn.selected { background: var(--orange); color: #fff; border-color: var(--orange); }
body[data-theme="light"] .log-item { border-bottom-color: #eee; }
body[data-theme="light"] .ex-check-item { background: #fff; border-color: #cbd0d5; }
body[data-theme="light"] .ex-check-item.checked { background: #f0fdf4; border-color: var(--green); }
body[data-theme="light"] .d-card { background: #f8f9fa; border-color: #eee; }
body[data-theme="light"] .d-val { color: #111; }
body[data-theme="light"] .indices-card { background: #fff; border-color: #eee; }
body[data-theme="light"] .idx-row { border-bottom-color: #eee; }
body[data-theme="light"] .idx-val { color: #111; }
body[data-theme="light"] .autocomplete-list { background: #fff; border-color: #ddd; }
body[data-theme="light"] .autocomplete-item { color: #111; border-bottom-color: #eee; }
body[data-theme="light"] .autocomplete-item:hover { background: #fff3e0; }
body[data-theme="light"] .history-item { background: #fff; border-color: #ddd; }
body[data-theme="light"] .header-avatar-small { border-color: var(--orange); }
body[data-theme="light"] .btn-outline { border-color: #bbb; color: #444; background:#fff;}
body[data-theme="light"] .btn-outline:hover { border-color: var(--orange); color: var(--orange); }
body[data-theme="light"] .workout-accordion { background: #fdfdfd !important; border-color: #cbd0d5 !important; }
body[data-theme="light"] .adherence-panel { background: #f9f9f9; border-color: #ddd; }
body[data-theme="light"] .adh-row { border-bottom-color: #eee; }

/* CALENDÁRIO FIX E ÍCONE VISÍVEL */
input[type="date"]::-webkit-calendar-picker-indicator { cursor: pointer; filter: invert(0.8); padding: 5px; opacity: 1; }
body[data-theme="light"] input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(0); }

/* REGRA DE PRIVILÉGIO DO ADMIN */
.hidden-admin { display: none !important; }

/* ==================================================== */

#mobile-frame { width: 100%; max-width: 480px; background: var(--bg); min-height: 100vh; padding: 15px 20px 100px 20px; position: relative; z-index: 1; transition: background 0.3s; margin: 0 auto; }

::-webkit-scrollbar { width: 5px; } ::-webkit-scrollbar-track { background: transparent; } ::-webkit-scrollbar-thumb { background: #333; border-radius: 10px; }
body[data-theme="light"] ::-webkit-scrollbar-thumb { background: #ccc; }

.hidden { display: none !important; }
.screen { display: none; padding: 15px 0px; animation: fade 0.3s; width: 100%; max-width: 1000px; margin: 0 auto; }
.screen.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

/* CARDS E UI */
.card { background: var(--card); padding: 20px; border-radius: 20px; border: 1px solid rgba(255,255,255,0.05); margin-bottom: 15px; position: relative; box-shadow: 0 8px 25px rgba(0,0,0,0.3); }

button { width: 100%; padding: 14px; border-radius: 14px; border: none; font-weight: 800; cursor: pointer; font-size: 0.95rem; transition: 0.2s; display: flex; justify-content: center; align-items: center; gap: 8px; }
button:active { transform: scale(0.97); }
.btn-orange { background: var(--orange); color: #fff; box-shadow: 0 4px 15px rgba(255,102,0,0.25); }
.btn-blue { background: var(--blue); color: #fff; box-shadow: 0 4px 15px rgba(0,123,255,0.2); }
.btn-red { background: var(--red-pro); color: #fff; box-shadow: 0 4px 15px rgba(217, 4, 41, 0.2); }
.btn-outline { background: transparent; border: 1px solid #444; color: #aaa; }
.btn-outline:hover { border-color: var(--orange); color: var(--orange); }
.btn-danger { background: rgba(255,50,50,0.1); color: var(--red); border: 1px solid var(--red); }
.btn-icon { width: 40px; height: 40px; font-size: 1.1rem; border-radius: 12px; padding: 0; display:flex; align-items:center; justify-content:center;}
.btn-sm { width: auto; padding: 8px 14px; font-size: 0.85rem; }

label { font-size: 0.75rem; color: #888; margin-bottom: 6px; display: block; margin-left: 2px; text-align: left; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px;}
input, select, textarea { width: 100%; padding: 12px 14px; background: rgba(0,0,0,0.2); border: 1px solid #333; color: inherit; border-radius: 12px; margin-bottom: 12px; outline: none; font-size: 0.95rem; transition: border-color 0.2s;}
input:focus { border-color: var(--orange); }
.switch { position: relative; display: inline-block; width: 50px; height: 26px; } .switch input { opacity: 0; width: 0; height: 0; } .slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #333; transition: .4s; border-radius: 34px; } .slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 4px; bottom: 4px; background-color: white; transition: .4s; border-radius: 50%; } input:checked + .slider { background-color: var(--orange); } input:checked + .slider:before { transform: translateX(24px); }

/* CABEÇALHOS GLOBAIS PADRONIZADOS */
.page-header { display: flex; flex-direction: row; justify-content: space-between; align-items: center; margin-bottom: 25px; flex-wrap: wrap; gap: 15px;}
.page-header-left { display: flex; align-items: center; gap: 15px; }
.page-header-right { display: flex; align-items: center; gap: 10px; margin-left: auto;}
.header-avatar-small { width: 44px; height: 44px; border-radius: 50%; background-size: cover; background-position: center; border: 2px solid var(--orange); background-color: #333; flex-shrink: 0;}

.date-nav { display: flex; align-items: center; justify-content: space-between; background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02)); padding: 6px 10px; border-radius: 14px; border: 1px solid rgba(255,255,255,0.05); box-shadow: 0 5px 15px rgba(0,0,0,0.2); min-width: 170px; }
.date-nav .nav-btn { width: 34px; height: 34px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.08); background: rgba(0,0,0,0.35); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: 0.2s; }
.date-nav .nav-btn:active { transform: scale(0.96); }
.date-nav .nav-btn i { color: var(--orange); font-size: 0.9rem; }
.date-nav .nav-label { font-size: 0.85rem; color: #aaa; font-weight: 700; padding: 0 10px;}
.date-nav .nav-label strong { color: var(--orange); font-weight: 900; }

/* CLASSES AUXILIARES E LAYOUT MOBILE */
@media (max-width: 1023px) { .hide-on-mobile { display: none !important; } }
@media (min-width: 1024px) { .hide-on-desktop { display: none !important; } }
.input-row-nowrap { display: flex; gap: 8px; flex-wrap: nowrap; align-items: center; }
.home-col-left, .home-col-right, .profile-grid, .diet-grid, .workout-grid { display: flex; flex-direction: column; gap: 15px; }

/* BLINDAGEM HOME: Stacked para não quebrar limites */
.split-trackers { display: flex; flex-direction: column; gap: 12px; }
.tracker-box { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border: 1px solid #222; border-radius: 16px; background: #0a0a0a; margin-bottom: 0;}
/* BIO-TRACKER CARDS LEVES E ELEGANTES */
.tracker-latest-card { margin-bottom: 15px; padding: 16px; border-radius: 16px; border: 1px solid rgba(255,255,255,0.05); background: rgba(255, 255, 255, 0.03); }

.tracker-left { display: flex; align-items: center; gap: 12px; }
.tracker-value { font-weight: 800; font-size: 1rem; white-space: nowrap; color: var(--text) !important; } 

.tracker-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* MENTOR IQ: Livre para crescer! */
.mentor-box { border-left: 4px solid var(--orange); background: linear-gradient(90deg, #151515, #0a0a0a); padding: 16px; margin-bottom: 0; }

/* MACROS COMPACTOS */
.macro-card-compact { padding: 15px 20px !important; }
.macro-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; text-align: center; }
.macro-table th { color: #666; font-weight: 600; font-size: 0.7rem; padding-bottom: 8px; border-bottom: 1px solid #222; text-transform: uppercase; }
.macro-table td { padding: 10px 0; border-bottom: 1px solid #1a1a1a; }
.macro-val { font-weight: 800; color: var(--text); } .macro-bal { font-weight: 800; } .bal-pos { color: var(--text); } .bal-neg { color: var(--green); } .bal-exc { color: var(--red); }

/* DIETA E TREINO */
.meal-selector { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 15px; }
.meal-btn { flex: 1 1 30%; padding: 10px 5px; background: #1a1a1a; border-radius: 10px; font-size: 0.8rem; color: #888; border: 1px solid #333; text-align: center; font-weight: 600;}
.meal-btn.selected { background: var(--orange); color: #fff; border-color: var(--orange); }
.log-item { display: flex; justify-content: space-between; padding: 12px 0; font-size: 0.9rem; border-bottom: 1px solid #1a1a1a; align-items: center; text-transform: capitalize; }
.log-actions { display: flex; gap: 15px; align-items: center; margin-left: 10px; }
.action-btn { cursor: pointer; padding: 5px; transition: 0.2s; }

/* ACORDEÃO SLIM DE TREINO */
.workout-accordion { background: #0a0a0a; border: 1px solid #222; border-radius: 12px; margin-bottom: 10px; padding: 12px 15px; border-left: 4px solid var(--blue); }
.ex-check-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: #0a0a0a; border-radius: 10px; margin-bottom: 6px; border: 1px solid #222; }
.ex-check-item.checked { background: #111; border-color: var(--green); opacity: 0.6; }
.ex-check-box { width: 24px; height: 24px; border: 2px solid #444; border-radius: 6px; display: flex; justify-content: center; align-items: center; }
.ex-check-item.checked .ex-check-box { background: var(--green); border-color: var(--green); color: #000; }
.workout-header { display: flex; justify-content: space-between; align-items: center; cursor: pointer; padding-bottom: 2px; }
.workout-body { overflow: hidden; transition: max-height 0.3s ease-out; } .workout-body.collapsed { max-height: 0; }

/* AUTOCOMPLETE CUSTOMIZADO PARA DIETA */
.autocomplete-list { position: absolute; top: 100%; left: 0; width: 100%; background: #1a1a1a; border: 1px solid #333; z-index: 100; max-height: 200px; overflow-y: auto; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,0.9); margin-top: -5px; }
.autocomplete-item { padding: 12px 15px; cursor: pointer; border-bottom: 1px solid #222; font-size: 0.95rem; text-transform: capitalize; transition: background 0.2s; display: flex; flex-direction: column; }
.autocomplete-item:last-child { border-bottom: none; }
.autocomplete-item:hover, .autocomplete-item:active { background: rgba(255, 102, 0, 0.15); border-left: 3px solid var(--orange); padding-left: 12px; }
.autocomplete-item span { font-size: 0.7rem; color: #888; margin-top: 4px; text-transform: uppercase; font-weight: 600; letter-spacing: 0.5px; }
.autocomplete-item:hover span { color: var(--orange); }

/* ESTILOS DE LAUDO / DASHBOARD */
.dash-grid-med { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-bottom: 15px; }
.d-card { background: #181818; padding: 10px 4px; border-radius: 12px; border: 1px solid #333; text-align: center; display:flex; flex-direction:column; justify-content:center; }
.d-val { font-size: 0.9rem; font-weight: 900; display: block; color: #fff; margin-bottom: 4px; }
.d-lbl { font-size: 0.6rem; color: #aaa; text-transform: uppercase; letter-spacing:0.5px; }
.modal-section-title { font-size: 0.8rem; color: var(--blue); margin: 15px 0 10px 0; text-transform: uppercase; border-bottom: 1px solid #333; padding-bottom: 5px; text-align: left; font-weight: 800; }
.indices-card { background: #0d0d0d; border-radius: 12px; border: 1px solid #222; border-left: 4px solid var(--green); padding: 12px; margin-bottom: 15px; text-align: left; }
.idx-row { display: flex; justify-content: space-between; font-size: 0.85rem; margin-bottom: 6px; border-bottom: 1px dashed #222; padding-bottom: 4px; }
.idx-val { font-weight: 800; color: #fff; } .idx-lbl { color: #aaa; }

/* EVOLUÇÃO (Tabela) */
.evo-comparison-table { width: 100%; font-size: 0.85rem; border-collapse: collapse; margin-bottom: 20px; text-align:center;}
.evo-comparison-table th { color: #666; padding: 8px 5px; border-bottom: 1px solid #333; font-weight:600; }
.evo-comparison-table td { padding: 10px 5px; border-bottom: 1px solid #222; }
.evo-comparison-table td:first-child { text-align:left; color:#ccc; }

/* DOCK - MOBILE */
.dock { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); width: 92%; max-width: 440px; background: rgba(20,20,20,0.95); backdrop-filter: blur(12px); padding: 10px; border-radius: 25px; display: flex; justify-content: space-around; border: 1px solid rgba(255,255,255,0.1); z-index: 1000; box-shadow: 0 10px 30px rgba(0,0,0,0.5); transition: background 0.3s, border-color 0.3s; }
.dock-item { color: #888; font-size: 1.3rem; display: flex; flex-direction: column; align-items: center; cursor: pointer; transition: 0.3s; padding: 5px; }
.dock-item.active { color: var(--orange); transform: translateY(-4px); }
.dock-item span { font-size: 0.65rem; margin-top: 3px; font-weight: 600; }
.sidebar-header { display: none; }

/* SISTEMA DE TOAST E MODAIS */
#toast-box { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); width: 100%; max-width: 440px; z-index: 4000; pointer-events: none; display: flex; flex-direction: column; gap: 10px; align-items: center; padding: 0 15px; }
.toast { color: #000; font-weight: 800; padding: 12px 24px; border-radius: 50px; text-align: center; font-size: 0.95rem; animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); display: inline-block; pointer-events: auto; }
.toast.success { background: linear-gradient(135deg, var(--green), #00b35c); box-shadow: 0 10px 25px rgba(0,230,118,0.4); }
.toast.err { background: linear-gradient(135deg, var(--red-pro), #ff3333); color: #fff; box-shadow: 0 10px 25px rgba(217, 4, 41, 0.4); }
.toast.info { background: #222; color: #fff; border: 1px solid #444; box-shadow: 0 10px 25px rgba(0,0,0,0.5); font-weight: 600; }
@keyframes popIn { from { opacity: 0; transform: translateY(-20px) scale(0.9); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes fadeOut { to { opacity: 0; transform: translateY(-10px) scale(0.95); } }

.modal-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0,0,0,0.95); z-index: 3000; display: flex; justify-content: center; align-items: center; backdrop-filter: blur(5px); }
.modal-box { background: var(--card); width: 95%; max-width: 480px; padding: 20px; border-radius: 20px; border: 1px solid #333; text-align: center; box-shadow: 0 20px 50px rgba(0,0,0,0.7); max-height: 90vh; overflow-y: auto; position: relative; margin:auto;}
.modal-title { font-size: 1.1rem; color: var(--orange); font-weight: 800; margin-bottom: 15px; }
.modal-msg { color: #ccc; font-size: 0.9rem; margin-bottom: 20px; line-height: 1.5; white-space: pre-wrap; }

/* BOTÃO FECHAR MODAL (X) */
.modal-close-btn { position: absolute; top: 15px; right: 15px; width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,0.08); display: flex; justify-content: center; align-items: center; cursor: pointer; color: #888; transition: 0.2s; border: none; font-size: 1rem; z-index: 10; padding:0;}
.modal-close-btn:hover { background: rgba(255,0,0,0.2); color: var(--red-pro); }
body[data-theme="light"] .modal-close-btn { background: rgba(0,0,0,0.05); color: #555; }
body[data-theme="light"] .modal-close-btn:hover { background: rgba(255,0,0,0.1); color: var(--red-pro); }

.bio-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.profile-avatar { width:100px; height:100px; background:#222; border-radius:50%; margin:0 auto 10px auto; display:flex; justify-content:center; align-items:center; font-size:2.5rem; color:#444; border:2px solid var(--orange); background-size:cover; background-position:center; cursor:pointer; position:relative; overflow:hidden; }
.avatar-edit-icon { position:absolute; bottom:0; width:100%; background:rgba(0,0,0,0.6); font-size:0.6rem; color:#fff; padding:4px 0; text-align:center; }
.history-item { display:flex; justify-content:space-between; align-items:center; padding:12px; background:#1a1a1a; border-bottom:1px solid #333; margin-bottom:8px; border-radius:10px; }

/* REPORT COACH */
.report-modal-box { max-width: 480px; text-align: left; }
.rg-col-1, .rg-col-2 { display: flex; flex-direction: column; }
.rep-grid-compact { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.rep-mini-card { background: rgba(0,0,0,0.35); padding: 10px 8px; border-radius: 14px; border: 1px solid rgba(255,255,255,0.08); text-align: center; display: flex; flex-direction: column; justify-content: center; }
.rep-mini-val { font-size: 0.95rem; font-weight: 900; color: #fff; } .rep-mini-label { font-size: 0.55rem; color: #888; text-transform: uppercase; margin-top: 2px; }
.rep-section-title{ font-size: 0.95rem; font-weight: 900; color: #fff; margin: 12px 0 10px 0; display: flex; justify-content: space-between; align-items: center; }
.rep-day-card{ background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02)); border: 1px solid rgba(255,255,255,0.08); border-radius: 18px; padding: 14px; margin-bottom: 12px; cursor: pointer; transition: 0.2s; }
.rep-day-card:hover { border-color: rgba(255,255,255,0.2); }
.rep-day-header{ display:flex; justify-content:space-between; align-items:center; margin-bottom: 8px; font-weight: 900; }
.rep-day-line{ display:flex; justify-content:space-between; gap:10px; font-size: 0.85rem; margin-top: 6px; color:#bdbdbd; }
.rep-day-sub{ margin-top: 8px; font-size: 0.78rem; color:#8c8c8c; display:flex; gap:10px; flex-wrap: wrap; }
.rep-pill{ padding: 6px 10px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.08); background: rgba(0,0,0,0.35); }

.rep-day-details { margin-top: 15px; border-top: 1px dashed #333; padding-top: 15px; overflow: hidden; animation: fade 0.3s ease; }
.detail-section-title { font-size: 0.7rem; margin-bottom: 8px; font-weight: 800; letter-spacing: 0.5px; display: flex; align-items: center; gap: 5px; text-transform: uppercase; }
.detail-pill-container { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.log-pill { padding: 6px 10px; border-radius: 8px; font-size: 0.75rem; color: #ddd; background: #0a0a0a; border: 1px solid #222; text-transform: capitalize; display: flex; align-items: center; gap: 5px; }
.log-pill b { font-weight: 900; }
.lp-food { border-left: 3px solid var(--blue); }
.lp-workout { border-left: 3px solid var(--orange); }

.adherence-panel { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08); border-radius: 12px; padding: 12px 15px; margin-top: -5px; margin-bottom: 15px; overflow: hidden; display: none; animation: fade 0.3s ease; }
.adherence-panel.active { display: block; }
.adh-row { display: flex; justify-content: space-between; margin-bottom: 8px; border-bottom: 1px dashed rgba(255,255,255,0.05); padding-bottom: 6px; font-size: 0.85rem;}
.adh-row:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

/* ================= DESKTOP MODE (V3.6 PRO CLINIC DASHBOARD) ================= */
@media (min-width: 1024px) {
  body { justify-content: flex-start; align-items: flex-start; }
  
  #mobile-frame { 
    width: 100%; max-width: 100%; 
    margin: 0; 
    padding: 40px 40px 100px 320px; /* 280px sidebar + 40px gap */
    background: transparent !important; box-shadow: none !important; 
  }
  
  .screen.active { max-width: 100%; margin: 0; } 
  
  /* SIDEBAR PROFISSIONAL COM SCROLL */
  .dock {
    top: 0; left: 0; bottom: 0; width: 280px; height: 100vh;
    flex-direction: column; justify-content: flex-start; align-items: flex-start;
    padding: 40px 20px; border-radius: 0; transform: none;
    background: #0a0a0a; border-right: 1px solid #1a1a1a; 
    overflow-y: auto; overflow-x: hidden;
  }
  body[data-theme="light"] .dock { background: #ffffff; border-right: 1px solid #e5e5e5; }
  
  .sidebar-header { display: block !important; width: 100%; text-align: center; margin-bottom: 40px; flex-shrink: 0;}
  .sidebar-header img { width: 140px; border-radius: 12px; margin-bottom: 15px; }
  .sidebar-header p { color: var(--orange); font-size: 0.75rem; letter-spacing: 3px; text-transform: uppercase; font-weight: 900; margin: 0; }

  .dock-item { flex-direction: row; gap: 15px; width: 100%; padding: 16px 20px; border-radius: 14px; margin-bottom: 6px; color: #666; font-weight: 600; flex-shrink: 0;}
  .dock-item i { font-size: 1.1rem; width: 24px; text-align: center; }
  .dock-item span { font-size: 1rem; margin-top: 0; }
  .dock-item:hover { background: rgba(255,255,255,0.03); color: #fff; }
  body[data-theme="light"] .dock-item:hover { background: rgba(0,0,0,0.03); color: #000; }
  .dock-item.active { background: rgba(255, 102, 0, 0.1); color: var(--orange); border-left: none; transform: none; box-shadow: inset 4px 0 0 var(--orange); }
  
  /* PAINEL DE FERRAMENTAS INFERIOR */
  .sidebar-tools { display: flex; flex-direction: column; width: 100%; margin-top: 20px; padding-top: 15px; border-top: 1px solid #1a1a1a; flex-shrink: 0;}
  body[data-theme="light"] .sidebar-tools { border-top-color: #e5e5e5; }

  .card { padding: 30px; border-radius: 24px; margin-bottom: 0; }
  
  .home-grid { display: grid; grid-template-columns: 1fr 360px; gap: 25px; align-items: start; min-width: 0; }
  .home-col-left, .home-col-right { min-width: 0; }
  .home-col-right { display: flex; flex-direction: column; gap: 15px; }
  .split-trackers { flex-direction: column; gap: 15px; } 
  .tracker-box { padding: 20px 15px; border-radius: 16px; }

  .profile-grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: 25px; align-items: start; min-width: 0;}
  
  .diet-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 25px; align-items: start; min-width: 0;}
  .diet-right { min-height: 500px; padding: 30px; border-radius: 24px; border: 1px solid rgba(255,255,255,0.04); background: var(--card); box-shadow: 0 10px 40px rgba(0,0,0,0.4);}
  body[data-theme="light"] .diet-right { background: #fff; border-color: rgba(0,0,0,0.04); box-shadow: 0 10px 40px rgba(0,0,0,0.03); }

  .workout-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 25px; align-items: start; min-width: 0;}
  .workout-left { display: flex; flex-direction: column; gap: 20px; }
  .workout-right { background: var(--card); padding: 30px; border-radius: 24px; border: 1px solid rgba(255,255,255,0.04); box-shadow: 0 10px 40px rgba(0,0,0,0.4); min-height: 500px; }
  body[data-theme="light"] .workout-right { background: #fff; border-color: rgba(0,0,0,0.04); box-shadow: 0 10px 40px rgba(0,0,0,0.03); }
  
  .report-modal-box { max-width: 950px; padding: 30px; }
  .report-grid-desktop { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: start; }
}

/* LOGIN TELA CHEIA ISOLADA */
#screen-lock { display: none; position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: 999999; background: var(--bg); flex-direction: column; justify-content: center; align-items: center; text-align: center; }
#screen-lock.active { display: flex; }

/* BANNER DE IMPERSONATION (MODO COACH) */
#impersonation-banner {
    background: linear-gradient(90deg, var(--red-pro), #8a0219);
    color: #fff; text-align: center; padding: 10px 20px; font-size: 0.85rem; font-weight: 800;
    display: flex; justify-content: space-between; align-items: center; gap: 15px;
    box-shadow: 0 5px 20px rgba(217, 4, 41, 0.4); border-radius: 12px;
    margin-bottom: 20px;
}
#impersonation-banner button {
    background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.3); color: #fff;
    padding: 6px 15px; border-radius: 20px; font-size: 0.75rem; width: auto; cursor: pointer;
}
#impersonation-banner button:hover { background: rgba(0,0,0,0.5); }

/* IMPRESSÃO PDF PROFISSIONAL */
.print-area { display: none; }
@media print {
  @page { size: A4; margin: 1cm; }
  body { background: #fff !important; margin: 0 !important; padding: 0 !important; width: 100% !important; height: 100% !important; color: #000 !important; }
  #screen-lock, #mobile-frame, .modal-overlay, #toast-box { display: none !important; }
  body.print-report #print-container { display: block !important; position: absolute; left: 0; top: 0; width: 100%; background: #fff !important; z-index: 9999; }
  body.print-evo #print-evo-container { display: block !important; position: absolute; left: 0; top: 0; width: 100%; background: #fff !important; z-index: 9999; }
  body.print-super #print-super-report { display: block !important; position: absolute; left: 0; top: 0; width: 100%; background: #fff !important; z-index: 9999; }
  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
  .print-header { display: flex !important; justify-content: space-between; align-items: center; border-bottom: 4px solid #d90429; padding-bottom: 15px; margin-bottom: 25px; }
  .print-logo-img { max-height: 80px; object-fit: contain; }
  .print-header-info { text-align: right; font-size: 13px; color: #444; line-height: 1.4; }
  .print-header-info strong { font-size: 16px; color: #000; }
  .print-section { margin-bottom: 25px; break-inside: avoid; }
  .print-sec-title { font-size: 16px; border-bottom: 2px solid #ddd; padding-bottom: 5px; margin-bottom: 10px; font-weight: 800; text-transform: uppercase; display: flex; align-items: center; gap: 8px; color:#000; }
  .pst-red { color: #d90429; border-color: #d90429; }
  .pst-orange { color: #ff6600; border-color: #ff6600; }
  .pst-blue { color: #007bff; border-color: #007bff; }
  .pst-green { color: #00e676; border-color: #00e676; }
  .pst-dark { color: #000; border-color: #000; }
  .print-row-grid { display: flex !important; gap: 20px; width: 100%; }
  .print-card-data { flex: 1; background: #fff !important; border: 1px solid #e0e0e0; padding: 15px; border-radius: 10px; overflow: hidden; }
  .pc-border-red { border-left: 5px solid #d90429; }
  .pc-border-green { border-left: 5px solid #00e676; }
  .pc-border-blue { border-left: 5px solid #007bff; }
  .pc-border-orange { border-left: 5px solid #ff6600; }
  .print-stat-val { font-size: 24px; font-weight: 900; color: #000; }
  .print-stat-label { font-size: 12px; color: #666; text-transform: uppercase; }
  .print-bar-container { height: 8px; background: #f0f0f0 !important; border-radius: 4px; overflow: hidden; margin-top: 5px; border: 1px solid #ddd; }
  .print-bar-fill { height: 100%; background: #d90429 !important; }
  .print-prog-container { height: 12px; background: #e0e0e0 !important; border-radius: 6px; overflow: hidden; margin-top: 4px; border: 1px solid #ccc; width: 100%;}
  .print-prog-bar { height: 100%; }
  .bg-green { background-color: #00e676 !important; }
  .bg-orange { background-color: #ff6600 !important; }
  .bg-red { background-color: #d90429 !important; }
  .print-data-row { border-bottom: 1px dashed #eee; padding: 6px 0; font-size: 13px; display: flex; justify-content: space-between; }
  .print-data-row:last-child { border-bottom: none; }
  .print-data-row strong { color: #000; font-weight: 700; }
  .print-table-grid { display: grid !important; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 10px; }
  #print-perim-grid { grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr; }
  .print-table-item { background: #f9f9f9 !important; padding: 8px; border-radius: 6px; border: 1px solid #eee; text-align: center; }
  .print-table-item span { display: block; color: #666; font-size: 10px; text-transform: uppercase; margin-bottom: 2px; }
  .print-table-item strong { font-size: 14px; color: #000; text-transform: capitalize;}
  .print-comparison-table { width: 100%; border-collapse: collapse; margin-bottom: 20px; font-size: 12px; text-align:center;}
  .print-comparison-table th { background: #f0f0f0 !important; padding: 8px; border: 1px solid #ddd; color:#000; font-weight:bold;}
  .print-comparison-table th:first-child {text-align:left;}
  .print-comparison-table td { padding: 8px; border: 1px solid #ddd; color:#333; text-transform: capitalize;}
  .print-comparison-table td:first-child {text-align:left; font-weight:bold;}
  .print-chart-box { width: 100%; text-align: center; margin: 20px 0; padding: 10px; border: 1px solid #eee; border-radius: 8px; background-color: #fff !important; }
  .print-chart-box img { max-width: 100%; height: auto; display: block; margin: 0 auto; }
  .print-mentor-box { background: #f9f9f9 !important; padding: 15px; border-left: 5px solid #d90429; border-radius: 8px; font-size: 13px; line-height: 1.6; color: #333; }
  .print-footer { text-align: center; margin-top: 30px; font-size: 10px; color: #888; border-top: 1px solid #eee; padding-top: 10px; }
}