/* Components: drawer, forms, modal, toasts, kanban, tabs, selection tables. */
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row-end { display: flex; gap: 10px; justify-content: flex-end; margin-top: 14px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px 14px; }
.btn-ghost { background: transparent; border-color: transparent; } .btn-ghost:hover { background: var(--surface-2); border-color: var(--line); }
.btn-sm { min-height: 34px; padding: 0 10px; font-size: 13px; }
.btn-danger { border-color: var(--danger); color: var(--danger); }
textarea.input { min-height: 96px; resize: vertical; }
select.input { appearance: auto; }
.field .hint { font-size: 12px; color: var(--text-3); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 6px 0 14px; overflow-x: auto; }
.tabs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 10px 12px; color: var(--text-2); cursor: pointer; min-height: 40px; white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--gold-2); border-bottom-color: var(--gold); font-weight: 600; }

.toasts { position: fixed; right: 16px; bottom: 16px; display: grid; gap: 8px; z-index: 60; }
.toast { background: var(--surface-3); border: 1px solid var(--line-strong); border-left: 4px solid var(--info); padding: 10px 14px; border-radius: var(--radius-sm); box-shadow: var(--shadow); max-width: 360px; }
.toast.ok { border-left-color: var(--ok); } .toast.warn { border-left-color: var(--warn); } .toast.error { border-left-color: var(--danger); }

.modal-back { position: fixed; inset: 0; background: rgba(0,0,0,.55); display: grid; place-items: center; padding: 16px; z-index: 50; }
.modal { background: var(--surface); border: 1px solid var(--line-strong); border-radius: 14px; width: min(560px, 100%); max-height: 90dvh; overflow: auto; padding: 18px 20px 20px; box-shadow: var(--shadow); }
.modal.wide { width: min(900px, 100%); }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; } .modal-head h3 { margin: 0; font-size: 17px; }

.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100%); background: var(--surface); border-left: 1px solid var(--line-strong); box-shadow: var(--shadow); z-index: 40; overflow: auto; padding: 18px 20px 40px; }
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; position: sticky; top: 0; background: var(--surface); padding-bottom: 10px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.drawer-head h3 { margin: 0; font-size: 18px; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px; font-size: 14px; }
.kv dt { color: var(--text-3); } .kv dd { margin: 0; word-break: break-word; }
.timeline { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 10px; }
.timeline li { border-left: 2px solid var(--line-strong); padding: 2px 0 2px 12px; }
.timeline .when { font-size: 12px; color: var(--text-3); }
.section h4 { margin: 18px 0 8px; font-size: 13px; color: var(--text-3); text-transform: uppercase; letter-spacing: .08em; }

table.list input[type="checkbox"] { width: 18px; height: 18px; }
table.list tr.selected td { background: var(--gold-soft); }
.bulkbar { display: flex; gap: 10px; align-items: center; padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 10px; }

.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 12px; align-items: start; }
.col { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; min-height: 120px; }
.col.over { border-color: var(--gold); background: var(--gold-soft); }
.col h4 { margin: 0 0 8px; font-size: 13px; display: flex; justify-content: space-between; align-items: center; }
.col h4 .count { color: var(--text-3); font-weight: 500; }
.kcard { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px; margin-bottom: 8px; cursor: grab; }
.kcard:active { cursor: grabbing; } .kcard .t { font-weight: 600; } .kcard .m { font-size: 12.5px; color: var(--text-3); margin-top: 4px; }
.kcard[draggable="true"]:focus-visible { outline: 2px solid var(--gold); }

.pager { display: flex; gap: 8px; align-items: center; margin-top: 12px; color: var(--text-3); font-size: 13px; }
.code { font-family: var(--mono); font-size: 12.5px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; word-break: break-all; }

/* reports */
.bar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: var(--surface-2); }
.bar .seg { display: block; min-width: 2px; }
.spark { display: flex; align-items: flex-end; gap: 3px; height: 90px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.spark .day { flex: 1; min-width: 4px; background: linear-gradient(180deg, var(--gold-2), var(--gold-3)); border-radius: 2px 2px 0 0; opacity: .9; }
.notes li { margin: 4px 0; }

/* Athena */
.athena { border: 1px solid var(--gold-line); background: linear-gradient(180deg, var(--gold-soft), transparent 70%), var(--surface); border-radius: var(--radius); padding: 14px 16px; }
.athena h5 { margin: 0 0 6px; font-family: var(--display); font-size: 18px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.athena h5 .owl { width: 18px; height: 18px; }
.athena .fit { font-weight: 700; }
.athena ul { margin: 6px 0 0; padding-left: 18px; }
.athena .meta { font-size: 12px; color: var(--text-3); margin-top: 8px; }
.athena pre { white-space: pre-wrap; font: inherit; margin: 6px 0; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px; }
.hit-score { font-family: var(--mono); font-size: 11.5px; color: var(--text-3); }
.kv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px 14px; font-size: 13px; }
.kv-grid b { display: block; color: var(--text-3); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; }
.vram { height: 10px; border-radius: 5px; background: var(--surface-3); overflow: hidden; border: 1px solid var(--line); }
.vram i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-3), var(--gold-2)); }
