:root {
  --bg: #F4F5F7;
  --surface: #FFFFFF;
  --border: #DFE1E6;
  --text: #172B4D;
  --text-muted: #6B778C;
  --primary: #0B5FFF;
  --primary-dark: #0847C4;
  --danger: #DE350B;
  --success: #00875A;
  --warning: #FFAB00;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(9, 30, 66, 0.15), 0 0 1px rgba(9, 30, 66, 0.2);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}
.hidden { display: none !important; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* ---------- Login ---------- */
.login-screen {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0B5FFF 0%, #172B4D 100%);
}
.login-card {
  background: var(--surface);
  border-radius: 12px;
  padding: 40px;
  width: 380px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.login-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.logo-mark {
  width: 40px; height: 40px; border-radius: 8px;
  background: var(--primary); color: #fff; font-weight: 700;
  display: flex; align-items: center; justify-content: center; font-size: 15px;
}
.logo-mark.small { width: 32px; height: 32px; font-size: 13px; }
.login-logo h1 { font-size: 18px; margin: 0; }
.login-sub { color: var(--text-muted); font-size: 14px; margin-bottom: 16px; }
.field-label { display: block; font-size: 12px; font-weight: 600; color: var(--text-muted); margin: 12px 0 6px; text-transform: uppercase; letter-spacing: 0.03em; }
#form-request-otp input, #form-verify-otp input {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 16px; font-size: 15px;
}
#input-otp { text-align: center; font-size: 22px; letter-spacing: 6px; }
.btn { border: none; border-radius: var(--radius); padding: 9px 16px; font-size: 14px; font-weight: 600; transition: background 0.15s; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: #EBECF0; color: var(--text); }
.btn-secondary:hover { background: #DDDFE4; }
.btn-ghost { background: transparent; color: var(--text); }
.btn-ghost:hover { background: #EBECF0; }
.btn-danger { background: #FFEBE6; color: var(--danger); }
.btn-danger:hover { background: #FFD5CC; }
.btn-block { width: 100%; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-link { background: none; border: none; color: var(--primary); font-size: 13px; padding: 4px; display: inline-block; margin-top: 4px; }
.login-message { margin-top: 16px; padding: 10px 12px; border-radius: var(--radius); font-size: 13px; }
.login-message.error { background: #FFEBE6; color: var(--danger); }
.login-message.success { background: #E3FCEF; color: var(--success); }

/* ---------- App shell ---------- */
.app { display: flex; flex-direction: column; height: 100vh; }
.topbar {
  height: 56px; background: var(--surface); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 16px; gap: 20px; flex-shrink: 0;
}
.topbar-left { display: flex; align-items: center; gap: 10px; }
.project-select { padding: 6px 10px; border-radius: var(--radius); border: 1px solid var(--border); font-weight: 600; max-width: 220px; }
.topbar-nav { display: flex; gap: 4px; flex: 1; }
.nav-btn { background: none; border: none; padding: 8px 14px; border-radius: var(--radius); font-size: 14px; color: var(--text-muted); font-weight: 600; }
.nav-btn:hover { background: var(--bg); color: var(--text); }
.nav-btn.active { background: #DEEBFF; color: var(--primary); }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.user-chip { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.avatar {
  width: 28px; height: 28px; border-radius: 50%; background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex-shrink: 0;
}

.main-content { flex: 1; overflow: auto; padding: 20px 24px; display: flex; flex-direction: column; min-height: 0; }
.view-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.view-title { font-size: 20px; margin: 0; }
.spacer { flex: 1; }
.search-input, .filter-select { padding: 7px 10px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.search-input { width: 220px; }

/* ---------- Board ---------- */
/* Board (Jira-like): the columns share the width and fill the remaining height of the
   screen; each column scrolls on its own and keeps its "+" button pinned at the bottom. */
#view-board { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.board-columns { display: flex; gap: 12px; align-items: stretch; overflow-x: auto; flex: 1; min-height: 320px; padding-bottom: 4px; }
.board-column { background: #EBECF0; border-radius: 10px; flex: 1 1 0; min-width: 230px; display: flex; flex-direction: column; min-height: 0; }
.board-column-header { padding: 12px 12px 8px; font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; display:flex; justify-content: space-between; flex-shrink: 0; }
.board-column-body { padding: 2px 8px; overflow-y: auto; flex: 1; min-height: 40px; }
.board-column-body.drag-over { background: #DEEBFF; border-radius: 8px; }
.board-column-footer { padding: 6px 8px 8px; flex-shrink: 0; }
.board-add-btn { width: 100%; border: 1px dashed #C1C7D0; background: transparent; border-radius: 6px; padding: 5px; color: var(--text-muted); font-size: 18px; line-height: 1; }
.board-add-btn:hover { background: #DFE1E6; color: var(--text); }
.board-create { background: var(--surface); border: 2px solid var(--primary); border-radius: 6px; padding: 6px; }
.board-create textarea { width: 100%; border: none; outline: none; resize: none; font: inherit; font-size: 13.5px; }
.board-create-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 4px; }
.board-create-row select { border: none; background: var(--bg); border-radius: 4px; padding: 3px 4px; font-size: 12px; }
.board-create-hint { font-size: 11px; color: var(--text-muted); }
.board-create-target { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.issue-card-details { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 8px; }
.card-due { font-size: 11.5px; color: var(--text-muted); }
.card-due.overdue { color: #DE350B; font-weight: 600; }
.card-estimate { font-size: 11px; font-weight: 600; background: #EBECF0; color: var(--text-muted); border-radius: 4px; padding: 1px 6px; }

.issue-card {
  background: var(--surface); border-radius: 6px; padding: 10px 12px; margin-bottom: 8px; box-shadow: var(--shadow);
  cursor: grab; border-left: 3px solid transparent;
}
.issue-card:hover { box-shadow: 0 2px 6px rgba(9,30,66,0.25); }
.issue-card.dragging { opacity: 0.4; }
.issue-card-title { font-size: 13.5px; margin-bottom: 8px; color: var(--text); line-height: 1.35; }
.issue-card-labels { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 8px; }
.chip { display: inline-block; font-size: 10.5px; font-weight: 600; padding: 2px 7px; border-radius: 10px; color: #fff; }
.issue-card-footer { display: flex; align-items: center; justify-content: space-between; }
.issue-card-meta { display: flex; align-items: center; gap: 6px; }
.issue-type-icon { font-size: 13px; }
.issue-key { font-size: 11px; color: var(--text-muted); font-weight: 700; }
.priority-icon { font-size: 12px; }
.avatar-sm { width: 22px; height: 22px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; }

/* ---------- Backlog ---------- */
.backlog-section { background: var(--surface); border-radius: 10px; padding: 12px 16px; margin-bottom: 16px; box-shadow: var(--shadow); }
.backlog-section-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.backlog-section-header h3 { margin: 0; font-size: 15px; }
.badge { background: #EBECF0; color: var(--text-muted); font-size: 12px; padding: 2px 8px; border-radius: 10px; font-weight: 600; }
.sprint-actions { margin-left: auto; display: flex; gap: 6px; }
.issue-list { display: flex; flex-direction: column; gap: 6px; min-height: 20px; }
.issue-row {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); cursor: pointer;
}
.issue-row:hover { background: var(--bg); }
.issue-row-title { flex: 1; font-size: 13.5px; }
.issue-row.drag-over-row { border-top: 2px solid var(--primary); }
.issue-list.drag-over-row { outline: 2px dashed var(--primary); outline-offset: 2px; border-radius: 6px; }
.section-meta { color: var(--text-muted); font-size: 13px; }
.status-counts { display: inline-flex; gap: 4px; }
.status-count { min-width: 22px; text-align: center; font-size: 12px; font-weight: 700; padding: 1px 6px; border-radius: 4px; }
.status-count.todo { background: #DFE1E6; color: var(--text); }
.status-count.progress { background: #DEEBFF; color: var(--primary); }
.status-count.done { background: #E3FCEF; color: #00875A; }
.empty-drop { border: 1px dashed var(--border); border-radius: 6px; padding: 14px; text-align: center; color: var(--text-muted); font-size: 13px; }
.inline-create-btn { background: none; border: none; color: var(--text-muted); font-size: 13.5px; font-weight: 600; padding: 8px 6px; margin-top: 4px; border-radius: 6px; width: 100%; text-align: left; }
.inline-create-btn:hover { background: var(--bg); color: var(--text); }
.inline-create { display: flex; gap: 8px; align-items: center; margin-top: 6px; padding: 6px; border: 2px solid var(--primary); border-radius: 6px; background: var(--surface); }
.inline-create select { border: none; background: var(--bg); border-radius: 4px; padding: 4px 6px; font-size: 13px; }
.inline-create input { flex: 1; border: none; outline: none; font-size: 13.5px; padding: 4px; }
.row-status { font-size: 12px; font-weight: 600; border: 1px solid var(--border); border-radius: 4px; padding: 2px 4px; background: var(--bg); color: var(--text); cursor: pointer; }
.row-status.st-in_progress, .row-status.st-in_review { background: #DEEBFF; color: var(--primary); border-color: #B3D4FF; }
.row-status.st-done { background: #E3FCEF; color: #00875A; border-color: #ABF5D1; }
.row-points { min-width: 26px; text-align: center; font-size: 12px; font-weight: 700; padding: 2px 6px; border-radius: 10px; background: #EBECF0; color: var(--text-muted); cursor: text; }
.row-points:hover { background: #DFE1E6; }
.row-points-input { width: 52px; font-size: 12px; padding: 2px 4px; border: 2px solid var(--primary); border-radius: 4px; }
.backlog-layout { display: flex; gap: 16px; align-items: flex-start; }
.backlog-main { flex: 1; min-width: 0; }
.epic-panel { width: 260px; flex-shrink: 0; background: var(--surface); border-radius: 10px; padding: 12px; box-shadow: var(--shadow); position: sticky; top: 0; max-height: calc(100vh - 140px); display: flex; flex-direction: column; }
.epic-panel-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.epic-panel-header h3 { margin: 0; font-size: 15px; }
.epic-panel-close { background: none; border: none; font-size: 20px; line-height: 1; color: var(--text-muted); padding: 2px 6px; border-radius: 4px; }
.epic-panel-close:hover { background: var(--bg); }
#epic-list { overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.epic-empty { text-align: center; color: var(--text-muted); font-size: 13px; padding: 16px 6px; line-height: 1.5; }
.epic-empty-icon { font-size: 40px; margin-bottom: 8px; }
.epic-item { border: 1px solid var(--border); border-left: 4px solid var(--epic, var(--border)); border-radius: 6px; padding: 8px 10px; cursor: pointer; font-size: 13px; }
.epic-item:hover { background: var(--bg); }
.epic-item.active { background: #DEEBFF; border-color: var(--primary); border-left-color: var(--epic, var(--primary)); }
.epic-item.drag-over-row { outline: 2px dashed var(--primary); }
.epic-item-title { font-weight: 600; display: flex; justify-content: space-between; gap: 6px; }
.epic-item-meta { color: var(--text-muted); font-size: 11.5px; margin-top: 4px; display: flex; justify-content: space-between; align-items: center; }
.epic-progress { height: 4px; background: #EBECF0; border-radius: 2px; margin-top: 6px; overflow: hidden; }
.epic-progress > span { display: block; height: 100%; background: #36B37E; }
.epic-details-btn { background: none; border: none; color: var(--primary); font-size: 11.5px; padding: 0; }
.epic-chip { font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 4px; border: 1px solid var(--epic); color: var(--epic); white-space: nowrap; max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
.epic-filter-active { font-size: 12px; background: #DEEBFF; color: var(--primary); border-radius: 12px; padding: 3px 10px; font-weight: 600; }
.epic-filter-active button { background: none; border: none; color: var(--primary); font-weight: 700; margin-left: 4px; padding: 0; }
@media (max-width: 800px) {
  .backlog-layout { flex-direction: column; }
  .epic-panel { width: 100%; position: static; max-height: none; }
}
.inline-create-hint { color: var(--text-muted); font-size: 11.5px; white-space: nowrap; }

/* ---------- Reports ---------- */
.stat-row { display: flex; gap: 14px; margin-bottom: 20px; flex-wrap: wrap; }
.stat-card { background: var(--surface); border-radius: 10px; padding: 16px 20px; box-shadow: var(--shadow); min-width: 140px; }
.stat-card .stat-value { font-size: 26px; font-weight: 700; }
.stat-card .stat-label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.03em; }
.charts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.chart-card { background: var(--surface); border-radius: 10px; padding: 16px; box-shadow: var(--shadow); }
.chart-card h3 { margin: 0 0 12px; font-size: 14px; color: var(--text-muted); }
.chart-card canvas { max-height: 260px; }

/* ---------- Admin ---------- */
.data-table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); }
.data-table th, .data-table td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.data-table th { background: var(--bg); font-size: 11.5px; text-transform: uppercase; color: var(--text-muted); }
.role-badge { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 10px; background: #DEEBFF; color: var(--primary); }
.role-badge.admin { background: #FFF0B3; color: #7A5D00; }
.status-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.status-dot::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--success); }
.status-dot.inactive::before { background: var(--text-muted); }
.label-admin-list { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.label-admin-list .chip { display: flex; align-items: center; gap: 6px; padding: 4px 10px; }
.label-admin-list .chip button { background: none; border: none; color: #fff; opacity: 0.8; font-size: 12px; }
.inline-form { display: flex; gap: 8px; align-items: center; }
.inline-form input[type=text] { padding: 7px 10px; border: 1px solid var(--border); border-radius: var(--radius); }
.inline-form select { padding: 7px 10px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.view-hint { color: var(--text-muted); font-size: 13px; margin: -4px 0 12px; }

/* ---------- Modals ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(9, 30, 66, 0.5); display: flex; align-items: center; justify-content: center; z-index: 100;
}
.modal { background: var(--surface); border-radius: 10px; width: 900px; max-width: 94vw; max-height: 90vh; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,0.35); }
.small-modal { width: 440px; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); font-weight: 700; }
.modal-close { background: none; border: none; font-size: 22px; color: var(--text-muted); line-height: 1; }
.modal-body { padding: 20px; overflow-y: auto; }
.issue-modal-body { display: flex; gap: 24px; }
.issue-modal-main { flex: 1; min-width: 0; }
.issue-modal-side { width: 220px; flex-shrink: 0; }
.issue-title-input { width: 100%; font-size: 19px; font-weight: 700; border: none; resize: none; margin-bottom: 12px; font-family: inherit; }
.issue-title-input:focus, .issue-desc-input:focus { outline: 1px solid var(--primary); border-radius: 4px; }
.issue-desc-input { width: 100%; border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 10px; resize: vertical; margin-bottom: 8px; }
.issue-modal-side select, .issue-modal-side input { width: 100%; padding: 7px 8px; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 4px; }
.issue-parent-link { font-size: 12.5px; color: var(--text-muted); margin-bottom: 6px; }
.issue-parent-link a { color: var(--primary); text-decoration: none; font-weight: 600; cursor: pointer; }
.issue-parent-link a:hover { text-decoration: underline; }
.subtasks-section { margin: 8px 0 16px; }
.subtasks-header { display: flex; align-items: center; gap: 8px; }
.subtasks-header h4 { margin: 0; font-size: 14px; }
.subtasks-add { margin-left: auto; background: none; border: none; font-size: 20px; line-height: 1; color: var(--text-muted); padding: 2px 8px; border-radius: 4px; }
.subtasks-add:hover { background: var(--bg); color: var(--text); }
.subtasks-progress-bar { height: 4px; background: #EBECF0; border-radius: 2px; overflow: hidden; margin: 6px 0; }
.subtasks-progress-bar > span { display: block; height: 100%; background: #36B37E; }
.subtasks-list { display: flex; flex-direction: column; margin-top: 6px; border: 1px solid var(--border); border-radius: 6px; }
.subtasks-list:empty { display: none; }
.subtask-row { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-bottom: 1px solid var(--border); font-size: 13px; cursor: pointer; }
.subtask-row:last-child { border-bottom: none; }
.subtask-row:hover { background: var(--bg); }
.subtask-row .subtask-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.subtask-row.done .subtask-title { text-decoration: line-through; color: var(--text-muted); }
#form-add-subtask .inline-create { margin-top: 8px; }
.subtask-form-actions { display: flex; justify-content: flex-end; margin-top: 4px; }
.subtask-count { font-size: 11px; font-weight: 600; color: var(--text-muted); background: #EBECF0; border-radius: 4px; padding: 1px 6px; white-space: nowrap; }
.issue-card-parent { font-size: 11px; color: var(--text-muted); margin-bottom: 4px; }
.time-tracking { display: block; width: 100%; text-align: left; background: none; border: 1px solid transparent; border-radius: var(--radius); padding: 6px 4px; margin-bottom: 4px; cursor: pointer; }
.time-tracking:hover { background: var(--bg); border-color: var(--border); }
.time-bar { display: block; height: 6px; background: #EBECF0; border-radius: 3px; overflow: hidden; }
.time-bar > span { display: block; height: 100%; width: 0; background: var(--primary); }
.time-bar.over > span { background: #FF8B00; }
.time-tracking-text { display: flex; justify-content: space-between; gap: 6px; font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.time-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.time-form-grid label { margin-top: 0 !important; }
.time-field-error { color: #DE350B; font-size: 11.5px; min-height: 14px; margin-top: 2px; }
.time-help { font-size: 13px; color: var(--text); margin: 8px 0 0; }
.time-help ul { margin: 4px 0 0; padding-left: 20px; color: var(--text-muted); }
.worklog-list { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 8px; max-height: 160px; overflow-y: auto; }
.worklog-item { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; padding: 4px 0; color: var(--text-muted); }
.worklog-item strong { color: var(--text); }
.worklog-item button { background: none; border: none; color: #DE350B; font-size: 12px; padding: 2px 4px; }
.label-combobox { position: relative; }
.label-selected { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.label-selected:empty { display: none; }
.label-selected .chip { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; }
.label-selected .chip button { background: none; border: none; color: #fff; opacity: 0.8; padding: 0; font-size: 13px; line-height: 1; }
.label-selected .chip button:hover { opacity: 1; }
#issue-labels-input { width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius); }
#issue-labels-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.label-dropdown { position: absolute; left: 0; right: 0; top: 100%; margin-top: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 4px 12px rgba(9,30,66,0.2); max-height: 220px; overflow-y: auto; z-index: 20; padding: 4px 0; }
.label-dropdown-title { font-size: 11px; font-weight: 700; color: var(--text-muted); padding: 6px 12px 4px; }
.label-option { padding: 6px 12px; cursor: pointer; font-size: 13px; }
.label-option.highlighted { background: #DEEBFF; box-shadow: inset 2px 0 0 var(--primary); }
.label-option.create { color: var(--primary); font-weight: 600; }
.label-dropdown-empty { padding: 8px 12px; color: var(--text-muted); font-size: 13px; }

.comments-section, .activity-section { margin-top: 20px; border-top: 1px solid var(--border); padding-top: 14px; }
.comments-section h4, .activity-section h4 { margin: 0 0 10px; font-size: 13px; color: var(--text-muted); text-transform: uppercase; }
.comment { display: flex; gap: 10px; margin-bottom: 12px; }
.comment-body { background: var(--bg); border-radius: 8px; padding: 8px 12px; flex: 1; font-size: 13.5px; }
.comment-meta { font-size: 11px; color: var(--text-muted); margin-bottom: 4px; }
#form-add-comment { display: flex; gap: 8px; align-items: flex-start; }
#form-add-comment textarea { flex: 1; border: 1px solid var(--border); border-radius: var(--radius); padding: 8px; resize: vertical; }
.activity-list { font-size: 12.5px; color: var(--text-muted); }
.activity-item { padding: 4px 0; border-bottom: 1px dashed var(--border); }

.generic-form label { display: block; font-size: 12px; font-weight: 600; color: var(--text-muted); margin: 10px 0 4px; text-transform: uppercase; }
.generic-form input, .generic-form select, .generic-form textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius); }
.space-picker { border: 1px solid var(--border); border-radius: var(--radius); max-height: 200px; overflow-y: auto; }
.space-option { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 10px; border-bottom: 1px solid var(--border); }
.space-option:last-child { border-bottom: none; }
.generic-form .space-option label { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13.5px; font-weight: 500; color: var(--text); text-transform: none; cursor: pointer; }
.generic-form .space-option input[type=checkbox] { width: auto; }
.generic-form .space-option select { width: auto; padding: 4px 6px; font-size: 12.5px; }
.generic-form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--text); color: #fff; padding: 10px 18px; border-radius: var(--radius); font-size: 13.5px; z-index: 200; box-shadow: var(--shadow);
}
.toast.error { background: var(--danger); }
