/* CRM Veend — Platform v3 */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --yellow: #FFEB3B; --yellow-dim: #b8a800; --black: #000;
  --blue: #0693E3; --purple: #9B51E0;
  --bg-0: #0e0e12; --bg-1: #121217; --bg-2: #1D1D22; --bg-3: #25252d; --bg-4: #2e2e38;
  --text-1: #fff; --text-2: #A9A9BC; --text-3: #6C6C89;
  --border: #2a2a35; --border-light: #3a3a48;
  --green: #22c55e; --warn: #eab308; --red: #ef4444;
  --r-sm: 4px; --r-md: 8px; --r-lg: 12px; --r-xl: 16px;
}
html, body { height: 100%; font-family: 'Inter', system-ui, sans-serif; background: var(--bg-1); color: var(--text-1); overflow: hidden; }
body { display: flex; }

/* ===== NAV BAR (left icons) ===== */
.nav-bar { width: 68px; min-width: 68px; height: 100vh; background: var(--bg-0); border-right: 1px solid var(--border); display: flex; flex-direction: column; justify-content: space-between; align-items: center; padding: 10px 0; flex-shrink: 0; z-index: 60; }
.nav-top, .nav-bottom { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.nav-logo { margin-bottom: 10px; }
.nav-logo-img { width: 32px; height: auto; }
.nav-item { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; width: 60px; background: none; border: none; color: var(--text-3); cursor: pointer; border-radius: var(--r-md); transition: all 0.12s; font-family: inherit; }
.nav-item span { font-size: 0.58rem; font-weight: 600; }
.nav-item:hover { background: var(--bg-2); color: var(--text-2); }
.nav-item.active { background: var(--bg-2); color: var(--yellow); }
.nav-avatar { width: 36px; height: 36px; border-radius: 50%; background: #25D366; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.85rem; cursor: pointer; overflow: hidden; }
.nav-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ===== SIDEBAR ===== */
.sidebar { width: 220px; min-width: 220px; height: 100vh; background: var(--bg-0); border-right: 1px solid var(--border); display: flex; flex-direction: column; flex-shrink: 0; }
.sidebar-profile { display: flex; align-items: center; gap: 10px; padding: 14px; }
.sidebar-avatar { width: 40px; height: 40px; border-radius: 50%; background: #25D366; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.9rem; flex-shrink: 0; overflow: hidden; }
.sidebar-avatar img { width: 100%; height: 100%; object-fit: cover; }
.sidebar-user-info { min-width: 0; }
.sidebar-user-name { font-size: 0.85rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-status { font-size: 0.65rem; color: var(--green); }
.sidebar-divider { height: 1px; background: var(--border); margin: 0 14px; }
.sidebar-header { padding: 14px 14px 6px; }
.sidebar-header h2 { font-size: 0.7rem; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: 1px; }
.sidebar-body { flex: 1; overflow-y: auto; padding: 4px 10px 10px; }
.sidebar-footer { padding: 10px 14px; border-top: 1px solid var(--border); display: flex; justify-content: center; }
.sidebar-logo-img { height: 18px; opacity: 0.4; }
.sidebar-boards { display: flex; flex-direction: column; gap: 2px; }
.sidebar-board-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--r-sm); cursor: pointer; font-size: 0.8rem; color: var(--text-2); background: none; border: none; width: 100%; text-align: left; font-family: inherit; transition: all 0.1s; }
.sidebar-board-item:hover { background: var(--bg-2); color: var(--text-1); }
.sidebar-board-item.active { background: var(--bg-2); color: var(--yellow); font-weight: 700; }
.sidebar-board-item .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--yellow); flex-shrink: 0; }
.sidebar-add-btn { display: flex; align-items: center; justify-content: center; padding: 8px; margin-top: 6px; background: none; border: 1px dashed var(--border-light); border-radius: var(--r-sm); color: var(--text-3); cursor: pointer; font-size: 0.75rem; font-family: inherit; width: 100%; }
.sidebar-add-btn:hover { color: var(--yellow); border-color: var(--yellow-dim); }

/* ===== MAIN AREA ===== */
.main-area { flex: 1; display: flex; flex-direction: column; min-width: 0; height: 100vh; }
.view { display: none; flex-direction: column; height: 100%; }
.view.active { display: flex; }
.view-body { flex: 1; overflow-y: auto; padding: 20px 24px; }

/* ===== HEADER ===== */
.header { display: flex; align-items: center; justify-content: space-between; padding: 12px 24px; background: var(--bg-2); border-bottom: 1px solid var(--border); height: 56px; flex-shrink: 0; }
.header-left { display: flex; align-items: center; gap: 12px; }
.board-title { font-size: 1rem; font-weight: 700; }
.header-right { display: flex; gap: 8px; }

/* ===== BUTTONS ===== */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border: none; border-radius: var(--r-md); font-size: 0.8rem; font-weight: 600; cursor: pointer; transition: all 0.12s; white-space: nowrap; font-family: inherit; }
.btn-accent { background: var(--yellow); color: var(--black); }
.btn-accent:hover { background: #ffe100; }
.btn-primary { background: var(--bg-3); color: var(--text-1); border: 1px solid var(--border-light); }
.btn-primary:hover { background: var(--bg-4); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { color: var(--text-1); }
.btn-danger { background: transparent; color: var(--red); border: 1px solid var(--red); }
.btn-danger:hover { background: var(--red); color: #fff; }
.btn-wa { background: #25D366; color: #fff; }
.btn-wa:hover { background: #1da851; }
.btn-sm { padding: 5px 10px; font-size: 0.72rem; }
.btn-icon { background: none; border: none; color: var(--text-2); font-size: 1.4rem; cursor: pointer; padding: 4px; line-height: 1; }
.btn-icon:hover { color: var(--text-1); }

/* ===== CRM LAYOUT (board + chat) ===== */
.crm-layout { display: flex; flex: 1; overflow: hidden; }
.board { display: flex; gap: 14px; padding: 16px 20px; overflow-x: auto; overflow-y: hidden; align-items: flex-start; flex: 1; }
.board::-webkit-scrollbar { height: 6px; }
.board::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ===== COLUMN ===== */
.column { min-width: 280px; max-width: 280px; background: var(--bg-0); border-radius: var(--r-lg); border: 1px solid var(--border); display: flex; flex-direction: column; max-height: 100%; flex-shrink: 0; }
.column-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.column-title { display: flex; align-items: center; gap: 6px; font-size: 0.82rem; font-weight: 700; min-width: 0; }
.column-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.column-count { background: var(--bg-3); color: var(--text-2); font-size: 0.65rem; font-weight: 600; padding: 1px 7px; border-radius: 8px; flex-shrink: 0; }
.column-value { font-size: 0.65rem; font-weight: 600; color: var(--green); }
.column-actions { display: flex; gap: 2px; flex-shrink: 0; }
.column-actions button { background: none; border: none; color: var(--text-3); cursor: pointer; padding: 3px; border-radius: 3px; font-size: 0.9rem; line-height: 1; }
.column-actions button:hover { color: var(--text-1); background: var(--bg-3); }
.column-body { flex: 1; overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 6px; min-height: 50px; }
.column-body::-webkit-scrollbar { width: 3px; }
.column-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.column-body.drag-over { background: rgba(255,235,59,0.04); border: 1px dashed var(--yellow-dim); border-radius: var(--r-md); }

/* ===== CARD ===== */
.card { background: var(--bg-2); border-radius: var(--r-md); padding: 10px; cursor: grab; border: 1px solid transparent; transition: all 0.12s; position: relative; }
.card-close-btn { position: absolute; top: 4px; right: 4px; background: none; border: none; color: var(--text-3); font-size: 1rem; cursor: pointer; padding: 0 4px; line-height: 1; border-radius: 3px; opacity: 0; transition: opacity 0.1s; z-index: 2; }
.card:hover .card-close-btn { opacity: 1; }
.card-close-btn:hover { color: var(--red); background: rgba(239,68,68,0.15); }

/* Unread card — green pastel */
.card.card-unread { border-color: #4ade80; background: #1a3a2a; }
.card.card-unread:hover { background: #1f4432; }
.card.card-unread .card-name { color: #86efac; }
.card.card-unread .card-msg-text { color: #bbf7d0; }
.card.card-unread .card-actions-bar { border-top-color: #2d5a3e; }
.card-unread-dot { position: absolute; top: 6px; left: 6px; width: 8px; height: 8px; border-radius: 50%; background: #4ade80; z-index: 2; animation: pulse-green 2s infinite; }
@keyframes pulse-green { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
.card:hover { background: var(--bg-3); border-color: var(--border-light); }
.card.dragging { opacity: 0.5; transform: rotate(2deg); }
.card.chat-active { border-color: var(--yellow); background: var(--bg-3); }
.card-top { display: flex; align-items: center; gap: 8px; }
.card-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--yellow); color: var(--black); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.72rem; flex-shrink: 0; overflow: hidden; }
.card-avatar img { width: 100%; height: 100%; object-fit: cover; }
.card-name { font-size: 0.8rem; font-weight: 600; line-height: 1.3; }
.card-origin { font-size: 0.6rem; color: var(--text-3); }
.card-last-msg { display: flex; align-items: center; gap: 5px; margin-top: 5px; padding: 3px 6px; background: var(--bg-1); border-radius: 3px; border-left: 2px solid #25D366; }
.card-msg-icon { display: flex; color: var(--text-3); flex-shrink: 0; }
.card-msg-text { font-size: 0.65rem; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }
.card-msg-time { font-size: 0.58rem; color: var(--text-3); flex-shrink: 0; }
.card-actions-bar { display: flex; align-items: center; gap: 3px; margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--border); }
.card-action { display: flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 4px; background: none; border: none; color: var(--text-3); cursor: pointer; transition: all 0.1s; text-decoration: none; font-family: inherit; font-size: 0.6rem; }
.card-action:hover { background: var(--bg-1); color: var(--text-1); }
.card-action.wa { color: #25D366; }
.card-action.green { color: var(--green); }
.card-action.yellow { color: var(--warn); }
.card-action.red { color: var(--red); }
.card-action.deal-value { width: auto; padding: 0 5px; font-size: 0.6rem; font-weight: 700; color: var(--green); margin-left: auto; cursor: default; }

/* ===== CHAT PANEL ===== */
.chat-panel { width: 380px; min-width: 380px; height: 100%; background: var(--bg-1); border-left: 1px solid var(--border); display: flex; flex-direction: column; flex-shrink: 0; }
.chat-header { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: var(--bg-2); border-bottom: 1px solid var(--border); flex-shrink: 0; }
.chat-header-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--yellow); color: var(--black); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.8rem; flex-shrink: 0; }
.chat-header-info { flex: 1; min-width: 0; }
.chat-header-name { font-size: 0.85rem; font-weight: 700; }
.chat-header-phone { font-size: 0.68rem; color: var(--text-3); }
.chat-header-close { background: none; border: none; color: var(--text-3); cursor: pointer; font-size: 1.2rem; padding: 4px; }
.chat-header-close:hover { color: var(--text-1); }
.chat-messages { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.chat-messages::-webkit-scrollbar { width: 3px; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.chat-bubble { padding: 8px 12px; border-radius: 10px; font-size: 0.78rem; max-width: 85%; line-height: 1.4; position: relative; }
.chat-bubble.received { background: var(--bg-3); align-self: flex-start; border-bottom-left-radius: 2px; }
.chat-bubble.sent { background: #0b4d29; align-self: flex-end; border-bottom-right-radius: 2px; }
.chat-bubble-time { font-size: 0.58rem; color: var(--text-3); margin-top: 2px; text-align: right; }
.chat-input-area { display: flex; align-items: flex-end; gap: 8px; padding: 10px 14px; background: var(--bg-2); border-top: 1px solid var(--border); flex-shrink: 0; }
.chat-input-area textarea { flex: 1; padding: 8px 12px; background: var(--bg-3); border: 1px solid var(--border); border-radius: 20px; color: var(--text-1); font-size: 0.82rem; font-family: inherit; outline: none; resize: none; max-height: 100px; }
.chat-input-area textarea:focus { border-color: var(--yellow-dim); }
.chat-send-btn { width: 36px; height: 36px; border-radius: 50%; background: var(--yellow); color: var(--black); border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.chat-send-btn:hover { background: #ffe100; }

/* ===== REPORTS ===== */
.report-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin-bottom: 24px; }
.report-card { background: var(--bg-2); border-radius: var(--r-lg); padding: 18px; border: 1px solid var(--border); }
.report-card-label { font-size: 0.7rem; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
.report-card-value { font-size: 1.8rem; font-weight: 800; margin-top: 4px; }
.report-card-value.green { color: var(--green); }
.report-card-value.yellow { color: var(--warn); }
.report-card-value.red { color: var(--red); }
.report-funnel { display: flex; flex-direction: column; gap: 8px; }
.report-funnel-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--bg-2); border-radius: var(--r-md); border: 1px solid var(--border); }
.report-funnel-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.report-funnel-name { flex: 1; font-size: 0.85rem; font-weight: 600; }
.report-funnel-count { font-size: 0.85rem; font-weight: 700; color: var(--text-2); }
.report-funnel-value { font-size: 0.78rem; font-weight: 600; color: var(--green); }
.report-funnel-bar { height: 6px; background: var(--bg-3); border-radius: 3px; flex: 2; overflow: hidden; }
.report-funnel-bar-fill { height: 100%; border-radius: 3px; transition: width 0.5s; }

/* ===== SCHEDULE CENTER ===== */
.schedule-list { display: flex; flex-direction: column; gap: 6px; }
.schedule-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--bg-2); border-radius: var(--r-md); border: 1px solid var(--border); border-left: 3px solid var(--green); }
.schedule-item.sent { border-left-color: var(--text-3); opacity: 0.5; }
.schedule-item.overdue { border-left-color: var(--red); }
.schedule-item-info { flex: 1; min-width: 0; }
.schedule-item-contact { font-size: 0.82rem; font-weight: 600; }
.schedule-item-msg { font-size: 0.72rem; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.schedule-item-date { font-size: 0.72rem; color: var(--text-3); white-space: nowrap; }

/* ===== BULK SEND ===== */
.bulk-pipelines { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.bulk-pipe-card { background: var(--bg-2); border-radius: var(--r-lg); padding: 18px; border: 1px solid var(--border); cursor: pointer; transition: all 0.12s; }
.bulk-pipe-card:hover { border-color: var(--yellow-dim); }
.bulk-pipe-header { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.bulk-pipe-dot { width: 10px; height: 10px; border-radius: 50%; }
.bulk-pipe-name { font-size: 0.9rem; font-weight: 700; }
.bulk-pipe-count { font-size: 0.75rem; color: var(--text-3); }
.bulk-send-area { margin-top: 12px; }
.bulk-send-area textarea { width: 100%; padding: 10px; background: var(--bg-3); border: 1px solid var(--border); border-radius: var(--r-md); color: var(--text-1); font-size: 0.82rem; font-family: inherit; outline: none; resize: vertical; min-height: 80px; }
.bulk-send-area textarea:focus { border-color: var(--yellow-dim); }

/* ===== MODALS ===== */
.drawer-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 90; display: none; }
.drawer-overlay.open { display: block; }
.drawer { position: fixed; top: 0; right: -400px; width: 380px; height: 100vh; background: var(--bg-2); border-left: 1px solid var(--border); z-index: 100; display: flex; flex-direction: column; transition: right 0.3s; }
.drawer.open { right: 0; }
.drawer-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.drawer-header h2 { font-size: 0.92rem; font-weight: 700; }
.drawer-body { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.wa-contact-item { display: flex; align-items: center; gap: 10px; padding: 10px; background: var(--bg-3); border-radius: var(--r-md); border: 1px solid transparent; transition: all 0.12s; }
.wa-contact-item:hover { border-color: var(--yellow-dim); }
.wa-contact-avatar { width: 36px; height: 36px; border-radius: 50%; background: #25D366; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.8rem; flex-shrink: 0; }
.wa-contact-info { flex: 1; min-width: 0; }
.wa-contact-name { font-size: 0.82rem; font-weight: 600; }
.wa-contact-msg { font-size: 0.68rem; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btn-import { background: #25D366; color: #fff; border: none; padding: 5px 10px; border-radius: 4px; font-size: 0.7rem; font-weight: 600; cursor: pointer; flex-shrink: 0; }

.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 200; display: none; align-items: center; justify-content: center; }
.modal-overlay.open { display: flex; }
.modal { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--r-xl); width: 560px; max-width: 95vw; max-height: 90vh; display: flex; flex-direction: column; }
.modal-sm { width: 380px; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid var(--border); }
.modal-header h2 { font-size: 0.92rem; font-weight: 700; }
.modal-body { padding: 16px 20px; overflow-y: auto; flex: 1; }
.modal-footer { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; border-top: 1px solid var(--border); }

/* ===== FORMS ===== */
label { font-size: 0.72rem; font-weight: 600; color: var(--text-2); display: block; margin: 10px 0 3px; }
label:first-child { margin-top: 0; }
.input { width: 100%; padding: 7px 10px; background: var(--bg-3); border: 1px solid var(--border); border-radius: var(--r-sm); color: var(--text-1); font-size: 0.82rem; font-family: inherit; outline: none; }
.input:focus { border-color: var(--yellow-dim); }
.input[readonly] { opacity: 0.6; }
.input-color { height: 32px; width: 50px; padding: 2px; background: var(--bg-3); border: 1px solid var(--border); border-radius: var(--r-sm); cursor: pointer; }
.contact-info-section { display: flex; gap: 16px; align-items: flex-start; }
.contact-avatar-large { width: 48px; height: 48px; border-radius: 50%; background: var(--yellow); color: var(--black); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1rem; flex-shrink: 0; overflow: hidden; }
.contact-avatar-large img { width: 100%; height: 100%; object-fit: cover; }
.contact-fields { flex: 1; }
.activities-section { margin-top: 20px; }
.activities-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.activities-header h3 { font-size: 0.85rem; font-weight: 700; }
.activities-list { display: flex; flex-direction: column; gap: 4px; }
.activity-item { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: var(--bg-3); border-radius: 4px; border-left: 3px solid var(--text-3); }
.activity-item.green { border-left-color: var(--green); }
.activity-item.yellow { border-left-color: var(--warn); }
.activity-item.red { border-left-color: var(--red); }
.activity-item-info { flex: 1; }
.activity-item-title { font-size: 0.75rem; font-weight: 600; }
.activity-item-date { font-size: 0.65rem; color: var(--text-3); }
.activity-item-actions button { background: none; border: none; color: var(--text-3); cursor: pointer; font-size: 0.8rem; padding: 2px; }
.activity-item-actions button:hover { color: var(--text-1); }
.new-activity-form { margin-top: 8px; padding: 10px; background: var(--bg-3); border-radius: var(--r-md); }
.form-actions { display: flex; gap: 6px; margin-top: 6px; }

/* ===== UTILITIES ===== */
.text-muted { color: var(--text-3); font-size: 0.82rem; text-align: center; padding: 16px; }
.empty-state { text-align: center; padding: 24px 8px; color: var(--text-3); font-size: 0.75rem; }
.flow-coming-soon { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; height: 100%; }
.flow-coming-soon h2 { font-size: 1.2rem; color: var(--yellow); }
.flow-coming-soon p { color: var(--text-3); font-size: 0.85rem; }

/* ===== CARD TAGS & VALUE ===== */
.card-name-row { display: flex; align-items: center; gap: 6px; }
.card-value-badge { font-size: 0.6rem; font-weight: 700; color: var(--green); background: rgba(34,197,94,0.12); padding: 1px 6px; border-radius: 8px; white-space: nowrap; }
.card-tags-right { display: flex; flex-wrap: wrap; gap: 3px; margin-left: auto; justify-content: flex-end; }
.card-tag { font-size: 0.6rem; font-weight: 700; padding: 4px 10px; border-radius: 4px; white-space: nowrap; display: block; width: 100%; text-align: left; border: none !important; }
.card-tags-bottom { display: flex; flex-direction: column; gap: 3px; margin-top: 6px; }

/* Tags in modal */
.tags-list { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.tag-pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 12px; font-size: 0.72rem; font-weight: 600; cursor: default; }
.tag-pill .tag-remove { background: none; border: none; color: inherit; cursor: pointer; font-size: 0.85rem; padding: 0 2px; opacity: 0.6; }
.tag-pill .tag-remove:hover { opacity: 1; }
.tags-selector { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.tag-option { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 12px; font-size: 0.72rem; font-weight: 600; cursor: pointer; border: 1px dashed transparent; transition: all 0.1s; }
.tag-option:hover { border-color: currentColor; }
.tag-create-row { display: flex; gap: 6px; align-items: center; }

/* Card tag empty state */
.card-tag-empty { font-size: 0.62rem; color: var(--text-3); padding: 3px 0; }
.card-tag-empty:hover { color: var(--yellow); }

/* Tag delete button in menu */
.tag-menu-edit, .tag-menu-delete { background: none; border: none; color: var(--text-3); cursor: pointer; font-size: 0.78rem; padding: 2px 3px; line-height: 1; border-radius: 3px; opacity: 0; transition: opacity 0.1s; }
.tag-menu-item:hover .tag-menu-edit, .tag-menu-item:hover .tag-menu-delete { opacity: 1; }
.tag-menu-edit:hover { color: var(--yellow); background: rgba(255,235,59,0.15); }
.tag-menu-delete:hover { color: var(--red); background: rgba(239,68,68,0.15); }
.tag-menu-name { cursor: pointer; }

/* Tag Edit Panel (Trello style) */
.tag-edit-panel { display: flex; flex-direction: column; }
.tag-edit-header { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid var(--border); font-size: 0.82rem; font-weight: 700; }
.tag-edit-back, .tag-edit-close { background: none; border: none; color: var(--text-3); cursor: pointer; font-size: 1.1rem; padding: 2px 6px; border-radius: 4px; }
.tag-edit-back:hover, .tag-edit-close:hover { color: var(--text-1); background: var(--bg-3); }
.tag-edit-preview { margin: 14px; padding: 10px 16px; border-radius: var(--r-md); font-size: 0.85rem; font-weight: 700; text-align: center; min-height: 38px; }
.tag-edit-body { padding: 0 14px; }
.tag-edit-label { font-size: 0.72rem; font-weight: 600; color: var(--text-2); margin: 10px 0 6px; display: block; }
.tag-edit-label:first-child { margin-top: 0; }
.tag-color-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-bottom: 10px; }
.tag-color-swatch { width: 100%; aspect-ratio: 1.6; border-radius: 4px; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 0.85rem; color: #fff; transition: all 0.1s; border: 2px solid transparent; }
.tag-color-swatch:hover { transform: scale(1.1); }
.tag-color-swatch.active { border-color: #fff; box-shadow: 0 0 0 2px var(--yellow); }
.tag-remove-color-btn { background: var(--bg-3); border: 1px solid var(--border); color: var(--text-2); padding: 6px; border-radius: var(--r-sm); font-size: 0.72rem; cursor: pointer; width: 100%; font-family: inherit; margin-bottom: 8px; }
.tag-remove-color-btn:hover { color: var(--text-1); border-color: var(--border-light); }
.tag-edit-footer { display: flex; justify-content: space-between; padding: 10px 14px; border-top: 1px solid var(--border); }
.tag-edit-save { background: var(--blue); color: #fff; border: none; padding: 6px 18px; border-radius: var(--r-sm); font-size: 0.78rem; font-weight: 600; cursor: pointer; font-family: inherit; }
.tag-edit-save:hover { opacity: 0.9; }
.tag-edit-delete { background: none; border: none; color: var(--red); font-size: 0.78rem; font-weight: 600; cursor: pointer; padding: 6px 18px; border-radius: var(--r-sm); font-family: inherit; }
.tag-edit-delete:hover { background: rgba(239,68,68,0.15); }

/* Card tag dropdown menu */
.card-tag-menu { position: absolute; bottom: 0; right: 0; width: 220px; background: var(--bg-2); border: 1px solid var(--border-light); border-radius: var(--r-md); box-shadow: 0 8px 24px rgba(0,0,0,0.5); z-index: 50; overflow: hidden; }
.tag-menu-title { font-size: 0.7rem; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.5px; padding: 8px 12px 4px; }
.tag-menu-list { max-height: 180px; overflow-y: auto; }
.tag-menu-item { display: flex; align-items: center; gap: 8px; padding: 6px 12px; cursor: pointer; font-size: 0.78rem; transition: background 0.1s; }
.tag-menu-item:hover { background: var(--bg-3); }
.tag-menu-item.active { font-weight: 600; }
.tag-menu-check { width: 16px; font-size: 0.7rem; color: var(--green); text-align: center; }
.tag-menu-color { width: 14px; height: 14px; border-radius: 3px; flex-shrink: 0; }
.tag-menu-color-input { width: 20px; height: 20px; border: none; border-radius: 3px; padding: 0; cursor: pointer; flex-shrink: 0; background: none; }
.tag-menu-divider { height: 1px; background: var(--border); margin: 4px 0; }
.tag-menu-create { display: flex; align-items: center; gap: 4px; padding: 6px 10px; }
.tag-menu-input { flex: 1; padding: 4px 8px; background: var(--bg-3); border: 1px solid var(--border); border-radius: 4px; color: var(--text-1); font-size: 0.72rem; font-family: inherit; outline: none; }
.tag-menu-input:focus { border-color: var(--yellow-dim); }
.tag-menu-color-pick { width: 26px; height: 26px; padding: 1px; background: var(--bg-3); border: 1px solid var(--border); border-radius: 4px; cursor: pointer; }
.tag-menu-create-btn { width: 26px; height: 26px; background: var(--yellow); color: var(--black); border: none; border-radius: 4px; font-size: 1rem; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.tag-menu-create-btn:hover { background: #ffe100; }

/* ===== SETTINGS ===== */
.settings-list { max-width: 500px; }
.settings-item { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--border); font-size: 0.85rem; }
.settings-item.clickable { cursor: pointer; }
.settings-item.clickable:hover { color: var(--yellow); }
.settings-divider { height: 8px; }
.settings-info { text-align: center; padding: 24px 0; }
.settings-status { font-size: 0.75rem; padding: 3px 10px; border-radius: 10px; font-weight: 600; }
.settings-status.online { background: rgba(34,197,94,0.15); color: var(--green); }
.settings-status.offline { background: rgba(239,68,68,0.15); color: var(--red); }

/* Toggle Switch */
.toggle { position: relative; width: 42px; height: 22px; display: inline-block; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; cursor: pointer; inset: 0; background: var(--bg-3); border-radius: 22px; transition: 0.2s; }
.toggle-slider:before { content: ''; position: absolute; height: 16px; width: 16px; left: 3px; bottom: 3px; background: #fff; border-radius: 50%; transition: 0.2s; }
.toggle input:checked + .toggle-slider { background: var(--yellow); }
.toggle input:checked + .toggle-slider:before { transform: translateX(20px); }

@media (max-width: 768px) {
  .nav-bar { width: 50px; min-width: 50px; }
  .nav-item span { display: none; }
  .sidebar { width: 160px; min-width: 160px; }
  .column { min-width: 240px; max-width: 240px; }
  .chat-panel { width: 100%; min-width: 100%; position: absolute; right: 0; z-index: 10; }
}
