/* TailAdmin-inspired layout, adapted to Meta3D's existing workflows. */
.billing-summary { flex-wrap: wrap; }
.billing-summary > div:first-child { flex: 0 0 auto; max-width: 100%; }
.billing-summary .billing-actions { flex: 1 1 440px; min-width: 0; max-width: 100%; }
#billing-total { white-space: nowrap; overflow-wrap: normal; word-break: normal; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
  .billing-summary .billing-actions { flex-basis: auto; width: 100%; justify-content: flex-start; }
  .billing-summary .billing-selector { min-width: 0; width: 100%; }
  #billing-total { font-size: 24px; }
}
.status-history { list-style: none; margin: 20px 0; padding: 0 0 0 16px; border-left: 2px solid var(--line); display: grid; gap: 20px; }
.status-history li { display: grid; gap: 4px; overflow-wrap: anywhere; }
.status-history strong { color: var(--heading); font-size: 14px; }
.status-history span { color: var(--muted); font-size: 12px; }
.adjustment-badge { display: inline-flex; margin-top: 4px; padding: 3px 7px; border: 1px solid #7592ff; border-radius: 5px; color: #7592ff; background: rgba(70,95,255,.12); font-size: 12px; white-space: nowrap; }
:root[data-theme="light"] .adjustment-badge { color: #3641f5; border-color: #3641f5; }
.adjustment-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-top: 18px; margin-top: 18px; border-top: 1px solid var(--line); }
.adjustment-controls .urgency { min-height: 36px; margin: 0; }
.dashboard-charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; padding: 8px 0 22px; border-bottom: 1px solid var(--line); }
.chart-section { min-width: 0; }
.chart-section h2 { font-size: 17px; margin: 0; color: var(--heading); }
.chart-caption { font-size: 12px; color: var(--muted); margin: 5px 0 14px; }
.chart-legend { display: flex; gap: 16px; font-size: 11px; color: var(--muted); }
.chart-legend span { display: flex; gap: 6px; align-items: center; }
.chart-legend i { width: 8px; height: 8px; border-radius: 2px; }
.received-key { background: #465fff; }
.completed-key { background: #32d583; }
.production-chart { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.chart-week { min-width: 0; text-align: center; }
.chart-columns { height: 156px; display: flex; align-items: end; justify-content: center; gap: 4px; border-bottom: 1px solid var(--line); }
.chart-column { width: 28px; max-width: 45%; display: flex; flex-direction: column; justify-content: end; align-items: stretch; }
.chart-column span { font-size: 11px; color: var(--ink); }
.chart-bar { border-radius: 3px 3px 0 0; }
.week-label { font-size: 11px; color: var(--muted); display: block; margin-top: 9px; }
.workload-chart { display: grid; gap: 20px; max-height: 232px; overflow-y: auto; padding-right: 6px; }
.workload-label { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; font-size: 12px; margin-bottom: 8px; }
.workload-label strong { font-weight: 500; }
.workload-label span { color: var(--muted); }
.workload-track { height: 10px; border-radius: 3px; background: var(--raised); overflow: hidden; }
.workload-track > div { height: 100%; background: #465fff; border-radius: 3px; }
@media (max-width: 1100px) { .dashboard-charts { grid-template-columns: minmax(0, 1fr); } }
:root {
  --soft: #101828;
  --paper: #1a2231;
  --raised: #1d2939;
  --raised-soft: #344054;
  --heading: #f9fafb;
  --ink: #e4e7ec;
  --muted: #98a2b3;
  --faint: #98a2b3;
  --line: #344054;
  --line-strong: #475467;
  --brand: #465fff;
  --brand-dark: #3641f5;
  --brand-soft: rgba(70, 95, 255, 0.12);
  --button-text: #ffffff;
  --shadow: none;
}
:root[data-theme="light"] {
  --soft: #f9fafb;
  --paper: #ffffff;
  --raised: #f2f4f7;
  --raised-soft: #e4e7ec;
  --heading: #101828;
  --ink: #344054;
  --muted: #667085;
  --faint: #667085;
  --line: #e4e7ec;
  --line-strong: #d0d5dd;
  --brand: #465fff;
  --brand-dark: #3641f5;
  --brand-soft: #ecf3ff;
  --button-text: #ffffff;
  --shadow: none;
}
body { font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 14px; line-height: 1.5; }
.app-shell { grid-template-columns: 248px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 30px 18px 20px; gap: 32px; background: var(--paper); color: var(--ink); }
:root[data-theme="light"] .sidebar { background: var(--paper); color: var(--ink); }
.brand { padding: 0 8px 26px; border-bottom: 1px solid var(--line); }
.brand strong { font-family: inherit; font-size: 24px; font-weight: 800; color: var(--heading); }
.brand span { font-size: 11px; color: var(--muted); }
.brand-mark { width: 40px; height: 40px; flex-shrink: 0; border: 0; }
.nav-list { gap: 6px; }
.nav-button { min-height: 46px; padding: 11px 14px; color: var(--muted); font-weight: 500; }
.nav-button:hover { color: var(--heading); background: var(--raised); border-color: transparent; }
.nav-button.active { color: #7592ff; background: var(--brand-soft); border-color: transparent; }
:root[data-theme="light"] .nav-button.active { color: var(--brand); }
.profile-card { border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 22px 4px 0; background: transparent; }
.profile-card label, .profile-card small { color: var(--muted); }
.main { padding: 0 32px 32px; min-width: 0; }
.topbar { min-height: 100px; padding: 22px 0; margin-bottom: 26px; border-bottom: 1px solid var(--line); }
.topbar h1 { font-family: inherit; font-size: 27px; font-weight: 800; }
.eyebrow { color: var(--muted); font-size: 11px; font-weight: 500; margin-bottom: 4px; }
.view.active { gap: 22px; }
.metric-grid { gap: 14px; }
.metric-grid .metric { min-height: 130px; padding: 20px; background: var(--paper); border: 1px solid var(--line); box-shadow: none; }
.metric-grid .metric.active { border-color: var(--brand); background: var(--brand-soft); }
.metric-grid .metric:hover { border-color: var(--line-strong); transform: none; }
.metric span { color: var(--muted); font-size: 12px; font-weight: 500; }
.metric strong { font-family: inherit; font-size: 30px; line-height: 1.3; margin: 8px 0 3px; }
.metric small { font-size: 11px; font-weight: 500; }
.dashboard-billing { padding: 15px 0; background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.filters { padding: 0; background: transparent; border: 0; border-radius: 0; gap: 14px; }
label { font-size: 12px; color: var(--muted); font-weight: 500; }
input, select, textarea { max-width: 100%; min-height: 42px; border-radius: 6px; background: var(--paper); }
.primary-button, .ghost-button { font-size: 13px; font-weight: 500; border-radius: 6px; }
.ghost-button { background: var(--paper); border-color: var(--line); }
.table-wrap { border-radius: 0; border-left: 0; border-right: 0; box-shadow: none; }
th { background: var(--raised); color: var(--muted); font-size: 11px; font-weight: 500; }
td { font-size: 13px; padding-top: 17px; padding-bottom: 17px; }
tbody tr:hover { background: var(--raised); }
.status-pill, .status-control { border-radius: 5px; font-size: 11px; font-weight: 500; }
.status-em-andamento { color: #7592ff; background: rgba(70,95,255,.12); border-color: transparent; }
.status-em-aberto { color: #7cd4fd; background: rgba(11,165,236,.12); border-color: transparent; }
.status-concluido { color: #32d583; background: rgba(18,183,106,.12); border-color: transparent; }
.status-em-aprovacao { color: #fdb022; background: rgba(247,144,9,.12); border-color: transparent; }
.status-suspenso { color: #f97066; background: rgba(240,68,56,.12); border-color: transparent; }
.status-cancelado { color: #98a2b3; background: rgba(152,162,179,.12); border-color: transparent; }
:root[data-theme="light"] .status-em-andamento { color: #3641f5; background: #ecf3ff; border-color: transparent; }
:root[data-theme="light"] .status-em-aberto { color: #026aa2; background: #f0f9ff; border-color: transparent; }
:root[data-theme="light"] .status-concluido { color: #027a48; background: #ecfdf3; border-color: transparent; }
:root[data-theme="light"] .status-em-aprovacao { color: #b54708; background: #fffaeb; border-color: transparent; }
:root[data-theme="light"] .status-suspenso { color: #b42318; background: #fef3f2; border-color: transparent; }
:root[data-theme="light"] .status-cancelado { color: #475467; background: #f2f4f7; border-color: transparent; }
.ghost-button:hover, .metric-grid .metric:hover { border-color: #7592ff; }
.dashboard-billing span:last-child { color: #7592ff; }
:root[data-theme="light"] .dashboard-billing span:last-child { color: #3641f5; }
.registry-panel { border-radius: 0; box-shadow: none; }
button, h1, h2, h3, strong { overflow-wrap: anywhere; }
@media (max-width: 1200px) {
  .app-shell { grid-template-columns: 218px minmax(0, 1fr); }
  .main { padding-left: 22px; padding-right: 22px; }
  .metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .app-shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; height: auto; padding: 18px; gap: 16px; }
  .brand { padding: 0 0 14px; }
  .nav-list { grid-template-columns: repeat(6, 140px); overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: thin; }
  .nav-button { white-space: nowrap; overflow-wrap: normal; scroll-snap-align: start; }
  .profile-card { padding-top: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
  .profile-card select { width: auto; }
  .profile-card small { display: none; }
}
@media (max-width: 640px) {
  .main { padding: 0 16px 24px; }
  .topbar { gap: 16px; margin-bottom: 20px; }
  .topbar h1 { font-size: 24px; }
  .topbar-actions { gap: 8px; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .metric-grid .metric { min-height: 120px; padding: 14px; }
  .metric strong { font-size: 28px; }
  .dashboard-filters { grid-template-columns: minmax(0, 1fr); }
}
