/* CONDUIT NOTION OS - BLOCK EDITOR & DRAG PROPERTIES */
:root[data-theme="light"] {
  --notion-bg: #FFFFFF;
  --notion-sidebar: #F7F7F5;
  --notion-sidebar-hover: #EFEFEF;
  --notion-hover: #F1F1EF;
  --notion-border: #E9E9E7;
  --notion-subtle: #F7F7F5;
  
  --text-main: #37352F;
  --text-muted: #787774;
  --text-light: #9B9A97;

  --tag-prospect-bg: #E1F0FF; --tag-prospect-txt: #0C66E4;
  --tag-proposal-bg: #FDF1D4; --tag-proposal-txt: #8F6B00;
  --tag-won-bg: #DDF3E4; --tag-won-txt: #1C6B37;
  --tag-mrr-bg: #F0E6FD; --tag-mrr-txt: #6E26B6;
  --tag-gray-bg: #EFEFEF; --tag-gray-txt: #555555;

  --accent-primary: #2383E2;
  --shadow-notion: 0px 1px 3px rgba(15, 15, 15, 0.08);
  --shadow-modal: 0px 12px 32px rgba(15, 15, 15, 0.16);
}

:root[data-theme="dark"] {
  --notion-bg: #191919;
  --notion-sidebar: #202020;
  --notion-sidebar-hover: #2F2F2F;
  --notion-hover: #2C2C2C;
  --notion-border: #2F2F2F;
  --notion-subtle: #252525;
  
  --text-main: #D4D4D4;
  --text-muted: #9B9B9B;
  --text-light: #6E6E6E;

  --tag-prospect-bg: rgba(12, 102, 228, 0.25); --tag-prospect-txt: #85B8FF;
  --tag-proposal-bg: rgba(143, 107, 0, 0.25); --tag-proposal-txt: #F5D98B;
  --tag-won-bg: rgba(28, 107, 55, 0.25); --tag-won-txt: #9FE1B5;
  --tag-mrr-bg: rgba(110, 38, 182, 0.25); --tag-mrr-txt: #D5B4F8;
  --tag-gray-bg: rgba(255, 255, 255, 0.1); --tag-gray-txt: #CCCCCC;

  --accent-primary: #2383E2;
  --shadow-notion: 0px 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-modal: 0px 12px 32px rgba(0, 0, 0, 0.6);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--notion-bg);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
  min-height: 100vh;
  display: flex;
  font-size: 14px;
  line-height: 1.5;
}

.auth-screen {
  position: fixed; inset: 0; background: var(--notion-bg); z-index: 1000;
  display: flex; align-items: center; justify-content: center; padding: 1.5rem;
}
.auth-card {
  background: var(--notion-bg); border: 1px solid var(--notion-border);
  border-radius: 12px; padding: 2.5rem; width: 100%; max-width: 380px;
  box-shadow: var(--shadow-modal); text-align: center;
}
.auth-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.auth-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.25rem; color: var(--text-main); }
.auth-sub { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 1.5rem; }

.notion-layout { display: flex; width: 100vw; height: 100vh; overflow: hidden; }

.notion-sidebar {
  width: 240px; background: var(--notion-sidebar);
  border-right: 1px solid var(--notion-border);
  display: flex; flex-direction: column;
  user-select: none; flex-shrink: 0;
}

.workspace-switcher {
  padding: 0.85rem 0.9rem; display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--notion-border); cursor: pointer; transition: background 0.15s ease;
}
.workspace-switcher:hover { background: var(--notion-sidebar-hover); }

.ws-info { display: flex; align-items: center; gap: 0.6rem; font-weight: 700; font-size: 0.9rem; letter-spacing: -0.01em; }
.ws-icon { width: 22px; height: 22px; border-radius: 4px; background: #000; color: #FFF; display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 900; }

.sidebar-menu { padding: 0.75rem 0.5rem; flex: 1; overflow-y: auto; }
.menu-group-label { font-size: 0.7rem; font-weight: 700; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.05em; padding: 0.6rem 0.5rem 0.3rem 0.5rem; }

.sidebar-item {
  display: flex; align-items: center; gap: 0.55rem; padding: 0.4rem 0.6rem;
  border-radius: 6px; color: var(--text-muted); font-size: 0.88rem; font-weight: 500;
  cursor: pointer; transition: all 0.12s ease; text-decoration: none; margin-bottom: 2px;
}
.sidebar-item:hover { background: var(--notion-sidebar-hover); color: var(--text-main); }
.sidebar-item.active { background: var(--notion-sidebar-hover); color: var(--text-main); font-weight: 600; }

.sidebar-footer {
  padding: 0.75rem 0.75rem; border-top: 1px solid var(--notion-border);
  display: flex; align-items: center; justify-content: space-between;
}

.notion-main { flex: 1; display: flex; flex-direction: column; overflow: hidden; background: var(--notion-bg); }

.notion-header {
  height: 48px; border-bottom: 1px solid var(--notion-border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1.25rem; font-size: 0.85rem; color: var(--text-muted);
}
.breadcrumbs { display: flex; align-items: center; gap: 0.4rem; font-weight: 500; }
.header-actions { display: flex; align-items: center; gap: 0.5rem; }

.btn-notion {
  background: transparent; border: 1px solid var(--notion-border);
  color: var(--text-main); padding: 0.35rem 0.7rem; border-radius: 6px;
  font-size: 0.82rem; font-weight: 500; cursor: pointer; display: inline-flex; align-items: center; gap: 0.4rem;
  transition: background 0.12s ease;
}
.btn-notion:hover { background: var(--notion-hover); }
.btn-notion-blue { background: var(--accent-primary); color: white; border: none; font-weight: 600; }
.btn-notion-blue:hover { opacity: 0.9; }

.database-header-container { padding: 1.25rem 2rem 0.5rem 2rem; }
.db-title-row { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.85rem; }
.db-icon { font-size: 2rem; }
.db-title { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.02em; color: var(--text-main); }

.notion-views-bar {
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--notion-border); padding-bottom: 0.5rem;
}
.views-list { display: flex; gap: 0.25rem; }
.view-tab {
  display: flex; align-items: center; gap: 0.4rem; padding: 0.35rem 0.7rem;
  border-radius: 6px; color: var(--text-muted); font-weight: 500; font-size: 0.85rem;
  cursor: pointer; transition: background 0.12s ease;
}
.view-tab:hover { background: var(--notion-hover); color: var(--text-main); }
.view-tab.active { color: var(--text-main); font-weight: 600; background: var(--notion-hover); }

.view-controls { display: flex; align-items: center; gap: 0.75rem; }

.notion-view-content { flex: 1; padding: 1.25rem 2rem 2rem 2rem; overflow-y: auto; }

/* KANBAN BOARD WITH DRAG & DROP */
.kanban-board { display: flex; gap: 1rem; overflow-x: auto; align-items: start; min-height: 550px; }
.kanban-col {
  width: 270px; flex-shrink: 0; background: var(--notion-subtle);
  border: 1px solid var(--notion-border); border-radius: 8px; padding: 0.65rem; min-height: 500px;
  transition: background 0.15s ease;
}
.kanban-col.drag-over { background: var(--notion-sidebar-hover); border-color: var(--accent-primary); }

.col-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.3rem 0.4rem 0.6rem 0.4rem; font-size: 0.82rem; font-weight: 600; color: var(--text-muted);
}
.col-count { font-size: 0.75rem; color: var(--text-light); font-weight: 500; }

.notion-card {
  background: var(--notion-bg); border: 1px solid var(--notion-border);
  border-radius: 6px; padding: 0.75rem; margin-bottom: 0.6rem;
  cursor: grab; box-shadow: var(--shadow-notion); transition: transform 0.12s ease, border-color 0.12s ease, opacity 0.15s ease;
}
.notion-card:active { cursor: grabbing; opacity: 0.6; }
.notion-card:hover { border-color: var(--text-light); transform: translateY(-1px); }

.card-title { font-size: 0.88rem; font-weight: 700; color: var(--text-main); margin-bottom: 0.5rem; }
.card-props { display: flex; flex-direction: column; gap: 0.35rem; font-size: 0.78rem; color: var(--text-muted); }

.prop-pill {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.15rem 0.5rem; border-radius: 4px; font-size: 0.75rem; font-weight: 600; width: fit-content;
}

.notion-table-container {
  border: 1px solid var(--notion-border); border-radius: 8px; overflow: hidden; background: var(--notion-bg);
}
.notion-table { width: 100%; border-collapse: collapse; text-align: left; }
.notion-table th {
  background: var(--notion-subtle); padding: 0.6rem 0.85rem; font-size: 0.78rem;
  color: var(--text-muted); font-weight: 600; border-bottom: 1px solid var(--notion-border); border-right: 1px solid var(--notion-border);
}
.notion-table td {
  padding: 0.6rem 0.85rem; border-bottom: 1px solid var(--notion-border);
  border-right: 1px solid var(--notion-border); font-size: 0.85rem;
}
.notion-table tr:hover td { background: var(--notion-hover); }

/* NOTION SIDE PEEK MODAL DRAWER */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(2px); z-index: 200; display: none; justify-content: flex-end;
}
.modal-overlay.active { display: flex; }

.modal-content {
  width: 640px; background: var(--notion-bg); border-left: 1px solid var(--notion-border);
  height: 100%; padding: 2.5rem 2.25rem; overflow-y: auto; box-shadow: var(--shadow-modal);
}
.modal-close {
  background: transparent; border: none; color: var(--text-muted);
  font-size: 1.1rem; cursor: pointer; float: right; padding: 0.2rem;
}
.modal-close:hover { color: var(--text-main); }

.notion-page-header { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.75rem; }
.notion-page-icon { font-size: 2.2rem; }
.notion-page-title-input {
  font-size: 1.75rem; font-weight: 700; border: none; background: transparent;
  color: var(--text-main); width: 100%; font-family: inherit; margin-bottom: 1.25rem;
}
.notion-page-title-input:focus { outline: none; }

.notion-props-table { display: table; width: 100%; margin-bottom: 2rem; border-bottom: 1px solid var(--notion-border); padding-bottom: 1.25rem; }
.notion-prop-row { display: table-row; }
.notion-prop-label {
  display: table-cell; padding: 0.45rem 0; width: 180px; color: var(--text-muted);
  font-size: 0.82rem; font-weight: 500; vertical-align: middle;
}
.notion-prop-val { display: table-cell; padding: 0.45rem 0; vertical-align: middle; }

.notion-input {
  width: 100%; background: transparent; border: 1px solid transparent;
  color: var(--text-main); padding: 0.35rem 0.55rem; border-radius: 4px;
  font-family: inherit; font-size: 0.85rem; transition: border-color 0.12s ease;
}
.notion-input:hover { border-color: var(--notion-border); }
.notion-input:focus { border-color: var(--accent-primary); background: var(--notion-bg); outline: none; }

/* NOTION BLOCK EDITOR STYLING */
.notion-block-editor {
  margin-top: 1rem; border-top: 1px solid var(--notion-border); padding-top: 1rem; min-height: 200px;
}
.slash-menu {
  position: absolute; background: var(--notion-bg); border: 1px solid var(--notion-border);
  border-radius: 8px; box-shadow: var(--shadow-modal); width: 220px; z-index: 300; display: none;
}
.slash-item {
  padding: 0.5rem 0.85rem; font-size: 0.82rem; cursor: pointer; display: flex; align-items: center; gap: 0.5rem;
}
.slash-item:hover { background: var(--notion-hover); }
