/* INSIDE MMA — Central de Operações · design system */
:root {
  --bg: #0b0c0f; --surface: #14161b; --surface-2: #1b1e25; --surface-3: #232730; --border: #272b35;
  --text: #f2f3f5; --muted: #9aa1ad; --accent: #e5322d; --accent-2: #ff6a4d; --accent-ink: #fff;
  --ok: #22c55e; --warn: #f5b301; --danger: #ff5a52; --info: #4da3ff;
  --shadow: 0 8px 28px rgba(0, 0, 0, .35);
  --radius: 14px; --radius-sm: 9px;
  --font-display: Oswald, "Bebas Neue", "Arial Narrow", Haettenschweiler, Impact, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --sidebar-w: 248px; --bottom-nav-h: 64px;
}
[data-theme="light"] {
  --bg: #f3f4f7; --surface: #ffffff; --surface-2: #f0f1f5; --surface-3: #e6e8ee; --border: #dcdfe6;
  --text: #0f1319; --muted: #5b6471; --accent: #d92620; --accent-2: #f0522f;
  --shadow: 0 8px 24px rgba(20, 28, 45, .12);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.45 var(--font-body); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); text-transform: uppercase; letter-spacing: .025em; font-weight: 700; line-height: 1.1; }
h1 { font-size: 30px; } h2 { font-size: 20px; } h3 { font-size: 16px; }
p { margin: 0; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); } .small { font-size: 12.5px; } .tiny { font-size: 11.5px; }
.grow { flex: 1; min-width: 0; } .row { display: flex; align-items: center; gap: 10px; } .row.wrap { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 10px; } .between { justify-content: space-between; }
.hidden { display: none !important; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
svg.icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* boot / login */
.boot { min-height: 100vh; display: grid; place-items: center; }
.boot-logo { font: 700 34px var(--font-display); letter-spacing: .08em; text-transform: uppercase; } .boot-logo span, .logo span { color: var(--accent); }
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; background:
  radial-gradient(900px 500px at 15% -10%, rgba(229, 50, 45, .28), transparent 60%),
  radial-gradient(700px 400px at 100% 100%, rgba(255, 106, 77, .12), transparent 60%), var(--bg); }
.login-card { width: min(420px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 32px; box-shadow: var(--shadow); }
.login-card .logo { font-size: 38px; margin-bottom: 4px; }
.logo { font: 700 22px var(--font-display); letter-spacing: .08em; text-transform: uppercase; }
.login-card .tagline { color: var(--muted); margin-bottom: 24px; }

/* shell */
.shell { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--surface); border-right: 1px solid var(--border); padding: 18px 12px; display: flex; flex-direction: column; gap: 4px; }
.sidebar .brand { padding: 4px 10px 16px; display: block; text-decoration: none; }
.sidebar .brand small { display: block; color: var(--muted); font: 600 10.5px var(--font-body); letter-spacing: .16em; margin-top: 2px; }
.nav-group { margin: 12px 10px 4px; font-size: 10.5px; letter-spacing: .16em; color: var(--muted); text-transform: uppercase; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--muted); text-decoration: none; font-weight: 600; position: relative; }
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { background: linear-gradient(90deg, rgba(229, 50, 45, .22), rgba(229, 50, 45, .04)); color: var(--text); }
.nav-item.active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: var(--accent); }
.nav-item .count { margin-left: auto; background: var(--accent); color: #fff; font-size: 11px; padding: 1px 7px; border-radius: 99px; }
.main { min-width: 0; padding-bottom: 40px; }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px; padding: 12px 24px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.topbar .logo-mobile { display: none; }
.search-box { position: relative; flex: 1; min-width: 0; max-width: 520px; }
.search-box input { width: 100%; min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px 10px 40px; }
.search-box .icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search-box kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font: 11px var(--font-body); color: var(--muted); border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px; }
.search-results { position: absolute; left: 0; right: 0; top: calc(100% + 8px); background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); max-height: 70vh; overflow-y: auto; z-index: 50; padding: 6px; }
.search-results .grp { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding: 8px 10px 4px; }
.search-results a { display: flex; justify-content: space-between; gap: 10px; padding: 9px 10px; border-radius: 9px; text-decoration: none; }
.search-results a:hover, .search-results a:focus { background: var(--surface-2); }
.icon-btn { position: relative; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 11px; background: var(--surface); border: 1px solid var(--border); color: var(--text); }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn .dot { position: absolute; top: 5px; right: 5px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px; background: var(--accent); color: #fff; font-size: 10px; display: grid; place-items: center; font-weight: 700; }
.content { padding: 24px; max-width: 1480px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { position: relative; padding-left: 16px; }
.page-head h1::before { content: ""; position: absolute; left: 0; top: 3px; bottom: 3px; width: 6px; transform: skewX(-14deg); background: var(--accent); border-radius: 2px; }
.page-head .sub { color: var(--muted); }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.bottom-nav { display: none; }
.menu-popover { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); padding: 6px; z-index: 60; }
.menu-popover button, .menu-popover a { display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: 0; text-align: left; padding: 10px 12px; border-radius: 9px; text-decoration: none; color: var(--text); }
.menu-popover button:hover, .menu-popover a:hover { background: var(--surface-2); }
.notif-item { display: block !important; }
.notif-item.unread { border-left: 3px solid var(--accent); }

/* cards, buttons, forms */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.card.flat { background: var(--surface-2); }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.card-head h2, .card-head h3 { flex: 1; }
.card-head .more { color: var(--muted); font-size: 13px; text-decoration: none; }
.card-head .more:hover { color: var(--text); }
.grid { display: grid; gap: 16px; } .grid > * { min-width: 0; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.auto { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid.split-grid { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); padding: 9px 14px; border-radius: 10px; font-weight: 600; text-decoration: none; min-height: 40px; }
.btn:hover { background: var(--surface-3); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #04210f; }
.btn.danger { color: var(--danger); } .btn.danger.solid { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn.ghost { background: transparent; } .btn.sm { padding: 5px 10px; min-height: 32px; font-size: 13px; border-radius: 8px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.input, .field input:not([type=checkbox]):not([type=file]), .field select, .field textarea, select.input, input.input { width: 100%; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; min-height: 42px; }
.field textarea { min-height: 90px; resize: vertical; }
.field .hint { font-size: 12px; color: var(--muted); }
.field.check { flex-direction: row; align-items: center; gap: 10px; } .field.check label { text-transform: none; letter-spacing: 0; font-size: 14px; color: var(--text); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; } .form-grid .full { grid-column: 1 / -1; }
.form-error { color: var(--danger); font-size: 13.5px; background: rgba(255, 90, 82, .1); border: 1px solid rgba(255, 90, 82, .3); padding: 8px 12px; border-radius: 9px; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.toolbar .input { width: auto; min-width: 140px; } .toolbar .grow-input { flex: 1; min-width: 180px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--border); background: var(--surface); color: var(--muted); padding: 6px 12px; border-radius: 99px; font-weight: 600; font-size: 13px; }
.chip.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.tabs { display: flex; gap: 4px; background: var(--surface); border: 1px solid var(--border); padding: 4px; border-radius: 12px; width: fit-content; max-width: 100%; overflow-x: auto; }
.tab { border: 0; background: none; color: var(--muted); padding: 8px 14px; border-radius: 9px; font-weight: 700; white-space: nowrap; }
.tab.active { background: var(--accent); color: #fff; }

/* badges, avatars, meters */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 99px; font-size: 11.5px; font-weight: 700; background: var(--surface-3); color: var(--text); white-space: nowrap; }
.badge.accent { background: rgba(229, 50, 45, .16); color: var(--accent-2); } .badge.ok { background: rgba(34, 197, 94, .16); color: var(--ok); }
.badge.warn { background: rgba(245, 179, 1, .16); color: var(--warn); } .badge.danger { background: rgba(255, 90, 82, .16); color: var(--danger); }
.badge.info { background: rgba(77, 163, 255, .16); color: var(--info); }
.prio { width: 9px; height: 9px; border-radius: 50%; display: inline-block; background: var(--muted); flex: none; }
.prio.URGENTE { background: var(--danger); box-shadow: 0 0 0 3px rgba(255, 90, 82, .2); } .prio.ALTA { background: var(--warn); } .prio.MEDIA { background: var(--info); } .prio.BAIXA { background: var(--muted); }
.avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); font-size: 11px; font-weight: 800; flex: none; border: 1px solid var(--border); overflow: hidden; }
.avatar.lg { width: 56px; height: 56px; font-size: 18px; } .avatar.xl { width: 96px; height: 96px; font-size: 30px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.progress { height: 8px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 99px; transition: width .4s; }
.progress.ok > i { background: var(--ok); }
.meter { display: grid; gap: 6px; }
.meter .top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.meter .num { font: 700 22px var(--font-display); }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; text-decoration: none; display: block; position: relative; overflow: hidden; }
a.stat:hover, button.stat:hover { border-color: var(--accent); transform: translateY(-1px); }
.stat .n { font: 700 38px var(--font-display); line-height: 1; } .stat .l { color: var(--muted); font-size: 13px; margin-top: 6px; }
.stat.danger .n { color: var(--danger); } .stat.warn .n { color: var(--warn); } .stat.accent::after { content: ""; position: absolute; right: -20px; top: -20px; width: 70px; height: 70px; background: var(--accent); opacity: .15; transform: rotate(45deg); }
button.stat { text-align: left; color: inherit; font: inherit; }

/* hero */
.hero { position: relative; border-radius: 20px; padding: 26px; margin-bottom: 18px; overflow: hidden; border: 1px solid var(--border);
  background: radial-gradient(700px 260px at 0% 0%, rgba(229, 50, 45, .35), transparent 70%), linear-gradient(135deg, var(--surface), var(--surface-2)); }
.hero::after { content: ""; position: absolute; right: -40px; top: -30px; bottom: -30px; width: 160px; background: repeating-linear-gradient(-20deg, transparent 0 14px, rgba(229, 50, 45, .13) 14px 28px); transform: skewX(-14deg); }
.hero h1 { font-size: 38px; } .hero p { color: var(--muted); margin-top: 6px; font-size: 16px; position: relative; z-index: 1; }
.hero .stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 20px; position: relative; z-index: 1; }

/* lists */
.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 11px 4px; border-bottom: 1px solid var(--border); text-decoration: none; min-height: 48px; }
.list-item:last-child { border-bottom: 0; }
a.list-item:hover, .list-item.clickable:hover { background: var(--surface-2); border-radius: 10px; }
.list-item .time { font: 700 15px var(--font-display); width: 48px; color: var(--accent-2); flex: none; }
.list-item.done .title { text-decoration: line-through; color: var(--muted); }
.check { appearance: none; -webkit-appearance: none; width: 24px; height: 24px; border-radius: 7px; border: 2px solid var(--muted); background: transparent; display: grid; place-content: center; flex: none; cursor: pointer; margin: 0; }
.check:checked { background: var(--ok); border-color: var(--ok); }
.check:checked::after { content: ""; width: 6px; height: 11px; border: solid #04210f; border-width: 0 3px 3px 0; transform: rotate(45deg) translate(-1px, -1px); }
.check.lg { width: 30px; height: 30px; border-radius: 9px; }
.group-title { font: 700 12px var(--font-display); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 16px 0 4px; }
.empty { text-align: center; padding: 32px 16px; color: var(--muted); } .empty h3 { color: var(--text); margin-bottom: 6px; } .empty .btn { margin-top: 14px; }
.skeleton { background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 12px; min-height: 90px; }
@keyframes sk { to { background-position: -200% 0; } }

/* alerts */
.alert { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 10px; text-decoration: none; margin-bottom: 8px; background: var(--surface-2); border-left: 4px solid var(--info); }
.alert.danger { border-color: var(--danger); } .alert.warn { border-color: var(--warn); } a.alert:hover { background: var(--surface-3); }

/* production grid */
.prod-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.prod-card { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 12px; text-decoration: none; }
.prod-card:hover { border-color: var(--accent); } .prod-card .n { font: 700 30px var(--font-display); } .prod-card .l { font-size: 12px; color: var(--muted); }
.flow { display: flex; gap: 3px; height: 10px; border-radius: 99px; overflow: hidden; margin-top: 12px; } .flow i { display: block; background: var(--accent); opacity: .85; } .flow i:nth-child(odd) { opacity: .5; }

/* agenda */
.day-block { margin-bottom: 10px; } .day-block .dh { font: 700 13px var(--font-display); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.dot-kind { width: 10px; height: 10px; border-radius: 3px; flex: none; }

/* kanban */
.board { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 14px; align-items: flex-start; scroll-snap-type: x proximity; min-height: 60vh; }
.lane { flex: 0 0 292px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; scroll-snap-align: start; max-height: calc(100vh - 230px); display: flex; flex-direction: column; }
.lane.over { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.lane-head { display: flex; align-items: center; gap: 8px; padding: 4px 6px 10px; }
.lane-head h3 { flex: 1; font-size: 14px; } .lane-head .n { background: var(--surface-3); border-radius: 99px; padding: 1px 9px; font-size: 12px; font-weight: 700; }
.lane-body { overflow-y: auto; display: flex; flex-direction: column; gap: 10px; min-height: 60px; flex: 1; padding: 2px; }
.kcard { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; flex-shrink: 0; cursor: grab; position: relative; }
.kcard:hover { border-color: var(--muted); } .kcard.dragging { opacity: .4; } .kcard:active { cursor: grabbing; }
.kthumb { height: 64px; display: flex; align-items: flex-end; padding: 6px 8px; background: linear-gradient(135deg, #2a0d0d, #521412 60%, var(--accent)); background-size: cover; background-position: center; }
.kthumb .badge { background: rgba(0, 0, 0, .55); color: #fff; }
.kbody { padding: 10px 12px 12px; display: grid; gap: 8px; }
.kbody .t { font-weight: 700; line-height: 1.25; cursor: pointer; }
.kmeta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12px; color: var(--muted); }
.kfoot { display: flex; align-items: center; gap: 8px; }
.late { color: var(--danger); font-weight: 700; }
.next-step { font-size: 12px; color: var(--muted); border-top: 1px dashed var(--border); padding-top: 8px; display: flex; justify-content: space-between; align-items: center; gap: 6px; }

/* tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table.t { width: 100%; border-collapse: collapse; }
table.t th { text-align: left; font: 700 12px var(--font-display); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.t td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; } table.t tbody tr { cursor: pointer; } table.t tbody tr:hover { background: var(--surface-2); }

/* modal */
.overlay { position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, .62); display: flex; align-items: center; justify-content: center; padding: 20px; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; width: min(560px, 100%); max-height: calc(100vh - 40px); display: flex; flex-direction: column; box-shadow: var(--shadow); animation: rise .18s; }
.modal.wide { width: min(980px, 100%); } .modal.mid { width: min(720px, 100%); }
@keyframes rise { from { transform: translateY(14px); opacity: 0; } }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--border); } .modal-head h2 { flex: 1; font-size: 19px; }
.modal-body { padding: 20px; overflow-y: auto; } .modal-foot { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 20px; }
.kv { display: grid; grid-template-columns: 120px 1fr; gap: 6px 12px; font-size: 14px; } .kv dt { color: var(--muted); } .kv dd { margin: 0; }
.stepper { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 6px; } .step { flex: 1 0 auto; text-align: center; padding: 6px 10px; border-radius: 8px; background: var(--surface-2); color: var(--muted); font-size: 11.5px; font-weight: 700; white-space: nowrap; border: 1px solid transparent; }
.step.done { background: rgba(34, 197, 94, .14); color: var(--ok); } .step.current { background: var(--accent); color: #fff; }
.next-box { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.link-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); } .link-row:last-child { border-bottom: 0; }
.log-row { font-size: 13px; padding: 6px 0; border-bottom: 1px dashed var(--border); } .log-row:last-child { border-bottom: 0; }
.checklist-section { margin-bottom: 14px; } .checklist-section h4 { font-size: 12.5px; color: var(--muted); letter-spacing: .12em; margin-bottom: 4px; display: flex; justify-content: space-between; }
.ck-row { display: flex; align-items: center; gap: 12px; padding: 9px 4px; min-height: 46px; border-bottom: 1px solid var(--border); } .ck-row label { flex: 1; cursor: pointer; } .ck-row.done label { text-decoration: line-through; color: var(--muted); }
.ck-row .x { opacity: .5; background: none; border: 0; color: var(--muted); padding: 6px; } .ck-row .x:hover { opacity: 1; color: var(--danger); }
.pre { white-space: pre-wrap; line-height: 1.5; }

/* calendar */
.cal-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; } .cal-head h2 { font-size: 24px; min-width: 190px; text-transform: capitalize; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--border); gap: 1px; }
.cal-dow { background: var(--surface); padding: 8px; text-align: center; font: 700 12px var(--font-display); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.cal-cell { background: var(--surface); min-height: 112px; padding: 6px; cursor: pointer; position: relative; display: flex; flex-direction: column; gap: 3px; }
.cal-cell:hover { background: var(--surface-2); } .cal-cell.other { background: var(--bg); opacity: .6; } .cal-cell.selected { outline: 2px solid var(--accent); outline-offset: -2px; }
.cal-cell .dn { font-weight: 700; font-size: 13px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; } .cal-cell.today .dn { background: var(--accent); color: #fff; }
.cal-ev { font-size: 11.5px; padding: 2px 6px; border-radius: 5px; border-left: 3px solid; background: var(--surface-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-more { font-size: 11px; color: var(--muted); }
.cal-dots { display: none; gap: 3px; flex-wrap: wrap; }
.week-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; } .week-col { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; min-height: 240px; display: flex; flex-direction: column; gap: 6px; } .week-col.today { border-color: var(--accent); }
.legend { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; } .legend button { display: flex; align-items: center; gap: 6px; border: 1px solid var(--border); background: var(--surface); border-radius: 99px; padding: 4px 10px; font-size: 12px; } .legend button.off { opacity: .4; }

/* cards: athletes, etc */
.athlete-card { display: flex; gap: 14px; align-items: center; text-decoration: none; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; } .athlete-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.hr { height: 1px; background: var(--border); margin: 14px 0; border: 0; }
.chart { width: 100%; height: auto; } .chart text { fill: var(--muted); font-size: 11px; font-family: var(--font-body); }
.bar-row { display: grid; grid-template-columns: 110px 1fr 36px; gap: 10px; align-items: center; margin: 7px 0; font-size: 13px; }
.toast-wrap { position: fixed; right: 16px; bottom: 16px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--surface-3); border: 1px solid var(--border); border-left: 4px solid var(--ok); padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow); max-width: 340px; animation: rise .2s; } .toast.error { border-left-color: var(--danger); } .toast.info { border-left-color: var(--info); }
.drop-hint { border: 2px dashed var(--border); border-radius: 12px; padding: 14px; text-align: center; color: var(--muted); }

/* tablet: sidebar vira trilho de ícones */
@media (max-width: 1100px) {
  .shell { grid-template-columns: 72px minmax(0, 1fr); }
  .sidebar { padding: 14px 8px; align-items: center; }
  .sidebar .brand small, .nav-item span.lbl, .nav-group, .nav-item .count { display: none; }
  .sidebar .brand { padding: 4px 0 12px; font-size: 0; } .sidebar .brand .logo { font-size: 0; } .sidebar .brand .logo::before { content: "I"; font-size: 28px; color: var(--accent); }
  .nav-item { padding: 12px; } .nav-item.active::before { left: -8px; }
  .grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.split-grid { grid-template-columns: minmax(0, 1fr); }   .prod-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .detail-grid { grid-template-columns: minmax(0, 1fr); }
}
/* celular: barra inferior */
@media (max-width: 760px) {
  .shell { display: block; max-width: 100vw; overflow-x: clip; } .sidebar { display: none; }
  .topbar { padding: 10px 12px; } .topbar .logo-mobile { display: block; } .search-box kbd { display: none; }
  .topbar .search-box { flex: 1; } .content { padding: 14px 12px calc(var(--bottom-nav-h) + 24px); }
  h1 { font-size: 26px; } .hero { padding: 18px; } .hero h1 { font-size: 28px; } .hero .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.split-grid,   .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: minmax(0, 1fr); } .grid.auto { grid-template-columns: minmax(0, 1fr); }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .bottom-nav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; height: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: var(--surface); border-top: 1px solid var(--border); }
  .bottom-nav a, .bottom-nav button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; background: none; border: 0; color: var(--muted); text-decoration: none; font-size: 11px; font-weight: 600; }
  .bottom-nav .active { color: var(--accent-2); }
  .overlay { padding: 0; align-items: flex-end; } .modal, .modal.wide, .modal.mid { width: 100%; max-height: 94vh; border-radius: 20px 20px 0 0; }
  .lane { flex-basis: 84vw; max-height: calc(100vh - 260px); }
  .page-head .actions { margin-left: 0; width: 100%; } .page-head .actions .btn { flex: 1; }
  .cal-cell { min-height: 56px; align-items: center; } .cal-cell .cal-ev, .cal-cell .cal-more { display: none; } .cal-dots { display: flex; justify-content: center; }
  .week-grid { grid-template-columns: minmax(0, 1fr); } .week-col { min-height: 0; }
  .prod-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kv { grid-template-columns: 100px 1fr; }
  .toast-wrap { left: 12px; right: 12px; bottom: calc(var(--bottom-nav-h) + 12px); } .toast { max-width: none; }
  .table-wrap table.t.responsive thead { display: none; } .table-wrap table.t.responsive td { display: block; border: 0; padding: 4px 14px; } .table-wrap table.t.responsive tr { display: block; border-bottom: 1px solid var(--border); padding: 10px 0; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
@media print { .sidebar, .topbar, .bottom-nav, .btn { display: none !important; } .shell { display: block; } }

/* ---------- polimento mobile (equipe) ---------- */
.fab { display: none; }
@media (max-width: 760px) {
  html { scroll-padding-bottom: 96px; }
  body { overscroll-behavior-y: none; }
  input, select, textarea, .input { font-size: 16px !important; } /* evita o zoom automático do iPhone */
  .btn { min-height: 44px; } .btn.sm { min-height: 40px; padding-left: 12px; padding-right: 12px; }
  .icon-btn { width: 44px; height: 44px; }
  .check { width: 28px; height: 28px; } .check.lg { width: 32px; height: 32px; }
  .topbar { padding-top: calc(10px + env(safe-area-inset-top)); gap: 8px; }
  .list-item { min-height: 52px; }
  .tabs .tab { min-height: 40px; }
  /* busca: vira um botão com lupa e abre em tela cheia ao tocar */
  .search-box { flex: none; width: 44px; height: 44px; }
  .search-box input { width: 44px; height: 44px; padding: 0; color: transparent; cursor: pointer; caret-color: transparent; }
  .search-box input::placeholder { color: transparent; }
  .search-box:focus-within { position: fixed; z-index: 80; left: 12px; right: 12px; top: calc(8px + env(safe-area-inset-top)); width: auto; height: auto; max-width: none; }
  .search-box:focus-within input { width: 100%; height: 48px; padding: 0 14px 0 42px; color: var(--text); cursor: text; caret-color: auto; box-shadow: var(--shadow); }
  .search-box:focus-within input::placeholder { color: var(--muted); }
  .search-box:focus-within .search-results { max-height: 60vh; overflow: auto; left: 0; right: 0; }
  .lane { scroll-snap-stop: always; } .board { scroll-snap-type: x mandatory; scroll-padding-left: 0; }
  /* botão flutuante de criação rápida */
  .fab { display: grid; place-items: center; position: fixed; z-index: 45; right: 16px; bottom: calc(var(--bottom-nav-h) + 16px + env(safe-area-inset-bottom)); width: 56px; height: 56px; border-radius: 50%; border: 0; background: var(--accent); color: #fff; box-shadow: 0 8px 22px rgba(229, 50, 45, .45); }
  .fab:active { transform: scale(.94); }
  .fab .icon { width: 26px; height: 26px; }
  .modal-box, .modal { padding-bottom: env(safe-area-inset-bottom); }
}
