:root {
  --bg: #f7fbff;
  --surface: #ffffff;
  --surface-strong: #eef5ff;
  --text: #132745;
  --muted: #637997;
  --line: #d7e4f5;
  --accent: #2d6fae;
  --accent-soft: #dfeeff;
  --ok: #0b6e4f;
  --warn: #8f6b06;
  --danger: #a11d33;
  --shadow: 0 14px 32px rgba(25, 61, 108, 0.09);
  --shadow-strong: 0 18px 38px rgba(25, 61, 108, 0.16);
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  margin: 0;
  min-height: 100%;
  padding: 0;
  font-family: 'IBM Plex Sans', sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 12% -5%, #d9ecff 0%, transparent 40%),
    radial-gradient(circle at 86% 12%, #d4f2e7 0%, transparent 42%),
    radial-gradient(circle at 65% 100%, #ffe8da 0%, transparent 38%),
    var(--bg);
}

body {
  min-height: 100vh;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: 'Space Grotesk', sans-serif;
}

.bg-shape {
  position: fixed;
  z-index: 0;
  filter: blur(38px);
  opacity: 0.36;
  animation: floatBlob 14s ease-in-out infinite;
}

.bg-shape-1 {
  width: 300px;
  height: 300px;
  top: -80px;
  left: -40px;
  border-radius: 50%;
  background: #a8d5ff;
}

.bg-shape-2 {
  width: 280px;
  height: 280px;
  right: -40px;
  bottom: -80px;
  border-radius: 50%;
  background: #b5e7c9;
  animation-delay: -6s;
}

.container {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100vw - 2rem));
  margin: 1.5rem auto;
}

.card {
  background: color-mix(in oklab, var(--surface) 90%, #f8fbff);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(4px);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.card:hover {
  border-color: #c9dcf4;
  box-shadow: var(--shadow-strong);
}

.auth-card {
  width: min(480px, 100%);
  padding: 1.5rem;
  margin: 6vh auto;
}

.auth-register-switch {
  margin-top: 0.6rem;
  margin-bottom: 0.45rem;
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.install-card {
  width: 100%;
  margin-top: 48px;
  padding: 20px 22px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #ffffff;
  color: #334155;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  display: grid;
  gap: 16px;
}

.install-card h3 {
  margin: 0 0 8px;
  color: #0f172a;
  font-size: 16px;
  line-height: 1.3;
  font-weight: 700;
}

.install-card p {
  margin: 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.5;
}

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

.auth-branding {
  display: grid;
  justify-items: center;
  gap: 0.55rem;
}

.auth-brand-logo {
  width: 240px;
  height: 240px;
  border-radius: 12px;
  object-fit: cover;
  border: none;
  background: transparent;
  box-shadow: none;
}

.login-page {
  width: 100%;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #ffffff;
  color: #334155;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
  font-family: 'Inter', sans-serif;
}

.login-brand-panel {
  min-height: 100vh;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 48px;
  background-color: #1e3a8a;
  background-image: repeating-linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.05) 0px,
    rgba(255, 255, 255, 0.05) 1px,
    transparent 1px,
    transparent 10px
  );
  color: #fff;
}

.login-brand-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top right, #1e3a8a, transparent, rgba(79, 100, 184, 0.4));
  pointer-events: none;
}

.login-brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.login-brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #fff;
  color: #1e3a8a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
}

.login-brand-logo span {
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.login-brand-content {
  max-width: 448px;
  position: relative;
  z-index: 1;
}

.login-brand-content h1 {
  margin: 0;
  color: #fff;
  font-size: 30px;
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.login-brand-content p {
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.70);
  line-height: 1.65;
}

.login-brand-footer {
  position: relative;
  z-index: 1;
  margin: 0;
  color: rgba(255, 255, 255, 0.52);
  font-size: 12px;
}

.login-main {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  background: #ffffff;
}

body,
.login-page,
.login-main {
  background: #ffffff !important;
}

html:has(#auth-view:not(.hidden)),
body:has(#auth-view:not(.hidden)) {
  background: #ffffff !important;
  background-image: none !important;
}

body:has(#auth-view:not(.hidden)) .container,
#auth-view.login-page,
#auth-view .login-main {
  background: #ffffff !important;
  background-image: none !important;
}

body:has(#auth-view:not(.hidden)) .container {
  width: 100% !important;
  max-width: none !important;
  min-height: 100vh !important;
  margin: 0 !important;
  padding: 0 !important;
}

body:has(#auth-view:not(.hidden)) .bg-shape,
#auth-view.login-page::before,
#auth-view.login-page::after,
#auth-view .login-main::before,
#auth-view .login-main::after {
  display: none !important;
  background: none !important;
  background-image: none !important;
  content: none !important;
}

.login-card {
  width: 100%;
  max-width: 384px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  animation: loginFadeIn .5s ease both;
}

@keyframes loginFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.login-form-head {
  display: flex;
  align-items: center;
  flex-direction: column;
  align-items: center;
  margin-bottom: 32px;
  text-align: center;
}

.login-logo-slot {
  width: 80px;
  height: 80px;
  margin-bottom: 16px;
  border: 1.5px dashed currentColor;
  border-radius: 18px;
  color: #1e3a8a;
  opacity: 0.85;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  position: relative;
  overflow: hidden;
}

.login-logo-slot .auth-brand-logo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
  background: #fff;
  z-index: 1;
}

.login-logo-letter {
  font-size: 24px;
  line-height: 1;
  font-weight: 600;
}

.login-logo-label {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.login-form-head h2 {
  margin: 0;
  color: #1e3a8a;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.login-form-head p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 14px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.login-field label,
.login-password-label label {
  display: block;
  margin-bottom: 6px;
  color: #334155;
  font-size: 14px;
  font-weight: 500;
}

.login-password-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.login-password-label .login-forgot-link,
#open-forgot-form.login-forgot-link {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
  color: #1e3a8a;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  text-underline-offset: 3px;
  transition: color .18s ease, text-decoration-color .18s ease, box-shadow .18s ease;
}

.login-password-label .login-forgot-link:hover,
#open-forgot-form.login-forgot-link:hover {
  color: #172f73;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  transform: none;
  filter: none;
  background: transparent;
  box-shadow: none;
}

.login-password-label .login-forgot-link:focus-visible,
#open-forgot-form.login-forgot-link:focus-visible,
.login-support a:focus-visible {
  outline: none;
  border-radius: 6px;
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.16);
}

.login-input-wrap {
  position: relative;
}

.login-input-wrap > i,
.login-input-wrap > svg {
  position: absolute;
  left: 12px;
  top: 50%;
  width: 16px;
  height: 16px;
  color: #94a3b8;
  transform: translateY(-50%);
  pointer-events: none;
}

.login-input-wrap input {
  width: 100%;
  height: 42px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  color: #1e293b;
  font-size: 14px;
  padding: 0 44px 0 40px;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.login-input-wrap input::placeholder {
  color: #94a3b8;
}

.login-input-wrap input:focus {
  border-color: rgba(30,58,138,0.40);
  box-shadow: 0 0 0 3px rgba(30,58,138,0.15);
}

#auth-view #otp-field input,
#auth-view #forgot-form input[name="otp"],
#auth-view #setup-otp {
  width: 100%;
  min-height: 42px;
  height: 42px;
  box-sizing: border-box;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  color: #1e293b;
  font-size: 16px;
  line-height: 1.2;
  padding: 0 18px;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

#auth-view #otp-field input:focus,
#auth-view #forgot-form input[name="otp"]:focus,
#auth-view #setup-otp:focus {
  border-color: rgba(30,58,138,0.40);
  box-shadow: 0 0 0 3px rgba(30,58,138,0.15);
}

.login-password-toggle,
#togglePwd {
  position: absolute;
  right: 10px;
  top: 50%;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #94a3b8;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  box-shadow: none;
  transition:
    color .18s ease,
    background-color .18s ease;
}

.login-password-toggle:hover,
#togglePwd:hover {
  background: #f8fafc;
  color: #1e3a8a;
}

.login-password-toggle:focus-visible,
#togglePwd:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.12);
}

.login-password-toggle svg,
#togglePwd svg,
.login-password-toggle i,
#togglePwd i {
  width: 16px;
  height: 16px;
  stroke-width: 1.5;
}

.login-remember {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #475569;
  font-size: 14px;
  cursor: pointer;
  user-select: none;
}

.login-remember input {
  width: 16px;
  height: 16px;
  accent-color: #1e3a8a;
}

.login-submit-btn {
  width: 100%;
  min-height: 44px;
  border: none;
  border-radius: 12px;
  background: #1e3a8a;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(30, 58, 138, 0.18);
  transition:
    background-color .18s ease,
    box-shadow .18s ease,
    transform .18s ease;
}

.login-submit-btn:hover {
  background: #172f73;
  box-shadow: 0 8px 20px rgba(30, 58, 138, 0.22);
}

.login-submit-btn:active {
  transform: translateY(1px);
}

.login-submit-btn:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(30, 58, 138, 0.18),
    0 6px 16px rgba(30, 58, 138, 0.18);
}

.login-submit-btn svg {
  width: 16px;
  height: 16px;
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
}

.login-divider span {
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}

.login-divider small {
  color: #94a3b8;
  font-size: 12px;
}

.login-create-btn {
  width: 100%;
  min-height: 44px;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  background: #ffffff;
  color: #1e3a8a;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition:
    background-color .18s ease,
    border-color .18s ease,
    color .18s ease,
    box-shadow .18s ease,
    transform .18s ease;
}

.login-create-btn:hover {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1e3a8a;
  box-shadow: 0 4px 12px rgba(30, 58, 138, 0.08);
}

.login-create-btn:active {
  transform: translateY(1px);
}

.login-create-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.16);
}

.login-create-btn svg,
.login-create-btn i {
  width: 17px;
  height: 17px;
  stroke-width: 2;
}

.login-support {
  margin: 32px 0 0;
  color: #94a3b8;
  font-size: 12px;
  text-align: center;
}

.login-support a {
  color: #1e3a8a;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  text-underline-offset: 3px;
  transition: color .18s ease, text-decoration-color .18s ease;
}

.login-support a:hover {
  color: #172f73;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
}

#auth-install-card .install-card-body h3 {
  margin: 0 0 8px;
}

#auth-install-card .install-card-body p,
#auth-install-message {
  margin: 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.5;
}

#auth-install-card .install-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 0;
}

#auth-install-btn,
#auth-install-card .install-card-actions button:first-of-type {
  min-height: 42px;
  padding: 0 18px;
  border: none;
  border-radius: 12px;
  background: #1e3a8a;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(30, 58, 138, 0.18);
  cursor: pointer;
}

#auth-install-btn:hover,
#auth-install-card .install-card-actions button:first-of-type:hover {
  background: #172f73;
}

#auth-install-dismiss,
#auth-install-card .install-card-actions button:last-of-type {
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
  color: #1e3a8a;
  font-size: 14px;
  font-weight: 700;
  box-shadow: none;
  cursor: pointer;
}

#auth-install-dismiss:hover,
#auth-install-card .install-card-actions button:last-of-type:hover {
  background: #f8fafc;
  border-color: #bfdbfe;
}

.login-secondary-link {
  width: 100%;
  margin-top: 2px;
  color: #1e3a8a;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-underline-offset: 3px;
}

.login-secondary-link:hover {
  color: #172f73;
  text-decoration: underline;
}

.login-secondary-link:focus-visible {
  outline: none;
  border-radius: 8px;
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.16);
}

.auth-recovery-card,
.auth-register-card {
  width: 100%;
  max-width: 384px;
}

#register-form > h3,
#forgot-form > h3 {
  display: none;
}

#register-form > label,
#forgot-form > label {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#register-form input,
#register-form select {
  width: 100%;
  min-height: 42px;
  height: 42px;
  box-sizing: border-box;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  color: #1e293b;
  font-size: 16px;
  line-height: 1.2;
  padding: 0 18px;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}

#register-form select {
  padding-right: 52px;
}

#register-form select[name="adpmFunction"] {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 14px 14px;
}

#register-form input:focus,
#register-form select:focus {
  border-color: rgba(30,58,138,0.40);
  box-shadow: 0 0 0 3px rgba(30,58,138,0.15);
}

#register-form .login-input-wrap input,
#register-form .password-input-wrap input {
  padding: 0 44px 0 40px;
}

#register-form > label > span,
#forgot-form > label > span {
  color: #334155;
  font-size: 14px;
  font-weight: 500;
}

#register-form > p.muted,
#forgot-form > p.muted {
  margin: -6px 0 2px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.5;
}

@media (max-width: 1024px) {
  .login-page {
    grid-template-columns: 1fr;
  }

  .login-brand-panel {
    display: none;
  }

  .login-main {
    min-height: 100vh;
    padding: 48px 24px;
  }
}

@media (max-width: 480px) {
  .login-main {
    padding: 40px 20px;
  }

  .login-card {
    max-width: 100%;
  }

  .login-form-head {
    margin-bottom: 28px;
  }

  .login-logo-slot {
    width: 72px;
    height: 72px;
    border-radius: 18px;
  }

  .login-form-head h2 {
    font-size: 21px;
  }

  .install-card {
    margin-top: 36px;
    padding: 18px;
    border-radius: 14px;
  }

  .install-card-actions {
    flex-direction: column;
  }

  .install-card button {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 768px) {
  #auth-view input,
  #auth-view select,
  #auth-view textarea,
  #auth-view .login-input-wrap input,
  #auth-view #otp-field input,
  #auth-view #forgot-form input[name="otp"],
  #auth-view #setup-otp {
    font-size: 16px !important;
  }

  #auth-view #otp-field input,
  #auth-view #forgot-form input[name="otp"],
  #auth-view #setup-otp {
    min-height: 52px !important;
    height: 52px !important;
    padding: 0 14px !important;
    border-radius: 12px !important;
    font-weight: 600 !important;
    letter-spacing: 0.28em !important;
    text-align: center !important;
    font-variant-numeric: tabular-nums !important;
  }

  #auth-view #otp-field span,
  #auth-view #forgot-form label > span,
  #auth-view #setup-2fa label > span {
    display: block;
    margin-bottom: 6px;
  }
}

#auth-app-title {
  text-align: center;
}

.app-shell {
  display: grid;
  gap: 1rem;
}

.topbar,
.tabs,
.view {
  padding: 1rem;
}

.tabs {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.mobile-nav-toggle {
  display: none;
  min-width: 42px;
  min-height: 42px;
  padding: 0;
  align-items: center;
  justify-content: center;
}

.mobile-nav-toggle-lines {
  display: inline-grid;
  gap: 0.22rem;
}

.mobile-nav-toggle-lines span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: #416488;
}

.mobile-nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 8998;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(3px);
}

.mobile-nav-overlay.hidden {
  display: none !important;
}

.mobile-nav-drawer {
  display: none;
}

.mobile-nav-drawer.hidden {
  display: none !important;
}

.mobile-nav-head,
.mobile-nav-list,
.mobile-nav-item,
.mobile-nav-close {
  display: none;
}

body.mobile-nav-open {
  overflow: hidden;
}

.tabs button {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #f9fcff 0%, var(--surface-strong) 100%);
  color: var(--text);
}

.tabs button.active {
  border-color: var(--accent);
  background: linear-gradient(180deg, #edf5ff 0%, var(--accent-soft) 100%);
  color: var(--accent);
  font-weight: 600;
  box-shadow: 0 8px 18px rgba(45, 111, 174, 0.18);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 120;
}

.topbar-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.topbar-identity {
  display: grid;
  justify-items: center;
  gap: 0.35rem;
}

.header-branding {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.header-brand-logo {
  width: 88px;
  height: 88px;
  border-radius: 10px;
  object-fit: cover;
  border: none;
  background: transparent;
  box-shadow: none;
}

.user-header-line {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.user-header-line p {
  margin: 0;
  text-align: center;
}

.user-menu-wrap {
  position: relative;
  z-index: 180;
}

.user-avatar-btn {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid #c8d9f1;
  padding: 0;
  display: grid;
  place-items: center;
  background: #fff;
  box-shadow: 0 6px 14px rgba(45, 111, 174, 0.16);
  overflow: visible;
}

.user-avatar-btn:hover {
  transform: translateY(-1px);
}

.header-user-avatar {
  width: 100%;
  border-radius: 999px;
  object-fit: cover;
  background: #eef4fb;
}

.header-avatar-stack {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
}

.header-user-org-logo {
  position: absolute;
  width: 16px;
  height: 16px;
  right: -2px;
  bottom: -2px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff;
  background: #f4f8ff;
  box-shadow: 0 4px 9px rgba(19, 39, 69, 0.22);
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 0.45rem);
  left: 0;
  min-width: 175px;
  padding: 0.35rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 14px 24px rgba(19, 39, 69, 0.16);
  z-index: 260;
}

.user-dropdown-item {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 0.52rem 0.65rem;
  margin: 0;
  text-align: left;
  color: var(--text);
  background: transparent;
  box-shadow: none;
}

.user-dropdown-item:hover:not(:disabled) {
  background: #edf5ff;
  border-color: #d2e3f8;
  transform: none;
  box-shadow: none;
  filter: none;
}

.user-dropdown-item:active:not(:disabled) {
  transform: none;
}

.user-dropdown-item.disabled,
.user-dropdown-item:disabled {
  color: #9baec5;
  cursor: not-allowed;
}

.mail-indicator {
  position: relative;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff 0%, #f2f8ff 100%);
  color: var(--text);
  width: 40px;
  height: 34px;
  border-radius: 10px;
  padding: 0;
  display: grid;
  place-items: center;
}

.install-indicator {
  color: #1e3a8a;
}

.mail-indicator:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(19, 39, 69, 0.15);
}

.mail-indicator:focus {
  outline: none;
}

.mail-indicator:focus-visible {
  box-shadow:
    0 0 0 3px rgba(30, 58, 138, 0.14),
    0 8px 16px rgba(19, 39, 69, 0.15);
}

.header-search-form {
  display: flex;
  align-items: center;
  position: relative;
}

.header-search-form input {
  width: min(360px, 45vw);
  min-width: 220px;
  background: #fff;
  padding-left: 2.2rem;
}

.search-icon {
  position: absolute;
  left: 0.72rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.92rem;
  color: #5c7598;
  pointer-events: none;
}

.mail-icon {
  font-size: 1rem;
  line-height: 1;
}

.mail-badge {
  position: absolute;
  top: -9px;
  right: -8px;
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  padding: 0 0.3rem;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  background: #b31d3a;
  border: 2px solid #fff;
  animation: badgePulse 1.8s ease-in-out infinite;
}

.stack {
  display: grid;
  gap: 0.7rem;
}

label {
  display: grid;
  gap: 0.35rem;
}

label span {
  color: var(--muted);
  font-size: 0.9rem;
}

.password-input-wrap {
  position: relative;
  display: block;
}

.password-input-wrap input {
  width: 100%;
  padding-right: 3rem;
}

.password-toggle-btn {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  min-width: 30px;
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #94a3b8;
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: inherit;
  font-weight: inherit;
}

.password-toggle-btn:hover {
  transform: translateY(-50%);
  background: #f8fafc;
  color: #1e3a8a;
}

.password-toggle-btn[aria-pressed="true"] {
  background: transparent;
  color: #1e3a8a;
}

input,
textarea,
select,
button {
  font: inherit;
  border-radius: 12px;
  border: 1px solid var(--line);
  padding: 0.65rem 0.75rem;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease, background-color 140ms ease;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #9fc3ea;
  box-shadow: 0 0 0 3px rgba(45, 111, 174, 0.14);
}

textarea {
  min-height: 110px;
  resize: vertical;
}

button {
  border-color: transparent;
  background: linear-gradient(180deg, #3b86c8 0%, var(--accent) 100%);
  color: #fff;
  cursor: pointer;
}

button:hover {
  filter: brightness(1.03);
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 12px 22px rgba(45, 111, 174, 0.28);
}

button:active {
  transform: translateY(0) scale(0.99);
}

button.ghost {
  background: linear-gradient(180deg, #ffffff 0%, #f4f9ff 100%);
  border-color: var(--line);
  color: var(--text);
  box-shadow: 0 4px 10px rgba(19, 39, 69, 0.08);
}

button.ghost:hover {
  background: #ecf4ff;
  box-shadow: 0 8px 16px rgba(19, 39, 69, 0.13);
}

.checkbox-row {
  align-items: center;
  grid-template-columns: auto 1fr;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

#view-agenda.view:not(.active) {
  display: none !important;
}

#view-agenda.view.active {
  display: flex;
}

.list {
  display: grid;
  gap: 0.7rem;
}

.list-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.7rem;
  background: #fff;
  box-shadow: 0 8px 16px rgba(19, 39, 69, 0.05);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
  animation: riseIn 260ms ease both;
}

.list-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 24px rgba(19, 39, 69, 0.12);
  border-color: #c7daf1;
}

.news-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

.news-page-copy h1 {
  margin: 0;
  color: #1e3a8a;
  font-family: 'Inter', sans-serif;
  font-size: 1.55rem;
  font-weight: 600;
  line-height: 1.15;
}

.news-page-copy p {
  margin: 0.35rem 0 0;
  color: #64748b;
  font-size: 0.92rem;
}

#view-agenda.agenda-page {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}

#view-agenda.agenda-page.active {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

#view-agenda .agenda-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

#view-agenda .agenda-title-block {
  min-width: 0;
}

#view-agenda .agenda-title {
  margin: 0;
  color: #1e3a8a;
  font-size: 1.5rem;
  line-height: 2rem;
  font-weight: 500;
}

#view-agenda .agenda-subtitle {
  margin: 0.25rem 0 0;
  color: #64748b;
  font-size: 0.875rem;
}

#events-list,
.agenda-events-list {
  margin-top: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: visible;
}

.agenda-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: start;
}

#agenda-calendar-card {
  display: grid;
  width: 100%;
  max-width: none;
}

#view-agenda .agenda-section {
  display: grid;
  gap: 12px;
}

#view-agenda .agenda-section-title {
  margin: 0;
  color: #1e3a8a;
  font-size: 1rem;
  line-height: 1.5rem;
  font-weight: 600;
}

#view-agenda .agenda-mobile-helper {
  display: none;
  margin: -2px 0 2px;
  color: #64748b;
  font-size: 0.8125rem;
  line-height: 1.45;
}

#view-agenda .agenda-events-panel {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

#view-agenda .agenda-events-panel-header {
  background: #1e3a8a;
  color: #fff;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 16px;
  font-weight: 500;
}

#view-agenda .agenda-events-panel-icon {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

#view-agenda .agenda-events-panel-icon svg {
  width: 16px;
  height: 16px;
}

#view-agenda .agenda-events-panel-body {
  padding: 20px;
  display: grid;
  gap: 20px;
  width: 100%;
}

#agenda-calendar-card {
  max-width: none;
  width: 100%;
}

#view-agenda .agenda-calendar-body,
#view-agenda .agenda-events-panel-body {
  padding: 20px;
}

#view-agenda .agenda-calendar-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

#view-agenda .agenda-calendar-month {
  color: #1e3a8a;
  font-size: 1rem;
  font-weight: 500;
  text-transform: capitalize;
}

#view-agenda .agenda-calendar-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

#view-agenda .agenda-calendar-nav-btn {
  width: 1.9rem;
  height: 1.9rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #94a3b8;
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
}

#view-agenda .agenda-calendar-nav-btn:hover {
  background: #f8fafc;
  color: #1e3a8a;
}

#view-agenda .agenda-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.35rem 0.2rem;
  text-align: center;
  width: 100%;
}

#view-agenda .agenda-calendar-weekday {
  color: #94a3b8;
  font-size: 0.78rem;
  font-weight: 500;
}

#view-agenda .agenda-calendar-empty {
  height: 2rem;
}

#view-agenda .agenda-calendar-day {
  position: relative;
  width: 32px;
  height: 32px;
  min-height: 32px;
  margin: 0 auto;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #475569;
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 500;
  border: 1px solid transparent;
}

#view-agenda .agenda-calendar-day:hover {
  background: #f8fafc;
  color: #1e3a8a;
}

#view-agenda .agenda-calendar-day.has-event,
#view-agenda .agenda-day.has-event,
#view-agenda .calendar-day.has-event,
#view-agenda .agenda-calendar-day.active:not(.today) {
  background: #1e3a8a;
  color: #fff;
  border-radius: 999px;
  font-weight: 600;
}

#view-agenda .agenda-calendar-day.has-event:hover,
#view-agenda .agenda-day.has-event:hover,
#view-agenda .calendar-day.has-event:hover,
#view-agenda .agenda-calendar-day.active:not(.today):hover {
  background: #1e3a8a;
  color: #fff;
}

#view-agenda .agenda-calendar-day.today {
  background: transparent;
  color: #1e3a8a;
  border-color: #1e3a8a;
}

#view-agenda .agenda-calendar-day.today::after {
  content: '';
  position: absolute;
  bottom: 0.18rem;
  left: 50%;
  width: 0.22rem;
  height: 0.22rem;
  margin-left: -0.11rem;
  border-radius: 999px;
  background: #1e3a8a;
}

#view-agenda .agenda-calendar-events-list {
  display: grid;
  gap: 0.5rem;
}

#view-agenda .agenda-calendar-events-title {
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

#view-agenda .agenda-calendar-event {
  display: grid;
  grid-template-columns: 2.75rem minmax(0, 1fr);
  gap: 0.55rem;
  align-items: start;
  padding: 0.55rem 0.65rem;
  border-radius: 0.75rem;
  background: #f8fafc;
}

#view-agenda .agenda-calendar-event-time {
  color: #1e3a8a;
  font-size: 0.76rem;
  font-weight: 600;
}

#view-agenda .agenda-calendar-event-title {
  color: #334155;
  font-size: 0.78rem;
}

#view-agenda .agenda-event-row {
  box-sizing: border-box;
  position: relative;
  background: transparent;
  border: 1px solid #e2e8f0;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
  transform: none;
  height: auto;
  min-height: 72px;
  margin: 0;
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

#view-agenda .agenda-event-row + .agenda-event-row {
  margin-top: 0;
}

#view-agenda .agenda-event-row:hover {
  background: #f8fafc;
  border-color: #e2e8f0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  transform: none;
  padding: 14px 16px;
  margin: 0;
}

#view-agenda .agenda-event-date-badge {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: #dbeafe;
  color: #1e3a8a;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

#view-agenda .agenda-event-date-badge span {
  font-size: 21px;
  font-weight: 600;
  line-height: 1;
}

#view-agenda .agenda-event-date-badge small {
  margin-top: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

#view-agenda .agenda-event-content {
  display: grid;
  gap: 6px;
  min-width: 0;
}

#view-agenda .agenda-event-title {
  color: #0f172a;
  font-size: 0.94rem;
  line-height: 1.35;
  font-weight: 600;
  min-width: 0;
}

#view-agenda .agenda-event-description,
#view-agenda .agenda-event-meta {
  color: #64748b;
  font-size: 0.8rem;
  line-height: 1.4;
}

#view-agenda .agenda-event-description {
  min-width: 0;
}

#view-agenda .agenda-event-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

#view-agenda .agenda-event-actions {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
  white-space: nowrap;
}

#view-agenda .agenda-event-actions .ghost {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  min-height: auto;
  font-size: 0.8rem;
  font-weight: 500;
}

#view-agenda .agenda-event-actions .event-edit-btn {
  color: #475569;
}

#view-agenda .agenda-event-actions .event-delete-btn {
  color: #b91c1c;
}

#view-agenda .agenda-event-actions .ghost:hover {
  background: transparent;
  box-shadow: none;
  transform: none;
  text-decoration: underline;
  text-underline-offset: 0.14em;
}

#view-agenda .agenda-event-actions .event-edit-btn:hover {
  color: #334155;
}

#view-agenda .agenda-event-actions .event-delete-btn:hover {
  color: #991b1b;
}

@media (max-width: 760px) {
  #view-agenda .agenda-event-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  #view-agenda .agenda-event-actions {
    justify-content: flex-start;
  }
}

#view-agenda .agenda-event-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  overflow: hidden;
  padding: 0;
}

#view-agenda .agenda-event-card-header {
  background: #1e3a8a;
  color: #fff;
  padding: 14px 20px;
}

#view-agenda .agenda-event-card-header h4 {
  margin: 0;
  color: inherit;
  font-size: 16px;
  line-height: 1.4;
  font-weight: 500;
}

#view-agenda .agenda-event-card-body {
  padding: 20px;
  gap: 24px;
}

#view-agenda .agenda-create-header {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 16px !important;
  margin-bottom: 22px !important;
}

#view-agenda .agenda-create-header h2 {
  margin: 0 !important;
  color: #1e3a8a !important;
  font-size: 22px !important;
  line-height: 1.2 !important;
  font-weight: 800 !important;
  letter-spacing: -0.02em !important;
}

#view-agenda .agenda-create-header p {
  margin: 6px 0 0 !important;
  color: #64748b !important;
  font-size: 14px !important;
  line-height: 1.45 !important;
}

#view-agenda .agenda-create-close,
#view-agenda .agenda-secondary-btn,
#view-agenda button[data-agenda-close] {
  min-height: 44px !important;
  padding: 0 16px !important;
  border: 1px solid #dbe3ef !important;
  border-radius: 12px !important;
  background: #ffffff !important;
  background-image: none !important;
  color: #1e3a8a !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
  cursor: pointer !important;
}

#view-agenda .agenda-create-close:hover,
#view-agenda .agenda-secondary-btn:hover,
#view-agenda button[data-agenda-close]:hover {
  background: #f8fafc !important;
  border-color: #bfdbfe !important;
}

#view-agenda .agenda-create-panel,
#view-agenda .agenda-event-form-panel,
#view-agenda .agenda-collapse-content,
#view-agenda .agenda-form-card {
  margin-top: 18px !important;
  padding: 22px !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 18px !important;
  background: #ffffff !important;
  background-image: none !important;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06) !important;
}

#view-agenda .agenda-create-panel label,
#view-agenda .agenda-event-form-panel label,
#view-agenda .agenda-collapse-content label,
#view-agenda .agenda-form-card label {
  display: block !important;
  margin-bottom: 7px !important;
  color: #475569 !important;
  font-size: 14px !important;
  font-weight: 700 !important;
}

#view-agenda .agenda-create-panel input,
#view-agenda .agenda-create-panel textarea,
#view-agenda .agenda-create-panel select,
#view-agenda .agenda-event-form-panel input,
#view-agenda .agenda-event-form-panel textarea,
#view-agenda .agenda-event-form-panel select,
#view-agenda .agenda-collapse-content input,
#view-agenda .agenda-collapse-content textarea,
#view-agenda .agenda-collapse-content select,
#view-agenda .agenda-form-card input,
#view-agenda .agenda-form-card textarea,
#view-agenda .agenda-form-card select {
  width: 100% !important;
  min-height: 42px !important;
  border: 1px solid #dbe3ef !important;
  border-radius: 12px !important;
  background: #ffffff !important;
  background-image: none !important;
  color: #0f172a !important;
  font-size: 14px !important;
  padding: 10px 14px !important;
  outline: none !important;
  box-shadow: none !important;
}

#view-agenda .agenda-create-panel textarea,
#view-agenda .agenda-event-form-panel textarea,
#view-agenda .agenda-collapse-content textarea,
#view-agenda .agenda-form-card textarea {
  min-height: 110px !important;
  resize: vertical !important;
  line-height: 1.5 !important;
}

#view-agenda .agenda-create-panel input:focus,
#view-agenda .agenda-create-panel textarea:focus,
#view-agenda .agenda-create-panel select:focus,
#view-agenda .agenda-event-form-panel input:focus,
#view-agenda .agenda-event-form-panel textarea:focus,
#view-agenda .agenda-event-form-panel select:focus,
#view-agenda .agenda-collapse-content input:focus,
#view-agenda .agenda-collapse-content textarea:focus,
#view-agenda .agenda-collapse-content select:focus,
#view-agenda .agenda-form-card input:focus,
#view-agenda .agenda-form-card textarea:focus,
#view-agenda .agenda-form-card select:focus {
  border-color: rgba(30, 58, 138, 0.45) !important;
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.10) !important;
}

#view-agenda .agenda-editor-toolbar,
#view-agenda .agenda-format-toolbar,
#view-agenda .agenda-create-panel .editor-toolbar,
#view-agenda .agenda-collapse-content .editor-toolbar {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  margin: 8px 0 10px !important;
}

#view-agenda .agenda-editor-toolbar button,
#view-agenda .agenda-format-toolbar button,
#view-agenda .agenda-create-panel .editor-toolbar button,
#view-agenda .agenda-collapse-content .editor-toolbar button {
  min-height: 32px !important;
  padding: 0 11px !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 999px !important;
  background: #ffffff !important;
  background-image: none !important;
  color: #1e3a8a !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
  cursor: pointer !important;
}

#view-agenda .agenda-editor-toolbar button:hover,
#view-agenda .agenda-format-toolbar button:hover,
#view-agenda .agenda-create-panel .editor-toolbar button:hover,
#view-agenda .agenda-collapse-content .editor-toolbar button:hover {
  background: #eff6ff !important;
  border-color: #bfdbfe !important;
}

#view-agenda .agenda-form-actions {
  display: flex !important;
  justify-content: flex-end !important;
  align-items: center !important;
  gap: 10px !important;
  margin-top: 18px !important;
}

#view-agenda .agenda-submit-btn,
#view-agenda .agenda-primary-btn,
#view-agenda .agenda-create-submit,
#view-agenda button[data-agenda-submit],
#view-agenda .agenda-create-panel button[type="submit"],
#view-agenda .agenda-collapse-content button[type="submit"] {
  min-height: 44px !important;
  padding: 0 18px !important;
  border: none !important;
  border-radius: 12px !important;
  background: #1e3a8a !important;
  background-image: none !important;
  color: #ffffff !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  box-shadow: 0 6px 16px rgba(30, 58, 138, 0.16) !important;
  cursor: pointer !important;
}

#view-agenda .agenda-submit-btn:hover,
#view-agenda .agenda-primary-btn:hover,
#view-agenda .agenda-create-submit:hover,
#view-agenda button[data-agenda-submit]:hover,
#view-agenda .agenda-create-panel button[type="submit"]:hover,
#view-agenda .agenda-collapse-content button[type="submit"]:hover {
  background: #172f73 !important;
}

#view-agenda .agenda-calendar-day,
#view-agenda .calendar-day,
#view-agenda [data-agenda-date] {
  cursor: pointer !important;
  transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease !important;
}

#view-agenda .agenda-calendar-day:hover,
#view-agenda .calendar-day:hover,
#view-agenda [data-agenda-date]:hover {
  background: #eff6ff !important;
  border-color: #bfdbfe !important;
}

#view-agenda .agenda-calendar-day:focus-visible,
#view-agenda .calendar-day:focus-visible,
#view-agenda [data-agenda-date]:focus-visible {
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.14) !important;
}

#view-agenda .agenda-calendar-day.is-selected,
#view-agenda .calendar-day.is-selected,
#view-agenda [data-agenda-date].is-selected {
  background: #eff6ff !important;
  border-color: #1e3a8a !important;
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.12) !important;
}

#view-agenda .agenda-calendar-day.is-selected span,
#view-agenda .calendar-day.is-selected .day-number,
#view-agenda [data-agenda-date].is-selected .day-number,
#view-agenda [data-agenda-date].is-selected span {
  color: #1e3a8a !important;
  font-weight: 800 !important;
}

#view-agenda #toggle-event-form {
  display: none !important;
}

#view-agenda > #event-form {
  display: none !important;
}

body.agenda-event-sheet-open {
  overflow: hidden !important;
}

.event-form-overlay {
  position: fixed !important;
  inset: 0 !important;
  z-index: 9998 !important;
  background: rgba(15, 23, 42, 0.42) !important;
  backdrop-filter: blur(3px) !important;
}

.event-form-sheet {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  right: auto !important;
  bottom: auto !important;
  transform: translate(-50%, -50%) !important;
  z-index: 9999 !important;
  width: min(760px, calc(100vw - 48px)) !important;
  max-width: calc(100vw - 48px) !important;
  max-height: calc(100dvh - 96px) !important;
  background: #fff !important;
  border-radius: 24px !important;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.24) !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

.event-form-sheet.agenda-event-modal,
.agenda-event-modal {
  --agenda-modal-field-gap: 8px;
  --agenda-modal-group-gap: 18px;
  --agenda-modal-field-x: 16px;
}

.event-form-overlay.hidden,
.event-form-sheet.hidden {
  display: none !important;
}

.event-form-sheet-header {
  background: #1e3a8a !important;
  color: #fff !important;
  padding: 14px 16px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  flex-shrink: 0 !important;
}

.event-form-sheet-header h2 {
  margin: 0 !important;
  color: #fff !important;
  font-size: 17px !important;
  line-height: 1.25 !important;
  font-weight: 500 !important;
}

.event-form-sheet-close {
  width: 32px !important;
  height: 32px !important;
  border: none !important;
  border-radius: 999px !important;
  background: rgba(255,255,255,0.12) !important;
  color: #fff !important;
  font-size: 24px !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
}

.event-form-sheet-close:hover {
  background: rgba(255,255,255,0.22) !important;
}

.event-form-sheet-body {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
}

.event-form-sheet-body > #event-form {
  margin: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: #fff !important;
  padding: 24px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: var(--agenda-modal-group-gap, 18px) !important;
}

.event-form-sheet-body > #event-form .agenda-create-header {
  display: none !important;
}

.event-form-sheet-body > #event-form > label {
  display: flex !important;
  flex-direction: column !important;
  gap: var(--agenda-modal-field-gap, 8px) !important;
  margin: 0 !important;
}

.event-form-sheet-body > #event-form > label > span {
  display: block !important;
  margin: 0 !important;
}

.event-form-sheet-body > #event-form input,
.event-form-sheet-body > #event-form select,
.event-form-sheet-body > #event-form textarea {
  width: 100% !important;
  box-sizing: border-box !important;
  font: inherit !important;
}

.event-form-sheet-body > #event-form input:not([type="hidden"]) {
  min-height: 44px !important;
  padding: 10px var(--agenda-modal-field-x, 16px) !important;
}

.event-form-sheet-body > #event-form input[type="datetime-local"] {
  padding-left: var(--agenda-modal-field-x, 16px) !important;
  padding-right: 44px !important;
}

.event-form-sheet-body > #event-form textarea {
  padding: 12px var(--agenda-modal-field-x, 16px) !important;
  line-height: 1.5 !important;
  resize: vertical !important;
}

.agenda-event-modal #agenda-audience,
.event-form-sheet-body > #event-form select:not([multiple]) {
  min-height: 48px !important;
  padding: 0 52px 0 var(--agenda-modal-field-x, 16px) !important;
  background-color: #fff !important;
  color: #17233f !important;
  border: 1px solid #d5e2f3 !important;
  border-radius: 14px !important;
  font-size: 16px !important;
  line-height: normal !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 9l6 6 6-6' stroke='%231e293b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 18px center !important;
  background-size: 20px 20px !important;
}

.event-form-sheet-body > #event-form input::placeholder,
.event-form-sheet-body > #event-form textarea::placeholder {
  color: #94a3b8 !important;
}

.event-form-sheet-body > #event-form .agenda-form-actions {
  margin-top: 22px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  flex-wrap: wrap !important;
  padding-top: 20px !important;
  border-top: 1px solid #e2e8f0 !important;
  gap: 18px !important;
}

.event-form-sheet-body > #event-form .agenda-form-actions .agenda-secondary-btn,
.event-form-sheet-body > #event-form .agenda-form-actions button[type="submit"] {
  margin: 0 !important;
}

.event-form-sheet-body > #event-form .agenda-form-actions .agenda-secondary-btn {
  min-height: auto !important;
  padding: 8px 4px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #24449b !important;
  font: inherit !important;
  font-weight: 600 !important;
  cursor: pointer !important;
}

.event-form-sheet-body > #event-form .agenda-form-actions .agenda-secondary-btn:hover {
  background: transparent !important;
  border: 0 !important;
  color: #1f3c89 !important;
  text-decoration: none !important;
}

.event-form-sheet-body > #event-form .agenda-form-actions button[type="submit"] {
  min-height: 48px !important;
  padding: 0 22px !important;
  border: 0 !important;
  border-radius: 14px !important;
  background: #24449b !important;
  color: #fff !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  box-shadow: 0 10px 24px rgba(36, 68, 155, 0.16) !important;
  transition: background-color 0.18s ease, transform 0.18s ease !important;
}

.event-form-sheet-body > #event-form .agenda-form-actions button[type="submit"]:hover {
  background: #1f3c89 !important;
}

.event-form-sheet-body > #event-form .agenda-form-actions button[type="submit"]:active {
  transform: translateY(1px) !important;
}

@media (min-width: 768px) and (max-width: 1024px) {
  .event-form-sheet {
    width: min(720px, calc(100vw - 56px)) !important;
    max-width: calc(100vw - 56px) !important;
  }
}

@media (max-width: 768px) {
  .event-form-sheet {
    top: auto !important;
    left: 12px !important;
    right: 12px !important;
    bottom: 0 !important;
    transform: none !important;
    width: auto !important;
    max-width: calc(100vw - 24px) !important;
    max-height: calc(100dvh - 72px) !important;
    border-radius: 24px 24px 0 0 !important;
  }

  .event-form-sheet-header {
    padding: 13px 14px !important;
    gap: 10px !important;
  }

  .event-form-sheet-header h2 {
    font-size: 16px !important;
    line-height: 1.2 !important;
  }

  .event-form-sheet-close {
    width: 30px !important;
    height: 30px !important;
    font-size: 22px !important;
    flex-shrink: 0 !important;
  }

  .event-form-sheet-body {
    min-height: 0 !important;
    max-height: calc(100dvh - 132px) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
}

@media (max-width: 640px) {
  #view-agenda .agenda-mobile-helper {
    display: block !important;
  }

  #view-agenda .agenda-create-header {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  #view-agenda .agenda-form-actions {
    flex-direction: column-reverse !important;
    align-items: stretch !important;
  }

  #view-agenda .agenda-create-panel,
  #view-agenda .agenda-event-form-panel,
  #view-agenda .agenda-collapse-content,
  #view-agenda .agenda-form-card {
    padding: 16px !important;
  }

  #view-agenda .agenda-create-panel input,
  #view-agenda .agenda-create-panel textarea,
  #view-agenda .agenda-create-panel select,
  #view-agenda .agenda-event-form-panel input,
  #view-agenda .agenda-event-form-panel textarea,
  #view-agenda .agenda-event-form-panel select,
  #view-agenda .agenda-collapse-content input,
  #view-agenda .agenda-collapse-content textarea,
  #view-agenda .agenda-collapse-content select,
  #view-agenda .agenda-form-card input,
  #view-agenda .agenda-form-card textarea,
  #view-agenda .agenda-form-card select {
    font-size: 16px !important;
  }

  .event-form-sheet-body > #event-form {
    background: transparent !important;
    gap: 10px !important;
  }

  .event-form-sheet-body > #event-form.agenda-create-panel,
  .event-form-sheet-body > #event-form.agenda-collapse-content,
  .event-form-sheet-body > #event-form.agenda-form-card {
    padding: 12px 12px calc(12px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .event-form-sheet-body > #event-form .agenda-create-header {
    display: none !important;
  }

  .event-form-sheet-body > #event-form label {
    gap: 5px !important;
    font-size: 12.5px !important;
  }

  .event-form-sheet-body > #event-form input,
  .event-form-sheet-body > #event-form textarea,
  .event-form-sheet-body > #event-form select {
    min-height: 42px !important;
    padding: 10px var(--agenda-modal-field-x, 16px) !important;
    font-size: 16px !important;
    border-radius: 10px !important;
  }

  .event-form-sheet-body > #event-form textarea {
    min-height: 104px !important;
    line-height: 1.45 !important;
  }

  .event-form-sheet-body > #event-form input[type="datetime-local"] {
    min-height: 42px !important;
    padding-left: var(--agenda-modal-field-x, 16px) !important;
    padding-right: 44px !important;
    font-size: 15px !important;
  }

  .event-form-sheet-body > #event-form select[multiple] {
    min-height: 124px !important;
    max-height: 124px !important;
    padding-top: 8px !important;
    padding-bottom: 8px !important;
  }

  .event-form-sheet-body > #event-form .editor-toolbar {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    flex-wrap: nowrap !important;
    gap: 6px !important;
    margin: 6px 0 8px !important;
    padding-bottom: 2px !important;
    scrollbar-width: none !important;
  }

  .event-form-sheet-body > #event-form .editor-toolbar::-webkit-scrollbar {
    display: none !important;
  }

  .event-form-sheet-body > #event-form .editor-toolbar button {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
    min-height: 30px !important;
    padding: 0 10px !important;
    font-size: 12px !important;
  }

  .event-form-sheet-body > #event-form .agenda-form-actions {
    position: sticky !important;
    bottom: 0 !important;
    margin-top: 6px !important;
    padding-top: 16px !important;
    padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px)) !important;
    background: linear-gradient(to top, #fff 78%, rgba(255, 255, 255, 0.92) 100%) !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 14px !important;
    align-items: center !important;
    justify-content: flex-end !important;
    border-top: 1px solid #e2e8f0 !important;
  }

  .event-form-sheet-body > #event-form .agenda-form-actions .agenda-secondary-btn,
  .event-form-sheet-body > #event-form .agenda-form-actions button[type="submit"] {
    width: auto !important;
    justify-content: center !important;
    margin: 0 !important;
  }

  .event-form-sheet-body > #event-form .agenda-secondary-btn {
    min-height: auto !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    text-decoration: none !important;
  }

  .event-form-sheet-body > #event-form input[type="datetime-local"],
  .event-form-sheet-body > #event-form select,
  .event-form-sheet-body > #event-form textarea,
  .event-form-sheet-body > #event-form .editor-toolbar,
  .event-form-sheet-body > #event-form .agenda-form-actions {
    min-width: 0 !important;
    max-width: 100% !important;
  }
}

.news-page-date {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: #94a3b8;
  font-size: 0.78rem;
  white-space: nowrap;
  padding-right: 0.75rem;
}

.news-page-date svg {
  width: 0.95rem;
  height: 0.95rem;
}

.news-topic-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 1rem 0;
  align-items: center;
}

.news-topic-chip {
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #64748b;
  border-radius: 999px;
  min-height: 2rem;
  padding: 0.38rem 0.9rem;
  font-size: 0.75rem;
  line-height: 1;
  font-weight: 500;
  white-space: nowrap;
  box-shadow: none;
}

.news-topic-chip:hover {
  background: #fff;
  color: #1e3a8a;
  border-color: #cbd5e1;
  box-shadow: none;
  filter: none;
  transform: none;
}

.news-topic-chip.active {
  background: #4f64b8;
  border-color: #4f64b8;
  color: #fff;
  font-weight: 500;
}

.news-topic-chip.active:hover {
  background: #4f64b8;
  border-color: #4f64b8;
  color: #fff;
}

.news-layout {
  display: grid;
  gap: 24px;
}

.news-grid {
  margin-top: 0;
  display: block;
  columns: 2;
  column-gap: 24px;
}

.news-card {
  display: grid;
  gap: 0;
  overflow: hidden;
  grid-template-rows: auto 1fr;
  min-height: 100%;
  padding: 0;
}

.news-card.clickable {
  cursor: pointer;
}

.news-featured-wrap {
  display: grid;
}

.news-featured-card {
  grid-template-columns: minmax(420px, 50%) minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
  height: 320px;
  min-height: 320px;
  padding: 0;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  overflow: hidden;
}

.news-featured-media,
.news-card-media {
  position: relative;
  overflow: hidden;
}

.news-featured-media {
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  overflow: hidden;
}

.news-featured-media > a:first-child,
.news-featured-media > .news-preview-carousel,
.news-featured-media > .news-card-thumb.placeholder {
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: 0;
}

.news-featured-body {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  padding: 1.3rem 1.45rem 1.3rem 1.45rem;
  align-content: start;
}

.news-featured-header,
.news-featured-content {
  min-width: 0;
}

.news-featured-content {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.news-featured-card .news-card-body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.25rem;
}

.news-featured-card .news-featured-body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2.25rem;
}

.news-featured-media .news-card-thumb,
.news-featured-media img,
.news-featured-media .placeholder,
.news-featured-media .news-preview-carousel,
.news-featured-media .news-preview-slides,
.news-featured-media .news-preview-slide,
.news-featured-media .news-preview-slide .news-card-thumb {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  overflow: hidden;
}

.news-featured-media .news-card-thumb {
  border: 0;
  object-fit: cover;
  border-radius: 0;
  height: 100%;
}

.news-featured-media .news-preview-thumbs {
  display: none;
}

.news-featured-card h4 {
  margin: 0;
  color: #0f172a;
  font-size: 1.18rem;
  line-height: 1.32;
  font-weight: 600;
}

.news-featured-card .news-excerpt {
  margin: 0;
  -webkit-line-clamp: 3;
  color: #64748b;
  font-size: 0.88rem;
  line-height: 1.55;
}

.news-featured-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.news-category-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  background: rgba(30, 58, 138, 0.08);
  color: #1e3a8a;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
}

.news-featured-date {
  margin: 0;
  color: #94a3b8;
  font-size: 0.76rem;
}

.news-featured-support {
  display: grid;
  gap: 0.4rem;
}

.news-featured-support .news-source-line {
  margin: 0;
  color: #64748b;
  font-size: 0.78rem;
}

.news-featured-footer {
  margin-top: auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.2rem;
}

.news-featured-author-zone {
  min-width: 0;
  display: grid;
  gap: 0.6rem;
}

.news-featured-author {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}

.news-featured-author .inline-avatar {
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
}

.news-author-avatar {
  --news-avatar-size: 52px;
  width: var(--news-avatar-size) !important;
  height: var(--news-avatar-size) !important;
  min-width: var(--news-avatar-size) !important;
  min-height: var(--news-avatar-size) !important;
  max-width: var(--news-avatar-size) !important;
  max-height: var(--news-avatar-size) !important;
  flex: 0 0 var(--news-avatar-size) !important;
  aspect-ratio: 1 / 1 !important;
  border-radius: 50% !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
  object-fit: cover !important;
  display: block !important;
}

@media (max-width: 767px) {
  .news-author-avatar {
    --news-avatar-size: 48px;
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .news-author-avatar {
    --news-avatar-size: 52px;
  }
}

@media (min-width: 1025px) {
  .news-author-avatar {
    --news-avatar-size: 52px;
  }
}

.news-featured-author-copy {
  min-width: 0;
  display: grid;
}

.news-featured-author-name {
  color: #0f172a;
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.25;
}

.news-featured-card .news-featured-read,
.news-featured-card .news-read-btn.news-featured-read {
  min-width: fit-content;
  margin-left: auto;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #1e3a8a;
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  min-height: 0;
  appearance: none;
  -webkit-appearance: none;
  align-self: flex-end;
  white-space: nowrap;
}

.news-featured-card .news-featured-read:hover,
.news-featured-card .news-read-btn.news-featured-read:hover {
  background: transparent !important;
  color: #172554;
  text-decoration: underline;
  text-underline-offset: 0.14em;
}

.news-featured-read-mobile-label {
  display: none;
}

.news-featured-admin-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  opacity: 0.7;
}

.news-featured-admin-actions .ghost {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 500;
  box-shadow: none;
  min-height: 0;
  appearance: none;
  -webkit-appearance: none;
}

.news-featured-card .news-share-btn,
.news-featured-card .news-edit-btn {
  color: #64748b;
}

.news-featured-card .news-delete-btn {
  color: #b91c1c;
}

.news-featured-admin-actions .ghost:hover {
  background: transparent;
  border-color: transparent;
  color: #334155;
  box-shadow: none;
  border-radius: 0;
  text-decoration: underline;
  text-underline-offset: 0.14em;
}

.news-featured-card .news-delete-btn:hover {
  color: #991b1b;
  background: transparent;
  text-decoration: underline;
}

.news-featured-card .news-source-line,
.news-featured-card .news-card-support .meta {
  font-size: 0.74rem;
}

.news-featured-card .tags {
  display: none;
}

.news-card-media > a:first-child,
.news-card-media > .news-preview-carousel,
.news-card-media > .news-card-thumb.placeholder {
  overflow: hidden;
  border-radius: 0.9rem 0.9rem 0 0;
}

.news-card-media > a:first-child {
  display: block;
}

.news-card-thumb {
  display: block;
  width: 100%;
  height: 190px;
  border-radius: 0;
  object-fit: cover;
}

.news-card-thumb.placeholder {
  display: grid;
  place-items: center;
  text-align: center;
  padding: 0.6rem;
  background: linear-gradient(180deg, #f2f8ff 0%, #e5f0ff 100%);
  color: #2f5a87;
  font-size: 0.82rem;
  font-weight: 600;
}

.news-preview-carousel {
  display: grid;
  gap: 0.45rem;
}

.news-preview-slides {
  position: relative;
  min-height: 145px;
}

.news-preview-slide {
  display: none;
}

.news-preview-slide.active {
  display: block;
}

.news-preview-thumbs {
  display: flex;
  gap: 0.35rem;
  overflow-x: auto;
  padding: 1.5rem;
  padding-bottom: 0.5rem;
}

.news-preview-thumbs::-webkit-scrollbar {
  height: 6px;
}

.news-preview-thumb {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid transparent;
  background: #fff;
  box-shadow: 0 3px 8px rgba(19, 39, 69, 0.08);
}

.news-preview-thumb.active {
  border-color: #8fb7e2;
  box-shadow: 0 6px 14px rgba(45, 111, 174, 0.18);
}

.news-preview-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cotech-video-mini {
  border: 1px solid #cadef5;
  border-radius: 10px;
}

.news-card-body {
  display: grid;
  gap: 0.8rem;
  padding: 1.5rem 1.5rem 1.5rem;
  align-content: start;
}

.news-card-actions {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  align-items: center;
}

.news-card-actions .ghost {
  padding: 0;
  font-size: 0.8rem;
}

.news-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.news-card-date {
  margin: 0;
  font-size: 0.74rem;
}

.news-excerpt {
  margin: 0;
  color: #2e4769;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-footer {
  margin-top: auto;
  display: grid;
  gap: 0.8rem;
}

.news-card-support {
  display: grid;
  gap: 0.28rem;
}

.news-card-support .meta,
.news-card-support .author-line .meta {
  font-size: 0.76rem;
}

.news-card h4 {
  line-height: 1.3;
}

.news-grid .news-card h4 {
  font-size: 1rem;
}

.news-grid .news-excerpt {
  -webkit-line-clamp: 3;
  font-size: 0.84rem;
  line-height: 1.5;
}

.news-grid .tags {
  margin-top: 0.1rem;
}

.news-card:not(.news-featured-card) .news-read-btn,
.news-card:not(.news-featured-card) .news-share-btn,
.news-card:not(.news-featured-card) .news-edit-btn,
.news-card:not(.news-featured-card) .news-delete-btn {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  min-height: auto !important;
  font-size: 0.8rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.news-card:not(.news-featured-card) .news-read-btn {
  color: #1e3a8a;
}

.news-card:not(.news-featured-card) .news-share-btn,
.news-card:not(.news-featured-card) .news-edit-btn {
  color: #64748b;
}

.news-card:not(.news-featured-card) .news-delete-btn {
  color: #b91c1c;
}

.news-card:not(.news-featured-card) .news-read-btn:hover,
.news-card:not(.news-featured-card) .news-share-btn:hover,
.news-card:not(.news-featured-card) .news-edit-btn:hover,
.news-card:not(.news-featured-card) .news-delete-btn:hover {
  background: transparent !important;
  box-shadow: none !important;
  text-decoration: underline;
  text-underline-offset: 0.14em;
}

.news-card:not(.news-featured-card) .news-read-btn:hover {
  color: #172554;
}

.news-card:not(.news-featured-card) .news-share-btn:hover,
.news-card:not(.news-featured-card) .news-edit-btn:hover {
  color: #334155;
}

.news-card:not(.news-featured-card) .news-delete-btn:hover {
  color: #991b1b;
}

.news-card:not(.news-featured-card) {
  height: auto;
  min-height: auto;
  min-height: 0;
  grid-template-rows: auto auto;
  align-self: auto;
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  margin-bottom: 1.25rem;
  display: inline-block;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
}

.news-card:not(.news-featured-card) .news-card-body {
  display: flex;
  flex-direction: column;
  height: auto;
  min-height: 0;
  gap: 16px;
  justify-content: flex-start;
  align-content: normal;
  padding: 24px;
}

.news-card:not(.news-featured-card) .news-card-media,
.news-card:not(.news-featured-card) .news-card-thumb,
.news-card:not(.news-featured-card) .placeholder {
  height: 200px;
}

.news-card:not(.news-featured-card) .news-card-footer {
  margin-top: 0;
  gap: 0.65rem;
}

.news-grid .news-card-actions {
  justify-content: flex-start;
}

.news-top-actions {
  display: flex;
  align-items: flex-end;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.news-source-filter {
  margin: 0;
  min-width: 220px;
  display: grid;
  gap: 0.2rem;
}

.news-source-filter span {
  font-size: 0.78rem;
}

.news-source-filter select {
  min-height: 36px;
  padding: 0.45rem 0.65rem;
}

@media (min-width: 768px) and (max-width: 1024px) {
  #view-news #toggle-news-form {
    display: none !important;
  }
}

@media (min-width: 1025px) {
  #view-news > .row-between {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    align-items: start;
    gap: 0.9rem 28px;
  }

  #view-news > .row-between > h3 {
    grid-column: 1 / -1;
    margin: 0;
  }

  #view-news > .row-between .news-top-actions {
    grid-column: 1 / 2;
    display: flex;
    justify-content: space-between;
    width: 100%;
  }

  #view-news > .row-between .news-add-btn {
    width: auto;
  }

  #view-news > .row-between .news-source-filter {
    width: fit-content;
    max-width: 100%;
    min-width: 0;
  }

  #view-news > .row-between .news-source-filter select {
    width: auto;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 20px center;
    background-size: 14px 14px;
    padding-right: 48px;
  }
}

.news-load-more-wrap {
  display: none;
}

.news-load-more-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #fff;
  color: #1e3a8a;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.news-load-more-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.news-source-line {
  margin: 0;
}

.news-album-meta {
  margin: -0.15rem 0 0;
  font-size: 0.8rem;
  color: #476689;
}

.news-media-link {
  font-size: 0.82rem;
}

.news-home-layout {
  margin-top: 0.9rem;
  display: grid;
  gap: 1.25rem;
  grid-template-columns: minmax(0, 1.75fr) minmax(280px, 320px);
  align-items: start;
}

.rss-sidebar {
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  background: #fff;
  padding: 1rem 1.05rem;
  display: grid;
  gap: 0.85rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.rss-sidebar .row-between {
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 0.15rem;
}

.rss-sidebar h4 {
  margin: 0;
  color: #1e3a8a;
  font-size: 1rem;
  font-weight: 600;
}

.rss-sidebar #rss-refresh-btn {
  padding: 0.4rem 0.7rem;
  font-size: 0.78rem;
}

.rss-feed-list {
  display: grid;
  gap: 0;
  min-height: 60vh;
  max-height: 124vh;
  overflow: auto;
}

.news-watch,
.news-watch-scroll,
.rss-feed-list {
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.news-watch::-webkit-scrollbar,
.news-watch-scroll::-webkit-scrollbar,
.rss-feed-list::-webkit-scrollbar {
  display: none;
}

.rss-item {
  border: 0;
  border-bottom: 1px solid #f1f5f9;
  border-radius: 0;
  padding: 0.75rem 0;
  background: transparent;
  display: grid;
  gap: 0.2rem;
  transition: background-color 140ms ease, border-color 140ms ease;
}

.rss-item:first-child {
  padding-top: 0;
}

.rss-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.rss-item:hover {
  background: #f8fafc;
  border-bottom-color: #e2e8f0;
}

@media (max-width: 1180px) {
  .news-featured-card {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 0;
  }

  .news-featured-media {
    height: 14rem;
    min-height: 0;
  }

  .news-featured-media > a:first-child,
  .news-featured-media > .news-preview-carousel,
  .news-featured-media > .news-card-thumb.placeholder {
    border-radius: 0;
  }

  .news-featured-media .news-card-thumb,
  .news-featured-media .news-preview-carousel,
  .news-featured-media .news-preview-slides,
  .news-featured-media .news-preview-slide,
  .news-featured-media .news-preview-slide .news-card-thumb {
    min-height: 0;
  }

  .news-featured-body {
    padding: 1.1rem 1.15rem 1.15rem;
  }
}

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

  .news-grid {
    columns: 1;
  }
}

@media (max-width: 1024px) {
  .news-page-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .news-featured-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .news-featured-footer .news-card-actions {
    width: 100%;
  }

  .news-featured-read {
    width: auto;
    margin-left: 0;
    align-self: flex-end;
  }
}

.rss-item-link {
  display: grid;
  gap: 0.2rem;
  text-decoration: none;
  color: inherit;
}

.news-newsletter-card {
  margin-top: 0.5rem;
  padding: 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  display: grid;
  gap: 0.9rem;
}

.news-newsletter-eyebrow {
  display: inline-flex;
  width: fit-content;
  min-height: 22px;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 11px;
  font-weight: 600;
}

.news-newsletter-copy h5 {
  margin: 0.45rem 0 0;
  color: #1e3a8a;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.25;
}

.news-newsletter-copy p {
  margin: 0.4rem 0 0;
  color: #64748b;
  font-size: 0.88rem;
  line-height: 1.55;
}

.news-newsletter-form {
  display: grid;
  gap: 0.65rem;
}

.news-newsletter-form input {
  width: 100%;
  min-height: 40px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #fff;
  color: #0f172a;
  padding: 0 14px;
  font-size: 14px;
}

.news-newsletter-form button {
  min-height: 40px;
  border-radius: 999px;
  border: 1px solid #1e3a8a;
  background: #1e3a8a;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  box-shadow: none;
}

.rss-item h5 {
  margin: 0;
  color: #0f172a;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.35;
}

.rss-item-link:hover h5 {
  color: #1e3a8a;
  text-decoration: none;
}

.rss-meta {
  color: #64748b;
  font-size: 0.76rem;
}

.rss-summary {
  margin: 0;
  color: #64748b;
  font-size: 0.82rem;
  line-height: 1.45;
}

.rss-admin-card {
  margin-top: 1rem;
  padding: 0.9rem;
}

.branding-admin-card {
  margin-top: 1rem;
  padding: 0.9rem;
}

.admin-sections {
  display: grid;
  gap: 0.9rem;
}

#view-admin > h3 {
  margin-bottom: 22px;
}

.admin-section {
  padding: 0.9rem;
}

.admin-section.permissions-card,
.admin-section.rss-admin-card,
.admin-section.branding-admin-card {
  margin-top: 0;
}

.admin-section-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  text-align: left;
  background: #fff !important;
  box-shadow: none !important;
  border-color: transparent;
  cursor: pointer;
}

.admin-section-toggle:hover,
.admin-section-toggle[aria-expanded="true"]:hover {
  background: #fff !important;
  box-shadow: none !important;
  border-color: transparent !important;
  transform: none !important;
  filter: none !important;
}

.admin-section-toggle:focus {
  outline: none;
}

.admin-section-toggle:focus-visible {
  background: #fff !important;
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.14) !important;
  border-color: transparent !important;
}

.admin-section-toggle::after {
  content: '+';
  font-size: 1.1rem;
  line-height: 1;
}

.admin-section-toggle[aria-expanded="true"]::after {
  content: "-";
}

.admin-section-panel {
  margin-top: 0.8rem;
  display: grid;
  gap: 0.8rem;
}

.admin-users-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.admin-user-create-btn {
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: #1e3a8a;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(30, 58, 138, 0.16);
}

.admin-users-search {
  flex: 1 1 280px;
}

.admin-users-search input {
  width: 100%;
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid #dbe3ef;
  border-radius: 14px;
  background: #fff;
  color: #0f172a;
  font-size: 0.95rem;
  box-sizing: border-box;
}

.admin-users-search input:focus {
  outline: none;
  border-color: rgba(30, 58, 138, 0.45);
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.10);
}

.admin-users-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.admin-user-filter-chip {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #dbe3ef;
  border-radius: 999px;
  background: #fff;
  color: #475569;
  font-size: 0.84rem;
  font-weight: 600;
}

.admin-user-filter-chip.active {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1e3a8a;
}

.admin-users-count {
  margin: 0;
}

#admin-users-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.admin-user-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 18px;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  cursor: pointer;
}

.admin-user-card:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.14);
}

.admin-user-card-avatar .profile-avatar,
.admin-user-card-avatar img {
  width: 48px;
  height: 48px;
}

.admin-user-card-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-user-card-body h4 {
  margin: 0;
  color: #0f172a;
  font-size: 1rem;
  line-height: 1.3;
}

.admin-user-card-primary,
.admin-user-card-secondary {
  margin: 0;
  min-width: 0;
  color: #475569;
  font-size: 0.9rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.admin-user-card-commission {
  margin: 0;
  min-width: 0;
  color: #64748b;
  font-size: 0.82rem;
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.admin-user-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.admin-user-role-pill,
.admin-user-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
}

.admin-user-role-pill {
  background: #f8fafc;
  color: #334155;
  border: 1px solid #e2e8f0;
}

.admin-user-role-pill.secondary {
  background: #eff6ff;
  color: #1e3a8a;
  border-color: #bfdbfe;
}

.admin-user-status-pill.active {
  background: #ecfdf3;
  color: #0f766e;
}

.admin-user-status-pill.pending {
  background: #fff7ed;
  color: #c2410c;
}

.admin-user-status-pill.inactive {
  background: #f1f5f9;
  color: #64748b;
}

.admin-user-card-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
}

.admin-user-card-actions .ghost {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 12px;
  white-space: nowrap;
}

.admin-user-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1500;
  background: rgba(15, 23, 42, 0.42);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.admin-user-modal-overlay.hidden {
  display: none !important;
}

.admin-user-modal-dialog {
  width: min(760px, 100%);
  max-height: calc(100vh - 48px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.25);
}

.admin-user-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 24px;
  background: #1e3a8a;
  color: #fff;
}

.admin-user-modal-head h2 {
  margin: 0;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 500;
}

.admin-user-modal-close {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.admin-user-modal-body {
  min-height: 0;
  overflow-y: auto;
  padding: 20px 24px;
  background: #fff;
}

.admin-user-modal-footer {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  padding: 16px 24px calc(16px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid #e2e8f0;
  background: #fff;
}

.admin-user-modal-submit {
  min-height: 46px;
  padding: 0 20px;
  border: 0;
  border-radius: 14px;
  background: #1e3a8a;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
}

.admin-user-modal-cancel {
  border: 0;
  padding: 8px 4px;
  background: transparent;
  color: #1e3a8a;
  font-size: 0.95rem;
  font-weight: 600;
}

/* Keep the Administration user-modal actions flat; global button hover adds elevation. */
.admin-user-modal-submit,
.admin-user-modal-cancel,
.admin-user-modal-submit:hover,
.admin-user-modal-cancel:hover,
.admin-user-modal-submit:focus,
.admin-user-modal-cancel:focus,
.admin-user-modal-submit:active,
.admin-user-modal-cancel:active {
  box-shadow: none;
  transform: none;
  filter: none;
}

.admin-user-modal-submit:hover {
  background: #172f73;
}

.admin-user-modal-cancel:hover {
  color: #172f73;
}

.admin-user-modal-submit:focus-visible,
.admin-user-modal-cancel:focus-visible {
  outline: 3px solid rgba(30, 58, 138, 0.18);
  outline-offset: 2px;
}

.admin-user-modal-submit:active {
  background: #172f73;
}

.admin-user-modal-cancel:active {
  color: #172f73;
}

.admin-user-form {
  display: grid;
  gap: 22px;
}

.admin-user-form-group {
  display: grid;
  gap: 14px;
}

.admin-user-form-group h3 {
  margin: 0;
  color: #0f172a;
  font-size: 0.95rem;
}

.admin-user-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 16px;
}

.admin-user-form label,
.admin-user-create-form label {
  display: grid;
  gap: 8px;
  color: #475569;
  font-size: 0.85rem;
  font-weight: 500;
}

.admin-user-form input,
.admin-user-form select,
.admin-user-form textarea,
.admin-user-create-form input,
.admin-user-create-form select,
.admin-user-create-form textarea {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid #dbe3ef;
  border-radius: 14px;
  background: #fff;
  color: #0f172a;
  font-size: 16px;
  box-sizing: border-box;
}

.admin-user-form input[type="file"],
.admin-user-create-form input[type="file"] {
  padding: 10px 12px;
}

.admin-user-form select,
.admin-user-create-form select {
  padding-right: 44px;
}

/* The edit modal keeps native select behavior while using a controllable chevron. */
.admin-user-modal-dialog #admin-user-edit-form select {
  padding-right: 52px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m6 9 6 6 6-6' stroke='%231e3a8a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
  background-size: 18px 18px;
}

.admin-user-form textarea,
.admin-user-create-form textarea {
  min-height: 120px;
  padding: 12px 16px;
  line-height: 1.5;
  resize: vertical;
}

.admin-user-form input:focus,
.admin-user-form select:focus,
.admin-user-form textarea:focus,
.admin-user-create-form input:focus,
.admin-user-create-form select:focus,
.admin-user-create-form textarea:focus {
  outline: none;
  border-color: rgba(30, 58, 138, 0.45);
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.10);
}

.admin-user-checkbox-row {
  display: flex !important;
  align-items: center;
  gap: 10px !important;
}

.admin-user-checkbox-row input[type="checkbox"] {
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  padding: 0;
}

@media (min-width: 768px) and (max-width: 1024px) {
  #admin-users-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  #admin-users-list {
    grid-template-columns: 1fr;
  }

  .admin-user-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .admin-user-card-actions {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
  }

  .admin-user-modal-overlay {
    padding: 12px;
  }

  .admin-user-modal-dialog {
    width: calc(100vw - 24px);
    max-height: calc(100dvh - 32px);
    border-radius: 22px;
  }

  .admin-user-modal-head,
  .admin-user-modal-body,
  .admin-user-modal-footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  .admin-user-modal-footer {
    gap: 12px;
  }

  .admin-user-form-grid {
    grid-template-columns: 1fr;
  }
}

.rss-source-row {
  display: grid;
  gap: 0.45rem;
  transform: none;
  transition: none;
  list-style: none;
}

.rss-source-row:hover,
#app-view .shell-content .rss-source-row:hover {
  transform: none;
  box-shadow: 0 8px 16px rgba(19, 39, 69, 0.05);
  border-color: var(--line);
  padding: 0.7rem;
  margin: 0;
  background: #fff;
  filter: none;
}

#rss-sources-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

#rss-source-form label {
  display: grid;
  gap: 8px;
}

#rss-source-form input:not([type="checkbox"]):not([type="hidden"]) {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 12px 16px;
  box-sizing: border-box;
}

#rss-source-form input:not([type="checkbox"]):not([type="hidden"]):focus {
  outline: none;
  border-color: rgba(30, 58, 138, 0.45);
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.10);
}

.rss-source-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.rss-source-actions {
  display: flex;
  gap: 0.4rem;
}

.rss-source-actions button {
  padding: 0.35rem 0.5rem;
  font-size: 0.82rem;
}

.rss-source-url {
  margin: 0;
  overflow-wrap: anywhere;
}

.rss-source-status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.16rem 0.5rem;
  font-size: 0.76rem;
  font-weight: 600;
}

.rss-source-status.active {
  color: #0a694b;
  background: #dff6ec;
}

.rss-source-status.inactive {
  color: #7c5a07;
  background: #fff2d6;
}

#admin-branding-panel #branding-form {
  display: grid;
  gap: 20px;
}

#admin-branding-panel #branding-form label {
  display: grid;
  gap: 8px;
  color: #1e3a8a;
  font-size: 0.9rem;
  font-weight: 600;
}

#admin-branding-panel #branding-form input:not([type="file"]),
#admin-branding-panel #branding-form input[type="url"],
#admin-branding-panel #branding-form input[type="text"],
#admin-branding-panel #branding-form input[type="number"],
#admin-branding-panel #branding-form select {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 10px 14px;
  box-sizing: border-box;
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  background: #fff;
  color: #0f172a;
  font-size: 16px;
  line-height: 1.4;
}

#admin-branding-panel #branding-form input:not([type="file"]):focus,
#admin-branding-panel #branding-form input[type="url"]:focus,
#admin-branding-panel #branding-form input[type="text"]:focus,
#admin-branding-panel #branding-form input[type="number"]:focus,
#admin-branding-panel #branding-form select:focus {
  outline: none;
  border-color: rgba(30, 58, 138, 0.45);
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.10);
}

#admin-branding-panel #branding-form input[type="file"] {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 9px 12px;
  box-sizing: border-box;
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  background: #fff;
  color: #334155;
  font-size: 0.95rem;
  line-height: 1.4;
}

#admin-branding-panel #branding-form input[type="file"]:focus {
  outline: none;
}

#admin-branding-panel #branding-form input[type="file"]:focus-visible {
  border-color: rgba(30, 58, 138, 0.45);
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.10);
}

.profile-identity-preview {
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: center;
}

.profile-notifications-card {
  margin-top: 0.9rem;
  padding: 1.25rem;
}

#view-profile {
  display: grid;
  gap: 20px;
}

#view-profile > h3 {
  margin: 0;
}

#view-profile #profile-form,
#view-profile #notification-preferences-form,
#view-profile #ai-settings-form,
#view-profile #ai-summary-form {
  display: grid;
  gap: 20px;
}

#view-profile label:not(.checkbox-row) {
  display: grid;
  gap: 8px;
}

#view-profile label:not(.checkbox-row) > span {
  color: #475569;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}

#view-profile input:not([type="checkbox"]):not([type="file"]),
#view-profile select,
#view-profile textarea {
  width: 100%;
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  background: #fff;
  color: #0f172a;
  font-size: 15px;
  line-height: normal;
  box-sizing: border-box;
  box-shadow: none;
}

#view-profile textarea {
  min-height: 120px;
  padding: 12px 16px;
  resize: vertical;
}

#view-profile select {
  padding-left: 16px;
  padding-right: 42px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

#view-profile input::placeholder,
#view-profile textarea::placeholder {
  color: #94a3b8;
}

#view-profile input:not([type="checkbox"]):not([type="file"]):focus,
#view-profile select:focus,
#view-profile textarea:focus {
  outline: none;
  border-color: rgba(30, 58, 138, 0.45);
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.10);
}

#view-profile input[type="file"] {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  background: #fff;
  color: #0f172a;
  font-size: 14px;
  line-height: 1.4;
  box-sizing: border-box;
}

#view-profile input[type="file"]::file-selector-button {
  margin-right: 12px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid #dbe3ef;
  border-radius: 10px;
  background: #fff;
  color: #1e3a8a;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

#view-profile .row,
#view-profile .ai-summary-voice-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

#view-profile .checkbox-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  padding: 2px 0;
  color: #334155;
  font-size: 15px;
  line-height: 1.5;
  cursor: pointer;
}

#view-profile .checkbox-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: #1e3a8a;
}

#view-profile #profile-form > button[type="submit"],
#view-profile #notification-preferences-form > .row > button[type="submit"],
#view-profile #ai-settings-form > button[type="submit"],
#view-profile #ai-summary-form > button[type="submit"] {
  min-height: 46px;
  padding: 10px 18px;
  border: 0;
  border-radius: 12px;
  background: #1e3a8a;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

#view-profile #profile-form > button[type="submit"]:hover,
#view-profile #notification-preferences-form > .row > button[type="submit"]:hover,
#view-profile #ai-settings-form > button[type="submit"]:hover,
#view-profile #ai-summary-form > button[type="submit"]:hover {
  background: #172f73;
}

#view-profile #profile-form > button[type="submit"]:active,
#view-profile #notification-preferences-form > .row > button[type="submit"]:active,
#view-profile #ai-settings-form > button[type="submit"]:active,
#view-profile #ai-summary-form > button[type="submit"]:active {
  transform: translateY(1px);
}

#view-profile #notification-test-btn,
#view-profile #ai-summary-read-btn {
  min-height: 46px;
  padding: 10px 18px;
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  background: #fff;
  color: #1e3a8a;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  box-shadow: none;
}

#view-profile #notification-test-btn:hover,
#view-profile #ai-summary-read-btn:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
}

#view-profile #ai-summary-stop-btn {
  min-height: 40px;
  padding: 8px 6px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #1e3a8a;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  box-shadow: none;
}

#view-profile #ai-summary-stop-btn:hover {
  background: #eff6ff;
}

#view-profile button:focus-visible,
#view-profile input:focus-visible,
#view-profile select:focus-visible,
#view-profile textarea:focus-visible {
  outline: none;
}

#view-profile hr {
  width: 100%;
  margin: 4px 0 0;
  border: 0;
  border-top: 1px solid #e2e8f0;
}

#view-profile #profile-feedback,
#view-profile #notification-preferences-feedback,
#view-profile #ai-settings-feedback,
#view-profile #ai-summary-feedback,
#view-profile #notification-push-status,
#view-profile #ai-settings-status,
#view-profile #ai-summary-tts-status {
  margin: 0;
}

@media (max-width: 767px) {
  #view-profile {
    gap: 16px;
  }

  #view-profile #profile-form,
  #view-profile #notification-preferences-form,
  #view-profile #ai-settings-form,
  #view-profile #ai-summary-form {
    gap: 18px;
  }

  #view-profile .profile-notifications-card {
    padding: 1rem;
  }

  #view-profile .row,
  #view-profile .ai-summary-voice-controls {
    align-items: stretch;
  }
}

.ai-summary-output {
  margin-top: 0.65rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 0.75rem;
  max-height: 55vh;
  overflow: auto;
}

.ai-summary-voice-controls {
  margin-top: 0.35rem;
  flex-wrap: wrap;
}

#ai-summary-tts-status {
  min-height: 1.1rem;
  margin: 0.1rem 0 0.15rem;
}

.avatar-stack {
  --avatar-size: 44px;
  position: relative;
  width: var(--avatar-size);
  height: var(--avatar-size);
  flex: 0 0 auto;
  display: inline-block;
}

.news-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(14, 26, 43, 0.42);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 4vh 1rem 1rem;
  z-index: 120;
  overflow: auto;
}

.news-modal {
  width: min(900px, 100%);
  padding: 0.95rem;
  display: grid;
  gap: 0.7rem;
}

.news-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.8rem;
}

.news-detail-media-list {
  display: grid;
  gap: 0.7rem;
}

.news-detail-media-list iframe {
  width: 100%;
  min-height: 240px;
  border: 0;
  border-radius: 10px;
  background: #eff5ff;
}

.cotech-player-modal {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
}

.cotech-player-modal.hidden {
  display: none;
}

.cotech-player-dialog {
  width: min(900px, 100%);
  background: #fff;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 28px 60px rgba(15, 23, 42, 0.24);
}

.cotech-player-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.cotech-player-frame iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  background: #020617;
}

.cotech-player-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.cotech-player-close:hover {
  background: rgba(15, 23, 42, 0.84);
  transform: none;
}

.cotech-player-info {
  display: grid;
  gap: 18px;
  padding: 24px;
}

.cotech-player-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  color: #64748b;
  font-size: 13px;
}

.cotech-player-meta span:first-child {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1e3a8a;
  font-weight: 600;
}

.cotech-player-info h3 {
  margin: 0;
  color: #0f172a;
  font-size: 20px;
  line-height: 1.35;
  font-weight: 600;
}

.cotech-player-info p {
  margin: 0;
  color: #475569;
  font-size: 14px;
  line-height: 1.6;
}

.cotech-player-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.cotech-player-speaker {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.cotech-player-speaker-avatar {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 999px;
  object-fit: cover;
  object-position: center;
}

.cotech-player-speaker strong {
  display: block;
  color: #0f172a;
  font-size: 14px;
  font-weight: 600;
}

.cotech-player-speaker span {
  color: #64748b;
  font-size: 12px;
}

.cotech-player-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.cotech-player-actions .ghost {
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #1e3a8a;
  box-shadow: none;
  padding: 0;
  font-weight: 600;
}

.cotech-player-actions .ghost:hover {
  background: transparent;
  transform: none;
}

.comments-panel {
  margin-top: 0.35rem;
  border-top: 1px solid #dbe7f6;
  padding-top: 0.7rem;
  display: grid;
  gap: 0.6rem;
}

.comments-panel h4,
.comments-panel h5 {
  margin: 0;
}

.comments-list {
  display: grid;
  gap: 0.5rem;
}

.comment-item {
  border: 1px solid #d6e4f6;
  border-radius: 10px;
  background: linear-gradient(180deg, #fcfeff 0%, #f5faff 100%);
  padding: 0.55rem 0.62rem;
  display: grid;
  gap: 0.35rem;
}

.comment-item .author-line {
  margin-top: 0;
}

.comment-body.article-rich {
  font-size: 0.93rem;
}

.comment-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.comment-actions .ghost {
  padding: 0.22rem 0.48rem;
  font-size: 0.77rem;
}

.comment-children {
  margin-top: 0.15rem;
  margin-left: 0.85rem;
  padding-left: 0.7rem;
  border-left: 2px solid #d7e6f8;
  display: grid;
  gap: 0.45rem;
}

.comment-compose {
  display: grid;
  gap: 0.5rem;
}

.comment-compose textarea {
  min-height: 86px;
}

.comment-compose-actions {
  align-items: center;
  flex-wrap: wrap;
}

.comment-emoji-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.comment-emoji-btn {
  min-width: 34px;
  padding: 0.22rem 0.4rem;
  line-height: 1;
}

.comment-reply-target {
  margin: 0;
}

.comment-reply-context {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  background: #eff6ff;
}

.comment-reply-context-text {
  min-width: 0;
}

.comment-reply-context-text span {
  display: inline-block;
  margin-right: 4px;
  color: #64748b;
  font-size: 13px;
  font-weight: 500;
}

.comment-reply-context-text strong {
  color: #1e3a8a;
  font-size: 13px;
  font-weight: 700;
}

.comment-reply-context-text p {
  margin: 4px 0 0;
  color: #334155;
  font-size: 13px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.comment-reply-context-clear {
  flex-shrink: 0;
  border: none;
  background: transparent;
  color: #1e3a8a;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  padding: 2px 0;
}

.comment-reply-context-clear:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.profile-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.7rem;
  align-items: start;
}

.profile-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 1px solid #cad8ee;
  object-fit: cover;
  background: #eef4fb;
  box-shadow: 0 6px 12px rgba(45, 111, 174, 0.14);
}

.org-logo-badge {
  position: absolute;
  width: calc(var(--avatar-size) * 0.42);
  height: calc(var(--avatar-size) * 0.42);
  right: calc(var(--avatar-size) * -0.03);
  bottom: calc(var(--avatar-size) * -0.03);
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #ffffff;
  background: #f4f8ff;
  box-shadow: 0 6px 12px rgba(19, 39, 69, 0.2);
}

.trombi-grid {
  grid-template-columns: 1fr;
  gap: 0;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

.trombi-card {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto;
  justify-items: stretch;
  align-items: start;
  text-align: left;
  gap: 0;
  padding: 0;
  background: #fff;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
}

.trombi-card.has-details {
  cursor: pointer;
}

.trombi-card.has-details:focus-visible {
  outline: 2px solid #8eb5e1;
  outline-offset: 2px;
}

.trombi-summary {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  justify-items: start;
  align-items: center;
  gap: 0.15rem 0.75rem;
  border-bottom: 1px solid #f1f5f9;
  padding: 1rem 1.125rem;
  transition: background-color 0.15s ease;
}

.trombi-card .profile-avatar {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  box-shadow: none;
}

.trombi-avatar-fallback {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

.trombi-avatar-fallback.blue {
  background: #dbeafe;
  color: #1d4ed8;
}

.trombi-avatar-fallback.amber {
  background: #fef3c7;
  color: #b45309;
}

.trombi-avatar-fallback.emerald {
  background: #d1fae5;
  color: #047857;
}

.trombi-avatar-fallback.rose {
  background: #ffe4e6;
  color: #be123c;
}

.trombi-identity {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  grid-column: 1;
  grid-row: 1 / span 4;
}

.trombi-main-avatar {
  flex: 0 0 auto;
}

.trombi-org-logo {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #ffffff;
  background: #f4f8ff;
  box-shadow: 0 8px 16px rgba(19, 39, 69, 0.2);
}

.trombi-org-logo-wrap {
  display: flex;
  justify-content: center;
  margin: 0.15rem 0 0.25rem;
}

.trombi-card > .trombi-summary {
  width: 100%;
  display: grid;
  gap: 0.18rem 0.75rem;
}

.trombi-details {
  display: none;
  margin-top: 0;
  padding: 0 1.125rem 1rem;
  width: 100%;
  gap: 0.5rem;
}

.trombi-card.has-details.is-expanded .trombi-details {
  display: grid;
}

.trombi-card p {
  margin: 0;
}

.trombi-card h4 {
  margin: 0;
  grid-column: 2;
  color: #0f172a;
  font-size: 14px;
  line-height: 1.25rem;
  font-weight: 500;
}

.trombi-org {
  grid-column: 2;
  color: #64748b;
  font-size: 12px;
  line-height: 1rem;
  font-weight: 400;
}

.directory-message-btn {
  margin-top: 0.25rem;
  width: auto;
}

.trombi-function {
  grid-column: 2;
  color: #64748b;
  font-size: 12px;
  line-height: 1rem;
  font-weight: 400;
}

.trombi-contact-meta {
  grid-column: 2;
  color: #64748b;
  font-size: 12px;
  line-height: 1rem;
}

.commission-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-start;
  margin: 0.2rem 0 0.1rem;
}

.trombi-card.has-details:hover .trombi-summary,
.trombi-card.has-details.is-expanded .trombi-summary {
  background: #f8fafc;
}

.trombi-details > * {
  margin: 0;
  color: #64748b;
  font-size: 0.75rem;
  line-height: 1rem;
}

.trombi-details > * + * {
  border-top: 1px solid #f1f5f9;
  padding-top: 0.5rem;
}

.trombi-details a {
  color: inherit;
  text-decoration: none;
}

.trombi-details a:hover {
  color: #1e3a8a;
  text-decoration: underline;
}

.trombi-org-logo-wrap {
  justify-content: flex-start;
}

.trombi-org-logo {
  width: 3rem;
  height: 3rem;
  border: 1px solid #e2e8f0;
  box-shadow: none;
}

#view-directory {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  overflow: hidden;
  padding: 0;
}

#view-directory > h3 {
  margin: 0;
  background: #1e3a8a;
  color: #fff;
  padding: 14px 20px;
  font-size: 16px;
  font-weight: 500;
}

#view-directory.contacts-page {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
  padding: 0;
}

#view-directory.contacts-page.active {
  display: grid;
  gap: 1.5rem;
}

#view-directory.contacts-page > h3 {
  display: none;
}

.contacts-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.contacts-title-block {
  min-width: 0;
}

.contacts-title {
  color: #1e3a8a;
  font-size: 1.5rem;
  line-height: 2rem;
  font-weight: 500;
}

.contacts-subtitle {
  margin: 0.25rem 0 0;
  color: #64748b;
  font-size: 0.875rem;
  line-height: 1.375rem;
}

.contacts-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.25rem;
  color: #475569;
  font-size: 0.75rem;
  font-weight: 300;
  white-space: nowrap;
}

.contacts-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.1rem;
}

.contact-filter-pill {
  gap: 0.4rem;
}

.contact-filter-pill strong {
  font-size: 0.72rem;
  color: #1e3a8a;
}

.contacts-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

#view-directory.contacts-page .contact-card,
#view-directory.contacts-page .contact-card:hover,
#view-directory.contacts-page .contact-card:focus,
#view-directory.contacts-page .contact-card:focus-within {
  position: relative;
  display: block;
  padding: 24px !important;
  margin: 0 !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06) !important;
  background: #fff;
  overflow: hidden;
  transform: none !important;
  box-sizing: border-box;
}

#view-directory.contacts-page .contact-card:hover,
#view-directory.contacts-page .contact-card:focus-within {
  background: #f8fafc;
  border-color: #d9e2ec !important;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08) !important;
}

#view-directory.contacts-page .contact-card:focus-visible {
  outline: 2px solid #8eb5e1;
  outline-offset: 2px;
}

.contact-card-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
}

.contact-avatar {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  flex: 0 0 auto;
  object-fit: cover;
  border: 0;
  box-shadow: none;
}

.contact-avatar-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
}

.contact-avatar-fallback.blue {
  background: #dbeafe;
  color: #1d4ed8;
}

.contact-avatar-fallback.amber {
  background: #fef3c7;
  color: #b45309;
}

.contact-avatar-fallback.emerald {
  background: #d1fae5;
  color: #047857;
}

.contact-avatar-fallback.rose {
  background: #ffe4e6;
  color: #be123c;
}

.contact-info {
  min-width: 0;
  display: grid;
  gap: 0.35rem;
}

.contact-name-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.contact-name {
  margin: 0;
  color: #0f172a;
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 500;
}

.contact-role,
.contact-meta {
  margin: 0;
  color: #64748b;
  font-size: 0.75rem;
  line-height: 1.1rem;
}

.contact-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  min-height: 1.55rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #475569;
  font-size: 0.69rem;
  font-weight: 400;
  line-height: normal;
}

.contact-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  color: #94a3b8;
  flex: 0 0 auto;
}

.contact-chevron svg {
  width: 1rem;
  height: 1rem;
  stroke-width: 1.8;
}

#directory-contact-modal.contacts-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
}

#directory-contact-modal.hidden {
  display: none !important;
}

#directory-contact-modal .contacts-modal {
  position: relative;
  width: min(520px, 100%);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.35);
  overflow-x: hidden;
}

.contacts-modal-banner {
  min-height: 132px;
  position: relative;
  background:
    radial-gradient(circle at 20% 28%, rgba(255, 255, 255, 0.16) 0, transparent 28%),
    radial-gradient(circle at 82% 40%, rgba(255, 255, 255, 0.14) 0, transparent 24%),
    linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 100%);
}

.contacts-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
}

.contacts-modal-close:hover {
  background: rgba(255, 255, 255, 0.24);
}

.contacts-modal-close svg {
  width: 1rem;
  height: 1rem;
}

.contacts-modal-body {
  position: relative;
  padding: 0 1.5rem 1.5rem;
  display: grid;
  gap: 1rem;
}

.contacts-modal-avatar-wrap {
  width: 88px;
  height: 88px;
  margin-top: -44px;
  border-radius: 999px;
  border: 4px solid #fff;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
  overflow: hidden;
}

.contacts-modal-avatar {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  object-fit: cover;
}

.contacts-modal-head {
  display: grid;
  gap: 0.2rem;
}

.contacts-modal-head h3 {
  margin: 0;
  color: #0f172a;
  font-size: 1.25rem;
  line-height: 1.75rem;
  font-weight: 600;
}

.contacts-modal-role,
.contacts-modal-service {
  margin: 0;
  color: #64748b;
  font-size: 0.875rem;
  line-height: 1.35rem;
}

.contacts-modal-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.contacts-modal-info {
  display: grid;
  gap: 0.75rem;
}

.contacts-modal-info-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 0.75rem;
  padding: 0.85rem 0.95rem;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  background: #f8fafc;
}

.contacts-modal-info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: #e0ecff;
  color: #1e3a8a;
}

.contacts-modal-info-icon svg {
  width: 0.95rem;
  height: 0.95rem;
}

.contacts-modal-info-copy {
  min-width: 0;
  display: grid;
  gap: 0.1rem;
}

.contacts-modal-info-label {
  color: #94a3b8;
  font-size: 0.72rem;
  line-height: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.contacts-modal-info-copy span,
.contacts-modal-info-copy a {
  color: #0f172a;
  font-size: 0.875rem;
  line-height: 1.35rem;
  text-decoration: none;
}

.contacts-modal-info-copy a:hover {
  color: #1e3a8a;
  text-decoration: underline;
}

.contacts-modal-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding-top: 0.25rem;
}

.contacts-modal-primary,
.contacts-modal-secondary {
  min-height: 2.75rem;
  padding: 0.72rem 1.1rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
}

.contacts-modal-primary {
  background: #1e3a8a;
  border: 1px solid #1e3a8a;
  color: #fff;
}

.contacts-modal-primary:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
}

.contacts-modal-secondary {
  background: #fff;
  border: 1px solid #d6deeb;
  color: #1e3a8a;
  box-shadow: none;
}

.contacts-modal-secondary:hover {
  background: #f8fafc;
}

@media (max-width: 1023px) {
  .contacts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .contacts-grid {
    grid-template-columns: 1fr;
  }

  #view-directory.contacts-page .contact-card,
  #view-directory.contacts-page .contact-card:hover,
  #view-directory.contacts-page .contact-card:focus,
  #view-directory.contacts-page .contact-card:focus-within {
    padding: 1.125rem !important;
  }

  .contact-card-main {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .contact-chevron {
    display: none;
  }

  .contacts-modal-body {
    padding: 0 1rem 1rem;
  }
}

#view-directory.contacts-page .contact-avatar,
#view-directory.contacts-page .contact-avatar-fallback,
#view-directory.contacts-page .directory-avatar,
#view-directory.contacts-page .directory-avatar-initials,
#view-directory.contacts-page .member-avatar,
#view-directory.contacts-page .user-avatar,
#view-directory.contacts-page .avatar-initials {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  max-width: 44px !important;
  min-height: 44px !important;
  max-height: 44px !important;
  border-radius: 999px !important;
  overflow: hidden !important;
  flex-shrink: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #dbeafe !important;
  color: #1e3a8a !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
}

#view-directory.contacts-page .contact-avatar img,
#view-directory.contacts-page .directory-avatar img,
#view-directory.contacts-page .member-avatar img,
#view-directory.contacts-page .user-avatar img,
#view-directory.contacts-page img.contact-avatar.profile-avatar {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
  display: block !important;
  border-radius: inherit !important;
}

@media (max-width: 900px) {
  #view-directory.contacts-page,
  #view-directory.contacts-page.active,
  #view-directory.contacts-page .contacts-header,
  #view-directory.contacts-page .contacts-title-block,
  #view-directory.contacts-page .contacts-grid,
  #view-directory.contacts-page .contact-card,
  #view-directory.contacts-page .contact-card-main,
  #view-directory.contacts-page .contact-info {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  #view-directory.contacts-page {
    width: 100% !important;
    overflow-x: hidden !important;
  }

  .directory-page,
  .directory-page-inner,
  .directory-content,
  #view-directory.contacts-page {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
  }

  .directory-grid,
  .directory-list,
  .contacts-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
}

@media (max-width: 640px) {
  #view-directory.contacts-page .contact-card,
  #view-directory.contacts-page .contact-card:hover,
  #view-directory.contacts-page .contact-card:focus,
  #view-directory.contacts-page .contact-card:focus-within,
  .directory-card,
  .contact-card,
  .member-card {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 14px !important;
    border-radius: 16px !important;
  }

  #view-directory.contacts-page .contact-card-main,
  .directory-card-header,
  .contact-card-header,
  .member-card-header {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    min-width: 0 !important;
  }

  #view-directory.contacts-page .contact-info,
  .directory-card h3,
  .contact-card h3,
  .member-card h3,
  .contact-name {
    min-width: 0 !important;
  }

  .directory-card h3,
  .contact-card h3,
  .member-card h3,
  .contact-name {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  #view-directory.contacts-page .contact-role,
  #view-directory.contacts-page .contact-meta,
  .directory-card p,
  .contact-card p,
  .member-card p {
    overflow-wrap: anywhere !important;
  }

  .directory-actions,
  .contact-actions,
  .member-actions,
  #view-directory.contacts-page .directory-actions,
  #view-directory.contacts-page .contact-actions,
  #view-directory.contacts-page .member-actions {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    margin-top: 12px !important;
  }
}

@media (max-width: 768px) {
  #directory-contact-modal.contacts-modal-overlay {
    padding: 16px !important;
    align-items: center !important;
    justify-content: center !important;
  }

  #directory-contact-modal .contacts-modal {
    --contact-modal-x: 16px;
    width: min(420px, calc(100vw - 32px)) !important;
    max-width: calc(100vw - 32px) !important;
    max-height: calc(100dvh - 32px) !important;
    border-radius: 22px !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
  }

  #directory-contact-modal .contacts-modal-banner {
    min-height: 92px !important;
    height: 92px !important;
    flex-shrink: 0 !important;
    position: relative !important;
    overflow: visible !important;
  }

  #directory-contact-modal .contacts-modal-close {
    top: 12px !important;
    right: 12px !important;
    width: 34px !important;
    height: 34px !important;
  }

  #directory-contact-modal .contacts-modal-body {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 50px var(--contact-modal-x) 14px !important;
    display: grid !important;
    gap: 12px !important;
  }

  #directory-contact-modal .contacts-modal-avatar-wrap {
    width: 88px !important;
    height: 88px !important;
    margin-top: -44px !important;
    position: relative !important;
    z-index: 3 !important;
    align-self: start !important;
    border-width: 4px !important;
    margin-left: 0 !important;
  }

  #directory-contact-modal .contacts-modal-head {
    gap: 0.1rem !important;
    padding-inline: 0 !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  #directory-contact-modal .contacts-modal-head h3 {
    margin-top: 2px !important;
  }

  #directory-contact-modal .contacts-modal-head h3 {
    font-size: 1.2rem !important;
    line-height: 1.2 !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
  }

  #directory-contact-modal .contacts-modal-role,
  #directory-contact-modal .contacts-modal-service,
  #directory-contact-modal .contacts-modal-info-copy span,
  #directory-contact-modal .contacts-modal-info-copy a {
    font-size: 0.75rem !important;
    line-height: 1.45 !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
  }

  #directory-contact-modal .contacts-modal-info {
    gap: 10px !important;
    padding-inline: 0 !important;
  }

  #directory-contact-modal .contacts-modal-info-row {
    gap: 10px !important;
    padding: 12px !important;
    border-radius: 14px !important;
  }

  #directory-contact-modal .contacts-modal-actions {
    position: sticky !important;
    bottom: 0 !important;
    z-index: 5 !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
    margin-top: 4px !important;
    padding: 12px 0 calc(12px + env(safe-area-inset-bottom, 0px)) !important;
    background: linear-gradient(to top, #fff 78%, rgba(255, 255, 255, 0.94) 100%) !important;
    border-top: 1px solid #e2e8f0 !important;
  }

  #directory-contact-modal .contacts-modal-actions a,
  #directory-contact-modal .contacts-modal-actions button {
    width: 100% !important;
    min-height: 46px !important;
    border-radius: 999px !important;
    justify-content: center !important;
  }

  #directory-contact-modal .contacts-modal-badges,
  #directory-contact-modal .contacts-modal-head,
  #directory-contact-modal .contacts-modal-info,
  #directory-contact-modal .contacts-modal-actions {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  #directory-contact-modal .contacts-modal-badges {
    min-width: 0 !important;
    max-width: 100% !important;
    gap: 6px !important;
  }

  #directory-contact-modal .contacts-modal-badges .contact-badge {
    max-width: 100% !important;
    min-height: 24px !important;
    padding: 4px 9px !important;
    font-size: 11px !important;
    line-height: 1.25 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
  }
}

@media (max-width: 640px) {
  .directory-modal,
  .contact-modal,
  .member-modal,
  #directory-contact-modal.contacts-modal-overlay {
    padding: 14px !important;
    align-items: center !important;
  }

  .directory-dialog,
  .contact-dialog,
  .member-dialog,
  #directory-contact-modal .contacts-modal {
    --contact-modal-x: 14px;
    width: min(420px, calc(100vw - 28px)) !important;
    max-width: calc(100vw - 28px) !important;
    max-height: calc(100dvh - 28px) !important;
    border-radius: 20px !important;
  }
}

@media (max-width: 768px) {
  #directory-contact-modal .contacts-modal-badges {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 16px 0 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    overflow: visible !important;
  }

  #directory-contact-modal .contacts-modal-badges > span,
  #directory-contact-modal .contacts-modal-badges .contact-badge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 4px 0 !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
  }
}

.commission-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.16rem 0.52rem;
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.commission-badge.member {
  background: #dff4e8;
  color: #19623b;
}

.commission-badge.referent {
  background: #dfe9ff;
  color: #294f98;
}

.admin-user-commission-field {
  display: grid;
  gap: 0.25rem;
  margin: 0.32rem 0;
}

.admin-user-commission-field select {
  width: 100%;
}

.list-item h4 {
  margin: 0 0 0.25rem;
}

.meta {
  color: var(--muted);
  font-size: 0.85rem;
}

.author-line {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.35rem;
}

.inline-avatar-shell {
  --inline-avatar-size: 24px;
  width: var(--inline-avatar-size);
  height: var(--inline-avatar-size);
  min-width: var(--inline-avatar-size);
  min-height: var(--inline-avatar-size);
  max-width: var(--inline-avatar-size);
  max-height: var(--inline-avatar-size);
  flex: 0 0 var(--inline-avatar-size);
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid #cad8ee;
  background: #eef4fb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.inline-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 0;
  background: transparent;
  display: block;
}

.inline-avatar-fallback {
  display: none;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  color: #1e3a8a;
  font-size: calc(var(--inline-avatar-size) * 0.42);
  font-weight: 800;
  line-height: 1;
}

.inline-avatar-shell.is-fallback .inline-avatar {
  display: none;
}

.inline-avatar-shell.is-fallback .inline-avatar-fallback {
  display: inline-flex;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.45rem;
}

.tag {
  border: 1px solid #c9d8ee;
  background: linear-gradient(180deg, #f8fbff 0%, #edf5ff 100%);
  color: #274c78;
  border-radius: 999px;
  padding: 0.14rem 0.55rem;
  font-size: 0.78rem;
}

.tag-btn {
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.tag-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 12px rgba(45, 111, 174, 0.16);
}

.news-tag,
.news-card-tag,
.news-category,
.news-badge,
.news-category-badge,
.tag {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: fit-content !important;
  max-width: 100% !important;
  min-height: 24px !important;
  padding: 4px 10px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(30, 58, 138, 0.12) !important;
  background: #dbeafe !important;
  color: #1e3a8a !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  letter-spacing: 0.02em !important;
  text-transform: uppercase !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  box-shadow: none !important;
}

.tag-btn,
.news-category-badge,
.news-tag,
.news-card-tag,
.news-category,
.news-badge {
  transform: none !important;
  filter: none !important;
}

.tag-btn:hover,
.news-tag:hover,
.news-card-tag:hover,
.news-category:hover,
.news-badge:hover,
.news-category-badge:hover {
  transform: none !important;
  box-shadow: none !important;
}

.news-tag.is-alert,
.news-card-tag.is-alert,
.news-badge.is-alert,
.tag-btn[data-tag="Alerte"],
.news-topic-chip[data-news-topic="alerte"] {
  background: #fff1f2 !important;
  border-color: rgba(225, 29, 72, 0.18) !important;
  color: #be123c !important;
}

.search-card {
  display: grid;
  gap: 0;
  padding: 16px 18px !important;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: none !important;
  transform: none !important;
  list-style: none;
}

.search-type {
  margin-bottom: 6px;
  font-size: 0.78rem;
  color: #1e3a8a;
  font-weight: 600;
}

#view-search h3 {
  margin-bottom: 8px;
}

#view-search .muted {
  margin-top: 8px;
  line-height: 1.5;
}

#view-search #search-form {
  display: block;
  margin: 0;
}

#view-search #search-input {
  width: 100%;
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  background: #fff;
  color: #0f172a;
  font-size: 16px;
  box-sizing: border-box;
}

#view-search #search-input:focus {
  outline: none;
  border-color: rgba(30, 58, 138, 0.45);
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.10);
}

#search-results {
  list-style: none;
  padding-left: 0;
  margin: 0;
  display: grid;
  gap: 14px;
}

#view-search .search-card:hover,
#view-search .search-card:active,
#app-view .shell-content .search-card:hover {
  transform: none !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
  border-color: #e2e8f0 !important;
  padding: 16px 18px !important;
  background: #fff !important;
  filter: none !important;
}

#view-search .search-card:focus-within {
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.10);
}

#view-search .search-card h4 {
  margin: 0 0 8px;
  color: #0f172a;
  font-size: 1rem;
  line-height: 1.35;
  font-weight: 700;
}

#view-search .search-card p {
  margin: 0 0 10px;
  color: #64748b;
  line-height: 1.5;
}

#view-search .search-card .tags {
  margin-top: 0;
  margin-bottom: 10px;
}

#view-search .search-open-link,
#view-search .jump-btn.search-open-link {
  width: fit-content;
  min-height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #1e3a8a;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.4;
  box-shadow: none;
  cursor: pointer;
}

#view-search .search-open-link:hover,
#view-search .jump-btn.search-open-link:hover {
  background: transparent;
  color: #1e3a8a;
  text-decoration: underline;
  text-underline-offset: 3px;
  box-shadow: none;
}

#view-search .search-open-link:focus {
  outline: none;
}

#view-search .search-open-link:focus-visible {
  border-radius: 6px;
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.10);
}

mark {
  background: #ffec9f;
  border-radius: 4px;
}

.muted {
  color: var(--muted);
}

.feedback {
  min-height: 1.2rem;
  font-size: 0.9rem;
}

.feedback.error {
  color: var(--danger);
}

.feedback.success {
  color: var(--ok);
}

.hidden {
  display: none !important;
}

.row-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.row {
  display: flex;
  gap: 0.5rem;
}

.row input {
  flex: 1;
}

.create-toggle {
  white-space: nowrap;
}

.creation-panel {
  margin-top: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem;
  background: linear-gradient(180deg, #f9fcff 0%, #f1f7ff 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.taxonomy-manager {
  margin-top: 0.8rem;
  padding: 0.8rem;
  display: grid;
  gap: 0.55rem;
}

.commission-tabs {
  margin-top: 0.75rem;
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.commission-tab {
  border: 1px solid #cfddf1;
  background: linear-gradient(180deg, #ffffff 0%, #f3f8ff 100%);
  color: #2f557f;
  border-radius: 999px;
  padding: 0.38rem 0.68rem;
  font-size: 0.84rem;
  box-shadow: 0 5px 10px rgba(19, 39, 69, 0.08);
}

.commission-tab.active {
  border-color: #a9c9ed;
  background: linear-gradient(180deg, #eaf4ff 0%, #dcecff 100%);
  color: #1f4d7e;
  font-weight: 600;
}

.commission-entry {
  display: grid;
  gap: 0;
  list-style: none;
}

.commission-entry-comment {
  margin: 0;
  padding: 0.55rem 0.65rem;
  border: 1px solid #d2e2f5;
  border-radius: 10px;
  background: #f8fbff;
}

.commission-file-link {
  width: fit-content;
}

.commission-files {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.commission-file-list {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.commission-document-kind {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
}

.commission-document-kind svg,
.commission-external-link svg,
.commission-file-link svg,
.commission-action-btn svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

.commission-actions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

#view-commissions .commission-actions {
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
}

.commission-action-btn:focus-visible,
.commission-comment-form button[type="submit"]:focus-visible,
.commission-file-link:focus-visible,
.commission-external-link:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.commission-external-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  overflow-wrap: anywhere;
}

#view-commissions .commission-file-list > .commission-file-link,
#view-commissions .commission-file-list > .commission-file-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-self: start;
  width: fit-content;
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
}

#view-commissions .commission-file-list > .commission-file-link {
  background: transparent;
  box-shadow: none;
  transition: color 140ms ease, transform 140ms ease;
}

#view-commissions .commission-file-list > .commission-file-link span,
#view-commissions .commission-file-list > .commission-file-label span {
  min-width: 0;
  overflow-wrap: anywhere;
}

#view-commissions .commission-file-list > .commission-file-link:hover {
  color: #1e3a8a;
  background: transparent;
  box-shadow: none;
  transform: translateY(-1px);
}

.commission-comments {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #e2e8f0;
  gap: 16px;
}

.commission-entry > .commission-entry-comment + .commission-files,
.commission-entry > .commission-entry-comment + .author-line,
.commission-entry > .commission-files + .author-line {
  margin-top: 20px;
}

.commission-entry > .author-line + .tag-list {
  margin-top: 8px;
}

.commission-entry > .author-line + .commission-actions,
.commission-entry > .tag-list + .commission-actions {
  margin-top: 16px;
}

.commission-comments .comments-list {
  gap: 8px;
}

.commission-comments .comment-compose {
  gap: 12px;
}

.commission-comment-form label {
  gap: 8px;
}

.commission-comments h5 {
  margin-bottom: 2px;
}

.commission-comment-form textarea {
  min-height: 96px;
  padding: 12px 14px;
  line-height: 1.5;
}

.commission-comment-form .comment-compose-actions {
  gap: 12px;
  row-gap: 10px;
}

.commission-comment-form .comment-emoji-row {
  margin-right: 2px;
}

.commission-comment-form button[type="submit"] {
  min-height: 36px;
  padding: 8px 14px;
  border: 1px solid #1e3a8a;
  border-radius: 6px;
  background: #1e3a8a;
  color: #fff;
  box-shadow: none;
  transition: background-color 140ms ease, border-color 140ms ease;
}

#view-commissions.commissions-page-shell {
  background: #f8fafc;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
  padding: 0;
}

#view-commissions .commissions-page-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 32px 48px;
}

#view-commissions .commissions-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

#view-commissions .commissions-header h1 {
  margin: 0;
  color: #1e3a8a;
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

#view-commissions .commissions-header p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 14px;
}

#view-commissions .commissions-header .row-between {
  width: auto;
  margin-left: auto;
}

#view-commissions .commissions-header .row-between > h3 {
  display: none;
}

#view-commissions .commissions-upload-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  border: none !important;
  border-radius: 999px !important;
  background: #1e3a8a !important;
  color: #fff !important;
  padding: 10px 16px !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08) !important;
  white-space: nowrap !important;
}

#view-commissions .commissions-upload-btn i,
#view-commissions .commissions-upload-btn svg {
  width: 16px !important;
  height: 16px !important;
  stroke-width: 2 !important;
  color: currentColor !important;
}

#view-commissions .commissions-upload-btn:hover {
  background: #1e40af !important;
}

@media (min-width: 1025px) {
  #view-commissions .commissions-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    column-gap: 16px;
  }

  #view-commissions .commissions-header > div:first-child {
    min-width: 0;
    grid-column: 1;
  }

  #view-commissions .commissions-header .row-between {
    grid-column: 2;
    width: auto;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    margin-left: 0;
  }
}

#view-commissions .commissions-tabs-shell {
  margin-bottom: 20px;
}

#view-commissions .commissions-select-field,
#view-commissions .commissions-mobile-select-wrap {
  display: grid;
  gap: 6px;
  margin: 0 0 14px;
}

#view-commissions .commissions-select-field > span,
#view-commissions .commissions-mobile-select-wrap > span {
  color: #475569;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
}

#view-commissions .commissions-select-field select,
#view-commissions .commissions-mobile-select-wrap select,
#view-commissions #commissions-select {
  width: 100%;
  height: 56px;
  min-height: 56px;
  padding: 0 56px 0 18px;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  background-color: #fff;
  color: #0f172a;
  font-size: 16px;
  font-weight: 600;
  line-height: normal;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 9l6 6 6-6' stroke='%231e293b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 20px center;
  background-size: 20px 20px;
}

#view-commissions .commissions-select-field select:focus,
#view-commissions .commissions-mobile-select-wrap select:focus,
#view-commissions #commissions-select:focus {
  outline: none;
  border-color: rgba(30, 58, 138, 0.38);
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

#view-commissions .commission-tabs {
  display: none !important;
}

#view-commissions .commission-tab {
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #1e3a8a;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: none;
  opacity: 1;
  visibility: visible;
}

#view-commissions .commission-tab.active,
#view-commissions .commission-tab.is-active {
  border-color: #1e3a8a !important;
  background: #1e3a8a !important;
  color: #fff !important;
  font-weight: 500;
  opacity: 1;
  visibility: visible;
}

#view-commissions .commission-profile-card,
#view-commissions .commission-documents-panel {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  overflow: hidden;
}

#view-commissions .commission-profile-card {
  margin-bottom: 20px;
  padding: 20px;
}

#view-commissions .commission-profile-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

#view-commissions .commission-eyebrow {
  display: inline-block;
  margin-bottom: 6px;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#view-commissions .commission-profile-head h2 {
  margin: 0;
  color: #0f172a;
  font-size: 20px;
  font-weight: 500;
}

#view-commissions .commission-profile-edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #fff;
  color: #1e3a8a;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 500;
}

#view-commissions .commission-profile-edit-btn:hover {
  background: #fff;
  color: #1e3a8a;
  box-shadow: none;
  filter: none;
  transform: translateY(-1px);
}

#view-commissions .commission-profile-edit-btn:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
  box-shadow: none;
}

#view-commissions .commission-profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 18px;
  margin-bottom: 18px;
}

#view-commissions .commission-profile-grid h3 {
  margin: 0 0 4px;
  color: #475569;
  font-size: 13px;
  font-weight: 600;
}

#view-commissions .commission-profile-grid p {
  margin: 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.5;
}

#view-commissions .commission-referents-list,
#view-commissions .commission-members-list,
#view-commissions .commission-people-list {
  display: grid;
  gap: 8px;
  min-width: 0;
}

#view-commissions .commission-profile-grid .author-line {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

#view-commissions .commission-profile-grid .author-line > span:last-child {
  min-width: 0;
}

#view-commissions .commission-legacy-participants {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
}

#view-commissions .commission-legacy-participants h4 {
  margin: 0 0 8px;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
}

#view-commissions .commission-profile-grid .commission-people-empty {
  color: #64748b;
}

#view-commissions .commission-panel-head {
  padding: 16px 20px;
  border-bottom: 1px solid #f1f5f9;
}

#view-commissions .commission-panel-head h2 {
  margin: 0;
  color: #1e3a8a;
  font-size: 16px;
  font-weight: 500;
}

#view-commissions .commission-panel-head p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 13px;
}

#view-commissions .commission-documents-list {
  padding: 20px;
  display: grid;
  gap: 16px;
}

#view-commissions #commission-announcements-list,
#view-commissions #commissions-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

#view-commissions .commission-documents-panel #commission-announcements-list > .list-item,
#view-commissions .commission-documents-panel #commission-announcements-list > .list-item:hover,
#view-commissions .commission-documents-panel #commissions-list > .commission-entry,
#view-commissions .commission-documents-panel #commissions-list > .commission-entry:hover {
  padding: 0.7rem;
  margin: 0;
  background: #fff;
  transform: none;
  box-shadow: 0 8px 16px rgba(19, 39, 69, 0.05);
  border-color: var(--line);
}

#view-commissions .commission-documents-panel #commission-announcements-list > .list-item {
  display: grid;
  gap: 12px;
}

#view-commissions .commission-documents-panel #commission-announcements-list > .list-item h4 {
  margin: 0;
}

#view-commissions .commission-documents-panel #commissions-list > .commission-entry > .commission-actions {
  margin-top: 16px;
}

#view-commissions .commission-documents-panel #commission-announcements-list > .list-item {
  transition: none;
}

#view-commissions .commission-documents-panel #commissions-list > .commission-entry {
  transition: none;
}

#view-commissions #commission-announcement-form,
#view-commissions #commission-form,
#view-commissions #commission-feedback,
#view-commissions #commissions-meta {
  display: none !important;
}

#view-commissions .commission-profile-card > .row {
  display: none !important;
}

.commission-upload-modal {
  position: fixed !important;
  inset: 0 !important;
  z-index: 9999 !important;
  display: flex !important;
  align-items: flex-start !important;
  justify-content: center !important;
  padding: 88px 24px 24px !important;
  background: rgba(15, 23, 42, 0.45) !important;
  backdrop-filter: blur(4px) !important;
  overflow-y: auto !important;
}

.commission-upload-modal.hidden {
  display: none !important;
}

.commission-upload-dialog {
  width: min(560px, calc(100vw - 32px)) !important;
  max-height: calc(100vh - 120px) !important;
  background: #fff !important;
  border-radius: 18px !important;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.25) !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
}

.commission-upload-head {
  background: #1e3a8a !important;
  color: #fff !important;
  padding: 16px 20px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

.commission-upload-head h2 {
  margin: 0 !important;
  color: #fff !important;
  font-size: 18px !important;
  font-weight: 500 !important;
}

.commission-upload-close {
  width: 32px !important;
  height: 32px !important;
  border: none !important;
  border-radius: 999px !important;
  background: rgba(255,255,255,0.12) !important;
  color: #fff !important;
  font-size: 24px !important;
  line-height: 1 !important;
  cursor: pointer !important;
}

.commission-upload-form {
  padding: 18px 20px 20px !important;
  overflow-y: auto !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
}

.commission-upload-form label {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  color: #475569 !important;
  font-size: 13px !important;
  font-weight: 500 !important;
}

.commission-upload-form input,
.commission-upload-form select,
.commission-upload-form textarea {
  width: 100% !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 10px !important;
  padding: 9px 12px !important;
  color: #0f172a !important;
  font-size: 14px !important;
  background: #fff !important;
}

.commission-upload-form textarea {
  min-height: 96px !important;
  resize: vertical !important;
}

.commission-upload-actions {
  display: flex !important;
  justify-content: flex-end !important;
  gap: 10px !important;
  padding-top: 6px !important;
}

.commission-upload-cancel {
  border: none !important;
  background: transparent !important;
  color: #64748b !important;
  font-size: 14px !important;
  cursor: pointer !important;
}

.commission-upload-submit {
  border: none !important;
  border-radius: 10px !important;
  background: #1e3a8a !important;
  color: #fff !important;
  padding: 9px 16px !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  cursor: pointer !important;
}

@media (max-width: 720px) {
  #view-commissions .commissions-page-inner {
    padding: 20px 16px 40px;
  }

  #view-commissions .commission-profile-grid {
    grid-template-columns: 1fr;
  }
}

.tools-grid {
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 0.8rem;
}

.tool-card {
  display: grid;
  gap: 0.55rem;
  align-content: start;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

.tool-logo {
  width: 58px;
  height: 58px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid #cadcf2;
  background: #eef5ff;
  box-shadow: 0 8px 16px rgba(45, 111, 174, 0.15);
}

.tool-desc {
  margin: 0;
  color: #304c6f;
}

.tool-actions {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.tool-link-btn {
  width: fit-content;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.4rem 0.62rem;
  background: linear-gradient(180deg, #ffffff 0%, #f4f9ff 100%);
  color: var(--text);
  box-shadow: 0 4px 10px rgba(19, 39, 69, 0.08);
}

.tool-link-btn:hover {
  background: #ecf4ff;
  box-shadow: 0 8px 16px rgba(19, 39, 69, 0.13);
}

#view-tools.tools-page-shell {
  background: #f8fafc;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
  padding: 0;
}

#view-tools .tools-page {
  width: 100%;
}

#view-tools .tools-page-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 32px 48px;
}

#view-tools .tools-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

#view-tools .tools-header-copy {
  flex: 1 1 320px;
  min-width: 0;
}

#view-tools .tools-title-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
}

#view-tools .tools-header h1 {
  margin: 0;
  color: #1e3a8a;
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

#view-tools .tools-header p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 14px;
}

#view-tools .tools-app-count {
  color: #94a3b8;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

#view-tools .tools-header-actions {
  display: flex;
  justify-content: flex-start;
  margin: 18px 0 22px;
}

#view-tools .tools-header .row-between > span,
#view-tools .tools-header .row-between > h3,
#view-tools #tool-toolbar {
  display: none;
}

#view-tools .tools-section {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  overflow: hidden;
}

#view-tools .tools-favorites {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  padding: 18px 20px;
}

#view-tools .tools-favorites h2 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #0f172a;
  font-size: 16px;
  font-weight: 500;
}

#view-tools .tools-favorites h2 svg {
  width: 18px;
  height: 18px;
  color: #1e3a8a;
}

#view-tools .tools-fav-grid,
#view-tools .tools-app-sections {
  min-height: 24px;
}

#view-tools .tools-fav-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

#view-tools .tools-cat-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}

#view-tools .tools-cat-filter {
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #fff;
  color: #475569;
  padding: 8px 14px;
  font-size: 13px;
  line-height: 1.2;
  box-shadow: none;
}

#view-tools .tools-cat-filter[aria-current="true"] {
  background: #1e3a8a;
  border-color: #1e3a8a;
  color: #fff;
}

#view-tools .tools-app-sections {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  min-height: 120px;
  padding: 20px;
  display: grid;
  gap: 20px;
}

#view-tools .tools-app-section {
  display: grid;
  gap: 14px;
}

#view-tools .tools-app-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

#view-tools .tools-app-section-head h3 {
  margin: 0;
  color: #0f172a;
  font-size: 15px;
  font-weight: 500;
}

#view-tools .tools-app-section-head span {
  color: #94a3b8;
  font-size: 12px;
}

#view-tools .tools-app-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

#view-tools .tools-section-head {
  background: #1e3a8a;
  color: #fff;
  padding: 16px 20px;
}

#view-tools .tools-section-head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
}

#view-tools .tools-section-head p {
  margin: 4px 0 0;
  color: rgba(255,255,255,0.72);
  font-size: 13px;
}

#view-tools .tools-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: 20px;
}

#view-tools .tools-grid.hidden {
  display: none !important;
}

#view-tools .tools-app-card {
  min-height: 132px;
  padding: 18px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, box-shadow .2s ease;
  box-shadow: none;
}

#view-tools .tools-app-card:hover {
  background: #eff6ff;
  border-color: rgba(30, 58, 138, 0.22);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
  transform: none;
}

#view-tools .tools-app-card i,
#view-tools .tools-app-card svg {
  width: 24px;
  height: 24px;
  color: #1e3a8a;
  stroke-width: 1.7;
}

#view-tools .tools-app-card > span {
  color: #1e3a8a;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.25;
}

#view-tools .tools-app-card-dynamic {
  justify-content: flex-start;
  align-items: flex-start;
  text-align: left;
}

#view-tools .tools-app-card-dynamic > span {
  text-align: left;
}

#view-tools .tool-desc {
  margin: 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.5;
}

#view-tools .tool-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
}

#view-tools .tool-meta {
  margin-top: auto;
  color: #94a3b8;
  font-size: 11px;
  line-height: 1.4;
}

@media (max-width: 1024px) {
  #view-tools .tools-fav-grid,
  #view-tools .tools-app-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #view-tools .tools-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  #view-tools .tools-page-inner {
    padding: 20px 16px 40px;
  }

  #view-tools .tools-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 14px;
  }

  #view-tools .tools-fav-grid,
  #view-tools .tools-app-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  #view-tools .tools-app-card {
    min-height: 112px;
  }
}

.permissions-card {
  margin-top: 1rem;
  padding: 0.9rem;
}

.permissions-grid {
  overflow-x: auto;
  margin: 0.65rem 0 0.8rem;
}

.permissions-presets {
  margin-top: 0.6rem;
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.permissions-presets .preset-btn {
  padding: 0.45rem 0.6rem;
  font-size: 0.86rem;
}

#save-feature-permissions {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-height: 46px;
  padding: 0 20px;
  margin-left: auto;
  border: 0;
  border-radius: 12px;
  background: #1e3a8a;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1;
  box-shadow: none;
}

#save-feature-permissions:hover {
  background: #1e40af;
  color: #fff;
  transform: none;
  box-shadow: none;
}

#save-feature-permissions:active {
  background: #1d3a8a;
  transform: none;
}

#save-feature-permissions:focus {
  outline: none;
}

#save-feature-permissions:focus-visible {
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.14);
}

.permissions-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
}

.permissions-table th,
.permissions-table td {
  border: 1px solid var(--line);
  padding: 0.45rem 0.5rem;
  text-align: center;
  background: #fff;
}

.permissions-table th {
  background: #f1f7ff;
  color: #304f75;
  font-weight: 600;
}

.permissions-table th:first-child,
.permissions-table td:first-child {
  text-align: left;
  min-width: 220px;
}

.library-layout {
  margin-top: 0.9rem;
  display: grid;
  grid-template-columns: minmax(230px, 290px) 1fr;
  gap: 0.9rem;
}

.library-sidebar {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.75rem;
  background: linear-gradient(180deg, #f8fcff 0%, #edf5ff 100%);
  display: grid;
  align-content: start;
  gap: 0.65rem;
  box-shadow: 0 8px 16px rgba(19, 39, 69, 0.08);
}

.library-content {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.8rem;
  background: #fff;
  box-shadow: 0 8px 16px rgba(19, 39, 69, 0.08);
}

.library-grid {
  margin-top: 0.75rem;
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.library-shelves {
  margin-top: 0.75rem;
  display: grid;
  gap: 0.7rem;
}

.library-shelf {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, #fafdff 0%, #f3f8ff 100%);
  box-shadow: 0 8px 16px rgba(19, 39, 69, 0.07);
  overflow: hidden;
}

.library-shelf > summary {
  list-style: none;
  cursor: pointer;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid transparent;
}

.library-shelf > summary::-webkit-details-marker {
  display: none;
}

.library-shelf[open] > summary {
  border-bottom-color: #d3e2f4;
  background: linear-gradient(180deg, #f7fbff 0%, #edf5ff 100%);
}

.shelf-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.shelf-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
}

.shelf-count {
  border: 1px solid #cde0f7;
  background: #fff;
  color: #335b86;
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  font-size: 0.78rem;
}

.shelf-body {
  padding: 0.7rem;
  display: grid;
  gap: 0.7rem;
}

.library-subsection {
  display: grid;
  gap: 0.55rem;
}

.library-subsection h5 {
  margin: 0;
  font-size: 0.84rem;
  color: #3a5f87;
}

.library-subsection .library-grid {
  margin-top: 0;
}

#view-knowledge.knowledge-docs-page {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}

#view-documents.documents-page-shell {
  background: #f8fafc;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
  padding: 0;
}

#view-documents .documents-page {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 16px;
  background: #f8fafc;
  display: grid;
  gap: 24px;
}

#view-documents .documents-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

#view-documents .documents-header h1 {
  margin: 0;
  color: #1e3a8a;
  font-size: 24px;
  line-height: 32px;
  font-weight: 500;
}

#view-documents .documents-header p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.5;
}

#view-documents .documents-header .row-between {
  width: auto;
  margin-left: auto;
}

#view-documents .documents-header .row-between > span:first-child {
  display: none;
}

#view-documents .documents-upload-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  background: #1e3a8a;
  color: #fff;
  border: none;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

#view-documents .documents-upload-btn i,
#view-documents .documents-upload-btn svg {
  width: 16px;
  height: 16px;
  stroke-width: 2;
}

#view-documents .documents-upload-btn:hover {
  background: rgba(30, 58, 138, 0.92);
}

#view-documents .documents-folders,
#view-documents .documents-files-block {
  display: grid;
  gap: 16px;
}

#view-documents .documents-files-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 20px;
  padding: 14px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  flex-wrap: wrap;
}

#view-documents .documents-search-field,
#view-documents .documents-filter-select {
  min-width: 0;
}

#view-documents .documents-search-field {
  flex: 1 1 260px;
}

#view-documents .documents-filter-select {
  flex: 0 0 auto;
  width: auto;
  min-width: 150px;
  max-width: 190px;
}

#view-documents .documents-search-field input {
  width: 100%;
  height: 38px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  color: #0f172a;
  font-size: 13px;
  padding: 0 12px;
  box-shadow: none;
}

#view-documents .documents-filter-select select {
  width: 100%;
  height: 38px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  color: #0f172a;
  font-size: 13px;
  padding: 0 44px 0 12px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 20px center;
  background-size: 14px 14px;
  box-shadow: none;
}

#view-documents .documents-reset-filters {
  height: 38px;
  border: 0;
  background: transparent;
  color: #1e3a8a;
  padding: 0 10px;
  font-size: 13px;
  box-shadow: none;
}

#view-documents .documents-reset-filters:hover {
  background: transparent;
  color: #1b347c;
  text-decoration: underline;
  transform: none;
}

#view-documents .documents-tags-inline {
  flex-basis: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

#view-documents .documents-tag-select {
  display: block;
}

#view-documents .documents-tag-select select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background-color: #fff;
  color: #0f172a;
  font-size: 13px;
}

#view-documents .documents-tags-inline .doc-filter-tag {
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid #dbeafe;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 11px;
  line-height: 1;
  box-shadow: none;
}

#view-documents .documents-tags-inline .doc-filter-tag.active {
  border-color: #1e3a8a;
  background: #1e3a8a;
  color: #fff;
}

#view-documents .documents-tags-inline .muted {
  margin: 0;
  color: #64748b;
  font-size: 12px;
}

#view-documents .documents-upload-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 96px 24px 24px;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  overflow-y: auto;
}

#view-documents .documents-upload-modal.hidden {
  display: none !important;
}

#view-documents .documents-upload-dialog {
  width: min(560px, 100%);
  max-height: calc(100vh - 120px);
  overflow: hidden;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.25);
  display: flex;
  flex-direction: column;
}

#view-documents .documents-upload-head {
  background: #1e3a8a;
  color: #fff;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#view-documents .documents-upload-head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  color: #fff;
}

#view-documents .documents-upload-close {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

#view-documents .documents-upload-close:hover {
  background: rgba(255, 255, 255, 0.22);
}

#view-documents .documents-upload-body {
  padding: 20px;
  overflow-y: auto;
}

#view-documents .documents-upload-form.creation-panel {
  margin-top: 0;
  border: 0;
  border-radius: 0;
  padding: 20px;
  background: transparent;
  box-shadow: none;
  display: grid;
  gap: 14px;
  overflow-y: auto;
}

#view-documents .documents-upload-form .documents-upload-field {
  display: grid;
  gap: 8px;
}

#view-documents .documents-upload-form .documents-upload-field > span {
  color: #475569;
  font-size: 13px;
  font-weight: 500;
}

#view-documents .documents-upload-form input[type="text"],
#view-documents .documents-upload-form input[type="url"],
#view-documents .documents-upload-form select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  color: #0f172a;
  font-size: 14px;
  padding: 0 14px;
  box-shadow: none;
}

#view-documents .documents-upload-form select[multiple] {
  min-height: 110px;
  padding: 10px 12px;
}

#view-documents .documents-upload-form input:focus,
#view-documents .documents-upload-form select:focus {
  border-color: #1e3a8a;
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.08);
  outline: none;
}

#view-documents .documents-dropzone {
  position: relative;
  min-height: 156px;
  padding: 20px;
  border: 1px dashed #bfdbfe;
  border-radius: 16px;
  background: #f8fbff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

#view-documents .documents-dropzone > span {
  display: none;
}

#view-documents .documents-dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

#view-documents .documents-dropzone-copy {
  display: grid;
  gap: 6px;
  pointer-events: none;
}

#view-documents .documents-dropzone-copy p {
  margin: 0;
  color: #0f172a;
  font-size: 14px;
  font-weight: 500;
}

#view-documents .documents-dropzone-copy small {
  color: #64748b;
  font-size: 12px;
}

#view-documents .documents-upload-actions.row {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 6px;
}

#view-documents .documents-upload-cancel,
#view-documents #document-edit-cancel,
#view-documents #document-submit-btn {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
}

#view-documents .documents-upload-cancel,
#view-documents #document-edit-cancel {
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #475569;
}

#view-documents #document-submit-btn {
  border: none;
  background: #1e3a8a;
  color: #fff;
}

#view-documents .documents-section-head h2,
#view-documents .documents-files-top h2 {
  margin: 0;
  color: #0f172a;
  font-size: 18px;
  line-height: 1.4;
  font-weight: 500;
}

#view-documents .documents-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

#view-documents .documents-folder-breadcrumb {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.45;
}

#view-documents .documents-folder-back {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  color: #1e3a8a;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

#view-documents .documents-folder-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

#view-documents .documents-folder-card {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 14px;
  padding: 18px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  text-align: left;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

#view-documents .documents-folder-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

#view-documents .documents-folder-card strong {
  display: block;
  color: #0f172a;
  font-size: 14px;
  font-weight: 500;
}

#view-documents .documents-folder-card span {
  display: block;
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
}

#view-documents .documents-files-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

#view-documents #documents-files-meta {
  margin: 4px 0 0;
  color: #94a3b8;
  font-size: 14px;
}

#view-documents .documents-type-filters {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  overflow-x: auto;
}

#view-documents .documents-type-filters button {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #64748b;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  box-shadow: none;
}

#view-documents .documents-type-filters button:hover {
  background: #f8fafc;
  color: #1e3a8a;
  transform: none;
}

#view-documents .documents-type-filters button.active {
  background: #1e3a8a;
  color: #fff;
}

#view-documents .documents-files-table {
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

#view-documents .documents-files-head,
#view-documents .documents-file-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px 120px 160px 160px;
  gap: 16px;
  align-items: center;
}

#view-documents .documents-files-head {
  padding: 14px 20px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #94a3b8;
  font-weight: 500;
}

#view-documents .documents-files-head > span:last-child {
  text-align: right;
}

#view-documents .documents-file-list {
  display: grid;
}

#view-documents .documents-file-row {
  padding: 14px 20px;
  border-top: 1px solid #f1f5f9;
  background: #fff;
}

#view-documents .documents-file-row:first-child {
  border-top: 0;
}

#view-documents .documents-file-row.clickable {
  cursor: pointer;
}

#view-documents .documents-file-row:hover {
  background: #f8fafc;
  transform: none;
}

#view-documents .documents-file-name {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

#view-documents .documents-file-copy {
  min-width: 0;
}

#view-documents .documents-file-title {
  display: block;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 500;
  color: #0f172a;
}

#view-documents .documents-file-author,
#view-documents .documents-file-meta,
#view-documents .documents-file-row > span {
  display: block;
  font-size: 12px;
  line-height: 1.4;
  color: #64748b;
}

#view-documents .documents-file-author {
  margin-top: 3px;
}

#view-documents .documents-file-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eff6ff;
  color: #1e3a8a;
  flex-shrink: 0;
}

#view-documents .documents-file-icon svg {
  width: 18px;
  height: 18px;
}

#view-documents .documents-file-icon.pdf {
  background: #fee2e2;
  color: #b91c1c;
}

#view-documents .documents-file-icon.word {
  background: #dbeafe;
  color: #1d4ed8;
}

#view-documents .documents-file-icon.excel {
  background: #dcfce7;
  color: #15803d;
}

#view-documents .documents-file-icon.powerpoint {
  background: #ffedd5;
  color: #c2410c;
}

#view-documents .documents-file-icon.image {
  background: #f3e8ff;
  color: #7e22ce;
}

#view-documents .documents-file-actions {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  white-space: nowrap;
}

#view-documents .documents-action-btn {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  box-shadow: none;
}

#view-documents .documents-action-btn i,
#view-documents .documents-action-btn svg {
  width: 16px;
  height: 16px;
}

#view-documents .documents-empty-state {
  margin: 0;
  padding: 16px 18px;
}

#view-documents .documents-action-download:hover {
  color: #1e3a8a;
  background: #eff6ff;
  border-color: #bfdbfe;
  transform: none;
}

#view-documents .documents-action-edit:hover {
  color: #b45309;
  background: #fffbeb;
  border-color: #fde68a;
  transform: none;
}

#view-documents .documents-action-delete:hover {
  color: #b91c1c;
  background: #fef2f2;
  border-color: #fecaca;
  transform: none;
}

#view-knowledge.knowledge-docs-page.active {
  display: block;
}

#view-knowledge .knowledge-layout-hidden {
  display: none !important;
}

#view-knowledge.knowledge-qa-shell {
  background: #f8fafc;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
  padding: 0;
}

#view-knowledge .knowledge-qa-page {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 16px;
  background: #f8fafc;
}

#view-knowledge .knowledge-qa-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

#view-knowledge .knowledge-qa-header h1 {
  margin: 0;
  color: #1e3a8a;
  font-size: 24px;
  line-height: 32px;
  font-weight: 500;
}

#view-knowledge .knowledge-qa-header p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.5;
}

#view-knowledge .knowledge-ask-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: #1e3a8a;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  box-shadow: none;
}

#view-knowledge .knowledge-ask-btn:hover {
  transform: none;
  background: #1e3a8a;
}

#view-knowledge .knowledge-qa-layout {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr) 300px;
  gap: 24px;
  align-items: start;
}

#view-knowledge .knowledge-left-rail,
#view-knowledge .knowledge-right-rail,
#view-knowledge .knowledge-center {
  min-width: 0;
}

#view-knowledge .knowledge-left-rail {
  position: sticky;
  top: 24px;
  display: grid;
  gap: 18px;
}

#view-knowledge .knowledge-right-rail {
  position: sticky;
  top: 24px;
  display: grid;
  gap: 18px;
}

#view-knowledge .knowledge-topic-nav,
#view-knowledge .knowledge-left-block,
#view-knowledge .knowledge-left-stats {
  padding: 18px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

#view-knowledge .knowledge-side-card {
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

#view-knowledge .knowledge-side-card > header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid #f1f5f9;
}

#view-knowledge .knowledge-side-icon {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: #eff6ff;
  color: #1e3a8a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

#view-knowledge .knowledge-side-icon svg {
  width: 16px;
  height: 16px;
}

#view-knowledge .knowledge-side-card > header h3 {
  margin: 0;
  color: #0f172a;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
}

#view-knowledge .knowledge-hot-list,
#view-knowledge .knowledge-contrib-list {
  display: grid;
}

#view-knowledge .knowledge-hot-item,
#view-knowledge .knowledge-contrib-item {
  width: 100%;
  border: 0;
  border-top: 1px solid #f1f5f9;
  background: #fff;
  box-shadow: none;
}

#view-knowledge .knowledge-hot-item:first-child,
#view-knowledge .knowledge-contrib-item:first-child {
  border-top: 0;
}

#view-knowledge .knowledge-hot-item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 14px 16px;
  text-align: left;
}

#view-knowledge .knowledge-hot-item:hover,
#view-knowledge .knowledge-contrib-item:hover {
  background: #f8fafc;
  transform: none;
}

#view-knowledge .knowledge-hot-item strong {
  color: #1e3a8a;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
}

#view-knowledge .knowledge-hot-item span {
  color: #475569;
  font-size: 13px;
  line-height: 1.5;
}

#view-knowledge .knowledge-contrib-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
}

#view-knowledge .knowledge-contrib-item strong {
  display: block;
  color: #0f172a;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 500;
}

#view-knowledge .knowledge-contrib-item small {
  display: block;
  margin-top: 2px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.4;
}

#view-knowledge .knowledge-contrib-item > span:last-child {
  color: #1e3a8a;
  font-size: 13px;
  line-height: 1;
  font-weight: 600;
}

#view-knowledge .knowledge-topic-nav {
  display: grid;
  gap: 8px;
}

#view-knowledge .knowledge-topic-item {
  width: 100%;
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #475569;
  font-size: 14px;
  line-height: 1.4;
  text-align: left;
  box-shadow: none;
}

#view-knowledge .knowledge-topic-item:hover {
  background: #f8fafc;
  transform: none;
}

#view-knowledge .knowledge-topic-item.active {
  background: #eff6ff;
  color: #1e3a8a;
  font-weight: 500;
}

#view-knowledge .knowledge-left-block h3,
#view-knowledge .knowledge-left-stats p {
  margin: 0 0 12px;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#view-knowledge .knowledge-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

#view-knowledge .knowledge-tag-list button {
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #fff;
  color: #475569;
  padding: 6px 10px;
  font-size: 12px;
  line-height: 1.3;
  box-shadow: none;
}

#view-knowledge .knowledge-tag-list button:hover {
  background: #f8fafc;
  transform: none;
}

#view-knowledge .knowledge-left-stats {
  display: grid;
  gap: 12px;
}

#view-knowledge .knowledge-left-stats div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #475569;
  font-size: 14px;
  line-height: 1.4;
}

#view-knowledge .knowledge-left-stats strong {
  color: #0f172a;
  font-size: 14px;
  font-weight: 600;
}

#view-knowledge .knowledge-list-view {
  display: grid;
  gap: 18px;
}

#view-knowledge .knowledge-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

#view-knowledge .knowledge-list-title {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

#view-knowledge .knowledge-list-title h2 {
  margin: 0;
  color: #0f172a;
  font-size: 18px;
  line-height: 1.4;
  font-weight: 500;
}

#view-knowledge .knowledge-list-title span {
  color: #94a3b8;
  font-size: 14px;
}

#view-knowledge .knowledge-sort-tabs {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  overflow-x: auto;
}

#view-knowledge .knowledge-sort-tabs button {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #64748b;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: none;
  white-space: nowrap;
}

#view-knowledge .knowledge-sort-tabs button:hover {
  background: #f8fafc;
  color: #1e3a8a;
  transform: none;
}

#view-knowledge .knowledge-sort-tabs button.active {
  background: #1e3a8a;
  color: #fff;
}

#view-knowledge .knowledge-question-list {
  display: grid;
  gap: 16px;
}

#view-knowledge .knowledge-question-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 20px;
  padding: 20px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

#view-knowledge .knowledge-question-card:hover {
  background: #f8fafc;
  transform: none;
}

#view-knowledge .knowledge-question-card[role="button"] {
  cursor: pointer;
}

#view-knowledge .knowledge-detail-view {
  display: grid;
  gap: 18px;
}

#view-knowledge .knowledge-back-btn {
  width: fit-content;
  border: 0;
  background: transparent;
  color: #1e3a8a;
  padding: 0;
  font-size: 14px;
  font-weight: 500;
  box-shadow: none;
}

#view-knowledge .knowledge-back-btn:hover {
  color: #1b347c;
  transform: none;
  text-decoration: underline;
}

#view-knowledge .knowledge-detail-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 24px;
  padding: 24px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

#view-knowledge .knowledge-vote-column {
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 4px;
  color: #64748b;
  font-size: 13px;
}

#view-knowledge .knowledge-vote-control {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

#view-knowledge .knowledge-vote-control-inline {
  justify-self: start;
}

#view-knowledge .knowledge-vote-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: none;
}

#view-knowledge .knowledge-vote-btn svg {
  width: 16px;
  height: 16px;
}

#view-knowledge .knowledge-vote-btn:hover {
  border-color: #1e3a8a;
  color: #1e3a8a;
  transform: none;
}

#view-knowledge .knowledge-vote-btn.active,
#view-knowledge .knowledge-vote-btn.is-upvoted {
  background: #1e3a8a;
  border-color: #1e3a8a;
  color: #fff;
}

#view-knowledge .knowledge-vote-down.active,
#view-knowledge .knowledge-vote-down.is-downvoted {
  background: #e11d48;
  border-color: #e11d48;
}

#view-knowledge .knowledge-vote-score {
  font-size: 18px;
  color: #334155;
  line-height: 1;
  font-weight: 600;
}

#view-knowledge .knowledge-detail-main h1 {
  margin: 0;
  color: #0f172a;
  font-size: 24px;
  line-height: 1.25;
  font-weight: 500;
}

#view-knowledge .knowledge-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
  color: #94a3b8;
  font-size: 13px;
}

#view-knowledge .knowledge-detail-body {
  margin-top: 18px;
  color: #334155;
  font-size: 15px;
  line-height: 1.7;
}

#view-knowledge .knowledge-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

#view-knowledge .knowledge-detail-tags span {
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1e3a8a;
  padding: 6px 10px;
  font-size: 12px;
  line-height: 1.3;
}

#view-knowledge .knowledge-detail-author {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid #f1f5f9;
}

#view-knowledge .knowledge-detail-author strong {
  display: block;
  color: #0f172a;
  font-size: 14px;
  font-weight: 500;
}

#view-knowledge .knowledge-detail-author small {
  display: block;
  margin-top: 2px;
  color: #64748b;
  font-size: 12px;
}

#view-knowledge .knowledge-answers,
#view-knowledge .knowledge-answer-form {
  padding: 24px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

#view-knowledge .knowledge-answers h2,
#view-knowledge .knowledge-answer-form h3 {
  margin: 0 0 16px;
  color: #0f172a;
  font-size: 18px;
  line-height: 1.4;
  font-weight: 500;
}

#view-knowledge .knowledge-answers-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

#view-knowledge .knowledge-answers-head span {
  color: #94a3b8;
  font-size: 13px;
}

#view-knowledge .knowledge-answer-thread {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

#view-knowledge .knowledge-answer {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 14px;
  padding: 16px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
}

#view-knowledge .knowledge-answer-content {
  min-width: 0;
}

#view-knowledge .knowledge-answer-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
  color: #64748b;
}

#view-knowledge .knowledge-answer-meta strong {
  color: #0f172a;
  font-size: 14px;
  font-weight: 500;
}

#view-knowledge .knowledge-answer-content p {
  margin: 8px 0 10px;
  color: #334155;
  font-size: 14px;
  line-height: 1.6;
}

#view-knowledge .knowledge-answer-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

#view-knowledge .knowledge-question-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

#view-knowledge .knowledge-answer-actions button {
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 12px;
  padding: 0;
  cursor: pointer;
  box-shadow: none;
}

#view-knowledge .knowledge-question-actions button {
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 12px;
  padding: 0;
  cursor: pointer;
  box-shadow: none;
}

#view-knowledge .knowledge-question-actions button:hover,
#view-knowledge .knowledge-answer-actions button:hover {
  color: #1e3a8a;
  transform: none;
}

#view-knowledge .knowledge-answer-children {
  margin-top: 14px;
  padding-left: 18px;
  border-left: 2px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#view-knowledge .knowledge-answer-child {
  border-radius: 12px;
}

#view-knowledge .knowledge-inline-reply-form {
  margin-top: 12px;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}

#view-knowledge .knowledge-inline-reply-form textarea {
  width: 100%;
  min-height: 88px;
  resize: vertical;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  color: #0f172a;
  background: #fff;
  outline: none;
  box-shadow: none;
}

#view-knowledge .knowledge-inline-reply-form textarea:focus {
  border-color: rgba(30, 58, 138, 0.45);
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.10);
}

#view-knowledge .knowledge-inline-reply-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}

#view-knowledge .knowledge-reply-cancel {
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 13px;
  cursor: pointer;
  box-shadow: none;
}

#view-knowledge .knowledge-reply-submit {
  border: none;
  border-radius: 10px;
  background: #1e3a8a;
  color: #fff;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: none;
}

#view-knowledge .knowledge-inline-reply-toast {
  margin-top: 12px;
  color: #15803d;
  font-size: 12px;
  line-height: 1.4;
}

#view-knowledge .knowledge-answer-form textarea {
  width: 100%;
  min-height: 120px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  color: #0f172a;
  font-size: 14px;
  line-height: 1.6;
  padding: 12px 14px;
  resize: vertical;
  box-shadow: none;
  outline: none;
}

#view-knowledge .knowledge-answer-form textarea:focus {
  border-color: rgba(30, 58, 138, 0.45);
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.10);
}

#view-knowledge .knowledge-answer-form button {
  margin-top: 14px;
  border: 0;
  border-radius: 999px;
  background: #1e3a8a;
  color: #fff;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: none;
}

#view-knowledge .knowledge-answer-form button:hover {
  background: #1b347c;
  transform: none;
}

#view-knowledge .knowledge-question-stats {
  display: grid;
  gap: 12px;
  justify-items: center;
  align-content: start;
  color: #64748b;
  font-size: 12px;
}

#view-knowledge .knowledge-question-stats div {
  display: grid;
  gap: 4px;
  justify-items: center;
}

#view-knowledge .knowledge-question-stats strong {
  color: #0f172a;
  font-size: 18px;
  line-height: 1;
  font-weight: 600;
}

#view-knowledge .knowledge-question-stats small {
  color: #94a3b8;
  font-size: 12px;
}

#view-knowledge .knowledge-question-main {
  min-width: 0;
  display: grid;
  gap: 14px;
}

#view-knowledge .knowledge-question-main h3 {
  margin: 0;
  color: #0f172a;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 500;
}

#view-knowledge .knowledge-question-main p {
  margin: 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.6;
}

#view-knowledge .knowledge-question-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

#view-knowledge .knowledge-question-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #475569;
  font-size: 12px;
}

#view-knowledge .knowledge-question-footer {
  padding-top: 14px;
  border-top: 1px solid #f1f5f9;
}

#view-knowledge .knowledge-footer-stats {
  display: none;
}

#view-knowledge .knowledge-author {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #475569;
  font-size: 13px;
  line-height: 1.4;
  flex-wrap: wrap;
}

#view-knowledge .knowledge-avatar {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #dbeafe;
  color: #1e3a8a;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}

#view-knowledge .knowledge-author small {
  color: #94a3b8;
  font-size: 12px;
}

#view-knowledge .knowledge-qa-placeholder {
  display: grid;
  gap: 8px;
  padding: 20px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

#view-knowledge .knowledge-qa-placeholder strong {
  color: #0f172a;
  font-size: 14px;
  font-weight: 500;
}

#view-knowledge .knowledge-qa-placeholder span {
  color: #64748b;
  font-size: 13px;
  line-height: 1.5;
}

#view-knowledge .knowledge-page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

#view-knowledge .knowledge-page-title {
  margin: 0;
  color: #1e3a8a;
  font-size: 1.5rem;
  line-height: 2rem;
  font-weight: 500;
}

#view-knowledge .knowledge-page-subtitle {
  margin: 0.25rem 0 0;
  color: #64748b;
  font-size: 0.875rem;
  line-height: 1.25rem;
}

#view-knowledge #toggle-knowledge-form {
  padding: 0.5rem 1rem;
  border: 0;
  border-radius: 999px;
  background: #1e3a8a;
  color: #fff;
  box-shadow: none;
  min-height: auto;
}

#view-knowledge #toggle-knowledge-form:hover {
  background: rgba(30, 58, 138, 0.92);
}

#view-knowledge .knowledge-folders-block,
#view-knowledge .knowledge-files-block {
  display: grid;
  gap: 1rem;
}

#view-knowledge .knowledge-folders-block {
  margin-bottom: 1.5rem;
}

#view-knowledge .knowledge-section-head h2,
#view-knowledge .knowledge-files-top h2 {
  margin: 0;
  color: #94a3b8;
  font-size: 0.875rem;
  line-height: 1rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

#view-knowledge .knowledge-folder-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

#view-knowledge .knowledge-folder-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  padding: 1rem;
}

#view-knowledge .knowledge-folder-icon {
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: 0.75rem;
  border-radius: 0.75rem;
  background: #eff6ff;
  color: #1e3a8a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#view-knowledge .knowledge-folder-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

#view-knowledge .knowledge-folder-card h3 {
  margin: 0;
  color: #0f172a;
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 500;
}

#view-knowledge .knowledge-folder-card p {
  margin: 0.125rem 0 0;
  color: #94a3b8;
  font-size: 0.75rem;
  line-height: 1rem;
}

#view-knowledge .knowledge-files-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

#view-knowledge .knowledge-type-filters {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
}

#view-knowledge .knowledge-type-chip {
  flex-shrink: 0;
  padding: 0.375rem 0.875rem;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #fff;
  color: #1e3a8a;
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 400;
  box-shadow: none;
}

#view-knowledge .knowledge-type-chip.active {
  background: #1e3a8a;
  border-color: #1e3a8a;
  color: #fff;
}

#view-knowledge .knowledge-files-table {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

#view-knowledge .knowledge-files-head {
  display: none;
}

#view-knowledge .knowledge-doc-body {
  padding: 8px;
  display: grid;
  gap: 0.75rem;
}

#view-knowledge .knowledge-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

#view-knowledge .knowledge-toolbar label {
  display: block;
  min-width: 0;
}

#view-knowledge .knowledge-toolbar label > span {
  display: none;
}

#view-knowledge .knowledge-toolbar .search-field,
#view-knowledge .knowledge-toolbar input[type="search"],
#view-knowledge .knowledge-toolbar input[type="text"] {
  flex: 1;
  min-width: 260px;
}

#view-knowledge .knowledge-toolbar .filter-field {
  min-width: 170px;
}

#view-knowledge .knowledge-toolbar input,
#view-knowledge .knowledge-toolbar select {
  min-height: 2.5rem;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #fff;
  box-shadow: none;
  font-size: 0.75rem;
}

#view-knowledge .knowledge-toolbar .toolbar-reset {
  min-height: 2.5rem;
  padding: 0.5rem 1rem !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 999px !important;
  background: #fff !important;
  box-shadow: none !important;
  font-size: 0.75rem;
}

#view-knowledge #knowledge-library-meta {
  margin: 0;
  color: #94a3b8;
  font-size: 0.75rem;
  line-height: 1rem;
}

#view-knowledge #knowledge-tags-cloud {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

#view-knowledge .knowledge-list {
  display: grid;
  gap: 0;
}

#view-knowledge .knowledge-list .list-item,
#view-knowledge .knowledge-list .list-item:hover,
#view-knowledge .knowledge-list .list-item:focus,
#view-knowledge .knowledge-list .list-item:focus-within,
#view-knowledge .knowledge-list .knowledge-card,
#view-knowledge .knowledge-list .knowledge-card:hover {
  transform: none !important;
  translate: none !important;
  scale: 1 !important;
  margin: 0 !important;
  padding: 12px !important;
  border: 0 !important;
  border-radius: 8px !important;
  box-shadow: none !important;
  background: #fff !important;
  box-sizing: border-box;
  transition: none !important;
  cursor: default !important;
}

#view-knowledge .knowledge-file-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: center;
  border-bottom: 1px solid #f1f5f9;
  cursor: default;
}

#view-knowledge .knowledge-file-row:last-child {
  border-bottom: 0;
}

#view-knowledge .knowledge-file-name {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

#view-knowledge .knowledge-file-icon {
  width: 36px;
  height: 36px;
  border-radius: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

#view-knowledge .knowledge-file-icon svg {
  width: 1rem;
  height: 1rem;
}

#view-knowledge .knowledge-file-icon.all,
#view-knowledge .knowledge-file-icon.kb,
#view-knowledge .knowledge-file-icon.word {
  background: #dbeafe;
  color: #1d4ed8;
}

#view-knowledge .knowledge-file-icon.pdf {
  background: #ffe4e6;
  color: #be123c;
}

#view-knowledge .knowledge-file-icon.excel {
  background: #d1fae5;
  color: #047857;
}

#view-knowledge .knowledge-file-icon.powerpoint {
  background: #fef3c7;
  color: #b45309;
}

#view-knowledge .knowledge-file-icon.image {
  background: #ede9fe;
  color: #7c3aed;
}

#view-knowledge .knowledge-file-copy {
  min-width: 0;
  display: grid;
  gap: 0.125rem;
}

#view-knowledge .knowledge-file-copy strong {
  display: block;
  color: #0f172a;
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#view-knowledge .knowledge-file-copy small,
#view-knowledge .knowledge-file-type,
#view-knowledge .knowledge-file-size,
#view-knowledge .knowledge-file-date,
#view-knowledge .knowledge-file-action-empty {
  color: #94a3b8;
  font-size: 0.75rem;
  line-height: 1rem;
}

#view-knowledge .knowledge-file-action {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.625rem;
}

#view-knowledge .knowledge-row-action {
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  min-height: auto !important;
  color: #1e3a8a;
  font-size: 0.75rem;
  line-height: 1rem;
  font-weight: 500;
}

#view-knowledge .knowledge-row-action:hover {
  background: transparent !important;
  text-decoration: underline;
}

#view-knowledge .knowledge-file-add-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: transparent !important;
  color: #64748b;
  box-shadow: none !important;
  min-height: auto !important;
}

#view-knowledge .knowledge-file-add-btn:hover {
  background: transparent !important;
  color: #1e3a8a;
}

#view-knowledge .knowledge-file-add-btn svg {
  width: 1rem;
  height: 1rem;
}

@media (min-width: 640px) {
  #view-knowledge .knowledge-folder-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1025px) {
  #view-knowledge .knowledge-files-head {
    display: grid;
    grid-template-columns: 1fr 120px 120px 160px 80px;
    gap: 1rem;
    padding: 0.75rem 1.25rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    color: #94a3b8;
    font-size: 11px;
    line-height: 1rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
  }

  #view-knowledge .knowledge-file-row {
    grid-template-columns: 1fr 120px 120px 160px 80px;
  }
}

@media (min-width: 1025px) {
  #view-knowledge .knowledge-folder-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  #view-knowledge .knowledge-page-header,
  #view-knowledge .knowledge-files-top,
  #view-knowledge .knowledge-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  #view-knowledge .knowledge-toolbar .search-field,
  #view-knowledge .knowledge-toolbar .filter-field,
  #view-knowledge .knowledge-toolbar .toolbar-reset {
    min-width: 0;
    width: 100%;
  }

  #view-knowledge .knowledge-file-row {
    align-items: flex-start;
  }
}

.doc-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.7rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 8px 16px rgba(19, 39, 69, 0.07);
  display: grid;
  gap: 0.45rem;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.doc-card:hover {
  transform: translateY(-2px);
  border-color: #c7daf1;
  box-shadow: 0 14px 24px rgba(19, 39, 69, 0.14);
}

.doc-card.clickable {
  cursor: pointer;
}

.doc-card.clickable:focus-visible {
  outline: 3px solid rgba(45, 111, 174, 0.3);
  outline-offset: 2px;
}

.doc-icon {
  width: 42px;
  height: 52px;
  border-radius: 10px;
  background: linear-gradient(180deg, #dcecff 0%, #c9e0ff 100%);
  border: 1px solid #b8d3f4;
  display: grid;
  place-items: center;
  color: #1f568e;
  font-weight: 700;
}

.doc-card-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.55rem;
  align-items: start;
}

.doc-title {
  margin: 0;
  font-size: 0.98rem;
}

.doc-category {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.78rem;
  color: #2f5e91;
  background: #edf5ff;
  border: 1px solid #cfe0f7;
  border-radius: 999px;
  padding: 0.15rem 0.5rem;
}

.doc-tag {
  border: 1px solid #c9d8ee;
  background: linear-gradient(180deg, #f8fbff 0%, #edf5ff 100%);
  color: #274c78;
  border-radius: 999px;
  padding: 0.14rem 0.55rem;
  font-size: 0.76rem;
}

.doc-tag-btn {
  cursor: pointer;
}

.doc-edit-hint {
  margin: 0;
  font-size: 0.78rem;
  color: #3f628b;
}

.doc-filter-tag {
  border: 1px solid #cfddf1;
  background: #fff;
  color: #315782;
  border-radius: 999px;
  padding: 0.14rem 0.55rem;
  font-size: 0.76rem;
}

.doc-filter-tag.active {
  border-color: #a5c4e8;
  background: #dfeeff;
  color: #1f4c7a;
}

.knowledge-card {
  display: grid;
  gap: 0.45rem;
}

.knowledge-card .article-rich {
  max-height: 220px;
  overflow: auto;
  padding-right: 0.25rem;
}

.editor-toolbar {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.editor-toolbar button {
  padding: 0.35rem 0.55rem;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  box-shadow: 0 4px 8px rgba(19, 39, 69, 0.08);
}

.rich-preview {
  border: 1px solid var(--line);
  border-radius: 12px;
  min-height: 96px;
  padding: 0.7rem;
  background: #fff;
}

.article-rich p {
  margin: 0.35rem 0;
}

.article-rich h4 {
  margin: 0.45rem 0 0.3rem;
}

.article-rich ul {
  margin: 0.3rem 0 0.4rem 1.15rem;
}

.article-rich blockquote {
  margin: 0.5rem 0;
  padding: 0.4rem 0.7rem;
  border-left: 3px solid #89a8ca;
  background: #f4f8fd;
  color: #314968;
}

.article-rich a {
  color: var(--accent);
}

.news-media-grid {
  margin-top: 0.6rem;
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.media-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 8px 16px rgba(19, 39, 69, 0.08);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.media-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 24px rgba(19, 39, 69, 0.14);
}

.media-card img {
  width: 100%;
  height: 125px;
  object-fit: cover;
  display: block;
}

.media-card .media-meta {
  padding: 0.45rem 0.55rem 0.6rem;
  display: grid;
  gap: 0.3rem;
}

.media-card video {
  width: 100%;
  max-height: 180px;
  display: block;
}

.mail-page {
  height: 100%;
  min-height: 0;
  padding: 0 !important;
  background: #f8fafc !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  overflow: hidden;
}

#view-messages.mail-page.active {
  display: flex;
  flex-direction: column;
}

.mail-wrap {
  width: 100%;
  height: 100%;
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  margin: 0;
  max-width: none;
  background: #f8fafc;
  overflow: hidden;
}

@media (min-width: 1025px) {
  #app-view .shell-main > main:has(#view-messages.active) {
    padding: 0;
    overflow: hidden;
  }

  #app-view .shell-content:has(> #view-messages.active) {
    height: 100%;
    min-height: 0;
    gap: 0;
    padding-bottom: 0;
  }

  #app-view .shell-content > #view-messages.active {
    height: 100%;
    min-height: 0;
  }

  #view-messages .mail-wrap {
    display: grid;
    grid-template-columns: 264px 420px minmax(0, 1fr);
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  #view-messages .mail-folders,
  #view-messages .mail-list-pane,
  #view-messages .mail-read-pane,
  #view-messages .mail-read-empty,
  #view-messages .mail-read-content {
    height: 100%;
    min-height: 0;
  }

  #view-messages .mail-folders {
    width: 264px;
    min-width: 264px;
    max-width: 264px;
  }

  #view-messages .mail-list-pane {
    width: 420px;
    min-width: 420px;
    max-width: 420px;
  }

  #view-messages .mail-list-header,
  #view-messages .mail-read-header {
    min-height: 72px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
  }

  #view-messages .mail-list-header > div {
    display: grid;
    gap: 4px;
    min-width: 0;
  }

  #view-messages .mail-list-header p {
    margin: 0;
  }

  #view-messages .mail-message-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
  }

  #view-messages .mail-read-pane {
    border-left: 1px solid #e2e8f0;
  }

  #view-messages .mail-read-content {
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  #view-messages .mail-read-body {
    flex: 1 1 auto;
    min-height: 0;
    padding: 0;
    overflow: hidden;
  }

  #view-messages .chat-list,
  #view-messages .mail-thread {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 24px 28px;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
  }

  #view-messages .mail-read-actions {
    flex: 0 0 auto;
    padding: 16px 20px;
  }

  #view-messages .chat-input-bar,
  #view-messages #message-form {
    flex-wrap: nowrap;
    align-items: flex-end;
  }

  #view-messages #message-form .chat-input {
    min-height: 48px;
    max-height: 120px;
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  #view-messages .mail-wrap {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    width: 100%;
    min-height: 0;
    height: 100%;
    overflow: hidden;
  }

  #view-messages .mail-folders {
    display: flex;
    width: 240px;
    min-width: 240px;
    max-width: 240px;
    grid-column: 1;
    border-right: 1px solid #e2e8f0;
  }

  #view-messages .mail-list-pane,
  #view-messages .mail-read-pane {
    grid-column: 2;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    height: 100%;
    min-height: 0;
  }

  #view-messages .mail-list-pane {
    border-right: 0;
  }

  #view-messages .mail-read-pane {
    border-left: 1px solid #e2e8f0;
  }

  #view-messages .mail-wrap[data-view="list"] .mail-list-pane {
    display: flex;
  }

  #view-messages .mail-wrap[data-view="list"] .mail-read-pane {
    display: none;
  }

  #view-messages .mail-wrap[data-view="read"] .mail-list-pane {
    display: none;
  }

  #view-messages .mail-wrap[data-view="read"] .mail-read-pane,
  #view-messages .mail-wrap.has-open-conversation .mail-read-pane {
    display: flex;
    flex-direction: column;
  }

  #view-messages .mail-read-content:not(.hidden) {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
  }

  #view-messages .mail-back-btn {
    display: inline-flex;
  }

  #view-messages .mail-read-header {
    padding: 12px 16px;
    gap: 10px;
  }

  #view-messages .mail-read-header h4,
  #view-messages #chat-title {
    font-size: 1rem;
    line-height: 1.3;
  }

  #view-messages .mail-read-body {
    padding: 20px 20px 18px;
  }

  #view-messages .chat-list,
  #view-messages .mail-thread {
    padding: 20px;
    gap: 16px;
  }

  #view-messages .chat-message {
    max-width: 88%;
  }

  #view-messages .chat-bubble {
    padding: 13px 14px;
  }

  #view-messages .chat-text {
    font-size: 14px;
    line-height: 1.5;
  }

  #view-messages .mail-read-actions {
    padding: 12px 16px;
  }

  #view-messages #message-form textarea {
    min-height: 88px;
  }
}

.mail-folders {
  width: 264px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border-right: 1px solid #e2e8f0;
}

.mail-compose-zone,
.mail-list-header,
.mail-read-header,
.mail-read-actions {
  padding: 1rem;
}

.mail-compose-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: none;
}

.mail-compose-btn:hover:not(:disabled) {
  transform: none;
  box-shadow: none;
  filter: none;
}

.mail-compose-btn-sidebar {
  width: 100%;
  justify-content: center;
}

.mail-compose-btn-mobile {
  display: none;
  width: auto;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .mail-compose-btn-mobile {
    display: none !important;
  }
}

.mail-folder-nav {
  flex: 1;
  overflow-y: auto;
  padding: 0 8px 8px;
}

.mail-folder-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: 10px;
  padding: 10px 12px;
  background: transparent;
  color: #475569;
  font-size: 14px;
  text-align: left;
  box-shadow: none;
}

.mail-folder-item + .mail-folder-item {
  margin-top: 4px;
}

.mail-folder-item i {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.mail-folder-item:hover:not(:disabled) {
  background: #f8fafc;
  color: #1e293b;
  transform: none;
  box-shadow: none;
  filter: none;
}

.mail-folder-item.active {
  background: #eff6ff;
  color: #1e3a8a;
  font-weight: 500;
}

.mail-folder-item strong {
  margin-left: auto;
  background: #1e3a8a;
  color: #fff;
  border-radius: 999px;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 600;
}

.mail-list-pane,
.mail-read-pane {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.mail-list-pane {
  width: 456px;
  flex-shrink: 0;
  background: #fff;
  border-right: 1px solid #e2e8f0;
}

.mail-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #e2e8f0;
}

.mail-list-header > div {
  min-width: 0;
}

.mail-list-header h4,
.mail-read-header h4 {
  margin: 0;
  color: #1e3a8a;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 600;
}

.mail-message-list {
  flex: 1;
  overflow-y: auto;
}

.mail-message-row {
  width: 100%;
  border: 0;
  border-bottom: 1px solid #f1f5f9;
  border-radius: 0;
  padding: 0.95rem 1rem;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  background: #fff;
  text-align: left;
  box-shadow: none;
}

.mail-message-row:last-child {
  border-bottom: 0;
}

.mail-message-row:hover:not(:disabled) {
  background: #f8fafc;
  transform: none;
  box-shadow: none;
  filter: none;
}

.mail-message-row.active {
  background: #eef2ff;
}

.mail-avatar,
.message-avatar,
.msg-avatar {
  width: 44px;
  height: 44px;
  min-width: 44px;
  max-width: 44px;
  min-height: 44px;
  max-height: 44px;
  border-radius: 999px;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #dbeafe;
  color: #1e3a8a;
  font-size: 13px;
  font-weight: 500;
}

.mail-avatar > img,
.message-avatar > img,
.msg-avatar > img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  border-radius: inherit;
}

.mail-message-body {
  min-width: 0;
  display: grid;
  gap: 0.2rem;
}

.mail-message-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-width: 0;
}

.mail-message-topline strong,
.mail-message-meta,
.mail-message-preview {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mail-message-topline strong {
  color: #0f172a;
  font-size: 0.92rem;
}

.mail-message-time {
  color: #94a3b8;
  font-size: 0.72rem;
  flex: 0 0 auto;
}

.mail-message-meta {
  color: #64748b;
  font-size: 0.76rem;
}

.mail-message-preview {
  color: #94a3b8;
  font-size: 0.78rem;
}

.mail-message-side {
  display: grid;
  gap: 0.35rem;
  justify-items: center;
  align-items: center;
}

.partner-unread {
  min-width: 1.6rem;
  height: 1.6rem;
  border-radius: 999px;
  padding: 0 0.35rem;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #0f172a;
  background: #e2e8f0;
}

.partner-btn.has-unread .partner-unread,
.mail-message-row.has-unread .partner-unread {
  color: #1e3a8a;
  background: #dbeafe;
}

.partner-signal {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: #60a5fa;
}

#message-form {
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
}

#message-form textarea {
  flex: 1 1 240px;
  min-width: 180px;
  min-height: 96px;
  resize: vertical;
  border-color: #e2e8f0;
  background: #fff;
}

#message-ai-draft-btn {
  white-space: nowrap;
}

.chat-list {
  border: 0;
  border-radius: 0;
  background: #f8fafc;
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

#chat-title {
  font-size: 1.35rem;
  font-weight: 600;
  color: #0f172a;
}

.chat-message {
  display: flex;
  gap: 12px;
  max-width: 78%;
}

.chat-message-in {
  align-self: flex-start;
}

.chat-message-out {
  align-self: flex-end;
}

.chat-bubble {
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 14px 16px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15,23,42,.04);
  min-width: 0;
}

.chat-message-out .chat-bubble {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.chat-bubble-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 8px;
}

.chat-meta {
  font-size: 12px;
  color: #64748b;
  min-width: 0;
}

.chat-actions {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  opacity: 0.72;
  transition: opacity 160ms ease;
}

.chat-message:hover .chat-actions {
  opacity: 1;
}

.icon-action {
  min-width: 30px;
  min-height: 30px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 0;
  background: #fff;
  color: #64748b;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow: none;
}

.icon-action:hover {
  transform: none;
  box-shadow: none;
  background: #f8fafc;
}

.icon-action svg {
  width: 11px;
  height: 11px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  vector-effect: non-scaling-stroke;
}

.reply-action {
  color: #1e3a8a;
}

.edit-action {
  color: #64748b;
}

.delete-action {
  color: #b91c1c;
}

.news-delete-btn,
.rss-delete-btn,
.doc-delete-btn,
.event-delete-btn,
.cotech-delete-btn,
.cotech-announcement-delete-btn,
.caag-announcement-delete-btn,
.bureau-announcement-delete-btn,
.bureau-delete-btn,
.bureau-calendar-delete-btn,
.commission-announcement-delete-btn,
.commission-delete-btn,
.documents-action-delete,
.delete-action,
.icon-action.delete-action,
.icon-action.delete-action .icon-action-label,
.cotech-video-card button.delete,
.cotech-video-card [data-action="delete"] {
  color: var(--danger);
}

.icon-action-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.chat-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  display: grid;
  gap: 0.55rem;
  color: #0f172a;
  font-size: 15px;
  line-height: 1.55;
}

.chat-reply-context {
  display: grid;
  gap: 0.15rem;
  padding: 0.42rem 0.5rem;
  border-left: 3px solid #9ec1e8;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.55);
  color: #40607f;
}

.chat-reply-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.chat-message-meta {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  color: #94a3b8;
  font-size: 0.78rem;
  margin-top: 8px;
}

.chat-message-edited {
  font-style: italic;
}

.mail-read-pane {
  position: relative;
  flex: 1;
  min-width: 0;
  background: #f8fafc;
}

#app-view .shell-main > main:has(#view-messages.active) {
  padding: 0;
}

#app-view .shell-content:has(> #view-messages.active) {
  width: 100%;
  max-width: none !important;
  margin: 0 !important;
  gap: 0;
  padding-bottom: 0;
}

.mail-read-empty,
.mail-read-content {
  flex: 1;
  min-height: 0;
}

.mail-read-empty {
  display: grid;
  place-items: center;
  gap: 0.85rem;
  padding: 2rem;
  color: #64748b;
  text-align: center;
}

.mail-read-empty p {
  margin: 0;
  max-width: 24rem;
}

.mail-read-empty-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 1.4rem;
  font-weight: 600;
}

.mail-read-empty-inline {
  min-height: 14rem;
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
  background: #f8fafc;
}

.mail-read-content {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.mail-read-header {
  min-height: 54px;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 12px 20px;
}

.mail-read-header h4 {
  min-width: 0;
  flex: 1 1 auto;
  color: #1e3a8a;
  font-size: 0.95rem;
  line-height: 1.35;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mail-back-btn {
  display: none;
  align-items: center;
  justify-content: center;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #1e3a8a;
  border-radius: 10px;
  min-height: 34px;
  padding: 0 10px;
  font-size: 14px;
  font-weight: 500;
  flex-shrink: 0;
}

.mail-read-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  padding: 24px 32px;
}

.mail-thread {
  flex: 1 1 auto;
  min-height: 0;
}

.mail-read-actions {
  position: relative;
  flex-shrink: 0;
  border-top: 1px solid #e2e8f0;
  background: #fff;
  padding: 14px 18px;
}

.chat-input-bar {
  background: #fff;
  display: flex;
  align-items: flex-end;
  gap: 12px;
}

#message-form .chat-input {
  flex: 1;
  min-height: 44px;
  max-height: 120px;
  resize: vertical;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.4;
  outline: none;
}

#message-form .chat-input:focus {
  border-color: #1e3a8a;
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.08);
}

.chat-send-btn {
  min-height: 44px;
  background: #1e3a8a;
  color: #fff;
  border: none;
  border-radius: 14px;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 500;
}

.chat-send-btn:hover {
  transform: none;
  box-shadow: none;
  background: #1b347c;
}

.mail-read-actions #message-form {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex: 1 1 auto;
}

.mail-read-actions #message-ai-draft-btn {
  display: none !important;
}

.mail-compose-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}

.mail-compose-modal.hidden {
  display: none;
}

.mail-compose-scrim {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
}

.mail-compose-dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 46rem);
  max-height: min(90vh, 52rem);
  overflow: auto;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.18);
}

.mail-compose-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #1d4ed8;
  background: #1e3a8a;
  color: #fff;
}

.mail-compose-modal-header h4 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.mail-compose-modal-header .ghost {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.mail-compose-modal-header .ghost:hover {
  background: rgba(255, 255, 255, 0.18);
}

.compose-modal-close {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: none;
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.compose-modal-close:hover {
  background: rgba(255,255,255,0.22);
}

.mail-compose-modal-body {
  padding: 1.25rem;
  display: grid;
  gap: 1rem;
}

.mail-compose-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

.broadcast-form {
  gap: 1rem;
}

.message-recipient-field {
  position: relative;
}

.message-recipient-control {
  position: relative;
  display: grid;
  gap: 0.65rem;
}

.message-recipient-control.is-open {
  z-index: 8;
}

.message-recipient-input-row {
  position: relative;
}

.message-recipient-search,
#message-group-name,
.broadcast-form textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  background: #fff;
  color: #0f172a;
  font-size: 16px;
}

.message-recipient-search,
#message-group-name {
  min-height: 46px;
  padding: 0 48px 0 16px;
}

.message-recipient-search:focus,
#message-group-name:focus,
.broadcast-form textarea:focus {
  outline: none;
  border-color: rgba(30, 58, 138, 0.42);
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.10);
}

.message-recipient-search::placeholder,
#message-group-name::placeholder,
.broadcast-form textarea::placeholder {
  color: #94a3b8;
}

.message-recipient-toggle {
  position: absolute;
  top: 23px;
  right: 18px;
  width: 16px;
  height: 16px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #1e3a8a;
  transform: translateY(-50%);
  cursor: pointer;
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.message-recipient-toggle:hover {
  background: transparent;
  transform: translateY(-50%);
}

.message-recipient-toggle-icon {
  width: 16px;
  height: 16px;
  display: block;
  background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 9l6 6 6-6' stroke='%231e3a8a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 16px 16px;
  transition: transform 0.18s ease;
}

.message-recipient-control.is-open .message-recipient-toggle-icon {
  transform: rotate(180deg);
}

.message-recipient-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.message-recipient-chip.is-group {
  border-color: #c7d2fe;
  background: #eef2ff;
}

.message-recipient-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 32px;
  padding: 0.35rem 0.7rem;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 0.9rem;
  font-weight: 600;
}

.message-recipient-chip button {
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #1e3a8a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: none;
}

.message-recipient-chip button:hover {
  background: rgba(30, 58, 138, 0.08);
  transform: none;
}

.message-recipient-results {
  position: absolute;
  top: calc(100% + 0.4rem);
  left: 0;
  right: 0;
  z-index: 24;
  max-height: 15rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  pointer-events: auto;
  touch-action: pan-y;
  border: 1px solid #dbe3ef;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.12);
}

.message-recipient-section {
  display: grid;
}

.message-recipient-section-title {
  padding: 0.85rem 0.95rem 0.55rem;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.message-recipient-option {
  width: 100%;
  padding: 0.8rem 0.95rem;
  border: 0;
  border-bottom: 1px solid #eef2f7;
  background: #fff;
  color: #0f172a;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  text-align: left;
  cursor: pointer;
  box-shadow: none;
  border-radius: 0;
}

.message-recipient-option:last-child {
  border-bottom: 0;
}

.message-recipient-option:hover,
.message-recipient-option:focus-visible {
  background: #eff6ff;
  transform: none;
}

.message-recipient-option.is-selected {
  background: #eff6ff;
}

.message-recipient-option.is-group {
  grid-template-columns: minmax(0, 1fr) auto;
}

.message-recipient-option-check {
  color: #1e3a8a;
  font-size: 0.9rem;
  font-weight: 700;
}

.message-recipient-option-copy {
  min-width: 0;
  display: grid;
  gap: 0.15rem;
}

.message-recipient-option-copy strong {
  color: #0f172a;
  font-size: 0.95rem;
}

.message-recipient-option-copy span {
  color: #64748b;
  font-size: 0.82rem;
  line-height: 1.35;
}

.broadcast-form textarea {
  min-height: 132px;
  padding: 12px 16px;
  line-height: 1.55;
  resize: vertical;
}

.broadcast-preview-controls {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
}

.broadcast-preview-controls .muted {
  color: #64748b;
  font-size: 0.9rem;
}

.mail-compose-modal-actions .ghost {
  background: transparent;
  color: #1e3a8a;
  border: 0;
  box-shadow: none;
}

.mail-compose-modal-actions .ghost:hover {
  background: transparent;
  color: #172f73;
  text-decoration: underline;
  transform: none;
}

#message-broadcast-submit {
  min-height: 46px;
  padding: 0 20px;
  border: 0;
  border-radius: 12px;
  background: #1e3a8a;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(30, 58, 138, 0.16);
}

#message-broadcast-submit:hover {
  background: #172f73;
}

@keyframes partnerPulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(179, 29, 58, 0.08);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(179, 29, 58, 0.14);
  }
}

@keyframes partnerSignalBlink {
  0%,
  100% {
    opacity: 0.55;
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(79, 145, 216, 0.12);
  }
  50% {
    opacity: 1;
    transform: scale(1.12);
    box-shadow: 0 0 0 5px rgba(79, 145, 216, 0.22);
  }
}

.reply-box {
  margin-top: 0.6rem;
  margin-bottom: 0.45rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.5rem 0.65rem;
  background: linear-gradient(180deg, #f7fbff 0%, #edf5ff 100%);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
}

#reply-box.reply-composer-box {
  margin: 0 0 10px;
  padding: 10px 14px;
  border: 1px solid #dbe3ef;
  border-left: 3px solid #1e3a8a;
  border-radius: 14px;
  background: #fff;
  align-items: flex-start;
  box-shadow: none;
}

#reply-box .reply-box-text {
  min-width: 0;
  display: grid;
  gap: 4px;
  flex: 1 1 auto;
}

#reply-box .reply-box-label {
  color: #1e3a8a;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 600;
}

#reply-box .reply-box-label strong {
  font-weight: 700;
}

#reply-box #reply-text {
  margin: 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

#reply-box .reply-box-close {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #64748b;
  font-size: 20px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  cursor: pointer;
}

#reply-box .reply-box-close:hover {
  background: #f8fafc;
  color: #1e3a8a;
  transform: none;
  box-shadow: none;
}

#reply-box .reply-box-close:focus {
  outline: none;
}

#reply-box .reply-box-close:focus-visible {
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.10);
}

#setup-qr {
  width: 200px;
  border-radius: 10px;
  border: 1px solid var(--line);
}

@keyframes floatBlob {
  0%,
  100% {
    transform: translateY(0px) translateX(0px);
  }
  50% {
    transform: translateY(12px) translateX(8px);
  }
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes badgePulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.08);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

@media (max-width: 900px) {
  .topbar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.7rem;
  }

  .topbar-actions {
    width: 100%;
  }

  .header-search-form {
    flex: 1;
  }

  .header-search-form input {
    width: 100%;
    min-width: 0;
  }

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

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

  #view-news .row-between {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
  }

  .news-top-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
  }

  .news-source-filter {
    min-width: 0;
    width: 100%;
  }

  .news-top-actions .create-toggle {
    width: 100%;
  }

  .broadcast-form {
    grid-template-columns: 1fr;
  }

  .broadcast-preview-controls {
    align-items: stretch;
  }

  .broadcast-preview-controls .ghost {
    width: 100%;
  }

  .mail-compose-btn {
    width: 100%;
    justify-content: center;
  }

  .mail-compose-modal {
    padding: 0.75rem;
  }

  .mail-compose-dialog {
    width: 100%;
    max-height: calc(100vh - 1.5rem);
  }

  .mail-compose-modal-header,
  .mail-compose-modal-body {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .mail-compose-modal-actions {
    flex-direction: column-reverse;
  }

  .mail-compose-modal-actions button {
    width: 100%;
  }

  .message-recipient-results {
    max-height: 14rem;
  }

  .comment-children {
    margin-left: 0.45rem;
    padding-left: 0.5rem;
  }

  .container {
    width: calc(100vw - 1rem);
    margin: 0.5rem auto;
  }
}

@media (max-width: 767px) {
  html:has(body.mobile-message-thread-open),
  body.mobile-message-thread-open {
    overflow: hidden !important;
    height: 100dvh !important;
  }

  body.mobile-message-thread-open .app-shell,
  body.mobile-message-thread-open #app-view,
  body.mobile-message-thread-open .shell-main,
  body.mobile-message-thread-open #app-view > .shell-main > main,
  body.mobile-message-thread-open #app-view .shell-content {
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  body.mobile-message-thread-open #view-messages.active.mail-page {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  body.mobile-message-thread-open #view-messages .mail-wrap[data-view="read"] {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  body.mobile-message-thread-open #view-messages .mail-wrap[data-view="read"] .mail-read-pane,
  body.mobile-message-thread-open #view-messages .mail-wrap[data-view="read"] .mail-read-content {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  body.mobile-message-thread-open #view-messages .mail-read-body {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  body.mobile-message-thread-open #view-messages .chat-list,
  body.mobile-message-thread-open #view-messages .mail-thread {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
  }

  body.mobile-message-thread-open #view-messages .mail-read-actions,
  body.mobile-message-thread-open #view-messages #message-form {
    flex-shrink: 0 !important;
  }

  #view-messages.active.mail-page {
    display: block;
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .mail-page {
    width: 100%;
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .mail-wrap {
    width: 100%;
    height: auto;
    min-height: 0;
    display: block;
    overflow: visible;
  }

  .mail-folders {
    display: none;
  }

  .mail-compose-btn-mobile {
    display: inline-flex;
    width: 100%;
    justify-content: center;
  }

  .mail-list-pane,
  .mail-read-pane {
    width: 100%;
    min-width: 100%;
    min-height: 0;
    height: auto;
    border-right: 0;
    overflow: visible;
  }

  .mail-wrap[data-view="list"] .mail-read-pane {
    display: none;
  }

  .mail-wrap[data-view="read"] .mail-list-pane {
    display: none;
  }

  .mail-wrap[data-view="read"] .mail-read-pane {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .mail-wrap[data-view="read"] .mail-read-content:not(.hidden) {
    display: flex;
    flex-direction: column;
    flex: 0 0 auto;
    min-height: 0;
    overflow: visible;
  }

  .mail-back-btn {
    display: inline-flex;
    height: 38px;
    min-height: 38px;
    padding: 0 12px;
    font-size: 15px;
  }

  .mail-read-header,
  .mail-list-header {
    padding: 10px 16px;
  }

  .mail-list-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .mail-read-header {
    min-height: 0;
    gap: 8px;
    align-items: center;
  }

  .mail-read-header h4 {
    font-size: 18px;
    line-height: 1.2;
    font-weight: 700;
    margin: 0;
    white-space: nowrap;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mail-read-body {
    flex: 0 0 auto;
    min-height: 0;
    overflow: visible;
    padding: 12px 16px 8px;
  }

  .chat-list {
    flex: 0 0 auto;
    min-height: 0;
    padding: 8px 0 0;
    overflow: visible;
  }

  .chat-message {
    max-width: 92%;
  }

  .mail-read-actions {
    position: static;
    flex-shrink: 0;
    margin-top: 10px;
    padding: 0 16px calc(12px + env(safe-area-inset-bottom, 0px));
    border-top: 0;
    background: transparent;
  }

  .mail-read-actions #message-form {
    gap: 10px;
    align-items: flex-end;
  }

  #message-form .chat-input {
    min-height: 46px;
    max-height: 120px;
    font-size: 16px;
    padding: 11px 13px;
  }
}

@media (min-width: 768px) {
  #mail-compose-open-mobile {
    display: none !important;
  }
}

@media (min-width: 1025px) {
  .mail-back-btn {
    display: none;
  }
}

@media (max-width: 767px) {
  .topbar-actions {
    width: 100%;
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr);
    align-items: center;
  }

  .header-search-form {
    grid-column: 1 / -1;
    width: 100%;
  }

  .mobile-nav-toggle {
    display: inline-flex;
  }

  #app-tabs.tabs {
    display: none !important;
  }

  .mobile-nav-drawer {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 8999;
    width: min(340px, 88vw);
    height: 100vh;
    background: #fff;
    border-left: 1px solid #e2e8f0;
    box-shadow: -24px 0 70px rgba(15, 23, 42, 0.22);
    display: flex;
    flex-direction: column;
  }

  .mobile-nav-head {
    display: flex;
    padding: 18px 18px 14px;
    border-bottom: 1px solid #e2e8f0;
    align-items: center;
    justify-content: space-between;
  }

  .mobile-nav-head strong {
    color: #1e3a8a;
    font-size: 16px;
    font-weight: 600;
  }

  .mobile-nav-close {
    display: inline-flex;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 999px;
    background: #eff6ff;
    color: #1e3a8a;
    font-size: 24px;
    line-height: 1;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }

  .mobile-nav-list {
    display: flex;
    padding: 12px;
    overflow-y: auto;
    flex-direction: column;
    gap: 6px;
  }

  .mobile-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 10px 12px;
    border: none;
    border-radius: 12px;
    background: transparent;
    color: #1e3a8a;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
  }

  .mobile-nav-item i,
  .mobile-nav-item svg {
    display: inline-flex;
    width: 17px;
    height: 17px;
    flex-shrink: 0;
  }

  .mobile-nav-item:hover {
    background: #eff6ff;
  }

  .mobile-nav-item.is-active,
  .mobile-nav-item.active {
    background: #1e3a8a;
    color: #fff;
  }

  #install-pwa {
    justify-self: start;
  }
}

@media (max-width: 640px) and (orientation: portrait) {
  .news-top-actions {
    gap: 0.45rem;
  }

  .news-source-filter span {
    font-size: 0.75rem;
  }

  .news-source-filter select,
  .news-top-actions .create-toggle {
    min-height: 42px;
  }
}

@media (max-width: 768px) {
  .news-header,
  .news-page-head {
    margin-bottom: 18px !important;
  }

  .news-header h1,
  .news-page-head h1,
  .news-page-copy h1 {
    font-size: 24px !important;
    line-height: 1.15 !important;
    margin-bottom: 6px !important;
  }

  .news-header p,
  .news-page-head p,
  .news-page-copy p {
    font-size: 14px !important;
    line-height: 1.45 !important;
  }

  .news-filters,
  .news-category-filters,
  .news-topic-bar {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    margin: 16px 0 20px !important;
  }

  .news-filters button,
  .news-category-filters button,
  .news-topic-bar button,
  .news-topic-chip {
    min-height: 34px !important;
    padding: 7px 13px !important;
    font-size: 12px !important;
    border-radius: 999px !important;
  }

  #view-news .row-between,
  .news-editorial-head,
  .news-feed-head {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
    margin-bottom: 14px !important;
  }

  #view-news .row-between > h3,
  .news-editorial-head h2,
  .news-feed-head h2 {
    font-size: 19px !important;
    line-height: 1.2 !important;
    margin: 0 !important;
  }

  .news-top-actions {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
    width: 100% !important;
  }

  .news-add-btn {
    width: 100% !important;
    min-height: 40px !important;
    justify-content: center !important;
    margin-right: 0 !important;
    padding: 9px 14px !important;
    font-size: 13px !important;
  }

  .news-source-filter,
  .news-source-select,
  .news-source-filter select {
    width: 100% !important;
    min-width: 0 !important;
  }

  .news-grid,
  .news-list {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  .news-card {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 18px !important;
    overflow: hidden !important;
  }

  .news-card-image,
  .news-card-media,
  .news-card-thumb,
  .news-card-thumb.placeholder,
  .news-card-media > a:first-child,
  .news-card-media > .news-preview-carousel,
  .news-card-media > .news-card-thumb.placeholder,
  .news-card-media img {
    width: 100% !important;
  }

  .news-card-image,
  .news-card-thumb,
  .news-card-thumb.placeholder,
  .news-card-media,
  .news-card-media > a:first-child,
  .news-card-media > .news-preview-carousel,
  .news-card-media > .news-card-thumb.placeholder,
  .news-card-media img {
    height: 220px !important;
    object-fit: cover !important;
  }

  .news-card-body,
  .news-card-content {
    padding: 16px !important;
  }

  .news-card h3,
  .news-card h4 {
    font-size: 20px !important;
    line-height: 1.2 !important;
    margin-top: 10px !important;
  }

  .news-card p,
  .news-excerpt {
    font-size: 14px !important;
    line-height: 1.55 !important;
  }

  .news-card-actions {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    align-items: center !important;
  }

  .news-card-actions button,
  .news-card-actions a {
    font-size: 13px !important;
    white-space: nowrap !important;
  }
}

@media (max-width: 768px) {
  .news-featured-card .news-featured-body {
    gap: 16px !important;
  }

  .news-card-support,
  .news-card-support .author-line,
  .news-featured-author,
  .news-featured-author-zone {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .news-card-support .author-line,
  .news-featured-author {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    margin-top: 14px !important;
  }

  .news-author-avatar {
    --news-avatar-size: 48px;
  }

  .news-card-support .author-line .meta,
  .news-featured-author-copy,
  .news-featured-author-name,
  .news-card-support .meta {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .news-card-support .author-line .meta strong,
  .news-featured-author-name {
    display: block !important;
    min-width: 0 !important;
    max-width: 100% !important;
    color: #0f172a !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1.25 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .news-card-support .author-line .meta,
  .news-card-support .meta,
  .news-featured-author-copy span:not(.news-featured-author-name) {
    min-width: 0 !important;
    color: #64748b !important;
    font-size: 12px !important;
    line-height: 1.3 !important;
  }

  .news-card-actions,
  .news-featured-footer .news-card-actions {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    margin-top: 14px !important;
    padding-top: 10px !important;
    border-top: 1px solid #f1f5f9 !important;
  }

  .news-card-actions button,
  .news-card-actions a,
  .news-featured-footer .news-card-actions button,
  .news-featured-footer .news-card-actions a {
    font-size: 12px !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
  }

  .news-card .news-read-btn,
  .news-card .news-read-link,
  .news-featured-read {
    margin-left: auto !important;
    color: #1e3a8a !important;
    font-weight: 500 !important;
  }

  .news-featured-read {
    margin-left: auto !important;
    margin-right: auto !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    align-self: center !important;
    justify-content: center !important;
    text-align: center !important;
  }

  .news-featured-read-desktop-label {
    display: none !important;
  }

  .news-featured-read-mobile-label {
    display: inline !important;
  }
}

.news-filters button,
.news-category-filters button,
.news-topic-chip {
  min-height: 34px !important;
  padding: 7px 13px !important;
  border-radius: 999px !important;
  border: 1px solid #e2e8f0 !important;
  background: #fff !important;
  color: #1e3a8a !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  line-height: 1.2 !important;
  cursor: pointer !important;
}

.news-filters button:hover,
.news-category-filters button:hover,
.news-topic-chip:hover {
  background: #eff6ff !important;
  border-color: rgba(30, 58, 138, 0.22) !important;
}

.news-filters button.is-active,
.news-category-filters button.is-active,
.news-filters button.active,
.news-category-filters button.active,
.news-topic-chip.is-active,
.news-topic-chip.active {
  background: #1e3a8a !important;
  border-color: #1e3a8a !important;
  color: #fff !important;
}

@media (max-width: 768px) {
  .news-tag,
  .news-card-tag,
  .news-category,
  .news-badge,
  .news-category-badge,
  .tag {
    min-height: 23px !important;
    padding: 4px 9px !important;
    font-size: 10.5px !important;
    line-height: 1.2 !important;
  }

  .news-filters,
  .news-category-filters,
  .news-topic-bar {
    gap: 8px !important;
  }
}

.container:has(> #app-view:not(.hidden)) {
  width: 100%;
  max-width: none;
  height: 100vh;
  min-height: 0;
  margin: 0;
  overflow: hidden;
}

body:has(#app-view:not(.hidden)) {
  overflow: hidden;
  background: #f8fafc;
}

#app-view {
  position: fixed;
  inset: 0;
  z-index: 10;
  width: 100vw;
  max-width: none;
  height: 100vh;
  margin: 0;
  overflow: hidden;
  min-width: 0;
  background: #f8fafc;
  font-family: 'Inter', sans-serif;
}

#app-view.app-shell {
  display: flex;
  gap: 0;
}

#app-view > .shell-main {
  flex: 1 1 auto;
  width: calc(100vw - 4rem);
  max-width: none;
  height: 100vh;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#app-view,
.shell-main,
#app-view > .shell-main > main {
  background: #f8fafc;
}

#app-view > .shell-main > header,
#app-view > .shell-main > #app-tabs,
#app-view > .shell-main > main {
  width: 100%;
  max-width: none;
}

#app-view > .shell-main > main {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  background: #f8fafc;
  padding: 1rem;
}

.shell-sidebar {
  width: 4rem;
  flex: 0 0 4rem;
  height: 100vh;
  padding: 1.5rem 0;
  background: #1e3a8a;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  box-shadow: 0 20px 25px -5px rgba(15, 23, 42, 0.2), 0 8px 10px -6px rgba(15, 23, 42, 0.2);
  z-index: 20;
}

.shell-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  width: 100%;
  align-items: center;
}

.shell-sidebar-nav-bottom {
  margin-top: auto;
  gap: 1.5rem;
}

.side-btn {
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  border-radius: 0.75rem;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  box-shadow: none;
  transition: color 160ms ease, background-color 160ms ease;
}

.side-btn svg {
  width: 1.25rem;
  height: 1.25rem;
  stroke-width: 1.5;
}

.side-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  transform: none;
  box-shadow: none;
  filter: none;
}

.side-btn.active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

#app-view .topbar {
  min-height: 5.5rem;
  padding: 0.85rem 1.5rem;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  box-shadow: none;
  border-radius: 0;
  backdrop-filter: none;
  display: grid;
  grid-template-columns: minmax(14rem, 1fr) minmax(20rem, 34rem) minmax(14rem, 1fr);
  gap: 1.25rem;
  align-items: center;
}

#app-view .topbar:hover {
  border-color: #e2e8f0;
  box-shadow: none;
}

#app-view .topbar-identity {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.875rem;
}

#app-view .header-branding {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 0.75rem;
}

#app-view .header-brand-logo {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  object-fit: cover;
  background: #fff;
}

#app-view .header-brand-fallback {
  width: 2.5rem;
  height: 2.5rem;
  flex: 0 0 2.5rem;
  border-radius: 0.75rem;
  display: grid;
  place-items: center;
  background: #eff6ff;
  border: 1px solid #dbe7f5;
  color: #1e3a8a;
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
}

#app-view #header-app-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #0f172a;
  font-family: 'Inter', sans-serif;
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.2;
}

#app-view .header-search-form {
  width: 100%;
  max-width: 32rem;
  justify-self: center;
  position: relative;
}

#app-view .header-search-form input {
  width: 100%;
  min-width: 0;
  min-height: 2.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #fff;
  color: #0f172a;
  padding: 0.7rem 1rem 0.7rem 2.6rem;
  box-shadow: none;
}

#app-view .header-search-form input:focus {
  border-color: rgba(30, 58, 138, 0.38);
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

#app-view .search-icon {
  left: 0.9rem;
  color: #94a3b8;
  display: grid;
  place-items: center;
}

#app-view .search-icon svg {
  width: 1.1rem;
  height: 1.1rem;
  stroke-width: 1.5;
}

#app-view .topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 0.75rem;
}

#app-view .user-header-line {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

#app-view #user-badge {
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
  font-size: 0.82rem;
  line-height: 1.2;
}

#app-view .mail-indicator,
#app-view .user-avatar-btn,
#app-view #install-pwa {
  box-shadow: none;
}

#app-view .mail-indicator {
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  padding: 0;
  border-color: #e2e8f0;
  border-radius: 999px;
  background: #fff;
  color: #475569;
}

#app-view .mail-icon {
  display: grid;
  place-items: center;
}

#app-view .mail-icon svg {
  width: 1.1rem;
  height: 1.1rem;
  stroke-width: 1.5;
}

#app-view .user-avatar-btn {
  width: 2.5rem;
  height: 2.5rem;
  border-color: #e2e8f0;
  background: #fff;
}

#app-view .header-user-avatar {
  width: 100%;
  background: #f8fafc;
}

#app-tabs.tabs {
  padding: 0 1.5rem;
  min-height: 3.125rem;
  border: 0;
  border-bottom: 1px solid #e2e8f0;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}

#app-tabs.tabs::-webkit-scrollbar {
  display: none;
}

#app-tabs.tabs:hover {
  border-color: transparent;
  border-bottom-color: #e2e8f0;
  box-shadow: none;
}

#app-tabs.tabs button {
  flex: 0 0 auto;
  min-height: 3.125rem;
  border: 0;
  border-radius: 0;
  padding: 0.875rem 1.5rem;
  background: transparent;
  color: #475569;
  box-shadow: none;
  font-size: 0.88rem;
  font-weight: 600;
}

#app-tabs.tabs button:hover:not(:disabled) {
  background: #f8fafc;
  color: #1e3a8a;
  border-radius: 0 !important;
  transform: none;
  box-shadow: none;
  filter: none;
}

#app-tabs.tabs button.active {
  background: #4f64b8;
  color: #fff;
  border-radius: 0 !important;
  font-weight: 600;
  box-shadow: none;
}

.shell-content {
  width: 100%;
  max-width: 72rem !important;
  min-height: 100%;
  margin-right: auto !important;
  margin-left: auto !important;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding-bottom: 48px;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.featured-page {
  width: 100%;
  max-width: 1152px;
  margin: 0 auto;
  padding: 16px;
  background: #f8fafc;
}

.featured-header h1 {
  margin: 0;
  color: #1e3a8a;
  font-size: 24px;
  font-weight: 500;
}

.featured-header p {
  margin: 0.5rem 0 0;
  font-size: 14px;
  color: #64748b;
}

.featured-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.95fr);
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.featured-main-card,
.featured-side-card {
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

.featured-main-card:hover,
.featured-side-card:hover {
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
  transform: none;
}

.featured-main-media {
  min-height: 220px;
  background:
    linear-gradient(135deg, rgba(30, 58, 138, 0.92), rgba(30, 64, 175, 0.78)),
    #1e3a8a;
}

.featured-main-media-inner {
  width: 100%;
  min-height: 220px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.featured-main-media-inner.has-image img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.featured-main-media-placeholder {
  color: rgba(255, 255, 255, 0.88);
}

.featured-main-media-placeholder i,
.featured-main-media-placeholder svg {
  width: 28px;
  height: 28px;
}

.featured-main-content {
  padding: 1.5rem;
}

.featured-tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #dbeafe;
  color: #1e3a8a;
  padding: 0.3rem 0.7rem;
  font-size: 12px;
  font-weight: 600;
}

.featured-main-content h2 {
  margin: 0.9rem 0 0;
  color: #0f172a;
  font-size: 22px;
  font-weight: 600;
}

.featured-main-content p {
  margin: 0.75rem 0 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.6;
}

.featured-card-meta {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: #64748b;
  font-size: 13px;
}

.featured-card-meta a {
  color: #1e3a8a;
  font-weight: 500;
  text-decoration: none;
}

.featured-inline-action,
.featured-section-link {
  border: none;
  background: transparent;
  color: #1e3a8a;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  padding: 0;
}

.featured-inline-action:hover,
.featured-section-link:hover {
  background: transparent;
  box-shadow: none;
  filter: none;
  transform: translateY(-2px);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.featured-inline-action:focus-visible,
.featured-section-link:focus-visible {
  background: transparent;
  box-shadow: none;
  outline: 2px solid rgba(30, 58, 138, 0.38);
  outline-offset: 4px;
}

.featured-inline-muted {
  color: #94a3b8;
  font-size: 13px;
}

.featured-side-list {
  display: grid;
  gap: 1rem;
}

.featured-side-card {
  padding: 20px;
}

.featured-main-card.clickable,
.featured-side-card.clickable,
.featured-mini-card.clickable,
.featured-list-row.clickable {
  cursor: pointer;
}

.featured-empty-card {
  cursor: default !important;
}

.featured-side-card h3 {
  margin: 0.85rem 0 0;
  color: #0f172a;
  font-size: 18px;
  font-weight: 600;
}

.featured-side-card p {
  margin: 0.65rem 0 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.55;
}

.featured-side-card small {
  display: block;
  margin-top: 0.85rem;
  color: #94a3b8;
  font-size: 12px;
}

.featured-section {
  margin-top: 32px;
}

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

.featured-section-head h2 {
  margin: 0;
  color: #1e3a8a;
  font-size: 16px;
  font-weight: 500;
}

.featured-section-head a {
  color: #1e3a8a;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.featured-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.featured-mini-card,
.featured-list-card {
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.featured-mini-card:hover,
.featured-list-card:hover {
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
  transform: none;
}

.featured-mini-card {
  padding: 1.25rem;
  display: grid;
  gap: 0.65rem;
}

.featured-file-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #eff6ff;
  color: #1e3a8a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.featured-file-icon i,
.featured-file-icon svg {
  width: 18px;
  height: 18px;
}

.featured-mini-card h3 {
  margin: 0;
  color: #1e3a8a;
  font-size: 16px;
  font-weight: 500;
}

.featured-card-title {
  display: -webkit-box;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.featured-mini-card p {
  margin: 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.55;
}

.featured-mini-card-commission {
  align-content: start;
}

.featured-commission-meta {
  color: #64748b;
  font-size: 13px;
  line-height: 1.45;
}

.featured-mini-meta {
  color: #64748b;
  font-size: 12px;
  font-weight: 500;
}

.featured-list-card {
  overflow: hidden;
}

.featured-list-row {
  padding: 0.95rem 1.25rem;
  color: #334155;
  font-size: 14px;
  line-height: 1.5;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.featured-list-row:hover {
  background: #f8fafc;
  transform: none;
}

.featured-list-row + .featured-list-row {
  border-top: 1px solid #eef2f7;
}

.featured-empty-row {
  justify-content: flex-start;
  color: #64748b;
}

.cotech-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
}

.cotech-header h1 {
  margin: 0;
  font-size: 24px;
  line-height: 32px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: #1e3a8a;
}

.cotech-header p {
  margin-top: 4px;
  font-size: 14px;
  color: #64748b;
}

.cotech-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: #1e3a8a;
  color: #fff;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  border: none;
}

.cotech-upload-btn:hover {
  transform: none;
  box-shadow: none;
  background: #1b347c;
}

.cotech-upload-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
}

.cotech-upload-modal.hidden {
  display: none;
}

.cotech-upload-dialog {
  width: min(720px, 100%);
  max-height: calc(100vh - 48px);
  overflow: hidden;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.25);
  display: flex;
  flex-direction: column;
}

.cotech-upload-head {
  background: #1e3a8a;
  color: #fff;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cotech-upload-head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
}

.cotech-upload-close {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.cotech-upload-close:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: none;
}

.cotech-upload-body {
  padding: 24px;
  overflow-y: auto;
}

.cotech-upload-body #cotech-admin-panel {
  display: grid;
  gap: 16px;
  margin: 0;
}

#cotechUploadModal .cotech-publication-panel {
  padding: 22px;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

#cotechUploadModal .cotech-publication-title {
  margin: 0 0 4px;
  color: #1e3a8a;
  font-size: 15px;
  font-weight: 600;
}

#cotechUploadModal .cotech-inline-form {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  flex-wrap: wrap;
}

#cotechUploadModal .cotech-inline-field,
#cotechUploadModal .cotech-form-field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

#cotechUploadModal .cotech-inline-field {
  flex: 1 1 0;
}

#cotechUploadModal .cotech-inline-field-date {
  flex: 1.3 1 220px;
}

#cotechUploadModal .cotech-inline-field-title {
  flex: 1 1 220px;
}

#cotechUploadModal .cotech-inline-field-vimeo {
  flex: 1.35 1 280px;
}

#cotechUploadModal .cotech-inline-field > span,
#cotechUploadModal .cotech-form-field > span {
  color: #475569;
  font-size: 13px;
  font-weight: 500;
}

#cotechUploadModal #cotech-date-form input,
#cotechUploadModal #cotech-video-form input:not([type="hidden"]),
#cotechUploadModal #cotech-announcement-form input:not([type="hidden"]) {
  padding: 12px 16px;
  min-height: 46px;
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  background: #fff;
  color: #0f172a;
  font-size: 14px;
  line-height: 1.45;
  box-sizing: border-box;
}

#cotechUploadModal #cotech-date-form input[type="datetime-local"] {
  padding-right: 44px;
}

#cotechUploadModal #cotech-announcement-form textarea {
  padding: 14px 16px;
  min-height: 132px;
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  background: #fff;
  color: #0f172a;
  font-size: 14px;
  line-height: 1.55;
  box-sizing: border-box;
  resize: vertical;
}

#cotechUploadModal #cotech-date-form input:focus,
#cotechUploadModal #cotech-video-form input:not([type="hidden"]):focus,
#cotechUploadModal #cotech-announcement-form input:not([type="hidden"]):focus,
#cotechUploadModal #cotech-announcement-form textarea:focus {
  outline: none;
  border-color: rgba(30, 58, 138, 0.45);
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.10);
}

#cotechUploadModal #cotech-date-form input::placeholder,
#cotechUploadModal #cotech-video-form input:not([type="hidden"])::placeholder,
#cotechUploadModal #cotech-announcement-form input:not([type="hidden"])::placeholder,
#cotechUploadModal #cotech-announcement-form textarea::placeholder {
  color: #94a3b8;
}

#cotechUploadModal .cotech-secondary-action,
#cotechUploadModal .cotech-primary-action,
#cotechUploadModal .cotech-ghost-action {
  min-height: 46px;
  padding: 0 18px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  box-shadow: none;
}

#cotechUploadModal .cotech-secondary-action {
  border: 1px solid #1e3a8a;
  background: #fff;
  color: #1e3a8a;
}

#cotechUploadModal .cotech-secondary-action:hover {
  background: #eff6ff;
  color: #1e3a8a;
  border-color: #1e3a8a;
  transform: none;
}

#cotechUploadModal .cotech-primary-action {
  border: 0;
  background: #1e3a8a;
  color: #fff;
}

#cotechUploadModal .cotech-primary-action:hover {
  background: #1b347c;
  color: #fff;
  transform: none;
}

#cotechUploadModal .cotech-ghost-action {
  border: 1px solid #dbe3ef;
  background: #fff;
  color: #1e293b;
}

#cotechUploadModal .cotech-ghost-action:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: #1e293b;
  transform: none;
}

#cotechUploadModal #cotech-announcement-toolbar {
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  background: #fff;
}

#cotechUploadModal #cotech-announcement-toolbar button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #dbe3ef;
  border-radius: 10px;
  background: #fff;
  color: #1e293b;
  box-shadow: none;
}

#cotechUploadModal #cotech-announcement-toolbar button:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #1e3a8a;
  transform: none;
}

#cotechUploadModal .cotech-form-actions {
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  padding-top: 4px;
}

#cotechNextSessionModal .cotech-next-session-form {
  display: grid;
  gap: 16px;
}

#cotechNextSessionModal .cotech-next-session-schedule {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

#cotechNextSessionModal .cotech-next-session-schedule > label {
  min-width: 0;
}

#cotechNextSessionModal .cotech-next-session-form label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

#cotechNextSessionModal .cotech-next-session-form label > span {
  color: #475569;
  font-size: 13px;
  font-weight: 500;
}

#cotechNextSessionModal .cotech-next-session-form input,
#cotechNextSessionModal .cotech-next-session-form textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  color: #0f172a;
  padding: 11px 14px;
  font-size: 14px;
  line-height: 1.45;
  box-sizing: border-box;
}

#cotechNextSessionModal .cotech-next-session-form input {
  min-height: 44px;
}

#cotechNextSessionModal .cotech-next-session-form textarea {
  min-height: 120px;
  resize: vertical;
}

#cotechNextSessionModal .cotech-next-session-form input:focus,
#cotechNextSessionModal .cotech-next-session-form textarea:focus {
  outline: none;
  border-color: rgba(30, 58, 138, 0.45);
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.10);
}

#cotechNextSessionModal .cotech-next-session-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 6px;
}

#cotechNextSessionModal .cotech-next-session-actions .ghost {
  white-space: nowrap;
}

.cotech-next-session {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #1e3a8a;
  color: #fff;
  margin: 32px 0 40px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.cotech-next-session::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 30%, rgba(255,255,255,.12), transparent 45%),
    repeating-linear-gradient(135deg, rgba(255,255,255,.04) 0 2px, transparent 2px 12px);
  opacity: .75;
}

.cotech-next-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.96), rgba(79, 100, 184, 0.54));
}

.cotech-next-inner {
  position: relative;
  z-index: 1;
  padding: 28px 32px;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 24px;
}

.cotech-next-content,
.cotech-next-side {
  position: relative;
  z-index: 1;
}

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

.cotech-next-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.14);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #fff;
}

.cotech-next-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #6ee7b7;
}

.cotech-next-content h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
  font-weight: 600;
  color: #fff;
}

.cotech-next-content p {
  max-width: 680px;
  margin: 16px 0 0;
  font-size: 15px;
  line-height: 1.7;
  color: rgba(255,255,255,.78) !important;
}

.cotech-next-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 28px;
  margin-top: 24px;
  font-size: 14px;
  color: rgba(255,255,255,.90);
}

.cotech-next-meta span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  color: rgba(255,255,255,.92) !important;
}

.cotech-next-meta i,
.cotech-next-meta svg {
  width: 16px;
  height: 16px;
  color: rgba(255,255,255,.70);
  flex-shrink: 0;
}

.cotech-next-side,
.cotech-countdown-card {
  width: 240px;
  flex-shrink: 0;
  padding: 24px;
  border-radius: 16px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.16);
  text-align: center;
  display: grid;
  justify-items: center;
}

.cotech-next-side > p,
.cotech-countdown-card > p {
  margin: 0 0 10px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(255,255,255,.82) !important;
  font-weight: 500;
}

.cotech-countdown {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 18px;
  width: 100%;
  justify-items: center;
  align-items: start;
}

.cotech-countdown strong {
  display: block;
  font-size: 30px;
  line-height: 1;
  color: #fff;
  text-align: center;
}

.cotech-countdown span {
  display: block;
  margin-top: 6px;
  font-size: 10px;
  text-transform: uppercase;
  color: rgba(255,255,255,.55);
  text-align: center;
}

.cotech-access-btn,
.cotech-agenda-btn,
.cotech-next-edit-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}

.cotech-access-btn {
  border: none;
  border-radius: 10px;
  background: #fff;
  color: #1e3a8a;
}

.cotech-access-btn:hover {
  background: #f8fafc;
  color: #1e3a8a;
}

.cotech-agenda-btn {
  border: 0;
  border-radius: 10px;
  margin-top: 10px;
  background: transparent;
  color: rgba(255,255,255,.88);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.cotech-agenda-btn:hover {
  background: rgba(255,255,255,.10);
  color: #fff;
}

.cotech-next-edit-btn {
  margin-top: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  background: rgba(255,255,255,.12);
  color: rgba(255,255,255,.92);
  backdrop-filter: blur(8px);
}

.cotech-next-edit-btn:hover {
  background: rgba(255,255,255,.20);
  color: #fff;
  transform: none;
}

.cotech-library-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.cotech-library-title {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.cotech-library-title h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
  color: #0f172a;
}

.cotech-library-title span {
  font-size: 14px;
  color: #94a3b8;
}

.cotech-sort-tabs {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  width: auto;
  max-width: 100%;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 2px;
  gap: 2px;
  flex-wrap: nowrap;
  overflow: hidden;
}

.cotech-sort-tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #64748b;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: none;
}

.cotech-sort-tabs button:hover {
  transform: none;
  box-shadow: none;
  background: #f8fafc;
  color: #1e3a8a;
}

.cotech-sort-tabs button.active {
  background: #1e3a8a;
  color: #fff;
}

.cotech-sort-tabs button i,
.cotech-sort-tabs button svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.cotech-theme-filters {
  display: none !important;
}

.cotech-video-grid,
#videoGrid,
#cotech-videos.news-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 28px !important;
  align-items: stretch;
  columns: initial;
  column-gap: 0;
}

.cotech-video-card {
  display: flex !important;
  flex-direction: column !important;
  background: #fff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 16px !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08) !important;
  overflow: hidden !important;
  padding: 0;
}

.cotech-video-card:hover {
  transform: none !important;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.10) !important;
  border-color: #cbd5e1 !important;
  background: #fff !important;
}

.cotech-video-thumb {
  position: relative;
  aspect-ratio: 16 / 9 !important;
  height: auto !important;
  min-height: 0 !important;
  overflow: hidden;
  background: linear-gradient(135deg, #1e3a8a 0%, #2748a3 55%, #1d4ed8 100%);
}

.cotech-video-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.18), transparent 32%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.08), rgba(15, 23, 42, 0.32));
  pointer-events: none;
}

.cotech-video-thumb-link {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.cotech-video-thumb-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

.cotech-video-thumb-placeholder {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.02));
}

.cotech-video-label,
.cotech-video-duration,
.cotech-play-btn {
  position: absolute;
  z-index: 1;
}

.cotech-video-label {
  top: 14px;
  left: 14px;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  backdrop-filter: blur(6px);
}

.cotech-play-btn {
  top: 50%;
  left: 50%;
  width: 56px;
  height: 56px;
  margin: -28px 0 0 -28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.96);
  color: #1e3a8a;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.16);
}

.cotech-video-duration {
  right: 14px;
  bottom: 14px;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
}

.cotech-video-content {
  display: grid;
  gap: 14px;
  padding: 18px 20px 20px !important;
}

.cotech-video-theme {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 12px;
  font-weight: 600;
}

.cotech-video-content h3 {
  margin: 0 0 16px !important;
  font-size: 16px !important;
  line-height: 1.35 !important;
  font-weight: 500 !important;
  color: #0f172a !important;
}

.cotech-video-content h3 a {
  color: inherit;
  text-decoration: none;
}

.cotech-video-content h3 a:hover {
  color: #1e3a8a;
}

.cotech-video-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cotech-speaker {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.cotech-speaker-avatar {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 999px;
  object-fit: cover;
  object-position: center;
}

.cotech-speaker > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.cotech-speaker strong {
  color: #0f172a;
  font-size: 13px;
  font-weight: 600;
}

.cotech-speaker span,
.cotech-video-date,
.cotech-views {
  color: #64748b;
  font-size: 12px;
  line-height: 1.4;
}

.cotech-views {
  flex-shrink: 0;
  white-space: nowrap;
}

.cotech-video-card .commission-actions,
.cotech-video-card .admin-actions,
.cotech-video-card .card-actions,
.cotech-video-card button.edit,
.cotech-video-card button.delete,
.cotech-video-card [data-action="edit"],
.cotech-video-card [data-action="delete"] {
  display: none !important;
}

.featured-event-date {
  width: 72px;
  flex-shrink: 0;
  display: grid;
  gap: 0.2rem;
}

.featured-event-date strong {
  color: #1e3a8a;
  font-size: 20px;
  font-weight: 600;
  line-height: 1;
}

.featured-event-date span,
.featured-event-copy span,
.featured-resource-copy span {
  color: #64748b;
  font-size: 13px;
  line-height: 1.4;
}

.featured-event-copy,
.featured-resource-copy {
  min-width: 0;
  display: grid;
  gap: 0.2rem;
}

.featured-event-copy strong,
.featured-resource-copy strong {
  color: #1e3a8a;
  font-size: 15px;
  font-weight: 500;
}

.featured-row-action {
  margin-left: auto;
  color: #94a3b8;
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
}

.featured-file-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eff6ff;
  color: #1e3a8a;
  flex-shrink: 0;
}

#app-view .shell-content > .view {
  width: 100%;
  max-width: none;
  display: none !important;
}

#app-view .shell-content > .view.active {
  width: 100%;
  flex: 1 1 auto;
  min-height: 100%;
  display: block !important;
}

#app-view .shell-content > #view-messages.active,
#app-view .shell-content > #view-agenda.active {
  display: flex !important;
  flex-direction: column;
}

@media (max-width: 1024px) {
  #view-documents .documents-page {
    padding: 24px;
  }

  #view-documents .documents-folder-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #view-documents .documents-files-head,
  #view-documents .documents-file-row {
    grid-template-columns: 1fr 110px 110px 140px 120px;
  }

  #view-knowledge .knowledge-qa-page {
    padding: 24px;
  }

  #view-knowledge .knowledge-left-rail,
  #view-knowledge .knowledge-right-rail {
    display: none;
  }

  #view-knowledge .knowledge-qa-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  #view-knowledge .knowledge-question-card {
    grid-template-columns: minmax(0, 1fr);
  }

  #view-knowledge .knowledge-question-stats {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
  }

  #view-knowledge .knowledge-detail-card {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    padding: 20px;
  }

  #view-knowledge .knowledge-vote-column {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
  }

  #view-knowledge .knowledge-answer {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 12px;
  }

  #view-knowledge .knowledge-answer-children {
    padding-left: 12px;
  }

  .cotech-next-inner {
    flex-direction: column;
    align-items: stretch;
    padding: 24px;
  }

  .cotech-countdown-card {
    width: 100%;
  }

  .cotech-next-main h2 {
    font-size: 22px;
  }

  .featured-hero-grid {
    grid-template-columns: 1fr;
  }

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

  .cotech-video-grid,
  #videoGrid,
  #cotech-videos.news-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 24px !important;
  }

  .shell-sidebar {
    display: none;
  }

  #app-view > .shell-main {
    width: 100vw;
  }

  #app-view .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  #app-view .header-search-form {
    grid-column: 1 / -1;
    order: 3;
    max-width: none;
  }
}

@media (max-width: 760px) {
  #view-documents .documents-page {
    padding: 16px;
  }

  #view-documents .documents-folder-grid {
    grid-template-columns: 1fr;
  }

  #view-documents .documents-files-top {
    align-items: flex-start;
    flex-direction: column;
  }

  #view-documents .documents-files-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  #view-documents .documents-search-field,
  #view-documents .documents-filter-select {
    flex: 1 1 auto;
    width: 100%;
  }

  #view-documents .documents-files-head {
    display: none;
  }

  #view-documents .documents-file-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
  }

  #view-documents .documents-file-row > span {
    display: none;
  }

  #view-documents .documents-file-name {
    grid-column: 1;
  }

  #view-documents .documents-file-actions {
    grid-column: 2;
    align-self: start;
  }

  #view-documents .documents-file-row > span,
  #view-documents .documents-file-meta {
    color: #64748b;
    font-size: 13px;
  }

  #view-documents .documents-file-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  #view-knowledge .knowledge-qa-page {
    padding: 16px;
  }

  .cotech-upload-modal {
    padding: 0;
    align-items: flex-end;
  }

  .cotech-upload-dialog {
    width: 100%;
    max-height: 100vh;
    border-radius: 20px 20px 0 0;
  }

  .cotech-upload-body {
    padding: 20px 16px;
  }

  #cotechUploadModal .cotech-publication-panel {
    padding: 18px;
  }

  #cotechUploadModal .cotech-inline-form {
    flex-direction: column;
    align-items: stretch;
  }

  #cotechUploadModal .cotech-inline-field,
  #cotechUploadModal .cotech-inline-field-date,
  #cotechUploadModal .cotech-inline-field-title,
  #cotechUploadModal .cotech-inline-field-vimeo {
    flex: 1 1 auto;
    width: 100%;
  }

  #cotechUploadModal .cotech-secondary-action,
  #cotechUploadModal .cotech-ghost-action,
  #cotechUploadModal .cotech-primary-action {
    width: 100%;
  }

  #cotechUploadModal .cotech-form-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .cotech-player-modal {
    padding: 0;
    align-items: flex-end;
  }

  .cotech-player-dialog {
    width: 100%;
    max-height: 100vh;
    border-radius: 24px 24px 0 0;
  }

  .cotech-player-info {
    padding: 20px 16px 18px;
  }

  .cotech-player-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .featured-section {
    margin-top: 24px;
  }

  .featured-section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .featured-card-grid {
    grid-template-columns: 1fr;
  }

  .cotech-video-grid,
  #videoGrid,
  #cotech-videos.news-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }

  .cotech-video-content {
    padding: 18px 20px 20px !important;
  }

  .cotech-video-meta {
    align-items: flex-start;
    flex-direction: column;
  }

  #app-view .topbar {
    padding: 0.75rem 1rem;
    gap: 0.75rem;
  }

  #app-view .topbar-actions {
    width: auto;
    display: flex;
  }

  #app-view .header-brand-fallback,
  #app-view .header-brand-logo {
    width: 2.25rem;
    height: 2.25rem;
    flex-basis: 2.25rem;
  }

  #app-view #user-badge,
  #app-view #install-pwa {
    display: none;
  }

  #app-tabs.tabs {
    display: none;
  }
}

@media (min-width: 640px) {
  #app-view > .shell-main > main {
    padding: 1.5rem;
  }

  .featured-page {
    padding: 24px;
  }
}

.mobile-nav-overlay,
.drawer-backdrop {
  position: fixed !important;
  inset: 0 !important;
  z-index: 8998 !important;
  background: rgba(15, 23, 42, 0.42) !important;
  backdrop-filter: blur(3px) !important;
}

.mobile-nav-overlay.hidden,
.drawer-backdrop.hidden {
  display: none !important;
}

.mobile-drawer,
.mobile-nav-drawer {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: auto !important;
  z-index: 8999 !important;
  width: min(320px, 86vw) !important;
  height: 100vh !important;
  background: #fff !important;
  border-right: 1px solid #e2e8f0 !important;
  border-left: 0 !important;
  box-shadow: 24px 0 70px rgba(15, 23, 42, 0.22) !important;
  display: flex !important;
  flex-direction: column !important;
  transform: translateX(-100%) !important;
  transition: transform .28s ease !important;
}

.mobile-drawer.open,
.mobile-nav-drawer.open {
  transform: translateX(0) !important;
}

.mobile-drawer.hidden,
.mobile-nav-drawer.hidden {
  display: none !important;
}

.mobile-drawer-head,
.mobile-nav-head {
  min-height: 72px !important;
  padding: 16px 18px !important;
  border-bottom: 1px solid #e2e8f0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 14px !important;
  background: #fff !important;
}

.mobile-drawer-brand {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  min-width: 0 !important;
}

.mobile-drawer-logo {
  width: 34px !important;
  height: 34px !important;
  border-radius: 10px !important;
  background: #1e3a8a !important;
  color: #fff !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  flex-shrink: 0 !important;
}

.mobile-drawer-brand strong,
.mobile-nav-head strong {
  display: block !important;
  color: #1e3a8a !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  line-height: 1.1 !important;
}

.mobile-drawer-brand span {
  display: block !important;
  margin-top: 2px !important;
  color: #64748b !important;
  font-size: 12px !important;
}

.mobile-drawer-close,
.mobile-nav-close,
.drawer-close {
  width: 34px !important;
  height: 34px !important;
  border: none !important;
  border-radius: 999px !important;
  background: #eff6ff !important;
  color: #1e3a8a !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  flex-shrink: 0 !important;
  box-shadow: none !important;
}

.mobile-drawer-close i,
.mobile-drawer-close svg,
.mobile-nav-close i,
.mobile-nav-close svg,
.drawer-close i,
.drawer-close svg {
  width: 17px !important;
  height: 17px !important;
  stroke-width: 2.2 !important;
}

.mobile-drawer-nav,
.mobile-nav-list {
  flex: 1 !important;
  overflow-y: auto !important;
  padding: 10px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
  background: #fff !important;
}

.mobile-drawer-nav a,
.mobile-drawer-nav button,
.mobile-nav-item,
.drawer-nav {
  min-height: 42px !important;
  width: 100% !important;
  padding: 10px 12px !important;
  border: none !important;
  border-radius: 10px !important;
  background: transparent !important;
  color: #1e3a8a !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 10px !important;
  text-align: left !important;
  text-decoration: none !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  line-height: 1.2 !important;
  box-shadow: none !important;
  cursor: pointer !important;
}

.mobile-drawer-nav a:hover,
.mobile-drawer-nav button:hover,
.mobile-nav-item:hover,
.drawer-nav:hover {
  background: #eff6ff !important;
  color: #1e3a8a !important;
}

.mobile-drawer-nav a.is-active,
.mobile-drawer-nav button.is-active,
.mobile-nav-item.is-active,
.drawer-nav.active,
.drawer-nav.is-active {
  background: #1e3a8a !important;
  color: #fff !important;
}

.mobile-drawer-nav i,
.mobile-drawer-nav svg,
.mobile-nav-item i,
.mobile-nav-item svg,
.drawer-nav i,
.drawer-nav svg {
  width: 17px !important;
  height: 17px !important;
  stroke-width: 2 !important;
  flex-shrink: 0 !important;
  color: currentColor !important;
}

@media (min-width: 1025px) {
  #app-view > .shell-main > main {
    padding: 2rem;
  }

  .shell-content {
    gap: 2rem;
  }

  .featured-page {
    padding: 32px;
  }
}

#sideBar svg {
  display: block !important;
  width: 1.25rem !important;
  height: 1.25rem !important;
  stroke: currentColor !important;
  color: currentColor !important;
  opacity: 1 !important;
  visibility: visible !important;
  flex-shrink: 0;
}

#sideBar .side-btn {
  color: rgba(255, 255, 255, 0.65) !important;
}

#sideBar .side-btn:hover,
#sideBar .side-btn.active,
#sideBar .side-btn[aria-current="page"] {
  color: #fff !important;
}

#app-view .shell-content > .card,
#app-view .shell-content .list-item,
#app-view .shell-content .rss-sidebar,
#app-view .shell-content .creation-panel,
#app-view .shell-content .taxonomy-manager,
#app-view .shell-content .admin-section-panel,
#app-view .shell-content .profile-notifications-card,
#app-view .shell-content .news-card,
#app-view .shell-content .knowledge-card,
#app-view .shell-content .tool-card,
#app-view .shell-content .rich-preview,
#app-view .shell-content .ai-summary-output,
#app-view .shell-content .comment-item,
#app-view .shell-content .media-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

#app-view .shell-content > .card,
#app-view .shell-content .rss-sidebar,
#app-view .shell-content .creation-panel,
#app-view .shell-content .taxonomy-manager,
#app-view .shell-content .admin-section-panel,
#app-view .shell-content .profile-notifications-card,
#app-view .shell-content .tool-card,
#app-view .shell-content .knowledge-card {
  padding: 1.25rem;
}

#app-view .shell-content .list-item:hover:not(.agenda-event-row):not(.rss-source-row),
#app-view .shell-content .media-card:hover,
#app-view .shell-content .news-card.clickable:hover {
  border-color: #e2e8f0;
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.08);
  padding: 0;
}

#view-commissions .commission-documents-panel #commission-announcements-list > .list-item:hover,
#view-commissions .commission-documents-panel #commission-announcements-list > .list-item:focus-within,
#view-commissions .commission-documents-panel #commissions-list > .commission-entry:hover,
#view-commissions .commission-documents-panel #commissions-list > .commission-entry:focus-within {
  padding: 0.7rem;
  margin: 0;
  background: #fff;
  transform: none;
  translate: none;
  box-shadow: none;
  border-color: #cbd8e8;
}

#app-view .shell-content h3,
#app-view .shell-content h4,
#app-view .shell-content h5,
#app-view .shell-content .list-item h4,
#app-view .shell-content .article-rich h4 {
  color: #1e3a8a;
  font-weight: 600;
}

#app-view .shell-content p,
#app-view .shell-content .muted,
#app-view .shell-content .news-excerpt,
#app-view .shell-content .tool-desc,
#app-view .shell-content .news-source-line,
#app-view .shell-content .news-album-meta,
#app-view .shell-content .rss-source-url,
#app-view .shell-content .commission-entry-comment,
#app-view .shell-content .article-rich blockquote {
  color: #64748b;
}

#app-view .shell-content button.ghost,
#app-view .shell-content .tool-link-btn,
#app-view .shell-content .editor-toolbar button {
  background: #fff;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

#app-view .shell-content button.ghost:hover:not(.commission-action-btn),
#app-view .shell-content .tool-link-btn:hover,
#app-view .shell-content .editor-toolbar button:hover {
  background: #f8fafc;
  border-color: transparent;
  box-shadow: none;
  filter: none;
}

#view-commissions .commission-actions button.commission-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: auto;
  padding: 2px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: color 140ms ease, transform 140ms ease;
}

#view-commissions .commission-actions button.commission-action-btn.is-edit {
  color: #1e3a8a;
}

#view-commissions .commission-actions button.commission-action-btn.is-delete {
  color: #b42318;
}

#view-commissions .commission-actions .commission-action-btn:hover,
#view-commissions .commission-actions .commission-action-btn:active {
  background: transparent;
  transform: translateY(-1px);
  translate: none;
  box-shadow: none;
  filter: none;
}

#view-commissions .commission-actions .commission-action-btn.is-edit:hover {
  color: #1e3a8a;
}

#view-commissions .commission-actions .commission-action-btn.is-delete:hover {
  color: #9f1d16;
}

#view-commissions .commission-comment-form button[type="submit"]:hover,
#view-commissions .commission-comment-form button[type="submit"]:active {
  background: #244a9b;
  border-color: #244a9b;
  transform: none;
  translate: none;
  box-shadow: none;
  filter: none;
}

#view-commissions .commission-comment-form button[type="submit"]:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

@media (max-width: 480px) {
  #view-commissions .commission-actions {
    flex-wrap: wrap;
  }
}

.agenda-event-row,
.agenda-event-row:hover,
.agenda-event-row:focus,
.agenda-event-row:focus-within {
  transform: none !important;
  translate: none !important;
  scale: 1 !important;
  padding: 12px 18px !important;
  margin: 0 !important;
  border-width: 1px !important;
  box-sizing: border-box;
}

.agenda-event-row:hover {
  background: #f8fafc;
  border-color: #e2e8f0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.agenda-event-row *:hover {
  transform: none !important;
}

.knowledge-list .knowledge-card:hover,
.knowledge-list .knowledge-item:hover,
.knowledge-list .doc-row:hover {
  background: inherit !important;
  box-shadow: none !important;
  transform: none !important;
  translate: none !important;
  scale: 1 !important;
  border-color: #e2e8f0 !important;
}

.knowledge-list .list-item:hover,
.knowledge-list .knowledge-card:hover,
.knowledge-list .knowledge-item:hover,
.knowledge-list .doc-row:hover {
  padding: 12px !important;
  margin: 0 !important;
  background: inherit !important;
  box-shadow: none !important;
  transform: none !important;
  translate: none !important;
  scale: 1 !important;
  border-color: #e2e8f0 !important;
}

.knowledge-list .list-item:hover,
.knowledge-list .knowledge-card:hover,
.knowledge-list .knowledge-item:hover,
.knowledge-list .doc-row:hover,
.knowledge-list .list-item:focus,
.knowledge-list .knowledge-card:focus,
.knowledge-list .knowledge-item:focus,
.knowledge-list .doc-row:focus,
.knowledge-list .list-item:focus-within,
.knowledge-list .knowledge-card:focus-within,
.knowledge-list .knowledge-item:focus-within,
.knowledge-list .doc-row:focus-within {
  background: #fff !important;
  box-shadow: none !important;
  transform: none !important;
  translate: none !important;
  scale: 1 !important;
  border-color: transparent !important;
  padding: 12px !important;
  margin: 0 !important;
  filter: none !important;
}

.knowledge-list .knowledge-card,
.knowledge-list .knowledge-item,
.knowledge-list .doc-row {
  transition: none !important;
}

.documents-upload-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 10px 16px !important;
  background: #1e3a8a !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 999px !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  line-height: 1 !important;
  cursor: pointer !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08) !important;
  text-decoration: none !important;
}

.documents-upload-btn i,
.documents-upload-btn svg {
  width: 16px !important;
  height: 16px !important;
  stroke-width: 2 !important;
  color: currentColor !important;
}

.documents-upload-btn:hover {
  background: #1e40af !important;
  color: #ffffff !important;
}

.documents-upload-modal {
  position: fixed !important;
  inset: 0 !important;
  z-index: 9999 !important;
  display: flex;
  align-items: flex-start !important;
  justify-content: center !important;
  padding: 88px 24px 24px !important;
  background: rgba(15, 23, 42, 0.45) !important;
  backdrop-filter: blur(4px);
  overflow-y: auto !important;
}

.documents-upload-modal.hidden {
  display: none !important;
}

.documents-upload-dialog {
  width: min(480px, 100%) !important;
  max-width: 480px !important;
  max-height: calc(100vh - 120px) !important;
  background: #fff !important;
  border-radius: 18px !important;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.25) !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
}

.documents-upload-form,
.documents-upload-body {
  padding: 18px !important;
  overflow-y: auto !important;
}

@media (max-width: 640px) {
  .documents-upload-modal {
    padding: 72px 12px 12px !important;
  }

  .documents-upload-dialog {
    width: 100% !important;
    max-width: none !important;
    max-height: calc(100vh - 84px) !important;
    border-radius: 18px !important;
  }
}

.documents-upload-dialog {
  width: min(520px, calc(100vw - 32px)) !important;
  max-height: calc(100vh - 120px) !important;
  background: #fff !important;
  border-radius: 18px !important;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.25) !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
}

.documents-upload-head {
  background: #1e3a8a !important;
  color: #fff !important;
  padding: 16px 20px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-shrink: 0 !important;
}

.documents-upload-head h2 {
  margin: 0 !important;
  font-size: 18px !important;
  line-height: 1.3 !important;
  font-weight: 500 !important;
  color: #fff !important;
}

.documents-upload-close {
  width: 32px !important;
  height: 32px !important;
  border-radius: 999px !important;
  border: none !important;
  background: rgba(255,255,255,0.12) !important;
  color: #fff !important;
  font-size: 24px !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
}

.documents-upload-close:hover {
  background: rgba(255,255,255,0.22) !important;
}

.documents-upload-form {
  padding: 18px 20px 20px !important;
  overflow-y: auto !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
  background: #fff !important;
}

.documents-upload-form label {
  display: block !important;
  margin: 0 0 6px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  color: #475569 !important;
}

.documents-upload-form input,
.documents-upload-form select,
.documents-upload-form textarea {
  width: 100% !important;
  min-height: 40px !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 10px !important;
  padding: 9px 12px !important;
  font-size: 14px !important;
  color: #0f172a !important;
  background: #fff !important;
  outline: none !important;
}

.documents-upload-form textarea {
  min-height: 96px !important;
  resize: vertical !important;
}

.documents-upload-form input:focus,
.documents-upload-form select:focus,
.documents-upload-form textarea:focus {
  border-color: rgba(30, 58, 138, 0.45) !important;
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.10) !important;
}

.documents-upload-actions {
  display: flex !important;
  justify-content: flex-end !important;
  align-items: center !important;
  gap: 10px !important;
  padding-top: 6px !important;
}

.documents-upload-actions button[type="button"] {
  background: transparent !important;
  color: #475569 !important;
  border: none !important;
  padding: 9px 14px !important;
  font-size: 14px !important;
}

.documents-upload-actions button[type="submit"] {
  background: #1e3a8a !important;
  color: #fff !important;
  border: none !important;
  border-radius: 10px !important;
  padding: 9px 16px !important;
  font-size: 14px !important;
  font-weight: 500 !important;
}

.knowledge-ask-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 88px 24px 24px;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  overflow-y: auto;
}

.knowledge-ask-modal.hidden {
  display: none !important;
}

.knowledge-ask-dialog {
  width: min(560px, 100%);
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.25);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.knowledge-ask-head {
  background: #1e3a8a;
  color: #fff;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.knowledge-ask-head h2 {
  margin: 0;
  color: #fff;
  font-size: 16px;
  line-height: 1.3;
  font-weight: 500;
}

.knowledge-ask-close {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.knowledge-ask-close:hover {
  background: rgba(255,255,255,0.22);
}

.knowledge-ask-form {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: #fff;
}

.knowledge-ask-form label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #475569;
}

.knowledge-ask-form input,
.knowledge-ask-form textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 14px;
  color: #0f172a;
  background: #fff;
  outline: none;
  box-shadow: none;
}

.knowledge-ask-form textarea {
  min-height: 120px;
  resize: vertical;
}

.knowledge-ask-form input:focus,
.knowledge-ask-form textarea:focus {
  border-color: rgba(30, 58, 138, 0.45);
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.10);
}

.knowledge-ask-tags p {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 500;
  color: #475569;
}

.knowledge-ask-tags p span {
  color: #94a3b8;
  font-weight: 400;
}

.knowledge-tag-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.knowledge-tag-option {
  height: 28px;
  padding: 0 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  color: #475569;
  font-size: 12px;
  box-shadow: none;
  cursor: pointer;
}

.knowledge-tag-option:hover {
  border-color: rgba(30, 58, 138, .35);
  transform: none;
}

.knowledge-tag-option.selected {
  background: #1e3a8a;
  border-color: #1e3a8a;
  color: #fff;
}

.knowledge-tag-feedback {
  display: block;
  margin-top: 8px;
  color: #b45309;
  font-size: 12px;
  line-height: 1.4;
}

.knowledge-tag-feedback.hidden {
  display: none;
}

.knowledge-ask-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  padding-top: 6px;
}

.knowledge-ask-actions button[type="button"] {
  background: transparent;
  color: #475569;
  border: none;
  padding: 9px 14px;
  font-size: 14px;
}

.knowledge-ask-actions button[type="submit"] {
  background: #1e3a8a;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 500;
}

#view-bureau.bureau-page-shell {
  background: #f8fafc;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
  padding: 0;
}

#view-bureau .bureau-page-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 32px 48px;
}

#view-bureau .bureau-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

#view-bureau .bureau-header h1 {
  margin: 0;
  color: #1e3a8a;
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

#view-bureau .bureau-header p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 14px;
}

#view-bureau .bureau-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

#view-bureau .bureau-header .row-between {
  width: auto;
  margin-left: auto;
}

#view-bureau .bureau-header .row-between > h3 {
  display: none;
}

#view-bureau .bureau-create-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  border-radius: 999px;
  background: #1e3a8a;
  color: #fff;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: none;
}

#view-bureau .bureau-create-btn i,
#view-bureau .bureau-create-btn svg {
  width: 16px;
  height: 16px;
}

#view-bureau .bureau-create-btn:hover {
  background: #1e40af;
}

#view-bureau .bureau-next-card {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
  padding: 28px 32px;
  border-radius: 24px;
  background: #1e3a8a;
  color: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

#view-bureau .bureau-next-edit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin-top: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

#view-bureau .bureau-next-edit-btn:hover {
  background: rgba(255, 255, 255, 0.22);
}

#view-bureau .bureau-next-edit-btn i,
#view-bureau .bureau-next-edit-btn svg {
  width: 14px;
  height: 14px;
}

#view-bureau .bureau-next-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 30%, rgba(255, 255, 255, 0.12), transparent 45%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0 2px, transparent 2px 12px);
  opacity: 0.75;
}

#view-bureau .bureau-next-content,
#view-bureau .bureau-next-side {
  position: relative;
  z-index: 1;
}

#view-bureau .bureau-next-content {
  flex: 1;
  min-width: 0;
}

#view-bureau .bureau-next-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#view-bureau .bureau-next-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #6ee7b7;
}

#view-bureau .bureau-next-content h2 {
  margin: 0;
  color: #fff;
  font-size: 28px;
  line-height: 1.2;
  font-weight: 600;
}

#view-bureau .bureau-next-content p {
  max-width: 680px;
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 15px;
  line-height: 1.7;
}

#view-bureau .bureau-next-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 28px;
  margin-top: 24px;
}

#view-bureau .bureau-next-meta span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 14px;
}

#view-bureau .bureau-next-meta i,
#view-bureau .bureau-next-meta svg {
  width: 16px;
  height: 16px;
  color: rgba(255, 255, 255, 0.72);
}

#view-bureau .bureau-next-side {
  width: 240px;
  flex-shrink: 0;
  padding: 24px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  text-align: center;
}

#view-bureau .bureau-next-side p {
  margin: 0 0 10px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#view-bureau .bureau-next-side strong {
  display: block;
  margin-bottom: 18px;
  color: #fff;
  font-size: 34px;
  line-height: 1;
  font-weight: 600;
}

#view-bureau .bureau-next-main-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  background: #fff;
  color: #1e3a8a;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

#view-bureau .bureau-next-main-btn i,
#view-bureau .bureau-next-main-btn svg {
  width: 16px;
  height: 16px;
}

#view-bureau .bureau-calendar-panel {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  overflow: hidden;
}

#view-bureau .bureau-panel-head {
  padding: 16px 20px;
  border-bottom: 1px solid #f1f5f9;
}

#view-bureau .bureau-panel-head h2 {
  margin: 0;
  color: #1e3a8a;
  font-size: 16px;
  font-weight: 500;
}

#view-bureau .bureau-panel-head p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 13px;
}

#view-bureau .bureau-calendar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

#view-bureau .bureau-calendar-add-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  --primary-cta-min-height: 40px;
  --primary-cta-padding: 6px 16px;
  min-height: var(--primary-cta-min-height);
  border: 0;
  border-radius: 999px;
  background: #1e3a8a;
  color: #fff;
  padding: var(--primary-cta-padding) !important;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: none;
}

#view-bureau .bureau-calendar-add-btn i,
#view-bureau .bureau-calendar-add-btn svg {
  width: 15px;
  height: 15px;
}

#view-bureau .bureau-calendar-add-btn:hover {
  background: #1e40af;
  box-shadow: none;
}

#view-bureau .bureau-calendar-add-btn:focus,
#view-bureau .bureau-calendar-add-btn:active {
  background: #1e40af;
  box-shadow: none;
  transform: none;
}

#view-bureau .bureau-calendar-add-btn:focus,
#view-bureau .bureau-calendar-add-btn:active {
  box-shadow: none;
}

#view-bureau .bureau-calendar-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 20px 20px;
}

#view-bureau .bureau-calendar-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
}

#view-bureau .bureau-calendar-item.is-next-row {
  background: #eff6ff;
  border-color: rgba(30, 58, 138, 0.22);
}

#view-bureau .bureau-calendar-date {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: #dbeafe;
  color: #1e3a8a;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#view-bureau .bureau-calendar-date span {
  font-size: 20px;
  font-weight: 600;
  line-height: 1;
}

#view-bureau .bureau-calendar-date small {
  margin-top: 3px;
  font-size: 11px;
  font-weight: 500;
}

#view-bureau .bureau-calendar-content h3 {
  margin: 0;
  color: #1e3a8a;
  font-size: 15px;
  font-weight: 500;
}

#view-bureau .bureau-calendar-content p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 13px;
}

#view-bureau .bureau-session-file-list {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  margin-top: 10px;
  min-width: 0;
}

#view-bureau .bureau-session-file-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  max-width: 100%;
  min-width: 0;
}

#view-bureau .bureau-session-file-link {
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  min-width: 0;
  color: #1e3a8a;
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: color 120ms ease, transform 120ms ease;
}

#view-bureau .bureau-session-file-link:hover {
  color: #1d4ed8;
  background: transparent;
  box-shadow: none;
  transform: translateY(-1px);
}

#view-bureau .bureau-session-file-link:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 3px;
  border-radius: 2px;
}

#view-bureau .bureau-session-file-link svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  margin-top: 2px;
}

#view-bureau .bureau-session-file-link span {
  min-width: 0;
  overflow-wrap: anywhere;
}

#view-bureau .bureau-session-file-remove {
  flex: 0 0 auto;
  padding: 2px;
  border: 0;
  color: #64748b;
  background: transparent;
  cursor: pointer;
}

#view-bureau .bureau-session-file-remove:hover {
  color: var(--danger);
  background: transparent;
  box-shadow: none;
  transform: none;
}

#view-bureau .bureau-session-file-remove:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

#view-bureau .bureau-session-file-remove svg {
  width: 15px;
  height: 15px;
}

.bureau-calendar-session-files-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.bureau-session-files-guidance,
.bureau-session-files-empty,
.bureau-session-file-feedback {
  margin: 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
}

.bureau-session-file-feedback:empty {
  display: none;
}

.bureau-calendar-session-files-field .bureau-session-file-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.bureau-calendar-session-files-field .bureau-session-file-pending-list {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.bureau-calendar-session-files-field .bureau-session-file-pending {
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
  color: #475569;
  font-size: 13px;
  line-height: 1.4;
}

.bureau-calendar-session-files-field .bureau-session-file-pending svg {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  margin-top: 1px;
  color: #1e3a8a;
}

.bureau-calendar-session-files-field .bureau-session-file-pending span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.bureau-calendar-session-files-field .bureau-session-file-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid #e2e8f0;
}

.bureau-calendar-session-files-field .bureau-session-file-link {
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
  color: #1e3a8a;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.bureau-calendar-session-files-field .bureau-session-file-link:hover {
  color: #1d4ed8;
  background: transparent;
  box-shadow: none;
}

.bureau-calendar-session-files-field .bureau-session-file-link:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.bureau-calendar-session-files-field .bureau-session-file-link svg {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
}

.bureau-calendar-session-files-field .bureau-session-file-remove {
  flex: 0 0 auto;
  padding: 4px;
  border: 0;
  color: #64748b;
  background: transparent;
  cursor: pointer;
}

.bureau-calendar-session-files-field .bureau-session-file-remove:hover {
  color: var(--danger);
  background: transparent;
  box-shadow: none;
  transform: none;
}

.bureau-calendar-session-files-field .bureau-session-file-remove:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.bureau-calendar-session-files-field .bureau-session-file-remove svg {
  width: 15px;
  height: 15px;
}

.bureau-calendar-session-files-field .bureau-session-file-link span {
  min-width: 0;
  overflow-wrap: anywhere;
}

#view-bureau .bureau-calendar-status {
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 500;
}

#view-bureau .bureau-calendar-status.is-next {
  background: #1e3a8a;
  color: #fff;
}

#view-bureau .bureau-calendar-status.is-upcoming {
  background: #dbeafe;
  color: #1e3a8a;
}

#view-bureau .bureau-calendar-status.is-past {
  background: #f1f5f9;
  color: #94a3b8;
}

#view-bureau .bureau-calendar-edit-btn {
  border: none;
  background: transparent;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  cursor: pointer;
}

#view-bureau .bureau-calendar-edit-btn:hover {
  color: #64748b;
  background: transparent;
  box-shadow: none;
  transform: none;
  filter: none;
  text-decoration: none;
  border-color: transparent;
}

#view-bureau .bureau-calendar-edit-btn i,
#view-bureau .bureau-calendar-edit-btn svg {
  width: 14px;
  height: 14px;
}

#view-bureau .bureau-calendar-actions-inline {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

#view-bureau .bureau-calendar-delete-btn {
  border: none;
  background: transparent;
  color: var(--danger);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  cursor: pointer;
}

#view-bureau .bureau-calendar-delete-btn:hover {
  color: var(--danger);
  background: transparent;
  box-shadow: none;
  transform: none;
  filter: none;
  text-decoration: none;
  border-color: transparent;
}

#view-bureau .bureau-calendar-delete-btn i,
#view-bureau .bureau-calendar-delete-btn svg {
  width: 14px;
  height: 14px;
}

#view-bureau #bureau-announcements-panel {
  display: none !important;
}

#view-bureau .bureau-content-shell {
  margin-top: 20px;
}

@media (max-width: 720px) {
  #view-bureau .bureau-page-inner {
    padding: 20px 16px 40px;
  }

  #view-bureau .bureau-next-card {
    flex-direction: column;
    padding: 24px;
  }

  #view-bureau .bureau-next-content h2 {
    font-size: 22px;
  }

  #view-bureau .bureau-next-side {
    width: 100%;
  }

  #view-bureau .bureau-calendar-item {
    grid-template-columns: 54px minmax(0, 1fr);
  }

  #view-bureau .bureau-calendar-status,
  #view-bureau .bureau-calendar-actions-inline {
    grid-column: 2;
    justify-self: flex-start;
  }

  #view-bureau .bureau-calendar-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

.bureau-announcement-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 88px 24px 24px;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  overflow-y: auto;
}

.bureau-announcement-modal.hidden {
  display: none !important;
}

.bureau-next-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 88px 24px 24px;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  overflow-y: auto;
}

.bureau-next-modal.hidden {
  display: none !important;
}

.bureau-next-dialog {
  width: min(620px, calc(100vw - 32px));
  max-height: calc(100vh - 120px);
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.25);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.bureau-next-modal-head {
  background: #1e3a8a;
  color: #fff;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.bureau-next-modal-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
  color: #fff;
}

.bureau-next-modal-close {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.bureau-next-form {
  padding: 18px 20px 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.bureau-next-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.bureau-next-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #475569;
  font-size: 13px;
  font-weight: 500;
}

.bureau-next-form input,
.bureau-next-form select,
.bureau-next-form textarea {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 9px 12px;
  color: #0f172a;
  font-size: 14px;
  background: #fff;
}

.bureau-next-form textarea {
  min-height: 96px;
  resize: vertical;
}

.bureau-next-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 6px;
}

.bureau-next-cancel {
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 14px;
  cursor: pointer;
}

.bureau-next-save {
  border: none;
  border-radius: 10px;
  background: #1e3a8a;
  color: #fff;
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.bureau-calendar-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 88px 24px 24px;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  overflow-y: auto;
}

.bureau-calendar-modal.hidden {
  display: none !important;
}

.bureau-calendar-dialog {
  width: min(620px, calc(100vw - 32px));
  max-height: calc(100vh - 120px);
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.25);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.bureau-calendar-modal-head {
  background: #1e3a8a;
  color: #fff;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.bureau-calendar-modal-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
  color: #fff;
}

.bureau-calendar-modal-close {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.bureau-calendar-form {
  padding: 18px 20px 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.bureau-calendar-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.bureau-calendar-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #475569;
  font-size: 13px;
  font-weight: 500;
}

.bureau-calendar-form input,
.bureau-calendar-form select {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 9px 12px;
  color: #0f172a;
  font-size: 14px;
  background: #fff;
}

.bureau-calendar-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 6px;
}

.bureau-calendar-cancel {
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 14px;
  cursor: pointer;
}

.bureau-calendar-save {
  border: none;
  border-radius: 10px;
  background: #1e3a8a;
  color: #fff;
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.bureau-announcement-dialog {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 120px);
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.25);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.bureau-announcement-head {
  background: #1e3a8a;
  color: #fff;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.bureau-announcement-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
  color: #fff;
}

.bureau-announcement-close {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.bureau-announcement-close:hover {
  background: rgba(255, 255, 255, 0.22);
}

.bureau-announcement-body {
  overflow-y: auto;
}

.bureau-announcement-modal #bureau-announcements-panel {
  display: block !important;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.bureau-announcement-modal #bureau-announcements-panel > h4 {
  display: none;
}

.bureau-announcement-form,
.bureau-announcement-modal #bureau-announcement-form {
  padding: 18px 20px 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

@media (max-width: 640px) {
  .bureau-announcement-modal {
    padding: 72px 12px 12px;
  }

  .bureau-announcement-dialog {
    width: 100%;
    max-height: calc(100vh - 84px);
  }

  .bureau-next-modal {
    padding: 72px 12px 12px;
  }

  .bureau-next-dialog {
    width: 100%;
    max-height: calc(100vh - 84px);
  }

  .bureau-next-form-grid {
    grid-template-columns: 1fr;
  }

  .bureau-calendar-modal {
    padding: 72px 12px 12px;
    align-items: flex-start;
    overflow: hidden;
  }

  .bureau-calendar-dialog {
    width: min(430px, calc(100vw - 24px));
    max-width: calc(100vw - 24px);
    max-height: calc(100dvh - 84px);
    overflow: hidden;
  }

  .bureau-calendar-form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .bureau-calendar-modal,
  .bureau-calendar-modal * {
    box-sizing: border-box;
  }

  .bureau-calendar-modal {
    padding: 72px 16px 16px;
    align-items: flex-start;
    overflow: hidden;
  }

  .bureau-calendar-dialog {
    width: min(430px, calc(100vw - 32px));
    max-width: calc(100vw - 32px);
    max-height: calc(100dvh - 88px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  .bureau-calendar-modal-head {
    padding: 14px 16px;
    flex-shrink: 0;
  }

  .bureau-calendar-modal-head h2 {
    font-size: 17px;
    line-height: 1.25;
  }

  .bureau-calendar-form {
    min-width: 0;
    padding: 14px 14px calc(14px + env(safe-area-inset-bottom, 0px));
    gap: 12px;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
  }

  .bureau-calendar-form,
  .bureau-calendar-form > *,
  .bureau-calendar-form label,
  .bureau-calendar-form-grid {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .bureau-calendar-form input,
  .bureau-calendar-form select {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 0 12px;
    font-size: 16px;
  }

  .bureau-calendar-form-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .bureau-calendar-actions {
    position: sticky;
    bottom: 0;
    margin-top: 4px;
    padding-top: 10px;
    padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(to top, #fff 78%, rgba(255, 255, 255, 0.94) 100%);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    align-items: stretch;
  }

  .bureau-calendar-cancel,
  .bureau-calendar-save {
    width: 100%;
    min-height: 44px;
    justify-content: center;
  }
}

@media (max-width: 1024px) {
  .bureau-calendar-time-grid,
  .bureau-calendar-date-field,
  .bureau-calendar-time-field,
  #bureau-calendar-date,
  #bureau-calendar-start-time,
  #bureau-calendar-end-time {
    width: 100%;
    inline-size: 100%;
    max-width: 100%;
    max-inline-size: 100%;
    min-width: 0;
    min-inline-size: 0;
    box-sizing: border-box;
  }

  .bureau-calendar-time-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  #bureau-calendar-date,
  #bureau-calendar-start-time,
  #bureau-calendar-end-time {
    display: block;
  }
}

@supports (-webkit-touch-callout: none) {
  @media (max-width: 1024px) {
    .bureau-calendar-date-field,
    .bureau-calendar-time-field,
    #bureau-calendar-date,
    #bureau-calendar-start-time,
    #bureau-calendar-end-time {
      width: 100%;
      inline-size: 100%;
      max-width: 100%;
      max-inline-size: 100%;
      min-width: 0;
      min-inline-size: 0;
      box-sizing: border-box;
    }

    #bureau-calendar-date,
    #bureau-calendar-start-time,
    #bureau-calendar-end-time {
      display: block;
    }

    #bureau-calendar-date::-webkit-date-and-time-value,
    #bureau-calendar-start-time::-webkit-date-and-time-value,
    #bureau-calendar-end-time::-webkit-date-and-time-value {
      min-width: 0;
      width: auto;
      max-width: 100%;
    }

    #bureau-calendar-date::-webkit-datetime-edit,
    #bureau-calendar-start-time::-webkit-datetime-edit,
    #bureau-calendar-end-time::-webkit-datetime-edit {
      min-width: 0;
      max-width: 100%;
      padding: 0;
    }

    #bureau-calendar-date::-webkit-calendar-picker-indicator,
    #bureau-calendar-start-time::-webkit-calendar-picker-indicator,
    #bureau-calendar-end-time::-webkit-calendar-picker-indicator {
      margin: 0;
      flex-shrink: 0;
    }
  }
}

#view-tools .tools-favorites,
#view-tools .tools-cat-filters,
#view-tools .tools-app-sections,
#view-tools .tools-section,
#view-tools .tools-grid.hidden {
  display: none !important;
}

#view-tools .tools-main-section {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  padding: 20px;
}

#view-tools #toolsMainGrid.tools-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 14px !important;
  padding: 0 !important;
}

#view-tools #toolsMainGrid .tools-app-card {
  min-height: 156px;
  background: #fff;
}

#view-tools #toolsMainGrid .tools-app-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: #eff6ff;
  color: #1e3a8a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .2s ease, color .2s ease;
}

#view-tools #toolsMainGrid .tools-app-icon i,
#view-tools #toolsMainGrid .tools-app-icon svg {
  width: 24px;
  height: 24px;
  color: currentColor;
  stroke-width: 1.7;
}

#view-tools #toolsMainGrid .tools-app-card:hover .tools-app-icon {
  background: #1e3a8a;
  color: #fff;
}

#view-tools #toolsMainGrid .tools-app-card strong {
  color: #0f172a;
  font-size: 14px;
  line-height: 1.3;
  font-weight: 500;
}

#view-tools #toolsMainGrid .tools-app-card p {
  margin: 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.5;
}

#view-tools #toolsMainGrid .tools-app-card {
  text-decoration: none;
}

#view-tools #toolsMainGrid .tools-app-cta {
  margin-top: 2px;
  color: #1e3a8a;
  font-size: 12px;
  font-weight: 500;
}

#view-tools .applications-create-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 0;
  padding: 10px 16px;
  border-radius: 999px !important;
  border: 0 !important;
  background: #1e3a8a !important;
  color: #fff !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  box-shadow: none !important;
}

#view-tools .applications-create-toggle:hover,
#view-tools .applications-create-toggle:focus,
#view-tools .applications-create-toggle:active {
  background: #1e40af !important;
  color: #fff !important;
  box-shadow: none !important;
  transform: none;
}

.cotech-upload-btn:hover {
  background: #1e40af;
}

#view-knowledge #toggle-knowledge-form:hover {
  background: #1e40af;
}

#view-tools .applications-create-toggle:hover,
#view-tools .applications-create-toggle:focus,
#view-tools .applications-create-toggle:active {
  background: #1e40af !important;
}

:is(
  #view-news .news-add-btn,
  #view-documents .documents-upload-btn,
  .documents-upload-btn,
  #view-documents #document-submit-btn,
  #view-commissions .commissions-upload-btn,
  #view-cotech .cotech-upload-btn,
  .cotech-upload-btn,
  #cotechUploadModal .cotech-primary-action,
  #view-bureau .bureau-create-btn,
  #view-bureau .bureau-calendar-add-btn,
  #view-knowledge #toggle-knowledge-form,
  #view-messages .mail-compose-btn,
  #view-tools .applications-create-toggle,
  #view-tools .tools-create-submit,
  #view-agenda #event-submit-btn,
  #view-prevention-directory .prevention-directory-add-btn,
  #view-prevention-directory .prevention-partner-link,
  #admin-branding-panel .admin-branding-submit
).primary-cta-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  min-height: var(--primary-cta-min-height, auto) !important;
  padding: var(--primary-cta-padding, 10px 16px) !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: #1e3a8a !important;
  background-image: none !important;
  color: #fff !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  line-height: 1 !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08) !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  text-decoration: none !important;
  transform: none !important;
  filter: none !important;
}

:is(
  #view-news .news-add-btn,
  #view-documents .documents-upload-btn,
  .documents-upload-btn,
  #view-documents #document-submit-btn,
  #view-commissions .commissions-upload-btn,
  #view-cotech .cotech-upload-btn,
  .cotech-upload-btn,
  #cotechUploadModal .cotech-primary-action,
  #view-bureau .bureau-create-btn,
  #view-bureau .bureau-calendar-add-btn,
  #view-knowledge #toggle-knowledge-form,
  #view-messages .mail-compose-btn,
  #view-tools .applications-create-toggle,
  #view-tools .tools-create-submit,
  #view-agenda #event-submit-btn,
  #view-prevention-directory .prevention-directory-add-btn,
  #view-prevention-directory .prevention-partner-link,
  #admin-branding-panel .admin-branding-submit
).primary-cta-btn i,
:is(
  #view-news .news-add-btn,
  #view-documents .documents-upload-btn,
  .documents-upload-btn,
  #view-documents #document-submit-btn,
  #view-commissions .commissions-upload-btn,
  #view-cotech .cotech-upload-btn,
  .cotech-upload-btn,
  #cotechUploadModal .cotech-primary-action,
  #view-bureau .bureau-create-btn,
  #view-bureau .bureau-calendar-add-btn,
  #view-knowledge #toggle-knowledge-form,
  #view-messages .mail-compose-btn,
  #view-tools .applications-create-toggle,
  #view-tools .tools-create-submit,
  #view-agenda #event-submit-btn,
  #view-prevention-directory .prevention-directory-add-btn,
  #view-prevention-directory .prevention-partner-link,
  #admin-branding-panel .admin-branding-submit
).primary-cta-btn svg {
  width: 16px !important;
  height: 16px !important;
  stroke-width: 2 !important;
  flex-shrink: 0 !important;
  color: currentColor !important;
}

:is(
  #view-news .news-add-btn,
  #view-documents .documents-upload-btn,
  .documents-upload-btn,
  #view-documents #document-submit-btn,
  #view-commissions .commissions-upload-btn,
  #view-cotech .cotech-upload-btn,
  .cotech-upload-btn,
  #cotechUploadModal .cotech-primary-action,
  #view-bureau .bureau-create-btn,
  #view-bureau .bureau-calendar-add-btn,
  #view-knowledge #toggle-knowledge-form,
  #view-messages .mail-compose-btn,
  #view-tools .applications-create-toggle,
  #view-tools .tools-create-submit,
  #view-agenda #event-submit-btn,
  #view-prevention-directory .prevention-directory-add-btn,
  #view-prevention-directory .prevention-partner-link,
  #admin-branding-panel .admin-branding-submit
).primary-cta-btn:hover,
:is(
  #view-news .news-add-btn,
  #view-documents .documents-upload-btn,
  .documents-upload-btn,
  #view-documents #document-submit-btn,
  #view-commissions .commissions-upload-btn,
  #view-cotech .cotech-upload-btn,
  .cotech-upload-btn,
  #cotechUploadModal .cotech-primary-action,
  #view-bureau .bureau-create-btn,
  #view-bureau .bureau-calendar-add-btn,
  #view-knowledge #toggle-knowledge-form,
  #view-messages .mail-compose-btn,
  #view-tools .applications-create-toggle,
  #view-tools .tools-create-submit,
  #view-agenda #event-submit-btn,
  #view-prevention-directory .prevention-directory-add-btn,
  #view-prevention-directory .prevention-partner-link,
  #admin-branding-panel .admin-branding-submit
).primary-cta-btn:focus,
:is(
  #view-news .news-add-btn,
  #view-documents .documents-upload-btn,
  .documents-upload-btn,
  #view-documents #document-submit-btn,
  #view-commissions .commissions-upload-btn,
  #view-cotech .cotech-upload-btn,
  .cotech-upload-btn,
  #cotechUploadModal .cotech-primary-action,
  #view-bureau .bureau-create-btn,
  #view-bureau .bureau-calendar-add-btn,
  #view-knowledge #toggle-knowledge-form,
  #view-messages .mail-compose-btn,
  #view-tools .applications-create-toggle,
  #view-tools .tools-create-submit,
  #view-agenda #event-submit-btn,
  #view-prevention-directory .prevention-directory-add-btn,
  #view-prevention-directory .prevention-partner-link,
  #admin-branding-panel .admin-branding-submit
).primary-cta-btn:active {
  background: #1e40af !important;
  color: #fff !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08) !important;
  transform: none !important;
  filter: none !important;
}

#admin-branding-panel .admin-branding-submit {
  justify-self: start;
  width: auto;
  box-shadow: none !important;
}

#admin-branding-panel .admin-branding-submit:hover,
#admin-branding-panel .admin-branding-submit:focus,
#admin-branding-panel .admin-branding-submit:active {
  box-shadow: none !important;
  transform: none !important;
  filter: none !important;
}

#admin-branding-panel .admin-branding-submit:focus-visible {
  outline: 3px solid rgba(30, 58, 138, 0.18);
  outline-offset: 2px;
}

#view-tools .applications-creation-panel {
  margin-top: 0;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 20px;
  background: #fff !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.tools-create-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
}

.tools-create-modal.hidden {
  display: none !important;
}

.tools-create-dialog {
  width: min(760px, 100%);
  max-height: calc(100vh - 48px);
  overflow: hidden;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.25);
  display: flex;
  flex-direction: column;
}

.tools-create-head {
  background: #1e3a8a;
  color: #fff;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tools-create-head h2 {
  margin: 0;
  color: #fff;
  font-size: 18px;
  font-weight: 500;
}

.tools-create-close {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.tools-create-body {
  padding: 20px;
  overflow-y: auto;
  min-height: 0;
  background: #fff;
}

.tools-create-body #tools-feedback {
  margin-top: 14px;
}

.tools-create-footer {
  flex-shrink: 0;
  padding: 14px 20px calc(14px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid #e2e8f0;
  background: #fff;
}

#view-tools .tools-create-form,
.tools-create-form {
  margin: 0;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  background: #fff !important;
  display: grid;
  gap: 16px;
}

#view-tools .tools-create-form label,
.tools-create-form label {
  display: grid;
  gap: 6px;
  color: #475569;
  font-size: 13px;
  font-weight: 500;
}

#view-tools .tools-create-form input,
#view-tools .tools-create-form textarea,
.tools-create-form input,
.tools-create-form textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  color: #0f172a;
  padding: 12px 14px;
  font-size: 16px;
  line-height: 1.45;
  box-sizing: border-box;
}

#view-tools .tools-create-form input,
.tools-create-form input {
  min-height: 46px;
}

#view-tools .tools-create-form textarea,
.tools-create-form textarea {
  min-height: 110px;
  resize: vertical;
}

#view-tools .tools-create-form input:focus,
#view-tools .tools-create-form textarea:focus,
.tools-create-form input:focus,
.tools-create-form textarea:focus {
  outline: none;
  border-color: rgba(30, 58, 138, 0.45);
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.10);
}

#view-tools .applications-creation-actions,
.applications-creation-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  margin: 0;
  padding: 0;
  border-top: 0;
  background: #fff;
}

#view-tools .applications-creation-actions button:not(.ghost),
#view-tools .tools-create-submit {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  border: 0;
  background: #1e3a8a;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  box-shadow: none;
  white-space: nowrap;
}

#view-tools .applications-creation-actions .tools-create-submit,
.applications-creation-actions .tools-create-submit,
#view-tools .applications-publish-btn,
.applications-publish-btn {
  order: 2;
  width: auto;
  max-width: 100%;
}

#view-tools .applications-creation-actions .ghost,
#view-tools .tools-create-cancel {
  min-height: auto;
  padding: 9px 14px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #475569;
  font-size: 14px;
  font-weight: 500;
  box-shadow: none;
  cursor: pointer;
}

#view-tools .tools-create-submit:hover,
#view-tools .tools-create-submit:focus {
  background: #1e40af;
  color: #fff;
}

#view-tools .tools-create-cancel:hover,
#view-tools .tools-create-cancel:focus {
  background: transparent;
  color: #475569;
}

@media (max-width: 768px) {
  #view-tools .applications-create-toggle {
    width: 100%;
  }

  #view-tools .tools-title-row {
    gap: 8px 12px;
  }

  #view-tools .tools-header-actions {
    margin: 16px 0 20px;
  }

  .tools-create-modal,
  .applications-create-overlay {
    padding: 16px !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .tools-create-dialog,
  .applications-create-modal {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    transform: none !important;
    width: calc(100vw - 32px) !important;
    max-width: 430px !important;
    min-width: 0 !important;
    max-height: calc(100dvh - 96px) !important;
    border-radius: 24px !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    background: #fff !important;
    box-sizing: border-box !important;
  }

  .tools-create-head {
    padding: 16px;
  }

  .tools-create-body,
  .applications-create-modal-body {
    padding: 16px;
    max-height: none !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .tools-create-footer,
  .applications-create-modal-footer {
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    flex-shrink: 0 !important;
  }

  #view-tools .applications-creation-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
  }

  #view-tools .applications-creation-actions .applications-publish-btn,
  #view-tools .applications-creation-actions .tools-create-submit {
    width: auto;
    min-height: 42px !important;
    padding: 0 16px !important;
  }

  #view-tools .applications-creation-actions .tools-create-cancel,
  .applications-creation-actions .tools-create-cancel {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    min-height: auto !important;
    border-radius: 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: #475569 !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    line-height: 1 !important;
    box-shadow: none !important;
  }
}

#view-prevention-directory.prevention-directory-shell {
  background: #f8fafc;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
  padding: 0;
}

#view-prevention-directory .prevention-directory-page {
  width: 100%;
}

#view-prevention-directory .prevention-directory-page-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 32px 48px;
}

#view-prevention-directory .prevention-directory-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

#view-prevention-directory .prevention-directory-header h1 {
  margin: 0;
  color: #1e3a8a;
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

#view-prevention-directory .prevention-directory-header p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.5;
  max-width: 48rem;
}

#view-prevention-directory .prevention-directory-add-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 999px;
  background: #1e3a8a;
  color: #fff;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
  cursor: pointer;
}

#view-prevention-directory .prevention-directory-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 14px;
  margin-bottom: 16px;
}

#view-prevention-directory .prevention-directory-search {
  position: relative;
}

#view-prevention-directory .prevention-directory-search i,
#view-prevention-directory .prevention-directory-search svg {
  position: absolute;
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: #94a3b8;
}

#view-prevention-directory .prevention-directory-search input,
#view-prevention-directory .prevention-directory-sort select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  color: #0f172a;
  font-size: 14px;
}

#view-prevention-directory .prevention-directory-search input {
  padding: 0 14px 0 42px;
}

#view-prevention-directory .prevention-directory-sort {
  display: grid;
  gap: 6px;
}

#view-prevention-directory .prevention-directory-sort span {
  color: #64748b;
  font-size: 12px;
  font-weight: 500;
}

#view-prevention-directory .prevention-directory-sort select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 20px center;
  background-size: 14px 14px;
  padding: 0 48px 0 16px;
}

#view-prevention-directory .prevention-directory-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

#view-prevention-directory .prevention-directory-chip {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #fff;
  color: #1e3a8a;
  font-size: 13px;
  font-weight: 500;
  box-shadow: none;
}

#view-prevention-directory .prevention-directory-chip:hover {
  background: #eff6ff;
  border-color: rgba(30, 58, 138, 0.22);
  transform: none;
}

#view-prevention-directory .prevention-directory-chip.is-active {
  background: #1e3a8a;
  border-color: #1e3a8a;
  color: #fff;
}

#view-prevention-directory .prevention-directory-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: #64748b;
  font-size: 13px;
}

#view-prevention-directory .prevention-directory-meta strong {
  color: #0f172a;
  font-size: 15px;
}

#view-prevention-directory .prevention-directory-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

@media (min-width: 1025px) {
  #view-prevention-directory .prevention-directory-toolbar {
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 24px;
    align-items: end;
    margin-bottom: 18px;
  }

  #view-prevention-directory .prevention-directory-search,
  #view-prevention-directory .prevention-directory-sort {
    min-width: 0;
  }

  #view-prevention-directory .prevention-directory-search i,
  #view-prevention-directory .prevention-directory-search svg {
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
  }

  #view-prevention-directory .prevention-directory-search input,
  #view-prevention-directory .prevention-directory-sort select {
    min-height: 50px;
    height: 50px;
    box-sizing: border-box;
    line-height: normal;
  }

  #view-prevention-directory .prevention-directory-search input {
    padding: 0 16px 0 54px;
  }

  #view-prevention-directory .prevention-directory-sort {
    gap: 8px;
    align-self: end;
  }

  #view-prevention-directory .prevention-directory-sort span {
    line-height: 1.2;
  }

  #view-prevention-directory .prevention-directory-sort select {
    padding: 0 44px 0 16px;
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  #view-prevention-directory .prevention-directory-page-inner {
    padding: 24px 24px 44px;
  }

  #view-prevention-directory .prevention-directory-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 18px 20px;
    margin-bottom: 18px;
  }

  #view-prevention-directory .prevention-directory-header > div {
    min-width: 0;
  }

  #view-prevention-directory .prevention-directory-header h1 {
    font-size: 24px;
    line-height: 1.15;
  }

  #view-prevention-directory .prevention-directory-header p {
    max-width: 42rem;
    margin-top: 6px;
  }

  #view-prevention-directory .prevention-directory-add-btn {
    align-self: end;
    justify-self: end;
    width: auto;
    min-height: 44px;
    padding: 0 18px;
    white-space: nowrap;
  }

  #view-prevention-directory .prevention-directory-toolbar {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 16px;
  }

  #view-prevention-directory .prevention-directory-search,
  #view-prevention-directory .prevention-directory-sort {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  #view-prevention-directory .prevention-directory-search input,
  #view-prevention-directory .prevention-directory-sort select {
    min-height: 46px;
  }

  #view-prevention-directory .prevention-directory-sort {
    justify-items: start;
    gap: 8px;
  }

  #view-prevention-directory .prevention-directory-sort span {
    font-size: 13px;
    line-height: 1.3;
  }

  #view-prevention-directory .prevention-directory-sort select {
    width: min(320px, 100%);
  }

  #view-prevention-directory .prevention-directory-chips {
    margin-bottom: 16px;
  }

  #view-prevention-directory .prevention-directory-meta {
    margin-bottom: 18px;
  }
}

#view-prevention-directory .prevention-partner-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  padding: 20px;
  display: grid;
  gap: 16px;
}

#view-prevention-directory .prevention-partner-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.prevention-partner-image {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 16px;
  font-weight: 600;
}

.prevention-partner-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}

.prevention-partner-image.is-large,
.prevention-partner-image.is-preview {
  width: 72px;
  height: 72px;
  flex-basis: 72px;
  font-size: 22px;
}

#view-prevention-directory .prevention-partner-identity,
#view-prevention-directory .prevention-detail-title-block {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

#view-prevention-directory .prevention-partner-identity > div,
#view-prevention-directory .prevention-detail-heading-copy {
  min-width: 0;
  overflow-wrap: anywhere;
}

.prevention-partner-image-field {
  min-width: 0;
}

.prevention-partner-image-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  color: #64748b;
  font-size: 12px;
}

.prevention-partner-image-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 8px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  color: #b91c1c;
  background: transparent;
}

.prevention-partner-image-remove[hidden] {
  display: none;
}

.prevention-partner-image-remove:hover {
  background: transparent;
  box-shadow: none;
  transform: none;
}

.prevention-partner-image-remove:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 3px;
}

.prevention-partner-image-remove svg {
  width: 18px;
  height: 18px;
}

.prevention-partner-image-feedback {
  margin: 8px 0 0;
  color: #b91c1c;
  font-size: 13px;
}

.prevention-partner-image-feedback:empty {
  display: none;
}

#view-prevention-directory .prevention-partner-top h3 {
  margin: 0 0 10px;
  color: #0f172a;
  font-size: 18px;
  line-height: 1.3;
  font-weight: 500;
}

#view-prevention-directory .prevention-partner-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

#view-prevention-directory .prevention-partner-tags span,
#view-prevention-directory .prevention-network-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
}

#view-prevention-directory .prevention-partner-tags span {
  background: #eff6ff;
  color: #1e3a8a;
}

#view-prevention-directory .prevention-partner-tags .prevention-demo-badge {
  background: #f1f5f9;
  color: #475569;
  font-weight: 600;
}

#view-prevention-directory .prevention-directory-demo-count,
#view-prevention-directory .prevention-demo-card-note {
  color: #64748b;
  font-size: 12px;
}

#view-prevention-directory .prevention-demo-notice {
  margin: 0 0 20px;
  padding: 10px 12px;
  border-left: 3px solid #94a3b8;
  color: #475569;
  background: #f8fafc;
  font-size: 13px;
}

#view-prevention-directory .prevention-demo-presentation p {
  margin: 0;
  color: #475569;
  line-height: 1.6;
}

#view-prevention-directory .prevention-network-badge {
  background: #ecfdf5;
  color: #047857;
  white-space: nowrap;
}

#view-prevention-directory .prevention-partner-details {
  display: grid;
  gap: 8px;
}

#view-prevention-directory .prevention-partner-details p {
  margin: 0;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: #475569;
  font-size: 13px;
  line-height: 1.5;
}

#view-prevention-directory .prevention-partner-details i,
#view-prevention-directory .prevention-partner-details svg {
  width: 16px;
  height: 16px;
  color: #1e3a8a;
  flex-shrink: 0;
  margin-top: 2px;
}

#view-prevention-directory .prevention-partner-ratings {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid #eef2f7;
  border-radius: 14px;
  background: #f8fafc;
}

#view-prevention-directory .prevention-rating-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #475569;
  font-size: 13px;
}

#view-prevention-directory .prevention-rating-row strong {
  color: #0f172a;
  font-size: 13px;
  font-weight: 600;
}

#view-prevention-directory .prevention-partner-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

#view-prevention-directory .prevention-partner-votes {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  color: #64748b;
  font-size: 12px;
}

#view-prevention-directory .prevention-stars {
  color: #d97706;
  font-size: 14px;
  letter-spacing: 0;
}

#view-prevention-directory .prevention-partner-link {
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #fff;
  color: #1e3a8a;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: none;
}

#view-prevention-directory .prevention-partner-link:hover {
  background: #eff6ff;
  border-color: rgba(30, 58, 138, 0.22);
  transform: none;
}

#view-prevention-directory .prevention-directory-empty {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border: 1px dashed #cbd5e1;
  border-radius: 16px;
  background: #fff;
}

#view-prevention-directory .prevention-directory-empty i,
#view-prevention-directory .prevention-directory-empty svg {
  width: 20px;
  height: 20px;
  color: #94a3b8;
  flex-shrink: 0;
}

#view-prevention-directory .prevention-directory-empty strong {
  display: block;
  color: #0f172a;
  font-size: 14px;
  font-weight: 500;
}

#view-prevention-directory .prevention-directory-empty p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 13px;
}

#view-prevention-directory .prevention-partner-detail {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

#view-prevention-directory .prevention-partner-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 28px;
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

#view-prevention-directory .prevention-detail-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  border: none;
  background: transparent;
  color: #1e3a8a;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 10px;
  cursor: pointer;
}

#view-prevention-directory .prevention-detail-back:hover {
  background: rgba(30, 58, 138, 0.08);
  color: #1e3a8a;
  box-shadow: none;
  transform: none;
  filter: none;
  text-decoration: none;
}

#view-prevention-directory .prevention-detail-back i,
#view-prevention-directory .prevention-detail-back svg,
#view-prevention-directory .prevention-detail-meta i,
#view-prevention-directory .prevention-detail-meta svg {
  width: 16px;
  height: 16px;
}

#view-prevention-directory .prevention-detail-eyebrow {
  margin-bottom: 10px;
  color: #1e3a8a;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

#view-prevention-directory .prevention-detail-title-block h2 {
  margin: 0;
  color: #0f172a;
  font-size: 32px;
  line-height: 1.12;
  font-weight: 600;
}

#view-prevention-directory .prevention-detail-meta {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  color: #64748b;
  font-size: 14px;
}

#view-prevention-directory .prevention-detail-meta span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

#view-prevention-directory .prevention-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

#view-prevention-directory .prevention-detail-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 1px solid #dbe4f0;
  border-radius: 999px;
  background: #fff;
  color: #1e3a8a;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}

#view-prevention-directory .prevention-detail-action-delete {
  color: var(--danger);
}

#view-prevention-directory .prevention-detail-action-delete:hover {
  color: var(--danger);
  background: #fff;
  border-color: #dbe4f0;
}

#view-prevention-directory .prevention-detail-feedback-btn:hover {
  background: #eef4ff;
  border-color: #24449b;
}

#view-prevention-directory .prevention-detail-feedback-btn:active {
  background: #e6efff;
  border-color: #24449b;
}

#view-prevention-directory .prevention-detail-feedback-btn:focus {
  outline: none;
}

#view-prevention-directory .prevention-detail-feedback-btn:focus-visible {
  outline: 3px solid rgba(36, 68, 155, 0.22);
  outline-offset: 2px;
}

#view-prevention-directory .prevention-detail-action.is-primary {
  background: #1e3a8a;
  border-color: #1e3a8a;
  color: #fff;
}

#view-prevention-directory .prevention-detail-action.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.prevention-directory-delete-dialog {
  width: min(520px, calc(100vw - 32px));
}

.prevention-directory-delete-body {
  padding: 20px 24px 0;
}

.prevention-directory-delete-body p {
  margin: 0;
  color: #475569;
  font-size: 14px;
  line-height: 1.6;
}

.prevention-directory-delete-actions {
  justify-content: flex-end;
  padding: 24px 24px 32px;
}

.prevention-directory-delete-submit {
  background: var(--danger);
  border-color: var(--danger);
}

.prevention-directory-delete-submit:hover,
.prevention-directory-delete-submit:focus {
  background: #8c1930;
  border-color: #8c1930;
}

#view-prevention-directory .prevention-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(280px, 0.9fr);
  gap: 24px;
  align-items: start;
}

#view-prevention-directory .prevention-detail-main,
#view-prevention-directory .prevention-detail-side {
  min-width: 0;
}

#view-prevention-directory .prevention-detail-main {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

#view-prevention-directory .prevention-detail-card {
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  padding: 22px 24px;
}

#view-prevention-directory .prevention-detail-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

#view-prevention-directory .prevention-detail-card-head h3 {
  margin: 0;
  color: #1e3a8a;
  font-size: 17px;
  font-weight: 500;
}

#view-prevention-directory .prevention-detail-card-head span {
  color: #94a3b8;
  font-size: 12px;
}

#view-prevention-directory .prevention-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 18px;
}

#view-prevention-directory .prevention-summary-grid div {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

#view-prevention-directory .prevention-summary-grid span {
  color: #94a3b8;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

#view-prevention-directory .prevention-summary-grid strong {
  color: #0f172a;
  font-size: 14px;
  line-height: 1.55;
  font-weight: 500;
}

#view-prevention-directory .prevention-detail-rating-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#view-prevention-directory .prevention-detail-rating-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 40px;
  align-items: center;
  gap: 12px;
}

#view-prevention-directory .prevention-detail-rating-row > span {
  color: #334155;
  font-size: 14px;
}

#view-prevention-directory .prevention-detail-rating-row > strong {
  color: #1e3a8a;
  font-size: 14px;
  text-align: right;
}

#view-prevention-directory .prevention-detail-rating-stars,
#view-prevention-directory .prevention-experience-rating div {
  display: inline-flex;
  gap: 3px;
  color: #cbd5e1;
  font-size: 15px;
}

#view-prevention-directory .prevention-detail-rating-stars .is-filled,
#view-prevention-directory .prevention-experience-rating .is-filled {
  color: #f59e0b;
}

#view-prevention-directory .prevention-strength-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

#view-prevention-directory .prevention-detail-card p {
  margin: 0;
  color: #475569;
  font-size: 14px;
  line-height: 1.7;
}

#view-prevention-directory .prevention-experience-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

#view-prevention-directory .prevention-experience-card {
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  background: #f8fafc;
  padding: 18px 18px 16px;
}

#view-prevention-directory .prevention-experience-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

#view-prevention-directory .prevention-experience-top h4 {
  margin: 0;
  color: #0f172a;
  font-size: 16px;
  font-weight: 500;
}

#view-prevention-directory .prevention-experience-top p {
  margin-top: 6px;
  color: #64748b;
  font-size: 13px;
}

#view-prevention-directory .prevention-experience-price {
  border-radius: 999px;
  background: #eff6ff;
  color: #1e3a8a;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

#view-prevention-directory .prevention-experience-ratings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
  margin-bottom: 14px;
}

#view-prevention-directory .prevention-experience-rating {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#view-prevention-directory .prevention-experience-rating span {
  color: #64748b;
  font-size: 12px;
}

#view-prevention-directory .prevention-experience-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 18px;
  margin-bottom: 14px;
}

#view-prevention-directory .prevention-experience-columns strong,
#view-prevention-directory .prevention-experience-advice strong {
  display: block;
  margin-bottom: 6px;
  color: #0f172a;
  font-size: 13px;
  font-weight: 600;
}

#view-prevention-directory .prevention-experience-footer {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #e2e8f0;
  color: #334155;
  font-size: 13px;
}

#view-prevention-directory .prevention-experience-footer .prevention-detail-actions {
  margin-top: 10px;
}

#view-prevention-directory .prevention-vote-card {
  position: sticky;
  top: 1.5rem;
}

#view-prevention-directory .prevention-vote-card > p {
  margin-bottom: 14px;
}

#view-prevention-directory .prevention-vote-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#view-prevention-directory .prevention-vote-btn,
#view-prevention-directory .prevention-reserve-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 1px solid #dbe4f0;
  border-radius: 12px;
  background: #fff;
  color: #1e3a8a;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
}

#view-prevention-directory .prevention-vote-btn.is-active {
  background: #1e3a8a;
  border-color: #1e3a8a;
  color: #fff;
}

#view-prevention-directory .prevention-vote-btn.is-reserve {
  background: #e11d48;
  border-color: #e11d48;
}

#view-prevention-directory .prevention-vote-btn:disabled,
#view-prevention-directory .prevention-vote-edit:disabled,
#view-prevention-directory .prevention-reserve-withdraw:disabled,
#view-prevention-directory .prevention-reserve-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

#view-prevention-directory .prevention-vote-feedback {
  margin: 14px 0 0;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.45;
}

#view-prevention-directory .prevention-vote-feedback.is-positive {
  background: #eff6ff;
  color: #1e3a8a;
}

#view-prevention-directory .prevention-vote-feedback.is-reserve {
  background: #fff1f2;
  color: #be123c;
}

#view-prevention-directory .prevention-vote-totals {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  color: #475569;
  font-size: 13px;
}

#view-prevention-directory .prevention-vote-summary {
  display: grid;
  gap: 4px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #f8fafc;
}

#view-prevention-directory .prevention-vote-summary strong {
  color: #0f172a;
  font-size: 13px;
  font-weight: 600;
}

#view-prevention-directory .prevention-vote-summary span,
#view-prevention-directory .prevention-vote-summary p {
  color: #475569;
  font-size: 13px;
  line-height: 1.45;
}

#view-prevention-directory .prevention-reserve-withdraw {
  justify-self: start;
}

#view-prevention-directory .prevention-reserve-reasons {
  margin-top: 18px;
}

#view-prevention-directory .prevention-reserve-reasons.hidden {
  display: none;
}

#view-prevention-directory .prevention-reserve-reasons strong {
  display: block;
  margin-bottom: 10px;
  color: #334155;
  font-size: 13px;
  font-weight: 600;
}

#view-prevention-directory .prevention-reserve-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

#view-prevention-directory .prevention-reserve-chip {
  min-height: 32px;
  border-radius: 999px;
  font-size: 12px;
  padding: 0 10px;
}

#view-prevention-directory .prevention-reserve-chip.is-active {
  background: #fee2e2;
  border-color: #fecaca;
  color: #b91c1c;
}

#view-prevention-directory .prevention-reserve-confirmation {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
}

#view-prevention-directory .prevention-reserve-selected {
  display: grid;
  gap: 4px;
}

#view-prevention-directory .prevention-reserve-selected span,
#view-prevention-directory .prevention-reserve-comment-field span {
  color: #64748b;
  font-size: 12px;
  font-weight: 500;
}

#view-prevention-directory .prevention-reserve-selected strong {
  color: #0f172a;
  font-size: 14px;
  font-weight: 600;
}

#view-prevention-directory .prevention-reserve-comment-field {
  display: grid;
  gap: 6px;
}

#view-prevention-directory .prevention-reserve-comment-field textarea {
  width: 100%;
  min-height: 92px;
  border: 1px solid #dbe4f0;
  border-radius: 12px;
  background: #fff;
  color: #0f172a;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.5;
  resize: vertical;
  box-sizing: border-box;
}

#view-prevention-directory .prevention-reserve-comment-field textarea::placeholder {
  color: #94a3b8;
}

#view-prevention-directory .prevention-reserve-comment-field textarea:focus {
  outline: none;
  border-color: rgba(30, 58, 138, 0.45);
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.10);
}

#view-prevention-directory .prevention-reserve-confirmation-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px;
}

#view-prevention-directory .prevention-reserve-cancel {
  border: none;
  background: transparent;
  color: #64748b;
  padding: 0;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

#view-prevention-directory .prevention-reserve-submit {
  min-height: 38px;
  border: none;
  border-radius: 10px;
  background: #e11d48;
  color: #fff;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

@media (max-width: 960px) {
  #view-prevention-directory .prevention-directory-toolbar,
  #view-prevention-directory .prevention-directory-grid {
    grid-template-columns: 1fr;
  }

  #view-prevention-directory .prevention-detail-grid,
  #view-prevention-directory .prevention-strength-grid,
  #view-prevention-directory .prevention-experience-columns {
    grid-template-columns: 1fr;
  }

  #view-prevention-directory .prevention-detail-actions {
    justify-content: flex-start;
  }

  #view-prevention-directory .prevention-vote-card {
    position: static;
  }
}

@media (max-width: 720px) {
  #view-prevention-directory .prevention-directory-page-inner {
    padding: 20px 16px 40px;
  }

  #view-prevention-directory .prevention-directory-header {
    align-items: flex-start;
  }

  #view-prevention-directory .prevention-directory-add-btn {
    width: 100%;
  }

  #view-prevention-directory .prevention-partner-card {
    padding: 18px 16px;
  }

  #view-prevention-directory .prevention-partner-top,
  #view-prevention-directory .prevention-partner-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  #view-prevention-directory .prevention-partner-detail-head,
  #view-prevention-directory .prevention-experience-top {
    flex-direction: column;
  }

  #view-prevention-directory .prevention-detail-title-block h2 {
    font-size: 24px;
  }

  #view-prevention-directory .prevention-summary-grid,
  #view-prevention-directory .prevention-experience-ratings {
    grid-template-columns: 1fr;
  }

  #view-prevention-directory .prevention-detail-rating-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  #view-prevention-directory .prevention-reserve-confirmation-actions {
    align-items: stretch;
  }

  #view-prevention-directory .prevention-reserve-submit {
    width: 100%;
  }
}

.prevention-directory-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 88px 24px 24px;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  overflow-y: auto;
}

.prevention-directory-modal.hidden {
  display: none !important;
}

.prevention-directory-dialog {
  width: min(820px, calc(100vw - 32px));
  max-height: calc(100vh - 120px);
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.25);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.prevention-directory-experience-dialog {
  width: min(780px, calc(100vw - 32px));
}

.prevention-directory-experience-form {
  background: #fff;
}

.prevention-directory-modal-head {
  background: #1e3a8a;
  color: #fff;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.prevention-directory-modal-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
}

.prevention-directory-modal-close {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.prevention-directory-form {
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: #fff;
}

.prevention-form-section {
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 16px;
  background: #f8fafc;
  display: grid;
  gap: 14px;
}

.prevention-form-section-head h3 {
  margin: 0;
  color: #1e3a8a;
  font-size: 15px;
  font-weight: 500;
}

.prevention-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.prevention-form-grid-span-2 {
  grid-column: 1 / -1;
}

.prevention-form-grid label {
  display: grid;
  gap: 6px;
  color: #475569;
  font-size: 13px;
  font-weight: 500;
}

.prevention-form-grid input,
.prevention-form-grid select,
.prevention-form-grid textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 14px;
  color: #0f172a;
  background: #fff;
  outline: none;
}

.prevention-form-grid select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 52px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 20px center;
  background-size: 14px 14px;
}

.prevention-form-grid textarea {
  min-height: 96px;
  resize: vertical;
}

.prevention-form-grid input:focus,
.prevention-form-grid select:focus,
.prevention-form-grid textarea:focus {
  border-color: rgba(30, 58, 138, 0.45);
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.10);
}

.prevention-form-subgrid {
  display: grid;
  gap: 16px;
}

.prevention-form-subgrid > div {
  display: grid;
  gap: 10px;
}

.prevention-form-subgrid > div > p,
.prevention-rating-field > span {
  margin: 0;
  color: #475569;
  font-size: 13px;
  font-weight: 500;
}

.prevention-tag-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.prevention-check-chip {
  position: relative;
  display: inline-flex;
}

.prevention-check-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.prevention-check-chip span {
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid #dbe7f5;
  border-radius: 999px;
  background: #fff;
  color: #1e3a8a;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.prevention-check-chip input:checked + span {
  background: #1e3a8a;
  border-color: #1e3a8a;
  color: #fff;
}

.prevention-ratings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.prevention-rating-field {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  padding: 12px;
  display: grid;
  gap: 10px;
}

.prevention-rating-stars {
  display: flex;
  gap: 4px;
}

.prevention-rating-star {
  width: 34px;
  height: 34px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
}

.prevention-rating-star:hover,
.prevention-rating-star.is-active {
  background: #eff6ff;
  border-color: rgba(30, 58, 138, 0.32);
  color: #d97706;
  transform: none;
}

.prevention-directory-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 4px;
}

.prevention-directory-form-cancel {
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 14px;
  cursor: pointer;
}

.prevention-directory-form-submit {
  border: none;
  border-radius: 10px;
  background: #1e3a8a;
  color: #fff;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

/* Restrict the global button elevation reset to the prevention directory only. */
#view-prevention-directory button:hover,
#view-prevention-directory button:active,
#view-prevention-directory .prevention-detail-action:hover,
#view-prevention-directory .prevention-detail-action:active,
.prevention-directory-modal button:hover,
.prevention-directory-modal button:active {
  box-shadow: none !important;
  transform: none !important;
  filter: none !important;
}

#view-prevention-directory .prevention-detail-action:hover {
  background: #eff6ff;
  border-color: rgba(30, 58, 138, 0.22);
}

#view-prevention-directory .prevention-detail-action.is-primary:hover {
  background: #172f73;
  border-color: #172f73;
  color: #fff;
}

#view-prevention-directory .prevention-detail-action-delete:hover {
  background: #fff1f2;
  border-color: #fecdd3;
  color: var(--danger);
}

.prevention-directory-modal .prevention-directory-modal-close:hover {
  background: rgba(255, 255, 255, 0.18);
}

.prevention-directory-modal .prevention-directory-form-cancel:hover {
  background: #f8fafc;
  color: #475569;
}

.prevention-directory-modal .prevention-directory-form-submit:hover {
  background: #172f73;
}

.prevention-directory-delete-modal .prevention-directory-form-cancel:hover {
  background: #f8fafc;
  color: #475569;
}

.prevention-directory-delete-modal .prevention-directory-delete-submit:hover {
  background: #8c1930;
  border-color: #8c1930;
}

#view-prevention-directory .prevention-detail-feedback-btn:hover {
  background: #eef4ff;
  border-color: #24449b;
}

@media (max-width: 720px) {
  .prevention-directory-modal {
    padding: 72px 12px 12px;
  }

  .prevention-directory-dialog {
    width: 100%;
    max-height: calc(100vh - 84px);
    border-radius: 18px;
  }

  .prevention-form-grid,
  .prevention-ratings-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  #view-tools #toolsMainGrid.tools-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
}

.news-detail-modal {
  position: fixed !important;
  inset: 0 !important;
  z-index: 9999 !important;
  display: flex !important;
  align-items: flex-start !important;
  justify-content: center !important;
  padding: 72px 24px 24px !important;
  background: rgba(15, 23, 42, 0.48) !important;
  backdrop-filter: blur(5px) !important;
  overflow-y: auto !important;
}

.news-detail-modal.hidden {
  display: none !important;
}

.news-detail-dialog {
  width: min(940px, calc(100vw - 32px)) !important;
  max-height: calc(100vh - 96px) !important;
  background: #fff !important;
  border-radius: 22px !important;
  box-shadow: 0 28px 90px rgba(15, 23, 42, 0.28) !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  padding: 0 !important;
  gap: 0 !important;
}

.news-detail-head {
  background:
    radial-gradient(circle at top right, rgba(255,255,255,0.16), transparent 34%),
    linear-gradient(135deg, #1e3a8a 0%, #172554 100%) !important;
  color: #fff !important;
  padding: 22px 24px !important;
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 20px !important;
}

.news-detail-head h3,
.news-detail-head h2 {
  margin: 0 !important;
  color: #fff !important;
  font-size: 24px !important;
  line-height: 1.25 !important;
  font-weight: 500 !important;
  letter-spacing: -0.02em !important;
}

.news-detail-close {
  width: 36px !important;
  height: 36px !important;
  border: 1px solid rgba(255,255,255,0.18) !important;
  border-radius: 999px !important;
  background: rgba(255,255,255,0.12) !important;
  color: #fff !important;
  font-size: 24px !important;
  line-height: 1 !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}

.news-detail-close:hover {
  background: rgba(255,255,255,0.22) !important;
}

.news-detail-body {
  padding: 22px 24px 24px !important;
  overflow-y: auto !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 18px !important;
}

.news-detail-meta .author-line {
  display: flex;
  align-items: center;
  gap: 10px;
}

.news-detail-meta .meta,
.news-detail-meta .news-source-line {
  color: #64748b !important;
  font-size: 13px !important;
}

.news-detail-media-list {
  display: grid !important;
  gap: 12px !important;
}

.news-detail-media-list .media-card {
  border-radius: 16px !important;
  overflow: hidden !important;
  border: 1px solid #e2e8f0 !important;
  background: #fff !important;
  box-shadow: none !important;
}

.news-detail-media-list img,
.news-detail-media-list video {
  width: 100% !important;
  max-height: 280px !important;
  object-fit: cover !important;
  display: block !important;
}

.news-detail-media-list iframe {
  width: 100% !important;
  min-height: 280px !important;
  border: 0 !important;
  border-radius: 16px !important;
  background: #eff5ff !important;
}

.news-detail-source-card {
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
  padding: 12px 14px !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 14px !important;
  background: #f8fafc !important;
  color: #1e3a8a !important;
  text-decoration: none !important;
}

.news-detail-source-card strong {
  font-size: 14px !important;
  font-weight: 500 !important;
}

.news-detail-source-card span {
  color: #64748b !important;
  font-size: 13px !important;
  word-break: break-all !important;
}

.news-detail-content {
  color: #0f172a !important;
  font-size: 16px !important;
  line-height: 1.65 !important;
}

.news-detail-tags {
  margin-top: -4px;
}

.news-comments-section {
  margin-top: 4px !important;
  padding-top: 20px !important;
  border-top: 1px solid #e2e8f0 !important;
}

.news-comments-head {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 16px !important;
  margin-bottom: 14px !important;
}

.news-comments-head h3 {
  margin: 0 !important;
  color: #1e3a8a !important;
  font-size: 16px !important;
  font-weight: 500 !important;
}

.news-comments-head p {
  margin: 4px 0 0 !important;
  color: #64748b !important;
  font-size: 13px !important;
}

.news-comments-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  margin-bottom: 16px !important;
}

.news-comments-empty {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 14px 16px !important;
  border: 1px dashed #cbd5e1 !important;
  border-radius: 14px !important;
  background: #f8fafc !important;
  color: #64748b !important;
}

.news-comments-empty i,
.news-comments-empty svg {
  width: 18px !important;
  height: 18px !important;
  color: #94a3b8 !important;
}

.news-comments-empty p {
  margin: 0 !important;
  font-size: 14px !important;
}

.news-comment-form {
  margin-top: 24px !important;
  padding: 14px !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 16px !important;
  background: #ffffff !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03) !important;
}

.news-comment-form label {
  display: block !important;
  margin-bottom: 8px !important;
  color: #334155 !important;
  font-size: 14px !important;
  font-weight: 700 !important;
}

.news-comment-form textarea {
  width: 100% !important;
  min-height: 72px !important;
  max-height: 180px !important;
  resize: vertical !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  padding: 12px 14px !important;
  background: #fff !important;
  color: #0f172a !important;
  font-size: 14px !important;
  line-height: 1.45 !important;
  outline: none !important;
}

.news-comment-form textarea:focus {
  border-color: rgba(30, 58, 138, 0.45) !important;
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.10) !important;
}

.news-comment-footer {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  margin-top: 10px !important;
}

.news-reactions {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
}

.news-reactions button {
  width: 30px !important;
  height: 30px !important;
  min-width: 30px !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 999px !important;
  background: #fff !important;
  color: #334155 !important;
  font-size: 15px !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: none !important;
  transition: background-color .18s ease, border-color .18s ease, transform .18s ease !important;
}

.news-reactions button:hover {
  background: #f8fafc !important;
  border-color: #bfdbfe !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
}

.news-reactions button:active {
  transform: translateY(1px) !important;
}

.news-comment-composer-actions,
.comment-composer-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 10px !important;
}

.news-comment-submit {
  border: none !important;
  border-radius: 999px !important;
  background: #1e3a8a !important;
  color: #fff !important;
  min-height: 36px !important;
  padding: 0 18px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  box-shadow: 0 4px 12px rgba(30, 58, 138, 0.14) !important;
}

.news-comment-submit:hover {
  background: #1e40af !important;
}

.news-comment-cancel,
button[data-comment-cancel] {
  min-height: 36px !important;
  padding: 0 10px !important;
  border: none !important;
  background: transparent !important;
  color: #64748b !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
}

.news-comments-section .comment-reply-context {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  margin-bottom: 10px !important;
  padding: 9px 12px !important;
  border: 1px solid #dbeafe !important;
  border-radius: 12px !important;
  background: #f8fbff !important;
}

.news-comments-section .comment-reply-context-text {
  min-width: 0 !important;
  display: flex !important;
  align-items: baseline !important;
  gap: 4px !important;
  flex-wrap: wrap !important;
}

.news-comments-section .comment-reply-context-text span {
  margin-right: 0 !important;
  color: #64748b !important;
  font-size: 12px !important;
  font-weight: 500 !important;
}

.news-comments-section .comment-reply-context-text strong {
  color: #1e3a8a !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}

.news-comments-section .comment-reply-context-text p {
  width: 100% !important;
  margin: 2px 0 0 !important;
  color: #64748b !important;
  font-size: 12px !important;
  line-height: 1.35 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.news-comments-section .comment-reply-context-clear,
.news-comments-section button[data-clear-reply] {
  flex-shrink: 0 !important;
  border: none !important;
  background: transparent !important;
  color: #1e3a8a !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  padding: 0 !important;
  cursor: pointer !important;
}

.news-comments-section .comment-reply-context-clear:hover,
.news-comments-section button[data-clear-reply]:hover {
  text-decoration: underline !important;
  text-underline-offset: 3px !important;
}

.news-comment-cancel:hover,
button[data-comment-cancel]:hover {
  color: #1e3a8a !important;
  text-decoration: underline !important;
  text-underline-offset: 3px !important;
}

.news-comments-section .comment-item,
.news-comments-section .comment-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px 14px;
}

.news-comments-section .comment-item {
  padding: 18px 20px !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 16px !important;
  background: #fff !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03) !important;
  display: block !important;
}

.news-comments-section .comment-item.comment-reply {
  padding: 14px 16px !important;
  border-radius: 14px !important;
  box-shadow: none !important;
  min-height: auto !important;
}

.comment-reply-card.is-short-reply,
.news-comments-section .comment-item.comment-reply.is-short-reply,
.comment-reply.is-short-reply,
.reply-card.is-short-reply,
.news-comment-reply.is-short-reply {
  padding: 12px 14px !important;
  min-height: 0 !important;
}

.news-comments-section .comment-item.comment-reply .comment-avatar {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  max-width: 36px !important;
  min-height: 36px !important;
  max-height: 36px !important;
  font-size: 12px !important;
}

.news-comments-section .comment-item > .author-line {
  display: flex !important;
  align-items: flex-start !important;
  gap: 12px !important;
  margin: 0 0 10px !important;
}

.comment-avatar,
.news-comment-avatar,
.actuality-comment-avatar,
.news-comments-section .comment-item > .author-line .comment-avatar {
  width: var(--comment-avatar-size, 42px) !important;
  height: var(--comment-avatar-size, 42px) !important;
  min-width: var(--comment-avatar-size, 42px) !important;
  max-width: var(--comment-avatar-size, 42px) !important;
  min-height: var(--comment-avatar-size, 42px) !important;
  max-height: var(--comment-avatar-size, 42px) !important;
  border-radius: 999px !important;
  overflow: hidden !important;
  background: #dbeafe !important;
  color: #1e3a8a !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  position: relative !important;
  border: 1px solid #bfdbfe !important;
  flex-shrink: 0 !important;
}

.comment-avatar img,
.news-comment-avatar img,
.actuality-comment-avatar img,
.news-comments-section .comment-item > .author-line .comment-avatar img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
  border-radius: inherit !important;
}

.comment-avatar-fallback {
  display: none !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  height: 100% !important;
  text-align: center !important;
}

.comment-avatar.has-fallback img,
.news-comment-avatar.has-fallback img,
.actuality-comment-avatar.has-fallback img,
.comment-avatar.is-fallback img,
.news-comment-avatar.is-fallback img,
.actuality-comment-avatar.is-fallback img {
  display: none !important;
}

.comment-avatar.has-fallback .comment-avatar-fallback,
.news-comment-avatar.has-fallback .comment-avatar-fallback,
.actuality-comment-avatar.has-fallback .comment-avatar-fallback,
.comment-avatar.is-fallback .comment-avatar-fallback,
.news-comment-avatar.is-fallback .comment-avatar-fallback,
.actuality-comment-avatar.is-fallback .comment-avatar-fallback {
  display: inline-flex !important;
}

.news-comments-section .comment-item > .author-line .meta {
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
  margin: 0 !important;
  color: #94a3b8 !important;
  font-size: 13px !important;
}

.comment-header,
.news-comment-header,
.comment-reply-header,
.news-comment-reply-header {
  display: flex !important;
  align-items: flex-start !important;
  gap: 12px !important;
}

.comment-header-main,
.news-comment-header-main,
.comment-author-block,
.news-comments-section .comment-item > .author-line .meta {
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
}

.news-comments-section .comment-item > .author-line .meta strong {
  color: #1e3a8a !important;
  font-size: 15px !important;
  font-weight: 700 !important;
}

.news-comments-section .comment-body.article-rich {
  margin: 0 0 0 48px !important;
  color: #334155 !important;
  font-size: 15px !important;
  line-height: 1.55 !important;
  white-space: pre-line !important;
}

.news-comments-section .comment-item.comment-reply .comment-body.article-rich {
  margin-left: 0 !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
}

.comment-reply-card.is-short-reply .comment-body,
.comment-reply.is-short-reply .comment-body,
.reply-card.is-short-reply .comment-body,
.news-comment-reply.is-short-reply .comment-body,
.comment-reply-card.is-short-reply .comment-content,
.comment-reply.is-short-reply .comment-content,
.reply-card.is-short-reply .comment-content,
.news-comment-reply.is-short-reply .comment-content,
.news-comments-section .comment-item.comment-reply.is-short-reply .comment-body.article-rich {
  margin-top: 6px !important;
  font-size: 18px !important;
  line-height: 1.25 !important;
}

.news-comments-section .comment-body.article-rich > *:first-child {
  margin-top: 0 !important;
}

.news-comments-section .comment-body.article-rich > *:last-child {
  margin-bottom: 0 !important;
}

.news-comments-section .comment-body.article-rich p {
  margin: 0 0 8px !important;
}

.news-comments-section .comment-body.article-rich p:last-child {
  margin-bottom: 0 !important;
}

.news-comments-section .comment-actions {
  margin: 8px 0 0 48px !important;
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  flex-wrap: wrap !important;
}

.news-comments-section .comment-item.comment-reply .comment-actions {
  margin-left: 0 !important;
}

.comment-reply-card.is-short-reply .comment-header,
.comment-reply.is-short-reply .comment-header,
.reply-card.is-short-reply .comment-header,
.news-comment-reply.is-short-reply .comment-header,
.news-comments-section .comment-item.comment-reply.is-short-reply > .author-line {
  margin-bottom: 6px !important;
}

.comment-reply-card.is-short-reply .comment-reply-btn,
.comment-reply.is-short-reply .comment-reply-btn,
.reply-card.is-short-reply .comment-reply-btn,
.news-comment-reply.is-short-reply .comment-reply-btn,
.news-comments-section .comment-item.comment-reply.is-short-reply .comment-reply-btn {
  margin-top: 6px !important;
  font-size: 12px !important;
}

.news-comments-section .comment-actions .comment-reply-btn,
.news-comments-section .comment-actions .ghost {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  margin-top: 8px !important;
  min-height: auto !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #64748b !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1.4 !important;
  cursor: pointer !important;
  width: auto !important;
}

.news-comments-section .comment-actions .comment-reply-btn:hover,
.news-comments-section .comment-actions .ghost:hover {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: #1e3a8a !important;
  text-decoration: underline !important;
  text-underline-offset: 3px !important;
}

.news-comments-section .comment-actions .comment-reply-btn:focus-visible,
.news-comments-section .comment-actions .ghost:focus-visible {
  outline: none !important;
  border-radius: 6px !important;
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.14) !important;
}

.news-comments-section .comment-children {
  margin-top: 14px !important;
  margin-left: 28px !important;
  padding-left: 18px !important;
  border-left: 2px solid #dbeafe !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
}

.news-comments-section .comment-children::before {
  width: 2px !important;
  background: #dbeafe !important;
  left: 0 !important;
}

.comment-reply-card,
.comment-reply,
.reply-card,
.news-comment-reply,
.news-comments-section .comment-item.comment-reply {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
}

@media (max-width: 768px) {
  .news-detail-modal {
    padding: 64px 10px 10px !important;
    align-items: flex-start !important;
  }

  .news-detail-dialog {
    width: 100% !important;
    max-width: 100% !important;
    max-height: calc(100vh - 74px) !important;
    border-radius: 16px !important;
  }

  .news-detail-head {
    padding: 18px 16px !important;
    gap: 12px !important;
  }

  .news-detail-head h2,
  .news-detail-head h3 {
    font-size: 20px !important;
    line-height: 1.25 !important;
  }

  .news-detail-head p,
  .news-detail-meta .meta,
  .news-detail-meta .news-source-line {
    font-size: 12px !important;
    line-height: 1.4 !important;
  }

  .news-detail-close {
    width: 32px !important;
    height: 32px !important;
    flex-shrink: 0 !important;
  }

  .news-detail-body {
    padding: 16px !important;
    gap: 14px !important;
  }

  .news-detail-media-list img,
  .news-detail-media-list video,
  .news-detail-image {
    max-height: 190px !important;
    border-radius: 14px !important;
    object-fit: cover !important;
  }

  .news-detail-media-list iframe {
    min-height: 190px !important;
    border-radius: 14px !important;
  }

  .news-detail-source-card {
    padding: 10px 12px !important;
    border-radius: 12px !important;
  }

  .news-detail-source-card span {
    font-size: 12px !important;
    word-break: break-all !important;
  }

  .news-detail-content {
    font-size: 15px !important;
    line-height: 1.6 !important;
  }

  .news-comments-section {
    padding-top: 16px !important;
  }

  .news-comment-form {
    padding: 14px !important;
    border-radius: 16px !important;
  }

  .news-comment-form textarea {
    min-height: 72px !important;
    max-height: 180px !important;
    padding: 12px 14px !important;
    font-size: 14px !important;
    line-height: 1.45 !important;
  }

  .news-comment-footer {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
  }

  .news-reactions {
    justify-content: flex-start !important;
  }

  .news-comment-composer-actions,
  .comment-composer-actions {
    width: 100% !important;
    justify-content: flex-end !important;
  }

  .news-comment-submit,
  button[data-comment-submit] {
    width: 100% !important;
    flex: none !important;
    justify-content: center !important;
  }

  .news-comment-card,
  .news-comments-section .comment-item,
  .news-comments-section .comment-card {
    padding: 14px !important;
    border-radius: 14px !important;
  }

  .news-comment-main,
  .news-comments-section .comment-item > .author-line {
    gap: 10px !important;
  }

  .news-comment-avatar,
  .news-comments-section .comment-item > .author-line .comment-avatar {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
  }

  .news-comment-replies,
  .news-comments-section .comment-children {
    margin-left: 10px !important;
    padding-left: 10px !important;
    margin-top: 10px !important;
    gap: 8px !important;
    border-left: 2px solid #dbeafe !important;
  }

  .comment-reply-card.is-short-reply,
  .news-comments-section .comment-item.comment-reply.is-short-reply,
  .comment-reply.is-short-reply,
  .reply-card.is-short-reply,
  .news-comment-reply.is-short-reply {
    padding: 10px 12px !important;
  }

  .news-comments-section .comment-item.comment-reply {
    padding: 12px !important;
    border-radius: 12px !important;
  }
}

@media (max-width: 640px) {
  .news-comments-section .comment-reply-context {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 8px !important;
  }

  .news-comments-section .comment-reply-context-clear,
  .news-comments-section button[data-clear-reply] {
    align-self: flex-start;
  }

  .news-comments-section .comment-item > .author-line {
    gap: 10px !important;
  }

  .news-comments-section .comment-item > .author-line .comment-avatar {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
  }

  .news-comments-section .comment-body.article-rich,
  .news-comments-section .comment-actions {
    margin-left: 42px !important;
  }

  .news-comments-section .comment-item.comment-reply .comment-body.article-rich,
  .news-comments-section .comment-item.comment-reply .comment-actions {
    margin-left: 0 !important;
  }

  .news-comments-section .comment-children {
    margin-left: 10px !important;
    padding-left: 12px !important;
  }
}

.news-page-head-actions {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}

.news-add-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  margin-right: 1rem !important;
  border: none !important;
  border-radius: 999px !important;
  background: #1e3a8a !important;
  color: #fff !important;
  padding: 10px 16px !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08) !important;
  white-space: nowrap !important;
}

.news-add-btn i,
.news-add-btn svg {
  width: 16px !important;
  height: 16px !important;
  stroke-width: 2 !important;
}

.news-add-btn:hover {
  background: #1e40af !important;
}

.news-add-modal {
  position: fixed !important;
  inset: 0 !important;
  z-index: 9999 !important;
  display: flex !important;
  align-items: flex-start !important;
  justify-content: center !important;
  padding: 88px 24px 24px !important;
  background: rgba(15, 23, 42, 0.45) !important;
  backdrop-filter: blur(4px) !important;
  overflow-y: auto !important;
}

.news-add-modal.hidden {
  display: none !important;
}

.news-form-overlay.hidden,
.news-form-sheet.hidden {
  display: none !important;
}

.news-add-dialog {
  width: min(560px, calc(100vw - 32px)) !important;
  max-height: calc(100vh - 120px) !important;
  background: #fff !important;
  border-radius: 18px !important;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.25) !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
}

.news-add-head {
  background: #1e3a8a !important;
  color: #fff !important;
  padding: 16px 20px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

.news-add-head h2 {
  margin: 0 !important;
  color: #fff !important;
  font-size: 18px !important;
  font-weight: 500 !important;
}

.news-add-close {
  width: 32px !important;
  height: 32px !important;
  border: none !important;
  border-radius: 999px !important;
  background: rgba(255,255,255,0.12) !important;
  color: #fff !important;
  font-size: 24px !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
}

.news-add-close:hover {
  background: rgba(255,255,255,0.22) !important;
}

.news-add-form {
  padding: 18px 20px 20px !important;
  overflow-y: auto !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
}

.news-add-form label {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  color: #475569 !important;
  font-size: 13px !important;
  font-weight: 500 !important;
}

.news-add-form input {
  width: 100% !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 10px !important;
  padding: 9px 12px !important;
  color: #0f172a !important;
  font-size: 14px !important;
  background: #fff !important;
}

.news-add-form select {
  width: 100% !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 10px !important;
  padding: 9px 12px !important;
  color: #0f172a !important;
  font-size: 14px !important;
  background: #fff !important;
}

.news-add-form input:focus,
.news-add-form select:focus {
  outline: none !important;
  border-color: rgba(30, 58, 138, 0.45) !important;
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.10) !important;
}

.news-content-field {
  margin-top: 4px !important;
}

.news-editor-toolbar {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  margin-bottom: 10px !important;
}

.news-editor-toolbar button {
  min-height: 34px !important;
  padding: 0 12px !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 999px !important;
  background: #ffffff !important;
  color: #1e3a8a !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease !important;
}

.news-editor-toolbar button:hover {
  background: #eff6ff !important;
  border-color: #bfdbfe !important;
  color: #172f73 !important;
}

.news-editor-toolbar button:focus-visible {
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.14) !important;
}

.news-content-textarea {
  width: 100% !important;
  min-height: 180px !important;
  max-height: 420px !important;
  resize: vertical !important;
  padding: 14px 16px !important;
  border: 1px solid #dbe3ef !important;
  border-radius: 14px !important;
  background: #ffffff !important;
  color: #0f172a !important;
  font-size: 15px !important;
  line-height: 1.55 !important;
  outline: none !important;
  box-shadow: none !important;
  transition: border-color .18s ease, box-shadow .18s ease !important;
}

.news-content-textarea::placeholder {
  color: #94a3b8 !important;
}

.news-content-textarea:focus {
  border-color: rgba(30, 58, 138, 0.45) !important;
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.10) !important;
}

.news-editor-help {
  margin: 8px 0 0 !important;
  color: #64748b !important;
  font-size: 12px !important;
  line-height: 1.4 !important;
}

.news-preview-field {
  margin-top: 4px !important;
}

.news-content-preview {
  min-height: 120px !important;
  padding: 14px 16px !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 14px !important;
  background: #f8fafc !important;
  color: #334155 !important;
  font-size: 14px !important;
  line-height: 1.55 !important;
  overflow-wrap: anywhere !important;
}

.news-content-preview.is-empty {
  color: #94a3b8 !important;
}

.news-image-upload-field {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  color: #475569 !important;
  font-size: 13px !important;
  font-weight: 500 !important;
}

.news-image-upload-box {
  min-height: 68px !important;
  border: 1px dashed #cbd5e1 !important;
  border-radius: 12px !important;
  background: #f8fafc !important;
  color: #475569 !important;
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 12px 14px !important;
  cursor: pointer !important;
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease !important;
}

.news-image-upload-box:hover {
  background: #eff6ff !important;
  border-color: rgba(30, 58, 138, 0.35) !important;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04) !important;
}

.news-image-upload-box i,
.news-image-upload-box svg {
  width: 22px !important;
  height: 22px !important;
  color: #1e3a8a !important;
  flex-shrink: 0 !important;
}

.news-image-upload-box strong {
  display: block !important;
  color: #1e3a8a !important;
  font-size: 14px !important;
  font-weight: 500 !important;
}

.news-image-upload-box small {
  display: block !important;
  margin-top: 2px !important;
  color: #64748b !important;
  font-size: 12px !important;
  font-weight: 400 !important;
}

.news-add-actions {
  display: flex !important;
  justify-content: flex-end !important;
  gap: 10px !important;
  padding-top: 6px !important;
}

.news-add-cancel {
  border: none !important;
  background: transparent !important;
  color: #64748b !important;
  font-size: 14px !important;
  cursor: pointer !important;
}

.news-add-submit {
  border: none !important;
  border-radius: 10px !important;
  background: #1e3a8a !important;
  color: #fff !important;
  padding: 9px 16px !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  cursor: pointer !important;
}

@media (max-width: 640px) {
  .news-editor-toolbar {
    gap: 6px !important;
  }

  .news-editor-toolbar button {
    min-height: 32px !important;
    padding: 0 10px !important;
    font-size: 12px !important;
  }

  .news-content-textarea {
    min-height: 160px !important;
    padding: 12px 14px !important;
    font-size: 14px !important;
  }

  .news-content-preview {
    min-height: 110px !important;
    padding: 12px 14px !important;
  }
}

@media (max-width: 768px) {
  #view-news #news-form,
  #view-news #toggle-news-form {
    display: none !important;
  }

  .news-add-modal {
    align-items: flex-end !important;
    justify-content: stretch !important;
    padding: 12px 0 0 !important;
    overflow: hidden !important;
  }

  .news-add-dialog,
  .news-form-sheet {
    width: 100% !important;
    max-width: 100% !important;
    max-height: calc(100dvh - 12px) !important;
    border-radius: 24px 24px 0 0 !important;
    box-shadow: 0 -18px 48px rgba(15, 23, 42, 0.22) !important;
  }

  .news-add-head,
  .news-form-sheet-header {
    padding: 14px 16px !important;
    flex-shrink: 0 !important;
  }

  .news-add-head h2,
  .news-form-sheet-header h2 {
    font-size: 17px !important;
    line-height: 1.25 !important;
  }

  .news-add-form,
  .news-form-sheet-body {
    min-width: 0 !important;
    padding: 14px 14px calc(16px + env(safe-area-inset-bottom, 0px)) !important;
    gap: 12px !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
  }

  .news-add-form,
  .news-add-form > *,
  .news-add-form label,
  .news-modal-field,
  .news-content-field,
  .news-preview-field {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .news-add-form input,
  .news-add-form select,
  .news-content-textarea {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    font-size: 16px !important;
  }

  .news-add-form input,
  .news-add-form select {
    min-height: 44px !important;
    padding: 0 12px !important;
  }

  .news-editor-toolbar {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    flex-wrap: nowrap !important;
    padding-bottom: 2px !important;
    scrollbar-width: none !important;
  }

  .news-editor-toolbar::-webkit-scrollbar {
    display: none !important;
  }

  .news-editor-toolbar button {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
  }

  .news-editor-help,
  .news-content-preview,
  .news-add-form label span,
  .news-add-form small,
  .news-image-upload-box small,
  .news-image-upload-box strong {
    overflow-wrap: anywhere !important;
  }

  .news-image-upload-box {
    min-width: 0 !important;
    align-items: flex-start !important;
  }

  .news-image-upload-box > div {
    min-width: 0 !important;
  }

  .news-add-actions,
  .news-form-sheet-footer {
    position: sticky !important;
    bottom: 0 !important;
    margin-top: 4px !important;
    padding: 12px 0 calc(4px + env(safe-area-inset-bottom, 0px)) !important;
    background: linear-gradient(to top, #fff 78%, rgba(255, 255, 255, 0.92) 100%) !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
  }

  .news-add-cancel,
  .news-add-submit {
    min-height: 44px !important;
    width: 100% !important;
    justify-content: center !important;
  }
}

@media (max-width: 720px) {
  .news-page-head-actions {
    width: 100%;
    justify-content: space-between;
  }
}

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

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

img,
video,
svg {
  max-width: 100%;
}

.app-shell,
.shell,
.shell-main,
.main-content,
.page-content,
#app,
#pageMain {
  min-width: 0;
  max-width: 100%;
}

@media (max-width: 1024px) {
  .shell-main,
  .main-content,
  .page-content,
  #pageMain,
  #app-view > .shell-main,
  #app-view > .shell-main > main,
  #app-view .shell-content {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
  }

  .page-inner,
  .news-page-inner,
  .documents-page-inner,
  .bureau-page-inner,
  .commissions-page-inner,
  .tools-page-inner,
  .knowledge-page-inner,
  .knowledge-qa-page,
  .cotech-page-inner,
  .agenda-page-inner,
  .directory-page-inner,
  .messages-page-inner,
  #view-knowledge .knowledge-qa-page,
  #view-tools .tools-page-inner,
  #view-bureau .bureau-page-inner,
  #view-commissions .commissions-page-inner {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
    overflow-x: hidden !important;
  }
}

@media (max-width: 640px) {
  .page-inner,
  .news-page-inner,
  .documents-page-inner,
  .bureau-page-inner,
  .commissions-page-inner,
  .tools-page-inner,
  .knowledge-page-inner,
  .knowledge-qa-page,
  .cotech-page-inner,
  .agenda-page-inner,
  .directory-page-inner,
  .messages-page-inner,
  #view-knowledge .knowledge-qa-page,
  #view-tools .tools-page-inner,
  #view-bureau .bureau-page-inner,
  #view-commissions .commissions-page-inner {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }
}

@media (max-width: 768px) {
  .mobile-topbar,
  .shell-mobile-topbar,
  .topbar,
  #app-view .topbar {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow: visible !important;
  }

  .mobile-topbar-title,
  .shell-title,
  .brand-title,
  #header-app-title {
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .mobile-topbar-actions,
  .topbar-actions,
  #app-view .topbar-actions {
    flex-shrink: 0 !important;
    min-width: 0 !important;
  }

  .global-search,
  .shell-search,
  .mobile-search,
  .topbar-search,
  .header-search-form,
  #app-view .header-search-form {
    width: calc(100% - 28px) !important;
    max-width: calc(100% - 28px) !important;
    min-width: 0 !important;
    margin-left: 14px !important;
    margin-right: 14px !important;
  }

  .global-search input,
  .shell-search input,
  .mobile-search input,
  .topbar-search input,
  .header-search-form input,
  #app-view .header-search-form input {
    width: 100% !important;
    min-width: 0 !important;
  }

  .card,
  .panel,
  .section-card,
  .news-card,
  .documents-card,
  .bureau-next-card,
  .bureau-calendar-panel,
  .commission-profile-card,
  .commission-documents-panel,
  .knowledge-question-card,
  .cotech-video-card {
    max-width: 100% !important;
    min-width: 0 !important;
  }

  [class*="grid"],
  [class*="layout"],
  [class*="panel"],
  [class*="section"] {
    min-width: 0;
  }

  p,
  h1,
  h2,
  h3,
  span,
  a,
  button {
    overflow-wrap: anywhere;
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .mobile-topbar,
  .shell-mobile-topbar,
  .topbar,
  #app-view .topbar {
    overflow: visible !important;
  }

  #app-view .user-menu-wrap,
  .user-menu-wrap {
    position: relative !important;
    z-index: 1201 !important;
  }

  #app-view .user-dropdown,
  .user-dropdown,
  #header-user-dropdown {
    z-index: 1202 !important;
  }
}

@media (max-width: 768px) {
  .mobile-topbar,
  .shell-mobile-topbar,
  .topbar,
  #app-view .topbar {
    min-height: 64px !important;
    padding: 10px 14px !important;
    gap: 10px !important;
    overflow: visible !important;
  }

  .mobile-topbar + *,
  .shell-mobile-topbar + *,
  .topbar + *,
  #app-view .topbar + * {
    margin-top: 8px !important;
  }

  .global-search,
  .shell-search,
  .mobile-search,
  .topbar-search,
  .header-search-form,
  #app-view .header-search-form {
    width: calc(100% - 28px) !important;
    max-width: calc(100% - 28px) !important;
    margin: 8px 14px 14px !important;
    position: relative !important;
    z-index: 1 !important;
    flex-shrink: 0 !important;
  }

  .global-search input,
  .shell-search input,
  .mobile-search input,
  .topbar-search input,
  .header-search-form input,
  #app-view .header-search-form input {
    min-height: 42px !important;
    border-radius: 999px !important;
    padding-left: 42px !important;
    font-size: 14px !important;
  }

  .page-shell-card,
  .page-wrapper-card,
  .content-card,
  .news-page-card,
  .documents-page-card,
  .knowledge-page-card,
  .commissions-page-card,
  #app-view .shell-content > .view,
  #app-view .shell-content > .card {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
  }

  .page-inner,
  .news-page-inner,
  .documents-page-inner,
  .bureau-page-inner,
  .commissions-page-inner,
  .tools-page-inner,
  .knowledge-page-inner,
  .knowledge-qa-page,
  .cotech-page-inner,
  .agenda-page-inner,
  .directory-page-inner,
  .messages-page-inner,
  #view-knowledge .knowledge-qa-page,
  #view-tools .tools-page-inner,
  #view-bureau .bureau-page-inner,
  #view-commissions .commissions-page-inner {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  .news-header,
  .documents-header,
  .bureau-header,
  .commissions-header,
  .tools-header,
  .knowledge-header,
  .cotech-header,
  .agenda-header,
  .directory-header,
  .news-page-head,
  .cotech-header {
    margin-bottom: 18px !important;
    gap: 12px !important;
  }

  .news-header h1,
  .documents-header h1,
  .bureau-header h1,
  .commissions-header h1,
  .tools-header h1,
  .knowledge-header h1,
  .cotech-header h1,
  .agenda-header h1,
  .directory-header h1,
  .news-page-head h1 {
    font-size: 24px !important;
    line-height: 1.15 !important;
  }

  .news-header p,
  .documents-header p,
  .bureau-header p,
  .commissions-header p,
  .tools-header p,
  .knowledge-header p,
  .cotech-header p,
  .agenda-header p,
  .directory-header p,
  .news-page-head p {
    font-size: 14px !important;
    line-height: 1.45 !important;
    max-width: 32rem !important;
  }

  .news-card,
  .documents-card,
  .bureau-next-card,
  .bureau-calendar-panel,
  .commission-profile-card,
  .commission-documents-panel,
  .knowledge-question-card,
  .cotech-video-card,
  .tools-app-tile,
  .agenda-event-card {
    border-radius: 16px !important;
  }

  .news-section,
  .documents-section,
  .bureau-section,
  .commission-section,
  .knowledge-section,
  .cotech-section,
  .agenda-section {
    margin-bottom: 20px !important;
  }
}

@media (max-width: 390px) {
  .page-inner,
  .news-page-inner,
  .documents-page-inner,
  .bureau-page-inner,
  .commissions-page-inner,
  .tools-page-inner,
  .knowledge-page-inner,
  .knowledge-qa-page,
  .cotech-page-inner,
  .agenda-page-inner,
  .directory-page-inner,
  .messages-page-inner,
  #view-knowledge .knowledge-qa-page,
  #view-tools .tools-page-inner,
  #view-bureau .bureau-page-inner,
  #view-commissions .commissions-page-inner {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
}

@media (max-width: 768px) {
  #app-view .topbar,
  .mobile-shell-header,
  .mobile-topbar,
  .shell-mobile-topbar {
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
    width: 100% !important;
    background: #fff !important;
    border-bottom: 1px solid #e2e8f0 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-areas:
      "identity actions"
      "search search" !important;
    gap: 8px !important;
    padding: 10px 14px 12px !important;
    min-height: auto !important;
    overflow: visible !important;
  }

  #app-view .topbar-identity {
    grid-area: identity !important;
    min-width: 0 !important;
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    position: relative !important;
  }

  #app-view .topbar-actions {
    grid-area: actions !important;
    width: auto !important;
    min-width: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 8px !important;
    flex-wrap: nowrap !important;
  }

  #app-view .header-search-form,
  .mobile-shell-search,
  .global-search,
  .shell-search,
  .mobile-search,
  .topbar-search {
    grid-area: search !important;
    position: relative !important;
    inset: auto !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    justify-self: stretch !important;
    flex-shrink: 0 !important;
  }

  #app-view .header-search-form input,
  .mobile-shell-search input,
  .global-search input,
  .shell-search input,
  .mobile-search input,
  .topbar-search input {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 42px !important;
    border-radius: 999px !important;
    font-size: 14px !important;
  }

  #app-view > .shell-main > main,
  .shell-main,
  .main-content,
  .page-content,
  #pageMain {
    padding-top: 16px !important;
  }

  #app-view .header-brand-logo,
  #app-view .header-brand-fallback {
    display: none !important;
  }

  #app-view .header-branding {
    position: absolute !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    max-width: calc(100vw - 156px) !important;
    min-width: 0 !important;
    pointer-events: none !important;
  }

  #app-view #header-app-title {
    margin: 0 !important;
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    text-align: center !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
}

@media (max-width: 768px) {
  .hamburger,
  .mobile-menu-btn,
  .mobile-drawer-toggle,
  .menu-toggle,
  .shell-menu-btn,
  .mobile-nav-toggle,
  #mobile-nav-toggle {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    min-height: 48px !important;
    border: 0 !important;
    border-radius: 14px !important;
    background: #24449b !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(36, 68, 155, 0.12) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
    flex: 0 0 48px !important;
    transition:
      background-color 0.2s ease,
      transform 0.15s ease,
      box-shadow 0.2s ease !important;
  }

  .hamburger:hover,
  .mobile-menu-btn:hover,
  .mobile-drawer-toggle:hover,
  .menu-toggle:hover,
  .shell-menu-btn:hover,
  .mobile-nav-toggle:hover,
  #mobile-nav-toggle:hover {
    background: #1e3a8a !important;
    color: #fff !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 14px rgba(36, 68, 155, 0.16) !important;
  }

  .hamburger i,
  .hamburger svg,
  .mobile-menu-btn i,
  .mobile-menu-btn svg,
  .mobile-drawer-toggle i,
  .mobile-drawer-toggle svg,
  .menu-toggle i,
  .menu-toggle svg,
  .shell-menu-btn i,
  .shell-menu-btn svg,
  .mobile-nav-toggle i,
  .mobile-nav-toggle svg,
  #mobile-nav-toggle i,
  #mobile-nav-toggle svg {
    width: 18px !important;
    height: 18px !important;
    stroke-width: 2 !important;
    color: currentColor !important;
  }

  .hamburger span,
  .mobile-menu-btn span,
  .menu-toggle span,
  .mobile-nav-toggle-lines span,
  #mobile-nav-toggle .mobile-nav-toggle-lines span {
    width: 17px !important;
    height: 2px !important;
    border-radius: 999px !important;
    background: #fff !important;
  }

  .mobile-nav-toggle-lines,
  #mobile-nav-toggle .mobile-nav-toggle-lines {
    display: inline-grid !important;
    gap: 3px !important;
  }

  .mobile-shell-header,
  .mobile-topbar,
  .shell-mobile-topbar,
  .topbar,
  #app-view .topbar {
    gap: 12px !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  .mobile-shell-row,
  .mobile-topbar-row,
  .topbar-row {
    gap: 14px !important;
  }

  .mobile-topbar-actions,
  .shell-mobile-actions,
  .topbar-actions,
  #app-view .topbar-actions {
    gap: 10px !important;
  }

  .mobile-brand,
  .shell-brand,
  .topbar-brand,
  #app-view .topbar-identity,
  #app-view .header-branding {
    min-width: 0 !important;
    flex: 1 1 auto !important;
  }

  .mobile-brand-title,
  .shell-title,
  .brand-title,
  #header-app-title {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  #app-view .user-menu-wrap,
  .user-menu-wrap {
    position: relative !important;
  }

  #app-view .user-dropdown,
  .user-dropdown,
  #header-user-dropdown {
    left: auto !important;
    right: 0 !important;
    margin-right: 0 !important;
    max-width: calc(100vw - 24px) !important;
    width: min(260px, calc(100vw - 24px)) !important;
  }
}

#view-directory.contacts-page .directory-avatar,
#view-directory.contacts-page .contact-avatar,
#view-directory.contacts-page .member-avatar,
#view-directory.contacts-page .user-avatar,
#view-directory.contacts-page .avatar-initials,
#view-directory.contacts-page .directory-avatar-initials,
#view-directory.contacts-page .contact-photo,
#view-directory.contacts-page .directory-photo,
#view-directory.contacts-page .contact-avatar-fallback {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  max-width: 44px !important;
  min-height: 44px !important;
  max-height: 44px !important;
  aspect-ratio: 1 / 1 !important;
  border-radius: 999px !important;
  overflow: hidden !important;
  flex-shrink: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #dbeafe !important;
  color: #1e3a8a !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
}

#view-directory.contacts-page .directory-avatar img,
#view-directory.contacts-page .contact-avatar img,
#view-directory.contacts-page .member-avatar img,
#view-directory.contacts-page .user-avatar img,
#view-directory.contacts-page .contact-photo img,
#view-directory.contacts-page .directory-photo img,
#view-directory.contacts-page img.directory-avatar,
#view-directory.contacts-page img.contact-avatar,
#view-directory.contacts-page img.member-avatar,
#view-directory.contacts-page img.user-avatar,
#view-directory.contacts-page img.contact-photo,
#view-directory.contacts-page img.directory-photo,
#view-directory.contacts-page img.profile-avatar.contact-avatar {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  max-width: 44px !important;
  min-height: 44px !important;
  max-height: 44px !important;
  aspect-ratio: 1 / 1 !important;
  border-radius: 999px !important;
  object-fit: cover !important;
  object-position: center !important;
  display: block !important;
  overflow: hidden !important;
}

@media (max-width: 1024px) {
  .knowledge-qa-page,
  .knowledge-layout,
  .knowledge-main-layout,
  #view-knowledge .knowledge-qa-page,
  #view-knowledge .knowledge-qa-layout {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .knowledge-center,
  .knowledge-main,
  .knowledge-content,
  #view-knowledge .knowledge-center {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .knowledge-left-rail,
  .knowledge-right-rail,
  #view-knowledge .knowledge-left-rail,
  #view-knowledge .knowledge-right-rail {
    display: none !important;
  }
}

@media (max-width: 768px) {
  .knowledge-header,
  #view-knowledge .knowledge-qa-header {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
    margin-bottom: 18px !important;
  }

  .knowledge-header h1,
  #view-knowledge .knowledge-qa-header h1 {
    font-size: 24px !important;
    line-height: 1.15 !important;
  }

  .knowledge-header p,
  #view-knowledge .knowledge-qa-header p {
    font-size: 14px !important;
    line-height: 1.45 !important;
  }

  .knowledge-ask-btn,
  #view-knowledge .knowledge-ask-btn {
    width: 100% !important;
    justify-content: center !important;
  }

  .knowledge-list-head,
  #view-knowledge .knowledge-list-head {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
    margin-bottom: 14px !important;
  }

  .knowledge-sort-tabs,
  #view-knowledge .knowledge-sort-tabs {
    width: 100% !important;
    display: flex !important;
    overflow-x: auto !important;
    gap: 8px !important;
    padding-bottom: 2px !important;
  }

  .knowledge-question-card,
  #view-knowledge .knowledge-question-card {
    width: 100% !important;
    max-width: 100% !important;
    display: grid !important;
    grid-template-columns: 44px minmax(0, 1fr) !important;
    gap: 12px !important;
    padding: 14px !important;
    border-radius: 16px !important;
  }

  .knowledge-question-card h3,
  .knowledge-question-card h2,
  #view-knowledge .knowledge-question-card h3,
  #view-knowledge .knowledge-question-card h2 {
    font-size: 16px !important;
    line-height: 1.3 !important;
  }

  .knowledge-question-card p,
  #view-knowledge .knowledge-question-card p {
    font-size: 14px !important;
    line-height: 1.5 !important;
  }

  .knowledge-vote-control,
  #view-knowledge .knowledge-vote-control {
    width: 38px !important;
    gap: 4px !important;
  }

  .knowledge-vote-control button,
  #view-knowledge .knowledge-vote-control button {
    width: 30px !important;
    height: 30px !important;
    border-radius: 9px !important;
  }

  .knowledge-vote-score,
  .knowledge-vote-count,
  #view-knowledge .knowledge-vote-score,
  #view-knowledge .knowledge-vote-count {
    font-size: 14px !important;
  }

  .knowledge-detail-view,
  #view-knowledge .knowledge-detail-view {
    width: 100% !important;
    max-width: 100% !important;
  }

  .knowledge-detail-card,
  #view-knowledge .knowledge-detail-card {
    display: grid !important;
    grid-template-columns: 44px minmax(0, 1fr) !important;
    gap: 12px !important;
    padding: 14px !important;
    border-radius: 16px !important;
  }

  .knowledge-detail-main h1,
  #view-knowledge .knowledge-detail-main h1 {
    font-size: 20px !important;
    line-height: 1.25 !important;
  }

  .knowledge-detail-body,
  #view-knowledge .knowledge-detail-body {
    font-size: 15px !important;
    line-height: 1.6 !important;
  }

  .knowledge-back-btn,
  #view-knowledge .knowledge-back-btn {
    margin-bottom: 12px !important;
  }

  .knowledge-answer,
  #view-knowledge .knowledge-answer {
    grid-template-columns: 38px minmax(0, 1fr) !important;
    gap: 10px !important;
    padding: 12px !important;
    border-radius: 14px !important;
  }

  .knowledge-answer-children,
  #view-knowledge .knowledge-answer-children {
    padding-left: 10px !important;
    margin-top: 10px !important;
    border-left: 2px solid #dbeafe !important;
  }

  .knowledge-answer-content p,
  #view-knowledge .knowledge-answer-content p {
    font-size: 14px !important;
    line-height: 1.55 !important;
  }

  .knowledge-inline-reply-actions,
  .knowledge-answer-form-actions,
  #view-knowledge .knowledge-inline-reply-actions,
  #view-knowledge .knowledge-answer-form-actions {
    display: flex !important;
    flex-direction: column-reverse !important;
    gap: 8px !important;
  }

  .knowledge-reply-submit,
  .knowledge-answer-form button[type="submit"],
  #view-knowledge .knowledge-reply-submit,
  #view-knowledge .knowledge-answer-form button[type="submit"] {
    width: 100% !important;
    justify-content: center !important;
  }
}

@media (max-width: 640px) {
  .knowledge-ask-modal {
    padding: 64px 10px 10px !important;
  }

  .knowledge-ask-dialog {
    width: 100% !important;
    max-width: 100% !important;
    max-height: calc(100vh - 74px) !important;
    border-radius: 16px !important;
  }

  .knowledge-ask-form {
    padding: 16px !important;
  }

  .knowledge-ask-actions {
    flex-direction: column-reverse !important;
    gap: 8px !important;
  }

  .knowledge-ask-actions button {
    width: 100% !important;
    justify-content: center !important;
  }
}

@media (max-width: 768px) {
  .knowledge-qa-page,
  .knowledge-layout,
  .knowledge-main-layout,
  .knowledge-center,
  .knowledge-main,
  .knowledge-content,
  #view-knowledge .knowledge-qa-page,
  #view-knowledge .knowledge-qa-layout,
  #view-knowledge .knowledge-center {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
  }

  .knowledge-left-rail,
  .knowledge-right-rail,
  #view-knowledge .knowledge-left-rail,
  #view-knowledge .knowledge-right-rail {
    display: none !important;
  }

  .knowledge-header,
  #view-knowledge .knowledge-qa-header {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 16px !important;
    margin-bottom: 24px !important;
  }

  .knowledge-header h1,
  #view-knowledge .knowledge-qa-header h1 {
    font-size: 32px !important;
    line-height: 1.15 !important;
    letter-spacing: -0.03em !important;
    margin: 0 !important;
  }

  .knowledge-header p,
  #view-knowledge .knowledge-qa-header p {
    font-size: 16px !important;
    line-height: 1.45 !important;
    margin: 0 !important;
  }

  .knowledge-ask-btn,
  #view-knowledge .knowledge-ask-btn {
    width: 100% !important;
    min-height: 52px !important;
    justify-content: center !important;
    border-radius: 999px !important;
  }

  .knowledge-list-head,
  #view-knowledge .knowledge-list-head {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
    margin-bottom: 18px !important;
  }

  .knowledge-list-head h2,
  #view-knowledge .knowledge-list-head h2 {
    font-size: 22px !important;
    line-height: 1.2 !important;
    margin: 0 !important;
  }

  .knowledge-sort-tabs,
  #view-knowledge .knowledge-sort-tabs {
    width: 100% !important;
    max-width: 100% !important;
    display: flex !important;
    gap: 8px !important;
    overflow-x: auto !important;
    padding: 4px 0 6px !important;
    scrollbar-width: none !important;
  }

  .knowledge-sort-tabs::-webkit-scrollbar,
  #view-knowledge .knowledge-sort-tabs::-webkit-scrollbar {
    display: none !important;
  }

  .knowledge-sort-tabs button,
  #view-knowledge .knowledge-sort-tabs button {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
    min-height: 40px !important;
    padding: 9px 14px !important;
    border-radius: 999px !important;
  }

  .knowledge-question-card,
  #view-knowledge .knowledge-question-card {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
    padding: 18px !important;
    border-radius: 18px !important;
    overflow: hidden !important;
  }

  .knowledge-question-card > *,
  #view-knowledge .knowledge-question-card > * {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .knowledge-question-card .knowledge-vote-control,
  #view-knowledge .knowledge-question-card .knowledge-vote-control {
    width: auto !important;
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    align-self: flex-start !important;
    gap: 8px !important;
    padding: 6px 8px !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 999px !important;
    background: #f8fafc !important;
  }

  .knowledge-question-card .knowledge-vote-control button,
  #view-knowledge .knowledge-question-card .knowledge-vote-control button {
    width: 28px !important;
    height: 28px !important;
    border-radius: 999px !important;
  }

  .knowledge-question-card .knowledge-vote-score,
  .knowledge-question-card .knowledge-vote-count,
  #view-knowledge .knowledge-question-card .knowledge-vote-score,
  #view-knowledge .knowledge-question-card .knowledge-vote-count {
    min-width: 22px !important;
    text-align: center !important;
    font-size: 14px !important;
    font-weight: 600 !important;
  }

  .knowledge-question-card h2,
  .knowledge-question-card h3,
  #view-knowledge .knowledge-question-card h2,
  #view-knowledge .knowledge-question-card h3 {
    margin: 0 !important;
    color: #1e3a8a !important;
    font-size: 20px !important;
    line-height: 1.25 !important;
    letter-spacing: -0.02em !important;
  }

  .knowledge-question-card p,
  #view-knowledge .knowledge-question-card p {
    margin: 8px 0 0 !important;
    color: #64748b !important;
    font-size: 15px !important;
    line-height: 1.55 !important;
    overflow-wrap: anywhere !important;
  }

  .knowledge-question-tags,
  .knowledge-detail-tags,
  #view-knowledge .knowledge-question-tags,
  #view-knowledge .knowledge-detail-tags {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    margin-top: 12px !important;
  }

  .knowledge-question-tags span,
  .knowledge-detail-tags span,
  #view-knowledge .knowledge-question-tags span,
  #view-knowledge .knowledge-detail-tags span {
    max-width: 100% !important;
    white-space: normal !important;
  }

  .knowledge-question-footer,
  .knowledge-card-footer,
  #view-knowledge .knowledge-question-footer,
  #view-knowledge .knowledge-card-footer {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    min-width: 0 !important;
    padding-top: 12px !important;
    border-top: 1px solid #f1f5f9 !important;
  }

  .knowledge-question-footer strong,
  .knowledge-card-footer strong,
  #view-knowledge .knowledge-question-footer strong,
  #view-knowledge .knowledge-card-footer strong {
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .knowledge-qa-page *,
  .knowledge-layout *,
  .knowledge-question-card *,
  #view-knowledge .knowledge-qa-page *,
  #view-knowledge .knowledge-qa-layout *,
  #view-knowledge .knowledge-question-card * {
    max-width: 100% !important;
  }

  .knowledge-qa-page,
  #view-knowledge .knowledge-qa-page {
    overflow-x: hidden !important;
  }
}

@media (max-width: 768px) {
  .knowledge-list-view,
  .knowledge-center,
  .knowledge-content,
  #view-knowledge .knowledge-list-view,
  #view-knowledge .knowledge-center,
  #view-knowledge .knowledge-content {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
  }

  .knowledge-list-head,
  #view-knowledge .knowledge-list-head {
    width: 100% !important;
    max-width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 14px !important;
    margin-bottom: 18px !important;
  }

  .knowledge-list-title,
  #view-knowledge .knowledge-list-title {
    width: 100% !important;
    min-width: 0 !important;
  }

  .knowledge-list-head h2,
  #view-knowledge .knowledge-list-head h2 {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: baseline !important;
    gap: 8px !important;
    margin: 0 !important;
    font-size: 26px !important;
    line-height: 1.15 !important;
  }

  .knowledge-list-head h2 span,
  .knowledge-count,
  #view-knowledge .knowledge-list-head h2 span,
  #view-knowledge .knowledge-list-title span {
    font-size: 15px !important;
    color: #94a3b8 !important;
    font-weight: 500 !important;
  }

  .knowledge-sort-tabs,
  #view-knowledge .knowledge-sort-tabs {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    display: flex !important;
    gap: 8px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding: 4px 0 8px !important;
    margin: 0 !important;
    scrollbar-width: none !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .knowledge-sort-tabs::-webkit-scrollbar,
  #view-knowledge .knowledge-sort-tabs::-webkit-scrollbar {
    display: none !important;
  }

  .knowledge-sort-tabs button,
  #view-knowledge .knowledge-sort-tabs button {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
    min-height: 42px !important;
    padding: 10px 16px !important;
    border-radius: 999px !important;
    font-size: 14px !important;
  }

  .knowledge-question-card,
  #view-knowledge .knowledge-question-card {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
    padding: 18px !important;
    border-radius: 18px !important;
    overflow: hidden !important;
  }

  .knowledge-question-card > *,
  #view-knowledge .knowledge-question-card > * {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .knowledge-question-stats,
  .knowledge-card-stats,
  #view-knowledge .knowledge-question-stats,
  #view-knowledge .knowledge-card-stats {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    width: 100% !important;
    max-width: 100% !important;
    justify-items: initial !important;
    align-content: initial !important;
  }

  .knowledge-question-card .knowledge-vote-control,
  #view-knowledge .knowledge-question-card .knowledge-vote-control {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 8px !important;
    width: auto !important;
    padding: 6px 8px !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 999px !important;
    background: #f8fafc !important;
  }

  .knowledge-question-card .knowledge-vote-control button,
  #view-knowledge .knowledge-question-card .knowledge-vote-control button {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    border-radius: 999px !important;
  }

  .knowledge-question-card .knowledge-vote-score,
  .knowledge-question-card .knowledge-vote-count,
  #view-knowledge .knowledge-question-card .knowledge-vote-score,
  #view-knowledge .knowledge-question-card .knowledge-vote-count {
    min-width: 22px !important;
    text-align: center !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #0f172a !important;
  }

  .knowledge-replies-count,
  .knowledge-views-count,
  .knowledge-question-stat,
  #view-knowledge .knowledge-replies-count,
  #view-knowledge .knowledge-views-count,
  #view-knowledge .knowledge-question-stat,
  #view-knowledge .knowledge-question-stats small {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    color: #64748b !important;
    font-size: 13px !important;
    white-space: nowrap !important;
  }

  .knowledge-question-card h2,
  .knowledge-question-card h3,
  #view-knowledge .knowledge-question-card h2,
  #view-knowledge .knowledge-question-card h3 {
    margin: 0 !important;
    font-size: 21px !important;
    line-height: 1.25 !important;
    color: #1e3a8a !important;
    letter-spacing: -0.02em !important;
  }

  .knowledge-question-card p,
  #view-knowledge .knowledge-question-card p {
    margin: 8px 0 0 !important;
    font-size: 15px !important;
    line-height: 1.55 !important;
    color: #64748b !important;
    overflow-wrap: anywhere !important;
  }

  .knowledge-question-tags,
  #view-knowledge .knowledge-question-tags {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    margin-top: 12px !important;
  }

  .knowledge-question-tags span,
  #view-knowledge .knowledge-question-tags span {
    white-space: normal !important;
    max-width: 100% !important;
  }

  .knowledge-question-footer,
  .knowledge-card-footer,
  #view-knowledge .knowledge-question-footer,
  #view-knowledge .knowledge-card-footer {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    width: 100% !important;
    min-width: 0 !important;
    padding-top: 12px !important;
    border-top: 1px solid #f1f5f9 !important;
  }

  .knowledge-question-footer strong,
  .knowledge-card-footer strong,
  .knowledge-question-footer span,
  .knowledge-card-footer span,
  #view-knowledge .knowledge-question-footer strong,
  #view-knowledge .knowledge-card-footer strong,
  #view-knowledge .knowledge-question-footer span,
  #view-knowledge .knowledge-card-footer span {
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .knowledge-list-view *,
  .knowledge-question-card *,
  #view-knowledge .knowledge-list-view *,
  #view-knowledge .knowledge-question-card * {
    max-width: 100% !important;
  }

  .knowledge-list-view,
  #view-knowledge .knowledge-list-view {
    overflow-x: hidden !important;
  }
}

@media (max-width: 768px) {
  .knowledge-list-view,
  .knowledge-center,
  .knowledge-content,
  #view-knowledge .knowledge-list-view,
  #view-knowledge .knowledge-center,
  #view-knowledge .knowledge-content {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
  }

  .knowledge-list-head,
  #view-knowledge .knowledge-list-head {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow: hidden !important;
  }

  .knowledge-sort-tabs,
  #view-knowledge .knowledge-sort-tabs {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    scrollbar-width: none !important;
  }

  .knowledge-sort-tabs::-webkit-scrollbar,
  #view-knowledge .knowledge-sort-tabs::-webkit-scrollbar {
    display: none !important;
  }

  .knowledge-sort-tabs button,
  #view-knowledge .knowledge-sort-tabs button {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
  }

  .knowledge-question-card,
  #view-knowledge .knowledge-question-card {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow: hidden !important;
  }
}

@media (max-width: 639px) {
  .knowledge-question-card,
  #view-knowledge .knowledge-question-card {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    display: grid !important;
    grid-template-columns: 76px minmax(0, 1fr) !important;
    gap: 16px !important;
    align-items: start !important;
    padding: 18px !important;
    padding: 14px !important;
    border-radius: 18px !important;
    background: #fff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
    overflow: hidden !important;
  }

  .stat-col,
  .knowledge-stat-col,
  .knowledge-question-stats-col,
  #view-knowledge .knowledge-question-stats-col,
  #view-knowledge .knowledge-question-stats {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 8px !important;
    width: 72px !important;
    min-width: 72px !important;
    max-width: 72px !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .knowledge-vote-box,
  .knowledge-stat-box.vote-box,
  .stat-box.vote-box,
  #view-knowledge .knowledge-vote-box,
  #view-knowledge .knowledge-stat-box.vote-box {
    width: 64px !important;
    min-height: 78px !important;
    padding: 6px 4px !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    background: #fff !important;
    color: #1e3a8a !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 2px !important;
    text-align: center !important;
  }

  .knowledge-vote-arrow,
  .knowledge-question-stats-col .knowledge-vote-control button,
  #view-knowledge .knowledge-vote-arrow,
  #view-knowledge .knowledge-question-stats-col .knowledge-vote-control button {
    width: 22px !important;
    height: 20px !important;
    min-width: 22px !important;
    min-height: 20px !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 6px !important;
    background: transparent !important;
    color: #94a3b8 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    box-shadow: none !important;
  }

  .knowledge-vote-arrow:hover,
  .knowledge-vote-arrow.is-active,
  .knowledge-question-stats-col .knowledge-vote-control button:hover,
  .knowledge-question-stats-col .knowledge-vote-control button.active,
  .knowledge-question-stats-col .knowledge-vote-control button.is-upvoted,
  .knowledge-question-stats-col .knowledge-vote-control button.is-downvoted,
  #view-knowledge .knowledge-vote-arrow:hover,
  #view-knowledge .knowledge-vote-arrow.is-active,
  #view-knowledge .knowledge-question-stats-col .knowledge-vote-control button:hover,
  #view-knowledge .knowledge-question-stats-col .knowledge-vote-control button.active,
  #view-knowledge .knowledge-question-stats-col .knowledge-vote-control button.is-upvoted,
  #view-knowledge .knowledge-question-stats-col .knowledge-vote-control button.is-downvoted {
    background: #eff6ff !important;
    color: #1e3a8a !important;
    border-color: transparent !important;
  }

  .knowledge-vote-arrow i,
  .knowledge-vote-arrow svg,
  .knowledge-question-stats-col .knowledge-vote-control button i,
  .knowledge-question-stats-col .knowledge-vote-control button svg,
  #view-knowledge .knowledge-vote-arrow i,
  #view-knowledge .knowledge-vote-arrow svg,
  #view-knowledge .knowledge-question-stats-col .knowledge-vote-control button i,
  #view-knowledge .knowledge-question-stats-col .knowledge-vote-control button svg {
    width: 16px !important;
    height: 16px !important;
    stroke-width: 2.4 !important;
    color: currentColor !important;
  }

  .knowledge-vote-box strong,
  .knowledge-stat-box.vote-box strong,
  .stat-box.vote-box strong,
  #view-knowledge .knowledge-vote-box strong,
  #view-knowledge .knowledge-stat-box.vote-box strong {
    font-size: 20px !important;
    line-height: 1 !important;
    font-weight: 600 !important;
    margin: 0 !important;
    color: #0f172a !important;
  }

  .knowledge-vote-box span,
  .knowledge-stat-box.vote-box span,
  .stat-box.vote-box span,
  #view-knowledge .knowledge-vote-box span,
  #view-knowledge .knowledge-stat-box.vote-box span {
    margin: 2px 0 0 !important;
    font-size: 11px !important;
    line-height: 1 !important;
    color: #64748b !important;
  }

  .knowledge-answer-box,
  .knowledge-stat-box.is-answered,
  .stat-box.is-answered,
  #view-knowledge .knowledge-answer-box,
  #view-knowledge .knowledge-stat-box.is-answered {
    width: 64px !important;
    min-height: 58px !important;
    padding: 7px 4px !important;
    background: #0f9f6e !important;
    border-color: #0f9f6e !important;
    color: #fff !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
  }

  .knowledge-answer-box strong,
  .knowledge-stat-box.is-answered strong,
  .stat-box.is-answered strong,
  #view-knowledge .knowledge-answer-box strong,
  #view-knowledge .knowledge-stat-box.is-answered strong {
    margin: 0 !important;
    color: #fff !important;
    font-size: 20px !important;
    line-height: 1 !important;
    font-weight: 600 !important;
  }

  .knowledge-answer-box span,
  .knowledge-stat-box.is-answered span,
  .stat-box.is-answered span,
  #view-knowledge .knowledge-answer-box span,
  #view-knowledge .knowledge-stat-box.is-answered span {
    margin-top: 4px !important;
    color: #fff !important;
    font-size: 11px !important;
    line-height: 1 !important;
  }

  .knowledge-question-stats-col .knowledge-vote-control,
  #view-knowledge .knowledge-question-stats-col .knowledge-vote-control {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 2px !important;
    width: 100% !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
  }

  .knowledge-question-stats-col .knowledge-vote-score,
  #view-knowledge .knowledge-question-stats-col .knowledge-vote-score {
    min-width: 0 !important;
    margin: 0 !important;
    text-align: center !important;
    font-size: 20px !important;
    line-height: 1 !important;
    color: #0f172a !important;
  }

  .knowledge-stat-views,
  .stat-views,
  #view-knowledge .knowledge-stat-views {
    width: 64px !important;
    margin: 0 !important;
    padding: 0 !important;
    color: #94a3b8 !important;
    font-size: 11px !important;
    line-height: 1.2 !important;
    text-align: center !important;
    white-space: normal !important;
  }

  .knowledge-question-stats-col .knowledge-vote-control button .lucide,
  #view-knowledge .knowledge-question-stats-col .knowledge-vote-control button .lucide {
    pointer-events: none;
  }

  .knowledge-stat-box.is-answered strong,
  .knowledge-stat-box.is-answered span,
  .stat-box.is-answered strong,
  .stat-box.is-answered span,
  #view-knowledge .knowledge-stat-box.is-answered strong,
  #view-knowledge .knowledge-stat-box.is-answered span {
    color: #fff !important;
  }

  .knowledge-question-content,
  #view-knowledge .knowledge-question-content {
    min-width: 0 !important;
    max-width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .knowledge-question-card h2,
  .knowledge-question-card h3,
  #view-knowledge .knowledge-question-card h2,
  #view-knowledge .knowledge-question-card h3 {
    margin: 0 !important;
    color: #1e3a8a !important;
    font-size: 20px !important;
    line-height: 1.28 !important;
    font-weight: 600 !important;
    letter-spacing: -0.02em !important;
  }

  .knowledge-question-card p,
  #view-knowledge .knowledge-question-card p {
    margin: 10px 0 0 !important;
    color: #64748b !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    overflow-wrap: anywhere !important;
  }

  .knowledge-question-tags,
  #view-knowledge .knowledge-question-tags {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 7px !important;
    margin-top: 12px !important;
  }

  .knowledge-question-tags span,
  .tag-chip,
  #view-knowledge .knowledge-question-tags span {
    min-height: 26px !important;
    padding: 5px 9px !important;
    border-radius: 999px !important;
    background: #eff6ff !important;
    color: #1e3a8a !important;
    font-size: 12px !important;
    font-weight: 500 !important;
  }

  .knowledge-question-footer,
  #view-knowledge .knowledge-question-footer {
    margin-top: 14px !important;
    padding-top: 12px !important;
    border-top: 1px solid #f1f5f9 !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    min-width: 0 !important;
  }

  .knowledge-author,
  #view-knowledge .knowledge-author {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    min-width: 0 !important;
    max-width: 100% !important;
    flex-wrap: nowrap !important;
  }

  .knowledge-avatar,
  #view-knowledge .knowledge-avatar {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    border-radius: 999px !important;
    background: #dbeafe !important;
    color: #1e3a8a !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 12px !important;
    font-weight: 600 !important;
  }

  .knowledge-author strong,
  #view-knowledge .knowledge-author strong {
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    color: #334155 !important;
    font-size: 13px !important;
    font-weight: 500 !important;
  }

  .knowledge-author span:not(.knowledge-avatar),
  .knowledge-author small,
  #view-knowledge .knowledge-author span:not(.knowledge-avatar),
  #view-knowledge .knowledge-author small {
    color: #94a3b8 !important;
    font-size: 12px !important;
    white-space: nowrap !important;
  }

  .knowledge-mobile-stats,
  .knowledge-footer-stats,
  #view-knowledge .knowledge-mobile-stats,
  #view-knowledge .knowledge-footer-stats {
    display: none !important;
  }
}

@media (max-width: 768px) {
  #view-documents .documents-header,
  .documents-header,
  .caag-header,
  .agca-header {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 14px !important;
    margin-bottom: 24px !important;
  }

  #view-documents .documents-header h1,
  .documents-header h1,
  .caag-header h1,
  .agca-header h1 {
    font-size: 26px !important;
    line-height: 1.15 !important;
    margin: 0 !important;
  }

  #view-documents .documents-header p,
  .documents-header p,
  .caag-header p,
  .agca-header p {
    font-size: 14px !important;
    line-height: 1.45 !important;
    margin: 0 !important;
    max-width: 100% !important;
  }

  #view-documents .documents-header .row-between {
    width: 100% !important;
    margin-left: 0 !important;
  }

  #view-documents .documents-upload-btn,
  .documents-upload-btn,
  .caag-upload-btn,
  .agca-upload-btn {
    width: 100% !important;
    max-width: 100% !important;
    justify-content: center !important;
    min-height: 42px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  #view-documents .documents-page,
  #view-documents .documents-page-inner,
  .documents-page,
  .documents-page-inner,
  .caag-page,
  .caag-page-inner,
  .agca-page,
  .agca-page-inner {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
  }

  #view-documents .documents-folder-grid,
  .documents-folders-grid,
  .caag-folders-grid,
  .agca-folders-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  #view-documents .documents-folder-card,
  .documents-folder-card,
  .caag-folder-card,
  .agca-folder-card {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  #view-documents .documents-files-toolbar,
  .documents-filter-panel,
  .documents-search-panel,
  .caag-filter-panel,
  .agca-filter-panel {
    width: 100% !important;
    max-width: 100% !important;
    padding: 16px !important;
    border-radius: 16px !important;
    overflow: hidden !important;
  }

  #view-documents .documents-files-toolbar input,
  #view-documents .documents-files-toolbar select,
  .documents-filter-panel input,
  .documents-filter-panel select,
  .documents-search-panel input,
  .documents-search-panel select,
  .caag-filter-panel input,
  .caag-filter-panel select,
  .agca-filter-panel input,
  .agca-filter-panel select {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  #view-documents .documents-search-field,
  #view-documents .documents-filter-select,
  #view-documents .documents-filter-grid,
  .documents-filter-grid,
  .caag-filter-grid,
  .agca-filter-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  #view-documents .documents-filter-select {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  #view-documents .documents-reset-filters,
  .documents-reset-filters,
  .caag-reset-filters,
  .agca-reset-filters {
    align-self: flex-start !important;
    margin-top: 4px !important;
  }

  #view-documents .documents-type-filters,
  .documents-type-tabs,
  .documents-file-tabs,
  .caag-type-tabs,
  .agca-type-tabs {
    width: 100% !important;
    max-width: 100% !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding: 4px 0 8px !important;
    scrollbar-width: none !important;
    -webkit-overflow-scrolling: touch !important;
  }

  #view-documents .documents-type-filters::-webkit-scrollbar,
  .documents-type-tabs::-webkit-scrollbar,
  .documents-file-tabs::-webkit-scrollbar,
  .caag-type-tabs::-webkit-scrollbar,
  .agca-type-tabs::-webkit-scrollbar {
    display: none !important;
  }

  #view-documents .documents-type-filters button,
  .documents-type-tabs button,
  .documents-file-tabs button,
  .caag-type-tabs button,
  .agca-type-tabs button {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
    min-height: 34px !important;
    padding: 7px 13px !important;
    border-radius: 999px !important;
  }

  #view-documents .documents-files-table {
    overflow: visible !important;
    border-radius: 16px !important;
  }

  #view-documents .documents-files-head {
    display: none !important;
  }

  #view-documents .documents-file-row,
  .documents-file-row,
  .caag-file-row,
  .agca-file-row {
    display: grid !important;
    grid-template-columns: 44px minmax(0, 1fr) !important;
    gap: 12px !important;
    align-items: start !important;
    padding: 14px !important;
    border-radius: 14px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow: hidden !important;
  }

  #view-documents .documents-file-name {
    display: contents !important;
  }

  #view-documents .documents-file-icon,
  .documents-file-icon,
  .caag-file-icon,
  .agca-file-icon {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    border-radius: 12px !important;
  }

  #view-documents .documents-file-copy,
  .documents-file-info,
  .caag-file-info,
  .agca-file-info {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  #view-documents .documents-file-title,
  .documents-file-title,
  .caag-file-title,
  .agca-file-title {
    font-size: 14px !important;
    line-height: 1.3 !important;
    overflow-wrap: anywhere !important;
  }

  #view-documents .documents-file-author,
  #view-documents .documents-file-meta,
  .documents-file-meta,
  .caag-file-meta,
  .agca-file-meta {
    font-size: 12px !important;
    color: #64748b !important;
  }

  #view-documents .documents-file-row > .documents-file-meta {
    grid-column: 2 !important;
  }

  #view-documents .documents-file-actions,
  .documents-file-actions,
  .caag-file-actions,
  .agca-file-actions {
    grid-column: 2 !important;
    display: flex !important;
    justify-content: flex-start !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    margin-top: 10px !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: auto !important;
  }

  #view-documents .documents-file-actions button,
  #view-documents .documents-file-actions a,
  .documents-file-actions button,
  .caag-file-actions button,
  .agca-file-actions button {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    border-radius: 999px !important;
    flex-shrink: 0 !important;
  }
}

@media (max-width: 768px) {
  #view-documents .documents-page *,
  #view-documents .documents-files-block *,
  #view-documents .documents-folders * {
    max-width: 100% !important;
  }
}

@media (max-width: 768px) {
  #view-documents .documents-page,
  #view-documents .documents-page-inner,
  .documents-page,
  .documents-page-inner,
  .agca-page,
  .agca-page-inner,
  .caag-page,
  .caag-page-inner {
    padding-left: 12px !important;
    padding-right: 12px !important;
    overflow-x: hidden !important;
  }

  #view-documents .documents-folder-card,
  .documents-folder-card,
  .agca-folder-card,
  .caag-folder-card {
    padding: 14px !important;
  }

  #view-documents .documents-files-toolbar input,
  #view-documents .documents-files-toolbar select,
  .documents-filter-panel input,
  .documents-filter-panel select,
  .documents-search-panel input,
  .documents-search-panel select,
  .agca-filter-panel input,
  .agca-filter-panel select,
  .caag-filter-panel input,
  .caag-filter-panel select {
    height: 40px !important;
    font-size: 13px !important;
  }

  #view-documents .documents-tags-inline,
  .documents-tags,
  .agca-tags,
  .caag-tags {
    width: 100% !important;
    max-width: 100% !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    overflow: visible !important;
    padding: 4px 0 8px !important;
  }

  #view-documents .documents-tag-select {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  #view-documents .documents-tag-select select {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: 40px !important;
    font-size: 13px !important;
  }

  #view-documents .documents-file-row,
  .documents-file-row,
  .agca-file-row,
  .caag-file-row {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 14px !important;
    border-radius: 16px !important;
    overflow: hidden !important;
  }

  #view-documents .documents-file-main,
  .documents-file-main,
  .agca-file-main,
  .caag-file-main {
    display: grid !important;
    grid-template-columns: 42px minmax(0, 1fr) !important;
    gap: 12px !important;
    align-items: start !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  #view-documents .documents-file-name {
    display: grid !important;
    grid-template-columns: 42px minmax(0, 1fr) !important;
    gap: 12px !important;
    align-items: start !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  #view-documents .documents-file-title,
  #view-documents .documents-file-copy strong,
  .documents-file-title,
  .documents-file-info h3,
  .agca-file-title,
  .caag-file-title {
    margin: 0 !important;
    font-size: 14px !important;
    line-height: 1.3 !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
  }

  #view-documents .documents-file-author,
  #view-documents .documents-file-meta,
  .documents-file-meta,
  .agca-file-meta,
  .caag-file-meta {
    font-size: 12px !important;
    line-height: 1.35 !important;
  }

  #view-documents .documents-file-row > .documents-file-meta {
    grid-column: auto !important;
  }

  #view-documents .documents-file-actions,
  .documents-file-actions,
  .agca-file-actions,
  .caag-file-actions {
    grid-column: auto !important;
    margin-top: 0 !important;
  }
}

@media (max-width: 360px) {
  #view-documents .documents-page,
  #view-documents .documents-page-inner,
  .documents-page-inner,
  .agca-page-inner,
  .caag-page-inner {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  #view-documents .documents-header h1,
  .documents-header h1,
  .agca-header h1,
  .caag-header h1 {
    font-size: 24px !important;
  }

  #view-documents .documents-files-toolbar,
  .documents-filter-panel,
  .documents-search-panel,
  .agca-filter-panel,
  .caag-filter-panel {
    padding: 12px !important;
  }

  #view-documents .documents-upload-btn,
  .documents-upload-btn,
  .agca-upload-btn,
  .caag-upload-btn {
    font-size: 13px !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  #view-documents .documents-type-filters button,
  #view-documents .documents-tags-inline .doc-filter-tag,
  .documents-type-tabs button,
  .documents-file-tabs button,
  .documents-tags button,
  .agca-type-tabs button,
  .caag-type-tabs button {
    min-height: 32px !important;
    padding: 6px 11px !important;
    font-size: 11.5px !important;
  }
}

@media (max-width: 320px) {
  #view-documents .documents-page,
  #view-documents .documents-page-inner,
  .documents-page-inner,
  .agca-page-inner,
  .caag-page-inner {
    padding-left: 8px !important;
    padding-right: 8px !important;
  }

  #view-documents .documents-header,
  .documents-header,
  .agca-header,
  .caag-header {
    gap: 12px !important;
  }

  #view-documents .documents-header h1,
  .documents-header h1,
  .agca-header h1,
  .caag-header h1 {
    font-size: 22px !important;
    line-height: 1.15 !important;
  }

  #view-documents .documents-header p,
  .documents-header p,
  .agca-header p,
  .caag-header p {
    font-size: 13px !important;
  }

  #view-documents .documents-file-row,
  .documents-file-row,
  .agca-file-row,
  .caag-file-row {
    padding: 12px !important;
    gap: 10px !important;
  }

  #view-documents .documents-file-name,
  #view-documents .documents-file-main,
  .documents-file-main,
  .agca-file-main,
  .caag-file-main {
    grid-template-columns: 38px minmax(0, 1fr) !important;
    gap: 10px !important;
  }

  #view-documents .documents-file-icon,
  .documents-file-icon,
  .agca-file-icon,
  .caag-file-icon {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    border-radius: 10px !important;
  }

  #view-documents .documents-file-title,
  #view-documents .documents-file-copy strong,
  .documents-file-title,
  .documents-file-info h3,
  .agca-file-title,
  .caag-file-title {
    font-size: 13px !important;
    line-height: 1.3 !important;
  }

  #view-documents .documents-file-author,
  #view-documents .documents-file-meta,
  .documents-file-meta,
  .agca-file-meta,
  .caag-file-meta {
    font-size: 11.5px !important;
    line-height: 1.3 !important;
  }

  #view-documents .documents-file-actions,
  .documents-file-actions,
  .agca-file-actions,
  .caag-file-actions {
    gap: 6px !important;
  }

  #view-documents .documents-file-actions button,
  #view-documents .documents-file-actions a,
  .documents-file-actions button,
  .agca-file-actions button,
  .caag-file-actions button {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
  }
}

@media (max-width: 768px) {
  #view-documents,
  #view-documents * {
    box-sizing: border-box !important;
  }

  #view-documents {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  #view-documents .documents-page {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 0 14px 18px !important;
    overflow-x: hidden !important;
  }

  #view-documents .documents-header {
    gap: 12px !important;
    margin-bottom: 18px !important;
  }

  #view-documents .documents-header > div,
  #view-documents .documents-header .row-between,
  #view-documents .documents-folders,
  #view-documents .documents-files-block,
  #view-documents #documents-files-toolbar,
  #view-documents .documents-files-top,
  #view-documents .documents-files-table,
  #view-documents .documents-folder-grid,
  #view-documents #documents-file-list {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  #view-documents .documents-header p {
    padding-right: 0 !important;
    overflow-wrap: anywhere !important;
  }

  #view-documents .documents-header .row-between {
    display: flex !important;
    justify-content: stretch !important;
  }

  #view-documents .documents-upload-btn {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 0 14px !important;
    font-size: 13px !important;
  }

  #view-documents .documents-folders,
  #view-documents .documents-files-block {
    overflow-x: hidden !important;
  }

  #view-documents .documents-folder-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  #view-documents .documents-folder-card {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 14px !important;
    gap: 12px !important;
    overflow: hidden !important;
  }

  #view-documents .documents-folder-card strong,
  #view-documents .documents-folder-card span {
    overflow-wrap: anywhere !important;
  }

  #view-documents #documents-files-toolbar,
  #view-documents .documents-filters {
    display: grid !important;
    grid-template-columns: 1fr !important;
    padding: 14px !important;
    gap: 14px !important;
    overflow-x: hidden !important;
  }

  #view-documents .documents-search-field,
  #view-documents .documents-filter-select,
  #view-documents .documents-tag-select,
  #view-documents #documents-tags-cloud {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  #view-documents .documents-search-field input,
  #view-documents .documents-filter-select select,
  #view-documents .documents-tag-select select {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: 42px !important;
    font-size: 16px !important;
  }

  #view-documents .documents-reset-filters {
    width: 100% !important;
    max-width: 100% !important;
    overflow-wrap: anywhere !important;
  }

  #view-documents .documents-tags-inline {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
  }

  #view-documents .documents-tags-inline .doc-filter-tag {
    flex: 0 0 auto !important;
    max-width: none !important;
    white-space: nowrap !important;
  }

  #view-documents .documents-files-top {
    display: grid !important;
    gap: 12px !important;
  }

  #view-documents .documents-files-top > div:first-child {
    min-width: 0 !important;
  }

  #view-documents #documents-files-meta {
    overflow-wrap: anywhere !important;
  }

  #view-documents .documents-type-filters {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    padding: 4px 0 8px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    border-radius: 0 !important;
    border-left: 0 !important;
    border-right: 0 !important;
    box-shadow: none !important;
  }

  #view-documents .documents-type-filters button {
    flex: 0 0 auto !important;
    min-width: fit-content !important;
    max-width: none !important;
    white-space: nowrap !important;
    font-size: 12px !important;
    padding: 7px 12px !important;
  }

  #view-documents .documents-files-table {
    overflow-x: hidden !important;
  }

  #view-documents .documents-file-list {
    display: grid !important;
    gap: 12px !important;
  }

  #view-documents .documents-file-row {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow: hidden !important;
  }

  #view-documents .documents-file-name,
  #view-documents .documents-file-copy,
  #view-documents .documents-file-main {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  #view-documents .documents-file-title,
  #view-documents .documents-file-author,
  #view-documents .documents-file-meta {
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
  }

  #view-documents .documents-file-actions {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    justify-content: flex-start !important;
  }
}

@media (max-width: 640px) {
  #view-documents .documents-page {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  #view-documents .documents-header h1 {
    font-size: 24px !important;
  }

  #view-documents .documents-header p {
    font-size: 13px !important;
  }

  #view-documents .documents-upload-btn {
    min-height: 40px !important;
  }
}

.login-secondary-link,
.auth-secondary-btn,
.auth-back-btn,
[data-auth-view="login"],
#createLink,
.login-create-btn,
a[href="#"][id="createLink"] {
  width: 100% !important;
  min-height: 44px !important;
  padding: 0 18px !important;
  border: 1px solid #dbe3ef !important;
  border-radius: 12px !important;
  background: #ffffff !important;
  background-image: none !important;
  color: #1e3a8a !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 9px !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
  cursor: pointer !important;
  transition:
    background-color .18s ease,
    border-color .18s ease,
    color .18s ease,
    box-shadow .18s ease,
    transform .18s ease !important;
}

.login-secondary-link:hover,
.auth-secondary-btn:hover,
.auth-back-btn:hover,
[data-auth-view="login"]:hover,
#createLink:hover,
.login-create-btn:hover {
  background: #f8fafc !important;
  background-image: none !important;
  border-color: #bfdbfe !important;
  color: #172f73 !important;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06) !important;
}

.login-secondary-link:active,
.auth-secondary-btn:active,
.auth-back-btn:active,
[data-auth-view="login"]:active,
#createLink:active,
.login-create-btn:active {
  transform: translateY(1px) !important;
}

.login-secondary-link:focus-visible,
.auth-secondary-btn:focus-visible,
.auth-back-btn:focus-visible,
[data-auth-view="login"]:focus-visible,
#createLink:focus-visible,
.login-create-btn:focus-visible {
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.14) !important;
}

.login-secondary-link svg,
.auth-secondary-btn svg,
.auth-back-btn svg,
[data-auth-view="login"] svg,
#createLink svg,
#createLink i,
.login-create-btn svg,
.login-create-btn i {
  width: 17px !important;
  height: 17px !important;
  color: currentColor !important;
  stroke-width: 2 !important;
  flex-shrink: 0 !important;
}

.login-create-btn.hidden,
#createLink.hidden,
.login-secondary-link.hidden,
.auth-secondary-btn.hidden,
.auth-back-btn.hidden {
  display: none !important;
}

.news-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 24px !important;
  columns: initial !important;
  column-gap: 0 !important;
}

.news-card,
.actuality-card,
.article-card {
  overflow: hidden !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 20px !important;
  background: #ffffff !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
  transition:
    transform .18s ease,
    box-shadow .18s ease,
    border-color .18s ease !important;
}

.news-card:hover,
.actuality-card:hover,
.article-card:hover {
  transform: translateY(-2px) !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08) !important;
}

.news-card:not(.news-featured-card) {
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  margin-bottom: 0 !important;
  break-inside: auto !important;
  -webkit-column-break-inside: auto !important;
  border-radius: 20px !important;
  min-height: 0 !important;
  height: auto !important;
}

.news-card-image,
.actuality-card-image,
.article-card-image,
.news-card-media {
  width: 100% !important;
  aspect-ratio: 16 / 9 !important;
  overflow: hidden !important;
  background: #f1f5f9 !important;
}

.news-card-thumb,
.news-card-media > a:first-child,
.news-card-media > .news-preview-carousel,
.news-card-media > .news-card-thumb.placeholder,
.news-card-media .news-preview-slides,
.news-card-media .news-preview-slide,
.news-card-media .news-preview-slide .news-card-thumb {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
}

.news-card-thumb,
.news-card-media img {
  display: block !important;
  object-fit: cover !important;
}

.news-card-thumb.placeholder,
.news-card-image.is-placeholder,
.actuality-card-image.is-placeholder,
.article-card-image.is-placeholder {
  background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%) !important;
  border-bottom: 1px solid #e2e8f0 !important;
  color: #64748b !important;
}

.news-card-body,
.actuality-card-body,
.article-card-body {
  padding: 18px 20px 20px !important;
}

.news-card-meta,
.actuality-card-meta,
.article-card-meta {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  margin-bottom: 12px !important;
}

.news-card-date,
.actuality-card-date,
.article-card-date {
  color: #94a3b8 !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
  margin: 0 !important;
}

.news-card-title,
.actuality-card-title,
.article-card-title,
.news-card h4 {
  margin: 0 !important;
  color: #0f172a !important;
  font-size: 18px !important;
  line-height: 1.3 !important;
  font-weight: 800 !important;
  letter-spacing: -0.02em !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}

.news-card-excerpt,
.actuality-card-excerpt,
.article-card-excerpt,
.news-excerpt {
  margin: 10px 0 0 !important;
  color: #64748b !important;
  font-size: 14px !important;
  line-height: 1.55 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 3 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}

.news-card-support {
  display: block !important;
  gap: 0 !important;
}

.news-card-support .news-source-line {
  margin: 0 !important;
  color: #94a3b8 !important;
  font-size: 12px !important;
  font-weight: 600 !important;
}

.news-card-footer,
.actuality-card-footer,
.article-card-footer {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  margin-top: 18px !important;
  padding-top: 14px !important;
  border-top: 1px solid #f1f5f9 !important;
}

.news-card-author,
.actuality-card-author,
.article-card-author {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  min-width: 0 !important;
  color: #475569 !important;
  font-size: 13px !important;
  font-weight: 600 !important;
}

.news-avatar:not(.news-author-avatar),
.actuality-avatar,
.article-avatar {
  width: 30px !important;
  height: 30px !important;
  min-width: 30px !important;
  border-radius: 999px !important;
  background: #dbeafe !important;
  color: #1e3a8a !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 11px !important;
  font-weight: 800 !important;
}

.news-card-action,
.actuality-card-action,
.article-card-action {
  min-height: auto !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #1e3a8a !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
  cursor: pointer !important;
  box-shadow: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  text-decoration: none !important;
}

.news-card-action:hover,
.actuality-card-action:hover,
.article-card-action:hover {
  background: transparent !important;
  border-color: transparent !important;
  text-decoration: underline !important;
  text-underline-offset: 0.14em !important;
}

.news-card-admin-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
  margin-top: 12px !important;
}

.news-card-admin-actions .ghost {
  padding: 0 !important;
  min-height: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: #94a3b8 !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  box-shadow: none !important;
}

.news-card-admin-actions .ghost:hover {
  color: #334155 !important;
  text-decoration: underline !important;
  text-underline-offset: 0.14em !important;
}

@media (min-width: 1025px) {
  #view-news .news-featured-card {
    display: grid !important;
    grid-template-columns: minmax(420px, 50%) minmax(0, 1fr) !important;
    grid-template-rows: minmax(0, 1fr) !important;
    align-items: stretch !important;
    height: auto !important;
    min-height: 320px !important;
    padding: 0 !important;
  }

  #view-news .news-featured-media {
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
  }

  #view-news .news-featured-body {
    grid-column: 2 !important;
    grid-row: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    gap: 0.95rem !important;
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 1.3rem 1.45rem !important;
    overflow: visible !important;
  }

  #view-news .news-featured-body > .news-featured-header,
  #view-news .news-featured-body > .news-featured-content,
  #view-news .news-featured-body > .news-featured-footer {
    flex-shrink: 0 !important;
  }

  #view-news .news-featured-content > h4,
  #view-news .news-featured-content > .news-excerpt,
  #view-news .news-featured-content > .news-featured-support,
  #view-news .news-featured-content > .news-featured-read {
    flex-shrink: 0 !important;
  }

  #view-news .news-featured-content > .news-excerpt {
    overflow: hidden !important;
  }

  #view-news .news-featured-content > .news-featured-read {
    align-self: flex-end !important;
    margin-left: auto !important;
  }

  #view-news .news-featured-footer {
    display: block !important;
    margin-top: auto !important;
    padding-bottom: 0.2rem !important;
  }

  #view-news .news-featured-author-zone {
    display: grid !important;
    gap: 0.7rem !important;
  }

  #view-news .news-featured-footer .news-card-actions {
    margin-top: 0 !important;
    padding-top: 0 !important;
    border-top: 0 !important;
  }
}

@media (max-width: 640px) {
  .news-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  .news-card,
  .actuality-card,
  .article-card {
    border-radius: 18px !important;
  }

  .news-card-body,
  .actuality-card-body,
  .article-card-body {
    padding: 16px !important;
  }

  .news-card-title,
  .actuality-card-title,
  .article-card-title,
  .news-card h4 {
    font-size: 17px !important;
  }

  .news-card-footer,
  .actuality-card-footer,
  .article-card-footer {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
  }

  .news-card-action,
  .actuality-card-action,
  .article-card-action {
    width: 100% !important;
    justify-content: center !important;
  }

  .news-card-meta,
  .actuality-card-meta,
  .article-card-meta {
    align-items: flex-start !important;
  }

  .news-topic-bar {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding-bottom: 2px !important;
    scrollbar-width: none !important;
  }

  .news-topic-bar::-webkit-scrollbar {
    display: none !important;
  }

  .news-topic-bar .news-topic-chip {
    flex: 0 0 auto !important;
  }

  .news-load-more-wrap {
    display: flex !important;
    justify-content: center !important;
    margin-top: 4px !important;
  }

  .news-newsletter-card {
    margin-top: 0 !important;
  }

  .news-newsletter-form button {
    width: 100% !important;
  }
}

@media (max-width: 640px) {
  #news-list,
  #news-list .news-grid,
  #news-list .news-card,
  #news-list .news-card-body {
    min-width: 0 !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  #news-list .news-card {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    border-radius: 18px !important;
  }

  #news-list .news-card-media {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: 16 / 9 !important;
    overflow: hidden !important;
    border-bottom: 1px solid #f1f5f9 !important;
  }

  #news-list .news-card-media > a:first-child,
  #news-list .news-card-media > .news-preview-carousel,
  #news-list .news-card-media > .news-card-thumb.placeholder,
  #news-list .news-card-media .news-preview-slides,
  #news-list .news-card-media .news-preview-slide,
  #news-list .news-card-media .news-card-thumb,
  #news-list .news-card-media img {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    object-fit: cover !important;
    display: block !important;
  }

  #news-list .news-card-media .news-preview-thumbs {
    display: none !important;
  }

  #news-list .news-card-body {
    padding: 16px !important;
    gap: 12px !important;
  }

  #news-list .news-card-title,
  #news-list .news-card h4 {
    margin: 0 !important;
    font-size: 17px !important;
    line-height: 1.28 !important;
  }

  #news-list .news-card-excerpt,
  #news-list .news-excerpt {
    margin-top: 8px !important;
    -webkit-line-clamp: 3 !important;
  }

  #news-list .news-card-support {
    display: block !important;
  }

  #news-list .news-card-support .news-source-line {
    font-size: 12px !important;
    line-height: 1.4 !important;
    overflow-wrap: anywhere !important;
  }

  #news-list .news-card-footer {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    margin-top: 14px !important;
    padding-top: 12px !important;
  }

  #news-list .news-card-author {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  #news-list .news-card-author span {
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-size: 13px !important;
    line-height: 1.25 !important;
  }

  #news-list .news-card-author .news-avatar,
  #news-list .news-card-author .inline-avatar,
  #news-list .news-card-author img.news-avatar,
  #news-list .news-card-author img.inline-avatar {
    width: var(--news-avatar-size) !important;
    height: var(--news-avatar-size) !important;
    min-width: var(--news-avatar-size) !important;
    max-width: var(--news-avatar-size) !important;
    min-height: var(--news-avatar-size) !important;
    max-height: var(--news-avatar-size) !important;
    flex: 0 0 var(--news-avatar-size) !important;
  }

  #news-list .news-card-action,
  #news-list .news-read-btn.news-card-action {
    min-height: 38px !important;
    align-self: flex-start !important;
  }

  #news-list .news-card-admin-actions,
  #news-list .news-card-actions {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  #news-list .news-card-admin-actions .ghost,
  #news-list .news-card-actions .ghost {
    white-space: nowrap !important;
    font-size: 12px !important;
    line-height: 1.3 !important;
  }

}

#news-list .news-card-actions .news-delete-btn,
#news-list .news-card-admin-actions .news-delete-btn,
#news-list .news-card-actions button.news-delete-btn,
#news-list .news-card-admin-actions button.news-delete-btn {
  color: var(--danger) !important;
}

.news-layout {
  display: grid !important;
  gap: 18px !important;
}

.news-page-head,
#news-toolbar {
  margin-bottom: 18px !important;
}

@media (max-width: 1024px) {
  #view-cotech {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
  }

  #view-cotech .cotech-header {
    align-items: flex-start !important;
    flex-direction: column !important;
    gap: 14px !important;
  }

  #view-cotech .cotech-upload-btn {
    align-self: flex-start !important;
    max-width: 100% !important;
  }

  #view-cotech .cotech-next-session {
    margin: 24px 0 28px !important;
  }

  #view-cotech .cotech-next-inner {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 22px !important;
    padding: 24px !important;
  }

  #view-cotech .cotech-next-content,
  #view-cotech .cotech-next-side,
  #view-cotech .cotech-countdown-card {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  #view-cotech .cotech-countdown-card {
    text-align: left !important;
  }

  #view-cotech .cotech-library-toolbar {
    align-items: flex-start !important;
    flex-direction: column !important;
  }

  #view-cotech .cotech-sort-tabs {
    max-width: 100% !important;
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
  }

  #view-cotech .cotech-video-grid,
  #view-cotech #cotech-videos.news-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 22px !important;
  }
}

@media (max-width: 640px) {
  #view-cotech {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
  }

  #view-cotech .cotech-header {
    margin-bottom: 18px !important;
  }

  #view-cotech .cotech-upload-btn {
    width: 100% !important;
    justify-content: center !important;
  }

  #view-cotech .cotech-next-session {
    border-radius: 20px !important;
    margin: 20px 0 24px !important;
  }

  #view-cotech .cotech-next-inner {
    padding: 20px 16px !important;
    gap: 18px !important;
  }

  #view-cotech .cotech-next-badge {
    margin-bottom: 14px !important;
  }

  #view-cotech .cotech-next-content h2 {
    font-size: 22px !important;
    line-height: 1.24 !important;
  }

  #view-cotech .cotech-next-content p {
    margin-top: 12px !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
  }

  #view-cotech .cotech-next-meta {
    display: grid !important;
    gap: 10px !important;
    margin-top: 18px !important;
  }

  #view-cotech .cotech-next-meta span {
    min-width: 0 !important;
    white-space: normal !important;
    align-items: flex-start !important;
  }

  #view-cotech .cotech-countdown-card {
    padding: 18px 16px !important;
    border-radius: 14px !important;
  }

  #view-cotech .cotech-countdown {
    gap: 8px !important;
    margin-bottom: 16px !important;
  }

  #view-cotech .cotech-countdown strong {
    font-size: 24px !important;
  }

  #view-cotech .cotech-agenda-btn,
  #view-cotech .cotech-access-btn,
  #view-cotech .cotech-next-edit-btn {
    min-height: 40px !important;
  }

  #view-cotech .cotech-library-toolbar {
    gap: 10px !important;
    margin-bottom: 16px !important;
  }

  #view-cotech .cotech-library-title {
    gap: 8px !important;
  }

  #view-cotech .cotech-sort-tabs {
    width: 100% !important;
    justify-content: stretch !important;
    padding: 2px !important;
    overflow-x: auto !important;
    scrollbar-width: none !important;
  }

  #view-cotech .cotech-sort-tabs::-webkit-scrollbar {
    display: none !important;
  }

  #view-cotech .cotech-sort-tabs button {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    white-space: nowrap !important;
  }

  #view-cotech .cotech-video-grid,
  #view-cotech #cotech-videos.news-grid {
    grid-template-columns: 1fr !important;
    gap: 18px !important;
  }

  #view-cotech .cotech-video-card {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    border-radius: 16px !important;
  }

  #view-cotech .cotech-video-thumb,
  #view-cotech .cotech-video-thumb-link {
    aspect-ratio: 16 / 9 !important;
    min-height: 0 !important;
  }

  #view-cotech .cotech-video-content {
    padding: 16px !important;
    gap: 12px !important;
  }

  #view-cotech .cotech-video-content h3 {
    margin: 0 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
  }

  #view-cotech .cotech-video-meta {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    align-items: start !important;
  }

  #view-cotech .cotech-speaker {
    min-width: 0 !important;
    align-items: center !important;
  }

  #view-cotech .cotech-speaker > div {
    min-width: 0 !important;
  }

  #view-cotech .cotech-speaker strong,
  #view-cotech .cotech-speaker span,
  #view-cotech .cotech-views {
    overflow-wrap: anywhere !important;
  }

  #view-cotech .cotech-views {
    white-space: normal !important;
  }

  #view-cotech .cotech-player-modal {
    padding: 0 !important;
    align-items: flex-end !important;
  }

  #view-cotech .cotech-player-dialog,
  .cotech-player-dialog {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 100vh !important;
    border-radius: 20px 20px 0 0 !important;
  }

  #view-cotech .cotech-player-frame,
  .cotech-player-frame {
    aspect-ratio: 16 / 9 !important;
  }

  #view-cotech .cotech-player-info,
  .cotech-player-info {
    padding: 18px 16px 20px !important;
  }

  #view-cotech .cotech-player-meta,
  .cotech-player-meta {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
  }

  #view-cotech .cotech-player-footer,
  .cotech-player-footer {
    align-items: stretch !important;
    flex-direction: column !important;
  }

  #view-cotech .cotech-player-actions,
  .cotech-player-actions {
    width: 100% !important;
    flex-wrap: wrap !important;
  }

  #view-cotech .cotech-upload-modal,
  #cotechUploadModal,
  #cotechNextSessionModal {
    padding: 0 !important;
    align-items: flex-end !important;
  }

  #view-cotech .cotech-upload-dialog,
  .cotech-upload-dialog {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 100vh !important;
    border-radius: 20px 20px 0 0 !important;
  }

  #view-cotech .cotech-upload-body,
  .cotech-upload-body {
    padding: 18px 16px 20px !important;
  }

  #cotechNextSessionModal {
    padding: 0 12px !important;
    align-items: flex-end !important;
  }

  #cotechNextSessionModal .cotech-next-session-dialog {
    width: auto !important;
    max-width: none !important;
    max-height: calc(100dvh - 72px) !important;
    border-radius: 24px 24px 0 0 !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
  }

  #cotechNextSessionModal .cotech-upload-head {
    padding: 16px 16px 14px !important;
    gap: 12px !important;
    flex-shrink: 0 !important;
  }

  #cotechNextSessionModal .cotech-upload-head h2 {
    min-width: 0 !important;
    font-size: 18px !important;
    line-height: 1.25 !important;
  }

  #cotechNextSessionModal .cotech-upload-close {
    flex-shrink: 0 !important;
  }

  #cotechNextSessionModal .cotech-next-session-body {
    padding: 16px 16px 0 !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
  }

  #cotechNextSessionModal .cotech-next-session-form {
    gap: 14px !important;
    min-height: 100% !important;
  }

  #cotechNextSessionModal .cotech-next-session-form label,
  #cotechNextSessionModal .cotech-next-session-form .row,
  #cotechNextSessionModal .cotech-next-session-form .feedback {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  #cotechNextSessionModal .cotech-next-session-form label > span {
    font-size: 13px !important;
  }

  #cotechNextSessionModal .cotech-next-session-form input,
  #cotechNextSessionModal .cotech-next-session-form textarea {
    font-size: 16px !important;
  }

  #cotechNextSessionModal .cotech-next-session-form input {
    height: 48px !important;
    min-height: 48px !important;
    padding: 0 14px !important;
  }

  #cotechNextSessionModal .cotech-next-session-form textarea {
    min-height: 108px !important;
    padding: 12px 14px !important;
  }

  #cotechNextSessionModal .cotech-next-session-schedule {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  #cotechNextSessionModal .cotech-next-session-actions {
    position: sticky !important;
    bottom: 0 !important;
    z-index: 2 !important;
    margin: 0 -16px !important;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom)) !important;
    background: #fff !important;
    border-top: 1px solid #e2e8f0 !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  #cotechNextSessionModal .cotech-next-session-actions button {
    width: 100% !important;
    min-height: 44px !important;
    justify-content: center !important;
    white-space: normal !important;
  }

  #view-cotech .cotech-session-modal-footer .cotech-session-close-btn,
  #cotechNextSessionModal .cotech-session-modal-footer .cotech-session-close-btn {
    width: 100% !important;
    min-height: 46px !important;
    border-radius: 16px !important;
    border: 1px solid #cbd5e1 !important;
    background: #fff !important;
    color: #1e3a8a !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    box-shadow: none !important;
  }

  #view-cotech .cotech-session-modal-footer .cotech-session-close-btn:active,
  #cotechNextSessionModal .cotech-session-modal-footer .cotech-session-close-btn:active {
    background: #eff6ff !important;
  }

  #cotechNextSessionModal #cotech-next-session-cancel {
    order: 2 !important;
  }

  #cotechNextSessionModal .cotech-agenda-btn {
    order: 1 !important;
  }

  #cotechNextSessionModal .feedback {
    margin: 0 !important;
    padding-bottom: 4px !important;
    font-size: 12px !important;
    line-height: 1.45 !important;
    color: #64748b !important;
  }
}

.news-home-layout {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 320px !important;
  gap: 28px !important;
  align-items: start !important;
}

.news-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 24px !important;
  row-gap: 24px !important;
  column-gap: 24px !important;
  align-items: start !important;
  columns: initial !important;
  column-count: initial !important;
}

.news-grid > * {
  min-width: 0 !important;
  max-width: 100% !important;
}

.news-grid .news-card {
  width: 100% !important;
  margin: 0 !important;
}

@media (max-width: 1100px) {
  .news-home-layout {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }

  .news-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 22px !important;
    row-gap: 22px !important;
    column-gap: 22px !important;
  }
}

@media (max-width: 720px) {
  .news-home-layout {
    gap: 22px !important;
  }

  .news-grid {
    grid-template-columns: 1fr !important;
    gap: 18px !important;
    row-gap: 18px !important;
    column-gap: 18px !important;
  }
}

/* Tablet:
   the tablet experience stays on a mobile-first structure with more room.
   It must not switch to a compressed desktop layout at 768px. */
@media (min-width: 768px) and (max-width: 1024px) {
  .shell-main,
  .main-content,
  .page-content,
  #pageMain,
  #app-view > .shell-main,
  #app-view > .shell-main > main,
  #app-view .shell-content {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
  }

  .page-inner,
  .news-page-inner,
  .documents-page-inner,
  .bureau-page-inner,
  .commissions-page-inner,
  .tools-page-inner,
  .knowledge-page-inner,
  .knowledge-qa-page,
  .cotech-page-inner,
  .agenda-page-inner,
  .directory-page-inner,
  .messages-page-inner,
  #view-knowledge .knowledge-qa-page,
  #view-tools .tools-page-inner,
  #view-bureau .bureau-page-inner,
  #view-commissions .commissions-page-inner {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 24px !important;
    padding-right: 24px !important;
    overflow-x: hidden !important;
  }

  .topbar-actions {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) auto auto !important;
    align-items: center !important;
    gap: 12px !important;
  }

  .header-search-form,
  #app-view .header-search-form {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .mobile-nav-toggle {
    display: inline-flex !important;
  }

  .hamburger,
  .mobile-menu-btn,
  .mobile-drawer-toggle,
  .menu-toggle,
  .shell-menu-btn,
  .mobile-nav-toggle,
  #mobile-nav-toggle {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    min-height: 48px !important;
    border: 0 !important;
    border-radius: 14px !important;
    background: #24449b !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(36, 68, 155, 0.12) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 48px !important;
    padding: 0 !important;
    cursor: pointer !important;
    transition:
      background-color 0.2s ease,
      transform 0.15s ease,
      box-shadow 0.2s ease !important;
  }

  .hamburger:hover,
  .mobile-menu-btn:hover,
  .mobile-drawer-toggle:hover,
  .menu-toggle:hover,
  .shell-menu-btn:hover,
  .mobile-nav-toggle:hover,
  #mobile-nav-toggle:hover {
    background: #1e3a8a !important;
    color: #fff !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 14px rgba(36, 68, 155, 0.16) !important;
  }

  .hamburger span,
  .mobile-menu-btn span,
  .menu-toggle span,
  .mobile-nav-toggle-lines span,
  #mobile-nav-toggle .mobile-nav-toggle-lines span {
    width: 17px !important;
    height: 2px !important;
    border-radius: 999px !important;
    background: #fff !important;
  }

  #app-tabs.tabs {
    display: none !important;
  }

  .news-home-layout,
  .knowledge-layout,
  .knowledge-main-layout,
  .knowledge-qa-page {
    grid-template-columns: 1fr !important;
  }

  .knowledge-left-rail,
  .knowledge-right-rail {
    display: none !important;
  }

  .featured-card-grid,
  .directory-grid,
  #view-documents .documents-folder-grid,
  .documents-folders-grid,
  #view-cotech .cotech-video-grid,
  .cotech-video-grid,
  #view-prevention-directory .prevention-directory-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .news-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 22px !important;
    row-gap: 22px !important;
    column-gap: 22px !important;
  }

  #view-news .news-home-layout,
  #view-news .news-grid {
    grid-template-columns: 1fr !important;
  }

  #view-news .news-page-head {
    align-items: flex-start !important;
    flex-direction: column !important;
  }

  #view-news .news-top-actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
    align-items: stretch !important;
    gap: 12px !important;
    width: 100% !important;
  }

  #view-news .row-between {
    display: grid !important;
    grid-template-columns: 1fr !important;
    align-items: stretch !important;
    gap: 14px !important;
  }

  #view-news .row-between > h3 {
    margin: 0 !important;
  }

  #view-news .news-source-filter,
  #view-news .news-source-filter select,
  #view-news .news-add-btn,
  #view-news #toggle-news-form {
    width: 100% !important;
    min-width: 0 !important;
  }

  #view-news .news-add-btn,
  #view-news #toggle-news-form {
    justify-content: center !important;
    margin-right: 0 !important;
  }

  #view-news .news-source-filter {
    display: grid !important;
    gap: 6px !important;
    margin: 0 !important;
  }

  #view-news .news-source-filter span {
    font-size: 13px !important;
    line-height: 1.3 !important;
  }

  #view-news #toggle-news-form:not(.hidden) {
    display: inline-flex !important;
    align-items: center !important;
  }

  #view-news .news-featured-card {
    grid-template-columns: 1fr !important;
    min-height: 0 !important;
    height: auto !important;
  }

  #view-news .news-featured-media {
    height: 220px !important;
    min-height: 0 !important;
  }

  #view-news .news-featured-body {
    gap: 16px !important;
    padding: 16px !important;
  }

  #view-news .news-featured-footer {
    align-items: stretch !important;
    flex-direction: column !important;
  }

  #view-news .news-featured-footer .news-card-actions {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    margin-top: 14px !important;
    padding-top: 10px !important;
    border-top: 1px solid #f1f5f9 !important;
  }

  #view-news .news-featured-read {
    margin-left: auto !important;
    margin-right: auto !important;
    align-self: center !important;
    justify-content: center !important;
    text-align: center !important;
    width: auto !important;
  }

  #view-news .news-featured-read-desktop-label {
    display: none !important;
  }

  #view-news .news-featured-read-mobile-label {
    display: inline !important;
  }

  #view-documents .documents-filter-grid,
  .documents-filter-grid,
  #view-cotech .cotech-sort-tabs,
  .knowledge-sort-tabs {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  #view-documents .documents-filter-grid,
  .documents-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .mobile-topbar,
  .shell-mobile-topbar,
  .topbar,
  #app-view .topbar {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow: visible !important;
  }

  .mobile-topbar-title,
  .shell-title,
  .brand-title,
  #header-app-title {
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .card,
  .panel,
  .section-card,
  .news-card,
  .documents-card,
  .bureau-next-card,
  .bureau-calendar-panel,
  .commission-profile-card,
  .commission-documents-panel,
  .knowledge-question-card,
  .cotech-video-card {
    max-width: 100% !important;
    min-width: 0 !important;
  }
}

/* Responsive reference:
   - mobile portrait: @media (max-width: 767px) and (orientation: portrait)
   - tablette: @media (min-width: 768px) and (max-width: 1024px)
   - mobile paysage: @media (max-width: 932px) and (orientation: landscape)
   - desktop: @media (min-width: 1025px)
   Landscape overrides stay after tablet/mobile blocks so recent iPhone landscape widths
   do not fall back to tablet-like layouts that are too wide. */
@media (max-width: 932px) and (orientation: landscape) {
  .shell-main,
  .main-content,
  .page-content,
  #pageMain,
  #app-view > .shell-main,
  #app-view > .shell-main > main,
  #app-view .shell-content,
  #view-featured,
  #view-news,
  #view-documents,
  #view-knowledge,
  #view-commissions,
  #view-cotech,
  #view-agenda,
  #view-messages,
  #view-directory,
  #view-bureau,
  #view-tools {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
  }

  .page-inner,
  .news-page-inner,
  .documents-page-inner,
  .bureau-page-inner,
  .commissions-page-inner,
  .tools-page-inner,
  .knowledge-page-inner,
  .knowledge-qa-page,
  .cotech-page-inner,
  .agenda-page-inner,
  .directory-page-inner,
  .messages-page-inner,
  #view-knowledge .knowledge-qa-page,
  #view-tools .tools-page-inner,
  #view-bureau .bureau-page-inner,
  #view-commissions .commissions-page-inner {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
    overflow-x: hidden !important;
  }

  .mobile-topbar,
  .shell-mobile-topbar,
  .topbar,
  #app-view .topbar {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow: visible !important;
  }

  .global-search,
  .shell-search,
  .mobile-search,
  .topbar-search,
  .header-search-form,
  #app-view .header-search-form {
    width: calc(100% - 32px) !important;
    max-width: calc(100% - 32px) !important;
    min-width: 0 !important;
    margin-left: 16px !important;
    margin-right: 16px !important;
  }

  .news-home-layout,
  .featured-card-grid,
  .directory-grid,
  #view-documents .documents-folder-grid,
  .documents-folders-grid,
  #view-cotech .cotech-video-grid,
  .cotech-video-grid,
  .knowledge-layout,
  .knowledge-main-layout,
  .knowledge-qa-page,
  #view-prevention-directory .prevention-directory-grid {
    grid-template-columns: 1fr !important;
  }

  .knowledge-left-rail,
  .knowledge-right-rail {
    display: none !important;
  }

  #view-cotech .cotech-sort-tabs,
  .knowledge-sort-tabs,
  #view-documents .documents-filter-grid,
  .documents-filter-grid {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }
}

/* Preserve shared components outside the annuaire scope. */
[data-annuaire-hidden] { display: none !important; }

/* Annuaire header: one identity block, one account menu. */
#app-view .topbar {
  display: flex !important;
  justify-content: space-between;
  align-items: center;
  gap: 1rem !important;
}
#app-view .topbar-identity {
  flex: 1 1 auto !important;
  width: auto !important;
  min-width: 0;
}
#app-view .topbar-actions {
  flex: 0 1 auto;
  margin-left: auto;
  min-width: 0;
}
#app-view #header-app-title {
  text-align: left;
  white-space: normal !important;
  overflow-wrap: anywhere;
}
#app-view .user-header-line,
#app-view .user-menu-wrap { min-width: 0; }
#app-view #header-user-menu {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: auto;
  max-width: 100%;
  height: auto;
  min-height: 44px;
  padding: 0.35rem 0.65rem;
  border-radius: 0.75rem;
  color: var(--primary, #174f78);
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}
#app-view #header-user-menu .header-avatar-stack {
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
}
#app-view #header-user-menu #user-badge {
  display: block !important;
  max-width: 15rem;
  margin: 0;
  color: inherit;
  font-weight: 600;
}
#app-view #header-user-menu > svg { width: 16px; height: 16px; flex-shrink: 0; }
#app-view #header-user-menu:focus-visible,
#app-view #menu-logout:focus-visible {
  outline: 2px solid var(--primary, #174f78);
  outline-offset: 3px;
}
@media (max-width: 640px) {
  #app-view .topbar { flex-wrap: wrap; gap: 0.5rem !important; }
  #app-view .topbar-identity { flex-basis: 100% !important; }
  #app-view .topbar-actions { max-width: 100%; }
  #app-view #header-user-menu #user-badge { max-width: min(15rem, 55vw); }
}
#app-view .topbar .header-branding {
  position: static !important;
  left: auto !important;
  transform: none !important;
  justify-content: flex-start !important;
  max-width: 100% !important;
  pointer-events: auto !important;
}
#app-view .topbar #header-app-title { text-align: left !important; }

/* Independent partner / organization contribution forms share one scroll area. */
#prevention-directory-modal[data-mode="edit"] > .prevention-directory-dialog {
  overflow-y: auto;
  display: block;
}
#prevention-directory-modal[data-mode="edit"] .prevention-directory-form {
  overflow: visible;
}
.partner-edit-heading { margin: 20px 20px 0; color: #1e3a8a; }
.partner-organization-experiences { margin: 0 20px 20px; min-width: 0; }
.partner-organization-experiences h3 { margin: 0; color: #1e3a8a; }
.organization-experience-select {
  display: block;
  width: 100%;
  min-width: 0;
  margin-top: 6px;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  color: #0f172a;
}
.prevention-experience-inline .prevention-directory-form { padding: 0; background: transparent; }
.prevention-experience-inline [hidden],
.prevention-directory-experience-modal [hidden] { display: none !important; }



/* All button overrides are scoped to the shared-mutual dialog. */
#shared-organization-dialog {
  width: min(480px, calc(100vw - 24px));
  box-sizing: border-box;
  max-height: calc(100dvh - 24px);
  overflow: auto;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
}
#shared-organization-dialog::backdrop { background: rgba(15,23,42,.45); }
#shared-organization-dialog form { display: grid; gap: 8px; min-width: 0; }
#shared-organization-dialog h2 { margin: 0 0 4px; font-size: 1.25rem; line-height: 1.3; }
#shared-organization-dialog p { margin: 0; line-height: 1.45; overflow-wrap: anywhere; }
#shared-organization-dialog .feedback:empty { display: none; }
#shared-organization-dialog input { width: 100%; min-width: 0; padding: 10px; border: 1px solid var(--line); border-radius: calc(var(--radius) / 2); }
#shared-organization-dialog .shared-organization-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
#shared-organization-dialog button {
  display: inline-flex; align-items: center; justify-content: center;
  width: auto; max-width: 100%; min-height: 40px; padding: 8px 12px;
  border: 1px solid var(--accent); border-radius: calc(var(--radius) / 2);
  font: inherit; font-size: .875rem; font-weight: 600; line-height: 1.3;
  white-space: normal; overflow-wrap: anywhere; cursor: pointer;
  background: transparent; color: var(--accent); box-shadow: none; transform: none;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
#shared-organization-dialog button:hover,
#shared-organization-dialog button:active { transform: none; box-shadow: none; filter: none; }
#shared-organization-dialog .shared-primary { background: var(--text); border-color: var(--text); color: var(--surface); }
#shared-organization-dialog .shared-primary:hover:not(:disabled) { background: var(--accent); border-color: var(--accent); color: var(--surface); }
#shared-organization-dialog .shared-primary:active:not(:disabled) { background: var(--text); border-color: var(--text); color: var(--surface); }
#shared-organization-dialog .shared-secondary:hover:not(:disabled) { background: var(--surface-strong); color: var(--text); border-color: var(--accent); }
#shared-organization-dialog .shared-secondary:active:not(:disabled) { background: var(--accent-soft); color: var(--text); border-color: var(--text); }
#shared-organization-dialog .shared-logout { background: color-mix(in srgb, var(--danger) 8%, var(--surface)); border-color: var(--danger); color: var(--danger); }
#shared-organization-dialog .shared-logout:hover:not(:disabled) { background: color-mix(in srgb, var(--danger) 14%, var(--surface)); color: var(--danger); border-color: var(--danger); }
#shared-organization-dialog .shared-logout:active:not(:disabled) { background: color-mix(in srgb, var(--danger) 20%, var(--surface)); color: var(--danger); border-color: var(--danger); }
#shared-organization-dialog button:focus-visible,
#shared-organization-dialog input:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
#shared-organization-dialog button:disabled { background: var(--surface-strong); color: var(--text); border-color: var(--muted); opacity: 1; cursor: not-allowed; }
#shared-organization-dialog footer { margin-top: 4px; padding-top: 8px; border-top: 1px solid var(--line); }
#shared-organization-dialog [data-shared-confirmation] { padding: 10px; border: 1px solid var(--line); border-radius: calc(var(--radius) / 2); background: var(--surface); }
#shared-organization-dialog [data-shared-confirmation] p { margin-bottom: 8px; }
@media (max-width: 400px) {
  #shared-organization-dialog { padding: 14px; }
  #shared-organization-dialog [data-shared-confirm-actions] { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #shared-organization-dialog [data-shared-confirm-actions] button { min-width: 0; padding: 8px; }
}
#shared-organization-badge { display: block; font-size: 11px; }
.prevention-creator { display: block; color: #64748b; font-size: 11px; margin-top: 4px; }

/* Shared declaration and experience choices reuse the existing form controls. */
#shared-organization-dialog input { width: 100%; box-sizing: border-box; }
.prevention-directory-experience-form fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.prevention-directory-experience-form legend { margin-bottom: .5rem; font-weight: 600; }
.prevention-directory-experience-form .prevention-check-chip input:focus-visible + span { outline: 2px solid #1e3a8a; outline-offset: 3px; }
.prevention-directory-experience-form .prevention-check-chip input:disabled + span { cursor: default; opacity: .7; }
.prevention-directory-experience-form .prevention-check-chip span { overflow-wrap: anywhere; }

#shared-mutual-options { list-style: none; padding: 4px; margin: 4px 0 12px; max-height: 220px; overflow-y: auto; border: 1px solid #dbe7f5; border-radius: 8px; background: #fff; }
#shared-mutual-options [role="option"] { padding: 12px; cursor: pointer; overflow-wrap: anywhere; }
#shared-mutual-options [aria-selected="true"], #shared-mutual-options [role="option"]:hover { background: #eef4fb; color: #1e3a8a; }


/* Compact directory cards; the six criterion rows remain in the detail view. */
#view-prevention-directory .prevention-partner-card { gap: 12px; padding: 16px; align-content: start; }
#view-prevention-directory .prevention-partner-top h3 { margin-bottom: 7px; }
#view-prevention-directory .prevention-partner-details { gap: 5px; }
#view-prevention-directory .prevention-card-rating { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px 10px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-strong); color: var(--text); }
#view-prevention-directory .prevention-card-rating .prevention-stars { font-size: 19px; letter-spacing: 1px; }
#view-prevention-directory .prevention-card-rating strong { font-size: 18px; font-weight: 700; }
#view-prevention-directory .prevention-card-rating > span:last-child { color: var(--muted); font-size: 12px; }
#view-prevention-directory .prevention-partner-footer { gap: 10px; align-items: flex-end; }
#view-prevention-directory .prevention-partner-votes { gap: 5px 12px; line-height: 1.35; }
@media (max-width: 720px) {
  #view-prevention-directory .prevention-partner-card { padding: 15px; }
  #view-prevention-directory .prevention-partner-footer { align-items: stretch; }
  #view-prevention-directory .prevention-partner-link { align-self: flex-start; }
}

#view-prevention-directory .prevention-partner-advice p { margin: 0; line-height: 1.55; }
#view-prevention-directory .prevention-partner-advice .prevention-partner-rework { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); color: var(--muted); }
#view-prevention-directory .prevention-partner-rework strong { color: var(--text); }

/* Annuaire form cancel controls: a restrained danger-colored secondary action. */
#view-prevention-directory .prevention-directory-form-cancel,
#view-prevention-directory .prevention-reserve-cancel,
.prevention-directory-modal .prevention-directory-form-cancel {
  background: transparent;
  color: var(--danger);
  border: 1px solid var(--danger);
  border-radius: 10px;
  min-height: 40px;
  padding: 9px 20px;
  box-shadow: none;
  transform: none;
}
.prevention-directory-modal .prevention-directory-form-submit {
  min-height: 40px;
}
#view-prevention-directory .prevention-directory-form-cancel:hover:not(:disabled),
#view-prevention-directory .prevention-reserve-cancel:hover:not(:disabled),
.prevention-directory-modal .prevention-directory-form-cancel:hover:not(:disabled) {
  background: color-mix(in srgb, var(--danger) 9%, var(--surface));
  color: var(--danger);
  border-color: var(--danger);
  box-shadow: none;
  transform: none;
  filter: none;
}
#view-prevention-directory .prevention-directory-form-cancel:active:not(:disabled),
#view-prevention-directory .prevention-reserve-cancel:active:not(:disabled),
.prevention-directory-modal .prevention-directory-form-cancel:active:not(:disabled) {
  background: color-mix(in srgb, var(--danger) 15%, var(--surface));
  color: var(--danger);
  border-color: var(--danger);
}
#view-prevention-directory .prevention-directory-form-cancel:focus-visible,
#view-prevention-directory .prevention-reserve-cancel:focus-visible,
.prevention-directory-modal .prevention-directory-form-cancel:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--danger) 35%, var(--surface));
  outline-offset: 2px;
}

/* Keep the global rating, stars and count on one unboxed line. */
#view-prevention-directory .prevention-card-rating {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 4px 9px;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  white-space: nowrap;
}
#view-prevention-directory .prevention-card-rating .prevention-stars { color: #d97706; }
#view-prevention-directory .prevention-card-rating strong { color: var(--text); }
#view-prevention-directory .prevention-card-rating > span:last-child { color: var(--muted); }

#view-prevention-directory .prevention-directory-toolbar-controls {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  min-width: 0;
}
#view-prevention-directory .prevention-directory-toolbar-controls .prevention-directory-sort {
  flex: 1 1 auto;
  min-width: 0;
}
#view-prevention-directory .prevention-directory-filter-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  gap: 7px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--accent);
  border-radius: 14px;
  background: var(--surface);
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
#view-prevention-directory .prevention-directory-filter-button svg {
  width: 16px;
  height: 16px;
}
#view-prevention-directory .prevention-directory-filter-button:hover,
#view-prevention-directory .prevention-directory-filter-button[aria-expanded="true"] {
  background: var(--accent-soft);
  color: var(--text);
}
#view-prevention-directory .prevention-directory-filter-button:focus-visible,
#view-prevention-directory .prevention-directory-filter-clear:focus-visible,
#view-prevention-directory .prevention-directory-filter-field select:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
#view-prevention-directory .prevention-directory-filter-panel {
  margin: 0 0 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}
#view-prevention-directory .prevention-directory-filter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
#view-prevention-directory .prevention-directory-filter-field {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}
#view-prevention-directory .prevention-directory-filter-field select {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 0 44px 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 20px center;
  background-size: 14px 14px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  color: var(--text);
  font: inherit;
  font-size: 14px;
}
#view-prevention-directory .prevention-directory-filter-clear {
  margin-top: 14px;
  padding: 7px 10px;
  border: 1px solid color-mix(in srgb, var(--danger) 32%, var(--surface));
  border-radius: 8px;
  background: color-mix(in srgb, var(--danger) 7%, var(--surface));
  color: var(--danger);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
#view-prevention-directory .prevention-directory-filter-clear:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--danger) 48%, var(--surface));
  background: color-mix(in srgb, var(--danger) 14%, var(--surface));
  color: var(--danger);
}
#view-prevention-directory .prevention-directory-filter-clear:disabled {
  color: var(--muted);
  cursor: default;
}

/* The directory cards are keyboard- and pointer-activatable surfaces. */
#view-prevention-directory .prevention-partner-card { cursor: pointer; }

@media (min-width: 1025px) {
  #view-prevention-directory .prevention-directory-filter-button { min-height: 50px; }
}
@media (max-width: 720px) {
  #view-prevention-directory .prevention-directory-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  #view-prevention-directory .prevention-directory-toolbar-controls { gap: 8px; }
  #view-prevention-directory .prevention-directory-filter-button { padding: 0 10px; }
  #view-prevention-directory .prevention-directory-filter-panel { padding: 14px; }
  #view-prevention-directory .prevention-directory-filter-grid { grid-template-columns: 1fr; }
}
