:root {
  --bg-1: #f3f4f6;
  --bg-2: #dbeafe;
  --card-bg: rgba(255, 255, 255, 0.92);
  --text-main: #0f172a;
  --text-muted: #475569;
  --accent: #0ea5e9;
  --accent-strong: #0284c7;
  --danger: #dc2626;
  --success: #15803d;
  --line: #cbd5e1;
  --shadow: 0 18px 48px rgba(15, 23, 42, 0.18);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", sans-serif;
  transition: background-color 0.3s, color 0.3s;
  line-height: 1.5;
}

body.auth-mode {
  color: var(--text-main);
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 10%, #bae6fd 0%, transparent 35%),
    radial-gradient(circle at 85% 90%, #bfdbfe 0%, transparent 30%),
    linear-gradient(140deg, var(--bg-1), var(--bg-2));
}

.auth-app {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-card {
  width: min(100%, 440px);
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 20px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(6px);
  padding: 28px;
}

.auth-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 8px;
}

.auth-logo-wrap {
  display: flex;
  justify-content: flex-end;
  margin: 0;
  flex-shrink: 0;
}

.auth-logo {
  width: 64px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: left center;
  border-radius: 16px;
  display: block;
}

.auth-view h1 {
  margin: 0 0 8px;
  font-size: clamp(1.5rem, 4vw, 2rem);
}

.eyebrow {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-strong);
  font-weight: 700;
}

.subtitle {
  margin: 0 0 18px;
  color: var(--text-muted);
  line-height: 1.45;
}

code {
  font-size: 0.9rem;
  background: #f1f5f9;
  border-radius: 6px;
  padding: 2px 6px;
}

form {
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 6px;
}

.field span {
  font-size: 0.88rem;
  font-weight: 600;
  color: #1e293b;
}

.field-hint {
  font-size: 0.78rem;
  line-height: 1.35;
  color: #64748b;
}

.field input,
.field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  color: var(--text-main);
  font-size: 1rem;
  padding: 11px 12px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field input:focus,
.field select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.15);
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 44px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.password-toggle:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.password-toggle:focus-visible {
  outline: 2px solid #0ea5e9;
  outline-offset: 2px;
}

.primary-button,
.secondary-button {
  border: none;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 0.97rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.08s ease, filter 0.2s;
}

.primary-button {
  margin-top: 4px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #38bdf8);
}

.primary-button:hover {
  filter: brightness(0.96);
}

.secondary-button {
  color: #fff;
  background: linear-gradient(135deg, #334155, #0f172a);
}

.secondary-button:hover {
  filter: brightness(1.06);
}

.primary-button:active,
.secondary-button:active {
  transform: translateY(1px);
}

.message {
  min-height: 22px;
  margin: 12px 0 0;
  font-size: 0.92rem;
  line-height: 1.4;
  white-space: pre-line;
}

.message.error {
  color: var(--danger);
}

.message.success {
  color: var(--success);
}

.dashboard-view {
  min-height: 100vh;
}

body.light-theme {
  background-color: #f5f8fe;
  color: #1e2b3c;
}

body.light-theme .top-navbar,
body.light-theme .left-sidebar,
body.light-theme .content-card,
body.light-theme .user-badge,
body.light-theme .dropdown-menu li a,
body.light-theme .menu-item,
body.light-theme .simple-item {
  background-color: #ffffff;
  color: #1e2b3c;
  border-color: #d9e0eb;
}

body.light-theme .top-navbar {
  background-color: #ffffff;
  border-bottom: 1px solid #d9e0eb;
}

body.light-theme .left-sidebar {
  background-color: #ffffff;
  border-right: 1px solid #dbe2ed;
}

body.light-theme .content-card {
  background-color: #ffffff;
  color: #1e2b3c;
}

body.light-theme .user-badge {
  background-color: transparent;
  border: none;
}

body.dark-theme {
  background-color: #1a2332;
  color: #e6edf5;
}

body.dark-theme .top-navbar {
  background-color: #222d42;
  border-bottom: 1px solid #354153;
}

body.dark-theme .left-sidebar {
  background-color: #1e2a3a;
  border-right: 1px solid #354153;
}

body.dark-theme .content-card {
  background-color: #263349;
  color: #e6edf5;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

body.dark-theme .user-badge {
  background-color: transparent;
  border: none;
}

body.dark-theme .home-brand {
  background: transparent;
  border: 1px solid transparent;
  color: #e6edf5;
}

body.dark-theme .menu-item,
body.dark-theme .simple-item {
  color: #e6edf5;
}

body.dark-theme .menu-item-text > i,
body.dark-theme .simple-item > i,
body.dark-theme .dropdown-menu li a i,
body.dark-theme .dropdown-toggle .arrow i {
  color: #8ba4cc;
}

body.dark-theme .menu-item:hover,
body.dark-theme .simple-item:hover {
  background-color: rgba(139, 164, 204, 0.16);
}

body.dark-theme .dropdown-menu li a {
  color: #cbd5e6;
  background-color: transparent;
}

body.dark-theme .dropdown-menu li a:hover {
  background-color: rgba(139, 164, 204, 0.16);
  color: #e6edf5;
}

body.dark-theme .icon-btn,
body.dark-theme .menu-dots {
  color: #b6c7e0;
}

body.dark-theme .icon-btn:hover,
body.dark-theme .menu-dots:hover {
  background-color: rgba(139, 164, 204, 0.16);
}

body.dark-theme .home-brand:hover {
  background-color: rgba(139, 164, 204, 0.16);
}

body.dark-theme .user-name {
  color: #e6edf5;
}

body.dark-theme .user-badge:hover {
  background-color: rgba(139, 164, 204, 0.16);
  border-color: rgba(139, 164, 204, 0.18);
}

body.dark-theme .user-badge:focus-visible {
  background-color: rgba(139, 164, 204, 0.18);
  box-shadow: 0 0 0 3px rgba(139, 164, 204, 0.2);
}

body.dark-theme .user-position {
  color: #cbd5e6;
}

body.dark-theme .org-name {
  color: #a6b9d6;
}

.app-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.top-navbar {
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
  transition: background-color 0.3s, border-color 0.3s;
  position: relative;
  z-index: 100;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 24px;
}

.home-btn {
  background: none;
  border: none;
  font-size: 1.1rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 40px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.home-brand {
  padding: 6px 8px;
  border: 1px solid transparent;
  gap: 12px;
}

.home-brand-logo {
  width: 40px;
  height: 40px;
  object-fit: cover;
  object-position: left center;
  border-radius: 10px;
  flex-shrink: 0;
  display: block;
}

.home-brand span {
  white-space: nowrap;
}

body.light-theme .home-brand {
  color: #0b1e3a;
  background: transparent;
  border-color: transparent;
}

body.light-theme .home-brand:hover {
  background: rgba(43, 110, 211, 0.12);
}

body.light-theme .menu-item:hover,
body.light-theme .simple-item:hover,
body.light-theme .dropdown-menu li a:hover,
body.light-theme .icon-btn:hover,
body.light-theme .menu-dots:hover {
  background-color: rgba(43, 110, 211, 0.12);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
  position: relative;
}

.top-nav-text-btn {
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  font-size: 0.92rem;
  line-height: 1.2;
}

.top-nav-text-btn i {
  font-size: 0.95rem;
}

.top-nav-text-btn.is-active {
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22);
}

.top-nav-icon-btn {
  flex-shrink: 0;
  font-size: 1.15rem;
}

.top-nav-icon-btn.is-active {
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22);
}

.icon-btn {
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}

.user-badge {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  border-radius: 14px;
  padding: 10px 14px;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  border: 1px solid transparent;
  transition: background-color 0.2s, box-shadow 0.2s, border-color 0.2s;
}

body.light-theme .user-badge:hover {
  background-color: rgba(43, 110, 211, 0.12);
  border-color: rgba(43, 110, 211, 0.14);
}

.user-badge:focus-visible {
  outline: none;
  background-color: rgba(31, 102, 211, 0.1);
  box-shadow: 0 0 0 3px rgba(31, 102, 211, 0.18);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: #2b6ed3;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.9rem;
}

.user-info {
  display: flex;
  flex-direction: column;
  font-size: 0.85rem;
}

.user-name {
  font-weight: 600;
}

.user-position {
  font-size: 0.75rem;
  color: #4f6685;
}

.org-name {
  font-size: 0.75rem;
}

.menu-container {
  position: relative;
}

.notifications-container {
  position: relative;
}

.notifications-btn {
  position: relative;
}

.notifications-badge {
  position: absolute;
  top: 4px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ef4444;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(239, 68, 68, 0.3);
}

.notifications-dropdown {
  position: absolute;
  top: 60px;
  right: 0;
  width: min(360px, calc(100vw - 32px));
  max-height: 420px;
  overflow: hidden;
  background-color: #ffffff;
  border-radius: 18px;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.18);
  padding: 10px;
  z-index: 1000;
  display: none;
  border: 1px solid #dbe2ed;
}

.notifications-dropdown.show {
  display: block;
}

.notifications-dropdown-header {
  padding: 10px 12px 12px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #173051;
}

.notifications-dropdown-list {
  display: grid;
  gap: 8px;
  max-height: 348px;
  overflow-y: auto;
  padding: 0 2px 2px;
}

.notifications-item {
  border: 1px solid #dbe4f1;
  border-radius: 14px;
  background: #f8fbff;
  padding: 12px;
  display: grid;
  gap: 6px;
}

.notifications-item.is-unread {
  border-color: #bfd5f4;
  background: #eef5ff;
}

.notifications-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.notifications-item-type {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #2563eb;
}

.notifications-item-time {
  font-size: 0.72rem;
  color: #6b7f99;
}

.notifications-item-text {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.45;
  color: #1f3a5c;
}

.notifications-empty {
  border: 1px dashed #dbe4f1;
  border-radius: 14px;
  background: #f8fbff;
  padding: 14px;
  font-size: 0.85rem;
  line-height: 1.45;
  color: #59718f;
  text-align: center;
}

.menu-dots {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.dots-dropdown {
  position: absolute;
  top: 60px;
  right: 0;
  width: 220px;
  background-color: #ffffff;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  padding: 8px;
  z-index: 1000;
  display: none;
  border: 1px solid #dbe2ed;
}

body.dark-theme .dots-dropdown {
  background-color: #263349;
  border-color: #4e6182;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

body.dark-theme .notifications-dropdown {
  background-color: #263349;
  border-color: #4e6182;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.42);
}

body.dark-theme .notifications-dropdown-header {
  color: #e6edf5;
}

body.dark-theme .notifications-item {
  border-color: #42516a;
  background: #243246;
}

body.dark-theme .notifications-item.is-unread {
  border-color: #5e7fa8;
  background: #2a3a52;
}

body.dark-theme .notifications-item-type {
  color: #8fb7f2;
}

body.dark-theme .notifications-item-time {
  color: #a9bbd2;
}

body.dark-theme .notifications-item-text {
  color: #dce6f5;
}

body.dark-theme .notifications-empty {
  border-color: #42516a;
  background: #243246;
  color: #bfd0e3;
}

.dots-dropdown.show {
  display: block;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s;
  width: 100%;
  border: none;
  background: none;
  font-size: 0.95rem;
  text-align: left;
}

body.light-theme .dropdown-item {
  color: #1f3a5c;
}

body.dark-theme .dropdown-item {
  color: #e6edf5;
}

.dropdown-item:hover {
  background-color: #eaf1fd;
}

body.dark-theme .dropdown-item:hover {
  background-color: #31435e;
}

.dropdown-item i {
  width: 22px;
  color: #5079a1;
}

body.dark-theme .dropdown-item i {
  color: #8ba4cc;
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.theme-toggle span {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 24px;
  margin-left: 8px;
}

.theme-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #ccc;
  transition: 0.3s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: #ffffff;
  transition: 0.3s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #2b6ed3;
}

input:checked + .slider:before {
  transform: translateX(24px);
}

.main-layout {
  display: flex;
  flex: 1;
  min-width: 0;
}

.left-sidebar {
  width: 280px;
  flex-shrink: 0;
  border-right: 1px solid;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 4px 0 12px rgba(0, 0, 0, 0.02);
  overflow-y: auto;
  overflow-x: hidden;
  will-change: width, padding;
  transition:
    width 0.34s cubic-bezier(0.4, 0, 0.2, 1),
    padding 0.34s cubic-bezier(0.4, 0, 0.2, 1),
    gap 0.34s cubic-bezier(0.4, 0, 0.2, 1),
    background-color 0.3s,
    border-color 0.3s;
}

.sidebar-collapse {
  display: flex;
  justify-content: flex-end;
  margin-top: 6px;
}

.sidebar-collapse-btn {
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: #46658a;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}

.sidebar-collapse-btn:hover {
  background: #eaf1fd;
}

.sidebar-collapse-btn:focus-visible {
  outline: 2px solid #2b6ed3;
  outline-offset: 2px;
}

body.dark-theme .sidebar-collapse-btn {
  color: #b6c7e0;
}

body.dark-theme .sidebar-collapse-btn:hover {
  background: #31435e;
}

.sidebar-group {
  display: flex;
  flex-direction: column;
}

.sidebar-group + .sidebar-group {
  margin-top: 16px;
  padding-top: 0;
  border-top: none;
}

.sidebar-group-label {
  margin: 0 12px 12px;
  color: #6d819c;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sidebar-group > .sidebar-section:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

body.dark-theme .sidebar-group-label {
  color: #9cb1ce;
}

.sidebar-section {
  border-bottom: 1px solid #d2ddeb;
  padding-bottom: 12px;
  margin-bottom: 12px;
  transition: padding-bottom 0.3s ease, margin-bottom 0.3s ease, border-color 0.3s ease;
}

body.dark-theme .sidebar-section {
  border-bottom-color: #4a5b74;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 40px;
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-size: 0.88rem;
  line-height: 1.15;
  overflow: hidden;
  white-space: nowrap;
  transition: background 0.15s, padding 0.3s ease, min-height 0.3s ease;
}

.menu-item-text {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  white-space: nowrap;
  transition: font-size 0.28s ease, gap 0.28s ease, opacity 0.2s ease;
}

.sidebar-item-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

.sidebar-item-title {
  display: block;
  line-height: 1.15;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.sidebar-item-note {
  display: block;
  margin-top: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  color: #915f1a;
  background: #fff3db;
  box-shadow: inset 0 0 0 1px #f3d59d;
  font-size: 0.66rem;
  font-weight: 700;
  line-height: 1.15;
}

body.dark-theme .sidebar-item-note {
  color: #ffd792;
  background: rgba(120, 78, 16, 0.34);
  box-shadow: inset 0 0 0 1px rgba(255, 205, 117, 0.34);
}

.menu-item-text > i,
.simple-item > i {
  width: 22px;
  min-width: 22px;
  flex: 0 0 22px;
  text-align: center;
  font-size: 1.1rem;
  line-height: 1;
  transition: width 0.28s ease, margin 0.28s ease, font-size 0.28s ease;
}

.dropdown-menu {
  list-style: none;
  margin-top: 4px;
  margin-left: 34px;
  transition: margin-left 0.3s ease, margin-top 0.3s ease;
}

.dropdown-menu li {
  margin: 4px 0;
  transition: margin 0.28s ease;
}

.dropdown-menu li a {
  display: block;
  padding: 8px 12px;
  border-radius: 10px;
  text-decoration: none;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  transition: background 0.15s, padding 0.28s ease, font-size 0.28s ease, min-height 0.28s ease;
}

.dropdown-menu li a i {
  margin-right: 8px;
  width: 18px;
  transition: width 0.28s ease, margin 0.28s ease, font-size 0.28s ease;
}

.dropdown-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.dropdown-toggle .arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  overflow: hidden;
  opacity: 1;
  font-size: 0.8rem;
  transition: transform 0.2s, width 0.28s ease, opacity 0.2s ease;
}

.dropdown-toggle .arrow i {
  width: auto;
  min-width: 0;
  margin: 0;
  font-size: 0.8rem;
  line-height: 1;
}

.dropdown-toggle.open .arrow {
  transform: rotate(90deg);
}

.simple-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 40px;
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 500;
  cursor: pointer;
  width: 100%;
  border: none;
  background: none;
  font-size: 0.9rem;
  line-height: 1.15;
  overflow: hidden;
  white-space: nowrap;
  transition: background 0.15s, padding 0.3s ease, min-height 0.3s ease, font-size 0.28s ease, gap 0.28s ease;
}

.left-sidebar.collapsed {
  width: 122px;
  padding: 24px 10px;
  align-items: center;
}

.left-sidebar.collapsed .sidebar-collapse {
  width: 100%;
  justify-content: center;
}

.left-sidebar.collapsed .sidebar-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 12px;
  margin-bottom: 12px;
}

.left-sidebar.collapsed .sidebar-group {
  width: 100%;
}

.left-sidebar.collapsed .sidebar-group + .sidebar-group {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.left-sidebar.collapsed .sidebar-group-label {
  height: auto;
  margin: 0 6px 10px;
  font-size: 0.56rem;
  line-height: 1.25;
  letter-spacing: 0.04em;
  text-align: center;
  white-space: normal;
  opacity: 1;
  overflow: visible;
}

.left-sidebar.collapsed .menu-item {
  width: 100%;
  min-height: 40px;
  justify-content: center;
  padding: 10px 12px;
}

.left-sidebar.collapsed .simple-item {
  width: 100%;
  min-height: 40px;
  justify-content: center;
  padding: 10px 12px;
}

.left-sidebar.collapsed .menu-item-text {
  font-size: 0;
  gap: 0;
  justify-content: center;
  flex: 0 0 auto;
}

.left-sidebar.collapsed .simple-item {
  font-size: 0;
  gap: 0;
}

.left-sidebar.collapsed .sidebar-item-copy {
  display: none;
}

.left-sidebar.collapsed .menu-item-text > i,
.left-sidebar.collapsed .simple-item > i,
.left-sidebar.collapsed .dropdown-menu li a i {
  width: 22px;
  min-width: 22px;
  margin: 0;
  font-size: 1.05rem;
}

.left-sidebar.collapsed .dropdown-toggle {
  justify-content: center;
}

.left-sidebar.collapsed .dropdown-toggle .arrow {
  width: 0;
  opacity: 0;
}

.left-sidebar.collapsed .dropdown-menu {
  margin-top: 4px;
  margin-left: 0;
  width: 100%;
}

.left-sidebar.collapsed .dropdown-menu li {
  margin: 4px 0;
}

.left-sidebar.collapsed .dropdown-menu li a {
  width: 100%;
  min-height: 34px;
  padding: 8px 12px;
  font-size: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.content-area {
  flex: 1;
  min-width: 0;
  padding: 32px 40px;
  transition: background-color 0.3s;
}

.content-panel {
  width: 100%;
  min-width: 0;
}

.content-card {
  border-radius: 28px;
  padding: 40px;
  box-shadow: 0 6px 20px rgba(0, 20, 40, 0.04);
  max-width: 900px;
  transition: background-color 0.3s, color 0.3s;
}

.metrics-card {
  max-width: none;
  min-width: 0;
}

.protocols-card,
.attorney-builder-card,
.file-signing-panel-card,
.dscheck-panel-card {
  width: 100%;
  max-width: 1240px;
}

.attorney-builder-shell {
  display: grid;
  grid-template-columns: minmax(190px, 220px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  margin-top: 12px;
}

.attorney-mode-nav {
  display: grid;
  gap: 10px;
  position: sticky;
  top: 16px;
  padding: 14px;
  border: 1px solid #dbe4f1;
  border-radius: 22px;
  background: linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
}

.attorney-builder-workspace {
  min-width: 0;
  display: grid;
  gap: 18px;
}

.attorney-mode-intro {
  display: grid;
}

.attorney-mode-intro-card {
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px solid #dbe4f1;
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.07);
}

.attorney-mode-intro-card h3 {
  margin: 0;
  font-size: 1.12rem;
  color: #173051;
}

.attorney-mode-intro-text {
  margin: 0;
  color: #4f6685;
  font-size: 0.95rem;
  line-height: 1.5;
}

.attorney-mode-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.attorney-mode-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 74px;
  padding: 15px 16px;
  border-radius: 16px;
  border: 1px solid transparent;
  background: linear-gradient(135deg, #334155, #0f172a);
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    filter 0.18s ease,
    background 0.18s ease;
}

.attorney-mode-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.16);
}

.attorney-mode-btn.is-active {
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  box-shadow: 0 16px 28px rgba(37, 99, 235, 0.24);
}

.attorney-mode-btn-title {
  display: block;
  max-width: 220px;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.3;
}

.attorney-mode-btn-note {
  font-size: 0.86rem;
  line-height: 1.45;
  color: #4f6685;
}

.attorney-inline-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.attorney-inline-action-btn {
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 10px;
  white-space: nowrap;
}

.attorney-nav-button {
  inline-size: 192px;
  max-inline-size: 100%;
  min-height: 42px;
  padding: 10px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.97rem;
  font-weight: 700;
  line-height: 1.2;
  border-radius: 12px;
}

.attorney-nav-button--kind {
  background: linear-gradient(135deg, #4b5563, #1f2937);
}

.attorney-nav-button--action {
  background: linear-gradient(135deg, #0f766e, #155e75);
}

.attorney-mode-section-caption {
  font-size: 0.84rem;
  line-height: 1.4;
  color: #4f6685;
}

.attorney-mchd-shell {
  display: grid;
  grid-template-columns: minmax(168px, 196px) minmax(0, 1fr);
  gap: 16px;
  padding: 18px 0 8px;
  align-items: start;
}

.attorney-mchd-sidebar {
  display: grid;
  gap: 12px;
  align-content: start;
  position: sticky;
  top: 16px;
}

.attorney-mchd-content {
  min-width: 0;
}

.attorney-mchd-side-btn {
  width: 100%;
  min-height: 72px;
  padding: 14px 15px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  text-align: left;
  line-height: 1.2;
  white-space: normal;
  flex-direction: column;
  gap: 4px;
  border-radius: 16px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
  font-size: 0.92rem;
}

.attorney-mchd-side-btn-line {
  display: block;
  width: 100%;
}

.attorney-mchd-side-btn.is-active {
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  box-shadow: 0 12px 22px rgba(37, 99, 235, 0.24);
}

.attorney-mchd-side-btn:not(.is-active) {
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.attorney-mchd-top-actions {
  margin-top: -4px;
  margin-bottom: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.attorney-mchd-top-actions .secondary-button,
.attorney-mchd-top-actions .primary-button {
  text-align: center;
  margin-top: 0;
}

.attorney-mchd-signing-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  padding-top: 0;
}

.file-signing-layout {
  display: grid;
  grid-template-columns: minmax(280px, 320px) minmax(0, 1fr);
  gap: 18px;
  padding-top: 6px;
}

.attorney-mchd-signing-card {
  border: 1px solid #dbe4f1;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  padding: 18px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.07);
  display: grid;
  gap: 14px;
  align-content: start;
}

.attorney-mchd-signing-card--full {
  grid-column: 1 / -1;
}

.attorney-mchd-signing-card--tools {
  padding: 12px 18px;
  gap: 10px;
}

.attorney-mchd-signing-tools-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.file-signing-panel-card {
  display: grid;
  gap: 18px;
}

.file-signing-plugin-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.file-signing-plugin-menu-shell {
  position: relative;
}

.file-signing-plugin-toggle {
  min-height: 34px;
  padding: 7px 12px;
  font-size: 0.82rem;
  border-radius: 12px;
  white-space: nowrap;
}

.file-signing-plugin-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 250px;
  max-width: min(92vw, 250px);
  border: 1px solid #dbe2ed;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16);
  padding: 8px;
  z-index: 35;
  display: grid;
  gap: 6px;
}

.file-signing-plugin-menu-item {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: #ffffff;
  color: #1f3a5c;
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.file-signing-plugin-menu-item:hover {
  background: #eef5ff;
  border-color: #c7ddf8;
  color: #113a6b;
}

.dscheck-panel-card {
  gap: 20px;
}

.dscheck-shell {
  display: grid;
  grid-template-columns: minmax(190px, 220px) minmax(0, 1fr);
  gap: 20px;
  padding-top: 8px;
  align-items: start;
}

.dscheck-provider-nav {
  display: grid;
  gap: 10px;
  width: 220px;
  max-width: 100%;
  position: sticky;
  top: 16px;
  padding: 14px;
  border: 1px solid #dbe4f1;
  border-radius: 22px;
  background: linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
}

.dscheck-provider-nav-title {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #53719a;
  padding: 2px 6px 8px;
  border-bottom: 1px solid #e6edf7;
}

.dscheck-provider-workspace {
  min-width: 0;
  display: grid;
  gap: 18px;
}

.dscheck-provider-section {
  display: grid;
  gap: 18px;
}

.dscheck-layout {
  display: grid;
  grid-template-columns: minmax(240px, 290px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.dscheck-provider-nav .attorney-mchd-mode-btn {
  width: 100%;
  min-height: 74px;
  padding: 15px 16px;
  border-radius: 16px;
  border: 1px solid transparent;
  background: linear-gradient(135deg, #334155, #0f172a);
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  justify-content: center;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}

.dscheck-provider-nav .attorney-mchd-mode-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.16);
}

.dscheck-provider-nav .attorney-mchd-mode-btn.is-active {
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 16px 28px rgba(37, 99, 235, 0.24);
}

.dscheck-sidebar,
.dscheck-main {
  display: grid;
  gap: 18px;
  align-content: start;
}

.dscheck-sidebar {
  position: sticky;
  top: 16px;
}

.dscheck-sidebar-card {
  padding: 16px 16px 18px;
}

.dscheck-sidebar-card,
.dscheck-work-card,
.dscheck-result-card {
  border-color: #dbe4f1;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.07);
}

.dscheck-sidebar-card .attorney-mchd-preview-header,
.dscheck-work-card .attorney-mchd-preview-header,
.dscheck-result-card .attorney-mchd-preview-header {
  gap: 6px;
}

.dscheck-work-card,
.dscheck-result-card {
  border-radius: 20px;
}

.dscheck-work-card {
  gap: 16px;
}

.dscheck-work-card > .message {
  min-height: 0;
  margin-top: 4px;
}

.dscheck-work-card > .message:empty {
  display: none;
}

.dscheck-work-card .attorney-mchd-step-caption,
.dscheck-result-card .attorney-mchd-step-caption {
  max-width: 760px;
}

.dscheck-mode-buttons,
.dscheck-scenario-list,
.dscheck-file-fields,
.dscheck-result-content {
  display: grid;
  gap: 10px;
}

.dscheck-mode-btn,
.dscheck-scenario-btn {
  width: 100%;
  padding: 13px 14px;
  border-radius: 15px;
  border: 1px solid transparent;
  background: linear-gradient(135deg, #334155, #0f172a);
  color: #ffffff;
  text-align: left;
  justify-content: flex-start;
  min-height: 54px;
  white-space: normal;
  line-height: 1.3;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

.dscheck-mode-btn:hover,
.dscheck-scenario-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.dscheck-mode-btn.is-active,
.dscheck-scenario-btn.is-active {
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 12px 22px rgba(37, 99, 235, 0.22);
}

.dscheck-mode-btn.is-active:hover,
.dscheck-scenario-btn.is-active:hover {
  color: #ffffff;
}

.dscheck-scenario-btn-title {
  display: block;
  font-weight: 700;
  margin-bottom: 2px;
}

.dscheck-scenario-btn-note {
  display: block;
  font-size: 0.8rem;
  opacity: 0.92;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.82);
}

.dscheck-mode-btn.is-active .dscheck-scenario-btn-note,
.dscheck-scenario-btn.is-active .dscheck-scenario-btn-note {
  color: rgba(255, 255, 255, 0.92);
}

.dscheck-checkbox-field .attorney-mchd-checkbox {
  min-height: 46px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid #dbe4f1;
  background: #f8fbff;
}

.dscheck-checkbox-field .attorney-mchd-checkbox span:last-child {
  font-weight: 600;
  color: #173051;
}

.dscheck-select-row select {
  width: 100%;
}

.dscheck-section-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #35557d;
  letter-spacing: 0.01em;
}

.dscheck-file-field {
  display: grid;
  gap: 4px;
  padding: 8px 12px 6px;
  border: 1px solid #dbe4f1;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.dscheck-file-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: #173051;
}

.dscheck-file-description {
  font-size: 0.8rem;
  line-height: 1.35;
  color: #4f6685;
}

.dscheck-file-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px;
  align-items: center;
}

.dscheck-file-row input[type="file"] {
  min-width: 0;
  min-height: 34px;
  font-size: 0.84rem;
  line-height: 1.2;
}

.dscheck-result-card {
  gap: 16px;
}

.dscheck-actions {
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px solid #e6edf7;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dscheck-actions--work {
  margin-top: 2px;
  margin-bottom: 0;
  padding-top: 0;
  border-top: none;
}

.dscheck-result-section {
  border: 1px solid #dbe4f1;
  border-radius: 16px;
  background: #f8fbff;
  padding: 14px;
  display: grid;
  gap: 10px;
}

.dscheck-result-section-title {
  margin: 0;
  font-size: 0.94rem;
  color: #173051;
}

.dscheck-result-rows {
  display: grid;
  gap: 8px;
}

.dscheck-result-row {
  display: grid;
  grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.dscheck-result-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #35557d;
}

.dscheck-result-value {
  font-size: 0.86rem;
  line-height: 1.5;
  color: #173051;
  word-break: break-word;
}

.dscheck-result-summary {
  font-weight: 600;
}

.dscheck-bool-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dscheck-bool-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.dscheck-bool-badge.is-true {
  color: #17603a;
  background: #e8f7ee;
  box-shadow: inset 0 0 0 1px #b8e2c9;
}

.dscheck-bool-badge.is-false {
  color: #8b1e28;
  background: #fdebed;
  box-shadow: inset 0 0 0 1px #efb5bc;
}

.dscheck-service-status.is-ready,
.dscheck-result-summary.is-ready {
  border-color: #bdd8c9;
  background: #f3fbf6;
}

.dscheck-service-status.is-error,
.dscheck-result-summary.is-error {
  border-color: #efb5bc;
  background: #fff5f6;
}

.dscheck-actions .primary-button,
.dscheck-actions .secondary-button {
  margin-top: 0;
}

.file-signing-toolbar,
.file-signing-list-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.file-signing-upload-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.file-signing-item-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: flex-start;
}

.file-signing-item-body {
  min-width: 0;
  display: grid;
  gap: 10px;
}

.file-signing-item-checkbox {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-top: 2px;
}

.file-signing-item-checkbox input {
  width: 18px;
  height: 18px;
  margin: 0;
  cursor: pointer;
}

.file-signing-item-checkbox--placeholder {
  width: 18px;
  height: 18px;
}

.attorney-mchd-signing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
}

.attorney-mchd-signing-tools-row .attorney-mchd-signing-actions {
  padding-top: 0;
  align-self: center;
}

.attorney-mchd-signing-tools-row .attorney-mchd-signing-actions .secondary-button {
  min-height: 44px;
}

.attorney-mchd-link-btn {
  text-decoration: none;
}

.attorney-mchd-signing-list {
  display: grid;
  gap: 12px;
}

.attorney-mchd-signing-empty {
  border: 1px dashed #dbe4f1;
  border-radius: 14px;
  background: #f8fbff;
  color: #59718f;
  text-align: center;
  padding: 16px;
  font-size: 0.88rem;
  line-height: 1.5;
}

.attorney-mchd-signing-item {
  border: 1px solid #dbe4f1;
  border-radius: 16px;
  background: #f8fbff;
  padding: 14px;
  display: grid;
  gap: 10px;
}

.attorney-mchd-signing-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.attorney-mchd-signing-item-title {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.35;
  color: #173051;
}

.attorney-mchd-signing-item-meta {
  display: grid;
  gap: 4px;
  font-size: 0.82rem;
  color: #4f6685;
  line-height: 1.45;
}

.attorney-mchd-signing-item-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.attorney-mchd-signing-item-status.is-pending {
  color: #915f1a;
  background: #fff3db;
  box-shadow: inset 0 0 0 1px #f3d59d;
}

.attorney-mchd-signing-item-status.is-signed {
  color: #17603a;
  background: #e8f7ee;
  box-shadow: inset 0 0 0 1px #b8e2c9;
}

.attorney-mchd-signing-item-status.is-error {
  color: #8b1e28;
  background: #fdebed;
  box-shadow: inset 0 0 0 1px #efb5bc;
}

.attorney-mchd-signing-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  width: 100%;
}

.attorney-mchd-signing-item-actions > .primary-button,
.attorney-mchd-signing-item-actions > .secondary-button {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0;
}

.attorney-mchd-disclosure-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-right: 12px;
}

.attorney-mchd-disclosure-icon-btn {
  min-width: 34px;
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.82);
  border-color: #dbe4f1;
  box-shadow: none;
}

.attorney-mchd-disclosure-icon-btn:hover {
  background: #f5f8fc;
  border-color: #c7d4e4;
}

.attorney-mchd-disclosure-icon-btn--edge {
  margin-left: auto;
}

.attorney-mchd-disclosure-caret {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  color: #4f6685;
  transition: transform 0.2s ease;
}

.attorney-mchd-disclosure-btn[aria-expanded="true"] .attorney-mchd-disclosure-caret,
.attorney-mchd-disclosure-icon-btn[aria-expanded="true"] .attorney-mchd-disclosure-caret {
  transform: rotate(90deg);
}

.attorney-mchd-signing-preview {
  display: grid;
  gap: 12px;
  padding-top: 6px;
}

.attorney-mchd-signing-preview .attorney-mchd-preview-card {
  box-shadow: none;
}

.attorney-mchd-signing-item--archive {
  padding: 10px 12px;
  gap: 8px;
}

.attorney-mchd-signing-item-head--archive {
  align-items: center;
}

.attorney-mchd-signing-item-title--archive {
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.3;
}

.attorney-mchd-signing-item-actions--archive {
  align-items: center;
  justify-content: flex-end;
}

.attorney-mchd-archive-toggle {
  min-width: 108px;
}

.attorney-mchd-signing-item-meta--archive-details {
  padding-top: 8px;
  border-top: 1px solid #dbe4f1;
}

.attorney-mchd-reject-form .field textarea,
#attorneyMchdRejectReason {
  min-height: 52px;
  max-height: 76px;
  max-width: 100%;
  border-radius: 12px;
}

.attorney-mchd-reject-actions {
  grid-column: 1 / -1;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.attorney-mchd-sign-actions {
  grid-column: 1 / -1;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.attorney-mchd-sign-actions .primary-button,
.attorney-mchd-reject-actions .primary-button {
  margin-inline: auto;
  margin-top: 0;
  min-width: 156px;
}

.attorney-mchd-certificate-list {
  margin-top: 10px;
  display: grid;
  gap: 10px;
  max-height: 320px;
  overflow-y: auto;
  padding-right: 4px;
}

.attorney-mchd-certificate-native-select {
  display: none;
}

.attorney-mchd-certificate-empty {
  border: 1px dashed #dbe4f1;
  border-radius: 14px;
  background: #f8fbff;
  color: #59718f;
  padding: 14px 16px;
  font-size: 0.88rem;
  line-height: 1.5;
}

.attorney-mchd-certificate-card {
  width: 100%;
  border: 1px solid #dbe4f1;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  padding: 14px 16px;
  display: grid;
  gap: 8px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}

.attorney-mchd-certificate-card:hover {
  border-color: #bfd5f4;
  background: #eef5ff;
}

.attorney-mchd-certificate-card:active {
  transform: translateY(1px);
}

.attorney-mchd-certificate-card.is-selected {
  border-color: #93c5fd;
  background: #eff6ff;
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.14);
}

.attorney-mchd-certificate-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.attorney-mchd-certificate-card-title {
  margin: 0;
  color: #173051;
  font-size: 0.95rem;
  line-height: 1.35;
  font-weight: 700;
}

.attorney-mchd-certificate-card-mark {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid #c7d4e4;
  background: #fff;
  color: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  margin-top: 1px;
}

.attorney-mchd-certificate-card.is-selected .attorney-mchd-certificate-card-mark {
  border-color: #3b82f6;
  background: #3b82f6;
  color: #fff;
}

.attorney-mchd-certificate-card-meta {
  display: grid;
  gap: 4px;
}

.attorney-mchd-certificate-card-row {
  font-size: 0.86rem;
  line-height: 1.45;
  color: #4f6685;
}

.attorney-mchd-certificate-card-row strong {
  color: #173051;
  font-weight: 600;
}

.attorney-mchd-certificate-card-row--valid {
  color: #16a34a;
  font-weight: 700;
}

.attorney-mchd-certificate-details {
  margin-top: 10px;
  border-radius: 14px;
  background: #eef5ff;
  border: 1px solid #d7e7ff;
  padding: 12px 14px;
  display: grid;
  gap: 4px;
}

.attorney-mchd-certificate-details-title {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #335b8e;
}

.attorney-mchd-certificate-details-row {
  font-size: 0.84rem;
  line-height: 1.45;
  color: #35516f;
}

.attorney-mchd-certificate-details-row strong {
  color: #173051;
}

.attorney-mchd-signing-item.is-expanded {
  background: #eef5ff;
}

.attorney-mchd-registration-signed-list {
  gap: 10px;
}

.attorney-mchd-registration-item.is-selected {
  border-color: #bfd5f4;
  background: #eef5ff;
}

.attorney-mchd-registration-item .attorney-mchd-signing-item-head {
  align-items: center;
}

.attorney-mchd-registration-item .primary-button,
.attorney-mchd-registration-item .secondary-button {
  min-width: 126px;
  margin-top: 0;
}

.attorney-mchd-stepper {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
  width: 100%;
  align-items: stretch;
}

.attorney-mchd-step-chip {
  min-width: 0;
  padding: 12px 10px;
  border-radius: 14px;
  border: 1px solid #dbe4f1;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 8px;
  align-content: center;
  align-items: center;
  justify-items: center;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.12s ease;
  min-height: 94px;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.06);
}

.attorney-mchd-step-chip:hover {
  background: #eef5ff;
  border-color: #bfd5f4;
}

.attorney-mchd-step-chip-order {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  margin-inline: auto;
  text-align: center;
  border-radius: 8px;
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
  color: #ffffff;
  box-shadow: 0 8px 14px rgba(37, 99, 235, 0.2);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1;
}

.attorney-mchd-step-chip-text {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  margin-inline: auto;
  text-align: center;
  font-size: 0.68rem;
  line-height: 1.18;
  color: #173051;
  font-weight: 600;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
  white-space: normal;
  text-wrap: balance;
}

.attorney-mchd-step-chip.is-active {
  border-color: #93c5fd;
  background: linear-gradient(180deg, #eff6ff 0%, #e5f0ff 100%);
  box-shadow:
    inset 0 0 0 1px rgba(59, 130, 246, 0.12),
    0 10px 18px rgba(59, 130, 246, 0.12);
}

.attorney-mchd-step-chip.is-complete {
  border-color: #bdd8c9;
  background: linear-gradient(180deg, #f5fcf7 0%, #eef9f2 100%);
}

.attorney-mchd-step-chip.is-complete .attorney-mchd-step-chip-number {
  color: #15803d;
}

.attorney-mchd-step-caption {
  margin: 0 0 10px;
  font-size: 0.85rem;
  color: #4f6685;
  font-weight: 600;
}

.attorney-mchd-step-panels {
  margin-bottom: 6px;
}

.attorney-mchd-autofill-row {
  margin-top: 2px;
}

.attorney-mchd-autofill-row .secondary-button {
  width: fit-content;
  min-width: 280px;
}

.attorney-mchd-template-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.attorney-mchd-template-actions .secondary-button {
  width: fit-content;
  min-width: 220px;
}

.attorney-mchd-registration-source {
  display: grid;
  gap: 8px;
}

.attorney-mchd-registration-subtitle {
  font-size: 0.82rem;
  font-weight: 700;
  color: #35557d;
  letter-spacing: 0.01em;
  margin-top: 2px;
}

.attorney-mchd-registration-layout {
  gap: 18px;
}

.attorney-mchd-registration-zone {
  grid-column: 1 / -1;
}

.attorney-mchd-registration-manual-grid {
  display: grid;
  gap: 14px;
}

.attorney-mchd-file-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.attorney-mchd-file-input-row input[type="file"] {
  min-width: 0;
}

.attorney-mchd-file-clear-btn {
  width: 38px;
  height: 38px;
  border: 1px solid #dbe4f1;
  border-radius: 12px;
  background: #f8fbff;
  color: #4f6685;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.attorney-mchd-file-clear-btn:hover {
  background: #eef5ff;
  border-color: #c7d4e4;
  color: #173051;
}

.attorney-mchd-file-clear-btn:focus-visible {
  outline: 2px solid #0ea5e9;
  outline-offset: 2px;
}

.attorney-mchd-registration-status {
  border: 1px solid #dbe4f1;
  border-radius: 14px;
  background: #f8fbff;
  color: #173051;
  font-size: 0.9rem;
  line-height: 1.5;
  padding: 12px 14px;
  white-space: pre-line;
}

.attorney-mchd-registration-status.is-ready {
  border-color: #bdd8c9;
  background: #f3fbf6;
}

.attorney-mchd-nav {
  justify-content: flex-start;
  align-items: center;
  gap: 10px;
}

.attorney-mchd-nav .primary-button,
.attorney-mchd-nav .secondary-button {
  margin-top: 0;
}

.attorney-mchd-registration-actions,
.attorney-mchd-signing-nav {
  justify-content: flex-end;
  margin-top: 12px;
}

.attorney-mchd-signing-card--tools .attorney-mchd-preview-header {
  margin-bottom: 6px;
}

.attorney-mchd-signing-card--tools .attorney-mchd-registration-source {
  gap: 6px;
}

.attorney-mchd-signing-card--tools .attorney-mchd-registration-status {
  padding: 10px 14px;
}

.attorney-mchd-preview-header {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
}

.attorney-mchd-preview-header--with-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.attorney-mchd-preview-header h3 {
  margin: 0;
  font-size: 1rem;
  color: #173051;
}

.attorney-mchd-preview-header p {
  margin: 0;
  font-size: 0.86rem;
  color: #4f6685;
}

.attorney-mchd-preview {
  display: grid;
  gap: 12px;
}

.attorney-mchd-preview-card {
  border: 1px solid #dbe4f1;
  border-radius: 14px;
  background: #f8fbff;
  padding: 12px 14px;
  display: grid;
  gap: 8px;
}

.attorney-mchd-preview-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #173051;
}

.attorney-mchd-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
}

.attorney-mchd-preview-item {
  display: grid;
  gap: 2px;
}

.attorney-mchd-preview-label {
  font-size: 0.75rem;
  color: #56708f;
}

.attorney-mchd-preview-value {
  font-size: 0.85rem;
  color: #173051;
  line-height: 1.4;
  word-break: break-word;
}

.attorney-mchd-preview-authorities {
  display: grid;
  gap: 6px;
}

.attorney-mchd-preview-authority {
  font-size: 0.84rem;
  line-height: 1.45;
  color: #173051;
  padding-left: 14px;
  position: relative;
}

.attorney-mchd-preview-authority::before {
  content: "•";
  position: absolute;
  left: 0;
  top: 0;
  color: #2563eb;
}

.reports-export-card {
  max-width: none;
}

.deals-calendar-card {
  width: 100%;
  max-width: none;
  display: grid;
  gap: 16px;
}

.electronic-mortgage-card {
  width: 100%;
  max-width: none;
  display: grid;
  gap: 16px;
}

.electronic-mortgage-header {
  display: grid;
  gap: 8px;
}

.electronic-mortgage-actions-shell {
  display: grid;
  gap: 12px;
  width: min(100%, 360px);
  padding: 16px;
  border: 1px solid #dbe4f1;
  border-radius: 18px;
  background: linear-gradient(180deg, #f8fbff 0%, #f3f8ff 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.75),
    0 10px 22px rgba(15, 23, 42, 0.05);
}

.electronic-mortgage-actions-title {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #53719a;
}

.electronic-mortgage-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.electronic-mortgage-header-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.electronic-mortgage-header-copy h2 {
  margin: 0;
}

.electronic-mortgage-header-copy p {
  margin: 0;
  color: #4f6685;
  line-height: 1.5;
}

.electronic-mortgage-note {
  padding: 14px 16px;
  border: 1px solid #dbe4f1;
  border-radius: 14px;
  background: #f8fbff;
  color: #48617e;
  line-height: 1.45;
}

.electronic-mortgage-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  min-height: 58px;
  padding: 13px 14px;
  border-radius: 16px;
  text-align: center;
  white-space: normal;
  line-height: 1.24;
  font-size: 0.92rem;
}

.electronic-mortgage-action-btn:disabled {
  cursor: not-allowed;
  filter: saturate(0.58);
  opacity: 0.56;
  transform: none;
  box-shadow: none;
}

@media (max-width: 960px) {
  .electronic-mortgage-actions-shell {
    width: 100%;
  }

  .electronic-mortgage-actions {
    align-items: stretch;
  }

  .electronic-mortgage-actions > button {
    width: 100%;
  }
}

.deals-calendar-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.deals-calendar-month-nav {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.deals-calendar-month-btn {
  min-width: 42px;
  min-height: 42px;
  padding: 0;
  border-radius: 12px;
}

.deals-calendar-month-heading {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.deals-calendar-month-label {
  font-size: 1.1rem;
  font-weight: 800;
  color: #173051;
  line-height: 1.1;
}

.deals-calendar-month-meta {
  color: #4f6685;
  font-size: 0.82rem;
  line-height: 1.3;
}

.deals-calendar-filter-actions {
  display: grid;
  grid-template-columns: repeat(2, 156px);
  align-items: stretch;
  justify-content: flex-start;
  gap: 10px;
}

.deals-calendar-filter-actions > .deals-calendar-toolbar-btn,
.deals-calendar-filter-actions > .deals-calendar-more-shell {
  width: 156px;
}

.deals-calendar-filter-actions .deals-calendar-toolbar-btn {
  width: 100%;
  margin-top: 0;
}

.deals-calendar-action-link {
  justify-content: center;
  text-decoration: none;
}

.deals-calendar-toolbar-btn {
  min-height: 42px;
  min-width: 156px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-sizing: border-box;
}

.deals-calendar-more-shell {
  position: relative;
  display: inline-flex;
  width: 100%;
  align-self: stretch;
}

.deals-calendar-more-toggle {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  margin-top: 0;
}

.deals-calendar-more-menu {
  width: 230px;
}

.deals-calendar-more-menu .file-signing-plugin-menu-item {
  width: 100%;
  justify-content: flex-start;
  cursor: pointer;
}

.file-signing-plugin-menu-item:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  filter: grayscale(0.2);
}

.deals-calendar-empty,
.deals-calendar-placeholder {
  color: #4f6685;
}

.deals-calendar-list-wrap {
  border: 1px solid #dbe2ed;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  padding: 16px;
}

.deals-calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}

.deals-calendar-weekdays span {
  padding: 0 4px 6px;
  text-align: right;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #58718f;
  text-transform: uppercase;
}

.deals-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
}

.deals-calendar-day-cell {
  display: grid;
  grid-template-rows: auto auto;
  align-content: start;
  gap: 6px;
  min-height: 176px;
  padding: 10px 10px 8px;
  border: 1px solid #dbe4f1;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
}

.deals-calendar-day-cell:not(.has-deals) {
  min-height: 88px;
}

.deals-calendar-day-cell.is-outside-month {
  background: rgba(244, 247, 251, 0.8);
  border-color: #e6edf5;
  opacity: 0.72;
}

.deals-calendar-day-cell.is-today {
  border-color: rgba(37, 99, 235, 0.45);
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.12);
}

.deals-calendar-day-cell.has-deals {
  background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
}

.deals-calendar-day-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  min-height: 30px;
}

.deals-calendar-day-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  min-width: 30px;
  min-height: 30px;
  border-radius: 10px;
  background: #eef4ff;
  color: #1d4ed8;
  font-size: 0.9rem;
  font-weight: 800;
}

.deals-calendar-day-cell.is-outside-month .deals-calendar-day-number {
  background: rgba(148, 163, 184, 0.12);
  color: #64748b;
}

.deals-calendar-day-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  min-width: 22px;
  min-height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  color: #334155;
  font-size: 0.72rem;
  font-weight: 800;
}

.deals-calendar-day-events {
  display: grid;
  align-content: start;
  gap: 5px;
  min-height: auto;
  max-height: none;
  overflow: visible;
}

.deals-calendar-event {
  display: grid;
  gap: 2px;
  padding: 5px 7px;
  border-radius: 12px;
  border: 1px solid rgba(203, 213, 225, 0.72);
  background: #ffffff;
  color: inherit;
  text-decoration: none;
  box-shadow: 0 3px 9px rgba(15, 23, 42, 0.04);
  border-left-width: 4px;
}

.deals-calendar-event-main {
  display: grid;
  gap: 2px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.deals-calendar-event:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
}

.deals-calendar-event.is-marked {
  background: linear-gradient(180deg, #f3f8ff 0%, #e8f1ff 100%);
  box-shadow:
    inset 0 0 0 1px rgba(37, 99, 235, 0.18),
    0 4px 12px rgba(37, 99, 235, 0.08);
}

.deals-calendar-event.is-complete {
  background: linear-gradient(180deg, #eefbf4 0%, #e2f6ea 100%);
  box-shadow:
    inset 0 0 0 1px rgba(5, 150, 105, 0.18),
    0 5px 14px rgba(5, 150, 105, 0.08);
}

.deals-calendar-event.is-in-progress {
  border-left-color: #2563eb;
}

.deals-calendar-event.is-completed {
  border-left-color: #059669;
}

.deals-calendar-event.is-cancelled {
  border-left-color: #dc2626;
}

.deals-calendar-event.is-default {
  border-left-color: #64748b;
}

.deals-calendar-event-client {
  display: block;
  color: #0f2d53;
  font-size: 0.69rem;
  line-height: 1.15;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.deals-calendar-event-meta {
  display: block;
  color: #4f6685;
  font-size: 0.61rem;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.deals-calendar-event-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  margin-top: 0;
  transition: max-height 0.18s ease, opacity 0.16s ease, margin-top 0.18s ease;
}

.deals-calendar-event:hover .deals-calendar-event-controls,
.deals-calendar-event:focus-within .deals-calendar-event-controls {
  max-height: 60px;
  opacity: 1;
  margin-top: 4px;
}

.deals-calendar-event-check {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  padding: 4px 5px;
  border-radius: 9px;
  border: 1px solid rgba(203, 213, 225, 0.92);
  background: rgba(255, 255, 255, 0.82);
  color: #36506f;
  font-size: 0.58rem;
  line-height: 1;
  cursor: pointer;
}

.deals-calendar-event-check input {
  width: 12px;
  height: 12px;
  margin: 0;
  accent-color: #2563eb;
  cursor: pointer;
}

.deals-calendar-event-check span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reports-export-actions {
  position: relative;
  display: flex;
  justify-content: flex-end;
}

.reports-export-action-btn {
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 0.82rem;
}

.reports-export-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 310px;
  max-width: min(92vw, 310px);
  border: 1px solid #dbe2ed;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.16);
  padding: 8px;
  z-index: 30;
  display: grid;
  gap: 6px;
}

.reports-export-menu-item,
.reports-export-risk-item {
  border: 1px solid transparent;
  border-radius: 8px;
  background: #ffffff;
  color: #1f3a5c;
  text-align: left;
  font-size: 0.84rem;
  padding: 8px 10px;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
}

.reports-export-menu-item:hover,
.reports-export-risk-item:hover {
  background: #eef5ff;
  border-color: #c7ddf8;
}

.reports-export-risk-options {
  display: grid;
  gap: 5px;
  padding-top: 4px;
  border-top: 1px solid #e2e8f0;
}

.reports-export-risk-item {
  font-size: 0.81rem;
  padding-left: 12px;
}

.reports-export-empty {
  margin: 4px 0 0;
  color: #4f6685;
}

.reports-export-layout {
  display: grid;
  grid-template-columns: minmax(200px, 250px) minmax(0, 1fr);
  gap: 10px;
  min-height: 280px;
}

.reports-export-list {
  border: 1px solid #dbe2ed;
  border-radius: 14px;
  background: #f8fbff;
  padding: 8px;
  max-height: 72vh;
  overflow: auto;
  display: grid;
  gap: 8px;
}

.reports-export-year-group {
  display: grid;
  gap: 6px;
}

.reports-export-year-title {
  font-size: 0.9rem;
  color: #173051;
  font-weight: 700;
}

.reports-export-month-group {
  display: grid;
  gap: 4px;
  padding: 6px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
}

.reports-export-month-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: #35557d;
}

.reports-export-item {
  border: 1px solid #dbe2ed;
  border-radius: 8px;
  background: #ffffff;
  padding: 6px 8px;
  display: grid;
  gap: 3px;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;
}

.reports-export-item:hover {
  background: #eef5ff;
  border-color: #bfd5f4;
}

.reports-export-item.is-active {
  border-color: #93c5fd;
  background: #eaf2ff;
}

.reports-export-item-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #0f2d53;
}

.reports-export-item-meta {
  font-size: 0.74rem;
  color: #46658a;
}

.reports-export-preview {
  border: 1px solid #dbe2ed;
  border-radius: 14px;
  background: #ffffff;
  padding: 14px;
  display: grid;
  gap: 10px;
  min-width: 0;
}

.reports-export-preview h3 {
  font-size: 1.08rem;
  color: #173051;
}

.reports-export-preview-meta {
  color: #4f6685;
  font-size: 0.86rem;
}

.reports-export-preview-summary {
  color: #334155;
  font-size: 0.88rem;
}

.reports-export-preview-empty {
  color: #4f6685;
  font-size: 0.9rem;
}

.reports-export-preview-body {
  min-width: 0;
}

.reports-export-table-wrap {
  border: 1px solid #dbe2ed;
  border-radius: 12px;
  overflow: auto;
  max-height: 64vh;
}

.reports-export-table {
  width: 100%;
  min-width: 1180px;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.reports-export-table th,
.reports-export-table td {
  border: 1px solid #dbe2ed;
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
  white-space: pre-line;
}

.reports-export-table thead th {
  background: #ecf2fc;
  color: #173051;
  font-weight: 700;
  position: sticky;
  top: 0;
  z-index: 1;
}

.reports-export-table tbody tr:nth-child(even) td {
  background: #f8fbff;
}

.protocols-subtitle {
  margin: 2px 0 16px;
  color: #4f6685;
  font-size: 0.95rem;
}

.protocols-shell {
  display: grid;
  grid-template-columns: minmax(190px, 220px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  margin-top: 12px;
}

.protocols-side-nav {
  display: grid;
  gap: 10px;
  position: sticky;
  top: 16px;
  padding: 14px;
  border: 1px solid #dbe4f1;
  border-radius: 22px;
  background: linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
}

.protocols-side-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 58px;
  padding: 13px 14px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: linear-gradient(135deg, #334155, #0f172a);
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    filter 0.18s ease,
    background 0.18s ease;
}

.protocols-side-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.16);
}

.protocols-side-btn.is-active {
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  box-shadow: 0 16px 28px rgba(37, 99, 235, 0.24);
}

.protocols-workspace {
  min-width: 0;
  display: grid;
  gap: 18px;
}

.protocols-group-panel {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid #dbe4f1;
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.07);
}

.protocols-group-header {
  display: grid;
  gap: 6px;
}

.protocols-group-kicker,
.protocols-types-title {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #53719a;
}

.protocols-group-header h3 {
  margin: 0;
  font-size: 1.18rem;
  color: #173051;
}

.protocols-group-caption {
  margin: 0;
  color: #4f6685;
  font-size: 0.92rem;
  line-height: 1.45;
}

.protocols-types-card,
.protocols-empty-state {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid #dbe4f1;
  border-radius: 18px;
  background: #f8fbff;
}

.protocols-empty-state h4 {
  margin: 0;
  font-size: 1rem;
  color: #173051;
}

.protocols-empty-state p {
  margin: 0;
  color: #4f6685;
  line-height: 1.5;
}

.protocol-groups {
  display: grid;
  gap: 14px;
  margin-bottom: 12px;
}

.protocol-group {
  border: 1px solid #dbe4f1;
  border-radius: 14px;
  background: #f8fbff;
  padding: 12px;
}

.protocol-group-title {
  margin: 0 0 10px;
  font-size: 0.96rem;
  color: #203b60;
}

.protocol-actions {
  display: grid;
  gap: 10px;
  margin-bottom: 0;
}

.protocol-actions--picker {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.protocol-actions--single-picker {
  grid-template-columns: minmax(240px, 340px);
}

.protocol-actions--protocols {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.protocol-actions--grace {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.protocol-actions--certificates {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.protocol-actions--single {
  grid-template-columns: minmax(220px, 360px);
}

.protocol-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  min-height: 62px;
  padding: 10px 12px;
  text-align: center;
  white-space: normal;
  line-height: 1.24;
  font-size: 0.84rem;
  font-weight: 700;
  border-radius: 14px;
  border: 1px solid transparent;
  color: #ffffff;
  background: linear-gradient(135deg, #334155, #0f172a);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    filter 0.18s ease,
    background 0.18s ease;
}

.protocol-action-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.16);
}

.protocol-action-btn:active {
  transform: translateY(0);
}

#protocolRiskBtn {
  background: linear-gradient(135deg, #334155, #0f172a);
}

#protocolLoanBtn {
  background: linear-gradient(135deg, #334155, #0f172a);
}

#protocolDepositBtn {
  background: linear-gradient(135deg, #334155, #0f172a);
}

#protocolGeneralIssuesInvestmentsBtn {
  background: linear-gradient(135deg, #334155, #0f172a);
}

#protocolGeneralIssuesLoansBtn {
  background: linear-gradient(135deg, #334155, #0f172a);
}

.protocol-action-btn--grace {
  background: linear-gradient(135deg, #334155, #0f172a);
}

.protocol-action-btn--statement {
  background: linear-gradient(135deg, #334155, #0f172a);
}

.protocol-action-btn--certificate {
  background: linear-gradient(135deg, #334155, #0f172a);
}

body.dark-theme #protocolRiskBtn {
  background: linear-gradient(135deg, #334155, #0f172a);
}

body.dark-theme #protocolLoanBtn {
  background: linear-gradient(135deg, #334155, #0f172a);
}

body.dark-theme #protocolDepositBtn {
  background: linear-gradient(135deg, #334155, #0f172a);
}

body.dark-theme #protocolGeneralIssuesInvestmentsBtn {
  background: linear-gradient(135deg, #334155, #0f172a);
}

body.dark-theme #protocolGeneralIssuesLoansBtn {
  background: linear-gradient(135deg, #334155, #0f172a);
}

body.dark-theme .protocol-group {
  border-color: #42516a;
  background: #1f2b3f;
}

body.dark-theme .protocols-side-nav,
body.dark-theme .protocols-group-panel {
  border-color: #42516a;
  background: linear-gradient(180deg, #243246 0%, #1f2b3f 100%);
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.24);
}

body.dark-theme .protocols-side-btn {
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.18);
}

body.dark-theme .protocols-side-btn.is-active {
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  box-shadow: 0 16px 28px rgba(15, 54, 127, 0.34);
}

body.dark-theme .protocols-group-kicker,
body.dark-theme .protocols-types-title {
  color: #9fb5d4;
}

body.dark-theme .protocols-group-header h3,
body.dark-theme .protocols-empty-state h4 {
  color: #e6edf5;
}

body.dark-theme .protocols-group-caption,
body.dark-theme .protocols-empty-state p {
  color: #b8c9de;
}

body.dark-theme .protocols-types-card,
body.dark-theme .protocols-empty-state {
  border-color: #42516a;
  background: #223249;
}

body.dark-theme .protocol-group-title {
  color: #e6edf5;
}

body.dark-theme .protocol-action-btn {
  color: #e6edf5;
  background: linear-gradient(135deg, #334155, #0f172a);
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.18);
}

body.dark-theme .protocol-action-btn:hover {
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.24);
}

body.dark-theme .protocol-action-btn--grace {
  background: linear-gradient(135deg, #334155, #0f172a);
}

body.dark-theme .protocol-action-btn--statement {
  background: linear-gradient(135deg, #334155, #0f172a);
}

body.dark-theme .protocol-action-btn--certificate {
  background: linear-gradient(135deg, #334155, #0f172a);
}

.protocol-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.45);
}

.protocol-modal-dialog {
  width: min(100%, 860px);
  max-height: calc(100vh - 48px);
  overflow: auto;
  background: #ffffff;
  border: 1px solid #d9e2ee;
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(9, 20, 38, 0.24);
  padding: 18px 18px 16px;
}

.protocol-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.protocol-modal-header h3 {
  margin: 0;
  font-size: 1.14rem;
  color: #153055;
}

.protocol-modal-close {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  border: 1px solid #d9e2ee;
  background: #f6f9ff;
  color: #415a78;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.protocol-modal-close:hover {
  background: #edf3ff;
}

.protocol-modal-form {
  display: grid;
  gap: 14px;
}

.protocol-modal-caption {
  margin: 0 0 10px;
  color: #4f6685;
  font-size: 0.92rem;
  line-height: 1.45;
}

.protocol-modal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.protocol-modal-grid .field {
  margin: 0;
}

.protocol-modal-grid .field input,
.protocol-modal-grid .field select,
.protocol-modal-grid .field textarea,
.protocol-deposit-entry .field input,
.protocol-deposit-entry .field select {
  height: 40px;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 0.9rem;
}

.protocol-modal-grid .field textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--text-main);
  min-height: 104px;
  height: auto;
  resize: vertical;
  line-height: 1.35;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.protocol-modal-grid .field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.15);
}

.protocol-modal-grid .field.protocol-modal-field-full {
  grid-column: 1 / -1;
}

.protocol-modal-grid .field input[type="file"] {
  height: auto;
  min-height: 40px;
  padding-block: 7px;
  line-height: 1.3;
}

.protocol-modal-note {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid #dbe4f1;
  border-radius: 14px;
  background: #f8fbff;
}

.protocol-modal-note-title {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #53719a;
}

.protocol-modal-note p {
  margin: 0;
  color: #4f6685;
  line-height: 1.45;
}

.protocol-modal-checkbox-field {
  display: flex;
  align-items: center;
}

.protocol-modal-checkbox-row {
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.88rem;
  color: #1f3a5c;
  line-height: 1.3;
  cursor: pointer;
}

.protocol-modal-checkbox-row input[type="checkbox"] {
  inline-size: 14px;
  block-size: 14px;
  margin-top: 1px;
}

.attorney-authorities-fieldset {
  margin: 0;
  min-width: 0;
  border: 1px solid #dbe4f1;
  border-radius: 12px;
  padding: 10px 12px;
  display: grid;
  gap: 10px;
}

.attorney-authorities-fieldset legend {
  padding: 0 6px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #1e293b;
}

.attorney-builder-section-fieldset,
.attorney-trusted-fieldset {
  margin: 0;
  min-width: 0;
  border: 1px solid #dbe4f1;
  border-radius: 12px;
  padding: 10px 12px;
}

.attorney-builder-section-fieldset legend,
.attorney-trusted-fieldset legend {
  padding: 0 6px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #1e293b;
}

.attorney-trusted-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.attorney-trusted-grid .field {
  margin: 0;
}

.protocol-modal-grid .field.certificate-format-field {
  grid-column: 1 / -1;
  max-width: 280px;
}

.protocol-modal-grid .field .certificate-format-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 34px;
  background-image:
    linear-gradient(45deg, transparent 50%, #4b6486 50%),
    linear-gradient(135deg, #4b6486 50%, transparent 50%);
  background-position:
    calc(100% - 16px) calc(50% - 2px),
    calc(100% - 11px) calc(50% - 2px);
  background-size:
    5px 5px,
    5px 5px;
  background-repeat: no-repeat;
}

.protocol-deposit-section {
  border: 1px solid #dbe4f1;
  border-radius: 14px;
  padding: 12px;
  background: #f8fbff;
  display: grid;
  gap: 10px;
}

.protocol-deposit-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.protocol-deposit-section-header h4 {
  margin: 0;
  color: #17355d;
  font-size: 1rem;
}

.protocol-modal-add-btn {
  padding: 8px 12px;
  font-size: 0.82rem;
  border-radius: 10px;
}

.protocol-deposit-entries {
  display: grid;
  gap: 10px;
}

.protocol-deposit-entry {
  border: 1px solid #dbe4f1;
  border-radius: 12px;
  background: #ffffff;
  padding: 10px;
  display: grid;
  gap: 9px;
}

.protocol-deposit-entry-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.protocol-deposit-entry-title {
  margin: 0;
  color: #1f3f68;
  font-size: 0.92rem;
}

.protocol-deposit-remove-btn {
  border: 1px solid #d8e1ee;
  background: #f3f7ff;
  color: #3c5778;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.78rem;
  cursor: pointer;
}

.protocol-deposit-remove-btn:hover {
  background: #eaf1ff;
}

.protocol-deposit-entry-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: 10px;
}

.protocol-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.accounts-admin-modal-dialog {
  width: min(100%, 1220px);
}

.accounts-admin-layout {
  display: grid;
  grid-template-columns: minmax(320px, 360px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.accounts-admin-sidebar,
.accounts-admin-form-section {
  border: 1px solid #dbe4f1;
  border-radius: 16px;
  background: #f8fbff;
}

.accounts-admin-sidebar {
  padding: 12px;
  display: grid;
  gap: 10px;
}

.accounts-admin-toolbar,
.accounts-admin-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.accounts-admin-toolbar h4,
.accounts-admin-section-head h4 {
  margin: 0;
  color: #153055;
  font-size: 0.96rem;
}

.accounts-admin-section-head {
  flex-direction: column;
}

.accounts-admin-section-head p {
  margin: 0;
  color: #5a7090;
  font-size: 0.84rem;
  line-height: 1.35;
}

.accounts-admin-list {
  display: grid;
  gap: 8px;
  overflow: visible;
  padding-right: 0;
}

.accounts-admin-card {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #d7e1ee;
  border-radius: 12px;
  background: #ffffff;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.accounts-admin-card:hover {
  border-color: #8cb2ea;
  box-shadow: 0 10px 22px rgba(37, 91, 166, 0.12);
  transform: translateY(-1px);
}

.accounts-admin-card.is-active {
  border-color: #2a6fde;
  background: #eef5ff;
  box-shadow: 0 12px 24px rgba(25, 89, 193, 0.18);
}

.accounts-admin-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.accounts-admin-card-name {
  font-weight: 700;
  color: #173359;
  line-height: 1.2;
  font-size: 0.9rem;
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.accounts-admin-card-role {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: #e8f0ff;
  color: #2258b2;
  font-size: 0.76rem;
  font-weight: 700;
}

.accounts-admin-card-meta {
  display: none;
}

.accounts-admin-form {
  display: grid;
  gap: 8px;
}

.accounts-admin-workspace {
  display: grid;
  grid-template-columns: minmax(220px, 240px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.accounts-admin-subnav {
  display: grid;
  gap: 8px;
}

.accounts-admin-subnav-btn {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #d7e1ee;
  border-radius: 12px;
  background: linear-gradient(135deg, #334155, #0f172a);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  text-align: left;
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s, border-color 0.2s;
}

.accounts-admin-subnav-btn:hover {
  filter: brightness(1.04);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.18);
}

.accounts-admin-subnav-btn.is-active {
  border-color: #2a6fde;
  background: linear-gradient(135deg, #2a6fde, #38bdf8);
  box-shadow: 0 12px 24px rgba(42, 111, 222, 0.24);
}

.accounts-admin-content {
  display: grid;
}

.accounts-admin-grid {
  padding: 0;
  gap: 10px 12px;
}

.accounts-admin-form-section {
  padding: 12px 14px;
  display: grid;
  gap: 10px;
}

.accounts-admin-grid--personal {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.accounts-admin-grid--personal .protocol-modal-field-full {
  grid-column: 1 / -1;
}

.accounts-admin-permissions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 10px;
}

.accounts-admin-permission {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid #d7e1ee;
  border-radius: 12px;
  background: #ffffff;
  color: #203c61;
  font-size: 0.88rem;
}

.accounts-admin-permission input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #2a6fde;
}

.accounts-admin-permission.is-disabled {
  opacity: 0.7;
}

.accounts-admin-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: -2px;
}

.protocol-modal.is-self-mode .accounts-admin-layout {
  grid-template-columns: minmax(0, 1fr);
}

.protocol-modal.is-self-mode .accounts-admin-sidebar {
  display: none;
}

.protocol-modal.is-self-mode .accounts-admin-workspace {
  grid-template-columns: minmax(220px, 240px) minmax(0, 1fr);
}

.protocol-modal.is-self-mode .accounts-admin-subnav {
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
}

.accounts-admin-form > .message:empty {
  display: none;
}

.accounts-admin-form .field span {
  font-size: 0.8rem;
}

.accounts-admin-form .field input,
.accounts-admin-form .field select {
  min-height: 40px;
  padding: 10px 12px;
  font-size: 0.92rem;
}

.accounts-admin-form .password-field input {
  padding-right: 44px;
}

.accounts-admin-form > .message {
  margin-top: 4px;
}

.accounts-admin-field-issued-by {
  grid-column: 1 / -1;
}

.accounts-admin-actions .primary-button,
.accounts-admin-actions .secondary-button {
  min-width: 220px;
  min-height: 44px;
  margin-top: 0;
  justify-content: center;
}

.accounts-admin-form .field input:disabled,
.accounts-admin-form .field select:disabled {
  cursor: not-allowed;
  background: #eef4fb;
  color: #5f738d;
}

.protocol-modal-dialog--compact {
  width: min(100%, 520px);
}

.accounts-admin-actions--center {
  justify-content: center;
}

.auth-loading-screen {
  position: fixed;
  inset: 0;
  z-index: 1600;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(239, 245, 253, 0.88);
  backdrop-filter: blur(8px);
}

.auth-loading-card {
  width: min(100%, 520px);
  padding: 28px 24px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(211, 224, 242, 0.9);
  box-shadow: 0 28px 60px rgba(17, 38, 73, 0.18);
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
}

.auth-loading-logo {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  object-fit: cover;
  object-position: left center;
}

.auth-loading-card h2 {
  margin: 2px 0 0;
  font-size: 1.25rem;
  color: #173359;
}

.auth-loading-card p {
  margin: 0;
  color: #516a8f;
  font-size: 0.96rem;
}

.auth-loading-animation {
  width: 443px;
  height: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-inline: auto;
  margin-top: -12px;
  color: #2a6fde;
}

.auth-loading-animation svg {
  display: block;
  width: 100%;
  height: auto;
  transform: translateX(10px);
}

body.dark-theme .protocol-modal-dialog {
  background: #1d293b;
  border-color: #3b4b63;
}

body.dark-theme .protocol-modal-header h3,
body.dark-theme .protocol-deposit-section-header h4,
body.dark-theme .protocol-deposit-entry-title {
  color: #e6edf5;
}

body.dark-theme .protocol-modal-close {
  border-color: #495c78;
  background: #27364d;
  color: #d8e2f2;
}

body.dark-theme .protocol-modal-close:hover {
  background: #30435f;
}

body.dark-theme .protocol-modal-caption,
body.dark-theme .protocol-modal-note p {
  color: #b8c9de;
}

body.dark-theme .protocol-modal-note {
  border-color: #42516a;
  background: #223249;
}

body.dark-theme .protocol-modal-note-title {
  color: #9fc1f1;
}

body.dark-theme .protocol-modal-checkbox-row {
  color: #dce6f5;
}

body.dark-theme .accounts-admin-sidebar,
body.dark-theme .accounts-admin-form-section {
  border-color: #42516a;
  background: #223249;
}

body.dark-theme .accounts-admin-toolbar h4,
body.dark-theme .accounts-admin-section-head h4 {
  color: #e6edf5;
}

body.dark-theme .accounts-admin-section-head p {
  color: #b8c9de;
}

body.dark-theme .accounts-admin-card {
  border-color: #42516a;
  background: #243246;
}

body.dark-theme .accounts-admin-card:hover {
  border-color: #6188c4;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.24);
}

body.dark-theme .accounts-admin-card.is-active {
  border-color: #77a6f5;
  background: #2a3a52;
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.28);
}

body.dark-theme .accounts-admin-subnav-btn {
  border-color: #42516a;
  background: linear-gradient(135deg, #2f4059, #1b2739);
  color: #edf4ff;
}

body.dark-theme .accounts-admin-subnav-btn:hover {
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.26);
}

body.dark-theme .accounts-admin-subnav-btn.is-active {
  border-color: #77a6f5;
  background: linear-gradient(135deg, #2a6fde, #3ea5ff);
  box-shadow: 0 12px 24px rgba(35, 87, 166, 0.36);
}

body.dark-theme .accounts-admin-card-name {
  color: #e6edf5;
}

body.dark-theme .accounts-admin-card-role {
  background: rgba(110, 158, 239, 0.16);
  color: #a9c6fb;
}

body.dark-theme .accounts-admin-card-meta {
  color: #b8c9de;
}

body.dark-theme .accounts-admin-form .field input:disabled,
body.dark-theme .accounts-admin-form .field select:disabled {
  background: #152235;
  color: #8fa6c4;
  border-color: #253552;
}

body.dark-theme .auth-loading-screen {
  background: rgba(12, 20, 34, 0.82);
}

body.dark-theme .auth-loading-card {
  background: rgba(27, 39, 58, 0.96);
  border-color: rgba(89, 112, 149, 0.78);
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.42);
}

body.dark-theme .auth-loading-card h2 {
  color: #edf4ff;
}

body.dark-theme .auth-loading-card p {
  color: #b8c9de;
}

body.dark-theme .accounts-admin-permission {
  border-color: #42516a;
  background: #243246;
  color: #dce6f5;
}

@media (max-width: 1024px) {
  .accounts-admin-layout {
    grid-template-columns: 1fr;
  }

  .accounts-admin-list {
    max-height: none;
  }

  .accounts-admin-workspace {
    grid-template-columns: 1fr;
  }

  .accounts-admin-subnav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .accounts-admin-grid--personal {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .accounts-admin-permissions {
    grid-template-columns: 1fr;
  }
}

body.dark-theme .attorney-authorities-fieldset,
body.dark-theme .attorney-builder-section-fieldset,
body.dark-theme .attorney-trusted-fieldset {
  border-color: #3d4e67;
  background: #243246;
}

body.dark-theme .attorney-builder-section-fieldset legend,
body.dark-theme .attorney-authorities-fieldset legend,
body.dark-theme .attorney-trusted-fieldset legend {
  color: #dce6f5;
}

body.dark-theme .attorney-mode-nav,
body.dark-theme .attorney-mode-intro-card {
  border-color: #42516a;
  background: linear-gradient(180deg, #243246 0%, #1f2b3f 100%);
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.24);
}

body.dark-theme .attorney-mode-intro-card h3 {
  color: #e6edf5;
}

body.dark-theme .attorney-mode-btn {
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.18);
}

body.dark-theme .attorney-mode-btn:hover {
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.24);
}

body.dark-theme .attorney-mode-btn.is-active {
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  box-shadow: 0 16px 28px rgba(15, 54, 127, 0.34);
}

body.dark-theme .attorney-nav-button--kind {
  background: linear-gradient(135deg, #64748b, #334155);
}

body.dark-theme .attorney-nav-button--action {
  background: linear-gradient(135deg, #0f766e, #0f4c5c);
}

body.dark-theme .attorney-mode-btn-note,
body.dark-theme .attorney-mode-intro-text,
body.dark-theme .attorney-mode-section-caption {
  color: #b8c9de;
}

body.dark-theme .attorney-mchd-side-btn {
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.18);
}

body.dark-theme .attorney-mchd-side-btn.is-active {
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  box-shadow: 0 16px 28px rgba(15, 54, 127, 0.34);
}

body.dark-theme .attorney-mchd-signing-card,
body.dark-theme .attorney-mchd-signing-item,
body.dark-theme .attorney-mchd-signing-empty {
  border-color: #42516a;
  background: #243246;
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.24);
}

body.dark-theme .attorney-mchd-signing-item-title {
  color: #e6edf5;
}

body.dark-theme .attorney-mchd-signing-item-meta,
body.dark-theme .attorney-mchd-signing-empty {
  color: #b8c9de;
}

body.dark-theme .attorney-mchd-disclosure-caret {
  color: #b8c9de;
}

body.dark-theme .attorney-mchd-disclosure-icon-btn {
  background: rgba(36, 50, 70, 0.78);
  border-color: #42516a;
}

body.dark-theme .attorney-mchd-disclosure-icon-btn:hover {
  background: #2a3951;
  border-color: #536882;
}

body.dark-theme .attorney-mchd-signing-item-status.is-pending {
  color: #ffd792;
  background: rgba(120, 78, 16, 0.34);
  box-shadow: inset 0 0 0 1px rgba(255, 205, 117, 0.34);
}

body.dark-theme .attorney-mchd-signing-item-status.is-signed {
  color: #8ce0ae;
  background: rgba(24, 86, 49, 0.35);
  box-shadow: inset 0 0 0 1px rgba(122, 219, 160, 0.28);
}

body.dark-theme .attorney-mchd-signing-item-meta--archive-details {
  border-top-color: #42516a;
}

body.dark-theme .attorney-mchd-signing-item.is-expanded {
  background: #223249;
}

body.dark-theme .attorney-mchd-registration-item.is-selected {
  border-color: #5d7aa6;
  background: #223249;
}

body.dark-theme .attorney-mchd-registration-signed-list .attorney-mchd-signing-empty {
  border-color: #42516a;
  background: #243246;
}

body.dark-theme .attorney-mchd-certificate-empty,
body.dark-theme .attorney-mchd-certificate-card {
  border-color: #42516a;
  background: #243246;
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.18);
}

body.dark-theme .attorney-mchd-certificate-card:hover,
body.dark-theme .attorney-mchd-certificate-card.is-selected {
  background: #223249;
  border-color: #5d7aa6;
}

body.dark-theme .attorney-mchd-certificate-card-title,
body.dark-theme .attorney-mchd-certificate-card-row strong,
body.dark-theme .attorney-mchd-certificate-details-row strong {
  color: #e6edf5;
}

body.dark-theme .attorney-mchd-certificate-card-row,
body.dark-theme .attorney-mchd-certificate-empty,
body.dark-theme .attorney-mchd-certificate-details-row {
  color: #b8c9de;
}

body.dark-theme .attorney-mchd-certificate-card-row--valid {
  color: #8ce0ae;
}

body.dark-theme .attorney-mchd-certificate-card-mark {
  border-color: #536882;
  background: #1f2b3f;
}

body.dark-theme .attorney-mchd-certificate-card.is-selected .attorney-mchd-certificate-card-mark {
  border-color: #60a5fa;
  background: #2563eb;
}

body.dark-theme .attorney-mchd-certificate-details {
  border-color: #42516a;
  background: #223249;
}

body.dark-theme .attorney-mchd-certificate-details-title {
  color: #8fb7f2;
}

body.dark-theme .attorney-mchd-registration-subtitle {
  color: #b8c9de;
}

body.dark-theme .attorney-mchd-file-clear-btn {
  border-color: #42516a;
  background: #243246;
  color: #b8c9de;
}

body.dark-theme .attorney-mchd-file-clear-btn:hover {
  background: #2a3951;
  border-color: #536882;
  color: #e6edf5;
}

body.dark-theme .attorney-mchd-preview-title,
body.dark-theme .attorney-mchd-preview-value,
body.dark-theme .attorney-mchd-preview-authority,
body.dark-theme .attorney-mchd-preview-header h3 {
  color: #e6edf5;
}

body.dark-theme .attorney-mchd-preview-label,
body.dark-theme .attorney-mchd-preview-header p {
  color: #b8c9de;
}

body.dark-theme .attorney-mchd-step-chip {
  border-color: #42516a;
  background: #243246;
  box-shadow: 0 14px 24px rgba(0, 0, 0, 0.18);
}

body.dark-theme .attorney-mchd-step-chip-order {
  background: linear-gradient(180deg, #60a5fa 0%, #2563eb 100%);
  color: #ffffff;
  box-shadow: 0 10px 18px rgba(13, 44, 110, 0.35);
}

body.dark-theme .attorney-mchd-step-chip-text,
body.dark-theme .attorney-mchd-step-caption {
  color: #cbd5e6;
}

body.dark-theme .attorney-mchd-step-chip.is-active {
  border-color: #7da8d9;
  background: #2a3d59;
}

body.dark-theme .attorney-mchd-step-chip.is-complete {
  border-color: #4b6f62;
  background: #22372f;
}

body.dark-theme .attorney-mchd-step-chip.is-complete .attorney-mchd-step-chip-number {
  background: #28563b;
  color: #d1fae5;
}

body.dark-theme .attorney-mchd-preview-card {
  border-color: #42516a;
  background: #243246;
}

body.dark-theme .dscheck-provider-nav {
  border-color: #42516a;
  background: linear-gradient(180deg, #243246 0%, #1f2b3f 100%);
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.24);
}

body.dark-theme .dscheck-provider-nav-title {
  color: #9fb5d4;
  border-bottom-color: #42516a;
}

body.dark-theme .dscheck-sidebar-card,
body.dark-theme .dscheck-work-card,
body.dark-theme .dscheck-result-card {
  border-color: #42516a;
  background: linear-gradient(180deg, #243246 0%, #1f2b3f 100%);
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.24);
}

body.dark-theme .dscheck-work-card .attorney-mchd-preview-header,
body.dark-theme .dscheck-result-card .attorney-mchd-preview-header,
body.dark-theme .dscheck-sidebar-card .attorney-mchd-preview-header {
  color: #e6edf5;
}

body.dark-theme .dscheck-work-card .attorney-mchd-step-caption,
body.dark-theme .dscheck-result-card .attorney-mchd-step-caption {
  color: #b8c9de;
}

body.dark-theme .dscheck-checkbox-field .attorney-mchd-checkbox {
  border-color: #42516a;
  background: #223249;
}

body.dark-theme .dscheck-checkbox-field .attorney-mchd-checkbox span:last-child {
  color: #e6edf5;
}

body.dark-theme .dscheck-section-label {
  color: #9fb5d4;
}

body.dark-theme .dscheck-file-field {
  border-color: #42516a;
  background: linear-gradient(180deg, #243246 0%, #223249 100%);
}

body.dark-theme .dscheck-file-label,
body.dark-theme .dscheck-result-section-title,
body.dark-theme .dscheck-result-value {
  color: #e6edf5;
}

body.dark-theme .dscheck-file-description,
body.dark-theme .dscheck-result-label {
  color: #b8c9de;
}

body.dark-theme .dscheck-actions {
  border-top-color: #42516a;
}

body.dark-theme .dscheck-result-section {
  border-color: #42516a;
  background: #223249;
}

body.dark-theme .dscheck-bool-badge.is-true {
  color: #8ce0ae;
  background: rgba(24, 86, 49, 0.35);
  box-shadow: inset 0 0 0 1px rgba(122, 219, 160, 0.28);
}

body.dark-theme .dscheck-bool-badge.is-false {
  color: #ffb3bb;
  background: rgba(120, 28, 41, 0.32);
  box-shadow: inset 0 0 0 1px rgba(255, 168, 178, 0.26);
}

body.dark-theme .dscheck-service-status.is-ready,
body.dark-theme .dscheck-result-summary.is-ready {
  border-color: #4b6f62;
  background: #22372f;
}

body.dark-theme .dscheck-service-status.is-error,
body.dark-theme .dscheck-result-summary.is-error {
  border-color: #7f4a54;
  background: #39252a;
}

body.dark-theme .protocol-deposit-section {
  border-color: #3d4e67;
  background: #243246;
}

body.dark-theme .protocol-deposit-entry {
  border-color: #445772;
  background: #1f2c40;
}

body.dark-theme .protocol-deposit-remove-btn {
  border-color: #4a5f7c;
  background: #2a3a52;
  color: #d6dfef;
}

body.dark-theme .protocol-deposit-remove-btn:hover {
  background: #334865;
}

body.dark-theme .protocol-modal-grid .field .certificate-format-select {
  background-image:
    linear-gradient(45deg, transparent 50%, #9fb5d4 50%),
    linear-gradient(135deg, #9fb5d4 50%, transparent 50%);
}

body.dark-theme .protocols-subtitle {
  color: #cbd5e6;
}

body.dark-theme .reports-export-empty,
body.dark-theme .reports-export-preview-meta,
body.dark-theme .reports-export-preview-summary,
body.dark-theme .reports-export-preview-empty {
  color: #cbd5e6;
}

body.dark-theme .reports-export-list,
body.dark-theme .reports-export-preview,
body.dark-theme .reports-export-month-group,
body.dark-theme .reports-export-item,
body.dark-theme .reports-export-table-wrap {
  border-color: #42516a;
  background: #1f2b3f;
}

body.dark-theme .deals-calendar-list-wrap,
body.dark-theme .deals-calendar-day-cell,
body.dark-theme .deals-calendar-event {
  border-color: #42516a;
  background: #1f2b3f;
}

body.dark-theme .electronic-mortgage-note {
  border-color: #42516a;
  background: #1f2b3f;
  color: #cbd5e6;
}

body.dark-theme .electronic-mortgage-actions-shell {
  border-color: #42516a;
  background: linear-gradient(180deg, #223249 0%, #1f2b3f 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 16px 28px rgba(0, 0, 0, 0.18);
}

body.dark-theme .electronic-mortgage-actions-title {
  color: #9fb5d4;
}

body.dark-theme .electronic-mortgage-header-copy p {
  color: #9fb3cf;
}

body.dark-theme .deals-calendar-weekdays span,
body.dark-theme .deals-calendar-month-meta,
body.dark-theme .deals-calendar-pagination-info,
body.dark-theme .deals-calendar-empty,
body.dark-theme .deals-calendar-placeholder,
body.dark-theme .deals-calendar-event-meta {
  color: #cbd5e6;
}

body.dark-theme .deals-calendar-month-label,
body.dark-theme .deals-calendar-event-client {
  color: #e6edf5;
}

body.dark-theme .deals-calendar-day-cell {
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.18);
}

body.dark-theme .deals-calendar-day-cell.is-outside-month {
  background: #182334;
  border-color: #33455e;
}

body.dark-theme .deals-calendar-day-number {
  background: rgba(37, 99, 235, 0.2);
  color: #93c5fd;
}

body.dark-theme .deals-calendar-day-cell.is-outside-month .deals-calendar-day-number,
body.dark-theme .deals-calendar-day-count {
  background: rgba(148, 163, 184, 0.16);
  color: #d6dfef;
}

body.dark-theme .deals-calendar-event-time {
  background: rgba(37, 99, 235, 0.18);
  color: #93c5fd;
}

body.dark-theme .deals-calendar-event-flag {
  background: rgba(37, 99, 235, 0.16);
  color: #bfdbfe;
}

body.dark-theme .deals-calendar-event.is-marked {
  background: linear-gradient(180deg, #1f3252 0%, #1a2b45 100%);
}

body.dark-theme .deals-calendar-event.is-complete {
  background: linear-gradient(180deg, #1d3930 0%, #183128 100%);
}

body.dark-theme .deals-calendar-event.is-in-progress {
  border-left-color: #3b82f6;
}

body.dark-theme .deals-calendar-event.is-completed {
  border-left-color: #10b981;
}

body.dark-theme .deals-calendar-event.is-cancelled {
  border-left-color: #ef4444;
}

body.dark-theme .deals-calendar-event.is-default {
  border-left-color: #94a3b8;
}

body.dark-theme .deals-calendar-event-check {
  border-color: #42516a;
  background: rgba(31, 43, 63, 0.92);
  color: #d6dfef;
}

body.dark-theme .reports-export-item:hover {
  background: #2a3d59;
  border-color: #5e7fa8;
}

body.dark-theme .reports-export-item.is-active {
  background: #324a6b;
  border-color: #7da8d9;
}

body.dark-theme .reports-export-menu {
  border-color: #42516a;
  background: #1f2b3f;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.36);
}

body.dark-theme .reports-export-menu-item,
body.dark-theme .reports-export-risk-item {
  background: #263349;
  color: #e6edf5;
}

body.dark-theme .reports-export-menu-item:hover,
body.dark-theme .reports-export-risk-item:hover {
  background: #314760;
  border-color: #5e7fa8;
}

body.dark-theme .reports-export-risk-options {
  border-top-color: #42516a;
}

body.dark-theme .reports-export-year-title,
body.dark-theme .reports-export-month-title,
body.dark-theme .reports-export-item-title,
body.dark-theme .reports-export-preview h3 {
  color: #e6edf5;
}

body.dark-theme .reports-export-item-meta {
  color: #a6b9d6;
}

body.dark-theme .reports-export-table th,
body.dark-theme .reports-export-table td {
  border-color: #42516a;
}

body.dark-theme .reports-export-table thead th {
  background: #30435e;
  color: #e6edf5;
}

body.dark-theme .reports-export-table tbody tr:nth-child(even) td {
  background: #223149;
}

.knowledge-base-card {
  width: 100%;
  max-width: 1240px;
}

.knowledge-guide-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid #cfe0fb;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  color: #1d4f91;
  font-size: 0.84rem;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.12);
}

.knowledge-guide-subtitle {
  max-width: 920px;
}

.knowledge-guide-shell {
  display: grid;
  grid-template-columns: minmax(210px, 240px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  margin-top: 12px;
}

.knowledge-guide-nav {
  display: grid;
  gap: 10px;
  position: sticky;
  top: 16px;
  padding: 14px;
  border: 1px solid #dbe4f1;
  border-radius: 22px;
  background: linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
}

.knowledge-guide-nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 56px;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: linear-gradient(135deg, #334155, #0f172a);
  color: #ffffff;
  font-size: 0.91rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    filter 0.18s ease,
    background 0.18s ease;
}

.knowledge-guide-nav-link:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.16);
}

.knowledge-guide-nav-link.is-active {
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  box-shadow: 0 16px 28px rgba(37, 99, 235, 0.24);
}

.knowledge-guide-workspace {
  min-width: 0;
  display: grid;
  gap: 18px;
}

.knowledge-guide-section {
  display: grid;
  gap: 16px;
  padding: 20px;
  border: 1px solid #dbe4f1;
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.07);
}

.knowledge-guide-hero {
  background:
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.12), transparent 32%),
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.knowledge-guide-kicker {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #53719a;
}

.knowledge-guide-section-head {
  display: grid;
  gap: 6px;
}

.knowledge-guide-section-head h3,
.knowledge-guide-hero h3 {
  margin: 0;
  font-size: 1.34rem;
  color: #173051;
}

.knowledge-guide-section-head p,
.knowledge-guide-lead,
.knowledge-guide-step-card p,
.knowledge-guide-feature-card p,
.knowledge-guide-note-card p,
.knowledge-guide-tip-card p {
  margin: 0;
  color: #4f6685;
  line-height: 1.6;
}

.knowledge-guide-quickstart {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.knowledge-guide-step-card,
.knowledge-guide-feature-card,
.knowledge-guide-note-card,
.knowledge-guide-tip-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid #dbe4f1;
  border-radius: 18px;
  background: #f8fbff;
}

.knowledge-guide-step-card h4,
.knowledge-guide-feature-card h4,
.knowledge-guide-note-card h4,
.knowledge-guide-tip-card h4 {
  margin: 0;
  font-size: 1rem;
  color: #173051;
}

.knowledge-guide-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.2);
}

.knowledge-guide-feature-grid,
.knowledge-guide-tip-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.knowledge-guide-feature-grid--triple {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.knowledge-guide-two-column {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.knowledge-guide-callout {
  padding: 16px 18px;
  border: 1px solid #cfe0fb;
  border-radius: 18px;
  background: linear-gradient(180deg, #eff6ff 0%, #f8fbff 100%);
  color: #20436d;
  line-height: 1.6;
}

.knowledge-guide-callout--soft {
  border-color: #dbe4f1;
  background: linear-gradient(180deg, #f8fbff 0%, #f3f7fd 100%);
  color: #4f6685;
}

.knowledge-guide-list {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 8px;
  color: #4f6685;
  line-height: 1.55;
}

.knowledge-guide-list--ordered {
  padding-left: 24px;
}

.knowledge-guide-faq {
  display: grid;
  gap: 12px;
}

.knowledge-guide-faq-item {
  border: 1px solid #dbe4f1;
  border-radius: 18px;
  padding: 0 18px;
  background: #f8fbff;
}

.knowledge-guide-faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 0;
  font-weight: 700;
  color: #173051;
}

.knowledge-guide-faq-item summary::-webkit-details-marker {
  display: none;
}

.knowledge-guide-faq-item p {
  margin: 0 0 16px;
  color: #4f6685;
  line-height: 1.6;
}

.knowledge-guide-scroll-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 16px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #0f766e, #14b8a6);
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(15, 118, 110, 0.28);
  z-index: 1180;
  transition:
    transform 0.18s ease,
    filter 0.18s ease,
    box-shadow 0.18s ease;
}

.knowledge-guide-scroll-top:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
  box-shadow: 0 16px 28px rgba(15, 118, 110, 0.34);
}

.knowledge-guide-scroll-top:active {
  transform: translateY(0);
}

body.dark-theme .knowledge-guide-status {
  border-color: #365072;
  background: linear-gradient(135deg, #243b5a, #1f2b3f);
  color: #dbeafe;
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.2);
}

body.dark-theme .knowledge-guide-nav,
body.dark-theme .knowledge-guide-section {
  border-color: #42516a;
  background: linear-gradient(180deg, #243246 0%, #1f2b3f 100%);
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.24);
}

body.dark-theme .knowledge-guide-hero {
  background:
    radial-gradient(circle at top right, rgba(14, 165, 233, 0.18), transparent 32%),
    linear-gradient(180deg, #243246 0%, #1f2b3f 100%);
}

body.dark-theme .knowledge-guide-nav-link {
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.18);
}

body.dark-theme .knowledge-guide-nav-link.is-active {
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  box-shadow: 0 16px 28px rgba(15, 54, 127, 0.34);
}

body.dark-theme .knowledge-guide-kicker {
  color: #9fb5d4;
}

body.dark-theme .knowledge-guide-section-head h3,
body.dark-theme .knowledge-guide-hero h3,
body.dark-theme .knowledge-guide-step-card h4,
body.dark-theme .knowledge-guide-feature-card h4,
body.dark-theme .knowledge-guide-note-card h4,
body.dark-theme .knowledge-guide-tip-card h4,
body.dark-theme .knowledge-guide-faq-item summary {
  color: #e6edf5;
}

body.dark-theme .knowledge-guide-section-head p,
body.dark-theme .knowledge-guide-lead,
body.dark-theme .knowledge-guide-step-card p,
body.dark-theme .knowledge-guide-feature-card p,
body.dark-theme .knowledge-guide-note-card p,
body.dark-theme .knowledge-guide-tip-card p,
body.dark-theme .knowledge-guide-faq-item p,
body.dark-theme .knowledge-guide-list,
body.dark-theme .knowledge-guide-callout--soft {
  color: #b8c9de;
}

body.dark-theme .knowledge-guide-step-card,
body.dark-theme .knowledge-guide-feature-card,
body.dark-theme .knowledge-guide-note-card,
body.dark-theme .knowledge-guide-tip-card,
body.dark-theme .knowledge-guide-faq-item {
  border-color: #42516a;
  background: #223249;
}

body.dark-theme .knowledge-guide-callout {
  border-color: #365072;
  background: linear-gradient(180deg, #23344c 0%, #203147 100%);
  color: #dbeafe;
}

body.dark-theme .knowledge-guide-scroll-top {
  background: linear-gradient(135deg, #0f766e, #0ea5a4);
  color: #f8fafc;
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.24);
}

.metrics-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.metrics-header h2 {
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 0;
}

body.dark-theme .file-signing-plugin-menu {
  border-color: #334155;
  background: #17212f;
  box-shadow: 0 14px 30px rgba(2, 8, 23, 0.34);
}

body.dark-theme .file-signing-plugin-menu-item {
  background: #17212f;
  color: #e2ebf6;
}

body.dark-theme .file-signing-plugin-menu-item:hover {
  background: #223149;
  border-color: #3b526d;
  color: #f4f8fd;
}

.metrics-admin-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.metrics-admin-btn {
  padding: 9px 12px;
  font-size: 0.82rem;
  border-radius: 10px;
}

.metrics-admin-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  filter: none;
}

.metrics-admin-message {
  margin: 0 0 12px;
  min-height: 18px;
}

.metrics-table-wrap {
  border: 1px solid #dbe2ed;
  border-radius: 16px;
  width: 100%;
  max-width: 100%;
  overflow: auto;
  max-height: 72vh;
  background: #ffffff;
}

body.dark-theme .metrics-table-wrap {
  border-color: #42516a;
  background: #1f2b3f;
}

.metrics-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
  line-height: 1.35;
}

.metrics-table th,
.metrics-table td {
  border: 1px solid #dbe2ed;
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
  white-space: pre-line;
}

.metrics-table thead th {
  background: #ecf2fc;
  color: #173051;
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 2;
}

.metrics-table tbody tr:nth-child(even) td {
  background: #f9fbff;
}

.metrics-table tbody tr:hover td {
  background: #eef5ff;
}

.metrics-table .category-row td {
  background: #dbeafe !important;
  font-weight: 700;
  color: #0f2d53;
}

.metrics-table .metrics-row-selected td {
  background: #dbeafe !important;
}

.metrics-table.edit-mode td.editable-cell,
.metrics-table.edit-mode .category-label.editable-cell {
  background: #f0f7ff;
  outline: 1px dashed #93c5fd;
  outline-offset: -1px;
}

.metrics-table.edit-mode thead th.editable-header {
  background: #dbeafe;
  cursor: pointer;
}

.metrics-table.edit-mode .category-toggle-btn {
  cursor: default;
}

.category-toggle-btn {
  width: 100%;
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  text-align: left;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 0;
}

.category-toggle-btn:focus-visible {
  outline: 2px solid #2b6ed3;
  outline-offset: 2px;
  border-radius: 6px;
}

.category-caret {
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 7px solid #1f3a5c;
  transform: rotate(90deg);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.category-toggle-btn[aria-expanded="false"] .category-caret {
  transform: rotate(0deg);
}

body.dark-theme .metrics-table th,
body.dark-theme .metrics-table td {
  border-color: #42516a;
}

body.dark-theme .metrics-table thead th {
  background: #30435e;
  color: #e6edf5;
}

body.dark-theme .metrics-table tbody tr:nth-child(even) td {
  background: #223149;
}

body.dark-theme .metrics-table tbody tr:hover td {
  background: #2c3f5b;
}

body.dark-theme .metrics-table .category-row td {
  background: #365072 !important;
  color: #eff6ff;
}

body.dark-theme .metrics-table .metrics-row-selected td {
  background: #365072 !important;
}

body.dark-theme .metrics-table.edit-mode td.editable-cell,
body.dark-theme .metrics-table.edit-mode .category-label.editable-cell {
  background: #2a3e5c;
  outline-color: #5e7fa8;
}

body.dark-theme .metrics-table.edit-mode thead th.editable-header {
  background: #3a5577;
}

body.dark-theme .category-caret {
  border-left-color: #e6edf5;
}

.metrics-table thead th[data-col-index] {
  position: sticky;
}

.col-resizer {
  position: absolute;
  top: 0;
  right: -5px;
  width: 10px;
  height: 100%;
  cursor: col-resize;
  z-index: 5;
}

.col-resizer::before {
  content: "";
  position: absolute;
  right: 4px;
  top: 20%;
  bottom: 20%;
  width: 2px;
  background: rgba(30, 43, 60, 0.25);
  border-radius: 2px;
}

body.dark-theme .col-resizer::before {
  background: rgba(230, 237, 245, 0.3);
}

.metrics-table thead th[data-col-index]:hover .col-resizer::before {
  background: #2b6ed3;
}

.metrics-table.is-col-resizing,
.metrics-table.is-row-resizing {
  user-select: none;
}

.row-resize-anchor {
  position: relative;
}

.row-resizer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 8px;
  cursor: row-resize;
  z-index: 3;
}

.row-resizer::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 3px;
  height: 1px;
  background: rgba(15, 23, 42, 0.25);
  opacity: 0;
}

.metrics-table tbody tr:hover .row-resizer::before {
  opacity: 1;
}

body.dark-theme .row-resizer::before {
  background: rgba(230, 237, 245, 0.35);
}

.welcome-section {
  margin-bottom: 40px;
}

.welcome-title {
  font-size: 2.2rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: #2b6ed3;
}

.welcome-message {
  font-size: 1.3rem;
  margin-bottom: 16px;
}

.site-description {
  margin-top: 30px;
}

.site-description h2 {
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.site-description p {
  font-size: 1.2rem;
  color: #547197;
  max-width: 800px;
}

body.dark-theme .site-description p {
  color: #b6c7e0;
}

.hidden {
  display: none !important;
}

@media (max-width: 980px) {
  .top-navbar {
    height: auto;
    padding: 12px 16px;
    gap: 12px;
    flex-wrap: wrap;
  }

  .nav-right {
    width: 100%;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 12px;
  }

  .top-nav-text-btn {
    width: 100%;
  }

  .main-layout {
    flex-direction: column;
  }

  .left-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid #dbe2ed;
  }

  .left-sidebar.collapsed {
    width: 100%;
    margin-left: 0;
    padding: 12px 10px;
  }

  body.dark-theme .left-sidebar {
    border-bottom-color: #354153;
  }

  .content-area {
    padding: 20px 16px;
  }

  .content-card {
    padding: 24px 18px;
  }

  .metrics-header {
    align-items: stretch;
  }

  .metrics-admin-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .protocols-shell {
    grid-template-columns: 1fr;
  }

  .protocols-side-nav {
    position: static;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }

  .attorney-builder-shell {
    grid-template-columns: 1fr;
  }

  .attorney-mode-nav {
    position: static;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }

  .knowledge-guide-shell {
    grid-template-columns: 1fr;
  }

  .knowledge-guide-nav {
    position: static;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }

  .knowledge-guide-quickstart,
  .knowledge-guide-feature-grid--triple,
  .knowledge-guide-two-column {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .knowledge-guide-scroll-top {
    right: 18px;
    bottom: 18px;
  }

  .protocol-action-btn {
    min-height: 58px;
    font-size: 0.78rem;
    line-height: 1.2;
    padding: 8px 10px;
  }

  .protocol-actions--picker {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .protocol-actions--protocols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .protocol-actions--grace {
    grid-template-columns: 1fr;
  }

  .protocol-actions--certificates {
    grid-template-columns: 1fr;
  }

  .protocol-actions--single {
    grid-template-columns: 1fr;
  }

  .protocol-modal-dialog {
    width: min(100%, 760px);
  }

  .protocol-deposit-entry-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reports-export-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .reports-export-menu {
    left: 0;
    right: auto;
    width: min(100%, 360px);
    max-width: calc(100vw - 44px);
  }

  .reports-export-layout {
    grid-template-columns: 1fr;
  }

  .deals-calendar-toolbar,
  .deals-calendar-filter-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .deals-calendar-filter-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .deals-calendar-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .deals-calendar-weekdays {
    display: none;
  }

  .deals-calendar-month-nav {
    width: 100%;
    justify-content: space-between;
  }

  .deals-calendar-toolbar-btn {
    min-width: 0;
  }

  .deals-calendar-more-toggle {
    width: 100%;
  }

  .deals-calendar-more-menu {
    right: 0;
    left: auto;
    width: min(92vw, 230px);
  }

  .reports-export-list {
    max-height: 320px;
  }

  .reports-export-table {
    min-width: 980px;
  }
}

@media (max-width: 680px) {
  .deals-calendar-grid {
    grid-template-columns: 1fr;
  }

  .deals-calendar-day-cell {
    min-height: 140px;
  }

  .deals-calendar-day-cell:not(.has-deals) {
    min-height: 70px;
  }
}

@media (max-width: 480px) {
  .auth-card {
    padding: 22px 18px;
    border-radius: 16px;
  }

  .user-badge {
    width: 100%;
  }

  .welcome-title {
    font-size: 1.8rem;
  }

  .site-description p {
    font-size: 1rem;
  }

  .reports-export-list {
    padding: 10px;
  }

  .reports-export-item-title {
    font-size: 0.86rem;
  }

  .reports-export-item-meta {
    font-size: 0.78rem;
  }

  .reports-export-menu {
    width: calc(100vw - 34px);
    max-width: calc(100vw - 34px);
  }

  .protocol-action-btn {
    min-height: 54px;
    font-size: 0.72rem;
    line-height: 1.15;
    padding: 8px 8px;
  }

  .knowledge-guide-nav {
    grid-template-columns: 1fr;
  }

  .knowledge-guide-quickstart,
  .knowledge-guide-feature-grid,
  .knowledge-guide-feature-grid--triple,
  .knowledge-guide-two-column,
  .knowledge-guide-tip-grid {
    grid-template-columns: 1fr;
  }

  .knowledge-guide-section,
  .knowledge-guide-step-card,
  .knowledge-guide-feature-card,
  .knowledge-guide-note-card,
  .knowledge-guide-tip-card {
    padding: 14px;
  }

  .knowledge-guide-scroll-top {
    right: 14px;
    bottom: 14px;
    min-height: 42px;
    padding: 0 14px;
    font-size: 0.85rem;
  }

  .protocols-side-nav {
    grid-template-columns: 1fr;
  }

  .attorney-mode-nav {
    grid-template-columns: 1fr;
  }

  .protocols-group-panel,
  .protocols-types-card,
  .protocols-empty-state {
    padding: 14px;
  }

  .protocol-actions--picker,
  .protocol-actions--protocols,
  .protocol-actions--grace,
  .protocol-actions--certificates,
  .protocol-actions--single {
    grid-template-columns: 1fr;
  }

  .protocol-modal {
    padding: 12px;
  }

  .protocol-modal-dialog {
    max-height: calc(100vh - 24px);
    padding: 14px 12px;
  }

  .protocol-modal-grid {
    grid-template-columns: 1fr;
  }

  .protocol-deposit-section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .protocol-deposit-entry-grid {
    grid-template-columns: 1fr;
  }

  .attorney-mode-actions,
  .attorney-trusted-grid {
    grid-template-columns: 1fr;
  }

  .attorney-mchd-stepper {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .attorney-mchd-shell {
    grid-template-columns: 1fr;
  }

  .dscheck-shell {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .dscheck-provider-nav {
    width: 100%;
    position: static;
    padding: 12px;
  }

  .dscheck-sidebar {
    position: static;
  }

  .attorney-mchd-sidebar {
    position: static;
  }

  .attorney-mchd-signing-layout {
    grid-template-columns: 1fr;
  }

  .file-signing-layout {
    grid-template-columns: 1fr;
  }

  .dscheck-layout {
    grid-template-columns: 1fr;
  }

  .dscheck-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .dscheck-result-row {
    grid-template-columns: 1fr;
  }

  .attorney-mchd-preview-grid {
    grid-template-columns: 1fr;
  }

  .attorney-inline-action {
    grid-template-columns: 1fr;
  }

  .protocol-modal-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }
}

body.report-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 10%, #dbeafe 0%, transparent 35%),
    radial-gradient(circle at 90% 86%, #e2e8f0 0%, transparent 32%),
    linear-gradient(160deg, #f8fbff 0%, #eef4ff 100%);
  color: #1e2b3c;
}

.report-shell {
  min-height: 100vh;
  padding: 36px 18px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.report-card {
  width: min(100%, 980px);
  background: #ffffff;
  border: 1px solid #d9e0eb;
  border-radius: 22px;
  box-shadow: 0 16px 42px rgba(12, 30, 66, 0.12);
  padding: 28px;
}

.report-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.report-header h1 {
  font-size: clamp(1.45rem, 2.6vw, 1.95rem);
  margin-bottom: 6px;
}

.report-kicker {
  font-size: 0.78rem;
  color: #2b6ed3;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 8px;
}

.report-subtitle {
  color: #4f6685;
  font-size: 0.95rem;
}

.report-back-link {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
}

.report-form {
  display: grid;
  gap: 16px;
}

.report-block {
  border: 1px solid #d9e0eb;
  border-radius: 14px;
  background: #f8fbff;
  padding: 16px;
  display: grid;
  gap: 14px;
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.report-grid-metrics {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) minmax(210px, 250px);
  grid-template-areas:
    "metric-number metric-name metric-value"
    "metric-number metric-category metric-risk";
  column-gap: 12px;
  row-gap: 10px;
  align-items: start;
}

.report-note-field {
  grid-column: 1 / -1;
}

.report-metrics-list {
  display: grid;
  gap: 30px;
}

.report-metric-item {
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  background: #ffffff;
  padding: 14px;
  display: grid;
  gap: 12px;
}

.report-grid-metrics .field {
  min-width: 0;
}

.report-metric-row-number {
  grid-area: metric-number;
  align-self: start;
  justify-self: center;
  margin-top: 30px;
  margin-bottom: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #26476f;
}

.report-field-metric-name {
  grid-area: metric-name;
}

.report-field-category {
  grid-area: metric-category;
  max-width: none;
}

.report-field-risk-type {
  grid-area: metric-risk;
  max-width: none;
}

.report-field-value {
  grid-area: metric-value;
  max-width: none;
}

.report-field-value span {
  white-space: nowrap;
}

.report-field-category span,
.report-field-risk-type span {
  font-size: 0.79rem;
  color: #4f6685;
  white-space: nowrap;
}

.report-field-value input {
  text-align: left;
}

.report-metric-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
  margin-left: 32px;
  font-size: 0.9rem;
}

.report-metric-status-label {
  font-weight: 600;
  color: #26476f;
}

.report-metric-status-control {
  width: auto;
  min-width: 250px;
  max-width: 360px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  color: #334155;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 8px 10px;
  outline: none;
}

.report-metric-status-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.15);
}

.report-metric-status-value {
  font-weight: 600;
  color: #334155;
}

.report-metric-status-value.status-required,
.report-metric-status-control.status-required {
  color: #15803d;
}

.report-metric-status-value.status-acceptable,
.report-metric-status-control.status-acceptable {
  color: #0369a1;
}

.report-metric-status-value.status-critical,
.report-metric-status-control.status-critical {
  color: #b45309;
}

.report-metric-status-value.status-catastrophic,
.report-metric-status-control.status-catastrophic {
  color: #b91c1c;
}

.report-metric-status-value.status-warning,
.report-metric-status-control.status-warning {
  color: #b45309;
  font-weight: 500;
}

.report-metric-status-value.status-neutral,
.report-metric-status-value.status-empty,
.report-metric-status-control.status-neutral,
.report-metric-status-control.status-empty {
  color: #64748b;
  font-weight: 500;
}

.report-field-category .report-metric-static-input,
.report-field-risk-type .report-metric-static-input {
  min-height: 40px;
  font-size: 0.84rem;
}

.report-form textarea.report-metric-static-input {
  resize: none;
  min-height: 44px;
  line-height: 1.25;
  font-size: 0.86rem;
  white-space: pre-wrap;
  word-break: break-word;
  overflow: hidden;
  background: #f4f8ff;
  color: #2b3d57;
  cursor: default;
}

.report-form select,
.report-form input,
.report-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  color: var(--text-main);
  font-size: 1rem;
  padding: 11px 12px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
}

.report-form textarea {
  resize: vertical;
  min-height: 80px;
}

.report-form input[readonly] {
  background: #f4f8ff;
  color: #2b3d57;
}

.report-form select:focus,
.report-form input:focus,
.report-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.15);
}

.report-toggle-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 500;
  color: #1f3a5c;
  cursor: pointer;
  margin-top: 8px;
  margin-left: 32px;
}

.report-toggle-row-secondary {
  margin-top: 4px;
}

.report-toggle-row input[type="checkbox"] {
  margin-top: 4px;
  width: 16px;
  height: 16px;
}

.report-proposal-field {
  margin-top: -2px;
  margin-left: 32px;
}

.report-note-extra-field {
  margin-top: -2px;
  margin-left: 32px;
}

.report-alert {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #173051;
  font-size: 0.92rem;
}

.report-submit {
  justify-self: start;
}

.report-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  filter: grayscale(0.25);
}

.report-scroll-top {
  position: fixed;
  right: 22px;
  bottom: 24px;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #0ea5e9, #38bdf8);
  color: #ffffff;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(2, 132, 199, 0.35);
  z-index: 1180;
  transition: transform 0.18s ease, filter 0.2s ease;
}

.report-scroll-top:hover {
  filter: brightness(0.97);
  transform: translateY(-1px);
}

.report-scroll-top:active {
  transform: translateY(0);
}

.report-side-toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1200;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 28px));
}

.report-side-toast {
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.18);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 12px 12px 14px;
  transform: translateX(112%);
  opacity: 0;
  transition: transform 0.24s ease, opacity 0.24s ease;
}

.report-side-toast.show {
  transform: translateX(0);
  opacity: 1;
}

.report-side-toast.success {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.report-side-toast.error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.report-side-toast-text {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.35;
  flex: 1;
}

.report-side-toast-close {
  border: none;
  background: transparent;
  color: currentColor;
  font-size: 1rem;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 6px;
  cursor: pointer;
}

.report-side-toast-close:hover {
  background: rgba(15, 23, 42, 0.08);
}

.report-restricted {
  border: 1px solid #fecaca;
  border-radius: 14px;
  background: #fef2f2;
  padding: 16px;
}

.report-restricted h2 {
  font-size: 1.2rem;
  margin-bottom: 8px;
  color: #991b1b;
}

.report-restricted p {
  color: #7f1d1d;
}

@media (max-width: 820px) {
  .report-header {
    flex-direction: column;
    align-items: stretch;
  }

  .report-back-link {
    width: fit-content;
  }

  .report-grid {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 640px) {
  .report-metric-row-number {
    margin-top: 24px;
    justify-self: start;
  }

  .report-grid-metrics {
    grid-template-columns: 24px minmax(0, 1fr);
    grid-template-areas:
      "metric-number metric-name"
      "metric-number metric-value"
      "metric-number metric-category"
      "metric-number metric-risk";
    row-gap: 8px;
    column-gap: 10px;
  }

  .report-grid-metrics .field span {
    font-size: 0.78rem;
  }

  .report-metric-status {
    margin-left: 24px;
    font-size: 0.85rem;
    gap: 6px;
  }

  .report-metric-status-control {
    min-width: 0;
    width: 100%;
    max-width: none;
  }

  .report-toggle-row {
    margin-top: 10px;
    margin-left: 24px;
  }

  .report-proposal-field {
    margin-left: 24px;
  }

  .report-note-extra-field {
    margin-left: 24px;
  }
}

@media (max-width: 480px) {
  .report-shell {
    padding: 20px 12px;
  }

  .report-card {
    padding: 18px 14px;
    border-radius: 16px;
  }

  .report-side-toast-container {
    top: 12px;
    right: 12px;
    width: calc(100vw - 24px);
  }

  .report-scroll-top {
    right: 14px;
    bottom: 14px;
    width: 42px;
    height: 42px;
  }
}

body.not-found-mode {
  min-height: 100vh;
  color: var(--text-main);
  background:
    radial-gradient(circle at 12% 12%, rgba(56, 189, 248, 0.22) 0%, transparent 30%),
    radial-gradient(circle at 88% 88%, rgba(59, 130, 246, 0.2) 0%, transparent 26%),
    linear-gradient(145deg, #eef6ff 0%, #dbeafe 48%, #f8fbff 100%);
}

.not-found-app {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.not-found-card {
  width: min(100%, 1120px);
  padding: 28px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.78);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(10px);
}

.not-found-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.not-found-brand-logo {
  width: 64px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: left center;
  border-radius: 16px;
  display: block;
  flex-shrink: 0;
}

.not-found-brand-text {
  display: grid;
  gap: 4px;
}

.not-found-brand-name {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
}

.not-found-layout {
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
  gap: 28px;
  align-items: center;
}

.not-found-copy {
  display: grid;
  gap: 16px;
}

.not-found-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(14, 165, 233, 0.12);
  color: #0369a1;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.not-found-copy h1 {
  font-size: clamp(2.35rem, 5vw, 4.2rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.not-found-lead,
.not-found-hint {
  color: var(--text-muted);
  line-height: 1.6;
}

.not-found-path-card {
  display: grid;
  gap: 10px;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(241, 245, 249, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.not-found-path-card span {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

.not-found-path-card code {
  width: 100%;
  overflow-wrap: anywhere;
  font-size: 0.98rem;
  color: #0f172a;
  background: #ffffff;
  border: 1px solid rgba(203, 213, 225, 0.9);
  border-radius: 12px;
  padding: 10px 12px;
}

.not-found-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 6px;
}

.not-found-action-link,
.not-found-back-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
}

.not-found-visual-shell {
  position: relative;
  overflow: hidden;
  min-height: 520px;
  display: grid;
  place-items: center;
  padding: 18px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 18% 22%, rgba(14, 165, 233, 0.14) 0%, transparent 28%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.03), rgba(15, 23, 42, 0.08));
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.not-found-visual-gif,
.not-found-visual {
  position: absolute;
  inset: 18px;
  width: min(100%, 560px);
  width: calc(100% - 36px);
  height: calc(100% - 36px);
  border: none;
  border-radius: 18px;
}

.not-found-visual-gif {
  z-index: 2;
  object-fit: contain;
  transition: opacity 0.25s ease;
}

.not-found-visual {
  z-index: 1;
}

.not-found-visual-shell.is-svg-running .not-found-visual-gif {
  opacity: 0;
  pointer-events: none;
}

.not-found-visual-fallback {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 920px) {
  .not-found-layout {
    grid-template-columns: 1fr;
  }

  .not-found-card {
    padding: 24px;
  }

  .not-found-visual-shell {
    min-height: 0;
    order: -1;
  }

  .not-found-visual {
    inset: 12px;
    width: calc(100% - 24px);
    height: calc(100% - 24px);
  }
}

@media (max-width: 560px) {
  .not-found-app {
    padding: 16px;
  }

  .not-found-card {
    padding: 18px;
    border-radius: 22px;
  }

  .not-found-brand {
    align-items: flex-start;
  }

  .not-found-actions {
    flex-direction: column;
  }

  .not-found-action-link,
  .not-found-back-button {
    width: 100%;
  }

  .not-found-visual-shell {
    padding: 12px;
  }
}
