:root {
  --bg: #03080e;
  --panel: #07141e;
  --panel-2: #0a1d2b;
  --panel-3: #0d2535;
  --line: #17384c;
  --line-soft: #102a3a;
  --text: #eef8ff;
  --muted: #8aa5b6;
  --cyan: #28d7f6;
  --cyan-soft: #0d3b4b;
  --orange: #ff9d3d;
  --green: #47e3a1;
  --red: #ff7488;
  --yellow: #f7ca67;
  --shadow: 0 24px 70px rgba(0, 0, 0, .28);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html { background: var(--bg); color-scheme: dark; }
body {
  margin: 0;
  min-width: 300px;
  background:
    radial-gradient(circle at 78% -8%, rgba(21, 104, 148, .35), transparent 31rem),
    radial-gradient(circle at 4% 38%, rgba(255, 157, 61, .06), transparent 25rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
}
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(40, 215, 246, .24);
  outline-offset: 2px;
}
[hidden] { display: none !important; }

.mobile-app { min-height: 100svh; display: grid; grid-template-rows: auto 1fr auto; }
.mobile-topbar {
  position: sticky;
  top: 0;
  z-index: 12;
  min-height: 68px;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 18px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(23, 56, 76, .85);
  background: rgba(3, 12, 19, .9);
  backdrop-filter: blur(18px);
}
.mobile-brand { display: flex; align-items: baseline; gap: 9px; color: var(--text); text-decoration: none; }
.mobile-brand b { font-size: 1.125rem; letter-spacing: .04em; }
.mobile-brand b span { color: var(--cyan); }
.mobile-brand small { font-size: .625rem; letter-spacing: .18em; color: #7899aa; }
.connection { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: .75rem; }
.connection i { width: 7px; height: 7px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 10px rgba(255, 157, 61, .55); }
.connection.online { color: #a5dcca; }
.connection.online i { background: var(--green); box-shadow: 0 0 10px rgba(71, 227, 161, .55); }
.connection.offline i { background: var(--red); box-shadow: none; }

.mobile-main { width: 100%; max-width: 680px; margin: 0 auto; padding: 26px 18px calc(102px + var(--safe-bottom)); }
.mobile-view h1 { margin: 5px 0 14px; font-size: clamp(2rem, 9vw, 2.85rem); line-height: 1.04; letter-spacing: -.045em; }
.kicker, .view-eyebrow {
  display: block;
  margin: 0 0 8px;
  color: var(--orange);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.intro { max-width: 560px; margin: 0 0 26px; color: var(--muted); font-size: 1rem; line-height: 1.65; }
.auth-view { padding-top: 7vh; }

.mobile-form, .entity-form { display: grid; gap: 14px; }
.mobile-form label, .entity-form label, .ops-project-picker, .ops-filter {
  display: grid;
  gap: 7px;
  color: #bdd0dc;
  font-size: .875rem;
  font-weight: 650;
}
.mobile-form input, .mobile-form select, .mobile-form textarea,
.entity-form input, .entity-form select, .entity-form textarea,
.ops-project-picker select, .ops-filter input {
  width: 100%;
  min-height: 50px;
  padding: 12px 13px;
  border: 1px solid #24516a;
  border-radius: 11px;
  background: #06131d;
  color: #fff;
  font-size: 1rem;
  outline: none;
}
.mobile-form input:focus, .mobile-form select:focus, .mobile-form textarea:focus,
.entity-form input:focus, .entity-form select:focus, .entity-form textarea:focus,
.ops-project-picker select:focus, .ops-filter input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(40, 215, 246, .09);
}
.entity-form textarea, .mobile-form textarea { min-height: 112px; resize: vertical; }
.entity-form label > small { color: var(--muted); font-size: .75rem; font-weight: 500; line-height: 1.45; }

.primary-action, .secondary-action, .danger-action, .icon-action, .record-edit {
  min-height: 48px;
  padding: 13px 17px;
  border-radius: 11px;
  font-weight: 850;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.primary-action { border: 0; background: var(--cyan); color: #031019; text-transform: uppercase; letter-spacing: .04em; font-size: .78rem; }
.primary-action:hover { background: #62e5fb; }
.secondary-action { display: inline-flex; align-items: center; justify-content: center; border: 1px solid #28627f; background: #0a2638; color: #dff7ff; }
.danger-action { border: 1px solid #65313d; background: transparent; color: #ff9caa; }
.compact-action { min-height: 42px; width: auto; padding: 10px 14px; }
.icon-action { display: inline-grid; width: 44px; min-width: 44px; min-height: 44px; place-items: center; padding: 0; border: 1px solid #285570; background: #0a2030; color: var(--cyan); font-size: 1.35rem; }
button:disabled { cursor: wait; opacity: .55; }

.form-message {
  min-height: 47px;
  margin: 16px 0 0;
  padding: 12px 13px;
  border-radius: 10px;
  background: #091c28;
  color: var(--muted);
  font-size: .84rem;
  overflow-wrap: anywhere;
  scroll-margin-block: 24px;
}
.form-message.error { border: 1px solid #7d3440; color: #ffb5c0; }
.auth-actions { display: flex; justify-content: space-between; gap: 16px; margin-top: 18px; }
.auth-actions a { color: var(--cyan); font-size: .84rem; text-decoration: none; }

.welcome-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 24px; }
.welcome-row h1 { margin-bottom: 7px; font-size: clamp(1.85rem, 7vw, 2.65rem); }
.welcome-copy { margin: 0; color: var(--muted); font-size: .92rem; }
.avatar { flex: 0 0 auto; width: 48px; height: 48px; border: 1px solid #286481; border-radius: 50%; background: #0b2c40; color: var(--cyan); font-size: .75rem; font-weight: 900; cursor: pointer; }

.dashboard-layout { display: grid; gap: 24px; }
#operations { min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: 20px; background: rgba(5, 18, 27, .88); box-shadow: var(--shadow); }
.ops-head { display: grid; gap: 16px; padding-bottom: 17px; border-bottom: 1px solid var(--line-soft); }
.ops-heading small { color: var(--orange); font-size: .68rem; font-weight: 900; letter-spacing: .16em; }
.ops-heading h2 { margin: 4px 0 0; font-size: 1.25rem; letter-spacing: -.02em; }
.ops-controls { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; align-items: end; }
.ops-project-picker { grid-column: 1 / -1; }
.ops-project-picker span { color: var(--muted); font-size: .75rem; letter-spacing: .04em; }
.ops-project-picker select { min-height: 46px; }

.ops-shell { min-width: 0; }
.ops-nav { display: flex; gap: 8px; overflow-x: auto; padding: 16px 0; scrollbar-width: thin; }
.ops-nav button {
  flex: 0 0 auto;
  min-width: 118px;
  min-height: 66px;
  padding: 10px 13px;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 8px;
  align-items: center;
  border: 1px solid #29465b;
  border-radius: 13px;
  background: #0a1925;
  color: #dce9f0;
  text-align: left;
  cursor: pointer;
}
.ops-nav button > span { grid-row: 1 / 3; display: grid; width: 29px; height: 29px; place-items: center; border-radius: 8px; background: #102c3c; color: var(--cyan); font-size: .9rem; }
.ops-nav button b { align-self: end; font-size: .82rem; }
.ops-nav button small { align-self: start; color: var(--muted); font-size: .66rem; }
.ops-nav button.active { border-color: var(--cyan); background: linear-gradient(145deg, #0e3a49, #092432); box-shadow: inset 0 0 0 1px rgba(40, 215, 246, .12); }
.ops-nav button.active > span { background: var(--cyan); color: #04131b; }
.ops-stage { min-width: 0; }
#ops-status { margin: 0 0 13px; color: #86a5b6; font-size: .75rem; }
#ops-status.error { color: #ffabb6; }
#ops-content { min-width: 0; }

.view-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 17px; }
.view-header h2 { margin: 0; font-size: clamp(1.35rem, 5vw, 1.8rem); letter-spacing: -.03em; }
.view-header p { margin: 6px 0 0; color: var(--muted); font-size: .86rem; }
.view-header .view-eyebrow { max-width: 35rem; margin-bottom: 5px; overflow: hidden; color: var(--cyan); text-overflow: ellipsis; white-space: nowrap; }

.ops-metrics, .module-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.ops-metric { min-width: 0; min-height: 118px; padding: 15px; display: flex; flex-direction: column; border: 1px solid #203f53; border-radius: 15px; background: linear-gradient(150deg, #0b1d2a, #07141e); overflow-wrap: anywhere; }
.ops-metric > small { color: #9ab1bf; font-size: .75rem; }
.ops-metric > strong { margin: auto 0 4px; font-size: clamp(1.15rem, 4.6vw, 1.55rem); letter-spacing: -.025em; }
.ops-metric > span { color: var(--muted); font-size: .69rem; }

.development-hero { position: relative; margin-bottom: 16px; padding: 18px; display: grid; gap: 17px; border: 1px solid #28617b; border-radius: 17px; background: linear-gradient(145deg, rgba(12, 51, 68, .95), rgba(7, 24, 35, .95)); overflow: hidden; }
.development-hero::after { content: ""; position: absolute; top: -80px; right: -70px; width: 190px; height: 190px; border-radius: 50%; background: rgba(40, 215, 246, .07); }
.development-code { color: var(--cyan); font-size: .67rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.development-hero h3 { margin: 5px 0 4px; font-size: 1.45rem; line-height: 1.15; }
.development-hero p { margin: 0; color: #9fb6c3; font-size: .8rem; }
.development-hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.development-hero-meta > span:not(.status-chip) { display: grid; }
.development-hero-meta small, .development-hero-progress small { color: var(--muted); font-size: .68rem; }
.development-hero-meta b { font-size: .8rem; }
.development-hero-progress { display: grid; gap: 7px; }
.development-hero-progress > span { display: flex; align-items: center; justify-content: space-between; }
.development-hero-progress > span b { font-size: 1rem; }
.development-edit { position: relative; z-index: 1; width: max-content; min-height: 40px; padding: 8px 12px; font-size: .75rem; }

progress { width: 100%; height: 8px; border: 0; border-radius: 999px; background: #102736; accent-color: var(--cyan); overflow: hidden; }
progress::-webkit-progress-bar { border-radius: 999px; background: #102736; }
progress::-webkit-progress-value { border-radius: 999px; background: linear-gradient(90deg, #1dbbd8, var(--cyan)); }
progress::-moz-progress-bar { border-radius: 999px; background: var(--cyan); }

.dashboard-panels { display: grid; gap: 11px; }
.data-panel { min-width: 0; padding: 16px; border: 1px solid #1d3a4c; border-radius: 15px; background: #071620; }
.panel-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 15px; }
.panel-title small { color: var(--orange); font-size: .64rem; font-weight: 900; letter-spacing: .14em; }
.panel-title h3 { margin: 3px 0 0; font-size: .98rem; }
.panel-title button { padding: 3px 0; border: 0; background: transparent; color: var(--cyan); font-size: .7rem; cursor: pointer; }
.task-distribution { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.task-distribution > div { min-width: 0; padding: 10px; display: grid; gap: 5px; border-radius: 11px; background: #0b202d; }
.task-distribution small { min-height: 2.4em; color: var(--muted); font-size: .65rem; }
.task-distribution strong { font-size: 1.2rem; }
.task-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.task-dot.status-a_fazer { background: var(--yellow); }
.task-dot.status-andamento { background: var(--cyan); }
.task-dot.status-concluida { background: var(--green); }
.cash-chart { display: grid; gap: 13px; }
.cash-row { display: grid; gap: 5px; }
.cash-row > b { color: #c2d3dc; font-size: .72rem; }
.cash-row > div { display: grid; grid-template-columns: minmax(8.5rem, 1fr) minmax(4rem, 1.2fr); align-items: center; gap: 8px; }
.cash-row span { display: flex; justify-content: space-between; gap: 7px; color: var(--muted); font-size: .63rem; }
.cash-row span strong { color: #d8e8ef; font-weight: 700; }
.cash-row progress { height: 6px; }
.cash-row progress.income { accent-color: var(--green); }
.cash-row progress.income::-webkit-progress-value { background: var(--green); }
.cash-row progress.expense { accent-color: var(--orange); }
.cash-row progress.expense::-webkit-progress-value { background: var(--orange); }
.recent-panel article { padding: 10px 0; display: grid; gap: 3px; border-bottom: 1px solid var(--line-soft); }
.recent-panel article:last-child { border-bottom: 0; }
.recent-panel article b { font-size: .79rem; font-weight: 750; }
.recent-panel article span { color: var(--muted); font-size: .68rem; }
.ops-empty-inline { margin: 0; color: var(--muted); font-size: .78rem; }

.portfolio-title { margin: 24px 0 12px; display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.portfolio-title h2 { margin: 0; font-size: 1.25rem; }
.portfolio-title > span { color: var(--muted); font-size: .72rem; }
.portfolio-grid, .project-grid { display: grid; gap: 11px; }
.development-card { min-width: 0; min-height: 205px; padding: 16px; display: flex; flex-direction: column; gap: 8px; border: 1px solid #1f4358; border-radius: 15px; background: linear-gradient(155deg, #0a1d29, #06131c); color: var(--text); text-align: left; cursor: pointer; }
.development-card:hover { border-color: #327a99; transform: translateY(-1px); }
.development-card-top, .development-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.development-card > strong { margin-top: 7px; font-size: 1.05rem; line-height: 1.25; }
.development-card > small { min-height: 2.7em; color: var(--muted); font-size: .72rem; }
.development-progress { margin-top: auto; display: grid; gap: 7px; }
.development-progress > span { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: .69rem; }
.development-progress b { color: var(--text); }
.development-foot { padding-top: 9px; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: .66rem; }
.development-foot b { color: var(--green); font-size: .7rem; }

.status-chip { display: inline-flex; width: max-content; max-width: 100%; padding: 4px 7px; border: 1px solid #32536a; border-radius: 999px; background: #102635; color: #bcd1dc; font-size: .61rem; font-weight: 850; letter-spacing: .035em; white-space: nowrap; }
.status-active, .status-concluida, .status-completed, .status-pago, .status-receita { border-color: rgba(71, 227, 161, .35); background: rgba(71, 227, 161, .09); color: #91f0c4; }
.status-andamento, .status-planning, .status-project, .status-work, .status-service, .status-management, .status-inspection { border-color: rgba(40, 215, 246, .34); background: rgba(40, 215, 246, .08); color: #83e8fa; }
.status-a_fazer, .status-previsto, .status-normal, .status-on_hold { border-color: rgba(247, 202, 103, .34); background: rgba(247, 202, 103, .08); color: #f9d98d; }
.status-alta, .status-urgente, .status-despesa, .status-archived { border-color: rgba(255, 116, 136, .34); background: rgba(255, 116, 136, .08); color: #ffadba; }

.ops-record { min-width: 0; margin: 10px 0; padding: 15px; border: 1px solid #1d3c50; border-radius: 14px; background: #081722; overflow-wrap: anywhere; }
.record-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.record-head small { color: var(--cyan); font-size: .65rem; font-weight: 800; letter-spacing: .04em; }
.record-head h3 { margin: 3px 0 0; font-size: .98rem; }
.record-edit { min-height: 36px; padding: 7px 10px; border: 1px solid #2b5d77; background: #0a2738; color: #cdf4ff; font-size: .69rem; }
.ops-record > p { margin: 10px 0 0; color: var(--muted); font-size: .76rem; line-height: 1.55; }
.ops-record .record-detail { color: #c3d4dc; }
.record-tags, .record-money { margin-top: 11px; display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.record-money { justify-content: space-between; }
.record-money strong { font-size: .9rem; }
.positive { color: var(--green); }
.negative { color: #ff9f80; }
.project-record { margin: 0; }
.legacy-record { border-style: dashed; }

.ops-filter { margin: 15px 0; }
.ops-empty-state { padding: 30px 18px; display: grid; place-items: center; border: 1px dashed #28526a; border-radius: 16px; background: rgba(9, 27, 39, .7); text-align: center; }
.ops-empty-state.compact { padding: 22px 16px; }
.ops-empty-state > span { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 12px; background: var(--cyan-soft); color: var(--cyan); font-size: 1.3rem; }
.ops-empty-state h3 { margin: 13px 0 4px; font-size: 1rem; }
.ops-empty-state p { max-width: 29rem; margin: 0 0 15px; color: var(--muted); font-size: .77rem; }

.entity-form { margin-bottom: 17px; padding: 16px; border: 1px solid var(--cyan); border-radius: 16px; background: #071925; box-shadow: 0 18px 50px rgba(0, 0, 0, .25); scroll-margin-top: 90px; }
.form-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding-bottom: 13px; border-bottom: 1px solid var(--line-soft); }
.form-title h3 { margin: 0; font-size: 1.18rem; }
.form-title .view-eyebrow { margin-bottom: 3px; }
.form-grid, .form-linkage { display: grid; gap: 13px; }
.form-linkage { padding: 13px; border: 1px solid #23495f; border-radius: 12px; background: #081f2c; }
.form-actions { display: flex; flex-wrap: wrap; gap: 9px; padding-top: 4px; }
.form-actions .danger-action { margin: 0; }

.ops-note { margin: 17px 0 0; padding-top: 14px; border-top: 1px solid var(--line-soft); color: #7997a8; font-size: .72rem; line-height: 1.55; }

.dashboard-aside { display: grid; align-content: start; gap: 24px; }
.company-card { margin: 0; padding: 20px; border: 1px solid #1e526d; border-radius: 18px; background: linear-gradient(145deg, #0c2638, #07131e); box-shadow: var(--shadow); }
.company-card > div { display: grid; gap: 5px; }
.company-card small { color: #7898aa; font-size: .65rem; letter-spacing: .13em; }
.company-card strong { font-size: 1.12rem; line-height: 1.25; }
.plan-pill { display: inline-flex; width: max-content; margin-top: 13px; padding: 5px 9px; border: 1px solid #246682; border-radius: 999px; color: var(--cyan); font-size: .62rem; font-weight: 850; letter-spacing: .07em; }
.company-card dl { margin: 18px 0 0; padding-top: 15px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; border-top: 1px solid var(--line); }
.company-card dt { color: var(--muted); font-size: .68rem; }
.company-card dd { margin: 4px 0 0; font-size: .8rem; font-weight: 750; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 12px; }
.section-title h2 { margin: 0; font-size: 1.05rem; }
.section-title > small { color: var(--green); font-size: .68rem; }
.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.quick-card { min-height: 132px; padding: 14px; display: flex; flex-direction: column; align-items: flex-start; border: 1px solid var(--line); border-radius: 14px; background: #071722; color: var(--text); text-align: left; text-decoration: none; cursor: pointer; }
.quick-card:hover { border-color: #267293; }
.quick-icon { width: 33px; height: 33px; margin-bottom: auto; display: grid; place-items: center; border: 1px solid #205d78; border-radius: 9px; background: #0a2a3d; color: var(--cyan); font-size: .72rem; font-weight: 900; }
.quick-card b { font-size: .79rem; }
.quick-card small { margin-top: 4px; color: var(--muted); font-size: .66rem; }

.mobile-tabs { position: fixed; z-index: 15; right: 0; bottom: 0; left: 0; min-height: 70px; padding: 8px 8px calc(8px + var(--safe-bottom)); display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid #17384c; background: rgba(4, 15, 23, .95); backdrop-filter: blur(18px); }
.mobile-tabs button { min-width: 0; padding: 0; display: grid; place-items: center; gap: 2px; border: 0; background: transparent; color: #7896a8; font-size: .65rem; cursor: pointer; }
.mobile-tabs span { font-size: 1.05rem; line-height: 1; }
.mobile-tabs .active { color: var(--cyan); }

.account-view { padding-top: 12px; }
.back-button { margin-bottom: 28px; padding: 8px 0; border: 0; background: transparent; color: var(--cyan); cursor: pointer; }
.account-list { margin: 24px 0; display: grid; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.account-list div { padding: 17px; display: grid; gap: 5px; border-bottom: 1px solid var(--line); background: #071722; }
.account-list div:last-child { border: 0; }
.account-list small { color: var(--muted); font-size: .66rem; letter-spacing: .12em; }
.account-list strong { font-size: .84rem; overflow-wrap: anywhere; }
.account-view .danger-action { width: 100%; margin-top: 12px; }

.install-sheet { position: fixed; inset: 0; z-index: 20; display: grid; align-items: end; }
.sheet-backdrop { position: absolute; inset: 0; border: 0; background: rgba(0, 0, 0, .72); }
.install-sheet > div { position: relative; padding: 12px 22px calc(26px + var(--safe-bottom)); border: 1px solid #1d526c; border-radius: 24px 24px 0 0; background: #081824; box-shadow: 0 -30px 80px rgba(0, 0, 0, .5); }
.sheet-handle { display: block; width: 44px; height: 4px; margin: 0 auto 22px; border-radius: 9px; background: #31566a; }
.install-sheet h2 { margin: 0 0 10px; font-size: 1.4rem; }
.install-sheet p { margin: 0 0 20px; color: #a2b8c6; line-height: 1.6; }
.install-sheet .secondary-action { width: 100%; }

@media (min-width: 700px) {
  .mobile-topbar { padding-inline: max(24px, calc((100vw - 680px) / 2)); }
  .form-grid, .form-linkage { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .full-field { grid-column: 1 / -1; }
  .portfolio-grid, .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .development-hero { grid-template-columns: minmax(0, 1.25fr) minmax(0, .85fr); }
  .development-hero-progress { grid-column: 1 / -1; }
  .development-edit { position: absolute; top: 18px; right: 18px; }
  .development-hero-meta { padding-right: 7rem; }
  .install-sheet { place-items: center; }
  .install-sheet > div { width: min(480px, calc(100vw - 32px)); border-radius: 22px; }
}

@media (min-width: 980px) {
  body[data-app-view="dashboard"] .mobile-main { max-width: 1480px; padding: 30px 28px 44px; }
  body[data-app-view="dashboard"] .mobile-topbar { padding-inline: 30px; }
  .dashboard-layout { grid-template-columns: minmax(0, 1fr) 290px; align-items: start; }
  #operations { padding: 22px; }
  .ops-head { grid-template-columns: auto minmax(32rem, 1fr); align-items: end; }
  .ops-controls { grid-template-columns: minmax(18rem, 1fr) auto auto; justify-content: end; }
  .ops-project-picker { grid-column: auto; }
  .ops-shell { display: grid; grid-template-columns: 184px minmax(0, 1fr); gap: 20px; padding-top: 18px; }
  .ops-nav { position: sticky; top: 92px; align-self: start; padding: 0; display: grid; overflow: visible; }
  .ops-nav button { min-width: 0; width: 100%; min-height: 64px; }
  .ops-stage { padding-left: 20px; border-left: 1px solid var(--line-soft); }
  .ops-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .module-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dashboard-panels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .recent-panel { grid-column: 1 / -1; }
  .portfolio-grid, .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-aside { position: sticky; top: 92px; }
  .mobile-tabs { display: none !important; }
  .welcome-row { margin-bottom: 27px; }
}

@media (min-width: 1280px) {
  .dashboard-layout { grid-template-columns: minmax(0, 1fr) 315px; }
  .ops-shell { grid-template-columns: 200px minmax(0, 1fr); }
  .portfolio-grid, .project-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .development-hero { grid-template-columns: minmax(0, 1.2fr) minmax(18rem, .8fr); }
}

@media (max-width: 430px) {
  .ops-metrics, .module-summary { grid-template-columns: 1fr 1fr; }
  .ops-metric { min-height: 108px; padding: 13px; }
  .ops-controls { grid-template-columns: 1fr auto; }
  .ops-controls .compact-action { font-size: .68rem; }
  .cash-row > div { grid-template-columns: 1fr; gap: 4px; }
  .development-hero-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
