/* Generator MikroTik — memakai token dari style.css */
.mt-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 18px; align-items: start; }
.mt-layout > .panel { margin: 0; }
.mt-form-panel { border-top: 3px solid var(--f-blue); }
.mt-out-panel { position: sticky; top: 20px; }

.mt-form > .eyebrow { display: flex; align-items: center; gap: 8px; color: var(--ink-2); }
.mt-form > .eyebrow::after { content: ""; flex: 1; height: 1px; background: var(--rule); }
.mt-sep { margin-top: 24px; }
.mt-opt { color: var(--ink-3); font-weight: 500; letter-spacing: 0; text-transform: none; }
.mt-hint { margin: 0 0 8px; }
.mt-area-label { display: flex; justify-content: space-between; gap: 8px; margin: 0 0 6px; color: var(--ink-2); font-size: 12.5px; font-weight: 600; }
.mt-area-label em { color: var(--ink-3); font-size: 11px; font-style: normal; font-weight: 400; }
.mt-area-gap { margin-top: 18px; }
.mt-form textarea { width: 100%; font-family: var(--mono); font-size: 12.5px; }

.mt-checks { display: grid; gap: 8px; }
.mt-check { display: flex; align-items: center; gap: 9px; color: var(--ink-2); font-size: 13.5px; cursor: pointer; }
.mt-check input { width: 16px; height: 16px; min-height: 0; padding: 0; accent-color: var(--f-blue); }

.mt-actions { display: flex; gap: 6px; flex-shrink: 0; }
.mt-output {
  max-height: 64vh; min-height: 320px; overflow: auto; margin: 0;
  border: 1px solid var(--rule);
  background: var(--code-bg); color: var(--code-ink);
  font-size: 12px; white-space: pre; word-break: normal;
}
.mt-output .c { color: var(--code-dim); }

.mt-warn { margin: 0 0 12px; padding: 0; list-style: none; }
.mt-warn li {
  margin-bottom: 6px; padding: 8px 11px;
  border: 1px solid var(--rule); border-left: 3px solid var(--warn); border-radius: var(--r);
  background: var(--warn-bg); color: var(--ink); font-size: 12.5px;
}
.mt-warn li.err { border-left-color: var(--err); background: var(--err-bg); }

@media (max-width: 1180px) {
  .mt-layout { grid-template-columns: 1fr; }
  .mt-out-panel { position: relative; top: 0; }
}

/* ---------- panduan per modul ---------- */
.mt-guide { margin-bottom: 18px; border-top: 3px solid var(--f-blue); }
.mt-guide > details > summary { display: flex; align-items: baseline; gap: 12px; list-style: none; cursor: pointer; }
.mt-guide > details > summary::-webkit-details-marker { display: none; }
.mt-guide-title { color: var(--ink); font-size: 16px; font-weight: 650; }
.mt-guide-toggle { margin-left: auto; color: var(--ink-3); font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: .08em; }
.mt-guide-toggle::after { content: "TAMPILKAN"; }
.mt-guide > details[open] > summary .mt-guide-toggle::after { content: "SEMBUNYIKAN"; }
.mt-guide-body { padding-top: 14px; }
.mt-guide-body .eyebrow { margin: 0 0 10px; }
.mt-guide-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.mt-guide-col { padding-top: 12px; border-top: 1px dashed var(--rule-2); }
.mt-basics { margin-top: 18px; padding-top: 4px; border-top: 1px solid var(--rule); }
.mt-basics > summary { padding: 10px 0 2px; color: var(--ink-2); cursor: pointer; font-size: 13.5px; font-weight: 600; }
.mt-terms { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; font-size: 13.5px; }
.mt-terms dt { color: var(--ink); font-family: var(--mono); font-size: 12.5px; font-weight: 600; }
.mt-terms dd { margin: 0; color: var(--ink-2); }
.field-hint { display: block; margin-top: 4px; color: var(--ink-3); font-size: 12px; line-height: 1.45; }

@media (max-width: 1180px) {
  .mt-guide-grid { grid-template-columns: 1fr; gap: 14px; }
}
.mt-guide .checklist li::before { background: var(--f-blue); }
.mt-mode { margin-bottom: 10px; }

/* ---------- hasil kalkulator (visual, mikrotik-calc-view.js) ---------- */
.mt-calc { display: grid; gap: 18px; min-height: 320px; }
.mt-calc .t-ok { --tone: var(--ok); --tone-bg: var(--ok-bg); }
.mt-calc .t-warn { --tone: var(--warn); --tone-bg: var(--warn-bg); }
.mt-calc .t-err { --tone: var(--err); --tone-bg: var(--err-bg); }
.mt-calc .t-info { --tone: var(--f-blue); --tone-bg: var(--panel-2); }
.cv-title { margin: 0 0 10px; color: var(--ink-2); }
.cv-empty { margin: 0; padding: 40px 16px; border: 1px dashed var(--rule-2); border-radius: var(--r); color: var(--ink-3); text-align: center; font-size: 13.5px; }

.cv-status { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--rule); border-left: 4px solid var(--tone, var(--rule-2)); border-radius: var(--r); background: var(--tone-bg, var(--panel-2)); }
.cv-led { flex-shrink: 0; width: 10px; height: 10px; margin-top: 5px; border-radius: 50%; background: var(--tone, var(--ink-3)); }
.cv-status-title { margin: 0; color: var(--ink); font-size: 15px; font-weight: 700; }
.cv-status-text { margin: 3px 0 0; color: var(--ink-2); font-size: 13px; line-height: 1.45; }

.cv-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.cv-stat { min-width: 0; padding: 12px 14px; border: 1px solid var(--rule); border-top: 3px solid var(--tone, var(--rule-2)); border-radius: var(--r); background: var(--panel); }
.cv-stat .stat-label { margin: 0 0 6px; }
.cv-stat-value { margin: 0; color: var(--ink); font-family: var(--mono); font-size: 24px; font-weight: 700; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cv-unit { margin-left: 4px; color: var(--ink-3); font-size: 12px; font-weight: 600; }
.cv-stat-note { margin: 6px 0 0; color: var(--ink-3); font-size: 12px; line-height: 1.4; }

.cv-meter { padding: 10px 12px 8px; border: 1px solid var(--rule); border-radius: var(--r); background: var(--panel); }
.cv-mark-label { margin: 0 0 6px; color: var(--ink); font-family: var(--mono); font-size: 12.5px; font-weight: 600; }
.cv-meter-svg { display: block; width: 100%; height: 26px; }
.cv-zone { fill: var(--tone, var(--rule)); opacity: .35; }
.cv-needle { fill: var(--ink); }
.cv-ends { display: flex; justify-content: space-between; margin-top: 4px; color: var(--ink-3); font-family: var(--mono); font-size: 11px; }
.cv-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 8px 0 0; padding: 0; list-style: none; color: var(--ink-2); font-size: 12px; }
.cv-legend li { display: inline-flex; align-items: center; gap: 6px; }
.cv-sw { width: 10px; height: 10px; border-radius: 2px; background: var(--tone, var(--rule)); opacity: .6; }

.cv-bar { display: block; width: 100%; height: 6px; margin-top: 6px; border-radius: 3px; overflow: hidden; }
.cv-track { fill: var(--sunken); }
.cv-fill { fill: var(--tone, var(--f-blue)); }

.cv-steps { position: relative; margin: 0; padding: 0; list-style: none; }
.cv-step { position: relative; display: flex; gap: 12px; padding: 0 0 12px 0; }
.cv-step:not(:last-child)::before { content: ""; position: absolute; left: 5px; top: 14px; bottom: 0; width: 2px; background: var(--rule-2); }
.cv-dot { position: relative; flex-shrink: 0; width: 12px; height: 12px; margin-top: 3px; border: 2px solid var(--tone, var(--ink-3)); border-radius: 50%; background: var(--panel); }
.cv-step:first-child .cv-dot, .cv-step:last-child .cv-dot { background: var(--tone, var(--ink-3)); }
.cv-step-main { flex: 1; min-width: 0; }
.cv-step-row { display: flex; align-items: baseline; gap: 10px; font-size: 13px; }
.cv-step-l { flex: 1; min-width: 0; color: var(--ink); }
.cv-step-d { color: var(--ink-3); font-family: var(--mono); font-size: 12px; white-space: nowrap; }
.cv-step-v { min-width: 92px; color: var(--ink); font-family: var(--mono); font-size: 12.5px; font-weight: 600; text-align: right; white-space: nowrap; }

.cv-bars { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.cv-bar-row { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.cv-bar-l { color: var(--ink); }
.cv-bar-txt { color: var(--ink-2); font-family: var(--mono); font-size: 12.5px; white-space: nowrap; }

.cv-table-wrap { overflow-x: auto; border: 1px solid var(--rule); border-radius: var(--r); }
.cv-table { min-width: 0; font-size: 13px; }
.cv-table th, .cv-table td { padding: 8px 12px; }
.cv-table td:not(:first-child), .cv-table th:not(:first-child) { text-align: right; font-family: var(--mono); }
.cv-table tfoot td { border-bottom: 0; background: var(--panel-2); color: var(--ink); font-weight: 700; }

@media (max-width: 620px) {
  .cv-stats { grid-template-columns: 1fr; }
  .cv-stat-value { font-size: 22px; }
  .cv-step-row { flex-wrap: wrap; gap: 2px 10px; }
  .cv-step-l { flex-basis: 100%; }
  .cv-step-v { min-width: 0; margin-left: auto; }
}
.mt-calc + .mt-warn { margin: 16px 0 0; }
