﻿.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.grid { display: grid; gap: 12px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.btn { border: 1px solid transparent; border-radius: 10px; padding: 8px 12px; font-weight: 600; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-secondary { background: #fff; border-color: var(--line); color: var(--text); }
.badge { display: inline-block; padding: 4px 8px; border-radius: 999px; background: #edf3f9; color: var(--muted); font-size: 12px; }
.badge-ok { background: #e7f8ef; color: #0d7d45; }
.badge-danger { background: #fde8e8; color: #9b1c1c; }
.btn-danger { background: #b42318; color: #fff; border-color: #b42318; }
.menu-link { display: block; padding: 10px 12px; border-radius: 10px; color: #d8ebf4; margin-bottom: 6px; }
.menu-link.active, .menu-link:hover { background: rgba(255, 255, 255, 0.15); color: #fff; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { border-bottom: 1px solid var(--line); padding: 8px; text-align: left; }
.table-wrap { max-height: 68vh; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.inv-toolbar { display:flex; gap:10px; align-items:center; flex-wrap:wrap; margin-bottom:10px; }
.inv-toolbar input[type="text"], .inv-toolbar input:not([type]) { width: min(420px, 100%); }
.inline-check { display:flex; align-items:center; gap:6px; font-size:13px; color: var(--muted); }
.pill-wrap { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:10px; }
.pill { border:1px solid var(--line); background:#fff; color:var(--text); border-radius:999px; padding:6px 10px; font-size:12px; }
.pill.active { background:#0f6d4f; color:#fff; border-color:#0f6d4f; }
.muted { color: var(--muted); }

.module-shell { display: grid; gap: 12px; }
.module-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.module-title { margin: 0; }
.module-sub { margin: 0; color: var(--muted); font-size: 13px; }

.toolbar-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.toolbar-row .grow { flex: 1 1 300px; min-width: 220px; }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.stat-chip { border: 1px solid var(--line); border-radius: 10px; background: #f9fbfe; padding: 8px 10px; }
.stat-label { color: var(--muted); font-size: 12px; margin-bottom: 3px; }
.stat-value { font-size: 18px; font-weight: 700; color: #103246; }

.tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.tab-btn {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
  color: var(--text);
}
.tab-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.panel { border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 12px; }
.panel-title { margin: 0 0 8px; font-size: 15px; }

.pill-row { display: flex; gap: 8px; flex-wrap: wrap; }
.pill.soft { background: #f6f9fc; }
.pill.active.soft { background: var(--primary); color: #fff; border-color: var(--primary); }

.table.compact th, .table.compact td { padding: 7px; font-size: 13px; }
.table td.nowrap, .table th.nowrap { white-space: nowrap; }

.split-2 { display: grid; gap: 12px; grid-template-columns: 2fr 1fr; }

.empty-state {
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: #fbfdff;
  color: var(--muted);
  padding: 16px;
  text-align: center;
}

@media (max-width: 1100px) {
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split-2 { grid-template-columns: 1fr; }
}

.ts-matrix-table thead th {
  position: sticky;
  top: 0;
  background: #edf7f2;
  z-index: 1;
}

.ts-matrix-table {
  border-collapse: separate;
  border-spacing: 0;
}

.ts-matrix-table th,
.ts-matrix-table td {
  border-right: 1px solid #e5edf5;
  border-bottom: 1px solid #e5edf5;
}

.ts-matrix-table th:first-child,
.ts-matrix-table td:first-child {
  border-left: 1px solid #e5edf5;
}

.ts-matrix-table thead th {
  border-top: 1px solid #e5edf5;
}

.ts-cell-actual {
  background: #ecfdf3;
  color: #0b6f4f;
  font-weight: 600;
  text-align: center;
}

.ts-cell-plan {
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 600;
  text-align: center;
}

.ts-cell-empty {
  background: #fafcfe;
  text-align: center;
  color: #a0aec0;
}

.ts-hour-chip {
  display: inline-block;
  min-width: 46px;
  text-align: center;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
}

.ts-hour-actual {
  background: #ecfdf3;
  color: #0b6f4f;
  border-color: #bbf7d0;
}

.ts-hour-plan {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.ts-hour-empty {
  background: #f8fafc;
  color: #94a3b8;
  border-color: #e2e8f0;
}

.fp-toast-host {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 1200;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 24px));
}

.fp-toast {
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 10px 12px;
  cursor: pointer;
  animation: fpToastIn .2s ease-out;
}

.fp-toast.leave { opacity: 0; transform: translateY(-6px); transition: all .2s ease; }
.fp-toast-title { font-weight: 700; font-size: 13px; margin-bottom: 2px; }
.fp-toast-msg { font-size: 13px; color: var(--muted); white-space: pre-line; }
.fp-toast-success { border-left-color: #0d7d45; }
.fp-toast-warning { border-left-color: #b54708; }
.fp-toast-error { border-left-color: #b42318; }
.fp-toast-info { border-left-color: #155eef; }

.fp-status { font-size: 12px; white-space: pre-line; }
.fp-status-success { color: #0d7d45; }
.fp-status-warning { color: #b54708; }
.fp-status-error { color: #b42318; }
.fp-status-info { color: var(--muted); }

.fp-confirm.hidden { display: none; }
.fp-confirm {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: grid;
  place-items: center;
}
.fp-confirm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 20, 32, .45);
}
.fp-confirm-card {
  position: relative;
  z-index: 1;
  width: min(520px, calc(100vw - 24px));
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 14px;
}
.fp-confirm-title { margin: 0 0 8px; }
.fp-confirm-message { color: var(--muted); font-size: 13px; white-space: pre-line; margin-bottom: 12px; }
.fp-confirm-actions { display: flex; justify-content: flex-end; gap: 8px; }
.fp-modal-open { overflow: hidden; }

@keyframes fpToastIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.pc-plan-input,
.ts-actual-input {
  width: 70px;
  border: 1px solid #d0d5dd;
  border-radius: 6px;
  padding: 4px 6px;
  font-size: 12px;
  background: #fff;
}

.pc-plan-input:focus,
.ts-actual-input:focus {
  outline: none;
  border-color: #0f766e;
  box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.15);
}

.pc-cell-has-data {
  background: #ecfdf3;
  color: #027a48;
  font-weight: 600;
}

.ts-cell-miss {
  background: #fff1f3;
}
