/* DOVYR Operations 2.0 / Patch 03 — Day View + Trade Detail redesign.
 * Loaded after Patch 02. Calendar remains intact; styles focus on the day page and drawer.
 */
.operations-shell.ops2-enabled {
  --ops2-drawer-w: min(760px, calc(100vw - 26px));
}
.operations-shell .ops2-heading-day { align-items: flex-end; }
.operations-shell .ops2-day-overview {
  grid-template-columns: minmax(220px,1.4fr) repeat(4,minmax(145px,1fr));
}
.operations-shell .ops2-day-overview em {
  display:block;
  margin-top:8px;
  color:var(--ops2-muted);
  font-style:normal;
  font-size:11px;
  line-height:1.45;
}
.operations-shell .ops2-meter {
  margin-top:10px;
  width:100%;
  height:8px;
  border-radius:999px;
  background:rgba(255,255,255,.08);
  overflow:hidden;
}
.operations-shell .ops2-meter i {
  display:block;
  height:100%;
  border-radius:999px;
  background:linear-gradient(90deg, rgba(216,255,62,.88), rgba(216,255,62,.55));
}
.operations-shell .ops2-day-grid {
  display:grid;
  grid-template-columns: minmax(0,1.65fr) 330px;
  gap:14px;
  align-items:start;
}
.operations-shell .ops2-day-card {
  border:1px solid var(--ops2-border);
  border-radius:14px;
  background:#101417;
  overflow:hidden;
}
.operations-shell .ops2-day-card-head {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  padding:24px 24px 18px;
  border-bottom:1px solid rgba(242,240,233,.07);
}
.operations-shell .ops2-day-card-head h2 {
  margin:0;
  color:var(--ops2-text);
  font-size:19px;
  letter-spacing:-.03em;
  font-weight:560;
}
.operations-shell .ops2-day-card-head h2 small {
  font-size:12px;
  color:var(--ops2-muted);
  margin-left:10px;
  font-weight:430;
}
.operations-shell .ops2-day-card-head p {
  margin:8px 0 0;
  color:var(--ops2-muted);
  font-size:12px;
}
.operations-shell .ops2-card-actions {
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.operations-shell .ops2-mini-action { height:32px; padding:0 12px; font-size:12px; }
.operations-shell .ops2-day-table-head,
.operations-shell .ops2-trade-redesign {
  display:grid;
  grid-template-columns: minmax(230px,1.3fr) 102px 85px minmax(120px,.8fr) 90px minmax(120px,.9fr) 18px;
  gap:16px;
  align-items:center;
  padding:0 24px;
}
.operations-shell .ops2-day-table-head {
  min-height:44px;
  color:var(--ops2-muted);
  font-size:10px;
  letter-spacing:.08em;
  font-weight:670;
  border-bottom:1px solid rgba(242,240,233,.07);
}
.operations-shell .ops2-trades-list { display:flex; flex-direction:column; }
.operations-shell .ops2-trade-redesign {
  min-height:76px;
  width:100%;
  border:0;
  border-bottom:1px solid rgba(242,240,233,.06);
  background:transparent;
  color:#ced2d4;
  font-size:12px;
  cursor:pointer;
  text-align:left;
  transition: background-color 120ms ease, border-color 120ms ease;
}
.operations-shell .ops2-trade-redesign:last-child { border-bottom:0; }
.operations-shell .ops2-trade-redesign:hover,
.operations-shell .ops2-trade-redesign:focus-visible {
  outline:0;
  background:#171d20;
}
.operations-shell .ops2-trade-redesign.is-active {
  background:linear-gradient(90deg, rgba(216,255,62,.11), rgba(216,255,62,.02));
  box-shadow: inset 1px 0 0 rgba(216,255,62,.62);
}
.operations-shell .ops2-market-cell {
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
}
.operations-shell .ops2-market-avatar {
  flex:0 0 34px;
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
  border-radius:10px;
  background:linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.03));
  border:1px solid rgba(255,255,255,.08);
  font-size:16px;
  font-weight:650;
  line-height:1;
}
.operations-shell .ops2-market-meta {
  display:flex;
  flex-direction:column;
  gap:5px;
  min-width:0;
}
.operations-shell .ops2-market-meta strong {
  color:var(--ops2-text);
  font-size:14px;
  font-weight:600;
  line-height:1.1;
}
.operations-shell .ops2-market-meta small {
  color:var(--ops2-muted);
  font-size:11px;
  line-height:1.2;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.operations-shell .ops2-direction {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:72px;
  height:30px;
  padding:0 10px;
  border-radius:9px;
  font-size:11px;
  font-weight:650;
  border:1px solid transparent;
}
.operations-shell .ops2-direction-buy {
  color:#d6f3d9;
  background:#23422d;
  border-color:rgba(108,184,124,.36);
}
.operations-shell .ops2-direction-sell {
  color:#ffd7d8;
  background:#4a2327;
  border-color:rgba(213,113,119,.4);
}
.operations-shell .ops2-direction-flat {
  color:#d7dbdd;
  background:#23292d;
  border-color:rgba(255,255,255,.12);
}
.operations-shell .ops2-tag-pill {
  display:inline-flex;
  align-items:center;
  min-height:30px;
  padding:0 10px;
  border-radius:10px;
  background:#20262a;
  border:1px solid rgba(255,255,255,.08);
  color:#d6dbdc;
  font-size:11px;
  font-weight:530;
}
.operations-shell .ops2-open-arrow {
  color:#9da5a9;
  font-size:20px;
  text-align:right;
}
.operations-shell .ops2-context-card .ops2-day-card-head { padding-bottom:14px; }
.operations-shell .ops2-context-block {
  padding:18px 22px;
  border-top:1px solid rgba(242,240,233,.07);
}
.operations-shell .ops2-context-block:first-of-type { border-top:0; }
.operations-shell .ops2-context-block > span {
  display:block;
  color:#b8bebf;
  font-size:10px;
  font-weight:700;
  letter-spacing:.11em;
  margin-bottom:12px;
}
.operations-shell .ops2-context-block p {
  margin:0;
  color:#dde1e2;
  font-size:12px;
  line-height:1.65;
}
.operations-shell .ops2-chip-row {
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.operations-shell .ops2-chip-row em {
  color:var(--ops2-muted);
  font-style:normal;
  font-size:12px;
}
.operations-shell .ops2-chip {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:32px;
  padding:0 12px;
  border-radius:999px;
  background:rgba(216,255,62,.16);
  color:#d8ff3e;
  border:1px solid rgba(216,255,62,.22);
  font-size:12px;
  font-weight:650;
}
.operations-shell .ops2-chip.ops2-chip-muted {
  background:#1c2327;
  color:#d5d9db;
  border-color:rgba(255,255,255,.1);
}

/* Drawer redesign */
.operations-shell .ops2-drawer-panel {
  width:var(--ops2-drawer-w);
  border-radius:16px;
  background:linear-gradient(180deg, rgba(17,22,25,.98), rgba(15,20,23,.99));
  border-color:rgba(242,240,233,.13);
}
.operations-shell .ops2-drawer-content { padding:18px 18px 16px; }
.operations-shell .ops2-drawer-close {
  top:16px;
  right:16px;
  width:32px;
  height:32px;
  border-radius:9px;
  background:#171d21;
}
.operations-shell .ops2-drawer .trade-detail {
  padding:4px 0 0 !important;
}
.operations-shell .ops2-drawer .detail-head {
  margin-bottom:6px;
  padding-right:52px;
}
.operations-shell .ops2-drawer .detail-head-title span {
  color:#b8bebf;
  font-size:10px !important;
  letter-spacing:.14em;
}
.operations-shell .ops2-drawer .detail-head small {
  font-size:10px !important;
}
.operations-shell .ops2-drawer .detail-head-actions {
  gap:8px;
}
.operations-shell .ops2-drawer .detail-head-actions .edit-trade-operation,
.operations-shell .ops2-drawer .detail-head-actions .expand-detail {
  height:34px;
  padding:0 12px;
  border-radius:9px;
  font-size:12px;
  font-weight:640;
}
.operations-shell .ops2-drawer .detail-head-actions .edit-trade-operation {
  border:1px solid rgba(255,255,255,.12);
  background:#171d21;
  color:#f2f0e9;
}
.operations-shell .ops2-drawer .detail-head-actions .expand-detail {
  border-color:rgba(216,255,62,.22);
  background:rgba(216,255,62,.05);
}
.operations-shell .ops2-drawer .detail-title {
  margin:14px 0 14px;
  align-items:flex-start;
  gap:12px;
}
.operations-shell .ops2-drawer .detail-title h2 {
  font-size:33px !important;
  line-height:1.02;
  letter-spacing:-.04em;
}
.operations-shell .ops2-drawer .detail-title h2 span {
  display:block;
  margin:10px 0 0;
  font-size:16px !important;
  font-weight:560;
  color:var(--ops2-text);
}
.operations-shell .ops2-drawer .detail-title p {
  margin-top:10px;
  font-size:13px !important;
}
.operations-shell .ops2-drawer .win-pill {
  min-width:110px;
  height:38px;
  padding:0 14px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:11px;
  font-size:13px;
  font-weight:700;
}
.operations-shell .ops2-drawer .detail-tags {
  margin-bottom:14px;
  gap:8px;
}
.operations-shell .ops2-drawer .detail-tags span,
.operations-shell .ops2-drawer .detail-tags button {
  height:32px;
  padding:0 11px;
  border-radius:10px;
  font-size:11px;
}
.operations-shell .ops2-drawer .trade-chart {
  height:320px !important;
  border-radius:12px;
  border-color:rgba(255,255,255,.1);
  background:#060a0d;
}
.operations-shell .ops2-drawer .upload-chart,
.operations-shell .ops2-drawer .upload-chart.replace {
  height:32px;
  font-size:11px;
  border-radius:8px;
}
.operations-shell .ops2-drawer .detail-tabs {
  margin-top:16px;
  gap:18px;
  height:42px;
}
.operations-shell .ops2-drawer .detail-tabs button {
  font-size:11px !important;
}
.operations-shell .ops2-drawer .detail-tab-pane { padding-top:16px; }
.operations-shell .ops2-drawer .trade-note-text,
.operations-shell .ops2-drawer .setup-context p,
.operations-shell .ops2-drawer .detail-notes p {
  font-size:13px !important;
  line-height:1.72;
  color:#dde2e3;
}
.operations-shell .ops2-drawer .detail-two {
  gap:10px;
  margin:12px 0 10px;
}
.operations-shell .ops2-drawer .detail-two section {
  border-radius:10px;
  padding:12px;
}
.operations-shell .ops2-drawer .detail-two span,
.operations-shell .ops2-drawer .setup-context > span {
  font-size:10px !important;
  letter-spacing:.1em;
}
.operations-shell .ops2-drawer .detail-two strong {
  font-size:12px;
  line-height:1.5;
}
.operations-shell .ops2-drawer .setup-context {
  padding-top:8px;
}

@media (max-width: 1280px) {
  .operations-shell .ops2-day-grid { grid-template-columns: minmax(0,1fr); }
  .operations-shell .ops2-context-card { order:2; }
  .operations-shell .ops2-day-overview { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .operations-shell .ops2-day-overview > div:first-child { grid-column:1/-1; border-bottom:1px solid var(--ops2-border); padding-bottom:14px; }
}
@media (max-width: 960px) {
  .operations-shell .ops2-day-card-head {
    flex-direction:column;
    align-items:flex-start;
  }
  .operations-shell .ops2-card-actions { justify-content:flex-start; }
  .operations-shell .ops2-day-table-head,
  .operations-shell .ops2-trade-redesign {
    min-width:860px;
  }
  .operations-shell .ops2-trades-card { overflow-x:auto; }
  .operations-shell .ops2-day-overview { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .operations-shell .ops2-day-overview { grid-template-columns: 1fr; }
  .operations-shell .ops2-day-overview > div { border-left:0; padding:10px 0; }
  .operations-shell .ops2-day-overview > div + div { border-top:1px solid var(--ops2-border); }
  .operations-shell .ops2-drawer-panel { inset:8px 8px 8px auto; width:calc(100vw - 16px); }
  .operations-shell .ops2-drawer .detail-title h2 { font-size:27px !important; }
  .operations-shell .ops2-drawer .trade-chart { height:250px !important; }
}
@media (prefers-reduced-motion: reduce) {
  .operations-shell .ops2-trade-redesign,
  .operations-shell .ops2-drawer-panel { transition:none !important; }
}
