/* Admin operations: Today, Orders, Jobs, Bookings, Business, Team (admin-ops.js) */
.aop { min-width: 0; }
.aop-body { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.aop-note { margin: 0; font-size: 0.76rem; color: var(--muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; line-height: 1.5; }
.aop-day { margin-top: 2px; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }

/* sidebar count on Today */
.modal-tab .aop-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--red); color: #fff; font-size: 0.7rem; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; line-height: 1; }

/* Spotlight live line */
.aop-spot { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border-radius: 14px; border: 1px solid rgba(244,176,0,0.35); background: rgba(244,176,0,0.08); color: var(--text-1); font: inherit; text-align: left; cursor: pointer; }
.aop-spot svg { color: #f4b000; flex: none; }
.aop-spot span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.aop-spot b { font-size: 0.88rem; overflow-wrap: anywhere; }
.aop-spot small { font-size: 0.76rem; color: var(--muted); }

/* groups of things waiting */
.aop-group { display: flex; flex-direction: column; gap: 8px; }
.aop-group h4 { margin: 6px 0 0; display: flex; align-items: center; gap: 8px; font-size: 0.8rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-2, var(--muted)); }
.aop-group.is-urgent h4 { color: #ff6b75; }
.aop-group.is-soon h4 { color: #f4b000; }
.aop-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 8px; }
.aop-item { display: flex; align-items: center; gap: 12px; width: 100%; min-width: 0; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--border); background: var(--card); color: var(--text-1); font: inherit; text-align: left; cursor: pointer; transition: border-color .15s, transform .15s; }
.aop-item:hover { border-color: var(--red); }
.aop-item:active { transform: scale(0.99); }
.aop-n { flex: none; min-width: 38px; height: 38px; padding: 0 8px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1rem; background: rgba(255,255,255,0.06); }
.is-urgent .aop-n { background: rgba(230,57,70,0.16); color: #ff6b75; }
.is-soon .aop-n { background: rgba(244,176,0,0.14); color: #f4b000; }
.aop-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.aop-txt b { font-size: 0.88rem; font-weight: 700; overflow-wrap: anywhere; }
.aop-txt small { font-size: 0.75rem; color: var(--muted); line-height: 1.45; }
.aop-arrow { flex: none; font-size: 1.3rem; color: var(--muted); line-height: 1; }
.aop-signals { margin: 0; padding: 12px 14px 12px 30px; border-radius: 14px; border: 1px solid rgba(230,57,70,0.3); background: rgba(230,57,70,0.06); display: flex; flex-direction: column; gap: 6px; font-size: 0.84rem; line-height: 1.5; overflow-wrap: anywhere; }
.aop-clear { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 30px 16px; text-align: center; border-radius: 16px; border: 1px dashed var(--border); }
.aop-clear svg { color: #3ccf82; }
.aop-clear b { font-size: 1rem; }
.aop-clear span { font-size: 0.82rem; color: var(--muted); max-width: 420px; line-height: 1.5; }
.aop-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 0.76rem; color: var(--muted); }

/* blocked addresses */
.aop-sup { border: 1px solid var(--border); border-radius: 14px; background: var(--card); }
.aop-sup > summary { list-style: none; cursor: pointer; padding: 12px 14px; display: flex; align-items: center; gap: 8px; font-size: 0.84rem; font-weight: 600; }
.aop-sup > summary::-webkit-details-marker { display: none; }
.aop-sup > summary::after { content: '›'; margin-left: auto; transition: transform .2s; color: var(--muted); font-size: 1.2rem; }
.aop-sup[open] > summary::after { transform: rotate(90deg); }
.aop-sup > div { padding: 0 14px 14px; display: flex; flex-direction: column; gap: 8px; }
.aop-suplist, .aop-team { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.aop-suplist li, .aop-team li { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,0.03); border: 1px solid var(--border); }
.aop-suplist li > span:first-child, .aop-team li > span:first-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 220px; }
.aop-suplist b, .aop-team b { font-size: 0.86rem; overflow-wrap: anywhere; }
.aop-suplist small, .aop-team small { font-size: 0.74rem; color: var(--muted); overflow-wrap: anywhere; }

/* search and filters */
.aop-tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.aop-search { position: relative; flex: 1 1 260px; min-width: 0; display: flex; }
.aop-search > :first-child:not(input) { position: absolute; z-index: 1; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.aop-search .adm-input { padding-left: 36px; }
.aop-range { max-width: 220px; }
.aop-seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 12px; border: 1px solid var(--border); background: var(--card); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.aop-seg::-webkit-scrollbar { display: none; }
.aop-seg button { flex: none; border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 0.8rem; font-weight: 600; padding: 7px 12px; border-radius: 9px; cursor: pointer; white-space: nowrap; }
.aop-seg button.on { background: var(--red); color: #fff; }

/* cards: orders, jobs, bookings */
.aop-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 10px; }
.aop-card { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 14px 16px; border-radius: 16px; background: var(--card); border: 1px solid var(--border); }
.aop-card.is-flag { border-color: rgba(230,57,70,0.45); box-shadow: inset 3px 0 0 rgba(230,57,70,0.8); }
.aop-card header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.aop-card header > div:first-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.aop-card header b { font-size: 0.92rem; overflow-wrap: anywhere; }
.aop-card header small { font-size: 0.74rem; color: var(--muted); overflow-wrap: anywhere; line-height: 1.45; }
.aop-tags { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; flex: none; max-width: 50%; }
.aop-card .adm-tag { white-space: nowrap; background: rgba(255,255,255,0.06); }
.aop-card .adm-tag.good { background: rgba(31,163,91,0.14); }
.aop-card .adm-tag.warn { background: rgba(244,176,0,0.14); }
.aop-line { margin: 0; display: flex; gap: 8px; align-items: flex-start; font-size: 0.83rem; line-height: 1.45; }
.aop-line svg { flex: none; margin-top: 2px; color: var(--muted); }
.aop-line span { min-width: 0; overflow-wrap: anywhere; }
.aop-meta { margin: 0; font-size: 0.74rem; color: var(--muted); line-height: 1.5; overflow-wrap: anywhere; }
.aop-why { margin: 0; display: flex; gap: 8px; padding: 8px 10px; border-radius: 10px; background: rgba(230,57,70,0.08); color: #ff8a92; font-size: 0.8rem; line-height: 1.45; }
.aop-why svg { flex: none; margin-top: 2px; }
.aop-reports, .aop-pays { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 0.8rem; }
.aop-reports li { padding: 6px 10px; border-radius: 8px; background: rgba(255,255,255,0.03); overflow-wrap: anywhere; }
.aop-reports small, .aop-pays small { color: var(--muted); font-size: 0.72rem; }
.aop-pays li { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.aop-desc > summary, .aop-tix > summary { cursor: pointer; font-size: 0.8rem; font-weight: 600; color: var(--text-2, var(--muted)); }
.aop-desc p { margin: 8px 0 0; font-size: 0.82rem; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 240px; overflow: auto; }
.aop-tix ul { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.aop-tix li { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 0.8rem; padding: 6px 0; border-top: 1px solid var(--border); }
.aop-tix li .adm-btn, .aop-actions .adm-btn { padding: 6px 12px; font-size: 0.78rem; }
.aop-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.aop-card > .aop-actions { margin-top: 2px; padding-top: 10px; border-top: 1px solid var(--border); }
.adm-btn.is-sure { background: #8f0c22; border-color: #8f0c22; color: #fff; }

/* business */
.aop-bars { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 14px; }
.aop-bar { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 0.78rem; }
.aop-bar-l { color: var(--muted); white-space: nowrap; }
.aop-bar-t, .aop-step-t { height: 10px; border-radius: 999px; background: rgba(255,255,255,0.06); overflow: hidden; }
.aop-bar-t i, .aop-step-t i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--red), #ff5a6e); }
.aop-bar b { font-variant-numeric: tabular-nums; }
.aop-funnel { display: flex; flex-direction: column; gap: 12px; margin: 6px 0 10px; }
.aop-step { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: baseline; }
.aop-step-t { grid-column: 1 / -1; height: 12px; }
.aop-step-l { font-size: 0.82rem; }
.aop-step b { font-size: 1rem; font-variant-numeric: tabular-nums; }
.aop-step small { grid-column: 1 / -1; font-size: 0.72rem; color: var(--muted); }
.aop-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 0 12px; }
.aop-two .adm-stats { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); margin-top: 8px; }

/* team */
.aop-teamform { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 8px; margin-top: 12px; }
.aop-teamform .adm-btn { justify-content: center; }
.aop-pw { max-width: none; font-size: 1.2rem; padding: 14px; border-radius: 12px; background: rgba(255,255,255,0.05); user-select: all; overflow-wrap: anywhere; }

@media (max-width: 640px) {
  .aop-card { padding: 12px 13px; }
  .aop-card header { flex-direction: column; }
  .aop-tags { justify-content: flex-start; max-width: none; }
  .aop-bar { grid-template-columns: 64px minmax(0, 1fr) auto; gap: 8px; }
  .aop-range { max-width: none; width: 100%; }
}

/* light theme */
[data-theme="light"] .aop-n, [data-theme="light"] .aop-bar-t, [data-theme="light"] .aop-step-t, [data-theme="light"] .aop-card .adm-tag { background: rgba(0,0,0,0.06); }
[data-theme="light"] .aop-suplist li, [data-theme="light"] .aop-team li, [data-theme="light"] .aop-reports li { background: rgba(0,0,0,0.03); }
[data-theme="light"] .aop-why { color: #b4232f; }
