/* Shared styles for admin list tables (DW management, company/user management).
   Used by:
   - app/views/company/dw_list.html.erb
   - app/views/admin/dw_management.html.erb
   - app/views/admin/company_management.html.erb
   - app/views/admin/user_management.html.erb */

.dw-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
  overflow: hidden;
  margin-bottom: 24px;
}
/* extra bottom space so last row clears a fixed bottom-right action button */
.dw-card--spaced { margin-bottom: 80px; }

.dw-table {
  width: 100%;
  border-collapse: collapse;
}
.dw-table th {
  background: #003D99;
  color: #fff;
  font-weight: 600;
  font-size: .78rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 12px 16px;
  text-align: left;
}
.dw-table th.action-col { text-align: right; }
.dw-table td {
  padding: 16px;
  border-bottom: 2px solid #e5e9f2;
  vertical-align: top;
}
.dw-table tr:last-child td { border-bottom: none; }
.dw-table td.action-col { text-align: right; white-space: nowrap; }

/* left accent bar marks each channel section (DW views) */
.dw-table td.dw-channel-cell { border-left: 4px solid #003D99; }

/* thicker separator between companies (multi-company DW admin view) */
.dw-table tr.dw-company-start td { border-top: 3px solid #cdd6ea; }
.dw-table tr.dw-company-start:first-child td { border-top: none; }

/* prominent first-column cells */
.dw-company-cell {
  background: #f8faff;
  font-weight: 700;
  font-size: 1rem;
  color: #111827;
}
.dw-email-cell {
  background: #f8faff;
  font-weight: 700;
  font-size: .95rem;
  color: #111827;
}

/* channel/platform heading (DW views) */
.dw-platform {
  display: inline-block;
  font-weight: 700;
  font-size: .95rem;
  color: #003D99;
  text-transform: uppercase;
  letter-spacing: .03em;
}

/* small caption above chip lists */
.dw-acct-label {
  display: block;
  font-size: .7rem;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin: 8px 0 4px;
}

/* plain text values */
.dw-name { color: #374151; }
.dw-name-empty { color: #9ca3af; font-style: italic; }

/* platform-grouped chip rows: label column + chips column */
.dw-plat-grid {
  display: grid;
  grid-template-columns: 92px 1fr;
  row-gap: 6px;
  align-items: start;
}
.dw-plat-label {
  font-size: .72rem;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: .03em;
  padding-top: 6px;
}

/* chip lists — values rendered as pills, distinct from labels */
.dw-acct-list,
.dw-chip-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.dw-acct-list li,
.dw-chip-list li {
  font-size: .85rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 6px;
}
/* default / account chip = blue */
.dw-acct-list li,
.dw-chip-list li,
.dw-chip-acct {
  background: #eef2ff;
  border: 1px solid #d6deff;
  color: #1e3a8a;
}
/* user chip = neutral gray */
.dw-chip-user {
  background: #f3f4f6;
  border: 1px solid #e2e4e9;
  color: #374151;
}
/* "+N more" chip = neutral, non-interactive */
.dw-chip-more {
  background: #f3f4f6 !important;
  border: 1px solid #e2e4e9 !important;
  color: #6b7280 !important;
  cursor: default;
}
/* empty placeholder chip */
.dw-acct-list li.dw-empty,
.dw-chip-empty {
  background: transparent !important;
  border: 1px dashed #d1d5db !important;
  color: #9ca3af !important;
  font-style: italic;
}

/* status badges */
.dw-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 600;
}
.dw-badge-set   { background: #dcfce7; color: #166534; }
.dw-badge-unset { background: #fee2e2; color: #991b1b; }

/* manual-channel tag */
.dw-tag-manual {
  display: inline-block;
  margin-left: 6px;
  font-size: .68rem;
  font-weight: 600;
  color: #6b7280;
  background: #f3f4f6;
  border-radius: 4px;
  padding: 2px 6px;
  vertical-align: middle;
}

/* icon action buttons */
.dw-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #003D99;
  margin-left: 4px;
  transition: all .15s;
  vertical-align: middle;
  text-decoration: none;
  cursor: pointer;
}
.dw-icon-btn img { width: 22px; height: 22px; }
.dw-icon-btn:hover { border-color: #003D99; color: #003D99; box-shadow: 0 1px 4px rgba(0,61,153,.25); }
.dw-icon-btn.danger { color: #dc2626; }
.dw-icon-btn.danger:hover { border-color: #dc2626; color: #dc2626; box-shadow: 0 1px 4px rgba(220,38,38,.25); }

/* add button (DW views) */
.dw-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 6px 12px;
  border: 1px solid #003D99;
  border-radius: 8px;
  background: #fff;
  color: #003D99;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
}
.dw-add-btn:hover { background: #003D99; color: #fff; }

/* ─── Dark mode ─────────────────────────────────────────────
   Scoped to [data-bs-theme="dark"]. Specificity is kept above
   the generic td/tr overrides in public/css/dark.css. */

[data-bs-theme="dark"] .dw-card {
  background: #212529;
  box-shadow: 0 1px 3px rgba(0,0,0,.4);
}

[data-bs-theme="dark"] .dw-table td {
  border-bottom-color: #343a42 !important;
}
[data-bs-theme="dark"] .dw-table td.dw-channel-cell {
  border-left: 4px solid #3385FF !important;
}
[data-bs-theme="dark"] .dw-table tr.dw-company-start td {
  border-top-color: #3a4150 !important;
}

[data-bs-theme="dark"] .dw-company-cell,
[data-bs-theme="dark"] .dw-email-cell {
  background: #1b1f26;
  color: #e8eaed !important;
}

[data-bs-theme="dark"] .dw-platform { color: #6ea8fe; }
[data-bs-theme="dark"] .dw-acct-label { color: #8b949e; }
[data-bs-theme="dark"] .dw-plat-label { color: #8b949e; }
[data-bs-theme="dark"] .dw-name { color: #c9d1d9; }
[data-bs-theme="dark"] .dw-name-empty { color: #6c757d; }

[data-bs-theme="dark"] .dw-acct-list li,
[data-bs-theme="dark"] .dw-chip-list li,
[data-bs-theme="dark"] .dw-chip-acct {
  background: #1c2a4a;
  border-color: #2f4173;
  color: #a5c0ff;
}
[data-bs-theme="dark"] .dw-chip-user {
  background: #2b2f36;
  border-color: #444b55;
  color: #adb5bd;
}
[data-bs-theme="dark"] .dw-chip-more {
  background: #2b2f36 !important;
  border-color: #444b55 !important;
  color: #8b949e !important;
}
[data-bs-theme="dark"] .dw-acct-list li.dw-empty,
[data-bs-theme="dark"] .dw-chip-empty {
  border-color: #495057 !important;
  color: #6c757d !important;
}

[data-bs-theme="dark"] .dw-badge-set   { background: #14331f; color: #4ade80; }
[data-bs-theme="dark"] .dw-badge-unset { background: #3b1518; color: #f87171; }

[data-bs-theme="dark"] .dw-tag-manual {
  background: #2b2f36;
  color: #adb5bd;
}

[data-bs-theme="dark"] .dw-icon-btn {
  background: #2b2f36;
  border-color: #444b55;
  color: #6ea8fe;
}
[data-bs-theme="dark"] .dw-icon-btn:hover {
  border-color: #6ea8fe;
  color: #6ea8fe;
  box-shadow: 0 1px 4px rgba(110,168,254,.35);
}
[data-bs-theme="dark"] .dw-icon-btn.danger { color: #f87171; }
[data-bs-theme="dark"] .dw-icon-btn.danger:hover {
  border-color: #f87171;
  color: #f87171;
  box-shadow: 0 1px 4px rgba(248,113,113,.35);
}

[data-bs-theme="dark"] .dw-add-btn {
  background: transparent;
  border-color: #6ea8fe;
  color: #6ea8fe;
}
[data-bs-theme="dark"] .dw-add-btn:hover {
  background: #003D99;
  border-color: #003D99;
  color: #fff;
}
.feature-update-dot {
  position: absolute;
  top: -2px;
  left: -2px;
  width: 8px;
  height: 8px;
  background: #e53e3e;
  border-radius: 50%;
  pointer-events: none;
}

.ck-content img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  margin: 8px 0;
}

.ck-content figure.image {
  margin: 16px auto;
  text-align: center;
}

.ck-content figure.image-style-align-right {
  float: right;
  margin-left: 16px;
  max-width: 50%;
}

.ck-content figure.image-style-align-left {
  float: left;
  margin-right: 16px;
  max-width: 50%;
}

.ck-content figure.image-style-align-center {
  margin-left: auto;
  margin-right: auto;
}

.ck-content pre {
  background: #f4f4f4;
  padding: 12px 16px;
  border-radius: 6px;
  overflow-x: auto;
  font-size: 13px;
}

.ck-content blockquote {
  border-left: 4px solid #003D99;
  margin: 16px 0;
  padding: 4px 16px;
  color: #555;
}

/* ─── Feature update pages ──────────────────────────────── */

.fu-card {
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 12px;
  padding: 22px 26px;
  margin-bottom: 16px;
}
.fu-card--new { border-left: 4px solid #e53e3e; }
.fu-card--detail { border-radius: 10px; padding: 32px 40px; }
.fu-title {
  font-size: 18px;
  font-weight: 700;
  color: #003D99;
  text-decoration: none;
}
.fu-muted { color: #888; }
.fu-back-link { color: #555; font-size: 14px; text-decoration: none; }
.fu-items { margin: 0; padding-left: 18px; }
.fu-items li { color: #444; font-size: 14px; line-height: 1.6; margin-bottom: 3px; }
.fu-items--detail { padding-left: 20px; }
.fu-items--detail li { color: #333; font-size: 15px; line-height: 1.7; margin-bottom: 5px; }

/* category chips: count pills + section badges */
.fu-chip {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 20px;
}
.fu-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 7px;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.fu-badge .fu-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.fu-cat-new      { background: #e7f6ec; color: #16a34a; }
.fu-cat-improved { background: #e8f0fe; color: #2563eb; }
.fu-cat-fixed    { background: #f1e9fd; color: #7c3aed; }

.fu-btn-edit {
  font-size: 12.5px;
  color: #555;
  text-decoration: none;
  border: 1px solid #ccc;
  padding: 5px 12px;
  border-radius: 6px;
}
.fu-btn-delete {
  font-size: 12.5px;
  color: #c0392b;
  background: #fff;
  border: 1px solid #e0a0a0;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
}
.fu-new-btn {
  background: #003D99;
  color: #fff;
  padding: 8px 16px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 14px;
}
.fu-add-btn {
  margin-top: 6px;
  font-size: 12.5px;
  color: #003D99;
  background: #eef3ff;
  border: 1px solid #cfe0ff;
  border-radius: 7px;
  padding: 7px 12px;
  cursor: pointer;
}
.fu-row-input {
  font-size: 13px;
  padding: 8px 10px;
  border: 1px solid #dcdcdc;
  border-radius: 7px;
}
.fu-remove-btn {
  flex: 0 0 auto;
  border: 1px solid #e0a0a0;
  color: #c0392b;
  background: #fff;
  border-radius: 6px;
  width: 32px;
  height: 34px;
  cursor: pointer;
}

/* ─── Dark mode ─────────────────────────────────────────── */

[data-bs-theme="dark"] .fu-card {
  background: #212529;
  border-color: #343a42;
}
[data-bs-theme="dark"] .fu-title { color: #6ea8fe; }
[data-bs-theme="dark"] .fu-muted { color: #8b949e; }
[data-bs-theme="dark"] .fu-back-link { color: #adb5bd; }
[data-bs-theme="dark"] .fu-items li { color: #c9d1d9; }
[data-bs-theme="dark"] .fu-items--detail li { color: #c9d1d9; }
[data-bs-theme="dark"] .fu-cat-new      { background: #14331f; color: #4ade80; }
[data-bs-theme="dark"] .fu-cat-improved { background: #1c2a4a; color: #6ea8fe; }
[data-bs-theme="dark"] .fu-cat-fixed    { background: #2a1d40; color: #c4a5f5; }
[data-bs-theme="dark"] .fu-btn-edit { color: #adb5bd; border-color: #495057; }
[data-bs-theme="dark"] .fu-btn-delete {
  background: transparent;
  color: #f87171;
  border-color: #7a3b3b;
}
[data-bs-theme="dark"] .fu-add-btn {
  color: #6ea8fe;
  background: #1c2a4a;
  border-color: #2f4173;
}
[data-bs-theme="dark"] .fu-row-input {
  background: #2b2f36;
  border-color: #495057;
  color: #dee2e6;
}
[data-bs-theme="dark"] .fu-remove-btn {
  background: transparent;
  color: #f87171;
  border-color: #7a3b3b;
}
[data-bs-theme="dark"] .ck-content pre {
  background: #2b2f36;
}
[data-bs-theme="dark"] .ck-content blockquote {
  border-left-color: #3385FF;
  color: #adb5bd;
}
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */
