/* DOVYR Operations 2.0 / Patch 02 — visual-only refinement.
 * Loaded AFTER operations-calendar-experience-v1.css.
 * No data, navigation, app shell, storage or JS behavior changes.
 */
.operations-shell.ops2-enabled {
  --ops2-cell-height: 74px;
  --ops2-cell-gap: 5px;
}

/* Tighten scale without sacrificing text legibility or the existing motion language. */
.operations-shell .ops2-view {
  max-width: 1440px;
  min-height: 0;
}
.operations-shell .ops2-heading {
  gap: 18px;
  margin: 9px 0 22px;
}
.operations-shell .ops2-heading h1 {
  font-size: clamp(28px, 2.4vw, 39px);
  margin: 7px 0 6px;
  line-height: 1.16;
}
.operations-shell .ops2-heading p { font-size: 12px; }
.operations-shell .ops2-controls select,
.operations-shell .ops2-action { height: 34px; }
.operations-shell .ops2-overview {
  padding-bottom: 18px;
  margin-bottom: 20px;
}
.operations-shell .ops2-overview > div { padding: 3px 19px; }
.operations-shell .ops2-overview > div:first-child { padding-left: 0; }
.operations-shell .ops2-overview span { font-size: 9px; margin-bottom: 9px; }
.operations-shell .ops2-overview strong {
  font-size: clamp(20px, 1.85vw, 26px);
  line-height: 1.18;
}
.operations-shell .ops2-calendar-top { padding: 16px 18px; }
.operations-shell .ops2-calendar-top h2 { font-size: 20px; margin-top: 5px; }
.operations-shell .ops2-month-nav button { padding: 7px 10px; }

/* One shared vertical rhythm: weekday header and summary header, then 1:1 rows. */
@media (min-width: 1151px) {
  .operations-shell .ops2-body { grid-template-columns: minmax(0, 1fr) 203px; }
  .operations-shell .ops2-grid-panel { padding: 16px 17px 18px; }
  .operations-shell .ops2-weekdays {
    height: 28px;
    margin-bottom: var(--ops2-cell-gap);
    align-items: center;
  }
  .operations-shell .ops2-weekdays span { padding: 0; }
  .operations-shell .ops2-calendar-grid {
    grid-auto-rows: var(--ops2-cell-height);
    gap: var(--ops2-cell-gap);
  }
  .operations-shell .ops2-date,
  .operations-shell .ops2-blank {
    height: var(--ops2-cell-height);
    min-height: 0;
  }
  .operations-shell .ops2-weeks {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 28px;
    grid-auto-rows: var(--ops2-cell-height);
    gap: var(--ops2-cell-gap);
    padding: 16px 13px 18px;
    align-content: start;
  }
  .operations-shell .ops2-aside-head {
    height: 28px;
    display: flex;
    align-items: center;
    padding: 0;
    border: 0;
  }
  .operations-shell .ops2-aside-head small { display: none; }
  .operations-shell .ops2-week {
    height: var(--ops2-cell-height);
    min-height: 0;
    margin: 0;
    padding: 5px 8px;
    border: 1px solid rgba(242,240,233,.075);
    border-radius: 6px;
    gap: 2px;
    justify-content: center;
    overflow: hidden;
  }
  .operations-shell .ops2-week > span { font-size: 9px; letter-spacing: .075em; line-height: 1.15; }
  .operations-shell .ops2-week > span small { margin-top: 2px; font-size: 9px; line-height: 1.15; }
  .operations-shell .ops2-week > strong {
    font-size: 12px;
    font-weight: 560;
    line-height: 1.2;
    letter-spacing: -.015em;
  }
  .operations-shell .ops2-week > small { font-size: 9px; line-height: 1.1; }
}

/* Same cell semantics; quiet fills instead of colored-only numbers. */
.operations-shell .ops2-weekdays,
.operations-shell .ops2-calendar-grid { gap: var(--ops2-cell-gap); }
.operations-shell .ops2-date {
  padding: 9px;
  gap: 4px;
  box-shadow: none;
  transition: background-color 65ms ease-out, border-color 65ms ease-out;
}
.operations-shell .ops2-date.ops2-positive {
  background: #1a3028;
  border-color: rgba(123, 185, 150, .35);
}
.operations-shell .ops2-date.ops2-negative {
  background: #352327;
  border-color: rgba(197, 120, 125, .36);
}
.operations-shell .ops2-date.ops2-zero {
  background: #22272a;
  border-color: rgba(170, 180, 185, .23);
}
.operations-shell .ops2-date.ops2-empty {
  background: #111517;
  border-color: rgba(242, 240, 233, .06);
}
.operations-shell .ops2-date.ops2-positive:hover,
.operations-shell .ops2-date.ops2-positive:focus-visible {
  background: #244336;
  border-color: rgba(150, 212, 175, .64);
}
.operations-shell .ops2-date.ops2-negative:hover,
.operations-shell .ops2-date.ops2-negative:focus-visible {
  background: #492c31;
  border-color: rgba(222, 149, 153, .66);
}
.operations-shell .ops2-date.ops2-zero:hover,
.operations-shell .ops2-date.ops2-zero:focus-visible { background: #30383b; }
.operations-shell .ops2-date.ops2-empty:hover,
.operations-shell .ops2-date.ops2-empty:focus-visible { background: #1b2023; }
.operations-shell .ops2-date:hover,
.operations-shell .ops2-date:focus-visible { transform: none; outline: none; }
.operations-shell .ops2-date:focus-visible { box-shadow: inset 0 0 0 1px rgba(216,255,62,.75); }
.operations-shell .ops2-date.is-selected { box-shadow: inset 0 0 0 1px rgba(216,255,62,.45); }
.operations-shell .ops2-date-number { font-size: 12px; }
.operations-shell .ops2-date-amount { font-size: 10px; line-height: 1.2; }
.operations-shell .ops2-date-foot { font-size: 9px; }
.operations-shell .ops2-key { gap: 14px; margin-top: 14px; }
.operations-shell .ops2-key span { font-size: 9px; }

/* On compact viewports the weekly totals sit below the calendar, not beside it. */
@media (max-width: 1150px) {
  .operations-shell .ops2-grid-panel { padding: 14px; }
  .operations-shell .ops2-calendar-grid { grid-auto-rows: 68px; }
  .operations-shell .ops2-date,
  .operations-shell .ops2-blank { min-height: 0; height: 68px; }
  .operations-shell .ops2-weeks {
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    grid-template-rows: auto;
    grid-auto-rows: auto;
    gap: 9px;
    padding: 13px 14px;
  }
  .operations-shell .ops2-aside-head {
    grid-column: 1/-1;
    min-height: 26px;
    height: auto;
    padding: 0 0 8px;
    border-bottom: 1px solid var(--ops2-border);
  }
  .operations-shell .ops2-week { height: auto; min-height: 69px; padding: 7px 8px; gap: 4px; }
  .operations-shell .ops2-week > strong { font-size: 12px; }
}
@media (max-width: 760px) {
  .operations-shell .ops2-heading { margin-bottom: 16px; }
  .operations-shell .ops2-heading h1 { font-size: 28px; }
  .operations-shell .ops2-overview { margin-bottom: 14px; }
  .operations-shell .ops2-calendar-top { padding: 13px; }
  .operations-shell .ops2-calendar-grid { grid-auto-rows: 62px; }
  .operations-shell .ops2-date,
  .operations-shell .ops2-blank { height: 62px; padding: 6px 5px; }
  .operations-shell .ops2-weeks { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .operations-shell .ops2-date-amount { font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  .operations-shell .ops2-date { transition: none; }
}
