/* Ansvarly — monochrome B2B panel */
:root {
  --bg: #ffffff;
  --surface: #f5f5f7;
  --border: #e5e5e7;
  --text: #111111;
  --text-secondary: #6e6e73;
  --text-muted: #8e8e93;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.04);
  --radius: 10px;
  --radius-sm: 8px;
  --font: "DM Sans", system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
}

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

a:hover {
  text-decoration: underline;
}

.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 240px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  padding: 1.25rem 0;
}

.sidebar-brand {
  padding: 0 1.25rem 1rem;
  border-bottom: 1px solid var(--border);
}

.sidebar-logo {
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
}

.sidebar-company {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.sidebar-nav {
  flex: 1;
  padding: 1rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.sidebar-nav a {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.9375rem;
  text-decoration: none;
}

.sidebar-nav a:hover {
  background: rgba(0, 0, 0, 0.04);
  text-decoration: none;
}

.sidebar-nav a.active {
  background: #fff;
  border: 1px solid var(--border);
  font-weight: 600;
}

.sidebar-footer {
  padding: 0.75rem 0.75rem 0;
  border-top: 1px solid var(--border);
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.sidebar-footer a {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-decoration: none;
}

.sidebar-footer a:hover {
  color: var(--text);
  background: rgba(0, 0, 0, 0.04);
  text-decoration: none;
}

.main {
  flex: 1;
  min-width: 0;
  padding: 2rem 2.5rem 3rem;
}

.page-header {
  margin-bottom: 1.75rem;
}

.page-title {
  font-size: 1.5rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  margin: 0 0 0.35rem;
}

.page-sub {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  max-width: 52rem;
}

.banner {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 0.875rem 1rem;
  margin-bottom: 1.25rem;
  font-size: 0.9375rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.flash-stack {
  margin-bottom: 1rem;
}

.flash {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-bottom: 0.5rem;
  font-size: 0.9375rem;
}

.flash-info {
  background: var(--surface);
}
.flash-success {
  background: #f0f0f2;
}
.flash-warning {
  background: #fafafa;
}
.flash-danger {
  background: #f5f5f5;
  border-color: #d0d0d4;
}

.grid-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow);
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow);
}

.panel-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 1rem;
}

.readiness-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.readiness-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.readiness-label {
  flex: 0 0 220px;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.readiness-bar {
  flex: 1;
  height: 8px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 99px;
  overflow: hidden;
}

.readiness-fill {
  height: 100%;
  background: var(--text);
  border-radius: 99px;
}

.readiness-fill.incomplete {
  background: var(--text-muted);
}

.activity-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.activity-list li {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
}

.activity-list li:last-child {
  border-bottom: none;
}

.activity-meta {
  color: var(--text-muted);
  font-size: 0.8125rem;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.data-table th,
.data-table td {
  padding: 0.65rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.data-table th {
  background: var(--surface);
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.data-table tr:last-child td {
  border-bottom: none;
}

.badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background: #fff;
}

.badge-approved {
  border-color: #c8c8cc;
}
.badge-restricted {
  background: #f0f0f2;
}
.badge-not {
  background: #fff;
}
.badge-review {
  background: rgba(0, 0, 0, 0.06);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1rem;
}

.input,
select,
textarea {
  font: inherit;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text);
  width: 100%;
  max-width: 320px;
}

textarea {
  max-width: 100%;
  min-height: 100px;
  resize: vertical;
}

.form-row {
  margin-bottom: 1rem;
}

.form-row label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--text-secondary);
}

.form-row .errors {
  color: #6b0000;
  font-size: 0.8125rem;
  margin-top: 0.25rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  font: inherit;
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
}

.btn:hover {
  background: var(--surface);
  text-decoration: none;
}

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

.btn-primary:hover {
  opacity: 0.92;
  background: var(--text);
  color: #fff;
}

.btn-ghost {
  background: transparent;
}

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: var(--surface);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.auth-logo {
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.auth-hint {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.auth-footer {
  margin-top: 1.25rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 50;
}

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

.modal {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.modal-title {
  font-size: 1.125rem;
  font-weight: 650;
  margin: 0;
}

.onboarding-steps {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.step-pill {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 99px;
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.step-pill.active {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
}

.disclaimer {
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-style: italic;
}

@media (max-width: 900px) {
  .app-shell {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
}

/* —— Public employee AI tools (/public/<slug>/tools) —— */
.public-tools-body {
  margin: 0;
  min-height: 100vh;
  background: var(--surface);
}

.public-tools-page {
  max-width: 920px;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

.public-tools-header {
  margin-bottom: 1.5rem;
}

.public-tools-brand {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.public-tools-title {
  font-size: 1.625rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
}

.public-tools-lead {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  max-width: 40rem;
  line-height: 1.55;
}

.public-tools-sticky {
  position: sticky;
  top: 0;
  z-index: 20;
  background: linear-gradient(to bottom, var(--surface) 70%, rgba(245, 245, 247, 0.92));
  padding-bottom: 0.75rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.public-tools-search-wrap {
  margin-bottom: 0.75rem;
}

.public-tools-search {
  max-width: 100%;
  width: 100%;
}

.public-tools-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.public-tools-tab {
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.4rem 0.75rem;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-secondary);
  cursor: pointer;
}

.public-tools-tab:hover {
  border-color: #ccc;
  color: var(--text);
}

.public-tools-tab.is-active {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
}

.public-tools-tab-count {
  opacity: 0.85;
  font-weight: 600;
}

.public-tools-tab.is-active .public-tools-tab-count {
  opacity: 0.95;
}

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

.public-tools-filter-empty {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin: 0 0 1rem;
}

.public-tools-sections {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.public-tools-section-title {
  font-size: 1.05rem;
  font-weight: 650;
  margin: 0 0 0.25rem;
  letter-spacing: -0.01em;
}

.public-tools-section-title--approved {
  color: #1a4d2e;
}

.public-tools-section-title--restricted {
  color: #6b5a1e;
}

.public-tools-section-title--not_approved {
  color: #5c2a2a;
}

.public-tools-section-title--under_review {
  color: var(--text-secondary);
}

.public-tools-section-hint {
  margin: 0 0 0.85rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  max-width: 42rem;
}

.public-tools-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.public-tools-section-empty {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
  font-style: italic;
}

.public-tool-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  box-shadow: var(--shadow);
}

.public-tool-card--approved {
  border-left: 3px solid #2d6a4f;
}

.public-tool-card--restricted {
  border-left: 3px solid #b58900;
}

.public-tool-card--not_approved {
  border-left: 3px solid #9b4a4a;
}

.public-tool-card--under_review {
  border-left: 3px solid var(--text-muted);
}

.public-tool-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.5rem;
}

.public-tool-name {
  font-size: 1.0625rem;
  font-weight: 650;
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
}

.public-tool-vendor {
  margin: 0;
  width: 100%;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.public-tool-badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 99px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.public-tool-badge--approved {
  background: #e8f5ef;
  color: #1a4d2e;
  border: 1px solid #b8dcc8;
}

.public-tool-badge--restricted {
  background: #faf6e8;
  color: #5c4a12;
  border: 1px solid #e0d49a;
}

.public-tool-badge--not_approved {
  background: #f8ecec;
  color: #6b3030;
  border: 1px solid #e0b4b4;
}

.public-tool-badge--under_review {
  background: #f0f0f2;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.public-tool-category {
  font-size: 0.75rem;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.15rem 0.45rem;
}

.public-tool-desc {
  margin: 0 0 0.75rem;
  font-size: 0.9375rem;
  color: var(--text);
  line-height: 1.5;
}

.public-tool-rules-label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.public-tool-rules-list {
  margin: 0;
  padding-left: 1.15rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.public-tool-rules-list li {
  margin-bottom: 0.25rem;
}

.public-tools-empty-state {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow);
}

.public-tools-empty-state p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

.public-tools-footer {
  margin-top: 2.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.public-tools-footer .page-sub {
  font-size: 0.8125rem;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 700;
  line-height: 1;
}

.sidebar-logo-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
}