/* ==========================================================================
   KCC Clean Carpets — Customer Management
   "Dispatch Precision" — Bloomberg terminal got a spa day
   ========================================================================== */

/* ── Design Tokens ─────────────────────────────────────────────────────────── */
:root {
  /* Brand */
  --navy:          #0f1b2d;
  --navy-mid:      #162436;
  --navy-border:   #1e3248;
  --teal:          #00b4d8;
  --teal-dim:      rgba(0, 180, 216, 0.18);
  --blue:          #0077b6;
  --blue-hover:    #005f92;
  --blue-focus:    rgba(0, 119, 182, 0.14);

  /* Content */
  --bg:            #f8f9fc;
  --surface:       #ffffff;
  --border:        #e5e9f0;
  --border-light:  #f0f3f7;

  /* Text */
  --text-primary:  #111827;
  --text-body:     #374151;
  --text-muted:    #6b7280;
  --text-faint:    #9ca3af;

  /* Status */
  --red:           #ef4444;
  --red-bg:        #fef2f2;
  --green:         #10b981;

  /* Spacing */
  --header-h:      56px;
  --radius:        6px;
  --radius-lg:     8px;
  --radius-xl:     12px;

  /* Shadows */
  --shadow-sm:     0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:     0 4px 16px rgba(0,0,0,0.09), 0 2px 4px rgba(0,0,0,0.05);
  --shadow-lg:     0 8px 32px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06);
  --shadow-panel:  -8px 0 32px rgba(0,0,0,0.14);
}

/* ── Reset ──────────────────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Ensure [hidden] is always hidden even when CSS sets display on the element */
[hidden] { display: none !important; }

html, body {
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-body);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button {
  font-family: inherit;
  font-size: inherit;
  line-height: 1;
}

a {
  color: inherit;
  text-decoration: none;
}

input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ── App Shell ──────────────────────────────────────────────────────────────── */
.kcc-app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ════════════════════════════════════════════════════════════════════════════
   LOGIN SCREEN
   ════════════════════════════════════════════════════════════════════════════ */

.kcc-login {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
  /* Subtle dot-grid texture */
  background-color: #f0f4f9;
  background-image: radial-gradient(circle, #c8d6e8 1px, transparent 1px);
  background-size: 28px 28px;
}

.kcc-login-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 44px 40px 40px;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-md),
              0 0 0 1px rgba(0,0,0,0.04);
}

.kcc-login-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}

.kcc-login-logo-mark {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--blue);
  line-height: 1;
}

.kcc-login-logo-text {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

.kcc-login-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.kcc-login-sub {
  font-size: 13px;
  color: var(--text-faint);
  margin-bottom: 28px;
}

.kcc-login .kcc-field {
  margin-bottom: 16px;
}

.kcc-login-error {
  font-size: 12px;
  color: var(--red);
  min-height: 18px;
  margin-bottom: 12px;
}

/* ════════════════════════════════════════════════════════════════════════════
   HEADER
   ════════════════════════════════════════════════════════════════════════════ */

.kcc-main {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.kcc-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border-bottom: 1px solid var(--navy-border);
  box-shadow: 0 2px 8px rgba(0,0,0,0.22);
  flex-shrink: 0;
}

.kcc-header-left {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 100%;
}

.kcc-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.kcc-logo-mark {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--teal);
  line-height: 1;
}

.kcc-logo-text {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.75);
  letter-spacing: 0.01em;
}

.kcc-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* ── Tabs ───────────────────────────────────────────────────────────────────── */
.kcc-tabs {
  display: flex;
  align-items: stretch;
  height: 100%;
}

.kcc-tab {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 100%;
  padding: 0 18px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: rgba(255,255,255,0.5);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.12s ease, border-color 0.12s ease;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.kcc-tab:hover {
  color: rgba(255,255,255,0.85);
}

.kcc-tab.active {
  color: #ffffff;
  border-bottom-color: var(--teal);
}

.kcc-tab-count {
  font-size: 11px;
  font-weight: 400;
  opacity: 0.65;
  margin-left: 3px;
}

/* ════════════════════════════════════════════════════════════════════════════
   SEARCH & BUTTONS
   ════════════════════════════════════════════════════════════════════════════ */

.kcc-search {
  width: 272px;
  height: 34px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: var(--radius);
  padding: 0 12px;
  font-size: 13.5px;
  background: rgba(255,255,255,0.08);
  color: #ffffff;
  outline: none;
  transition: border-color 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
}

.kcc-search::placeholder {
  color: rgba(255,255,255,0.38);
}

.kcc-search:focus {
  border-color: var(--teal);
  background: rgba(255,255,255,0.12);
  box-shadow: 0 0 0 3px var(--teal-dim);
}

/* Buttons */
.kcc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 16px;
  border-radius: var(--radius);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.11s ease, border-color 0.11s ease, color 0.11s ease, box-shadow 0.11s ease;
  white-space: nowrap;
  letter-spacing: 0.01em;
  line-height: 1;
}

.kcc-btn-primary {
  background: var(--blue);
  color: #ffffff;
  border-color: var(--blue);
}
.kcc-btn-primary:hover {
  background: var(--blue-hover);
  border-color: var(--blue-hover);
  box-shadow: 0 2px 6px rgba(0,119,182,0.30);
}

.kcc-btn-secondary {
  background: var(--surface);
  color: var(--text-body);
  border-color: var(--border);
}
.kcc-btn-secondary:hover {
  background: #f3f4f6;
}

.kcc-btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: transparent;
}
.kcc-btn-ghost:hover {
  background: #f3f4f6;
  color: var(--text-body);
}
.kcc-btn-danger {
  background: #ef4444;
  color: #fff;
  border-color: #ef4444;
}
.kcc-btn-danger:hover {
  background: #dc2626;
  border-color: #dc2626;
}

.kcc-btn-full {
  width: 100%;
  height: 40px;
  font-size: 14px;
}

.kcc-btn-icon {
  padding: 0 10px;
  font-size: 15px;
}

button:disabled,
.kcc-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

/* ════════════════════════════════════════════════════════════════════════════
   FILTER BAR
   ════════════════════════════════════════════════════════════════════════════ */

.kcc-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.kcc-filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.kcc-utility-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.kcc-select {
  height: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 8px;
  font-size: 13px;
  color: var(--text-body);
  background: var(--surface);
  outline: none;
  cursor: pointer;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.kcc-select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-focus);
}

.kcc-select-all-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}
.kcc-select-all-label input[type="checkbox"] {
  width: 14px;
  height: 14px;
  cursor: pointer;
  accent-color: var(--blue);
}

/* ════════════════════════════════════════════════════════════════════════════
   TABLE
   ════════════════════════════════════════════════════════════════════════════ */

.kcc-table-wrap {
  flex: 1;
  overflow-x: auto;
  background: var(--surface);
}

.kcc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  table-layout: auto;
}

.kcc-table thead tr {
  background: #f8f9fc;
  border-bottom: 2px solid var(--border);
}

.kcc-table thead th {
  padding: 10px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  white-space: nowrap;
}

.kcc-table tbody tr {
  border-bottom: 1px solid var(--border-light);
  transition: background 0.07s ease;
}

.kcc-table tbody tr:hover {
  background: #f8fafd;
}

.kcc-table tbody tr.selected {
  background: #eff8ff;
}

.kcc-table tbody tr.manage-open {
  background: #f8fafd;
}

.kcc-table tbody td {
  padding: 11px 16px;
  color: var(--text-body);
  vertical-align: middle;
}

/* Alpha dividers */
.alpha-divider td {
  background: #f1f4f8;
  color: var(--text-faint);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 4px 16px;
  border-bottom: 1px solid var(--border);
  border-top: 1px solid var(--border);
}

/* Column widths */
.col-check    { width: 40px; padding-right: 0; }
.col-name     { min-width: 200px; }
.col-phone    { min-width: 140px; }
.col-email    { min-width: 160px; }
.col-address  { min-width: 180px; }
.col-group    { min-width: 100px; }
.col-source   { min-width: 100px; }
.col-manage   { width: 90px; text-align: right; padding-right: 16px; }

.col-check input[type="checkbox"] {
  accent-color: var(--blue);
  width: 14px;
  height: 14px;
  cursor: pointer;
}

.col-phone a,
.col-email a {
  color: var(--text-body);
  text-decoration: none;
  transition: color 0.1s ease;
}
.col-phone a:hover,
.col-email a:hover {
  color: var(--blue);
}

.col-address {
  color: var(--text-muted);
  font-size: 12.5px;
}

.kcc-company {
  font-weight: 600;
  color: var(--text-primary);
  display: block;
}

.kcc-person-name {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 1px;
}

/* States */
.kcc-loading,
.kcc-empty,
.kcc-error {
  text-align: center;
  padding: 56px 24px;
  color: var(--text-faint);
  font-size: 14px;
}
.kcc-error { color: var(--red); }

/* ════════════════════════════════════════════════════════════════════════════
   BADGES
   ════════════════════════════════════════════════════════════════════════════ */

.kcc-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.6;
  text-transform: capitalize;
  vertical-align: middle;
  letter-spacing: 0.01em;
}

.kcc-badge-residential { background: #e0f2fe; color: #0369a1; }
.kcc-badge-commercial  { background: #f3e8ff; color: #7e22ce; }
.kcc-badge-group       { background: #fef3c7; color: #92400e; }
.kcc-badge-referral    { background: #d1fae5; color: #065f46; }
.kcc-badge-website     { background: #e0e7ff; color: #3730a3; }
.kcc-badge-google      { background: #fee2e2; color: #991b1b; }
.kcc-badge-facebook    { background: #dbeafe; color: #1e40af; }
.kcc-badge-repeat      { background: #d1fae5; color: #065f46; }
.kcc-badge-source      { background: #f3f4f6; color: var(--text-body); }
.kcc-badge-other       { background: #f3f4f6; color: var(--text-muted); }

/* ════════════════════════════════════════════════════════════════════════════
   MANAGE DROPDOWN
   ════════════════════════════════════════════════════════════════════════════ */

.kcc-manage-wrap {
  position: relative;
  display: inline-block;
}

.kcc-manage-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 4px 10px;
  font-size: 12px;
  color: var(--text-body);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.1s ease, border-color 0.1s ease;
}
.kcc-manage-btn:hover {
  background: #f3f4f6;
  border-color: #c4cdd8;
}

.kcc-manage-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  min-width: 168px;
  z-index: 50;
  list-style: none;
  padding: 4px 0;
}

.kcc-manage-menu.open {
  display: block;
  animation: menuFadeIn 0.1s ease;
}

@keyframes menuFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.kcc-manage-menu li button {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  padding: 8px 16px;
  font-size: 13px;
  color: var(--text-body);
  cursor: pointer;
  transition: background 0.08s ease;
}
.kcc-manage-menu li button:hover {
  background: #f3f4f6;
}

.kcc-menu-divider {
  border-top: 1px solid var(--border-light);
  margin: 4px 0;
}

.kcc-menu-danger button {
  color: var(--red);
}
.kcc-menu-danger button:hover {
  background: var(--red-bg);
}

/* ════════════════════════════════════════════════════════════════════════════
   PAGINATION
   ════════════════════════════════════════════════════════════════════════════ */

.kcc-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 14px 24px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
}

.kcc-page-info {
  font-size: 13px;
  color: var(--text-muted);
  min-width: 120px;
  text-align: center;
  letter-spacing: 0.01em;
}

/* ════════════════════════════════════════════════════════════════════════════
   SLIDE-OVER PANEL
   ════════════════════════════════════════════════════════════════════════════ */

.kcc-slideover-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 27, 45, 0.38);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.kcc-slideover-backdrop.open {
  opacity: 1;
  pointer-events: all;
}

.kcc-slideover {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: 520px;
  max-width: 95vw;
  background: var(--surface);
  z-index: 201;
  transform: translateX(100%);
  transition: transform 0.26s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-panel);
}

.kcc-slideover.open {
  transform: translateX(0);
}

.kcc-slideover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  background: #fafbfc;
}

.kcc-slideover-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.kcc-slideover-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: var(--radius);
  background: transparent;
  border: none;
  font-size: 17px;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.1s ease, color 0.1s ease;
  line-height: 1;
}
.kcc-slideover-close:hover {
  background: #f3f4f6;
  color: var(--text-primary);
}

.kcc-slideover-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  scrollbar-width: thin;
  scrollbar-color: #dce1ea transparent;
}
.kcc-slideover-body::-webkit-scrollbar {
  width: 5px;
}
.kcc-slideover-body::-webkit-scrollbar-thumb {
  background: #dce1ea;
  border-radius: 99px;
}

/* ════════════════════════════════════════════════════════════════════════════
   FORM
   ════════════════════════════════════════════════════════════════════════════ */

.kcc-form-section {
  margin-bottom: 28px;
}

.kcc-form-section-title {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-faint);
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-light);
}

.kcc-form-row {
  display: grid;
  gap: 12px;
}

.kcc-form-2col { grid-template-columns: 1fr 1fr; }
.kcc-form-3col { grid-template-columns: 1fr 1fr 1fr; }

.kcc-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.kcc-field label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-body);
  letter-spacing: 0.01em;
}

.kcc-field input,
.kcc-field select,
.kcc-field textarea {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 12px;
  font-size: 14px;
  color: var(--text-primary);
  background: var(--surface);
  outline: none;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
  width: 100%;
}

.kcc-field input:focus,
.kcc-field select:focus,
.kcc-field textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-focus);
}

.kcc-field input::placeholder,
.kcc-field textarea::placeholder {
  color: var(--text-faint);
}

.kcc-field select {
  cursor: pointer;
  appearance: auto;
}

.kcc-field textarea {
  resize: vertical;
  font-family: inherit;
  line-height: 1.5;
  min-height: 88px;
}

.kcc-field-error {
  font-size: 12px;
  color: var(--red);
  min-height: 16px;
  line-height: 1.3;
}

.kcc-hint {
  font-size: 11px;
  color: var(--text-faint);
  font-weight: 400;
  margin-left: 3px;
}

.req {
  color: var(--red);
  font-weight: 600;
}

.kcc-form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 16px;
  margin-top: 4px;
  border-top: 1px solid var(--border-light);
  position: sticky;
  bottom: 0;
  background: var(--surface);
  padding-bottom: 4px;
}

.kcc-form-actions .kcc-btn-primary {
  height: 38px;
  padding: 0 24px;
  font-size: 14px;
}

/* ── Sub-cards (Properties & Contacts) ─────────────────────────────────────── */

.kcc-sub-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 10px;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kcc-sub-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.kcc-sub-label {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  outline: none;
  padding: 0;
}

.kcc-sub-label::placeholder {
  font-weight: 400;
  color: var(--text-faint);
}

.kcc-sub-remove {
  background: transparent;
  border: none;
  color: var(--text-faint);
  font-size: 14px;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  line-height: 1;
  margin-left: auto;
  flex-shrink: 0;
}

.kcc-sub-remove:hover {
  background: var(--danger-bg, #fef2f2);
  color: var(--danger, #ef4444);
}

.kcc-sub-card .kcc-field input {
  font-size: 13px;
}

.kcc-btn-sm {
  height: 30px;
  font-size: 12px;
  padding: 0 12px;
}

.kcc-primary-toggle {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}

.kcc-primary-toggle input[type="checkbox"] {
  width: 14px;
  height: 14px;
  accent-color: var(--blue);
  cursor: pointer;
}

/* ── Customer View Panel ────────────────────────────────────────────────────── */

.kcc-customer-view {
  padding: 4px 0 24px;
}

.kcc-view-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.kcc-view-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.kcc-view-company {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 2px;
}

.kcc-view-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}

.kcc-badge-status-active   { background: #d1fae5; color: #065f46; }
.kcc-badge-status-pending  { background: #fef3c7; color: #92400e; }
.kcc-badge-status-inactive { background: #f3f4f6; color: #6b7280; }
.kcc-badge-primary-contact { background: #e0e7ff; color: #3730a3; font-size: 10px; }

.kcc-view-section {
  margin-bottom: 20px;
}

.kcc-view-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-light);
}

.kcc-view-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
}

.kcc-view-grid > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.kcc-view-full {
  grid-column: 1 / -1;
}

.kcc-view-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-faint);
}

.kcc-view-value {
  font-size: 14px;
  color: var(--text-body);
}

.kcc-view-link {
  color: var(--blue);
  text-decoration: none;
}

.kcc-view-link:hover {
  text-decoration: underline;
}

.kcc-view-sub-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 8px;
  background: var(--bg);
}

.kcc-view-sub-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.kcc-view-sub-address {
  font-size: 13px;
  color: var(--text-body);
}

.kcc-view-sub-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.kcc-view-sub-meta a {
  color: var(--blue);
  text-decoration: none;
}

.kcc-view-sub-meta a:hover {
  text-decoration: underline;
}

.kcc-view-empty {
  font-size: 13px;
  color: var(--text-faint);
  font-style: italic;
}

.kcc-view-notes {
  font-size: 14px;
  color: var(--text-body);
  line-height: 1.6;
  white-space: pre-wrap;
}

/* Clickable name in table */
.kcc-name-link {
  cursor: pointer;
  color: inherit;
}

.kcc-name-link:hover .kcc-company,
.kcc-name-link:hover {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.kcc-loading-inline {
  font-size: 13px;
  color: var(--text-faint);
  padding: 8px 0;
}

/* ════════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════════════════════════ */

/* ── Import Overlay ─────────────────────────────────────────────────────────── */

.kcc-import-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 27, 45, 0.55);
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.kcc-import-modal {
  background: var(--surface);
  border-radius: 12px;
  padding: 28px 32px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.2);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.kcc-import-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.kcc-import-bar-wrap {
  height: 8px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.kcc-import-bar-fill {
  height: 100%;
  background: var(--blue);
  border-radius: 999px;
  transition: width 0.2s ease;
}

.kcc-import-status {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
}

.kcc-import-errors {
  font-size: 12px;
  color: var(--danger, #ef4444);
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 6px;
  padding: 10px 12px;
  max-height: 160px;
  overflow-y: auto;
  white-space: pre-wrap;
  font-family: monospace;
}

/* ════════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════════════════════════ */

@media (max-width: 900px) {
  .col-address,
  .col-group,
  .col-source {
    display: none;
  }
}

@media (max-width: 768px) {
  .kcc-header {
    height: auto;
    flex-wrap: wrap;
    padding: 10px 16px;
    gap: 10px;
  }

  .kcc-header-left {
    flex-wrap: wrap;
    gap: 8px;
    height: auto;
    width: 100%;
  }

  .kcc-tabs {
    height: 40px;
  }

  .kcc-tab {
    height: 40px;
    padding: 0 12px;
    font-size: 13px;
  }

  .kcc-header-actions {
    width: 100%;
    padding-bottom: 4px;
  }

  .kcc-search {
    flex: 1;
    width: auto;
    min-width: 0;
  }

  .kcc-filter-bar {
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 16px;
  }

  .kcc-filter-group {
    flex-wrap: wrap;
  }

  .kcc-form-2col,
  .kcc-form-3col {
    grid-template-columns: 1fr;
  }

  .kcc-slideover {
    width: 100vw;
    max-width: 100vw;
  }

  .kcc-table-wrap {
    font-size: 13px;
  }

  .kcc-table tbody td {
    padding: 10px 12px;
  }

  .kcc-table thead th {
    padding: 8px 12px;
  }
}
