/* ─── Design System — NetCenter SP ─────────────────────────────────────── */

:root {
  --bg:            #F8FAFC;
  --surface:       #FFFFFF;
  --primary:       #2563EB;
  --primary-hover: #1D4ED8;
  --primary-light: #EFF6FF;
  --accent:        #3B82F6;
  --text:          #0F172A;
  --text-muted:    #64748B;
  --border:        #E2E8F0;
  --border-hover:  #CBD5E1;
  --success:       #16A34A;
  --success-bg:    #F0FDF4;
  --success-border:#BBF7D0;
  --error:         #DC2626;
  --error-bg:      #FEF2F2;
  --error-border:  #FECACA;
  --warning:       #D97706;
  --warning-bg:    #FFFBEB;
  --warning-border:#FDE68A;

  --sidebar-w:   240px;
  --header-h:    64px;
  --radius:      8px;
  --radius-lg:   12px;
  --radius-xl:   16px;
  --shadow-sm:   0 1px 2px rgba(0,0,0,.05);
  --shadow:      0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md:   0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
  --shadow-lg:   0 10px 15px rgba(0,0,0,.1), 0 4px 6px rgba(0,0,0,.05);
  --font:        'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ─── Reset & Base ──────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.5; min-height: 100vh; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

/* ─── Utilities ─────────────────────────────────────────────────────────── */
.text-muted  { color: var(--text-muted); }
.text-small  { font-size: .875rem; }
.text-center { text-align: center; }
.font-medium { font-weight: 500; }
.font-bold   { font-weight: 700; }
.truncate    { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-4 { margin-top: 1rem; }
.mb-4 { margin-bottom: 1rem; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: .5rem; }
.w-full { width: 100%; }

/* ─── Buttons ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .5rem 1rem; border-radius: var(--radius);
  font-size: .875rem; font-weight: 500; cursor: pointer;
  border: 1px solid transparent; transition: background .15s, border-color .15s;
  text-decoration: none; white-space: nowrap; line-height: 1.4;
}
.btn-primary  { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); text-decoration: none; color: #fff; }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--bg); border-color: var(--border-hover); text-decoration: none; color: var(--text); }
.btn-danger   { background: var(--error); color: #fff; border-color: var(--error); }
.btn-danger:hover { background: #b91c1c; text-decoration: none; color: #fff; }
.btn-ghost    { background: transparent; color: var(--text-muted); border-color: transparent; }
.btn-ghost:hover { background: var(--bg); color: var(--text); text-decoration: none; }
.btn-sm { padding: .375rem .75rem; font-size: .8125rem; }
.btn-lg { padding: .75rem 1.5rem; font-size: 1rem; }

/* ─── Cards ─────────────────────────────────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.card-header { padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.card-header h2, .card-header h3 { font-size: 1rem; font-weight: 600; }
.card-body { padding: 1.25rem; }

/* Stats */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.25rem; box-shadow: var(--shadow-sm); }
.stat-card .stat-icon { width: 40px; height: 40px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; margin-bottom: .75rem; }
.stat-card .stat-label { font-size: .75rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; margin-bottom: .375rem; }
.stat-card .stat-value { font-size: 2rem; font-weight: 700; line-height: 1; }
.stat-card .stat-sub { font-size: .75rem; color: var(--text-muted); margin-top: .375rem; }
.stat-blue   .stat-icon { background: #eff6ff; color: #2563eb; }
.stat-green  .stat-icon { background: #f0fdf4; color: #16a34a; }
.stat-amber  .stat-icon { background: #fffbeb; color: #d97706; }
.stat-violet .stat-icon { background: #f5f3ff; color: #7c3aed; }
.stat-rose   .stat-icon { background: #fff1f2; color: #e11d48; }

/* ─── Tables ─────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: .875rem; }
thead th { background: var(--bg); padding: .75rem 1rem; text-align: left; font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); border-bottom: 1px solid var(--border); white-space: nowrap; }
tbody td { padding: .75rem 1rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #fafbfc; }
.table-actions { display: flex; gap: .375rem; align-items: center; }

/* ─── Forms ──────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 1rem; }
.form-label { display: block; font-size: .875rem; font-weight: 500; margin-bottom: .375rem; }
.form-label.required::after { content: ' *'; color: var(--error); }
.form-control { width: 100%; padding: .5rem .75rem; border: 1px solid var(--border); border-radius: var(--radius); font-size: .875rem; color: var(--text); background: var(--surface); transition: border-color .15s, box-shadow .15s; font-family: var(--font); line-height: 1.5; }
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.form-control::placeholder { color: var(--text-muted); }
.form-hint { font-size: .75rem; color: var(--text-muted); margin-top: .25rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }

/* ─── Badges ─────────────────────────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; gap: .25rem; padding: .2rem .55rem; border-radius: 999px; font-size: .75rem; font-weight: 500; line-height: 1; }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-error   { background: var(--error-bg);   color: var(--error);   }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-blue    { background: var(--primary-light); color: var(--primary); }
.badge-gray    { background: #f1f5f9; color: var(--text-muted); }

/* ─── Alerts ─────────────────────────────────────────────────────────────── */
.alert { padding: .875rem 1rem; border-radius: var(--radius); font-size: .875rem; display: flex; align-items: flex-start; gap: .5rem; margin-bottom: 1rem; }
.alert-success { background: var(--success-bg); color: var(--success); border: 1px solid var(--success-border); }
.alert-error   { background: var(--error-bg);   color: var(--error);   border: 1px solid var(--error-border);   }
.alert-warning { background: var(--warning-bg); color: var(--warning); border: 1px solid var(--warning-border); }
.alert-info    { background: var(--primary-light); color: var(--primary); border: 1px solid #bfdbfe; }

/* ─── Pagination ─────────────────────────────────────────────────────────── */
.pagination { display: flex; align-items: center; gap: .25rem; margin-top: 1rem; flex-wrap: wrap; padding: 0 1rem 1rem; }
.page-link { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; padding: 0 .5rem; border: 1px solid var(--border); border-radius: var(--radius); font-size: .875rem; color: var(--text-muted); background: var(--surface); text-decoration: none; transition: all .15s; }
.page-link:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); text-decoration: none; }
.page-link.active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.page-link.disabled { opacity: .4; pointer-events: none; }

/* ─── Modal ──────────────────────────────────────────────────────────────── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; z-index: 999; padding: 1rem; opacity: 0; pointer-events: none; transition: opacity .2s; }
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal { background: var(--surface); border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto; transform: translateY(16px); transition: transform .2s; }
.modal-overlay.open .modal { transform: translateY(0); }
.modal-header { padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.modal-header h3 { font-size: 1rem; font-weight: 600; }
.modal-body { padding: 1.5rem; }
.modal-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: .5rem; }
.btn-close { background: none; border: none; cursor: pointer; color: var(--text-muted); font-size: 1.25rem; display: flex; align-items: center; padding: .25rem; border-radius: var(--radius); }
.btn-close:hover { background: var(--bg); color: var(--text); }

/* ─── Admin Layout ───────────────────────────────────────────────────────── */
.admin-wrapper { display: flex; min-height: 100vh; }

.sidebar { width: var(--sidebar-w); background: var(--text); color: #fff; display: flex; flex-direction: column; position: fixed; top: 0; left: 0; bottom: 0; z-index: 100; transition: transform .25s; }
.sidebar-brand { padding: 1.25rem 1rem; border-bottom: 1px solid rgba(255,255,255,.08); display: flex; align-items: center; gap: .75rem; }
.sidebar-brand img { width: 36px; height: 36px; object-fit: contain; border-radius: 6px; }
.sidebar-brand span { font-size: .9375rem; font-weight: 600; line-height: 1.2; }
.sidebar-nav { flex: 1; padding: .75rem 0; overflow-y: auto; }
.nav-section { padding: .5rem 1rem .25rem; font-size: .6875rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: rgba(255,255,255,.35); margin-top: .25rem; }
.nav-link { display: flex; align-items: center; gap: .75rem; padding: .625rem 1rem; color: rgba(255,255,255,.7); font-size: .875rem; text-decoration: none; transition: background .15s, color .15s; margin: 0 .5rem; border-radius: var(--radius); }
.nav-link:hover { background: rgba(255,255,255,.08); color: #fff; text-decoration: none; }
.nav-link.active { background: var(--primary); color: #fff; }
.nav-link i { width: 18px; text-align: center; font-size: .9375rem; }
.sidebar-footer { padding: .75rem .5rem; border-top: 1px solid rgba(255,255,255,.08); }
.sidebar-footer .nav-link { color: rgba(255,255,255,.55); }
.sidebar-footer .nav-link:hover { color: #fff; }

.admin-main { margin-left: var(--sidebar-w); flex: 1; display: flex; flex-direction: column; min-height: 100vh; }
.topbar { height: var(--header-h); background: var(--surface); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 0 1.5rem; position: sticky; top: 0; z-index: 50; box-shadow: var(--shadow-sm); }
.topbar-title { font-size: 1.125rem; font-weight: 600; }
.topbar-right { display: flex; align-items: center; gap: .75rem; }
.topbar-user { display: flex; align-items: center; gap: .5rem; font-size: .875rem; color: var(--text-muted); }
.topbar-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: .875rem; font-weight: 600; }
.page-content { padding: 1.5rem; flex: 1; }
.page-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 1.5rem; gap: 1rem; flex-wrap: wrap; }
.page-header-info h1 { font-size: 1.375rem; font-weight: 700; line-height: 1.2; }
.page-header-info p { font-size: .875rem; color: var(--text-muted); margin-top: .25rem; }

.sidebar-toggle { display: none; background: none; border: none; cursor: pointer; color: var(--text); font-size: 1.25rem; padding: .25rem; }
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 99; }

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.open { display: block; }
  .admin-main { margin-left: 0; }
  .sidebar-toggle { display: flex; }
  .page-content { padding: 1rem; }
  .topbar { padding: 0 1rem; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) { .stats-grid { grid-template-columns: 1fr; } }

/* ─── Icon Picker ────────────────────────────────────────────────────────── */
.icon-preview { display: flex; align-items: center; gap: .75rem; padding: .5rem .75rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); cursor: pointer; transition: border-color .15s; font-size: .875rem; color: var(--text); }
.icon-preview:hover { border-color: var(--primary); }
.icon-preview-icon { width: 32px; height: 32px; background: var(--primary-light); color: var(--primary); border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 1rem; }
.icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: .375rem; max-height: 220px; overflow-y: auto; padding: .5rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); margin-top: .5rem; }
.icon-opt { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius); cursor: pointer; font-size: 1.1rem; color: var(--text-muted); transition: all .15s; border: 2px solid transparent; }
.icon-opt:hover { background: var(--primary-light); color: var(--primary); }
.icon-opt.selected { background: var(--primary); color: #fff; border-color: var(--primary); }
.icon-search { width: 100%; padding: .5rem .75rem; border: 1px solid var(--border); border-radius: var(--radius); font-size: .875rem; margin-bottom: .5rem; font-family: var(--font); }
.icon-search:focus { outline: none; border-color: var(--primary); }

/* ─── Public Page — novo design ─────────────────────────────────────────── */
.pub-body { background: #eef2f8; min-height: 100vh; font-family: var(--font); }

.pub-hero {
  background: linear-gradient(160deg, #1e3a8a 0%, #2563eb 55%, #3b82f6 100%);
  padding: 1.75rem 1.5rem 4.5rem;
  text-align: center;
  position: relative;
}

.pub-logo {
  width: 288px;
  height: 108px;
  object-fit: contain;
  object-position: center;
  border-radius: 18px;
  margin: 0 auto 1.125rem;
  background: #fff;
  padding: 4px 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,.22), 0 2px 8px rgba(0,0,0,.12);
  display: block;
}

.pub-title {
  font-size: 1.875rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.025em;
  margin-bottom: .375rem;
}

.pub-subtitle {
  font-size: .9375rem;
  color: rgba(255,255,255,.78);
  font-weight: 400;
}

.pub-cards {
  max-width: 500px;
  margin: -2.25rem auto 0;
  padding: 0 1rem 2.5rem;
  display: flex;
  flex-direction: column;
  gap: .625rem;
  position: relative;
  z-index: 1;
}

.pub-card {
  display: flex;
  align-items: center;
  gap: .875rem;
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: .9375rem 1.125rem;
  color: #0f172a;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  transition: border-color .18s, box-shadow .18s, transform .18s;
}
.pub-card:hover {
  border-color: #2563eb;
  box-shadow: 0 6px 22px rgba(37,99,235,.16), 0 2px 6px rgba(0,0,0,.06);
  transform: translateY(-2px);
  text-decoration: none;
  color: #0f172a;
}

.pub-card-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  color: #2563eb;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  flex-shrink: 0;
}

.pub-card-label {
  flex: 1;
  font-size: .9375rem;
  font-weight: 600;
}

.pub-card-arrow {
  color: #94a3b8;
  font-size: .75rem;
  transition: transform .18s;
}
.pub-card:hover .pub-card-arrow { transform: translateX(3px); }

.pub-footer {
  text-align: center;
  padding: 1.5rem 1rem;
  font-size: .8125rem;
  color: #94a3b8;
}

/* ─── Reports ────────────────────────────────────────────────────────────── */
.period-tabs { display: flex; flex-wrap: wrap; gap: .375rem; margin-bottom: 1.25rem; }
.period-tab {
  padding: .4375rem .875rem;
  border-radius: 999px;
  font-size: .8125rem;
  font-weight: 500;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  text-decoration: none;
  transition: all .15s;
  display: inline-flex;
  align-items: center;
  gap: .375rem;
}
.period-tab:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.period-tab.active { background: var(--primary); border-color: var(--primary); color: #fff; }

.custom-range {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
  padding: .875rem 1rem;
  background: var(--primary-light);
  border: 1px solid #bfdbfe;
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
  font-size: .875rem;
}
.custom-range label { font-weight: 500; color: var(--primary); white-space: nowrap; }
.custom-range input[type=date] { padding: .375rem .625rem; border: 1px solid var(--border); border-radius: var(--radius); font-size: .875rem; font-family: var(--font); }
.custom-range input[type=date]:focus { outline: none; border-color: var(--primary); }

.rank-bar-wrap { display: flex; align-items: center; gap: .625rem; }
.rank-bar { height: 6px; background: var(--primary-light); border-radius: 99px; overflow: hidden; flex: 1; min-width: 60px; }
.rank-bar-fill { height: 100%; background: linear-gradient(90deg, #2563eb, #3b82f6); border-radius: 99px; transition: width .4s ease; }
.rank-pos { width: 24px; height: 24px; border-radius: 50%; background: var(--bg); border: 1.5px solid var(--border); display: inline-flex; align-items: center; justify-content: center; font-size: .75rem; font-weight: 700; color: var(--text-muted); flex-shrink: 0; }
.rank-pos.gold   { background: #fef9c3; border-color: #eab308; color: #854d0e; }
.rank-pos.silver { background: #f1f5f9; border-color: #94a3b8; color: #475569; }
.rank-pos.bronze { background: #fff7ed; border-color: #f97316; color: #9a3412; }

.breakdown-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1.5rem; }
@media (max-width: 640px) { .breakdown-grid { grid-template-columns: 1fr; } }

.breakdown-row { display: flex; align-items: center; gap: .5rem; padding: .5rem 0; border-bottom: 1px solid var(--border); font-size: .875rem; }
.breakdown-row:last-child { border-bottom: none; }
.breakdown-label { flex: 1; font-weight: 500; }
.breakdown-count { font-weight: 600; color: var(--primary); min-width: 36px; text-align: right; }
.breakdown-pct { font-size: .75rem; color: var(--text-muted); min-width: 38px; text-align: right; }

/* ─── Login Page ─────────────────────────────────────────────────────────── */
.login-page { min-height: 100vh; background: var(--bg); display: flex; align-items: center; justify-content: center; padding: 1rem; }
.login-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 2rem; width: 100%; max-width: 380px; box-shadow: var(--shadow-lg); }
.login-logo { text-align: center; margin-bottom: 1.5rem; }
.login-logo img { width: 64px; height: 64px; object-fit: contain; margin: 0 auto .75rem; }
.login-logo h1 { font-size: 1.25rem; font-weight: 700; }
.login-logo p { font-size: .875rem; color: var(--text-muted); margin-top: .25rem; }

/* ─── QR / Misc ──────────────────────────────────────────────────────────── */
.qr-cell { display: flex; align-items: center; gap: .5rem; }
.qr-cell img { border-radius: 4px; border: 1px solid var(--border); }
.employee-slug { font-family: ui-monospace, monospace; font-size: .8125rem; background: var(--bg); padding: .125rem .4rem; border-radius: 4px; border: 1px solid var(--border); color: var(--text-muted); }
.empty-state { text-align: center; padding: 3rem 1.5rem; color: var(--text-muted); }
.empty-state i { font-size: 2.5rem; margin-bottom: 1rem; opacity: .35; display: block; }
.section-gap { margin-bottom: 1.5rem; }
.two-col-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
@media (max-width: 900px) { .two-col-grid { grid-template-columns: 1fr; } }

/* ─── Google Reviews / Commissions ──────────────────────────────────────────── */

/* Review cards */
.review-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.125rem 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .15s;
}
.review-card:hover { box-shadow: var(--shadow-md); }

.review-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .625rem;
  margin-bottom: .75rem;
}

.reviewer-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.reviewer-avatar-fallback {
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stars-display { display: flex; gap: 2px; align-items: center; }

.review-comment {
  font-size: .9rem;
  color: var(--text);
  line-height: 1.6;
  margin-bottom: .75rem;
  padding: .5rem .75rem;
  background: var(--bg);
  border-radius: var(--radius);
  border-left: 3px solid var(--border);
}
.review-reply {
  font-size: .8125rem;
  color: var(--text-muted);
  padding: .5rem .75rem;
  background: var(--primary-light);
  border-radius: var(--radius);
  border-left: 3px solid var(--primary);
  margin-bottom: .75rem;
}
.review-actions {
  display: flex;
  align-items: center;
  gap: .375rem;
  flex-wrap: wrap;
  padding-top: .625rem;
  border-top: 1px solid var(--border);
}

/* Confidence score badge variant */
.badge-confidence-high   { background: #f0fdf4; color: #16a34a; }
.badge-confidence-medium { background: #fffbeb; color: #d97706; }
.badge-confidence-low    { background: #f1f5f9; color: #64748b; }

/* Commission table accents */
.commission-value { font-weight: 700; color: var(--success); }
.attr-method-auto   { font-size: .75rem; background: #f1f5f9; color: #475569; padding:.2rem .5rem; border-radius:999px; }
.attr-method-manual { font-size: .75rem; background: var(--primary-light); color: var(--primary); padding:.2rem .5rem; border-radius:999px; }

/* ─── Icon Picker ────────────────────────────────────────────────────────── */

.icon-picker-preview {
  display: flex;
  align-items: center;
  gap: .625rem;
  padding: .5rem .75rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  background: var(--surface);
  transition: border-color .15s;
  user-select: none;
}
.icon-picker-preview:hover { border-color: var(--primary); }

.icon-picker-preview-dot {
  width: 34px; height: 34px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  transition: background .2s, color .2s;
}

.icon-picker-panel {
  margin-top: .5rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.icon-picker-search-wrap {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .625rem .875rem;
  border-bottom: 1px solid var(--border);
}

.icon-picker-search {
  flex: 1;
  border: none;
  outline: none;
  font-size: .875rem;
  background: transparent;
  color: var(--text);
}
.icon-picker-search::placeholder { color: var(--text-muted); }

.icon-picker-tabs {
  display: flex;
  gap: 0;
  overflow-x: auto;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  scrollbar-width: none;
}
.icon-picker-tabs::-webkit-scrollbar { display: none; }

.icon-picker-tab {
  padding: .5rem .875rem;
  font-size: .8125rem;
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: color .15s, border-color .15s;
}
.icon-picker-tab:hover { color: var(--text); }
.icon-picker-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: var(--surface);
}

.icon-picker-grid {
  max-height: 280px;
  overflow-y: auto;
  padding: .5rem;
}

.icon-picker-section-label {
  font-size: .6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  padding: .375rem .25rem .25rem;
}

.icon-picker-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(66px, 1fr));
  gap: .25rem;
  margin-bottom: .5rem;
}

.icon-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .25rem;
  padding: .5rem .25rem;
  border-radius: var(--radius);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background .12s, border-color .12s;
  min-width: 0;
}
.icon-item:hover {
  background: var(--bg);
  border-color: var(--border);
}
.icon-item.selected {
  background: var(--primary-light);
  border-color: var(--primary);
}
.icon-item i {
  font-size: 1.25rem;
  line-height: 1;
}
.icon-item span {
  font-size: .6375rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.icon-item.selected span { color: var(--primary); }

.icon-picker-empty {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: 2rem;
  color: var(--text-muted);
  font-size: .875rem;
  text-align: center;
}
