/* Business Directory India — panel + auth (mobile-first). */

.idsa-bizdir-root {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: #f6f4ef;
  color: #1a2332;
  --dd-accent: #b45309;
  --dd-accent-dark: #92400e;
}

.dd-auth {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 18px;
}

.dd-card {
  width: min(100%, 440px);
  background: #fff;
  border: 1px solid #e8dfd0;
  border-radius: 14px;
  padding: 22px 20px;
  box-shadow: 0 8px 28px rgba(26, 35, 50, 0.08);
}

.dd-card h1 {
  margin: 0 0 8px;
  font-size: 1.35rem;
}

.dd-subhead {
  margin: 0 0 10px;
  font-size: 0.95rem;
}

.dd-muted {
  color: #5c6b7a;
  font-size: 0.875rem;
  margin: 0 0 12px;
}

.dd-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: #465978;
  margin: 0 0 12px;
}

.dd-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-top: 5px;
  border: 1px solid #d4cbb8;
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
}

.dd-btn {
  display: inline-block;
  width: 100%;
  text-align: center;
  box-sizing: border-box;
  border-radius: 10px;
  padding: 11px 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  font: inherit;
}

.dd-btn--primary {
  border: 1px solid var(--dd-accent-dark);
  background: var(--dd-accent);
  color: #fff;
}

.dd-btn--secondary {
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #1e293b;
}

.dd-auth-block {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #ece5d8;
}

.dd-auth-block--csp {
  margin-top: 14px;
}

.dd-auth-note {
  font-size: 0.8125rem;
  margin-top: 10px;
}

.dd-alert {
  background: #ffecec;
  border: 1px solid #f3b5b5;
  color: #8f2222;
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 12px;
  font-size: 0.875rem;
}

.dd-alert--warn {
  background: #fff8e7;
  border-color: #f4d187;
  color: #8a5a00;
}

.dd-auth-meta {
  margin-top: 16px;
  font-size: 0.78rem;
}

.dd-auth-meta a {
  color: var(--dd-accent-dark);
}

.dd-shell {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 12px 32px;
}

.dd-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid #e8dfd0;
  border-radius: 12px;
}

.dd-topbar__brand {
  font-weight: 800;
  font-size: 1rem;
}

.dd-topbar__meta {
  font-size: 0.78rem;
  color: #64748b;
  margin-top: 2px;
}

.dd-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.82rem;
}

.dd-nav a {
  color: #334155;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid transparent;
}

.dd-nav a.is-active {
  background: #fef3c7;
  border-color: #fcd34d;
  color: #92400e;
  font-weight: 700;
}

.dd-main {
  min-width: 0;
}

.dd-panel-card {
  background: #fff;
  border: 1px solid #e8dfd0;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
}

.dd-panel-card h1 {
  margin: 0 0 8px;
  font-size: 1.25rem;
}

.dd-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 140px), 1fr));
  gap: 10px;
  margin: 14px 0;
}

.dd-kpi {
  border: 1px solid #ece5d8;
  border-radius: 10px;
  padding: 12px;
  background: #fffdf8;
}

.dd-kpi strong {
  display: block;
  font-size: 1.2rem;
}

.dd-kpi span {
  font-size: 0.75rem;
  color: #64748b;
}

.dd-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.dd-actions .dd-btn {
  width: auto;
  min-width: 9.5rem;
}

@media (max-width: 640px) {
  .dd-actions .dd-btn {
    width: 100%;
  }
}

.dd-chip {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
}

.dd-list {
  margin: 10px 0 0;
  padding-left: 1.1rem;
  color: #475569;
  font-size: 0.875rem;
}

.dd-empty {
  padding: 14px;
  border: 1px dashed #d4cbb8;
  border-radius: 10px;
  color: #64748b;
  font-size: 0.875rem;
}

.dd-empty--warn {
  border-color: #fbbf24;
  background: #fffbeb;
  color: #92400e;
}

.dd-back {
  color: #92400e;
  text-decoration: none;
  font-weight: 600;
}

.dd-scope-strip {
  margin: 12px 0 14px;
}

.dd-scope-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 8px;
}

.dd-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dd-filter-chip {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #e8dfd0;
  background: #fff;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
}

.dd-filter-chip.is-active {
  background: #fef3c7;
  border-color: #f59e0b;
  color: #92400e;
}

.dd-filter-chip.is-readonly {
  cursor: default;
  background: #fffdf8;
}

.dd-result-meta {
  font-size: 0.8rem;
  color: #64748b;
  margin: 0 0 10px;
}

.dd-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid #ece5d8;
  border-radius: 10px;
  margin-bottom: 12px;
}

.dd-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.dd-table th,
.dd-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #f1ebe0;
}

.dd-table th {
  background: #fffdf8;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #64748b;
}

.dd-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
}

@media (max-width: 640px) {
  .dd-table thead {
    display: none;
  }

  .dd-table tr {
    display: block;
    border-bottom: 1px solid #ece5d8;
    padding: 10px 0;
  }

  .dd-table td {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    border: 0;
    padding: 6px 12px;
  }

  .dd-table td::before {
    content: attr(data-label);
    font-weight: 700;
    color: #64748b;
    flex: 0 0 38%;
  }
}

.dd-flash {
  background: #ecfdf5;
  border: 1px solid #6ee7b7;
  color: #065f46;
  border-radius: 10px;
  padding: 10px 14px;
  margin: 0 0 14px;
  font-size: 0.875rem;
}

.dd-subtitle {
  font-size: 1rem;
  margin: 18px 0 8px;
}

.dd-assist-form {
  margin: 0;
}

.dd-assist-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.dd-assist-note {
  font-size: 0.75rem;
  line-height: 1.35;
}

.dd-btn--compact {
  min-height: 36px;
  padding: 6px 12px;
  font-size: 0.8125rem;
}

.dd-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.dd-card-actions .dd-assist-form {
  flex: 1 1 auto;
}

.dd-draft-panel {
  border: 1px solid #ece5d8;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 16px;
  background: #fffdf8;
}

.dd-draft-panel summary {
  cursor: pointer;
  font-weight: 700;
  margin-bottom: 8px;
}

.dd-draft-form {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.dd-field {
  display: grid;
  gap: 4px;
  font-size: 0.875rem;
}

.dd-field input,
.dd-field textarea {
  width: 100%;
  border: 1px solid #d6cbb8;
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
}

.dd-chip--warn {
  background: #fffbeb;
  border-color: #f59e0b;
  color: #92400e;
}

.dd-table tr.is-mine td {
  background: #fffdf8;
}

.dd-chat-id {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  word-break: break-all;
}

.dd-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dd-btn--sm {
  padding: 6px 10px;
  font-size: 12px;
}

.dd-listings-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.dd-listings-shell.is-chat-open {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
}

.dd-listings-main {
  min-width: 0;
}

.dd-inline-link {
  display: inline-block;
  margin-left: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #92400e;
}

.dd-chat-dock {
  border: 1px solid #e8dcc8;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
  min-height: 420px;
  max-height: calc(100vh - 120px);
  position: sticky;
  top: 12px;
}

.dd-chat-dock[hidden] {
  display: none !important;
}

.dd-chat-dock__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid #ece5d8;
  background: #fffdf8;
  border-radius: 14px 14px 0 0;
}

.dd-chat-dock__titles {
  min-width: 0;
}

.dd-chat-dock__titles strong {
  display: block;
  font-size: 14px;
  color: #1f2937;
}

.dd-chat-dock__close {
  border: 0;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  color: #6b7280;
  padding: 0 4px;
}

.dd-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 220px;
}

.dd-chat-bubble {
  max-width: 92%;
  padding: 8px 10px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.45;
}

.dd-chat-bubble.is-me {
  align-self: flex-end;
  background: #0d9488;
  color: #fff;
}

.dd-chat-bubble.is-them {
  align-self: flex-start;
  background: #f3f4f6;
  color: #111827;
}

.dd-chat-bubble__time {
  display: block;
  margin-top: 4px;
  font-size: 10px;
  opacity: 0.75;
}

.dd-chat-compose {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid #ece5d8;
}

.dd-chat-compose textarea {
  width: 100%;
  min-height: 56px;
  resize: vertical;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 8px 10px;
  font: inherit;
}

.dd-chat-error {
  margin: 0;
  padding: 0 14px 12px;
  color: #b45309;
  font-size: 12px;
}

.dd-table tr.is-chat-active td {
  background: #fffbeb;
}

.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;
}

@media (max-width: 900px) {
  .dd-listings-shell.is-chat-open {
    grid-template-columns: 1fr;
  }

  .dd-chat-dock {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 40;
    max-height: 72vh;
    border-radius: 16px 16px 0 0;
    min-height: 0;
  }
}

.dd-flash--info {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1e40af;
}

.dd-launch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 12px;
  margin: 14px 0;
}

.dd-launch-card {
  border: 1px solid #ece5d8;
  border-radius: 12px;
  padding: 14px;
  background: #fff;
}

.dd-launch-card h3 {
  margin: 0 0 6px;
  font-size: 0.95rem;
}

.dd-chip--success {
  background: #ecfdf5;
  border-color: #6ee7b7;
  color: #065f46;
}

.dd-notice-card--published {
  border-color: #6ee7b7;
  background: #f8fffb;
}
