/* ==========================================================================
   Sprigs Operations Console — Odoo 18 style, Sprigs green branding.
   Adapted from the NW CS Console CSS.
   ========================================================================== */

:root {
  --o-brand: #315440;
  --o-brand-dark: #243e35;
  --o-brand-light: #4a6b56;
  --o-ground: #f6f7f2;
  --o-sheet: #ffffff;
  --o-border: #d8ddd6;
  --o-border-light: #e7ebe2;
  --o-text: #374151;
  --o-text-strong: #111827;
  --o-muted: #6b7280;
  --o-primary: #315440;
  --o-success: #28a745;
  --o-success-bg: #d4edda;
  --o-success-border: #c3e6cb;
  --o-success-text: #155724;
  --o-info: #17a2b8;
  --o-info-bg: #d1ecf1;
  --o-info-text: #0c5460;
  --o-warning-bg: #fff3cd;
  --o-warning-border: #ffeeba;
  --o-warning-text: #856404;
  --o-danger: #dc3545;
  --o-danger-bg: #f8d7da;
  --o-danger-border: #f5c6cb;
  --o-danger-text: #721c24;
  --o-row-h: 40px;
  --o-radius: 4px;
  --o-shadow: 0 1px 2px rgba(0,0,0,.08), 0 1px 6px rgba(0,0,0,.05);
  --o-font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--o-font);
  font-size: 13px;
  line-height: 1.45;
  color: var(--o-text);
  background: var(--o-ground);
  -webkit-font-smoothing: antialiased;
}
h1,h2,h3,h4,h5 { color: var(--o-text-strong); font-weight: 600; margin: 0 0 .4em; }
a { color: var(--o-primary); text-decoration: none; cursor: pointer; }
a:hover { text-decoration: underline; }
table { border-collapse: collapse; }
input, select, textarea, button { font-family: inherit; font-size: inherit; }

.o_boot_msg { padding: 40px; text-align: center; color: var(--o-muted); }

/* ---------- App shell / navbar ---------- */
.o_web_client { display: flex; flex-direction: column; height: 100vh; overflow: hidden; }
.o_navbar {
  display: flex; align-items: center; gap: 12px;
  background: var(--o-brand); color: #fff;
  height: 46px; padding: 0 12px; flex: none;
  box-shadow: 0 1px 2px rgba(0,0,0,.18);
  z-index: 200;
}
.o_navbar .o_menu_brand {
  font-weight: 600; font-size: 15px; color: #fff; white-space: nowrap;
  cursor: pointer;
}
.o_navbar .o_menu_brand:hover { text-decoration: none; opacity: .9; }
.o_navbar_spacer { flex: 1; }
.o_navbar .o_nav_entry {
  background: none; border: none; color: rgba(255,255,255,.85);
  font-size: 13px; padding: 6px 10px; cursor: pointer; border-radius: var(--o-radius);
}
.o_navbar .o_nav_entry:hover { background: rgba(255,255,255,.12); color: #fff; }
.o_navbar .o_nav_entry.active { background: rgba(255,255,255,.18); color: #fff; font-weight: 600; }
.o_user_menu { position: relative; }
.o_navbar .o_user_chip {
  display: flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.12); border-radius: 14px;
  padding: 3px 12px; font-size: 12px; white-space: nowrap; cursor: pointer;
}
.o_navbar .o_user_chip:hover { background: rgba(255,255,255,.2); }
.o_user_caret { font-size: 9px; opacity: .7; }
.o_user_dropdown {
  display: none; position: absolute; right: 0; top: 100%; margin-top: 4px;
  background: var(--o-sheet); border: 1px solid var(--o-border); border-radius: var(--o-radius);
  box-shadow: 0 4px 12px rgba(0,0,0,.12); min-width: 160px; z-index: 100; overflow: hidden;
}
.o_user_dropdown.open { display: block; }
.o_user_dropdown_item {
  display: block; width: 100%; text-align: left; padding: 8px 14px; font-size: 13px;
  border: none; background: none; color: var(--o-text); cursor: pointer;
}
.o_user_dropdown_item:hover { background: var(--o-ground); }

/* ---------- User management ---------- */
.o_user_list { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.o_user_card {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 16px; background: var(--o-sheet); border: 1px solid var(--o-border-light);
  border-radius: var(--o-radius);
}
.o_user_card_name { font-weight: 600; font-size: 14px; color: var(--o-text-strong); }
.o_user_card_email { font-size: 12px; color: var(--o-muted); }
.o_user_card_meta { font-size: 11px; }
.o_user_card_form { display: flex; align-items: center; gap: 8px; }
.o_user_card_msg { font-size: 12px; min-width: 80px; }
.o_user_card_actions { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.o_user_card_pw { display: flex; align-items: center; gap: 6px; }
.o_user_card_mgmt { display: flex; gap: 6px; }
.o_role_badge {
  display: inline-block; font-size: 11px; padding: 1px 8px; border-radius: 10px;
  font-weight: 500; vertical-align: middle; margin-left: 6px;
}
.o_role_manager { background: var(--o-brand); color: #fff; }
.o_role_user { background: var(--o-border-light); color: var(--o-muted); }
.o_add_user_section { border-top: 1px solid var(--o-border-light); padding-top: 16px; margin-top: 16px; }
.o_add_user_form { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.o_add_user_fields { display: flex; gap: 10px; flex-wrap: wrap; }
.o_add_user_fields label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 500; color: var(--o-muted); }
.btn-danger { background: var(--o-danger, #d32f2f); color: #fff; border: none; }
.btn-danger:hover { opacity: .85; }

/* ---------- Customer views ---------- */
.o_customer_search { margin: 12px 0; }
.o_customer_list { margin-top: 8px; }
.o_list_table { width: 100%; border-collapse: collapse; font-size: 13px; }
.o_list_table th { text-align: left; padding: 8px 10px; border-bottom: 2px solid var(--o-border); font-weight: 600; font-size: 12px; color: var(--o-muted); text-transform: uppercase; letter-spacing: .3px; }
.o_list_table td { padding: 8px 10px; border-bottom: 1px solid var(--o-border-light); }
.o_list_row { cursor: pointer; }
.o_list_row:hover { background: var(--o-bg-muted); }
.o_customer_name { font-weight: 500; color: var(--o-text-strong); }
.o_pager { display: flex; gap: 8px; margin-top: 12px; justify-content: center; }
.o_customer_header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.o_stat_cards { display: flex; gap: 12px; margin: 16px 0; flex-wrap: wrap; }
.o_stat_card { background: var(--o-sheet); border: 1px solid var(--o-border-light); border-radius: var(--o-radius); padding: 12px 20px; min-width: 100px; text-align: center; }
.o_stat_value { font-size: 20px; font-weight: 700; color: var(--o-text-strong); }
.o_stat_label { font-size: 11px; color: var(--o-muted); text-transform: uppercase; letter-spacing: .3px; margin-top: 2px; }
.o_customer_cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 16px; }
@media (max-width: 768px) { .o_customer_cols { grid-template-columns: 1fr; } }
.o_customer_col h3 { font-size: 15px; margin: 0 0 10px; color: var(--o-text-strong); }
.o_detail_table { width: 100%; font-size: 13px; }
.o_detail_table td { padding: 4px 0; vertical-align: top; }
.o_detail_label { font-weight: 500; color: var(--o-muted); width: 120px; padding-right: 12px; }
.o_customer_notes { font-size: 13px; color: var(--o-text); line-height: 1.5; }

.o_action_manager { flex: 1; display: flex; flex-direction: column; min-height: 0; }

/* ---------- Control panel ---------- */
.o_control_panel {
  background: var(--o-sheet);
  border-bottom: 1px solid var(--o-border);
  padding: 8px 16px;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  flex: none; z-index: 100;
}
.o_breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 15px; min-width: 0; }
.o_breadcrumb a { color: var(--o-primary); }
.o_breadcrumb .sep { color: var(--o-muted); }
.o_breadcrumb .active { font-weight: 600; color: var(--o-text-strong);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid transparent; border-radius: var(--o-radius);
  padding: 5px 12px; font-size: 13px; font-weight: 500;
  cursor: pointer; background: #fff; color: var(--o-text);
  white-space: nowrap; line-height: 1.4;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--o-brand); border-color: var(--o-brand); color: #fff; }
.btn-primary:not(:disabled):hover { background: var(--o-brand-dark); }
.btn-secondary { background: #fff; border-color: var(--o-border); color: var(--o-text); }
.btn-secondary:not(:disabled):hover { background: #f3f4f6; }
.btn-danger { background: var(--o-danger); border-color: var(--o-danger); color: #fff; }
.btn-link { background: none; border: none; color: var(--o-primary); padding: 0; }
.btn-link:hover { text-decoration: underline; }
.btn-sm { padding: 2px 8px; font-size: 12px; }

/* ---------- Content / sheet ---------- */
.o_content { flex: 1; overflow: auto; padding: 16px; }
.o_form_sheet {
  background: var(--o-sheet); border: 1px solid var(--o-border);
  border-radius: var(--o-radius); box-shadow: var(--o-shadow);
  padding: 24px 32px; max-width: 1200px; margin: 0 auto;
}

/* ---------- Lists ---------- */
.o_list_view {
  background: var(--o-sheet); border: 1px solid var(--o-border);
  border-radius: var(--o-radius); box-shadow: var(--o-shadow); overflow: auto;
}
.o_list_table { width: 100%; font-size: 13px; }
.o_list_table th {
  text-align: left; font-weight: 600; color: var(--o-muted); font-size: 12px;
  padding: 0 10px; height: 34px; border-bottom: 1px solid var(--o-border);
  background: var(--o-sheet); position: sticky; top: 0; white-space: nowrap;
}
.o_list_table td {
  padding: 0 10px; height: var(--o-row-h);
  border-bottom: 1px solid var(--o-border-light); vertical-align: middle;
}
.o_list_table tbody tr { cursor: pointer; }
.o_list_table tbody tr:hover { background: #f1f3ee; }
.o_list_empty { padding: 24px; text-align: center; color: var(--o-muted); }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  border-radius: 10px; padding: 2px 9px; font-size: 11px; font-weight: 600;
  background: #e5e7eb; color: var(--o-text); white-space: nowrap; vertical-align: middle;
}
.badge-success { background: var(--o-success-bg); color: var(--o-success-text); }
.badge-warning { background: var(--o-warning-bg); color: var(--o-warning-text); }
.badge-danger { background: var(--o-danger-bg); color: var(--o-danger-text); }
.badge-info { background: var(--o-info-bg); color: var(--o-info-text); }
.badge-brand { background: #e2eeda; color: var(--o-brand-dark); }

/* ---------- Stats ---------- */
.o_stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 16px 0; }
.o_stat {
  background: var(--o-sheet); border: 1px solid var(--o-border); border-radius: var(--o-radius);
  box-shadow: var(--o-shadow); padding: 16px;
}
.o_stat .label { font-size: 12px; color: var(--o-muted); }
.o_stat .value { font-size: 28px; font-weight: 600; color: var(--o-text-strong); margin: 4px 0; }
.o_stat .note { font-size: 11px; color: var(--o-muted); }

/* ---------- Step bar (clickable nav) ---------- */
.o_step_bar { display: flex; gap: 6px; flex-wrap: wrap; }
.o_step_item {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 18px; border-radius: var(--o-radius); font-size: 13px; font-weight: 600;
  background: #f3f4f6; color: var(--o-muted); border: 1px solid var(--o-border-light);
  cursor: pointer; transition: all 0.15s ease;
}
.o_step_item:hover { background: #e9ebee; color: var(--o-text); }
.o_step_item.done { background: var(--o-success-bg); color: var(--o-success-text); border-color: var(--o-success-border); }
.o_step_item.done:hover { background: #d4edda; }
.o_step_item.current {
  background: var(--o-brand); color: #fff; border-color: var(--o-brand-dark);
  box-shadow: 0 2px 8px rgba(49, 84, 64, 0.25);
}
.o_step_item.current:hover { background: var(--o-brand-dark); }
.o_step_item.selected {
  outline: 2px solid var(--o-brand); outline-offset: 2px;
}
.o_step_count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; font-size: 10px; font-weight: 700;
  background: rgba(0,0,0,0.1); color: inherit;
}
.o_step_item.current .o_step_count { background: rgba(255,255,255,0.25); }

/* ---------- Step action buttons ---------- */
.o_step_actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }

/* ---------- Two-column meeting content ---------- */
.o_meeting_content {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px;
}
.o_meeting_content.tx-collapsed {
  grid-template-columns: 1fr 40px;
}
@media (max-width: 900px) {
  .o_meeting_content { grid-template-columns: 1fr; }
  .o_meeting_content.tx-collapsed { grid-template-columns: 1fr 40px; }
}
.o_notes_panel, .o_transcript_panel {
  position: relative;
  background: var(--o-sheet); border: 1px solid var(--o-border);
  border-radius: var(--o-radius); padding: 16px; min-height: 200px;
  max-height: 600px; overflow-y: auto;
}
.o_panel_title { font-size: 14px; font-weight: 600; margin: 0 0 12px; }

/* Collapsible transcript — horizontal collapse to right strip */
.o_tx_toggle {
  display: flex; align-items: center; gap: 8px;
  background: none; border: none; padding: 0 0 12px; cursor: pointer;
  font-size: 14px; font-weight: 600; color: var(--o-text-strong);
}
.o_tx_toggle:hover { color: var(--o-brand); }
.o_tx_chevron { font-size: 10px; flex-shrink: 0; }
.o_tx_toggle_label { white-space: nowrap; }

/* Collapsed state: narrow vertical strip */
.o_transcript_panel.collapsed {
  padding: 12px 0; min-height: 200px; overflow: hidden;
  display: flex; align-items: flex-start; justify-content: center;
}
.o_transcript_panel.collapsed .o_tx_toggle {
  writing-mode: vertical-lr; padding: 0;
  flex-direction: column; align-items: center; gap: 10px;
}
.o_transcript_panel.collapsed .o_tx_body { display: none; }

.o_transcript_panel .o_transcript { font-size: 12px; max-height: none; }

/* ---------- Step panels (one per step, toggled by nav) ---------- */
.o_step_panel { display: none; }
.o_step_panel.active { display: block; }

/* ---------- Per-person blocks (Good News, Rating) ---------- */
.o_person_block {
  padding: 12px 0; border-bottom: 1px solid var(--o-border-light);
}
.o_person_block:last-child { border-bottom: none; }
.o_person_name { font-weight: 600; font-size: 13px; color: var(--o-text-strong); margin-bottom: 4px; }
.o_person_news { font-size: 13px; margin: 0; line-height: 1.5; }
.o_segue_row { display: flex; align-items: center; gap: 8px; margin: 4px 0; }
.o_segue_row p { margin: 0; font-size: 13px; line-height: 1.6; flex: 1; }
.o_segue_row .o_sug_edit { border: none; border-radius: 4px; padding: 3px 10px; font-size: 11px; cursor: pointer; font-weight: 500; flex-shrink: 0; }
.o_segue_row .o_sug_edit_input { width: 100%; flex: 1; padding: 4px 8px; border: 1px solid var(--o-border); border-radius: 4px; font-size: 13px; resize: vertical; font-family: inherit; }
.o_rating_score { font-size: 18px; font-weight: 700; color: var(--o-brand); }

/* ---------- Chips ---------- */
.o_chip_list { display: flex; flex-wrap: wrap; gap: 6px; }
.o_chip {
  display: inline-block; padding: 5px 12px; background: #f3f4f6;
  border: 1px solid var(--o-border-light); border-radius: 14px;
  font-size: 12px; color: var(--o-text);
}

/* ---------- Cards ---------- */
.o_card {
  background: var(--o-sheet); border: 1px solid var(--o-border); border-radius: var(--o-radius);
  box-shadow: var(--o-shadow); padding: 16px; margin: 12px 0;
}
.o_card h3 { font-size: 14px; margin: 0 0 8px; }
.o_card p { margin: 0; font-size: 13px; line-height: 1.6; color: var(--o-text); }

/* ---------- Suggestion cards ---------- */
.o_suggestion { background: #fafbf7; border: 1px solid var(--o-border-light); border-radius: var(--o-radius); padding: 12px 16px; margin: 6px 0; }
/* ---------- Meeting Review ---------- */
.o_review_wrap { padding: 4px 0; }
.o_review_section { margin-bottom: 20px; }
.o_review_section h4 { font-size: 14px; font-weight: 600; color: var(--o-text-strong); margin: 0 0 8px; padding-bottom: 6px; border-bottom: 1px solid var(--o-border-light); }
.o_review_list { list-style: none; padding: 0; margin: 0; }
.o_review_list li { padding: 6px 0; border-bottom: 1px solid var(--o-border-light); font-size: 13px; line-height: 1.5; }
.o_review_list li:last-child { border-bottom: none; }
.o_review_owner { color: var(--o-muted); font-size: 12px; }
.o_review_done { color: var(--o-muted); text-decoration: line-through; }

/* ---------- IDS drag ---------- */
.o_ids_card { cursor: grab; transition: box-shadow 0.15s, opacity 0.15s; }
.o_ids_card.dragging { opacity: 0.4; box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
.o_drag_handle { cursor: grab; color: var(--o-muted); font-size: 16px; line-height: 1; user-select: none; }
.o_suggestion.accepted { background: var(--o-success-bg); border-color: var(--o-success-border); }
.o_suggestion.rejected { opacity: 0.5; }
.o_suggestion .header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.o_suggestion .owner { font-size: 12px; color: var(--o-muted); }
.o_suggestion p { margin: 0; font-size: 13px; line-height: 1.6; }
.o_suggestion .o_sug_actions { display: flex; gap: 6px; margin-left: auto; }
.o_suggestion .o_sug_actions button {
  border: none; border-radius: 4px; padding: 3px 10px; font-size: 11px;
  cursor: pointer; font-weight: 500; transition: opacity 0.15s;
}
.o_suggestion .o_sug_actions button:hover { opacity: 0.8; }
.o_sug_accept { background: var(--o-success-bg); color: var(--o-success-text); }
.o_sug_edit { background: var(--o-info-bg); color: var(--o-info-text); }
.o_sug_delete { background: var(--o-danger-bg); color: var(--o-danger-text); }
.o_sug_restore { background: var(--o-warning-bg); color: var(--o-warning-text); }
.o_suggestion .o_sug_edit_input {
  width: 100%; border: 1px solid var(--o-border); border-radius: 4px;
  padding: 4px 8px; font-size: 13px; margin-top: 6px;
}
.o_suggestion blockquote {
  margin: 8px 0 0; padding: 6px 12px; border-left: 3px solid var(--o-border);
  color: var(--o-muted); font-size: 12px; font-style: italic;
}
.o_quote_link {
  cursor: pointer;
  transition: color 0.15s ease;
}
.o_quote_link:hover { color: var(--o-brand); }
.o_declined_section { margin-top: 16px; }
.o_declined_toggle {
  display: flex; align-items: center; gap: 6px; cursor: pointer;
  font-size: 12px; color: var(--o-muted); border: none; background: none;
  padding: 4px 0; width: 100%; text-align: left;
}
.o_declined_toggle:hover { color: var(--o-text); }
.o_declined_toggle .chevron { transition: transform 0.2s; display: inline-block; }
.o_declined_toggle.open .chevron { transform: rotate(90deg); }
.o_declined_list { display: none; }
.o_declined_list.open { display: block; }
.o_declined_list .o_suggestion { opacity: 0.6; }
.o_todo_row.suggestion .o_sug_actions { display: flex; gap: 4px; margin-left: auto; flex-shrink: 0; }
.o_todo_row.suggestion .o_sug_actions button {
  border: none; border-radius: 4px; padding: 2px 8px; font-size: 11px;
  cursor: pointer; font-weight: 500;
}

/* ---------- Alerts ---------- */
.alert {
  border: 1px solid transparent; border-radius: var(--o-radius);
  padding: 9px 14px; margin: 0 0 10px; font-size: 13px;
}
.alert-warning { background: var(--o-warning-bg); border-color: var(--o-warning-border); color: var(--o-warning-text); }
.alert-danger { background: var(--o-danger-bg); border-color: var(--o-danger-border); color: var(--o-danger-text); }
.alert-success { background: var(--o-success-bg); border-color: var(--o-success-border); color: var(--o-success-text); }
.alert-info { background: var(--o-info-bg); border-color: #bee5eb; color: var(--o-info-text); }

/* ---------- Toasts ---------- */
.o_notification_manager {
  position: fixed; top: 56px; right: 12px; z-index: 2000;
  display: flex; flex-direction: column; gap: 8px; width: 340px; max-width: 92vw;
}
.o_notification {
  background: #fff; border-radius: var(--o-radius);
  border-left: 4px solid var(--o-muted);
  box-shadow: 0 4px 14px rgba(0,0,0,.22);
  padding: 10px 12px; display: flex; gap: 10px; align-items: flex-start;
  animation: o_toast_in .18s ease-out;
}
@keyframes o_toast_in { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; } }
.o_notification .body { flex: 1; min-width: 0; }
.o_notification .title { font-weight: 600; color: var(--o-text-strong); margin-bottom: 2px; }
.o_notification .msg { white-space: pre-wrap; word-wrap: break-word; }
.o_notification .o_close {
  background: none; border: none; color: var(--o-muted); cursor: pointer;
  font-size: 16px; line-height: 1; padding: 0 2px; flex: none;
}
.o_notification.info { border-left-color: var(--o-info); }
.o_notification.success { border-left-color: var(--o-success); }
.o_notification.warning { border-left-color: #ffc107; background: #fffdf5; }
.o_notification.danger { border-left-color: var(--o-danger); background: #fff6f7; }

/* ---------- Login ---------- */
.o_login_wrap {
  min-height: calc(100vh - 46px); display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.o_login_card {
  background: #fff; border: 1px solid var(--o-border); border-radius: 8px;
  box-shadow: var(--o-shadow); width: 380px; max-width: 96vw; padding: 28px;
}
.o_login_card h2 { text-align: center; font-size: 20px; }
.o_login_card .subtitle { text-align: center; color: var(--o-muted); font-size: 13px; margin-bottom: 16px; }
.o_login_card label { display: block; font-size: 12px; font-weight: 600; color: var(--o-text); margin-top: 14px; }
.o_login_card .o_input { margin-top: 6px; }
.o_login_card .btn-primary { width: 100%; margin-top: 18px; padding: 9px; }
.o_login_error { color: var(--o-danger-text); font-size: 13px; margin-top: 10px; min-height: 18px; }

.o_input {
  border: 1px solid var(--o-border); border-radius: var(--o-radius);
  padding: 7px 10px; background: #fff; width: 100%;
}
.o_input:focus { outline: 2px solid rgba(49,84,64,.3); border-color: var(--o-brand); }

/* ---------- Dashboard grid ---------- */
.o_dashboard { max-width: 1200px; margin: 0 auto; }
.o_dashboard h1 { font-size: 22px; margin: 0 0 4px; }
.o_dashboard .subtitle { color: var(--o-muted); font-size: 13px; margin-bottom: 16px; }
.o_cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 900px) { .o_cols { grid-template-columns: 1fr; } }
.o_section_title {
  font-size: 12px; font-weight: 600; color: var(--o-muted); text-transform: uppercase;
  letter-spacing: .5px; margin: 0 0 8px;
}

/* ---------- Transcript ---------- */
.o_transcript {
  white-space: pre-wrap; font-size: 12px; line-height: 1.8; color: var(--o-text);
  max-height: 500px; overflow-y: auto; padding: 14px;
  background: #fafbf7; border-radius: var(--o-radius); border: 1px solid var(--o-border-light);
}

/* ---------- Start Meeting button ---------- */
.o_start_meeting_btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 16px 24px; margin: 16px 0;
  background: var(--o-brand); border: 2px solid var(--o-brand); border-radius: 8px;
  color: #fff; font-size: 18px; font-weight: 700; cursor: pointer;
  transition: all 0.15s ease;
}
.o_start_meeting_btn:not(:disabled):hover {
  background: var(--o-brand-dark); border-color: var(--o-brand-dark);
  box-shadow: 0 4px 16px rgba(49, 84, 64, 0.35);
}
.o_start_meeting_btn:disabled { opacity: .6; cursor: not-allowed; }

/* ---------- Meeting timer ---------- */
.o_meeting_timer {
  display: flex; align-items: center; gap: 10px;
  background: #edf7f0; border: 1px solid var(--o-success-border); border-radius: 6px;
  padding: 10px 16px; margin: 12px 0;
}
.o_timer_dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--o-success); flex-shrink: 0;
  animation: o_pulse 1.5s ease-in-out infinite;
}
@keyframes o_pulse { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }
.o_timer_label { font-size: 13px; font-weight: 600; color: var(--o-success-text); flex: 1; }
.o_timer_digits {
  font-size: 22px; font-weight: 700; color: var(--o-brand);
  font-variant-numeric: tabular-nums; letter-spacing: 0.5px;
}

/* ---------- Misc ---------- */
.text-muted { color: var(--o-muted); }
.text-strong { color: var(--o-text-strong); font-weight: 600; }
.mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; } .mb8 { margin-bottom: 8px; }
.flex { display: flex; gap: 8px; align-items: center; }
.grow { flex: 1; }

/* ---------- Modals ---------- */
.o_dialog_backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.45);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 6vh 16px 16px; z-index: 1000; overflow: auto;
}
.o_dialog {
  background: #fff; border-radius: 6px; box-shadow: 0 10px 40px rgba(0,0,0,.35);
  width: 100%; max-width: 640px; display: flex; flex-direction: column; max-height: 86vh;
}
.o_dialog_header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 18px; border-bottom: 1px solid var(--o-border-light);
}
.o_dialog_header h4 { margin: 0; font-size: 16px; }
.o_dialog_header .o_close {
  background: none; border: none; font-size: 20px; line-height: 1;
  color: var(--o-muted); cursor: pointer; padding: 2px 6px;
}
.o_dialog_body { padding: 16px 18px; overflow: auto; }
.o_dialog_body label { font-size: 12px; font-weight: 600; color: var(--o-text); }
.o_dialog_body label .o_input { margin-top: 6px; }
.o_dialog_body select.o_input { appearance: auto; }
.o_dialog_footer {
  display: flex; gap: 8px; padding: 12px 18px;
  border-top: 1px solid var(--o-border-light);
}

/* ---------- To-Do List ---------- */
.o_todo_section { margin-bottom: 16px; }
.o_todo_section_header {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px;
}
.o_todo_section_header h4 { margin: 0; font-size: 13px; font-weight: 600; color: var(--o-text-strong); }
.o_todo_filters { display: flex; gap: 4px; }
.o_todo_filter {
  padding: 2px 10px; font-size: 11px; border-radius: 10px;
  background: #f3f4f6; border: 1px solid var(--o-border-light); color: var(--o-muted);
  cursor: pointer;
}
.o_todo_filter.active {
  background: var(--o-brand); border-color: var(--o-brand); color: #fff;
}
.o_todo_list { display: flex; flex-direction: column; gap: 2px; }
.o_todo_row {
  display: flex; align-items: center; gap: 8px; padding: 6px 8px;
  border-radius: var(--o-radius); transition: background 0.1s;
}
.o_todo_row:hover { background: #f6f7f2; }
.o_todo_row.done { opacity: 0.55; }
.o_todo_check {
  width: 16px; height: 16px; flex-shrink: 0; cursor: pointer;
  accent-color: var(--o-brand);
}
.o_todo_text {
  flex: 1; min-width: 0; border: none; background: transparent;
  font-size: 13px; color: var(--o-text); padding: 2px 4px; border-radius: 3px;
  outline: none; font-family: var(--o-font);
}
.o_todo_text:focus { background: #fff; box-shadow: 0 0 0 2px rgba(49,84,64,.2); }
.o_todo_text.checked { text-decoration: line-through; color: var(--o-muted); }
.o_todo_assignee {
  font-size: 11px; color: var(--o-muted); white-space: nowrap; flex-shrink: 0;
  background: #f3f4f6; padding: 2px 8px; border-radius: 10px;
}
.o_todo_row.suggestion { padding-left: 4px; }
.o_todo_row.suggestion .badge { flex-shrink: 0; }
.o_todo_add {
  display: flex; gap: 8px; margin-top: 12px; padding-top: 12px;
  border-top: 1px solid var(--o-border-light); align-items: center;
}
.o_todo_add .o_input { flex: 1; }
.o_todo_assignee_select { width: 140px; flex: none; }

/* ---------- Transcript Speaker Bubbles ---------- */
.o_tx_turns { display: flex; flex-direction: column; gap: 12px; }
.o_tx_turn {
  padding: 10px 12px; background: #fafbf7; border-radius: var(--o-radius);
  border-left: 3px solid var(--o-border);
}
.o_tx_speaker {
  display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px;
}
.o_tx_speaker_name { font-size: 12px; font-weight: 600; color: var(--o-text-strong); }
.o_tx_speaker_time { font-size: 11px; color: var(--o-muted); }
.o_tx_text {
  font-size: 12px; line-height: 1.6; color: var(--o-text);
  white-space: pre-wrap; word-wrap: break-word;
}
.o_tx_highlight {
  background: #fff8c5; border-left-color: var(--o-brand);
  transition: background 0.3s ease;
}
.o_tx_highlight.removing { background: #fafbf7; }
.o_tx_sel_popup {
  position: absolute; z-index: 10;
  background: var(--o-brand, #714B67); color: #fff; border-radius: 6px;
  padding: 2px; box-shadow: 0 2px 8px rgba(0,0,0,.18);
  pointer-events: auto;
}
.o_tx_sel_btn {
  background: none; border: none; color: #fff; font-size: 12px;
  font-weight: 600; padding: 4px 10px; cursor: pointer; white-space: nowrap;
}
.o_tx_sel_btn:hover { background: rgba(255,255,255,.15); border-radius: 4px; }

/* ---------- Meeting Log (Chatter) ---------- */
.o_chatter { margin-top: 24px; border-top: 1px solid var(--o-border-light); padding-top: 16px; }
.o_chatter_title { font-size: 14px; font-weight: 600; color: var(--o-text-strong); margin: 0 0 12px; }
.o_chatter_entry {
  padding: 8px 12px; margin: 0 0 8px; border-radius: var(--o-radius);
  background: #fafbf7; border-left: 3px solid var(--o-border);
}
.o_chatter_header { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.o_chatter_author { font-size: 12px; font-weight: 600; color: var(--o-text-strong); }
.o_chatter_time { font-size: 11px; color: var(--o-muted); }
.o_chatter_body { font-size: 12px; line-height: 1.5; color: var(--o-text); }
.o_chatter_tracking {
  font-size: 12px; color: var(--o-muted); font-style: italic;
  display: flex; align-items: center; gap: 2px;
}
.o_chatter_arrow { color: var(--o-brand); font-weight: 600; }
.o_chatter_new { font-weight: 600; color: var(--o-text-strong); }

/* ── Nav external links ───────────────────────── */
.o_nav_external {
  display: inline-flex; align-items: center; gap: 3px;
  text-decoration: none; color: inherit;
}
.o_nav_ext_icon { font-size: 10px; opacity: .6; }

/* ── ⌘K trigger button ────────────────────────── */
.o_cmd_k_trigger {
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2);
  border-radius: 4px; padding: 2px 8px; cursor: pointer;
  color: rgba(255,255,255,.7); font-size: 11px; font-family: inherit;
  transition: background .15s;
}
.o_cmd_k_trigger:hover { background: rgba(255,255,255,.2); color: #fff; }

/* ── Command Palette ──────────────────────────── */
.cmd-palette-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.45); display: flex;
  justify-content: center; padding-top: 15vh;
}
.cmd-palette {
  background: #fff; border-radius: 12px;
  box-shadow: 0 16px 48px rgba(0,0,0,.25);
  width: 480px; max-height: 400px; display: flex; flex-direction: column;
  overflow: hidden;
}
.cmd-palette-input {
  border: none; outline: none; padding: 14px 16px;
  font-size: 15px; border-bottom: 1px solid #e5e7eb;
  width: 100%; box-sizing: border-box;
}
.cmd-palette-list {
  flex: 1; overflow-y: auto; padding: 4px 0;
}
.cmd-palette-group {
  padding: 8px 16px 4px; font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .5px;
  color: #9ca3af;
}
.cmd-palette-item {
  padding: 8px 16px; cursor: pointer; display: flex;
  align-items: center; justify-content: space-between;
  font-size: 14px; color: #374151;
}
.cmd-palette-item.highlighted { background: #f3f4f6; }
.cmd-palette-item:hover { background: #f3f4f6; }
.cmd-palette-item-ext { font-size: 11px; color: #9ca3af; }
.cmd-palette-empty { padding: 16px; text-align: center; color: #9ca3af; }
.cmd-palette-hint {
  padding: 8px 16px; border-top: 1px solid #e5e7eb;
  font-size: 11px; color: #9ca3af;
}
.cmd-palette-hint kbd {
  background: #f3f4f6; border: 1px solid #d1d5db;
  border-radius: 3px; padding: 1px 4px; font-size: 10px;
  font-family: inherit;
}

/* ── Claude access badge ──────────────────────── */
.o_user_card_badges { display: inline-flex; gap: 4px; }
.o_role_claude {
  background: #7c3aed; color: #fff;
}

/* ── Grok bot section ─────────────────────────── */
.o_grok_section {
  margin-top: 32px; padding: 20px;
  background: #fafbf7; border-radius: var(--o-radius);
  border: 1px solid var(--o-border-light);
}
.o_grok_linked { display: flex; flex-direction: column; gap: 12px; }
.o_grok_status { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.o_grok_dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #9ca3af;
}
.o_grok_dot.connected { background: #22c55e; }
.o_grok_bot_id { font-family: monospace; font-size: 12px; }
.o_grok_actions { display: flex; gap: 8px; align-items: center; }
.o_grok_connect_row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

@media (max-width: 700px) {
  .o_stats { grid-template-columns: repeat(2, 1fr); }
  .o_form_sheet { padding: 16px; }
  .o_content { padding: 10px; }
  .o_todo_add { flex-wrap: wrap; }
  .o_todo_assignee_select { width: 100%; }
  .cmd-palette { width: 95vw; }
}

/* ── Bots page ─────────────────────────────────────────── */
.o_bots_section { margin: 24px 0; }
.o_bots_section h2 { font-size: 18px; margin: 0 0 8px; }
.o_bots_section h3 { font-size: 15px; margin: 16px 0 6px; }
.o_bot_table td { vertical-align: top; }
.o_bot_actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.o_bot_form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 8px 0; }
.o_bot_input { width: auto; min-width: 120px; display: inline-block; }
.o_bot_caps { display: flex; flex-wrap: wrap; gap: 10px; }
.o_bot_cap { white-space: nowrap; }
.o_bot_role { display: inline-flex; align-items: center; gap: 4px; margin: 0 8px 4px 0; }
.o_bot_access { border-top: 1px solid var(--o-border, #ddd); padding-top: 12px; }
.o_bot_keybox code { word-break: break-all; user-select: all; }
.o_bot_pill { text-transform: lowercase; }
.o_bot_active, .o_bot_live { background: #dcfce7; color: #166534; }
.o_bot_pending, .o_bot_approved, .o_bot_trial { background: #fef9c3; color: #854d0e; }
.o_bot_revoked, .o_bot_denied, .o_bot_withdrawn { background: #fee2e2; color: #991b1b; }

/* Approve bots badge (Users page) */
.o_role_approver { background: #fef3c7; color: #92400e; }

/* Approval card: the request's purpose (Bots page) */
.o_bot_purpose { margin-top: 4px; font-size: 12px; color: #374151; max-width: 34em; white-space: pre-wrap; }

/* ---------- Company switcher (top corner) ---------- */
.o_navbar.o_menu_open { z-index: 2100; }   /* an open navbar menu sits above notifications (2000) */
.o_navbar .o_company_chip { font-weight: 600; }
.o_navbar .o_company_single {
  font-size: 12px; padding: 3px 12px; border-radius: 14px; white-space: nowrap;
  border: 1px solid rgba(255,255,255,.25); color: rgba(255,255,255,.9);
}
.o_company_menu .o_user_dropdown { min-width: 200px; }
.o_company_menu_label {
  padding: 8px 14px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--o-muted);
}
.o_company_row { display: flex; align-items: center; gap: 2px; padding-left: 12px; }
.o_company_row .o_company_name { flex: 1; padding-left: 6px; }
.o_company_row.active .o_company_name { font-weight: 600; }
.o_company_row.active .o_company_name::after { content: ' · working here'; font-weight: 400; color: var(--o-muted); font-size: 11px; }
.o_company_tick { width: 15px; height: 15px; accent-color: var(--o-brand); cursor: pointer; margin: 0; }
.o_company_tick:disabled { cursor: default; opacity: .6; }
.o_company_menu_hint { padding: 6px 14px 8px; font-size: 11px; color: var(--o-muted); max-width: 230px; line-height: 1.35; }
.o_company_more {
  font-size: 10px; font-weight: 700; padding: 0 5px; border-radius: 8px; margin-left: 2px;
  background: rgba(255,255,255,.22);
}
/* Which company a project or card is in, shown while several companies are ticked */
.pm-company-tag {
  display: inline-block; font-size: 10px; font-weight: 600; padding: 1px 6px; border-radius: 8px; white-space: nowrap;
  background: #eef2f7; color: #475569; border: 1px solid #dbe3ec; vertical-align: middle;
}
