/* Control Center additions on top of axis.css (copied from the suite design system). */
:root { --module: #4338ca; --primary: #4338ca; --primary-600: #3730a3; --primary-50: #eef0fd; }
body.cc { background: #f4f5f9; }

/* Top bar */
.brand-mark { width: 26px; height: 26px; border-radius: 7px; background: var(--module); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.brand-sub { font-weight: 500; color: var(--muted); }
.uname { display: flex; flex-direction: column; line-height: 1.15; text-align: left; font-weight: 600; }
.urole { font-size: 11px; color: var(--muted); font-weight: 500; }
.menu-btn { display: flex; gap: 10px; align-items: center; padding: 8px 12px; border-radius: 7px; color: var(--text); width: 100%; border: 0; background: none; font: inherit; cursor: pointer; }
.menu-btn:hover { background: var(--gray-50); }
.sidebar-foot { line-height: 1.5; }

/* Generic */
.tone-red { color: var(--red) !important; } .tone-green { color: var(--green); }
.stat-value.tone-red { color: var(--red); }
.strong { font-weight: 650; }
.prewrap { white-space: pre-wrap; }
.break { word-break: break-word; overflow-wrap: anywhere; }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
ul.plain { list-style: none; margin: 0; padding: 0; } ul.plain li { padding: 7px 0; border-bottom: 1px solid var(--border); } ul.plain li:last-child { border-bottom: 0; }
.card-head.pad { padding: 14px 16px 0; margin-bottom: 10px; }
.card.flush .table { border-top: 1px solid var(--border); }
.small-empty { padding: 22px 16px; } .small-empty .ic { color: var(--green); }
.inline-flex { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline-flex select { width: auto; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.chip:hover { text-decoration: none; border-color: var(--module); }
.toolbar .field { margin: 0; }
.attention { border-left: 4px solid var(--red); }
.grid-3 > .span-2-lg { grid-column: span 2; }
@media (max-width: 1100px) { .grid-3 > .span-2-lg { grid-column: auto; } }
.page-sub-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.page-sub-head p { margin: 0; }
.tab-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--red); vertical-align: middle; margin-left: 4px; }
.tab-count { background: var(--module); color: #fff; font-size: 11px; border-radius: 9px; padding: 0 6px; margin-left: 4px; }
.big-num { font-size: 30px; font-weight: 750; letter-spacing: -.02em; }
.sticky-actions { position: sticky; bottom: 0; background: var(--bg); padding-bottom: 10px; }

/* Quick links */
.quick-links { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.quick-links a { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; color: var(--text); font-weight: 550; font-size: 13px; }
.quick-links a:hover { border-color: var(--module); text-decoration: none; background: var(--primary-50); }
.quick-links .ic { color: var(--module); }

/* Feature pills (list + plans) */
.feat-dots { display: flex; flex-wrap: wrap; gap: 4px; }
.fdot { font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); background: #fff; white-space: nowrap; }
.fdot-active { background: var(--green-50); border-color: #bfe5cd; color: var(--green); }
.fdot-trial { background: var(--blue-50); border-color: #c7d6fb; color: var(--blue); }
.fdot-suspended { background: var(--red-50); border-color: #f3c2c2; color: var(--red); }
.fdot-inactive, .fdot-unlicensed { color: #9aa3ad; border-style: dashed; }

/* Org overview */
.feature-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 1250px) { .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.feature-tile { border: 1px solid var(--border); border-radius: 9px; padding: 10px 12px; background: var(--surface-2); }
.feature-tile.ft-active { background: #fff; border-color: #bfe5cd; box-shadow: inset 3px 0 0 var(--green); }
.feature-tile.ft-trial { background: #fff; border-color: #c7d6fb; box-shadow: inset 3px 0 0 var(--blue); }
.feature-tile.ft-suspended { border-color: #f3c2c2; box-shadow: inset 3px 0 0 var(--red); }
.ft-name { font-weight: 700; } .ft-desc { min-height: 18px; } .ft-status { margin-top: 6px; }
.feature-tile.ft-unlicensed .ft-name, .feature-tile.ft-inactive .ft-name { color: var(--muted); }
.enter-card h2 { display: flex; align-items: center; gap: 8px; }
.enter-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.enter-grid form { margin: 0; }
.enter-btn { width: 100%; display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 9px; background: #fff; cursor: pointer; font: 600 13.5px var(--font); color: var(--text); }
.enter-btn:hover { border-color: var(--c); background: color-mix(in srgb, var(--c) 7%, #fff); }
.enter-btn .ic { margin-left: auto; color: var(--muted); }
.enter-dot { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.status-form .field { margin-bottom: 8px; }

/* Licenses */
.plan-bar { padding: 12px 16px; }
.plan-form { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.plan-form select { width: auto; max-width: 440px; }
.plan-form .check { margin: 0; }
.plan-title { display: flex; align-items: center; gap: 8px; margin-right: auto; }
.plan-title .ic { color: var(--module); }
.lic-table td, .lic-table th { vertical-align: top; padding-left: 8px; padding-right: 8px; } .lic-table select, .lic-table input { min-height: 32px; padding: 5px 7px; }
.lic-table td:first-child { min-width: 150px; } .lic-table td:first-child b { white-space: nowrap; }
.lic-table td:last-child { min-width: 104px; }
.lic-table input[type=date] { width: 130px; } .lic-table .lic-status { width: 122px; }
.lic-table .w-num { width: 64px !important; } .lic-table .w-money { width: 88px !important; }
.w-num { width: 74px !important; } .w-money { width: 96px !important; } .w-metric { width: 110px !important; }
.dep-row td:first-child { padding-left: 26px; position: relative; }
.dep-row td:first-child::before { content: "↳"; position: absolute; left: 10px; top: 10px; color: var(--muted); }
.lic-foot { display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.lic-foot p { margin: 0; max-width: 820px; }
.matrix td, .matrix th { white-space: nowrap; }
.matrix tfoot th { background: var(--surface-2); text-transform: none; letter-spacing: 0; font-weight: 600; }

/* Credentials */
.codebox { border: 1px solid var(--border); border-radius: 9px; background: #0f172a; color: #e2e8f0; margin-bottom: 12px; overflow: hidden; }
.codebox-head { display: flex; justify-content: space-between; align-items: center; padding: 4px 6px 4px 12px; background: #1e293b; font-size: 12px; color: #94a3b8; }
.codebox-head .btn { color: #cbd5e1; height: 26px; }
.codebox-head .btn:hover { background: #334155; }
.codebox pre { margin: 0; padding: 12px 14px; overflow-x: auto; font-size: 12.5px; line-height: 1.55; white-space: pre; }
.secret-alert { border-left: 4px solid var(--amber); }
.kv-table td:first-child { width: 190px; color: var(--muted); }

/* Charts */
.chart-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; margin-bottom: 16px; }
.mini-chart { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px 8px; box-shadow: var(--shadow); }
.mini-chart-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.mini-chart-title { font-size: 12px; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.mini-chart-value { font-size: 20px; font-weight: 700; }
.mini-chart-empty { height: 110px; display: flex; align-items: center; justify-content: center; }
svg.chart .grid { stroke: #e9ecf1; stroke-width: 1; }
svg.chart .axis { fill: #7b8591; font-size: 10.5px; font-family: var(--font); }
svg.chart .line { fill: none; stroke: var(--module); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
svg.chart .dot { fill: var(--module); stroke: #fff; stroke-width: 2; }
svg.chart .hit { fill: transparent; }
svg.chart .pt:hover .dot { r: 5.5; }
svg.chart .pt:hover .hit { fill: rgba(67, 56, 202, .06); }

/* Horizontal bars (AR aging, MRR by feature) */
.hbars { display: flex; flex-direction: column; gap: 8px; }
.hbar-row { display: grid; grid-template-columns: 130px 1fr 90px; gap: 10px; align-items: center; font-size: 13px; }
.hbar-label { color: var(--text-2); }
.hbar-track { height: 12px; background: var(--gray-50); border-radius: 4px; overflow: hidden; }
.hbar { display: block; height: 100%; background: var(--module); border-radius: 0 4px 4px 0; min-width: 0; }
.hbar-late { background: var(--red); }
.hbar-val { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }

/* Plans */
.plan-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; align-content: start; }
.plan-card { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.plan-card .card-head { margin-bottom: 0; align-items: flex-start; }
.plan-price { font-size: 20px; font-weight: 750; }
.plan-foot { margin-top: auto; padding-top: 8px; border-top: 1px solid var(--border); }
.muted-card { opacity: .6; }
.check-list { display: flex; flex-direction: column; }
.check-list .check { margin: 3px 0; }
.gen-card { padding: 12px 16px; } .gen-card.highlight { border-color: var(--module); box-shadow: 0 0 0 3px var(--primary-50); }

/* Price book */
.pb-table td { vertical-align: middle; }
.pb-table .group-row th { background: #fff; text-align: center; border-bottom: 0; padding-bottom: 0; color: var(--module); }
.money-input { display: flex; align-items: center; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: #fff; width: 104px; }
.money-input span { padding: 0 0 0 8px; color: var(--muted); }
.money-input input { border: 0 !important; box-shadow: none !important; padding-left: 4px; min-height: 32px; }
.perm-table td, .perm-table th { padding: 5px 8px; }

/* Invoice document */
.doc-card { padding: 34px 38px; }
.invoice-doc { max-width: 820px; }
.inv-head { display: flex; justify-content: space-between; gap: 20px; padding-bottom: 20px; border-bottom: 2px solid var(--text); margin-bottom: 20px; }
.inv-brand { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 750; margin-bottom: 6px; }
.inv-title { font-size: 26px; font-weight: 800; letter-spacing: -.02em; text-transform: uppercase; }
.inv-stamp { display: inline-block; margin-top: 8px; padding: 2px 10px; border: 2px solid; border-radius: 6px; font-weight: 800; font-size: 12px; letter-spacing: .08em; }
.stamp-draft { color: var(--muted); } .stamp-paid { color: var(--green); } .stamp-overdue { color: var(--red); } .stamp-void { color: var(--muted); text-decoration: line-through; }
.stamp-sent, .stamp-partial { color: var(--amber); }
.inv-meta { display: flex; justify-content: space-between; gap: 30px; margin-bottom: 22px; line-height: 1.6; }
.inv-k { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 2px; }
.inv-kv { grid-template-columns: 110px auto; }
.inv-lines { margin-bottom: 18px; }
.inv-lines tfoot td { border-bottom: 0; padding: 5px 12px; }
.inv-lines tfoot tr:first-child td { border-top: 1px solid var(--border); padding-top: 10px; }
.inv-total td { font-weight: 800; font-size: 15px; }
.inv-foot { border-top: 1px solid var(--border); padding-top: 12px; }
.print-doc .bare-main { justify-content: flex-start; background: #fff; }
.print-doc .invoice-doc { width: 100%; background: #fff; padding: 40px; border: 1px solid var(--border); border-radius: 8px; }
.print-bar { display: flex; gap: 8px; justify-content: flex-end; width: 100%; max-width: 820px; margin-bottom: 12px; }
@media print {
  .print-doc .invoice-doc { border: 0; padding: 0; }
  .print-doc .bare-main { padding: 0; }
  .no-print { display: none !important; }
}

/* Auth pages */
.auth-card h2 { margin-top: 4px; }
.auth-logo .brand-mark { width: 30px; height: 30px; }

@media (max-width: 760px) { .enter-grid, .quick-links { grid-template-columns: 1fr; } .lic-foot { flex-direction: column; align-items: stretch; } }

.org-table td:first-child { min-width: 220px; }

/* Agreements & e-signatures */
.agreement-text { line-height: 1.6; max-width: 820px; }
.agreement-text h2 { font-size: 18px; margin: 18px 0 8px; } .agreement-text h3 { font-size: 15px; margin: 16px 0 6px; } .agreement-text h4 { font-size: 14px; margin: 12px 0 4px; }
.agreement-text p { margin: 0 0 10px; } .agreement-text ul, .agreement-text ol { margin: 0 0 10px; padding-left: 22px; } .agreement-text li { margin-bottom: 4px; }
.doc-scroll { max-height: 60vh; overflow: auto; border: 1px solid var(--border); border-radius: 8px; padding: 16px 20px; background: var(--surface); }
.sig-pad { display: block; width: 100%; max-width: 600px; height: 160px; border: 1px dashed var(--border); border-radius: 8px; background: #fff; touch-action: none; cursor: crosshair; margin-bottom: 6px; }
.sig-typed input { font-style: italic; font-size: 20px; font-family: Georgia, "Times New Roman", serif; }
@media print { .doc-scroll { max-height: none; overflow: visible; border: 0; padding: 0; } }

/* Equipment & site link (orgs/_equipment_tab.php) */
.form-inline { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.form-inline .field { margin: 0; }
.form-inline input[size] { width: auto; }
.mb-0 { margin-bottom: 0; }
