/* Bomma's command center (operations hub). On-brand with the site; built to the
   house ops rules: filtered, searchable, paginated lists, clickable rows to a
   detail screen, collapsed add forms, no dead-end stat tiles, fits the phone. */

body[data-bomma-ops] { background: linear-gradient(165deg, var(--lavender), var(--cream) 55%, var(--mint-mist)); min-height: 100vh; }
.cc-wrap { width: min(1000px, 100% - 28px); margin-inline: auto; }
[hidden] { display: none !important; }

/* login */
.cc-login { width: min(440px, 100% - 32px); margin: min(12vh, 110px) auto 0; }
.cc-login .cc-logo { display: block; height: 64px; width: auto; margin: 0 auto 22px; mix-blend-mode: multiply; }
.cc-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(24px, 5vw, 40px); box-shadow: 0 40px 80px -56px rgba(92,10,135,0.5); }
.cc-card h1 { font-size: clamp(1.9rem, 5vw, 2.6rem); text-align: center; }
.cc-card .cc-sub { text-align: center; color: var(--ink-soft); margin: 8px 0 24px; }
.cc-login input { width: 100%; padding: 13px 15px; border: 1px solid var(--line); border-radius: 12px; font: inherit; background: var(--cream); margin-bottom: 14px; }
.cc-login input:focus { outline: 2px solid var(--plum); border-color: transparent; }
.cc-note { text-align: center; color: var(--ink-soft); font-size: 0.88rem; margin-top: 14px; min-height: 1.1em; }
.cc-note.bad { color: #b0005a; }

/* top bar + tabs */
.cc-top { position: sticky; top: 0; z-index: 20; background: #fff; border-bottom: 1px solid var(--line); }
.cc-top .cc-wrap { display: flex; align-items: center; gap: 14px; padding: 12px 0; }
.cc-top .cc-brand { font-family: "Cormorant Garamond", serif; font-size: 1.5rem; color: var(--plum); font-weight: 600; margin-right: auto; }
.cc-top a, .cc-top button { color: var(--ink-soft); font: inherit; font-size: 0.9rem; background: none; border: 0; cursor: pointer; text-decoration: none; }
.cc-top a:hover, .cc-top button:hover { color: var(--plum); }
.cc-tabs { position: sticky; top: 49px; z-index: 19; background: var(--lavender); border-bottom: 1px solid var(--line); }
.cc-tabs .cc-wrap { display: flex; gap: 4px; overflow-x: auto; }
.cc-tab { padding: 12px 16px; border: 0; background: none; font: inherit; color: var(--ink-soft); cursor: pointer; white-space: nowrap; border-bottom: 2px solid transparent; }
.cc-tab.on { color: var(--plum); border-bottom-color: var(--plum); font-weight: 600; }

.cc-main { padding: 20px 0 80px; }

/* toolbar */
.cc-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.cc-toolbar .cc-search { flex: 1 1 200px; min-width: 0; }
.cc-toolbar input[type=search], .cc-toolbar input[type=text], .cc-select, .cc-field input, .cc-field select, .cc-field textarea {
  width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; background: #fff; color: var(--ink);
}
.cc-select { width: auto; background: #fff; }
.cc-toolbar input:focus, .cc-select:focus, .cc-field input:focus, .cc-field select:focus, .cc-field textarea:focus { outline: 2px solid var(--plum); border-color: transparent; }
.cc-checkline { display: inline-flex; align-items: center; gap: 6px; font-size: 0.88rem; color: var(--ink-soft); white-space: nowrap; }

/* collapsed add */
details.cc-add { border: 1px dashed var(--plum); border-radius: 12px; background: #fff; margin-bottom: 14px; }
details.cc-add > summary { list-style: none; cursor: pointer; padding: 11px 15px; color: var(--plum); font-weight: 600; }
details.cc-add > summary::-webkit-details-marker { display: none; }
details.cc-add > summary::before { content: "+ "; }
details.cc-add[open] > summary::before { content: "\2212 "; }
details.cc-add .cc-addbody { padding: 0 15px 15px; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
details.cc-add .cc-addbody .cc-full { grid-column: 1 / -1; }

/* list */
.cc-list { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.cc-row { display: flex; align-items: center; gap: 12px; padding: 13px 15px; border-top: 1px solid var(--line); cursor: pointer; text-align: left; width: 100%; background: none; font: inherit; color: var(--ink); }
.cc-row:first-child { border-top: 0; }
.cc-row:hover { background: var(--lavender); }
.cc-row .cc-rmain { min-width: 0; flex: 1; }
.cc-row .cc-rname { font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-row .cc-rmeta { font-size: 0.84rem; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-row .cc-rright { text-align: right; white-space: nowrap; flex-shrink: 0; }
.cc-amt { font-variant-numeric: tabular-nums; }
.cc-amt.in { color: #1a7f54; }
.cc-amt.out { color: #b0005a; }
.cc-owe { color: #b0005a; font-size: 0.86rem; }
.cc-sub2 { font-size: 0.78rem; color: var(--ink-soft); }

/* status chip */
.cc-chip { display: inline-block; font-size: 0.72rem; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--lilac); color: var(--plum); white-space: nowrap; }
.cc-chip[data-s="New"] { background: #e6fbf4; color: #1a7f54; }
.cc-chip[data-s="Quoted"] { background: #fff2cc; color: #8a6d00; }
.cc-chip[data-s="Deposit paid"] { background: #e4d4f1; color: var(--plum); }
.cc-chip[data-s="In progress"] { background: #dbe8ff; color: #2a52b0; }
.cc-chip[data-s="Ready"] { background: #d6f5e8; color: #1a7f54; }
.cc-chip[data-s="Delivered"] { background: #ededed; color: #666; }
.cc-chip.arch { background: #ededed; color: #999; }

.cc-empty { padding: 34px 16px; text-align: center; color: var(--ink-soft); }
.cc-pager { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 14px; color: var(--ink-soft); font-size: 0.88rem; }
.cc-pager button { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 6px 12px; cursor: pointer; font: inherit; color: var(--plum); }
.cc-pager button:disabled { opacity: 0.4; cursor: default; }

/* ledger summary (meaningful totals, not decorative) */
.cc-sum { display: flex; flex-wrap: wrap; gap: 10px 22px; padding: 14px 16px; background: #fff; border: 1px solid var(--line); border-radius: 14px; margin-bottom: 14px; }
.cc-sum .cc-sitem { display: flex; flex-direction: column; }
.cc-sum .cc-slabel { font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }
.cc-sum .cc-sval { font-size: 1.3rem; font-variant-numeric: tabular-nums; color: var(--plum); }
.cc-sum .cc-sval.owe { color: #b0005a; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* detail screen */
.cc-detail { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: clamp(16px, 4vw, 26px); }
.cc-back { background: none; border: 0; color: var(--plum); font: inherit; cursor: pointer; padding: 0 0 12px; }
.cc-detail h2 { color: var(--plum); font-size: 1.6rem; margin-bottom: 14px; }
.cc-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.cc-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cc-field.cc-full { grid-column: 1 / -1; }
.cc-field label { font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-soft); }
.cc-field textarea { min-height: 84px; resize: vertical; }
.cc-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.cc-btn { padding: 10px 18px; border-radius: 999px; border: 0; font: inherit; font-weight: 600; cursor: pointer; background: var(--lavender); color: var(--plum); }
.cc-btn.primary { background: var(--plum); color: #fff; }
.cc-btn.primary:hover { background: #4a0075; }
.cc-btn.ghost { background: #fff; border: 1px solid var(--line); color: var(--ink-soft); }
.cc-btn.danger { background: #fff; border: 1px solid #e0a9c4; color: #b0005a; margin-left: auto; }
.cc-btn:disabled { opacity: 0.55; cursor: default; }
.cc-paylist { margin-top: 8px; border-top: 1px solid var(--line); }
.cc-paylist .cc-row { cursor: default; }
.cc-paylist .cc-row:hover { background: none; }

/* website tiles */
.cc-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.cc-tile { display: block; text-decoration: none; padding: 24px 18px; border: 1px solid var(--line); border-radius: 16px; background: #fff; color: var(--plum); text-align: center; }
.cc-tile:hover { background: var(--lavender); }
.cc-tile strong { font-family: "Cormorant Garamond", serif; font-size: 1.4rem; display: block; }
.cc-tile span { font-size: 0.82rem; color: var(--ink-soft); }

/* a quiet toast */
.cc-toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 0.9rem; z-index: 50; opacity: 0; transition: opacity 0.2s; pointer-events: none; }
.cc-toast.show { opacity: 1; }

@media (max-width: 560px) {
  .cc-top .cc-brand { font-size: 1.25rem; }
  .cc-sum { gap: 10px 16px; }
}
