/* CEG CRM - 全局样式 */

:root {
  --primary: #2563eb;
  --primary-dark: #1e3a5f;
  --bg: #f1f5f9;
  --card-bg: #ffffff;
  --text: #1e293b;
  --text-light: #64748b;
  --border: #e2e8f0;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --sidebar-w: 240px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: var(--bg); color: var(--text); }

/* Layout */
#app { display: flex; min-height: 100vh; }

/* Sidebar */
#sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(180deg, var(--primary-dark), var(--primary));
  color: white;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  transition: transform 0.3s;
  display: flex; flex-direction: column; height: 100vh; overflow-y: auto;
}

.sidebar-brand {
  padding: 20px 20px 16px;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}

.sidebar-logo {
  width: 100px;
  height: auto;
  display: block;
  margin: 0 auto 4px;
}

.sidebar-brand p {
  font-size: 11px;
  letter-spacing: 3px;
  opacity: 0.7;
  margin-top: 2px;
}

.nav-menu { list-style: none; padding: 12px 0; flex: 1; }
.nav-menu li { margin: 2px 8px; }
.nav-link {
  display: block;
  padding: 10px 16px;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.2s;
}
.nav-link:hover { background: rgba(255,255,255,0.1); color: white; }
.nav-link.active { background: rgba(255,255,255,0.2); color: white; font-weight: 600; }

.sidebar-footer { padding: 16px 20px; border-top: 1px solid rgba(255,255,255,0.15); }
.sidebar-footer select {
  width: 100%;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.2);
  font-size: 13px;
  background: transparent;
  color: rgba(255,255,255,0.8);
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 14px;
  padding-right: 28px;
}
.sidebar-footer select option {
  background: #1e293b;
  color: white;
  padding: 8px;
}

/* Main content */
#main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

#topbar {
  height: 56px;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.menu-toggle { display: none; background: none; border: none; font-size: 20px; cursor: pointer; }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.notification-bell { cursor: pointer; font-size: 18px; }
.user-menu { font-size: 14px; color: var(--text-light); font-weight: 500; }

#page-content { padding: 24px; flex: 1; }

/* Page header */
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.page-header h2 { font-size: 22px; font-weight: 700; }

/* Buttons */
.btn { padding: 8px 16px; border: none; border-radius: 6px; font-size: 14px; cursor: pointer; font-weight: 500; transition: opacity 0.2s; }
.btn:hover { opacity: 0.85; }
.btn-primary { background: var(--primary); color: white; }
.btn-secondary { background: var(--border); color: var(--text); }
.btn-sm { padding: 4px 10px; font-size: 12px; border-radius: 4px; border: none; cursor: pointer; }
.btn-convert { background: var(--success); color: white; }

/* Filters */
.filters { display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.filters select, .filters input { padding: 8px 12px; border: 1px solid var(--border); border-radius: 6px; font-size: 14px; }
.filters input { width: 200px; }

/* Tables */
.table-container { background: var(--card-bg); border-radius: 10px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { background: #f8fafc; padding: 12px 16px; text-align: left; font-size: 13px; font-weight: 600; color: var(--text-light); border-bottom: 1px solid var(--border); white-space: nowrap; }
.data-table td { padding: 10px 16px; border-bottom: 1px solid var(--border); font-size: 14px; }
.data-table tr:last-child td { border-bottom: none; }
.clickable-row { cursor: pointer; transition: background 0.15s; }
.clickable-row:hover { background: #f8fafc; }
.loading-cell, .empty-cell { text-align: center; color: var(--text-light); padding: 40px 16px !important; }

/* Badges */
.badge { display: inline-block; padding: 2px 8px; border-radius: 12px; font-size: 12px; font-weight: 500; }
.badge-source { background: #eff6ff; color: #2563eb; }
.badge-status { text-transform: capitalize; }
.status-new { background: #dbeafe; color: #1d4ed8; }
.status-contacted { background: #fef3c7; color: #92400e; }
.status-qualified { background: #d1fae5; color: #065f46; }
.status-converted { background: #dcfce7; color: #166534; }
.status-disqualified { background: #fee2e2; color: #991b1b; }
.status-lost { background: #f1f5f9; color: #64748b; }

/* Score badges */
.score-badge { display: inline-block; padding: 2px 8px; border-radius: 12px; font-size: 12px; font-weight: 600; }
.score-hot { background: #fee2e2; color: #dc2626; }
.score-warm { background: #fef3c7; color: #d97706; }
.score-cold { background: #f1f5f9; color: #64748b; }

/* Pagination */
.pagination { display: flex; gap: 4px; margin-top: 16px; justify-content: center; }
.page-btn { padding: 6px 12px; border: 1px solid var(--border); background: white; border-radius: 6px; cursor: pointer; font-size: 13px; }
.page-btn.active { background: var(--primary); color: white; border-color: var(--primary); }

/* Modal */
.modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 200; align-items: center; justify-content: center; }
.modal-content { background: white; border-radius: 12px; width: 500px; max-width: 90vw; max-height: 90vh; overflow-y: auto; }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 24px; border-bottom: 1px solid var(--border); }
.modal-header h3 { font-size: 18px; }
.modal-close { font-size: 24px; cursor: pointer; color: var(--text-light); }
.modal-content form { padding: 24px; }
.modal-footer { display: flex; gap: 8px; justify-content: flex-end; padding-top: 16px; border-top: 1px solid var(--border); margin-top: 16px; padding: 16px 24px; }

/* Forms */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 4px; }
.form-group input, .form-group textarea, .form-group select { width: 100%; padding: 8px 12px; border: 1px solid var(--border); border-radius: 6px; font-size: 14px; }
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }
.form-row { display: flex; gap: 16px; }
.form-row .form-group { flex: 1; }

/* Placeholder page */
.placeholder { background: var(--card-bg); border-radius: 10px; padding: 60px 24px; text-align: center; }
.placeholder h2 { margin-bottom: 8px; }
.placeholder p { color: var(--text-light); }

/* Loading */
.loading { text-align: center; padding: 40px; color: var(--text-light); }

/* Mobile responsive */
@media (max-width: 768px) {
  #sidebar { transform: translateX(-100%);   display: flex; flex-direction: column; height: 100vh; overflow-y: auto;
}
  #sidebar.open { transform: translateX(0); }
  #main-content { margin-left: 0; }
  .menu-toggle { display: block; }
  .form-row { flex-direction: column; gap: 0; }
}
/* CEG CRM - 琛ュ厖鏍峰紡锛堝鎴?椤圭洰椤甸潰锛?*/

/* Customer level badges */
.level-vip { background: #fef3c7; color: #92400e; }
.level-important { background: #dbeafe; color: #1e4ed8; }
.level-normal { background: #f1f5f9; color: #64748b; }
.level-potential { background: #d1fae5; color: #065f46; }
.badge-primary { background: #2563eb; color: white; }

/* Detail view */
.modal-large { width: 750px; }
.detail-content { padding: 20px 24px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.detail-section { background: #f8fafc; border-radius: 8px; padding: 16px; }
.detail-section h4 { margin-bottom: 12px; font-size: 15px; color: #475569; border-bottom: 1px solid #e2e8f0; padding-bottom: 8px; }
.detail-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; }
.detail-row span:first-child { color: #64748b; }

/* Contact cards */
.contact-card { background: white; border: 1px solid var(--border); border-radius: 6px; padding: 8px 12px; margin-bottom: 6px; font-size: 14px; }
.contact-card div { color: #64748b; font-size: 13px; }

/* Follow-up items */
.followup-item { padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.followup-item:last-child { border-bottom: none; }
.badge-type { background: #eff6ff; color: #2563eb; font-size: 11px; }

/* Project cards */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.project-card { background: white; border-radius: 10px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); overflow: hidden; cursor: pointer; transition: box-shadow 0.2s, transform 0.15s; }
.project-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.12); transform: translateY(-2px); }
.project-card-header { padding: 16px 20px 8px; display: flex; justify-content: space-between; align-items: flex-start; }
.project-card-header h3 { font-size: 16px; font-weight: 600; margin: 0; }
.project-card-body { padding: 4px 20px 16px; color: #64748b; font-size: 14px; }
.project-card-body div { margin-bottom: 4px; }
.booth-stats { margin-top: 8px; font-weight: 500; color: #475569; }

/* Status badges for projects */
.status-active { background: #dcfce7; color: #166534; }
.status-upcoming { background: #dbeafe; color: #1e4ed8; }
.status-completed { background: #f1f5f9; color: #64748b; }

/* Booth status */
.booth-available { background: #dcfce7; color: #166534; }
.booth-reserved { background: #fef3c7; color: #92400e; }
.booth-confirmed { background: #dbeafe; color: #1e4ed8; }
.booth-unavailable { background: #fee2e2; color: #991b1b; }

/* Stat cards */
.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 12px 0; }
.stat-card { text-align: center; background: white; border: 1px solid var(--border); border-radius: 6px; padding: 12px 8px; }
.stat-value { font-size: 24px; font-weight: 700; color: var(--text); }
.stat-available .stat-value { color: #10b981; }
.stat-reserved .stat-value { color: #f59e0b; }
.stat-confirmed .stat-value { color: #2563eb; }
.stat-card div:last-child { font-size: 12px; color: #64748b; margin-top: 2px; }

/* Empty state */
.empty-state { text-align: center; padding: 40px; color: var(--text-light); }
.text-muted { color: #94a3b8; font-size: 14px; }

/* Compact table */
.data-table.compact td, .data-table.compact th { padding: 6px 10px; font-size: 13px; }

/* Responsive */
@media (max-width: 768px) {
  .detail-grid { grid-template-columns: 1fr; }
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
  .card-grid { grid-template-columns: 1fr; }
}

/* Dashboard styles */
.dashboard { }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; }
.kpi-card { background: white; border-radius: 10px; padding: 16px 20px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); text-align: center; }
.kpi-value { font-size: 28px; font-weight: 700; color: #1e293b; }
.kpi-revenue .kpi-value { color: #10b981; }
.kpi-label { font-size: 13px; color: #64748b; margin-top: 2px; }
.kpi-sub { font-size: 12px; color: #94a3b8; margin-top: 4px; }

.dash-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-bottom: 16px; }
.dash-card { background: white; border-radius: 10px; padding: 16px 20px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.dash-card h3 { font-size: 15px; font-weight: 600; color: #475569; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid #e2e8f0; }

/* Source bars */
.source-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.source-name { width: 100px; font-size: 13px; color: #475569; text-transform: capitalize; }
.source-bar-bg { flex: 1; height: 8px; background: #f1f5f9; border-radius: 4px; overflow: hidden; }
.source-bar { height: 100%; border-radius: 4px; transition: width 0.3s; }
.source-count { width: 80px; font-size: 13px; color: #64748b; text-align: right; }

/* Funnel */
.funnel-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.funnel-label { width: 100px; font-size: 13px; color: #475569; }
.funnel-bar-bg { flex: 1; height: 24px; background: #f1f5f9; border-radius: 6px; overflow: hidden; }
.funnel-bar { height: 100%; border-radius: 6px; transition: width 0.3s; display: flex; align-items: center; padding-left: 8px; }
.funnel-count { width: 140px; font-size: 13px; color: #64748b; text-align: right; }
.funnel-won { margin-top: 8px; padding: 8px; background: #dcfce7; border-radius: 6px; font-size: 14px; font-weight: 500; color: #166534; }
.funnel-lost { margin-top: 4px; padding: 8px; background: #f1f5f9; border-radius: 6px; font-size: 14px; color: #64748b; }

/* Recent items */
.recent-item { padding: 8px 0; border-bottom: 1px solid #f1f5f9; font-size: 14px; }
.recent-item:last-child { border-bottom: none; }

/* Contract page styles */
.progress-bar-bg { height: 12px; background: #e2e8f0; border-radius: 6px; overflow: hidden; margin-bottom: 8px; }
.progress-bar-fill { height: 100%; background: linear-gradient(90deg, #10b981, #059669); border-radius: 6px; transition: width 0.3s; }
.progress-text { font-size: 14px; color: #475569; font-weight: 500; }
.detail-actions { }

/* Settings page styles */
.settings-layout { display: flex; gap: 20px; }
.settings-tabs { width: 200px; flex-shrink: 0; }
.settings-tab { display: block; width: 100%; text-align: left; padding: 10px 16px; border: none; background: none; border-radius: 8px; cursor: pointer; font-size: 14px; color: #475569; transition: all 0.15s; margin-bottom: 2px; }
.settings-tab:hover { background: #f1f5f9; }
.settings-tab.active { background: #eff6ff; color: #2563eb; font-weight: 600; }
.settings-content { flex: 1; min-width: 0; }
.settings-section { background: white; border-radius: 10px; padding: 20px 24px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.settings-section h3 { font-size: 17px; font-weight: 600; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid #e2e8f0; }
.settings-section h3::after { clear: both; content: ''; display: table; }

/* Team cards */
.team-card { border: 1px solid var(--border); border-radius: 8px; padding: 12px 16px; margin-bottom: 8px; display: flex; justify-content: space-between; align-items: center; }
.team-card-header { display: flex; gap: 12px; align-items: center; }
.team-card-header strong { font-size: 15px; }
.team-card-actions { display: flex; gap: 4px; }

/* Responsive */
@media (max-width: 768px) {
  .settings-layout { flex-direction: column; }
  .settings-tabs { width: 100%; display: flex; gap: 4px; overflow-x: auto; }
  .settings-tab { white-space: nowrap; }
}

/* PDF buttons */
.btn-outline {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: white;
  color: #374151;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
}
.btn-outline:hover {
  background: #eff6ff;
  border-color: #2563eb;
  color: #2563eb;
}


/* === Global Search === */
.global-search { position: relative; flex: 1; max-width: 400px; margin: 0 20px; }
.global-search input {
  width: 100%; padding: 8px 14px; border: 1px solid #d1d5db; border-radius: 20px;
  font-size: 13px; background: #f9fafb; outline: none; transition: all 0.2s;
}
.global-search input:focus { border-color: #1A5FB4; background: #fff; box-shadow: 0 0 0 3px rgba(26,95,180,0.1); }
.search-dropdown {
  display: none; position: absolute; top: 100%; left: 0; right: 0; z-index: 1000;
  background: #fff; border: 1px solid #d1d5db; border-radius: 8px; margin-top: 4px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.15); max-height: 400px; overflow-y: auto;
}
.search-empty { padding: 16px; text-align: center; color: #6b7280; font-size: 13px; }
.search-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  cursor: pointer; border-bottom: 1px solid #f3f4f6; transition: background 0.15s;
}
.search-item:hover { background: #f0f4ff; }
.search-item:last-child { border-bottom: none; }
.search-icon { font-size: 16px; }
.search-name { flex: 1; font-size: 13px; font-weight: 500; color: #1f2937; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-type { font-size: 11px; color: #6b7280; background: #f3f4f6; padding: 2px 8px; border-radius: 10px; text-transform: capitalize; }

/* === Notification Bell === */
.notification-bell {
  position: relative; cursor: pointer; font-size: 18px; padding: 4px 8px;
  border-radius: 50%; transition: background 0.2s;
}
.notification-bell:hover { background: #f3f4f6; }
.notif-badge {
  position: absolute; top: -2px; right: 0; background: #ef4444; color: #fff;
  font-size: 10px; font-weight: 700; min-width: 16px; height: 16px; line-height: 16px;
  text-align: center; border-radius: 8px; padding: 0 4px;
}
.notif-dropdown {
  display: none; position: absolute; top: 48px; right: 60px; width: 340px; z-index: 1000;
  background: #fff; border: 1px solid #d1d5db; border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2); max-height: 450px; overflow-y: auto;
}
.notif-dropdown.show { display: block; }
.notif-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px; border-bottom: 1px solid #e5e7eb; font-weight: 600; font-size: 14px;
}
.notif-mark-all { font-size: 11px; color: #1A5FB4; background: none; border: none; cursor: pointer; font-weight: 500; }
.notif-mark-all:hover { text-decoration: underline; }
.notif-empty { padding: 24px; text-align: center; color: #9ca3af; }
.notif-item {
  padding: 12px 16px; border-bottom: 1px solid #f3f4f6; cursor: pointer; transition: background 0.15s;
}
.notif-item:hover { background: #f9fafb; }
.notif-item.unread { background: #eff6ff; }
.notif-item.unread:hover { background: #dbeafe; }
.notif-title { font-size: 13px; font-weight: 600; color: #1f2937; margin-bottom: 2px; }
.notif-content { font-size: 12px; color: #4b5563; line-height: 1.4; }
.notif-time { font-size: 11px; color: #9ca3af; margin-top: 4px; }

/* === Import Modal === */
.import-area {
  border: 2px dashed #d1d5db; border-radius: 8px; padding: 24px; text-align: center;
  margin: 12px 0; cursor: pointer; transition: border-color 0.2s;
}
.import-area:hover { border-color: #1A5FB4; }
.import-area textarea {
  width: 100%; min-height: 120px; border: 1px solid #d1d5db; border-radius: 6px;
  padding: 10px; font-size: 12px; font-family: monospace; resize: vertical; margin-top: 8px;
}
.import-hint { font-size: 12px; color: #6b7280; margin-top: 8px; }

/* === Bulk Action Bar === */
.bulk-bar {
  display: none; position: sticky; top: 0; z-index: 100;
  background: #1A5FB4; color: #fff; padding: 10px 16px;
  align-items: center; gap: 12px; border-radius: 8px; margin-bottom: 12px;
  box-shadow: 0 4px 12px rgba(26,95,180,0.3);
}
.bulk-bar.show { display: flex; }
.bulk-bar .bulk-count { font-weight: 600; font-size: 14px; }
.bulk-bar select, .bulk-bar button {
  padding: 6px 12px; border-radius: 6px; font-size: 13px; border: none;
}
.bulk-bar select { background: #fff; color: #1f2937; cursor: pointer; }
.bulk-bar .btn-bulk { background: rgba(255,255,255,0.2); color: #fff; cursor: pointer; transition: background 0.2s; }
.bulk-bar .btn-bulk:hover { background: rgba(255,255,255,0.3); }
.bulk-bar .btn-bulk-cancel { background: transparent; color: rgba(255,255,255,0.8); }
.bulk-bar .btn-bulk-cancel:hover { color: #fff; }

/* Row checkbox */
.row-check { width: 16px; height: 16px; cursor: pointer; accent-color: #1A5FB4; }

/* === Floor Plan === */
.floor-plan-legend { display: flex; gap: 12px; margin-bottom: 12px; }
.legend-item { padding: 4px 12px; border-radius: 4px; font-size: 12px; font-weight: 500; }
.floor-plan {
  display: flex; flex-wrap: wrap; gap: 6px; padding: 16px; background: #f9fafb;
  border: 1px solid #e5e7eb; border-radius: 8px; min-height: 100px;
}
.booth-cell {
  width: 72px; height: 72px; border: 1px solid #d1d5db; border-radius: 6px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.15s; font-size: 11px;
}
.booth-cell:hover { transform: scale(1.08); box-shadow: 0 2px 8px rgba(0,0,0,0.12); }
.booth-no { font-weight: 700; font-size: 12px; color: #1f2937; }
.booth-type { color: #6b7280; font-size: 10px; }
.booth-cust { color: #4b5563; font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 68px; }

/* === Booth Progress Bar === */
.booth-progress { height: 6px; background: #e5e7eb; border-radius: 3px; margin: 4px 0; overflow: hidden; }
.booth-progress-bar { height: 100%; background: linear-gradient(90deg, #10b981, #1A5FB4); border-radius: 3px; transition: width 0.3s; }

/* === Detail Actions === */
.detail-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* === Booth Status Badges === */
.booth-available { background: #dcfce7; color: #166534; }
.booth-reserved { background: #fef3c7; color: #92400e; }
.booth-confirmed { background: #dbeafe; color: #1e40af; }

/* === Compact Table === */
.data-table.compact th, .data-table.compact td { padding: 6px 8px; font-size: 12px; }

/* Analytics */
.analytics-tabs { display: flex; gap: 8px; margin-bottom: 16px; border-bottom: 2px solid #e5e7eb; padding-bottom: 8px; }
.analytics-tabs .tab-btn { padding: 8px 16px; border: none; background: none; cursor: pointer; font-size: 14px; color: #6b7280; border-bottom: 2px solid transparent; margin-bottom: -10px; transition: all 0.2s; }
.analytics-tabs .tab-btn:hover { color: #1e40af; }
.analytics-tabs .tab-btn.active { color: #1e40af; border-bottom-color: #1e40af; font-weight: 600; }

.chart-container { background: white; border-radius: 8px; padding: 20px; border: 1px solid #e5e7eb; }
.chart-container h4 { margin: 0 0 16px 0; font-size: 16px; color: #1e293b; }

.bar-chart { display: flex; flex-direction: column; gap: 8px; }
.bar-row { display: flex; align-items: center; gap: 12px; }
.bar-label { width: 100px; font-size: 13px; color: #475569; text-align: right; flex-shrink: 0; }
.bar-track { flex: 1; height: 24px; background: #f1f5f9; border-radius: 4px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, #3b82f6, #1d4ed8); border-radius: 4px; transition: width 0.5s ease; }
.bar-value { width: 200px; font-size: 13px; color: #475569; flex-shrink: 0; }

.funnel-chart { display: flex; flex-direction: column; gap: 12px; }
.funnel-stage { display: flex; align-items: center; gap: 16px; }
.funnel-label { width: 100px; font-weight: 600; color: #1e293b; text-align: right; }
.funnel-bar-track { flex: 1; height: 36px; background: #f1f5f9; border-radius: 8px; overflow: hidden; }
.funnel-bar-fill { height: 100%; background: linear-gradient(90deg, #10b981, #059669); border-radius: 8px; transition: width 0.5s ease; min-width: 4px; }
.funnel-count { width: 120px; font-size: 16px; font-weight: 700; color: #1e293b; }
.funnel-rate { font-size: 13px; font-weight: 400; color: #6b7280; }

.mini-progress { display: inline-block; width: 60px; height: 8px; background: #e5e7eb; border-radius: 4px; vertical-align: middle; margin-right: 6px; }
.mini-progress-fill { height: 100%; background: #3b82f6; border-radius: 4px; }

/* Templates */
.template-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.template-card { background: white; border: 1px solid #e5e7eb; border-radius: 8px; overflow: hidden; transition: box-shadow 0.2s; }
.template-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.template-card-header { padding: 12px 16px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #f1f5f9; }
.template-card-header h4 { margin: 0; font-size: 15px; color: #1e293b; }
.template-card-body { padding: 12px 16px; }
.template-card-actions { padding: 8px 16px 12px; display: flex; gap: 6px; flex-wrap: wrap; }

/* Renewals */
.renewal-check { cursor: pointer; }


/* Tags */
.tag-pills { display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.tag-pill { display: inline-flex; align-items: center; gap: 2px; padding: 2px 8px; border-radius: 12px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.tag-remove { cursor: pointer; margin-left: 2px; font-size: 14px; line-height: 1; opacity: 0.6; }
.tag-remove:hover { opacity: 1; }
.tag-add-btn { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; border: 1px dashed #9ca3af; background: none; cursor: pointer; font-size: 14px; color: #9ca3af; }
.tag-add-btn:hover { border-color: #3b82f6; color: #3b82f6; }

.tag-admin-grid { display: flex; flex-direction: column; gap: 8px; }
.tag-admin-card { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: white; border: 1px solid #e5e7eb; border-radius: 8px; }
.tag-admin-color { width: 6px; height: 32px; border-radius: 3px; flex-shrink: 0; }
.tag-admin-info { flex: 1; display: flex; align-items: center; }
.tag-admin-actions { display: flex; gap: 6px; }

.tag-dropdown { position: fixed; }
.tag-dropdown-header { font-weight: 600; font-size: 13px; color: #6b7280; margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid #e5e7eb; }
.tag-dropdown-item { padding: 6px 8px; cursor: pointer; border-radius: 4px; }
.tag-dropdown-item:hover { background: #f3f4f6; }

/* Tasks */
.task-stats-bar { display: flex; gap: 16px; margin-bottom: 16px; }
.task-stat { display: flex; flex-direction: column; align-items: center; padding: 12px 20px; background: white; border: 1px solid #e5e7eb; border-radius: 8px; min-width: 80px; }
.task-stat-num { font-size: 24px; font-weight: 700; color: #1e293b; }
.task-stat-overdue .task-stat-num { color: #ef4444; }

.task-group { margin-bottom: 20px; }
.task-group-header { font-weight: 600; font-size: 15px; color: #475569; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.task-group-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

.task-card { padding: 12px 16px; background: white; border: 1px solid #e5e7eb; border-radius: 8px; margin-bottom: 8px; }
.task-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.task-card.task-overdue { border-left: 3px solid #ef4444; }
.task-card-header { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.task-priority { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.task-card-desc { font-size: 13px; color: #6b7280; margin-bottom: 6px; }
.task-card-meta { display: flex; gap: 12px; font-size: 12px; color: #9ca3af; margin-bottom: 8px; flex-wrap: wrap; }
.task-card-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* Documents section (used inside detail modals) */
.doc-list { margin-top: 12px; }
.doc-item { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border: 1px solid #e5e7eb; border-radius: 6px; margin-bottom: 6px; background: #f9fafb; }
.doc-icon { font-size: 20px; }
.doc-info { flex: 1; }
.doc-name { font-weight: 500; font-size: 14px; color: #1e293b; }
.doc-meta { font-size: 12px; color: #9ca3af; }
.doc-actions { display: flex; gap: 6px; }

/* Quick Actions Bar */
.quick-actions-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px 16px;
  background: linear-gradient(135deg, #f0f9ff 0%, #eff6ff 100%);
  border-radius: 8px;
  border: 1px solid #bfdbfe;
  margin-bottom: 16px;
}

/* Contact card with mailto */
.contact-card {
  padding: 8px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  margin-bottom: 6px;
  background: #fafafa;
}
.contact-card a { color: #2563eb; text-decoration: none; }
.contact-card a:hover { text-decoration: underline; }

/* Follow-up list */
.followup-list { max-height: 200px; overflow-y: auto; }
.followup-item {
  padding: 8px 12px;
  border-left: 3px solid #6366f1;
  margin-bottom: 6px;
  background: #fafafa;
  border-radius: 0 6px 6px 0;
  font-size: 14px;
}

/* ====== Mobile Responsive ====== */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    left: -280px;
    top: 0;
    height: 100vh;
    z-index: 1000;
    transition: left 0.3s ease;
    box-shadow: none;
  }
  .sidebar.open {
    left: 0;
    box-shadow: 4px 0 20px rgba(0,0,0,0.15);
  }
  .main-content {
    margin-left: 0 !important;
    padding: 12px;
  }
  .topbar {
    left: 0 !important;
  }
  .hamburger {
    display: flex !important;
  }
  .page-header {
    flex-direction: column;
    gap: 8px;
  }
  .page-actions {
    width: 100%;
  }
  .filters {
    flex-direction: column;
    gap: 8px;
  }
  .filters select, .filters input {
    width: 100%;
  }
  .detail-grid {
    grid-template-columns: 1fr !important;
  }
  .form-row {
    flex-direction: column;
  }
  .form-row .form-group {
    width: 100%;
  }
  .data-table {
    font-size: 12px;
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .data-table th, .data-table td {
    padding: 6px 8px;
    white-space: nowrap;
  }
  .card-grid {
    grid-template-columns: 1fr !important;
  }
  .stat-cards {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .stat-card {
    padding: 8px;
  }
  .stat-value {
    font-size: 20px !important;
  }
  .modal-content {
    max-width: 100% !important;
    margin: 8px;
    max-height: 95vh;
  }
  .modal-large {
    max-width: 100% !important;
    width: 100% !important;
  }
  .quick-actions-bar {
    flex-direction: column;
    gap: 6px;
  }
  .quick-actions-bar .btn {
    width: 100%;
    text-align: center;
  }
  .analytics-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    gap: 4px;
  }
  .analytics-tabs .tab-btn {
    font-size: 12px;
    padding: 6px 12px;
    white-space: nowrap;
  }
  .bar-row {
    flex-direction: column;
    gap: 2px;
    padding: 4px 0;
  }
  .bar-label { width: auto; text-align: left; }
  .bar-value { width: auto; }
  .task-stats-bar {
    flex-wrap: wrap;
    gap: 8px;
  }
  .task-stat { min-width: 60px; padding: 8px; }
  .task-stat-num { font-size: 18px; }
  .template-grid {
    grid-template-columns: 1fr !important;
  }
  .tag-admin-card {
    flex-wrap: wrap;
    gap: 6px;
  }
  .contact-card {
    padding: 6px 8px;
  }
  .followup-item {
    font-size: 13px;
    padding: 6px 8px;
  }
}

/* Hamburger button - hidden on desktop */
.hamburger {
  display: none !important;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 24px;
  color: #1e293b;
  border-radius: 8px;
}
.hamburger:hover {
  background: #f1f5f9;
}

/* Mobile overlay */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4);
  z-index: 999;
}
.sidebar-overlay.active {
  display: block;
}

/* ====== UI Polish ====== */

/* Smooth transitions */
.btn {
  transition: all 0.15s ease;
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.btn:active {
  transform: translateY(0);
}

/* Card hover effect */
.project-card, .template-card, .tag-admin-card, .task-card {
  transition: box-shadow 0.2s ease, transform 0.15s ease;
}
.project-card:hover, .template-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

/* Loading spinner */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid #e5e7eb;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #9ca3af;
}
.empty-state::before {
  content: '';
  display: block;
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  background: #f1f5f9;
  border-radius: 50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%239ca3af' stroke-width='1.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M20 13V6a2 2 0 00-2-2H6a2 2 0 00-2 2v7m16 0v5a2 2 0 01-2 2H6a2 2 0 01-2-2v-5m16 0h-2.586a1 1 0 00-.707.293l-2.414 2.414a1 1 0 01-.707.293h-3.172a1 1 0 01-.707-.293l-2.414-2.414A1 1 0 006.586 13H4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 28px;
}

/* Fade in animation */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in {
  animation: fadeIn 0.3s ease;
}

/* Toast notification */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 12px 20px;
  background: #1e293b;
  color: white;
  border-radius: 8px;
  font-size: 14px;
  z-index: 9999;
  animation: fadeIn 0.3s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.toast.success { background: #059669; }
.toast.error { background: #dc2626; }

/* Backup section */
.backup-section {
  padding: 16px;
  background: #f9fafb;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}
.backup-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
  margin: 12px 0;
}
.backup-info-item {
  padding: 8px 12px;
  background: white;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
}
.backup-info-label { font-size: 12px; color: #6b7280; }
.backup-info-value { font-size: 16px; font-weight: 600; color: #1e293b; }


/* === Project Detail Full-Page === */
.project-detail-page {
  padding: 0;
}

.project-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.project-detail-title-row {
  display: flex;
  align-items: center;
}

.project-detail-title-row h2 {
  font-size: 24px;
  font-weight: 700;
  margin: 0;
}

.project-detail-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Info cards row */
.project-info-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.project-info-card {
  flex: 1;
  min-width: 140px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px 16px;
}

.project-info-label {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.project-info-value {
  font-size: 15px;
  font-weight: 600;
  color: #1e293b;
}

/* Stats row */
.project-stat-row {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.project-stat-row .stat-card {
  flex: 1;
  min-width: 0;
  text-align: center;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px 12px;
}

/* Section */
.project-section {
  background: white;
  border-radius: 10px;
  padding: 20px 24px;
  border: 1px solid #e5e7eb;
  margin-bottom: 16px;
}

.project-section h3 {
  font-size: 17px;
  font-weight: 600;
  color: #475569;
  margin: 0 0 16px 0;
  padding-bottom: 10px;
  border-bottom: 1px solid #e5e7eb;
}

/* Floor plan image - full width with zoom */
.floor-plan-image-wrapper {
  display: block; position: relative;
  max-height: none;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  cursor: zoom-in;
}

.floor-plan-img {
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  border-radius: 8px;
}

/* Floor plan zoom overlay */
.floor-plan-zoom {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  padding: 24px;
}

.floor-plan-zoom img {
  max-width: 95vw;
  max-height: 92vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  cursor: default;
}

/* Booth map - full width with larger cells */
.floor-plan-full {
  padding: 20px;
  gap: 8px;
}

.booth-cell-lg {
  width: 90px;
  height: 90px;
  font-size: 12px;
}

.booth-cell-lg .booth-no {
  font-size: 13px;
}

.booth-cell-lg .booth-cust {
  max-width: 86px;
}

/* Responsive */
@media (max-width: 768px) {
  .project-detail-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .project-info-row {
    flex-direction: column;
  }
  .project-info-card {
    min-width: auto;
  }
  .project-stat-row {
    flex-wrap: wrap;
  }
  .project-stat-row .stat-card {
    min-width: 80px;
  }
  .booth-cell-lg {
    width: 72px;
    height: 72px;
  }
}


/* Dashboard charts */
.dash-card canvas {
  max-height: 240px;
}

.btn-success { background: #10b981; color: white; border: none; }
.btn-success:hover { background: #059669; }



/* ===== Team Grid Cards v2 ===== */
.team-tabs-bar {
  display: flex; gap: 4px; margin-bottom: 24px;
  background: #f8fafc; border-radius: 10px; padding: 4px;
}
.team-tab {
  padding: 10px 24px; background: none; border: none; font-size: 14px; font-weight: 500;
  color: #666; cursor: pointer; border-radius: 8px; transition: all 0.2s;
}
.team-tab.active { background: #1a1a2e; color: #fff; box-shadow: 0 2px 8px rgba(26,26,46,0.25); }
.team-tab:hover:not(.active) { color: #1a1a2e; background: #eef0ff; }

.teams-grid-inner {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px;
}

.team-card {
  background: #fff; border-radius: 14px; border: 1px solid #e5e7eb;
  overflow: hidden; transition: all 0.25s; display: flex; flex-direction: column;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.team-card:hover { box-shadow: 0 8px 30px rgba(0,0,0,0.1); transform: translateY(-3px); }

.team-card-top {
  padding: 24px 24px 0; display: flex; align-items: center; justify-content: center;
}
.team-logo-img {
  width: 80px; height: 80px; border-radius: 50%; object-fit: cover;
  border: 3px solid #f3f4f6;
}
.team-logo-placeholder {
  width: 80px; height: 80px; border-radius: 50%;
  background: rgba(255,255,255,0.12);
  display: flex; align-items: center; justify-content: center;
  font-size: 36px; font-weight: 700; color: #9ca3af;
  border: 3px solid #e5e7eb; position: relative; z-index: 1;
  text-transform: uppercase;
}

.team-card-body { padding: 16px 24px 16px; flex: 1; }
.team-card-name { margin: 0 0 6px; font-size: 18px; color: #111; font-weight: 700; letter-spacing: -0.2px; }
.team-card-slogan { margin: 0 0 12px; font-size: 13px; color: #888; font-style: italic; }
.team-card-meta { display: flex; gap: 16px; margin-bottom: 12px; flex-wrap: wrap; }
.team-card-manager { font-size: 13px; color: #555; display: flex; align-items: center; gap: 4px; }
.team-card-count {
  display: inline-flex; align-items: center; gap: 4px;
  background: #eff6ff; color: #3b82f6; padding: 3px 12px;
  border-radius: 20px; font-size: 12px; font-weight: 600;
}
.team-card-goals-block {
  background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px;
  padding: 10px 14px; margin-bottom: 12px; font-size: 12px; color: #92400e; line-height: 1.6;
}
.team-card-goals-block strong { font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; }
.team-card-divider { height: 1px; background: #f3f4f6; margin: 12px 0; }

.team-members-section { font-size: 13px; }
.team-members-section > strong { color: #555; font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; display: block; }
.team-members-list { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-direction: column; gap: 4px; }
.team-member-item { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 6px; transition: background 0.15s; }
.team-member-item:hover { background: #f9fafb; }
.member-avatar { font-size: 16px; flex-shrink: 0; }
.member-name { font-size: 13px; color: #333; font-weight: 500; flex: 1; }
.member-role-tag {
  font-size: 10px; padding: 1px 8px; border-radius: 10px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.3px;
}
.member-role-tag.admin { background: #fef3c7; color: #92400e; }
.member-role-tag.manager { background: #dbeafe; color: #1e40af; }
.member-role-tag.sales { background: #d1fae5; color: #065f46; }

.team-card-actions {
  padding: 10px 24px 16px; display: flex; gap: 6px; justify-content: flex-end;
  border-top: 1px solid #f3f4f6; background: #fafafa;
}

.teams-empty { text-align: center; padding: 80px 20px; }
.teams-empty p:first-child { font-size: 48px; margin: 0; }
.teams-empty p:last-child { color: #999; margin: 8px 0 0; font-size: 14px; }

/* ===== Profile Avatar ===== */
.profile-avatar-section { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; padding: 16px; background: #f9fafb; border-radius: 10px; }
.avatar-wrapper { width: 72px; height: 72px; border-radius: 50%; overflow: hidden; border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,0.1); flex-shrink: 0; }
.avatar-wrapper img { width: 100%; height: 100%; object-fit: cover; }
#profile-avatar-file { font-size: 13px; }


/* Floor plan markers overlay */
.fp-markers-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.fp-marker {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  cursor: grab;
  z-index: 10;
  border-radius: 3px;
  font-weight: 700;
  font-size: 10px;
  line-height: 1.1;
  overflow: hidden;
}
.fp-marker:hover {
  z-index: 20;
  transform: translate(-50%, -50%) scale(1.15);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.fp-marker-dot {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  word-break: break-all;
  font-size: 9px;
  font-weight: 700;
  padding: 2px;
  box-sizing: border-box;
}



/* ===== Campaign Page ===== */
.campaign-step-content { animation: fadeIn 0.25s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.pool-card:hover { border-color: #93c5fd !important; background: #f8faff !important; }
.pool-card.selected { border-color: #2563eb !important; background: #eff6ff !important; }

#campaign-send-log::-webkit-scrollbar { width: 6px; }
#campaign-send-log::-webkit-scrollbar-track { background: #f1f5f9; border-radius: 3px; }
#campaign-send-log::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }

.campaign-tab-btn:hover { color: #2563eb !important; }


/* ===== Follow-ups Page ===== */
.followups-page { padding: 0; }
.fu-layout { display: flex; gap: 20px; margin-top: 16px; }
.fu-calendar-card { flex: 0 0 300px; background: #fff; border-radius: 10px; padding: 16px; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.fu-list-card { flex: 1; background: #fff; border-radius: 10px; padding: 16px; box-shadow: 0 1px 3px rgba(0,0,0,0.06); min-height: 300px; }
.fu-list-header { margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid #e5e7eb; }
.fu-list-header h3 { margin: 0; font-size: 15px; color: #1f2937; }
.fu-cal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.fu-cal-header strong { font-size: 14px; color: #374151; }
.fu-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; font-size: 12px; }
.fu-cal-grid .fu-day-label { padding: 4px 0; color: #9ca3af; font-weight: 600; }
.fu-cal-grid .fu-day { padding: 6px 2px; border-radius: 6px; cursor: pointer; color: #374151; transition: background .15s; position: relative; }
.fu-cal-grid .fu-day:hover { background: #f3f4f6; }
.fu-cal-grid .fu-day.other-month { color: #d1d5db; }
.fu-cal-grid .fu-day.today { border: 2px solid #2563eb; font-weight: 600; }
.fu-cal-grid .fu-day.selected { background: #2563eb; color: #fff; font-weight: 600; }
.fu-cal-grid .fu-day.selected.today { border-color: #1d4ed8; }
.fu-cal-grid .fu-day .fu-dot { display: block; width: 5px; height: 5px; background: #ef4444; border-radius: 50%; margin: 2px auto 0; }
.fu-cal-grid .fu-day.selected .fu-dot { background: #fff; }
.fu-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f3f4f6; }
.fu-item:last-child { border-bottom: none; }
.fu-item:hover { background: #f8fafc; }
.fu-item.fu-completed { opacity: .68; }
.fu-type-icon { flex: 0 0 28px; text-align: center; }
.followups-page .btn-link { border: 0; background: none; color: #2563eb; padding: 0; cursor: pointer; font: inherit; }
.followups-page .modal-overlay { position: fixed; inset: 0; z-index: 10000; background: rgba(15,23,42,.45); display: flex; align-items: center; justify-content: center; padding: 20px; }
.followups-page .modal-box { width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto; background: #fff; border-radius: 12px; padding: 24px; box-shadow: 0 20px 50px rgba(15,23,42,.25); }
.followups-page .modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.followups-page .form-control { width: 100%; box-sizing: border-box; }
.fu-item-info { flex: 1; }
.fu-item-info strong { display: block; font-size: 14px; color: #1f2937; }
.fu-item-info .fu-meta { font-size: 12px; color: #9ca3af; margin-top: 2px; }
.fu-item-actions { display: flex; gap: 6px; flex-shrink: 0; }
@media (max-width: 768px) { .fu-layout { flex-direction: column; } .fu-calendar-card { flex: none; } }

/* ===== Dashboard Styles ===== */
.dash-container { padding: 0; }

/* Big stat cards row */
.dash-stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
@media (max-width: 1024px) { .dash-stat-row { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .dash-stat-row { grid-template-columns: 1fr; } }

.dash-stat-card {
  background: #fff;
  border-radius: 12px;
  padding: 24px 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  text-align: center;
  border-top: 3px solid var(--card-accent, #6366f1);
  transition: transform 0.15s, box-shadow 0.15s;
}
.dash-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.dash-stat-icon { font-size: 28px; margin-bottom: 8px; }
.dash-stat-value { font-size: 36px; font-weight: 700; color: #1f2937; line-height: 1.2; }
.dash-stat-label { font-size: 13px; color: #6b7280; margin-top: 4px; font-weight: 500; }

/* Two-column layout */
.dash-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
@media (max-width: 768px) { .dash-row-2col { grid-template-columns: 1fr; } }

/* Pool cards */
.dash-pool-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.dash-pool-card {
  border-radius: 12px;
  padding: 24px 20px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.dash-pool-card.exhibitors {
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  border: 1px solid #bfdbfe;
}
.dash-pool-card.visitors {
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border: 1px solid #bbf7d0;
}
.pool-label { font-size: 14px; font-weight: 600; color: #475569; margin-bottom: 8px; }
.pool-value { font-size: 32px; font-weight: 700; color: #1e40af; }
.dash-pool-card.visitors .pool-value { color: #166534; }

/* Quick Actions */
.dash-quick-actions {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.dash-section-title {
  margin: 0 0 12px 0;
  font-size: 15px;
  font-weight: 600;
  color: #374151;
}
.qa-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.qa-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f9fafb;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: #374151;
  transition: all 0.15s;
}
.qa-btn:hover {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}
.qa-icon { font-size: 18px; }

/* Cards */
.dash-card {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  overflow: hidden;
}

/* Bar chart */
.dash-bar-chart { padding: 4px 0; }
.bar-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.bar-label {
  width: 130px;
  font-size: 12px;
  color: #475569;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
}
.bar-track {
  flex: 1;
  height: 22px;
  background: #f1f5f9;
  border-radius: 4px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s ease;
  min-width: 2px;
}
.bar-value {
  width: 50px;
  font-size: 12px;
  color: #6b7280;
  font-weight: 600;
  text-align: right;
  flex-shrink: 0;
}

/* Pie chart */
.dash-pie {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.pie-center {
  position: absolute;
  width: 72px;
  height: 72px;
  background: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #374151;
}
.pie-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #475569;
  margin-bottom: 4px;
}
.pie-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}

/* Lists */
.dash-list { max-height: 360px; overflow-y: auto; }
.dash-list-item {
  padding: 10px 0;
  border-bottom: 1px solid #f3f4f6;
}
.dash-list-item:last-child { border-bottom: none; }
.dash-list-item-main {
  display: flex;
  align-items: center;
  gap: 8px;
}
.dash-list-item-main strong {
  font-size: 13px;
  color: #1f2937;
}
.dash-list-badge {
  font-size: 10px;
  background: #eff6ff;
  color: #2563eb;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 600;
}
.dash-list-item-sub {
  font-size: 11px;
  color: #9ca3af;
  margin-top: 2px;
}
.dash-empty {
  text-align: center;
  padding: 24px;
  color: #9ca3af;
  font-size: 13px;
}

/* Status bar */
.dash-status-bar { margin-top: 4px; }
.status-bar-track {
  display: flex;
  height: 24px;
  border-radius: 6px;
  overflow: hidden;
  background: #f3f4f6;
}
.status-bar-segment {
  transition: width 0.5s;
  cursor: pointer;
}
.status-bar-legend {
  display: flex;
  gap: 16px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.status-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #64748b;
}
.status-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  flex-shrink: 0;
}

/* ===== Batch Export Bar Enhancements ===== */
#cust-batch-bar .btn-export {
  background: #10b981;
  color: #fff;
  border: none;
  padding: 6px 14px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.15s;
}
#cust-batch-bar .btn-export:hover { background: #059669; }
#cust-batch-bar .btn-export-config {
  background: transparent;
  color: #94a3b8;
  border: 1px solid #475569;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
}

/* Export config modal */
.export-config-modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.3);
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
}
.export-config-inner {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  max-width: 480px;
  width: 90%;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}
.export-field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 12px 0;
  max-height: 300px;
  overflow-y: auto;
}
.export-field-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  padding: 4px 0;
}

/* ===== Status Picker Popup ===== */
#status-picker-popup {
  animation: fadeIn 0.15s ease;
}
#status-picker-popup > div:first-child {
  border-radius: 6px 6px 0 0;
}
#status-picker-popup > div:last-child {
  border-radius: 0 0 6px 6px;
}

/* Clickable status badge */
.status-clickable {
  transition: transform 0.15s, box-shadow 0.15s;
  user-select: none;
}
.status-clickable:hover {
  transform: scale(1.08);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Batch status dialog */
#batch-status-dialog > div > div:hover {
  border-color: #93c5fd;
}

/* ===== Export Button in Batch Bar ===== */
#cust-batch-bar .btn-export-csv {
  background: #10b981;
  color: #fff;
  border: none;
  padding: 6px 14px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
}
#cust-batch-bar .btn-export-csv:hover {
  background: #059669;
}

.dash-reminder-card { margin: 0 0 20px; }
.dash-reminder-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.dash-reminder-heading h3 { margin:0; border:0; padding:0; }
.dash-reminder-heading .btn-link { border:0; background:none; color:#2563eb; cursor:pointer; }
.dash-reminder-list { display:grid; gap:8px; margin-top:14px; }
.dash-reminder-item { width:100%; display:grid; grid-template-columns:72px minmax(0,1fr) auto; align-items:center; gap:12px; padding:11px 12px; border:1px solid #e2e8f0; border-radius:9px; background:#fff; text-align:left; cursor:pointer; }
.dash-reminder-item:hover { border-color:#93c5fd; background:#f8fafc; }
.dash-reminder-item.is-overdue { border-left:4px solid #dc2626; }
.dash-reminder-item.is-upcoming { border-left:4px solid #8b5cf6; }
.dash-reminder-state { font-size:12px; font-weight:700; color:#7c3aed; }
.dash-reminder-item.is-overdue .dash-reminder-state { color:#dc2626; }
.dash-reminder-main { min-width:0; display:flex; flex-direction:column; gap:3px; }
.dash-reminder-main strong, .dash-reminder-main small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.dash-reminder-main small, .dash-reminder-item time { color:#64748b; font-size:12px; }
@media (max-width:600px) { .dash-reminder-item { grid-template-columns:68px minmax(0,1fr); } .dash-reminder-item time { grid-column:2; } }
.fu-next-box { margin-top:14px; padding:14px; background:#f8fafc; border:1px solid #e2e8f0; border-radius:9px; }
.fu-next-box strong { display:block; margin-bottom:10px; color:#334155; }
.fu-outcome, .timeline-outcome { margin-top:8px; padding:8px 10px; background:#ecfdf5; border-left:3px solid #10b981; border-radius:4px; color:#065f46; white-space:pre-wrap; }
.fu-outcome small { display:block; color:#047857; margin-bottom:4px; font-weight:600; }
@keyframes fuSavedPulse { 0%,100% { box-shadow:none; } 30% { box-shadow:0 0 0 4px rgba(16,185,129,.2); } }
.fu-saved-highlight { animation:fuSavedPulse 1.1s ease-in-out 2; border-radius:8px; }
.cust-latest-followup { margin:-4px 0 16px; padding:14px 16px; border:1px solid #bfdbfe; border-left:4px solid #2563eb; border-radius:9px; background:#eff6ff; }
.cust-latest-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:9px; color:#1e3a8a; }
.cust-latest-heading .btn-link { border:0; background:none; color:#2563eb; cursor:pointer; font-size:12px; }
.cust-latest-body { color:#334155; }
.cust-latest-main { display:flex; align-items:flex-start; gap:9px; }
.cust-latest-main strong { line-height:1.45; white-space:pre-wrap; }
.cust-latest-meta { margin-top:7px; color:#64748b; font-size:12px; }
@media (max-width:600px) { .cust-latest-main { flex-direction:column; gap:5px; } }
.customer-detail-scroll { max-height:calc(100vh - 48px); overflow-y:auto; overflow-x:hidden; overscroll-behavior:contain; scrollbar-gutter:stable; }
.customer-detail-scroll::-webkit-scrollbar { width:10px; }
.customer-detail-scroll::-webkit-scrollbar-track { background:#f1f5f9; border-radius:0 12px 12px 0; }
.customer-detail-scroll::-webkit-scrollbar-thumb { background:#94a3b8; border:2px solid #f1f5f9; border-radius:10px; }
.customer-detail-scroll::-webkit-scrollbar-thumb:hover { background:#64748b; }
#customer-detail-content > div:first-child { position:sticky !important; top:0; z-index:5; }
@media (max-width:600px) { .customer-detail-scroll { width:96vw; max-width:96vw; max-height:94vh; } }
.team-performance-note { margin:-4px 0 16px; color:#64748b; font-size:13px; }
.team-performance-summary { display:grid; grid-template-columns:repeat(4,1fr); gap:12px; margin-bottom:18px; }
.team-performance-summary > div { padding:14px; border:1px solid #e2e8f0; border-radius:9px; background:#f8fafc; display:flex; flex-direction:column; gap:3px; }
.team-performance-summary strong { font-size:24px; color:#1e293b; }
.team-performance-summary span { color:#64748b; font-size:12px; }
.team-performance-summary .is-danger { background:#fef2f2; border-color:#fecaca; }
.team-performance-summary .is-danger strong, .metric-danger { color:#dc2626; font-weight:700; }
.team-performance-summary .is-success { background:#ecfdf5; border-color:#a7f3d0; }
.team-performance-summary .is-success strong { color:#059669; }
.team-performance-table td:first-child small { display:block; color:#94a3b8; margin-top:2px; }
.performance-rate { position:relative; min-width:105px; height:22px; overflow:hidden; border-radius:11px; background:#e2e8f0; }
.performance-rate span { position:absolute; inset:0 auto 0 0; background:#10b981; }
.performance-rate.warning span { background:#f59e0b; } .performance-rate.danger span { background:#ef4444; }
.performance-rate strong { position:relative; z-index:1; display:block; text-align:center; line-height:22px; font-size:12px; color:#0f172a; }
@media (max-width:700px) { .team-performance-summary { grid-template-columns:repeat(2,1fr); } }
.fu-filter-bar { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin:0 0 14px; padding:10px 12px; background:#fff; border:1px solid #e2e8f0; border-radius:9px; }
.fu-filter-bar .form-control { width:auto; min-width:150px; margin:0; }
.performance-user-row { cursor:pointer; } .performance-user-row:hover { background:#eff6ff; }
@media (max-width:600px) { .fu-filter-bar .form-control { width:100%; } }
.merge-modal-content { width:min(720px,94vw); max-height:90vh; overflow-y:auto; }
.merge-modal-body { padding:22px; }
.merge-modal-body h3 { margin:0 0 12px; color:#0f172a; }
.merge-candidate { width:100%; display:flex; flex-direction:column; gap:4px; margin:8px 0; padding:12px 14px; text-align:left; border:1px solid #dbe3ef; border-radius:8px; background:#fff; cursor:pointer; }
.merge-candidate:hover { border-color:#3b82f6; background:#eff6ff; }
.merge-candidate span { color:#64748b; font-size:12px; }
.merge-compare { display:grid; grid-template-columns:1fr 44px 1fr; gap:10px; align-items:stretch; margin:16px 0; }
.merge-compare > div:not(.merge-arrow) { display:flex; flex-direction:column; gap:5px; padding:14px; border:1px solid #bfdbfe; border-radius:9px; background:#eff6ff; }
.merge-compare small { color:#2563eb; font-weight:700; }
.merge-compare strong { color:#0f172a; }
.merge-compare span { color:#64748b; font-size:12px; }
.merge-compare .merge-source { border-color:#fecaca; background:#fef2f2; }
.merge-compare .merge-source small { color:#dc2626; }
.merge-arrow { display:flex; align-items:center; justify-content:center; font-size:24px; color:#64748b; }
.merge-warning { padding:10px 12px; border-left:4px solid #f59e0b; background:#fffbeb; color:#92400e; font-size:13px; }
.merge-counts { display:flex; flex-wrap:wrap; gap:7px; margin:14px 0 18px; }
.merge-counts span { padding:5px 8px; border-radius:6px; background:#f1f5f9; color:#475569; font-size:12px; }
@media (max-width:600px) { .merge-compare { grid-template-columns:1fr; } .merge-arrow { transform:rotate(-90deg); } }
.dq-subtitle { margin:4px 0 0; color:#64748b; font-size:13px; }
.dq-summary { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin-bottom:16px; }
.dq-summary > div { display:flex; flex-direction:column; padding:16px; border:1px solid #e2e8f0; border-radius:10px; background:#fff; }
.dq-summary strong { font-size:26px; color:#0f172a; }
.dq-summary span { color:#64748b; font-size:12px; }
.dq-summary .dq-danger { background:#fef2f2; border-color:#fecaca; }
.dq-summary .dq-danger strong { color:#dc2626; }
.dq-toolbar { display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin-bottom:16px; }
.dq-toolbar .form-control { width:auto; margin:0; min-width:190px; }
.dq-toolbar input { flex:1; }
.dq-pair { margin-bottom:14px; padding:16px; border:1px solid #e2e8f0; border-radius:11px; background:#fff; box-shadow:0 2px 8px rgba(15,23,42,.04); }
.dq-pair-head { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; margin-bottom:13px; }
.dq-score,.dq-reason,.dq-risk { display:inline-block; margin:0 6px 5px 0; padding:4px 8px; border-radius:999px; font-size:11px; font-weight:700; }
.dq-score { background:#f1f5f9; color:#334155; }
.dq-score.dq-high { background:#fee2e2; color:#b91c1c; }
.dq-score.dq-medium { background:#fef3c7; color:#92400e; }
.dq-reason { background:#eff6ff; color:#1d4ed8; font-weight:500; }
.dq-risk { background:#f8fafc; color:#64748b; text-transform:uppercase; }
.dq-compare { display:grid; grid-template-columns:1fr 44px 1fr; gap:10px; align-items:stretch; }
.dq-customer { display:flex; flex-direction:column; gap:8px; padding:14px; border:1px solid #dbe3ef; border-radius:9px; background:#f8fafc; }
.dq-name { padding:0; border:0; background:none; color:#1d4ed8; text-align:left; cursor:pointer; font-size:16px; font-weight:700; }
.dq-name:hover { text-decoration:underline; }
.dq-meta { display:flex; flex-wrap:wrap; gap:6px; color:#64748b; font-size:12px; }
.dq-meta span { padding-right:7px; border-right:1px solid #cbd5e1; }
.dq-site { color:#475569; font-size:12px; word-break:break-all; }
.dq-activity { color:#0f766e; font-size:12px; font-weight:600; }
.dq-customer .btn { align-self:flex-start; margin-top:auto; }
.dq-vs { display:flex; align-items:center; justify-content:center; color:#94a3b8; font-size:12px; font-weight:800; }
.dq-pair-actions { display:flex; justify-content:flex-end; margin-top:12px; }
@media (max-width:700px) { .dq-summary { grid-template-columns:1fr; } .dq-compare { grid-template-columns:1fr; } .dq-vs { padding:2px; } .dq-toolbar .form-control { width:100%; } }
.sales-focus { margin-bottom:20px; padding:18px; border-radius:13px; background:linear-gradient(135deg,#0f3b72,#2563eb); color:#fff; box-shadow:0 8px 24px rgba(37,99,235,.2); }
.sales-focus-head,.sales-priority-head { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.sales-focus-head h2 { margin:0 0 4px; font-size:21px; }
.sales-focus-head p { margin:0; color:#dbeafe; font-size:13px; }
.sales-focus-head .btn { border-color:rgba(255,255,255,.5); color:#fff; background:rgba(255,255,255,.08); }
.sales-metrics { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; margin:16px 0; }
.sales-metrics button { display:flex; flex-direction:column; gap:3px; padding:13px; border:1px solid rgba(255,255,255,.22); border-radius:9px; background:rgba(255,255,255,.11); color:#fff; text-align:left; cursor:pointer; }
.sales-metrics button:hover { background:rgba(255,255,255,.18); }
.sales-metrics strong { font-size:24px; }
.sales-metrics span { color:#dbeafe; font-size:12px; }
.sales-priority { padding:14px; border-radius:10px; background:#fff; color:#0f172a; }
.sales-priority-head h3 { margin:0; font-size:15px; }
.sales-priority-head .btn-link { border:0; background:none; color:#2563eb; cursor:pointer; }
#sales-priority-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin-top:10px; }
.sales-priority-item { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 11px; border:1px solid #e2e8f0; border-radius:8px; background:#f8fafc; text-align:left; cursor:pointer; }
.sales-priority-item:hover { border-color:#60a5fa; background:#eff6ff; }
.sales-priority-item span { min-width:0; display:flex; flex-direction:column; gap:2px; }
.sales-priority-item span:last-child { flex:0 0 auto; text-align:right; }
.sales-priority-item strong,.sales-priority-item b { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:12px; }
.sales-priority-item small { color:#64748b; font-size:11px; }
.dash-reminder-item { cursor:default; grid-template-columns:72px minmax(0,1fr) auto auto; }
.dash-reminder-actions { display:flex; gap:5px; }
@media (max-width:760px) { .sales-metrics { grid-template-columns:repeat(2,1fr); } #sales-priority-list { grid-template-columns:1fr; } .dash-reminder-item { grid-template-columns:68px minmax(0,1fr); } .dash-reminder-actions { grid-column:2; } }
.ip-action-bar { display:flex; gap:7px; align-items:center; flex-wrap:wrap; margin-bottom:16px; }
.ip-action-bar select,.ip-action-bar button { padding:7px 10px; border:1px solid #d1d5db; border-radius:5px; background:#fff; }
.ip-action-bar button { cursor:pointer; }
.ip-action-bar button:hover { border-color:#2563eb; color:#1d4ed8; }
.ip-edit-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.ip-edit-field { display:flex; flex-direction:column; gap:5px; font-size:13px; }
.ip-edit-field input,.ip-edit-field select,.ip-edit-field textarea { width:100%; box-sizing:border-box; padding:8px 9px; border:1px solid #d1d5db; border-radius:5px; font:inherit; }
.ip-edit-field textarea { min-height:85px; resize:vertical; }
.ip-edit-field input:focus,.ip-edit-field select:focus,.ip-edit-field textarea:focus { outline:2px solid #bfdbfe; border-color:#3b82f6; }
.ip-edit-wide { grid-column:1 / -1; }
.ip-edit-actions { display:flex; justify-content:flex-end; gap:8px; margin-top:18px; }
.ip-edit-actions button { padding:8px 15px; border:1px solid #d1d5db; border-radius:5px; cursor:pointer; }
@media (max-width:600px) { .ip-edit-grid { grid-template-columns:1fr; } .ip-edit-wide { grid-column:auto; } }
.ip-contacts-section { margin:0 0 16px; padding:12px; border:1px solid #e2e8f0; border-radius:8px; background:#f8fafc; }
.ip-contacts-head { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:9px; }
.ip-contacts-head h4 { margin:0; font-size:14px; }
.ip-contacts-head .ip-add-btn { padding:6px 10px; font-size:12px; }
.ip-contact-list { display:grid; gap:7px; }
.ip-contact-card { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px; border:1px solid #e2e8f0; border-radius:7px; background:#fff; }
.ip-contact-main { min-width:0; display:flex; flex-direction:column; gap:3px; font-size:12px; }
.ip-contact-main strong { font-size:13px; }
.ip-contact-main small,.ip-contact-main span { color:#64748b; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ip-primary-badge { display:inline-block; padding:2px 6px; border-radius:10px; background:#dcfce7; color:#15803d !important; font-size:10px; vertical-align:middle; }
.ip-contact-actions { display:flex; gap:5px; flex:0 0 auto; }
.ip-contact-actions button { padding:5px 8px; border:1px solid #d1d5db; border-radius:4px; background:#fff; cursor:pointer; font-size:11px; }
.ip-contact-actions button:hover { border-color:#3b82f6; color:#1d4ed8; }
.ip-contact-actions button.danger:hover { border-color:#ef4444; color:#dc2626; }
.ip-primary-check { display:flex; align-items:center; gap:7px; font-size:13px; }
.ip-primary-check input { width:auto; }
@media (max-width:600px) { .ip-contact-card { align-items:flex-start; flex-direction:column; } }
.customer-segment-row { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-bottom:10px; padding:8px; background:#f8fafc; border:1px solid #e2e8f0; border-radius:9px; }
.customer-segment-label { min-width:78px; color:#475569; font-size:12px; font-weight:700; text-transform:uppercase; }
.segment-tab { padding:7px 13px; border:1px solid transparent; border-radius:7px; background:transparent; color:#475569; cursor:pointer; font-size:13px; font-weight:600; }
.segment-tab:hover { background:#e2e8f0; }
.segment-tab.active { background:#0f3b72; color:#fff; }
