/* responsive.css — ALL mobile / responsive media queries */
/* ============================================================================
   RESPONSIVE / MOBILE STYLES
   ============================================================================ */

@media (max-width: 1024px) {
  .summary-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .kanban-col {
    width: 200px;
  }
}

/* Old 768px block removed — superseded by authoritative block at ~line 3131 */

@media (max-width: 480px) {
  #content {
    padding: 16px 12px;
  }

  .page-title {
    font-size: 20px;
  }

  .summary-cards {
    grid-template-columns: 1fr;
  }

  .home-cards {
    grid-template-columns: 1fr;
  }

  .sf-row {
    grid-template-columns: 1fr;
  }

  .kanban-board {
    flex-direction: column;
  }

  .kanban-col {
    width: 100%;
  }

  .agent-card {
    margin-bottom: 8px;
  }

  .settings-tabs {
    flex-wrap: wrap;
  }
}

/* ============================================================================
   MOBILE TOGGLE BUTTON
   ============================================================================ */

.mobile-toggle {
  display: none;
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 999;
  width: 48px;
  height: 48px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  cursor: pointer;
  border: none;
}


/* ===== RESPONSIVE: MOBILE (MAX 768px) ===== */
@media (max-width: 768px) {
  .email-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 12px 12px;
  }

  .email-sender {
    min-width: unset;
    max-width: unset;
    width: 100%;
  }

  .email-subject-preview {
    width: 100%;
    flex-direction: row;
    gap: 6px;
    align-items: baseline;
  }

  .email-subject {
    flex: 1;
  }

  .email-preview {
    display: none;
  }

  .email-date {
    min-width: unset;
    text-align: left;
    font-size: 12px;
  }

  .email-detail-header {
    padding: 8px 12px;
    gap: 4px;
  }

  .email-detail-subject {
    font-size: 15px !important;
    margin-top: 2px !important;
    margin-bottom: 4px !important;
    line-height: 1.2;
  }

  .email-detail-meta {
    gap: 2px !important;
    margin-top: 2px !important;
    font-size: 12px !important;
  }

  .email-detail-meta-row {
    font-size: 12px;
    line-height: 1.3;
    display: inline;
  }

  .email-detail-meta-row + .email-detail-meta-row::before {
    content: " · ";
    color: var(--text-secondary);
  }

  .email-detail-meta-label {
    font-size: 12px;
  }

  .email-detail-field {
    gap: 1px;
  }

  .email-detail-label {
    font-size: 11px;
  }

  .email-detail-value {
    font-size: 13px;
  }

  .email-detail-body {
    padding: 10px 12px;
    font-size: 13px;
  }

  .email-back-btn {
    padding: 4px 10px;
    font-size: 12px;
    margin-bottom: 8px;
  }

  .email-reply-form {
    padding: 16px 12px;
  }

  .email-folder-tabs {
    padding: 0 12px;
    overflow-x: auto;
  }

  .email-folder-tab {
    padding: 10px 12px;
    font-size: 13px;
  }

  .email-toolbar {
    padding: 10px 12px;
    gap: 8px;
    flex-wrap: wrap;
  }

  .email-add-form {
    max-width: 100%;
  }

  .email-detail-subject {
    font-size: 18px;
  }

  .email-reply-actions {
    flex-direction: column;
  }

  .email-reply-actions button {
    width: 100%;
  }
}

/* Email page layout */
.email-page {
  max-width: 100%;
  padding: 24px;
}
.email-header {
  margin-bottom: 16px;
}
.email-toolbar {
  justify-content: space-between;
}
.email-toolbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.email-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.email-folder-select {
  padding: 8px 12px;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
}
.email-refresh-btn {
  padding: 8px;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
}
.email-refresh-btn:hover {
  background: var(--bg-hover);
}
.email-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
}
.email-list-item:hover {
  background: var(--bg-hover);
}
.email-list-item.email-unread {
  background: rgba(35,131,226,0.04);
}
.email-list-item-left {
  flex-shrink: 0;
  width: 12px;
  display: flex;
  align-items: center;
}
.email-unread-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}
.email-list-item-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.email-list-from {
  font-size: 14px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.email-unread .email-list-from {
  font-weight: 600;
}
.email-list-subject {
  font-size: 13px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.email-bold {
  font-weight: 600;
}
.email-list-preview {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.email-list-date {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--text-secondary);
  min-width: 60px;
  text-align: right;
}
.email-back-btn {
  padding: 6px 12px;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  margin-bottom: 16px;
  display: inline-block;
}
.email-back-btn:hover {
  background: var(--bg-hover);
}
.email-detail-header {
  margin-bottom: 16px;
}
.email-detail-subject {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 12px;
}
.email-detail-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.email-detail-meta-row {
  font-size: 13px;
  color: var(--text-secondary);
}
.email-detail-meta-label {
  font-weight: 600;
  color: var(--text-primary);
  margin-right: 6px;
}
.email-detail-body {
  padding: 16px 0;
  border-top: 1px solid var(--border);
  margin-top: 16px;
}
.email-detail-body iframe {
  width: 100%;
  min-height: 300px;
  border: none;
  background: white;
  border-radius: 8px;
}
.email-detail-actions {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.email-page-btn {
  padding: 6px 12px;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
}
.email-page-btn:hover {
  background: var(--bg-hover);
}
.email-page-active {
  background: var(--accent) !important;
  color: white !important;
  border-color: var(--accent) !important;
}

@media (max-width: 768px) {
  .email-page { padding: 12px; }
  .email-toolbar { flex-wrap: wrap; }
  .email-toolbar-left { flex: 1; min-width: 0; }
  .email-account-select, .email-folder-select { width: 100%; font-size: 13px; }
  .email-list-item { padding: 10px 12px; }
  .email-list-preview { display: none; }
  .email-detail-header { padding: 8px 12px; margin-bottom: 6px; }
  .email-detail-subject { font-size: 16px !important; font-weight: 600; margin-bottom: 4px !important; }
  .email-detail-meta { flex-direction: row !important; flex-wrap: wrap; gap: 4px 12px !important; font-size: 12px !important; }
  .email-detail-meta-row { font-size: 12px; }
  .email-detail-body { padding: 10px 12px; margin-top: 8px; }
  .email-back-btn { padding: 4px 10px; font-size: 12px; margin-bottom: 6px; }
}


/* ── WIDE PAGES (kanban, board) ──────────────────────────────────────────── */
#content.content-wide {
  padding-left: 24px !important;
  padding-right: 24px !important;
}
#content.content-wide .page-content,
#content.content-wide #page-content {
  max-width: none !important;
  width: 100% !important;
}
/* fallback: CSS :has() for modern browsers */
#content:has(.kanban-wrap) {
  padding-left: 24px !important;
  padding-right: 24px !important;
}
#page-content:has(.kanban-wrap) {
  max-width: none !important;
  width: 100% !important;
}

/* user mini-menu */
.user-menu-item { display:flex;align-items:center;gap:8px;padding:7px 14px;font-size:13px;color:var(--text);cursor:pointer;transition:background 120ms; }
.user-menu-item:hover { background:var(--hover); }
.user-menu-item svg { flex-shrink:0;color:var(--text-secondary); }
.user-menu-danger { color:#E03E3E !important; }
.user-menu-danger svg { color:#E03E3E !important; }

/* ══════════════════════════════════════════════════════
   WORKSPACE TASK MANAGER — Notion-style
   Appended to notion.css
   ══════════════════════════════════════════════════════ */

/* ── Layout ──────────────────────────────────────────── */
.wst-wrap {
  display: flex;
  flex-direction: row;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  font-family: var(--font, ui-sans-serif, system-ui, sans-serif);
  position: relative;
}
.wst-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  min-width: 0;
}
.wst-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 200px;
  color: var(--text-secondary, #9b9b9b);
  font-size: 14px;
}

/* ── Header ──────────────────────────────────────────── */
.wst-header {
  padding: 28px 24px 8px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.wst-header-left {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.wst-header-icon {
  font-size: 28px;
  line-height: 1;
  margin-top: 2px;
}
.wst-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text, #1a1a1a);
  margin: 0 0 4px;
  line-height: 1.2;
}
.wst-desc {
  font-size: 13px;
  color: var(--text-secondary, #666);
  margin: 0;
}

/* ── Toolbar ─────────────────────────────────────────── */
.wst-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px 0 24px;
  border-bottom: 1px solid var(--border, #e8e8e8);
  gap: 8px;
  flex-shrink: 0;
}
.wst-tabs {
  display: flex;
  gap: 2px;
}
.wst-tab {
  background: none;
  border: none;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text-secondary, #666);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  font-family: var(--font, inherit);
  transition: color 120ms, border-color 120ms;
}
.wst-tab:hover { color: var(--text, #1a1a1a); }
.wst-tab-active {
  color: var(--text, #1a1a1a) !important;
  border-bottom-color: var(--text, #1a1a1a) !important;
  font-weight: 500;
}
.wst-toolbar-right {
  display: flex;
  align-items: center;
  gap: 4px;
}
.wst-icon-btn {
  background: none;
  border: none;
  padding: 5px 7px;
  border-radius: 5px;
  cursor: pointer;
  color: var(--text-secondary, #666);
  display: flex;
  align-items: center;
  transition: background 120ms;
}
.wst-icon-btn:hover { background: var(--hover, #f1f1f0); }
.wst-btn-new {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--font, inherit);
  margin-left: 6px;
  transition: background 120ms;
}
.wst-btn-new:hover { background: #1a6dbf; }

/* ── Table wrap ──────────────────────────────────────── */
.wst-table-wrap {
  flex: 1;
  overflow: auto;
}
.wst-table-container {
  min-width: 100%;
  overflow-x: auto;
}

/* ── Table ───────────────────────────────────────────── */
.wst-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  table-layout: fixed;
}
.wst-thead-row {
  border-bottom: 1px solid var(--border, #e8e8e8);
  position: sticky;
  top: 0;
  background: var(--bg, #fff);
  z-index: 2;
}
.wst-th {
  padding: 7px 10px;
  text-align: left;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary, #888);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  user-select: none;
  border-right: 1px solid transparent;
}
.wst-th:hover { background: var(--hover, #f1f1f0); }
.wst-th-check { width: 36px; cursor: default; }
.wst-th-check:hover { background: none; }
.wst-th-add { width: 36px; text-align: center; color: var(--text-placeholder, #ccc); cursor: pointer; }
.wst-th-add:hover { background: var(--hover, #f1f1f0); color: var(--text-secondary, #888); }
.wst-th-more { width: 36px; text-align: center; cursor: default; }
.wst-th-info { font-size: 10px; color: var(--text-placeholder, #ccc); }

/* Column widths */
.wst-table { table-layout: auto; }
.wst-th:nth-child(2), .wst-td-name { min-width: 220px; max-width: 360px; }
.wst-th:nth-child(3), .wst-td-status { width: 130px; }
.wst-th:nth-child(4), .wst-td-resp { width: 120px; }
.wst-th:nth-child(5), .wst-td-plazo { width: 110px; }
.wst-th:nth-child(6), .wst-td-pri { width: 90px; }
.wst-th:nth-child(7), .wst-td-tipo { width: 160px; }
.wst-th:nth-child(8), .wst-td-desc { width: 180px; }
.wst-th:nth-child(9), .wst-td-esf { width: 110px; }

/* ── Rows ─────────────────────────────────────────────── */
.wst-row {
  border-bottom: 1px solid var(--border, #f0f0f0);
  cursor: pointer;
  transition: background 80ms;
}
.wst-row:hover { background: var(--hover, #f7f6f3); }
.wst-td {
  padding: 7px 10px;
  color: var(--text, #1a1a1a);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}
.wst-td-check { width: 36px; }
.wst-cb-all, .wst-cb-row {
  cursor: pointer;
  accent-color: var(--accent);
}
.wst-row-name { font-weight: 450; }
.wst-status-cell {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.wst-status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.wst-status-label { font-size: 13px; }
.wst-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
}
.wst-td-desc-text {
  color: var(--text-secondary, #888);
  font-size: 12px;
}

/* New task row */
.wst-row-new {
  cursor: pointer;
  border-bottom: 1px solid transparent;
}
.wst-row-new:hover { background: var(--hover, #f7f6f3); }
.wst-td-new {
  padding: 8px 10px;
  color: var(--text-placeholder, #aaa);
  font-size: 13px;
}

/* ── Status groups (by-status view) ─────────────────── */
.wst-groups {
  padding: 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.wst-group {}
.wst-group-header {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
  padding: 4px 0;
}
.wst-group-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text, #1a1a1a);
}
.wst-group-count {
  font-size: 12px;
  color: var(--text-secondary, #888);
  background: var(--hover, #f1f1f0);
  border-radius: 10px;
  padding: 1px 7px;
}
.wst-group-add {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary, #888);
  font-size: 16px;
  padding: 0 4px;
  line-height: 1;
  margin-left: auto;
  border-radius: 8px;
}
.wst-group-add:hover { background: var(--hover, #f1f1f0); }
.wst-group-empty {
  font-size: 12px;
  color: var(--text-placeholder, #aaa);
  padding: 6px 4px;
}
.wst-table-group { border: 1px solid var(--border, #e8e8e8); border-radius: 8px; overflow: hidden; }
.wst-group-new-btn {
  display: block;
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  padding: 10px 4px;
  font-size: 13px;
  color: var(--text-placeholder, #aaa);
  cursor: pointer;
  font-family: var(--font, inherit);
}
.wst-group-new-btn:hover { color: var(--text-secondary, #666); }

/* ── Dropdown menu ───────────────────────────────────── */
.wst-dropdown-menu {
  position: absolute;
  z-index: 1000;
  background: #fff;
  border: 1px solid var(--border, #e8e8e8);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  min-width: 160px;
  padding: 4px 0;
  font-family: var(--font, inherit);
}
.wst-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text, #1a1a1a);
  transition: background 80ms;
}
.wst-dropdown-item:hover { background: var(--hover, #f7f6f3); }

/* ── Column header context menu ──────────────────────── */
.wst-col-menu {
  position: absolute;
  z-index: 1000;
  background: #fff;
  border: 1px solid var(--border, #e8e8e8);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  min-width: 220px;
  padding: 6px 0;
  font-family: var(--font, inherit);
}
.wst-col-menu-field {
  padding: 6px 10px 8px;
}
.wst-col-menu-input {
  width: 100%;
  border: 1px solid var(--border, #e8e8e8);
  border-radius: 5px;
  padding: 5px 8px;
  font-size: 13px;
  font-family: var(--font, inherit);
  color: var(--text, #1a1a1a);
  outline: none;
  box-sizing: border-box;
}
.wst-col-menu-input:focus { border-color: var(--accent); }
.wst-col-menu-sep {
  height: 1px;
  background: var(--border, #f0f0f0);
  margin: 4px 0;
}
.wst-col-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text, #1a1a1a);
  transition: background 80ms;
}
.wst-col-menu-item:hover { background: var(--hover, #f7f6f3); }
.wst-col-menu-item-grey { color: var(--text-placeholder, #bbb); }
.wst-col-menu-icon { width: 18px; text-align: center; flex-shrink: 0; }
.wst-col-menu-arrow { margin-left: auto; color: var(--text-secondary, #aaa); }

/* ── Side panel ──────────────────────────────────────── */
.wst-panel {
  width: 420px;
  min-width: 360px;
  flex-shrink: 0;
  border-left: 1px solid var(--border, #e8e8e8);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  background: #fff;
  transition: width 200ms ease, opacity 200ms;
}
.wst-panel-hidden {
  display: none !important;
}
.wst-panel-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 12px 6px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border, #f0f0f0);
}
.wst-panel-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 7px;
  border-radius: 5px;
  font-size: 15px;
  color: var(--text-secondary, #888);
  font-family: var(--font, inherit);
  transition: background 100ms;
}
.wst-panel-btn:hover { background: var(--hover, #f1f1f0); }
.wst-panel-title-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 16px 16px 8px;
}
.wst-panel-icon {
  font-size: 22px;
  flex-shrink: 0;
  margin-top: 2px;
}
.wst-panel-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text, #1a1a1a);
  flex: 1;
  outline: none;
  word-break: break-word;
  line-height: 1.3;
  cursor: text;
  border-radius: 8px;
  padding: 2px 4px;
  min-height: 24px;
}
.wst-panel-title:hover { background: var(--hover, #f7f6f3); }
.wst-panel-title:focus { background: var(--hover, #f7f6f3); }
.wst-panel-fields {
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.wst-panel-field {
  display: flex;
  align-items: flex-start;
  gap: 0;
  min-height: 34px;
}
.wst-panel-field-label {
  width: 120px;
  flex-shrink: 0;
  font-size: 12px;
  color: var(--text-secondary, #888);
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 0;
}
.wst-panel-field-value {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 5px 4px;
  min-height: 32px;
}
.wst-panel-input {
  flex: 1;
  font-size: 13px;
  color: var(--text, #1a1a1a);
  outline: none;
  border-radius: 8px;
  padding: 4px 6px;
  cursor: text;
  min-width: 60px;
  min-height: 20px;
}
.wst-panel-input:empty:before {
  content: attr(data-placeholder);
  color: var(--text-placeholder, #ccc);
}
.wst-panel-input:hover, .wst-panel-input:focus { background: var(--hover, #f7f6f3); }
.wst-panel-select {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  border-radius: 8px;
  padding: 4px 6px;
  font-size: 13px;
  min-width: 60px;
  transition: background 80ms;
}
.wst-panel-select:hover { background: var(--hover, #f7f6f3); }
.wst-panel-select-empty { color: var(--text-placeholder, #ccc); font-size: 13px; }
.wst-panel-date {
  font-size: 13px;
  color: var(--text, #1a1a1a);
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font, inherit);
  padding: 4px 6px;
  border-radius: 8px;
  cursor: pointer;
}
.wst-panel-date:hover { background: var(--hover, #f7f6f3); }
.wst-panel-sep {
  height: 1px;
  background: var(--border, #f0f0f0);
  margin: 10px 0;
}
.wst-panel-section {
  padding: 0 16px 10px;
}
.wst-panel-section-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary, #888);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 8px;
}
.wst-panel-desc {
  font-size: 13px;
  color: var(--text, #1a1a1a);
  line-height: 1.6;
  outline: none;
  min-height: 60px;
  border-radius: 8px;
  padding: 8px 8px;
  word-break: break-word;
}
.wst-panel-desc:empty:before {
  content: attr(data-placeholder);
  color: var(--text-placeholder, #ccc);
}
.wst-panel-desc:hover, .wst-panel-desc:focus { background: var(--hover, #f7f6f3); }

/* Subtasks */
.wst-subtasks { display: flex; flex-direction: column; gap: 4px; }
.wst-subtask-item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 3px 4px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
}
.wst-subtask-item:hover { background: var(--hover, #f7f6f3); }
.wst-subtask-item input[type=checkbox] { accent-color: #22c55e; cursor: pointer; }
.wst-subtask-label { flex: 1; color: var(--text, #1a1a1a); }
.wst-subtask-done { text-decoration: line-through; color: var(--text-secondary, #888); }
.wst-subtask-add {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-placeholder, #aaa);
  padding: 4px 4px;
  margin-top: 4px;
  font-family: var(--font, inherit);
  text-align: left;
  border-radius: 8px;
}
.wst-subtask-add:hover { background: var(--hover, #f7f6f3); color: var(--text-secondary, #666); }
.wst-subtask-new-row { padding: 3px 0; }
.wst-subtask-new-input {
  width: 100%;
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 5px 8px;
  font-size: 13px;
  font-family: var(--font, inherit);
  outline: none;
  box-sizing: border-box;
}

/* Files */
.wst-files { display: flex; flex-direction: column; gap: 4px; }
.wst-file-item { display: flex; align-items: center; gap: 7px; font-size: 13px; padding: 4px; border-radius: 8px; }
.wst-file-item:hover { background: var(--hover, #f7f6f3); }
.wst-file-icon { font-size: 14px; }
.wst-file-name { color: var(--text, #1a1a1a); }
.wst-files-empty { font-size: 12px; color: var(--text-placeholder, #aaa); padding: 2px 4px; }

/* Comments */
.wst-comment-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-bottom: 10px;
}
.wst-comment-ava {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}
.wst-comment-input {
  flex: 1;
  border: 1px solid var(--border, #e8e8e8);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 13px;
  outline: none;
  min-height: 32px;
  color: var(--text, #1a1a1a);
  font-family: var(--font, inherit);
}
.wst-comment-input:empty:before {
  content: attr(data-placeholder);
  color: var(--text-placeholder, #ccc);
}
.wst-comment-input:focus { border-color: var(--accent); }
.wst-comment { display: flex; gap: 8px; margin-bottom: 8px; }
.wst-comment-body { flex: 1; }
.wst-comment-meta { font-size: 12px; margin-bottom: 2px; }
.wst-comment-time { color: var(--text-secondary, #888); margin-left: 4px; }
.wst-comment-text { font-size: 13px; color: var(--text, #1a1a1a); line-height: 1.5; }

/* ── Toast ────────────────────────────────────────────── */
.wst-toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1a1a1a;
  color: #fff;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 13px;
  z-index: 9999;
  opacity: 0;
  transition: opacity 200ms, transform 200ms;
  pointer-events: none;
  white-space: nowrap;
  font-family: var(--font, inherit);
}
.wst-toast-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 768px) {
  .wst-wrap { position: relative; }
  .wst-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    max-width: 100%;
    z-index: 200;
    border-left: none;
    box-shadow: -4px 0 20px rgba(0,0,0,.15);
  }
  .wst-panel-hidden {
    display: none !important;
  }
  .wst-table { min-width: 600px; }
  .wst-table-wrap { overflow-x: auto; }
  .wst-toolbar { padding: 0 12px; }
  .wst-header { padding: 16px 12px 6px; }
  .wst-tab { padding: 8px 8px; font-size: 12px; }
}
@media (min-width: 769px) and (max-width: 1100px) {
  .wst-panel { width: 360px; }
}

/* Tasks full width override */
#page-content:has(.wst-wrap) {
  max-width: none !important;
  width: 100% !important;
  padding: 0 !important;
  overflow: hidden !important;
  height: 100% !important;
}
#content:has(.wst-wrap), .content:has(.wst-wrap) {
  overflow: hidden !important;
}
.wst-dropdown-danger:hover { background: #fee2e2 !important; }

.cal-time-col { }
.cal-time-slot {
  height:60px; display:flex; align-items:flex-start; justify-content:flex-end;
  padding:0 6px 0 0; font-size:10px; color:#aaa; padding-top:2px;
}
.cal-day-col {
  border-left:1px solid #f0f0f0; position:relative;
}
.cal-day-slot { height:60px; border-bottom:1px solid #f5f5f5; cursor:pointer; transition:background .1s; }
.cal-day-slot:hover { background:#fafafa; }
.cal-day-slot.half { border-bottom:1px dashed #f0f0f0; }
.meetings-page-v2 { padding:32px 48px; max-width:900px; }
.meetings-page-v2 h1 { font-size:32px; font-weight:700; color:#1a1a2e; margin:0 0 4px; }
.meetings-subtitle { font-size:14px; color:#6b7280; margin:0 0 32px; }
.meetings-toolbar {
  display:flex; align-items:center; gap:10px; margin-bottom:24px;
}
.btn-new-meeting {
  display:flex; align-items:center; gap:6px; padding:8px 16px;
  background:var(--accent); color:#fff; border:none; border-radius:8px;
  font-size:13px; font-weight:500; cursor:pointer; transition:background .15s;
}
.btn-new-meeting:hover { background:var(--accent-hover); }
.btn-new-meeting svg { width:14px; height:14px; }
.meetings-filter-btn {
  padding:7px 14px; border:1px solid var(--border); background:#fff;
  border-radius:8px; font-size:13px; color:#444; cursor:pointer; transition:background .15s;
}
.meetings-filter-btn:hover { background:#f5f5f5; }
.meetings-filter-btn.active { background:#f0f0f0; border-color:var(--border); }

.meetings-section { margin-bottom:32px; }
.meetings-section-title {
  font-size:11px; font-weight:600; color:#aaa; text-transform:uppercase;
  letter-spacing:.6px; margin:0 0 10px; padding-bottom:6px;
  border-bottom:1px solid #f0f0f0;
}
.meeting-card {
  display:flex; align-items:flex-start; gap:14px; padding:14px 16px;
  border:1px solid var(--border); border-radius:12px; margin-bottom:8px;
  cursor:pointer; transition:all .15s; background:#fff;
}
.meeting-card:hover { border-color:var(--border); background:#fafafa; box-shadow:0 2px 8px rgba(0,0,0,.06); }
.meeting-date-badge {
  flex-shrink:0; width:44px; text-align:center; background:#f7f7f7;
  border-radius:8px; padding:6px 4px;
}
.meeting-date-badge .mbday { font-size:20px; font-weight:700; color:#1a1a2e; line-height:1; }
.meeting-date-badge .mbmon { font-size:10px; color:#6b7280; text-transform:uppercase; margin-top:2px; }
.meeting-info { flex:1; }
.meeting-title { font-size:14px; font-weight:600; color:#1a1a2e; margin:0 0 4px; }
.meeting-time { font-size:12px; color:#6b7280; margin:0 0 6px; display:flex; align-items:center; gap:4px; }
.meeting-attendees { display:flex; align-items:center; gap:-4px; }
.attendee-av {
  width:22px; height:22px; border-radius:50%; background:var(--accent);
  color:#fff; font-size:10px; font-weight:600; display:flex; align-items:center;
  justify-content:center; border:2px solid #fff; margin-left:-6px;
}
.attendee-av:first-child { margin-left:0; }
.meeting-actions { display:flex; flex-direction:column; align-items:flex-end; gap:6px; flex-shrink:0; }
.btn-transcribe {
  display:flex; align-items:center; gap:5px; padding:5px 12px;
  background:#fff; border:1px solid var(--border); border-radius:8px;
  font-size:12px; color:#444; cursor:pointer; transition:all .15s;
}
.btn-transcribe:hover { border-color:var(--accent); color:var(--accent); }
.meeting-status-badge {
  font-size:10px; padding:3px 8px; border-radius:20px; font-weight:500;
}
.msb-upcoming { background:#e8f5e9; color:#2e7d32; }
.msb-today { background:#fff3e0; color:#e65100; }
.msb-past { background:#f5f5f5; color:#6b7280; }

.ai-noter-section {
  border:1px solid var(--border); border-radius:12px; padding:24px;
  background:linear-gradient(135deg, var(--accent-light) 0%, var(--accent-light) 100%);
  margin-bottom:28px;
}
.ai-noter-header { display:flex; align-items:center; gap:12px; margin-bottom:12px; }
.ai-noter-icon {
  width:40px; height:40px; background:var(--accent); border-radius:12px;
  display:flex; align-items:center; justify-content:center; color:#fff; font-size:18px;
}
.ai-noter-title { font-size:16px; font-weight:600; color:#1a1a2e; }
.ai-noter-desc { font-size:13px; color:#6b7280; margin:0 0 16px; line-height:1.5; }
.ai-noter-actions { display:flex; gap:10px; flex-wrap:wrap; }
.btn-noter-primary {
  display:flex; align-items:center; gap:6px; padding:9px 18px;
  background:var(--accent); color:#fff; border:none; border-radius:8px;
  font-size:13px; font-weight:500; cursor:pointer; transition:background .15s;
}
.btn-noter-primary:hover { background:var(--accent-hover); }
.btn-noter-secondary {
  padding:9px 18px; background:#fff; border:1px solid var(--border);
  border-radius:8px; font-size:13px; color:#444; cursor:pointer; transition:all .15s;
}
.btn-noter-secondary:hover { background:#f5f5f5; border-color:var(--border); }
.cal-connect-link {
  font-size:13px; color:var(--accent); cursor:pointer; text-decoration:none;
  display:inline-flex; align-items:center; gap:4px; padding:9px 0;
}
.cal-connect-link:hover { text-decoration:underline; }

.meeting-empty {
  padding:40px; text-align:center; color:#aaa;
}
.meeting-empty svg { width:48px; height:48px; margin-bottom:12px; opacity:.3; }
.meeting-empty p { font-size:14px; }

.ai-noter-section {
  border:1px solid var(--border); border-radius:12px; padding:24px;
  background:linear-gradient(135deg, #f8fffe 0%, #f0f9f8 100%);
  margin-bottom:28px;
}
.ai-noter-header { display:flex; align-items:center; gap:12px; margin-bottom:12px; }
.ai-noter-icon {
  width:40px; height:40px; background:var(--accent); border-radius:10px;
  display:flex; align-items:center; justify-content:center; color:#fff; font-size:18px;
}
.ai-noter-title { font-size:16px; font-weight:600; color:#1a1a2e; }
.ai-noter-desc { font-size:13px; color:#6b7280; margin:0 0 16px; line-height:1.5; }
.ai-noter-actions { display:flex; gap:10px; flex-wrap:wrap; }
.btn-noter-primary {
  display:flex; align-items:center; gap:6px; padding:9px 18px;
  background:var(--accent); color:#fff; border:none; border-radius:8px;
  font-size:13px; font-weight:500; cursor:pointer; transition:background .15s;
}
.btn-noter-primary:hover { background:var(--accent-hover); }
.btn-noter-secondary {
  padding:9px 18px; background:#fff; border:1px solid var(--border);
  border-radius:8px; font-size:13px; color:#444; cursor:pointer; transition:all .15s;
}
.btn-noter-secondary:hover { background:#f5f5f5; border-color:#ccc; }
.cal-connect-link {
  font-size:13px; color:var(--accent); cursor:pointer; text-decoration:none;
  display:inline-flex; align-items:center; gap:4px; padding:9px 0;
}
.cal-connect-link:hover { text-decoration:underline; }

.meeting-empty {
  padding:40px; text-align:center; color:#aaa;
}
.meeting-empty svg { width:48px; height:48px; margin-bottom:12px; opacity:.3; }
.meeting-empty p { font-size:14px; }

.wsd-section-label {
  padding: 6px 14px 4px; font-size: 11px; font-weight: 500;
  color: var(--text-secondary); text-transform: uppercase; letter-spacing: .04em;
}
.wsd-ws-list {
  padding: 0 6px 2px; max-height: 240px; overflow-y: auto;
}
.wsd-ws-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; cursor: pointer; font-size: 13px;
  color: var(--text-primary); border-radius: 6px; transition: background .1s;
  margin: 1px 0; min-height: 38px;
}
.wsd-ws-row:hover { background: var(--bg-hover); }
.wsd-ws-active { background: rgba(45,90,86,.08); font-weight: 600; }
.wsd-ws-active:hover { background: rgba(45,90,86,.12); }
.wsd-ws-row-icon {
  width: 28px; height: 28px; border-radius: 6px; background: var(--bg-hover);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 14px; font-weight: 600; overflow: hidden;
  border: 1px solid rgba(0,0,0,.06);
}
.wsd-ws-row-icon img {
  width: 100%; height: 100%; object-fit: cover;
}
.wsd-ws-row-name {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.wsd-ws-row-new {
  color: var(--text-secondary); border: 1px dashed var(--border);
  background: transparent;
}
.wsd-ws-row-new:hover { background: var(--bg-hover); border-color: transparent; }

.ws-dropdown-item {
  padding: 7px 14px; font-size: 13px; color: var(--text-secondary);
  cursor: pointer; transition: background .1s;
  display: flex; align-items: center; gap: 8px;
}
.ws-dropdown-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.ws-dropdown-danger { color: #ef4444; }
.ws-dropdown-danger:hover { background: #fff1f1; color: #dc2626; }


/* ═══════════════════════════════════════════════════
   PAGE TITLE v2
═══════════════════════════════════════════════════ */
.page-title-v2 {
  font-size: 32px; font-weight: 700; color: var(--text-primary);
  margin: 0 0 4px; line-height: 1.2;
}
.page-subtitle-v2 {
  font-size: 14px; color: var(--text-secondary); margin: 0 0 24px;
}

/* ═══════════════════════════════════════════════════
   FILTER TABS
═══════════════════════════════════════════════════ */
.filter-tabs {
  display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap;
}
.filter-tab {
  padding: 7px 16px; border-radius: 20px; font-size: 13px; font-weight: 500;
  border: 1.5px solid var(--border); background: var(--bg-primary);
  color: var(--text-secondary); cursor: pointer; transition: all .15s;
  white-space: nowrap;
}
.filter-tab:hover { border-color: var(--accent); color: var(--accent); }
.filter-tab.active {
  background: var(--accent); border-color: var(--accent);
  color: #fff; font-weight: 600;
}

/* ═══════════════════════════════════════════════════
   AGENTS GRID v2
═══════════════════════════════════════════════════ */
.agents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.agent-card-v2 {
  background: var(--bg-primary); border: 1.5px solid var(--border);
  border-radius: 12px; padding: 20px; cursor: pointer;
  transition: box-shadow .15s, border-color .15s;
  display: flex; flex-direction: column; gap: 16px;
}
.agent-card-v2:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,.08); border-color: rgba(45,90,86,.3);
}
.acv2-top {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
}
.acv2-name {
  font-size: 15px; font-weight: 700; color: var(--text-primary);
  text-transform: uppercase; letter-spacing: .03em; margin-bottom: 4px;
}
.acv2-cat {
  font-size: 13px; color: var(--text-secondary);
}
.acv2-stats {
  display: flex; gap: 16px; font-size: 13px; color: var(--text-secondary);
}
.acv2-stats span { display: flex; align-items: center; gap: 4px; }

/* Agent status badges */
.abadge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 500;
  white-space: nowrap; flex-shrink: 0;
}
.abadge-active  { background: #d1fae5; color: #065f46; }
.abadge-inactive { background: #f3f4f6; color: #6b7280; }
.abadge-error   { background: #fee2e2; color: #991b1b; }
.abadge-running { background: #dbeafe; color: #1e40af; }

/* ═══════════════════════════════════════════════════
   AGENT MODAL
═══════════════════════════════════════════════════ */
#agent-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 1100;
  align-items: center; justify-content: center;
}
.agent-modal-box {
  background: var(--bg-primary); border-radius: 16px;
  width: 480px; max-width: calc(100vw - 32px);
  box-shadow: 0 20px 60px rgba(0,0,0,.25); overflow: hidden;
  padding: 28px 28px 20px;
}
.agent-modal-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; margin-bottom: 16px;
}
#agent-modal-title {
  font-size: 22px; font-weight: 700; color: var(--text-primary);
  text-transform: uppercase; letter-spacing: .03em; margin: 0;
}
.agent-modal-desc {
  font-size: 14px; color: var(--text-secondary); line-height: 1.6;
  margin: 0 0 20px;
}
.agent-modal-rows {
  border-top: 1px solid var(--border);
}
.agent-modal-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0; border-bottom: 1px solid var(--border);
  font-size: 14px; color: var(--text-secondary);
}
.agent-modal-row span:last-child {
  font-weight: 500; color: var(--text-primary);
}
.agent-modal-foot {
  display: flex; justify-content: flex-end; margin-top: 20px;
}
.agent-modal-foot .btn-primary {
  padding: 10px 24px; font-size: 14px;
}

/* ═══════════════════════════════════════════════════
   METRICS TABLE inline bars
═══════════════════════════════════════════════════ */
.metrics-table-wrap { overflow-x: auto; margin-top: 16px; }
.metrics-tbl { width: 100%; }
.metrics-tbl th {
  font-size: 11px; font-weight: 600; color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: .06em;
  padding: 10px 16px; border-bottom: 2px solid var(--border);
  background: transparent; text-align: left;
}
.metrics-tbl td {
  padding: 14px 16px; font-size: 13px; border-bottom: 1px solid var(--border);
  color: var(--text-primary);
}
.metrics-tbl tr:last-child td { border-bottom: none; }
.metric-inline {
  display: flex; align-items: center; gap: 10px; min-width: 120px;
}
.metric-pct { font-size: 13px; font-weight: 500; min-width: 34px; }
.metric-bar-bg {
  flex: 1; height: 6px; background: #e5e7eb; border-radius: 3px; overflow: hidden;
}
.metric-bar-fill {
  height: 100%; border-radius: 3px; transition: width .3s;
}
.fill-green { background: #10b981; }
.fill-yellow { background: #f59e0b; }
.fill-red   { background: #ef4444; }

/* ═══════════════════════════════════════════════════
   INBOX TABS
═══════════════════════════════════════════════════ */
.inbox-account-tabs {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.inbox-atab {
  padding: 7px 18px; border-radius: 20px; font-size: 13px; font-weight: 500;
  border: 1.5px solid var(--border); background: var(--bg-primary);
  color: var(--text-secondary); cursor: pointer; transition: all .15s;
}
.inbox-atab:hover { border-color: var(--accent); color: var(--accent); }
.inbox-atab.active {
  background: var(--accent); border-color: var(--accent);
  color: #fff; font-weight: 600;
}

/* ═══════════════════════════════════════════════════
   AI CHAT v2
═══════════════════════════════════════════════════ */
.ai-chat-wrap {
  display: flex; flex-direction: column; gap: 0;
  border: 1.5px solid var(--border); border-radius: 12px;
  background: var(--bg-primary); overflow: hidden; max-width: 860px;
  margin-top: 8px;
}
.ai-chat-msgs {
  flex: 1; padding: 24px; display: flex; flex-direction: column; gap: 20px;
  overflow-y: auto; min-height: 320px; max-height: 480px;
}
.ai-msg-row {
  display: flex; align-items: flex-start; gap: 12px;
}
.ai-row-user { flex-direction: row; }
.ai-row-bot  { flex-direction: row; }
.ai-avatar {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #fff; letter-spacing: .02em;
}
.ai-av-user { background: var(--accent); }
.ai-av-bot  { background: #7c3aed; }
.ai-bubble {
  padding: 10px 14px; border-radius: 12px; font-size: 14px; line-height: 1.6;
  max-width: calc(100% - 50px);
}
.ai-bubble-user {
  background: transparent; color: var(--text-primary); padding: 6px 0;
}
.ai-bubble-bot {
  background: #f3f4f6; color: var(--text-primary);
}
.ai-input-area {
  display: flex; gap: 0; border-top: 1.5px solid var(--border);
  background: var(--bg-primary);
}
.ai-input {
  flex: 1; padding: 14px 16px; border: none; background: transparent;
  font-size: 14px; color: var(--text-primary); outline: none;
}
.ai-send-btn {
  padding: 12px 24px; background: var(--accent); color: #fff;
  border: none; cursor: pointer; font-size: 14px; font-weight: 500;
  transition: background .15s; flex-shrink: 0;
}
.ai-send-btn:hover { background: var(--accent-hover); }

/* ═══════════════════════════════════════════════════
   CALENDAR v2 month view
═══════════════════════════════════════════════════ */
.cal-page-v2 {
  padding: 0; display: flex; flex-direction: column; gap: 0; height: 100%;
}
.cal-page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; margin-bottom: 24px;
}
.cal-page-header .page-subtitle-v2 { margin-bottom: 0; }
.cal-month-nav {
  display: flex; align-items: center; gap: 12px; margin-bottom: 16px;
}
.cal-nav-arr {
  width: 32px; height: 32px; border-radius: 8px;
  border: 1.5px solid var(--border); background: var(--bg-primary);
  cursor: pointer; font-size: 16px; display: flex; align-items: center;
  justify-content: center; color: var(--text-primary); transition: all .15s;
}
.cal-nav-arr:hover { border-color: var(--accent); color: var(--accent); }
.cal-month-label {
  font-size: 18px; font-weight: 600; color: var(--text-primary); min-width: 140px;
}
.cal-month-grid-v2 {
  flex: 1; border: 1.5px solid var(--border); border-radius: 12px; overflow: hidden;
}

/* ═══════════════════════════════════════════════════
   TOGGLE SWITCH
═══════════════════════════════════════════════════ */
.toggle-sw {
  display: inline-flex; align-items: center; cursor: pointer;
  flex-shrink: 0; user-select: none;
}
.toggle-sw input[type="checkbox"] { display: none; }
.toggle-slider {
  width: 36px; height: 20px; border-radius: 10px; background: #d1d5db;
  position: relative; transition: background .2s; flex-shrink: 0;
}
.toggle-slider::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2);
  transition: transform .2s;
}
.toggle-sw input[type="checkbox"]:checked + .toggle-slider { background: var(--accent); }
.toggle-sw input[type="checkbox"]:checked + .toggle-slider::after { transform: translateX(16px); }

/* ═══════════════════════════════════════════════════
   SIDEBAR v2 (demo-live style)
═══════════════════════════════════════════════════ */

/* Override sidebar background to light cream */
#sidebar {
  background: #fbfbfa !important;
  border-right: 1px solid #e5e5e5 !important;
  width: 240px !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

/* Logo header */
.sdv2-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 16px 14px;
  border-bottom: 1px solid #e5e5e5;
  flex-shrink: 0;
}
.sdv2-logo-icon {
  width: 30px; height: 30px;
  background: #2d5a56;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 15px; font-weight: 700;
  flex-shrink: 0;
}
.sdv2-logo-name {
  font-size: 15px; font-weight: 600; color: #1a1a1a; letter-spacing: .01em;
}

/* Scroll area */
.sdv2-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}

/* Section labels */
.sdv2-section-label {
  font-size: 11px !important;
  font-weight: 600 !important;
  color: #aaa !important;
  text-transform: uppercase !important;
  letter-spacing: 0.08em !important;
  padding: 12px 16px 4px !important;
  margin: 0 !important;
}

/* Nav items - override all old styles */
#sidebar .sidebar-item {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 8px 12px !important;
  margin: 1px 8px !important;
  border-radius: 8px !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  color: #6b6b6b !important;
  cursor: pointer !important;
  background: transparent !important;
  transition: background .12s, color .12s !important;
  width: auto !important;
  border: none !important;
  box-shadow: none !important;
  text-decoration: none !important;
}
#sidebar .sidebar-item:hover {
  background: #e8f0ef !important;
  color: #1a1a1a !important;
}
#sidebar .sidebar-item.active {
  background: #e8f0ef !important;
  color: #2d5a56 !important;
  font-weight: 600 !important;
}
#sidebar .sidebar-item .nav-icon {
  width: 16px; height: 16px; flex-shrink: 0; opacity: .7;
}
#sidebar .sidebar-item.active .nav-icon,
#sidebar .sidebar-item:hover .nav-icon {
  opacity: 1;
}
#sidebar .sidebar-item .nav-label {
  flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#sidebar .sidebar-item .nav-badge {
  background: #ef4444; color: #fff;
  font-size: 11px; font-weight: 700;
  padding: 1px 6px; border-radius: 10px;
  margin-left: auto;
}
#sidebar .sidebar-item .nav-dots {
  font-size: 16px; color: #ccc; margin-left: auto;
  display: none;
}
/* User item in footer */
#sidebar .sidebar-footer {
  border-top: 1px solid #e5e5e5 !important;
  padding: 8px 0 !important;
  flex-shrink: 0;
  background: #fbfbfa !important;
}
#sidebar .sidebar-footer .sidebar-item {
  margin: 0 8px !important;
}
#sidebar .user-ava {
  width: 28px !important; height: 28px !important;
  font-size: 12px !important;
  background: #2d5a56 !important;
  border-radius: 50% !important;
  flex-shrink: 0;
}

/* Main area adjustment - match demo-live */
#main {
  background: #f7f7f5 !important;
}
#page-content {
  background: #f7f7f5 !important;
}

/* Page title / subtitle consistent with demo-live */
.page-title {
  font-size: 28px !important; font-weight: 700 !important;
  color: #1a1a1a !important; margin-bottom: 4px !important;
}
.page-subtitle, .page-subtitle-v2 {
  color: #6b6b6b !important; font-size: 14px !important; margin-bottom: 24px !important;
}

/* Card backgrounds - white cards on light bg */
.notion-card, .card, .kpi-card, .stat-card, .widget-card {
  background: #fff !important;
  border: 1px solid #e5e5e5 !important;
}

/* Topbar light */
#topbar {
  background: #fbfbfa !important;
  border-bottom: 1px solid #e5e5e5 !important;
}

/* Search button in light sidebar */
#sidebar .sidebar-search-btn {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  width: calc(100% - 16px) !important;
  margin: 6px 8px 2px !important;
  padding: 7px 12px !important;
  background: #f0f0ee !important;
  border: 1px solid #e5e5e5 !important;
  border-radius: 8px !important;
  font-size: 13px !important;
  color: #aaa !important;
  cursor: pointer !important;
  text-align: left !important;
  transition: border-color .12s !important;
}
#sidebar .sidebar-search-btn:hover {
  border-color: #2d5a56 !important;
  color: #666 !important;
}
#sidebar .sidebar-search-btn svg {
  width: 14px !important; height: 14px !important; flex-shrink: 0 !important;
}
#sidebar .sidebar-search-btn .kbd {
  margin-left: auto !important;
  font-size: 11px !important;
  color: #ccc !important;
  background: #e8e8e6 !important;
  padding: 1px 5px !important;
  border-radius: 4px !important;
}

/* ═══ WS-HEADER light theme ═══ */
#sidebar .sidebar-ws-header {
  background: transparent !important;
  border-bottom: 1px solid #e5e5e5 !important;
  padding: 14px 16px !important;
  cursor: pointer !important;
}
#sidebar .sidebar-ws-header:hover { background: #f0f0ee !important; }
#sidebar .ws-name { color: #1a1a1a !important; font-weight: 600 !important; font-size: 14px !important; }
#sidebar .ws-sub  { color: #aaa !important; font-size: 12px !important; }
#sidebar .ws-header-actions svg path { stroke: #aaa !important; }


/* ============================================================================
   MOBILE RESPONSIVE ADDITIONS — appended for complete mobile support
   ============================================================================ */

@media (max-width: 768px) {
  /* ── Global: prevent iOS auto-zoom on inputs ── */
  input, textarea, select { font-size: 16px !important; }

  /* ── Body safe areas ── */
  body {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
  }

  /* ── Meetings page responsive ── */
  .meetings-page-v2 { padding: 16px 12px !important; max-width: 100% !important; }
  .meetings-page-v2 h1 { font-size: 24px !important; }
  .meetings-toolbar { flex-wrap: wrap !important; gap: 8px !important; }
  .meeting-card { padding: 10px 12px !important; gap: 10px !important; }
  .meeting-actions { flex-direction: row !important; }
  .ai-noter-section { padding: 16px !important; }
  .ai-noter-actions { flex-direction: column !important; }
  .btn-noter-primary, .btn-noter-secondary { width: 100% !important; justify-content: center !important; }

  /* ── Modals & dropdowns safe widths ── */
  .ws-dropdown { left: 4px !important; width: calc(100vw - 16px) !important; max-width: calc(100vw - 16px) !important; }

  /* ── New page modal ── */
  #newpage-modal { width: 92vw !important; max-width: 92vw !important; }
}

/* ═══ SIDEBAR CLOSE BUTTON (mobile) ═══ */
.sidebar-close-btn { display: none; }
@media (max-width: 768px) {
  .sidebar-close-btn {
    display: block;
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    z-index: 10;
    line-height: 1;
    padding: 4px;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
  }
  .sidebar-close-btn:hover {
    background: rgba(0,0,0,0.08);
    color: #333;
  }
}

/* ═══ SIDEBAR BACKDROP (mobile) ═══ */
#sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 998;
  opacity: 0;
  transition: opacity 0.2s;
}
#sidebar-backdrop.show {
  display: block;
  opacity: 1;
}

/* ═══ CRITICAL MOBILE FIX: Ensure sidebar is fixed (not relative) on mobile ═══ */
@media (max-width: 768px) {
  #sidebar {
    position: fixed !important;
  }
  #main {
    margin-left: 0 !important;
    width: 100% !important;
  }
}

/* ═══ TOPBAR RESPONSIVE FIX ═══ */
@media (max-width: 768px) {
  .topbar, .top-bar, [class*="topbar"] {
    padding: 4px 8px !important;
    font-size: 12px !important;
    gap: 4px !important;
    flex-wrap: wrap !important;
  }
  .topbar .btn-text, .topbar span:not(.icon) {
    display: none !important;
  }
  .topbar button, .topbar a {
    padding: 4px !important;
    min-width: 28px !important;
  }
}
@media (max-width: 768px) {
  #topbar {
    width: 100% !important;
    padding: 0 8px !important;
    height: auto !important;
    min-height: 44px !important;
    flex-wrap: wrap !important;
    gap: 4px !important;
    box-sizing: border-box !important;
  }

  .breadcrumb {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    font-size: 12px !important;
    overflow: hidden !important;
  }

  .bc-item,
  .bc-current {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 120px !important;
    display: inline-block !important;
  }

  .bc-sep {
    flex-shrink: 0 !important;
  }

  .topbar-right {
    flex-shrink: 1 !important;
    gap: 2px !important;
    overflow: hidden !important;
    flex-wrap: nowrap !important;
  }

  .topbar-right .topbar-btn {
    width: 32px !important;
    height: 32px !important;
    flex-shrink: 0 !important;
  }

  .topbar-right .topbar-btn span {
    display: none !important;
  }

  .topbar-btn-icon {
    font-size: 14px !important;
    padding: 0 3px !important;
  }

  .live-dot {
    width: 6px !important;
    height: 6px !important;
  }
}

@media (max-width: 480px) {
  #topbar {
    padding: 0 6px !important;
  }

  .breadcrumb {
    font-size: 11px !important;
  }

  .bc-item,
  .bc-current {
    max-width: 80px !important;
  }

  .topbar-right .topbar-btn {
    width: 28px !important;
    height: 28px !important;
  }
}



/* ═══ TOPBAR MOBILE FIX ═══ */
@media (max-width: 768px) {
  #topbar {
    padding: 6px 10px !important;
    gap: 6px !important;
    min-height: 40px !important;
    height: auto !important;
  }
  .breadcrumb {
    flex: 1 !important;
    min-width: 0 !important;
    overflow: hidden !important;
  }
  .bc-current, .bc-item {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 100px !important;
    font-size: 13px !important;
  }
  .topbar-right {
    flex-shrink: 0 !important;
    gap: 4px !important;
    align-items: center !important;
  }
  .topbar-right .topbar-btn {
    padding: 4px 6px !important;
    font-size: 0 !important;
    min-width: auto !important;
  }
  .topbar-right .topbar-btn svg {
    width: 16px !important;
    height: 16px !important;
  }
  .topbar-right .topbar-btn-icon {
    font-size: 16px !important;
    padding: 4px !important;
  }
  .live-dot {
    gap: 4px !important;
    padding: 2px 6px !important;
    font-size: 11px !important;
  }
  #sync-text {
    display: none !important;
  }
  .live-dot-circle {
    width: 6px !important;
    height: 6px !important;
  }
}
