:root {
  --zoho-nav-bg: #202938;
  --zoho-nav-hover: #2d384b;
  --zoho-blue: #0067ff;
  --zoho-blue-hover: #0052cc;
  --zoho-blue-soft: #eef5ff;
  --zoho-canvas: #f3f5f9;
  --zoho-surface: #ffffff;
  --zoho-border: #dfe4ec;
  --zoho-border-light: #edf1f7;
  --zoho-text: #1e293b;
  --zoho-text-muted: #64748b;
  --zoho-green: #10b981;
  --zoho-green-bg: #ecfdf5;
  --zoho-green-text: #047857;
  --zoho-amber: #f59e0b;
  --zoho-amber-bg: #fffbeb;
  --zoho-amber-text: #b45309;
  --zoho-red: #ef4444;
  --zoho-red-bg: #fef2f2;
  --zoho-red-text: #b91c1c;
  --zoho-purple-bg: #f3e8ff;
  --zoho-purple-text: #6d28d9;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, sans-serif;
  background: var(--zoho-canvas);
  color: var(--zoho-text);
  font-size: 13px;
  line-height: 1.45;
  overflow-x: hidden;
}

/* ─── Zoho Top Navigation Bar ─────────────────────────────────────────────── */
.zoho-topbar {
  height: 48px;
  background: var(--zoho-nav-bg);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.zoho-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.2px;
  color: #fff;
  margin-right: 12px;
  white-space: nowrap;
  cursor: pointer;
}

.zoho-brand-logo {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: linear-gradient(135deg, #0067ff, #38bdf8);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 12px;
  color: #fff;
}

.zoho-modules-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1;
}
.zoho-modules-nav::-webkit-scrollbar {
  display: none;
}

.zoho-mod-tab {
  background: transparent;
  border: none;
  color: #cbd5e1;
  font-size: 12.5px;
  font-weight: 500;
  padding: 0 11px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: all 0.15s ease;
}

.zoho-mod-tab:hover {
  color: #fff;
  background: var(--zoho-nav-hover);
}

.zoho-mod-tab.active {
  color: #fff;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.06);
  border-bottom-color: #38bdf8;
}

.zoho-tab-badge {
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  line-height: 1.3;
}

.zoho-tab-badge.blue {
  background: #0284c7;
}

.zoho-topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 10px;
}

.zoho-global-search {
  position: relative;
  width: 230px;
}

.zoho-global-search input {
  width: 100%;
  height: 30px;
  background: #2d384b;
  border: 1px solid #3f4d63;
  border-radius: 5px;
  padding: 0 10px 0 28px;
  color: #fff;
  font-size: 12px;
  outline: none;
}

.zoho-global-search input::placeholder {
  color: #94a3b8;
}

.zoho-global-search input:focus {
  background: #fff;
  color: var(--zoho-text);
  border-color: var(--zoho-blue);
}

.zoho-search-icon {
  position: absolute;
  left: 8px;
  top: 7px;
  font-size: 12px;
  color: #94a3b8;
  pointer-events: none;
}

.zoho-search-dropdown {
  position: absolute;
  top: 34px;
  left: 0;
  width: 380px;
  background: #fff;
  border: 1px solid var(--zoho-border);
  border-radius: 6px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.18);
  color: var(--zoho-text);
  max-height: 360px;
  overflow-y: auto;
  z-index: 300;
  display: none;
}

.zoho-search-item {
  padding: 8px 12px;
  border-bottom: 1px solid var(--zoho-border-light);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.zoho-search-item:hover {
  background: var(--zoho-blue-soft);
}

.zoho-role-select {
  background: #2d384b;
  color: #f8fafc;
  border: 1px solid #475569;
  border-radius: 5px;
  height: 30px;
  padding: 0 8px;
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
}

/* ─── Call Reminder Banner Strip ──────────────────────────────────────────── */
.zoho-reminder-strip {
  background: #fffbeb;
  border-bottom: 1px solid #fde68a;
  padding: 6px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: #92400e;
}

/* ─── Zoho Sub-Header / Action Toolbar ────────────────────────────────────── */
.zoho-subbar {
  height: 50px;
  background: var(--zoho-surface);
  border-bottom: 1px solid var(--zoho-border);
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.zoho-subbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.zoho-view-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--zoho-text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.zoho-subbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ─── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  height: 32px;
  padding: 0 12px;
  border-radius: 5px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid transparent;
  transition: all 0.12s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--zoho-blue);
  color: #fff;
  border-color: var(--zoho-blue);
}
.btn-primary:hover {
  background: var(--zoho-blue-hover);
}

.btn-secondary {
  background: #fff;
  color: var(--zoho-text);
  border-color: #cbd5e1;
}
.btn-secondary:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.btn-success {
  background: #059669;
  color: #fff;
}
.btn-success:hover {
  background: #047857;
}

.btn-danger {
  background: #fff;
  color: #dc2626;
  border-color: #fca5a5;
}
.btn-danger:hover {
  background: #fef2f2;
}

.btn-xs {
  height: 25px;
  padding: 0 8px;
  font-size: 11.5px;
  border-radius: 4px;
}

/* ─── Main Workspace Layout (Left Filter Sidebar + Content) ───────────────── */
.zoho-workspace {
  display: flex;
  min-height: calc(100vh - 98px);
}

.zoho-filter-rail {
  width: 235px;
  background: var(--zoho-surface);
  border-right: 1px solid var(--zoho-border);
  padding: 14px;
  flex-shrink: 0;
}

.zoho-filter-rail h4 {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--zoho-text-muted);
  margin-bottom: 12px;
  font-weight: 700;
}

.filter-group {
  margin-bottom: 14px;
}

.filter-group label {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 5px;
}

.filter-input,
.filter-select {
  width: 100%;
  height: 31px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 0 8px;
  font-size: 12px;
  background: #fff;
  color: var(--zoho-text);
}

.zoho-main-canvas {
  flex: 1;
  padding: 16px 18px;
  overflow-x: auto;
}

/* ─── Cards & KPI Strips ──────────────────────────────────────────────────── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.kpi-card {
  background: var(--zoho-surface);
  border: 1px solid var(--zoho-border);
  border-radius: 6px;
  padding: 13px 15px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.kpi-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--zoho-text-muted);
  margin-bottom: 4px;
}

.kpi-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--zoho-text);
  letter-spacing: -0.3px;
}

.kpi-sub {
  font-size: 11px;
  color: var(--zoho-text-muted);
  margin-top: 3px;
}

.zoho-card {
  background: var(--zoho-surface);
  border: 1px solid var(--zoho-border);
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  margin-bottom: 16px;
  overflow: hidden;
}

.zoho-card-header {
  padding: 11px 16px;
  border-bottom: 1px solid var(--zoho-border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fafbfc;
}

.zoho-card-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--zoho-text);
}

/* ─── Zoho Data Tables ────────────────────────────────────────────────────── */
.zoho-table-wrap {
  width: 100%;
  overflow-x: auto;
}

table.zoho-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

table.zoho-table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 600;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--zoho-border);
  text-align: left;
  white-space: nowrap;
}

table.zoho-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--zoho-border-light);
  vertical-align: middle;
  color: var(--zoho-text);
}

table.zoho-table tr:hover td {
  background: #f8fbff;
}

.zoho-link {
  color: var(--zoho-blue);
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.zoho-link:hover {
  text-decoration: underline;
}

/* ─── Permanent Account ID Chip & Semantic Badges ─────────────────────────── */
.acc-id-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 11.5px;
  font-weight: 700;
  background: #eef5ff;
  color: #0052cc;
  border: 1px solid #bfdbfe;
  padding: 2px 7px;
  border-radius: 4px;
  white-space: nowrap;
  cursor: pointer;
}
.acc-id-chip:hover {
  background: #dbeafe;
}

.grp-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
  padding: 2px 7px;
  border-radius: 4px;
  white-space: nowrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-green {
  background: var(--zoho-green-bg);
  color: var(--zoho-green-text);
}
.badge-amber {
  background: var(--zoho-amber-bg);
  color: var(--zoho-amber-text);
}
.badge-red {
  background: var(--zoho-red-bg);
  color: var(--zoho-red-text);
}
.badge-blue {
  background: #e0f2fe;
  color: #0369a1;
}
.badge-purple {
  background: var(--zoho-purple-bg);
  color: var(--zoho-purple-text);
}
.badge-slate {
  background: #f1f5f9;
  color: #475569;
}

/* ─── Zoho Kanban Board (Deals Pipeline) ──────────────────────────────────── */
.kanban-board {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 12px;
  align-items: flex-start;
}

.kanban-col {
  width: 270px;
  flex-shrink: 0;
  background: #ebeff5;
  border: 1px solid #d8e0ec;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 185px);
}

.kanban-col-header {
  padding: 10px 12px;
  border-bottom: 2px solid var(--zoho-blue);
  background: #fff;
  border-radius: 6px 6px 0 0;
}

.kanban-col-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 12.5px;
}

.kanban-col-sub {
  font-size: 11px;
  color: var(--zoho-text-muted);
  margin-top: 2px;
}

.kanban-cards {
  padding: 8px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kanban-card {
  background: #fff;
  border: 1px solid #dbe2ec;
  border-radius: 5px;
  padding: 10px 11px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}
.kanban-card:hover {
  border-color: #93c5fd;
  box-shadow: 0 3px 8px rgba(0, 103, 255, 0.08);
}

.kanban-card-title {
  font-weight: 600;
  font-size: 12.5px;
  color: var(--zoho-blue);
  cursor: pointer;
  margin-bottom: 4px;
}

.kanban-card-meta {
  font-size: 11.5px;
  color: #475569;
  margin-bottom: 6px;
}

.kanban-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 6px;
  border-top: 1px dashed #e2e8f0;
  font-size: 11px;
}

/* ─── Zoho Record 360 Drawer / Modal ──────────────────────────────────────── */
.zoho-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.zoho-modal-backdrop.open {
  display: flex;
}

.zoho-modal {
  background: #fff;
  border-radius: 8px;
  width: 100%;
  max-width: 720px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.25);
  overflow: hidden;
}

.zoho-modal.wide {
  max-width: 1080px;
}

.zoho-modal-header {
  padding: 14px 18px;
  background: #f8fafc;
  border-bottom: 1px solid var(--zoho-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.zoho-modal-body {
  padding: 18px;
  overflow-y: auto;
  flex: 1;
}

.zoho-modal-footer {
  padding: 12px 18px;
  background: #f8fafc;
  border-top: 1px solid var(--zoho-border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* Account 360 Split Layout (Left Related List Rail + Right Content) */
.record360-layout {
  display: flex;
  min-height: 520px;
  margin: -18px;
}

.record360-rail {
  width: 195px;
  background: #f8fafc;
  border-right: 1px solid var(--zoho-border);
  padding: 12px 0;
  flex-shrink: 0;
}

.record360-rail-item {
  padding: 8px 16px;
  font-size: 12.5px;
  font-weight: 500;
  color: #475569;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.record360-rail-item:hover,
.record360-rail-item.active {
  background: #eef5ff;
  color: var(--zoho-blue);
  font-weight: 600;
  border-left: 3px solid var(--zoho-blue);
}

.record360-content {
  flex: 1;
  padding: 18px;
  overflow-y: auto;
  max-height: 72vh;
}

/* Forms */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-field.full {
  grid-column: 1 / -1;
}

.form-field label {
  font-size: 11.5px;
  font-weight: 600;
  color: #334155;
}

.form-field input,
.form-field select,
.form-field textarea {
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 7px 9px;
  font-size: 12.5px;
  color: var(--zoho-text);
  font-family: inherit;
}

.form-field textarea {
  min-height: 68px;
  resize: vertical;
}

.toast-notification {
  position: fixed;
  bottom: 18px;
  right: 18px;
  background: #1e293b;
  color: #fff;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 500;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  z-index: 400;
  display: none;
}
