:root {
  --dradis-primary: #2563eb;
  --dradis-bg: #f7f8fb;
  --shadow-soft: 0 24px 60px rgba(15, 23, 42, 0.11);
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body.dradis-landing {
  min-height: 100vh;
  margin: 0;
  background: var(--dradis-bg);
  display: flex;
  flex-direction: column;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body.dradis-landing .access-shell {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  margin: 0 auto;
  width: 100%;
  max-width: 960px;
}

body.dradis-landing .site-footer {
  background: #fff;
  border-top: 1px solid #dee2e6;
  color: #6c757d;
}

body.dradis-landing .site-footer a {
  color: inherit;
}

body.dradis-landing.dradis-login {
  background: #303744;
}

.access-shell {
  width: 100%;
  max-width: 960px;
}

.top-bar {
  display: flex;
  justify-content: flex-end;
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.help-link {
  color: #475467;
  text-decoration: none;
  font-weight: 500;
}

.help-link:hover {
  color: #111827;
}

.login-card {
  background: #fff;
  border-radius: 24px;
  padding: 3rem 2.75rem 2.5rem;
  box-shadow: var(--shadow-soft);
  width: 100%;
}

.login-card h1 {
  font-size: 2.75rem;
  font-weight: 600;
  text-align: center;
  color: #111827;
  margin-bottom: 1.5rem;
}

.login-card label {
  font-weight: 500;
  color: #1f2937;
}

.login-card .form-control {
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  padding: 0.8rem 1rem;
  background: #fbfcfe;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

.login-card .btn-primary {
  border-radius: 12px;
  padding: 0.9rem;
  font-weight: 600;
  background: var(--dradis-primary);
  border: none;
}

.login-card .register-link {
  text-align: center;
  margin-top: 1rem;
}

.login-card .register-link a {
  color: var(--dradis-primary);
  text-decoration: none;
  font-weight: 500;
}

.form-wrapper {
  margin-top: 1rem;
}

.form-wrapper ul.errors {
  list-style: none;
  padding-left: 0;
  margin-bottom: 1.25rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  color: #991b1b;
  font-size: 0.9rem;
}

.form-wrapper form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-wrapper form > div {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-wrapper form label {
  font-weight: 500;
  color: #1f2937;
  font-size: 0.95rem;
}

.form-wrapper form input[type="text"],
.form-wrapper form input[type="email"],
.form-wrapper form input[type="password"],
.form-wrapper form input[type="url"],
.form-wrapper form input[type="datetime"],
.form-wrapper form input[type="date"],
.form-wrapper form input[type="file"],
.form-wrapper form input[type="hidden"],
.form-wrapper form select {
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  background: #fbfcfe;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

.form-wrapper form select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.form-wrapper form input[type="file"] {
  cursor: pointer;
  padding: 0.5rem 1rem;
}

.form-wrapper form input[type="file"]::file-selector-button {
  border: none;
  background: #2563eb;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  margin-right: 1rem;
  transition: background 0.2s ease;
}

.form-wrapper form input[type="file"]::file-selector-button:hover {
  background: #1d4ed8;
}

.form-wrapper form textarea {
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  background: #fbfcfe;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
  resize: vertical;
}

.form-wrapper form input[type="number"] {
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  background: #fbfcfe;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
  width: 100%;
}

/* Override Bootstrap's form-control on checkboxes */
.form-wrapper input[type="checkbox"].form-control {
  display: inline-block;
  width: 1.05rem;
  height: 1.05rem;
  padding: 0;
  box-shadow: none;
}

.form-wrapper .checkbox {
  flex-direction: row !important;
  align-items: center;
}

.form-wrapper .checkbox label {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.permissions-section {
  border: 1px solid #d0d7de;
  border-radius: 8px;
  overflow: hidden;
  margin: 1rem 0;
}

.permissions-heading {
  font-size: 0.95rem;
  font-weight: 600;
  color: #1f2937;
  padding: 0.875rem 1rem;
  margin: 0;
  background: #f6f8fa;
  border-bottom: 1px solid #d0d7de;
}

.permissions-list {
  background: #fff;
}

.permission-row {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid #d8dee4;
  transition: background-color 0.15s ease;
}

.permission-row:last-child {
  border-bottom: none;
}

.permission-row > div {
  margin: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
}

.permission-row input[type="checkbox"] {
  order: 1;
  margin: 0;
}

.permission-row label {
  order: 2;
  margin: 0;
  cursor: pointer;
}

.permission-row.parent {
  background: #f6f8fa;
  font-weight: 600;
}

.permission-row.parent:hover {
  background: #eef2f5;
}

.permission-row.parent label {
  font-weight: 600;
  font-size: 0.9375rem;
}

.permission-row.child {
  padding-left: 2.75rem;
  background: #fff;
}

.permission-row.child:hover {
  background: #f6f8fa;
}

.permission-row.child label {
  font-weight: 500;
  color: #57606a;
}

#invite-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

#invite-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0;
}

#invite-form label {
  font-weight: 600;
  color: #111827;
}

#invite-form input[type="submit"] {
  border-radius: 12px;
  padding: 0.7rem 1.6rem;
  font-weight: 600;
}

.form-wrapper .scope-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.2rem 0;
}

.form-wrapper .scope-check label {
  font-weight: 400;
  color: #111827;
  margin: 0;
  cursor: pointer;
  vertical-align: middle;
}

.form-wrapper .scope-check input[type="checkbox"] {
  width: 1.05rem;
  height: 1.05rem;
  margin: 0 0.4rem 0 0;
  flex-shrink: 0;
  order: 0;
  cursor: pointer;
  vertical-align: middle;
}

.form-wrapper .checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.35rem 0;
  margin: 0;
}

.form-wrapper .checkbox label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-wrapper .checkbox label {
  font-weight: 600;
  color: #111827;
  margin: 0;
}

.form-wrapper .checkbox input[type="checkbox"] {
  display: inline-block;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 6px;
  border: 2px solid #d0d7de;
  background: #fff;
  flex-shrink: 0;
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  cursor: pointer;
  transition: all 0.15s ease;
}

.form-wrapper input[type="checkbox"] {
  width: 1.05rem;
  height: 1.05rem;
  padding: 0;
  margin: 0;
  display: inline-block;
  order: 1;
  border-radius: 6px;
  border: 2px solid #d0d7de;
  background: #fff;
  flex-shrink: 0;
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  cursor: pointer;
  transition: all 0.15s ease;
}

.form-wrapper input[type="checkbox"]:hover {
  border-color: #0d6efd;
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
}

.form-wrapper input[type="checkbox"]:checked {
  background: #0d6efd;
  border-color: #0d6efd;
}

.form-wrapper input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  inset: 0;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23fff' d='M6.173 12.133 2.4 8.36l1.06-1.06 2.713 2.713 6.364-6.364 1.06 1.06z'/%3E%3C/svg%3E") center/12px 12px no-repeat;
  background: #fff;
}

.form-wrapper input[type="checkbox"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.3);
}

.form-wrapper .checkbox input[type="checkbox"]:hover {
  border-color: #0d6efd;
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
}

.form-wrapper .checkbox input[type="checkbox"]:checked {
  background: #0d6efd;
  border-color: #0d6efd;
}

.form-wrapper .checkbox input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  inset: 0;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23fff' d='M6.173 12.133 2.4 8.36l1.06-1.06 2.713 2.713 6.364-6.364 1.06 1.06z'/%3E%3C/svg%3E") center/12px 12px no-repeat;
  background: #fff;
}

.form-wrapper .checkbox input[type="checkbox"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.3);
}

.form-wrapper form input[type="submit"],
.form-wrapper form button[type="submit"] {
  cursor: pointer;
  border-radius: 12px;
  border: none;
  background: var(--dradis-primary);
  color: #fff;
  font-weight: 600;
  padding: 0.9rem;
  transition: background 0.2s ease;
}

.form-wrapper form input[type="submit"]:hover,
.form-wrapper form button[type="submit"]:hover {
  background: #1d4ed8;
}

.form-wrapper input[type="hidden"] {
  display: none;
}

.org-overview {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.org-overview-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 2rem 2rem 1.5rem 2rem;
}

.org-overview-controls {
  padding: 1rem 2rem 2rem 2rem;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
}

.product-switcher-form {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.product-switcher-label {
  font-weight: 600;
  color: #6b7280;
  font-size: 0.875rem;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.product-switcher-select {
  flex: 1;
  max-width: 400px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  padding: 0.6rem 0.875rem;
  font-size: 0.95rem;
  background: white;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.875rem center;
  padding-right: 2.5rem;
  transition: all 0.15s ease;
  font-weight: 500;
  color: #111827;
}

.product-switcher-select:hover {
  border-color: #9ca3af;
}

.product-switcher-select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-wrapper form .has-error input,
.form-wrapper form .has-error textarea {
  border-color: #f87171;
}

.form-wrapper form .errors {
  font-size: 0.85rem;
  color: #b91c1c;
}

.dradis-dashboard {
  min-height: 100vh;
  background: #f7f8fb;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  padding: 0;
}

.dashboard-shell {
  display: flex;
  width: 100%;
  min-height: 100vh;
  background: #fff;
}

.dashboard-nav {
  position: fixed;
  left: 0;
  top: 0;
  width: 260px;
  height: 100vh;
  background: #303744;
  color: #fff;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  overflow-y: auto;
}

.dashboard-nav .brand {
  font-size: 1.5rem;
  font-weight: 600;
}

.dashboard-nav .nav-header {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.dashboard-nav .org-switcher {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.dashboard-nav .org-switcher-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.dashboard-nav .org-switcher-control {
  flex: 1;
  position: relative;
}

.dashboard-nav .org-switcher-select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 9px;
  padding: 0.35rem 2rem 0.35rem 0.7rem;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.25;
}

.dashboard-nav .org-switcher-select:focus {
  outline: 2px solid rgba(37, 99, 235, 0.45);
  outline-offset: 2px;
}

.dashboard-nav .org-switcher-control i {
  position: absolute;
  right: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.6);
  pointer-events: none;
}

.dashboard-nav .org-switcher-empty {
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  font-weight: 500;
}

.dashboard-nav .nav-main {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.dashboard-nav .nav-bottom {
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.dashboard-nav .nav-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease, background 0.2s ease;
  padding: 0.35rem 0.75rem;
  margin: 0 -0.75rem;
}

.dashboard-nav .nav-link i {
  font-size: 1.1rem;
}

.dashboard-nav .nav-link:hover {
  color: #fff;
}

.dashboard-nav .nav-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 0.5rem;
  font-weight: 600;
}

.dashboard-nav .nav-group-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  padding: 0.75rem 0.75rem 0.25rem;
  margin: 0 -0.75rem;
}

.dashboard-nav .nav-link.logout {
  color: #fca5a5;
}

.dashboard-nav .nav-link.logout:hover {
  color: #fecaca;
}

.dashboard-content {
  margin-left: 260px;
  padding: 3rem 4rem 2rem;
  background: #fff;
  min-height: 100vh;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.dashboard-content .site-footer {
  margin-top: auto;
  padding: 0.5rem 0;
  border-top: 1px solid #dee2e6;
}

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

.content-header h1 {
  margin: 0;
  font-size: 2rem;
  font-weight: 600;
  color: #111827;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
}

.org-card {
  background: #fff;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  border: 1px solid #eef1f5;
}

.org-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: #111827;
}

.org-meta {
  font-size: 0.85rem;
  color: #6b7280;
  margin-top: 0.35rem;
}
.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
  max-width: 1400px;
}

.kpi-card {
  height: 100%;
  padding: 1.5rem;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15,23,42,0.1);
  border: 1px solid #e5e7eb;
  transition: all 0.2s ease;
}

.kpi-card:hover {
  box-shadow: 0 4px 12px rgba(15,23,42,0.15);
  transform: translateY(-2px);
}

.kpi-card-critical {
  background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
  color: #fff;
  border: none;
}

.kpi-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #6b7280;
  margin: 0 0 0.5rem 0;
}

.kpi-card-critical .kpi-label {
  color: rgba(255, 255, 255, 0.9);
}

.kpi-value {
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
  color: #111827;
}

.kpi-card-critical .kpi-value {
  color: #fff;
}

/* Compact KPI Cards */
.kpi-card-compact {
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  text-align: center;
  transition: all 0.2s ease;
}

.kpi-card-compact:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
}

.kpi-card-compact-unknown {
  background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%);
  color: #fff;
  border: none;
}

.kpi-card-compact-unknown:hover {
  background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
}

.kpi-card-compact-low {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: #fff;
  border: none;
}

.kpi-card-compact-low:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

.kpi-card-compact-medium {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #fff;
  border: none;
}

.kpi-card-compact-medium:hover {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
}

.kpi-card-compact-high {
  background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
  color: #fff;
  border: none;
}

.kpi-card-compact-high:hover {
  background: linear-gradient(135deg, #c2410c 0%, #9a3412 100%);
}

.kpi-card-compact-critical {
  background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
  color: #fff;
  border: none;
}

.kpi-card-compact-critical:hover {
  background: linear-gradient(135deg, #b91c1c 0%, #7f1d1d 100%);
}

.kpi-card-compact-unknown .kpi-label-compact,
.kpi-card-compact-low .kpi-label-compact,
.kpi-card-compact-medium .kpi-label-compact,
.kpi-card-compact-high .kpi-label-compact {
  color: rgba(255, 255, 255, 0.9);
}

.kpi-card-compact-unknown .kpi-value-compact,
.kpi-card-compact-low .kpi-value-compact,
.kpi-card-compact-medium .kpi-value-compact,
.kpi-card-compact-high .kpi-value-compact {
  color: #fff;
}

.kpi-label-compact {
  font-size: 0.75rem;
  font-weight: 500;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.kpi-card-compact-critical .kpi-label-compact {
  color: rgba(255, 255, 255, 0.9);
}

.kpi-value-compact {
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
}

.kpi-card-compact-critical .kpi-value-compact {
  color: #fff;
}

/* Dashboard Sections */
.dashboard-section {
  margin-bottom: 1.5rem;
}

.dashboard-section:last-child {
  margin-bottom: 0;
}

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

.section-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #111827;
  margin: 0 0 0.25rem 0;
}

.section-subtitle {
  font-size: 0.875rem;
  color: #6b7280;
  margin: 0;
  font-weight: 400;
}

.section-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--dradis-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.section-link:hover {
  color: #1d4ed8;
}

/* Vulnerability List */
.vuln-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.vuln-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: #fff;
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
  transition: all 0.2s ease;
}

.vuln-item:hover {
  border-color: #d1d5db;
  box-shadow: 0 2px 8px rgba(15,23,42,0.08);
}

.vuln-item.vuln-critical {
  border-left: 4px solid #dc2626;
}

.vuln-item.vuln-high {
  border-left: 4px solid #ea580c;
}

.vuln-item.vuln-medium {
  border-left: 4px solid #f59e0b;
}

.vuln-item.vuln-low {
  border-left: 4px solid #84cc16;
}

.vuln-badges {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex-shrink: 0;
}

.severity-badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  white-space: nowrap;
}

.severity-badge.unknown {
  background: #f3f4f6;
  color: #4b5563;
}

.severity-badge.low {
  background: #dbeafe;
  color: #1e40af;
}

.severity-badge.medium {
  background: #fef3c7;
  color: #92400e;
}

.severity-badge.high {
  background: #fed7aa;
  color: #9a3412;
}

.severity-badge.critical {
  background: #fecaca;
  color: #991b1b;
}

.severity-icon {
  display: inline-block;
  margin-right: 0.35rem;
  font-style: normal;
}

/* Risk Score Styling */
.risk-score {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: #111827;
}

.risk-meter {
  width: 40px;
  height: 6px;
  background: #e5e7eb;
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

.risk-meter-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981 0%, #f59e0b 50%, #ef4444 100%);
  border-radius: 3px;
  transition: width 0.3s ease;
}

/* Description with tooltip */
.description-cell {
  position: relative;
  cursor: help;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.description-cell:hover {
  color: #111827;
  text-decoration: underline;
  text-decoration-style: dotted;
}

.description-cell::after {
  content: attr(title);
  position: absolute;
  left: 0;
  top: 100%;
  margin-top: 0.5rem;
  padding: 0.75rem 1rem;
  background: #1f2937;
  color: #fff;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.5;
  width: max-content;
  max-width: 400px;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  white-space: normal;
}

.description-cell:hover::after {
  opacity: 1;
}

.status-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  white-space: nowrap;
}

.status-badge.status-new {
  background: #dbeafe;
  color: #1e40af;
}

.status-badge.status-open {
  background: #fef3c7;
  color: #92400e;
}

.status-badge.status-fixed {
  background: #d1fae5;
  color: #065f46;
}

.vuln-details {
  flex: 1;
  min-width: 0;
}

.vuln-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #111827;
  margin: 0 0 0.25rem 0;
}

.vuln-meta {
  font-size: 0.8rem;
  color: #6b7280;
  margin: 0;
}

.vuln-action {
  flex-shrink: 0;
}

.btn-vuln-view {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--dradis-primary);
  color: #fff;
  text-decoration: none;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  transition: background 0.2s ease;
}

.btn-vuln-view:hover {
  background: #1d4ed8;
  color: #fff;
}

.btn-vuln-view.disabled,
.btn-vuln-view[aria-disabled="true"] {
  opacity: 0.55;
  cursor: default;
  pointer-events: none;
}

/* Quick Access Grid */
.quick-access-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.home-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 1200px) {
  .quick-access-grid {
    grid-template-columns: 1fr;
  }

  .home-grid {
    grid-template-columns: 1fr;
  }
}

/* Section Cards */
.section-card {
  background: #fafbfc;
  border-radius: 1rem;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 3px rgba(15,23,42,0.1);
  overflow: hidden;
}

.section-card .section-header {
  padding: 1.25rem 1.5rem;
  background: #fafbfc;
}

.card-list {
  display: flex;
  flex-direction: column;
}

.list-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  text-decoration: none;
  border-bottom: 1px solid #f3f4f6;
  transition: all 0.2s ease;
}

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

.list-item:hover {
  background: #f9fafb;
}

.item-icon {
  width: 44px;
  height: 44px;
  border-radius: 0.625rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1.125rem;
  flex-shrink: 0;
}

.org-icon {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: #fff;
}

.product-icon {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  color: #fff;
}

.report-icon {
  background: #f3f4f6;
  color: #6b7280;
}

.item-content {
  flex: 1;
  min-width: 0;
}

.item-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #111827;
  margin: 0 0 0.25rem 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-meta {
  font-size: 0.8125rem;
  color: #6b7280;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-arrow {
  color: #d1d5db;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.list-item:hover .item-arrow {
  color: var(--dradis-primary);
  transform: translateX(4px);
}

/* Data Tables */
.data-table-card,
.reports-table-card {
  background: #fff;
  border-radius: 1rem;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 3px rgba(15,23,42,0.1);
  overflow: hidden;
}

.table-card-header {
  padding: 1.5rem 2rem;
  border-bottom: 1px solid #f3f4f6;
  background: #fafbfc;
}

.table-title {
  font-size: 1.375rem;
  font-weight: 600;
  color: #111827;
  margin: 0 0 0.25rem 0;
}

.table-subtitle {
  font-size: 0.875rem;
  color: #6b7280;
  margin: 0;
}

.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

@media (min-width: 1024px) {
  .table-responsive {
    overflow-x: visible;
  }
}

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

.data-table th:nth-child(1) {
  width: 50px;
}

.data-table th:nth-child(2) {
  width: 130px;
}

.data-table th:nth-child(3) {
  width: 220px;
}

.data-table th:nth-child(4) {
  width: 140px;
}

.data-table th:nth-child(5) {
  width: auto;
}

.data-table thead {
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
}

.data-table th {
  padding: 0.875rem 1.5rem;
  text-align: left;
  font-weight: 600;
  color: #6b7280;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.data-table th.text-end {
  text-align: right;
}

.data-table tbody tr {
  border-bottom: 1px solid #f3f4f6;
  transition: background 0.2s ease;
}

.data-table tbody tr:hover {
  background: #f9fafb;
}

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

.data-table td {
  padding: 1.125rem 1.5rem;
  color: #374151;
  vertical-align: middle;
}

.data-table td.text-end {
  text-align: right;
}

.teams-table { table-layout: auto; }

.tokens-table th:nth-child(1) { width: auto; }
.tokens-table th:nth-child(2) { width: 100px; }
.tokens-table th:nth-child(3) { width: 200px; }
.tokens-table th:nth-child(4) { width: 150px; }
.tokens-table th:nth-child(5) { width: 120px; }

.table-item-main {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.table-icon {
  color: #9ca3af;
  flex-shrink: 0;
}

.table-item-text {
  font-weight: 500;
  color: #111827;
}

.table-cell-stack {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 0;
}

.table-cell-meta {
  color: #9ca3af;
  font-size: 0.8125rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-date {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.date-primary {
  color: #374151;
  font-weight: 500;
}

.date-secondary {
  color: #9ca3af;
  font-size: 0.8125rem;
}

.newly-open {
  color: #dc2626;
  font-weight: 600;
  font-size: 0.875rem;
}

.newly-closed {
  color: #16a34a;
  font-weight: 600;
  font-size: 0.875rem;
}

.table-badge {
  display: inline-block;
  padding: 0.25rem 0.625rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: capitalize;
}

.table-badge.badge-success {
  background: #d1fae5;
  color: #065f46;
}

.table-badge.badge-processing {
  background: #dbeafe;
  color: #1e40af;
}

.table-badge.badge-pending {
  background: #fef3c7;
  color: #92400e;
}

.table-badge.badge-error {
  background: #fee2e2;
  color: #991b1b;
}

.btn-table-action {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--dradis-primary);
  color: #fff;
  text-decoration: none;
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 500;
  transition: background 0.2s ease;
}

.btn-table-action + .btn-table-action {
  margin-left: 0.5rem;
}

.btn-table-action:hover {
  background: #1d4ed8;
  color: #fff;
}

.btn-table-action.secondary {
  background: #e5e7eb;
  color: #111827;
}

.btn-table-action.secondary:hover {
  background: #d1d5db;
  color: #111827;
}

.btn-table-action.danger {
  background: #ef4444;
}

.btn-table-action.danger:hover {
  background: #dc2626;
  color: #fff;
}

.btn-table-action.disabled,
.btn-table-action[aria-disabled="true"] {
  opacity: 0.55;
  cursor: default;
  pointer-events: none;
}

.table-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1.5rem;
  border-top: 1px solid #f3f4f6;
  background: #fafbfc;
  flex-wrap: wrap;
}

.pagination-summary {
  font-size: 0.8125rem;
  color: #6b7280;
  background: #f3f4f6;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
}

.pagination {
  display: flex;
  gap: 0.35rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.page-item {
  display: inline-flex;
}

.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0.7rem;
  min-width: 2.1rem;
  border-radius: 0.5rem;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #374151;
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 500;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.page-link:hover {
  border-color: var(--dradis-primary);
  color: var(--dradis-primary);
}

.page-item.active .page-link {
  background: var(--dradis-primary);
  border-color: var(--dradis-primary);
  color: #fff;
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.18);
}

.page-item.disabled .page-link {
  opacity: 0.55;
  cursor: default;
  pointer-events: none;
  background: #f9fafb;
}

/* Admin index (Django-style) */
.admin-index {
  max-width: 900px;
}

.admin-index-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #e2e8f0;
}

.admin-group {
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.admin-group-header {
  background: #1e293b;
  padding: 0.6rem 1rem;
}

.admin-group-header h2 {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  margin: 0;
}

.admin-group-body {
  display: flex;
  flex-direction: column;
}

.admin-model-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid #f1f5f9;
}

.admin-model-row:last-child {
  border-bottom: none;
}

.admin-model-row:hover {
  background: #f8fafc;
}

.admin-model-name {
  font-weight: 500;
  color: #1e293b;
  font-size: 0.95rem;
}

.admin-model-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: #94a3b8;
}

.admin-model-actions a {
  color: var(--dradis-primary);
  text-decoration: none;
  font-weight: 500;
}

.admin-model-actions a:hover {
  text-decoration: underline;
}

/* Admin list pages */
.admin-list {
  max-width: 1100px;
}

.admin-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #e2e8f0;
}

.admin-list-header h1 {
  font-size: 1.6rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.admin-table thead th {
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #64748b;
  padding: 0.5rem 0.75rem;
  border-bottom: 2px solid #e2e8f0;
}

.admin-table tbody tr {
  border-bottom: 1px solid #f1f5f9;
}

.admin-table tbody tr:hover {
  background: #f8fafc;
}

.admin-table tbody td {
  padding: 0.6rem 0.75rem;
  color: #1e293b;
  vertical-align: middle;
}

.admin-table-actions {
  text-align: right;
  white-space: nowrap;
}

.admin-table-actions a {
  color: var(--dradis-primary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.85rem;
}

.admin-table-actions a:hover {
  text-decoration: underline;
}

.admin-table-action-sep {
  color: #cbd5e1;
  font-size: 0.75rem;
}

.admin-table-action-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: #ef4444;
  font-size: 0.85rem;
}

.admin-table-action-btn:hover {
  color: #b91c1c;
}

.admin-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.admin-badge-success {
  background: #dcfce7;
  color: #15803d;
}

.admin-badge-muted {
  background: #f1f5f9;
  color: #64748b;
}

.admin-badge-danger {
  background: #fee2e2;
  color: #b91c1c;
}

/* Admin detail pages */
.admin-detail {
  max-width: 700px;
}

.admin-detail-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #e2e8f0;
}

.admin-breadcrumb-trail {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  color: #1e293b;
}

.admin-breadcrumb {
  color: var(--dradis-primary);
  text-decoration: none;
  font-weight: 500;
}

.admin-breadcrumb:hover {
  text-decoration: underline;
}

.admin-breadcrumb-sep {
  color: #94a3b8;
}

.admin-detail-body {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.admin-detail-meta {
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  overflow: hidden;
}

.admin-meta-row {
  display: flex;
  justify-content: space-between;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.9rem;
}

.admin-meta-row:last-child {
  border-bottom: none;
}

.admin-meta-row span:first-child {
  font-weight: 600;
  color: #64748b;
}

.admin-meta-row span:last-child {
  color: #1e293b;
}

/* Role transfer widget */
.role-transfer {
  display: flex;
  align-items: stretch;
  gap: 0.75rem;
}

.role-transfer-side {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.role-transfer-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #64748b;
}

.role-transfer-list {
  flex: 1;
  min-height: 160px;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  padding: 0.25rem;
  font-size: 0.9rem;
  color: #1e293b;
  background: #f8fafc;
  outline: none;
}

.role-transfer-list:focus {
  border-color: var(--dradis-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  background: #fff;
}

.role-transfer-list option {
  padding: 0.35rem 0.5rem;
  border-radius: 0.25rem;
  cursor: pointer;
}

.role-transfer-list option:checked {
  background: var(--dradis-primary);
  color: #fff;
}

.role-transfer-controls {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.5rem;
}

.role-transfer-btn {
  background: #f1f5f9;
  border: 1px solid #d1d5db;
  border-radius: 0.4rem;
  padding: 0.4rem 0.6rem;
  cursor: pointer;
  color: #1e293b;
  transition: background 0.15s, border-color 0.15s;
}

.role-transfer-btn:hover {
  background: var(--dradis-primary);
  border-color: var(--dradis-primary);
  color: #fff;
}
