:root {
  --primary-color: #1B1C89;
  --secondary-color: #ffbc34;
  --accent-color: #cc4c25;
  --background-light: #F2F2F2;
  --border-color: #cbd5e1;
  --white: #FFFFFF;
  /* Body text on public screens is sized as base * this, so one number tunes readability. */
  --text-scale: 1.2;
}

body {
  background-color: #dadee0 !important;
}

.login-shell {
  display: flex;
  justify-content: center;
  padding: 48px 0 32px;
  color: #111827;
}

.login-panel {
  width: 100%;
  max-width: 444px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.login-logo {
  width: 130px;
  height: auto;
  margin-bottom: 14px;
}

.login-title {
  margin: 0 0 4px;
  color: #111827;
  font-size: calc(24px * var(--text-scale));
  font-weight: 400;
  line-height: 1.35;
  text-align: center;
}

.login-subtitle {
  margin: 0 0 8px;
  color: #111827;
  font-size: calc(20px * var(--text-scale));
  font-weight: 400;
  line-height: 1.45;
  text-align: center;
}

.login-form {
  width: 100%;
  margin-top: 8px;
}

.login-field {
  margin-top: 16px;
}

.login-field label {
  display: block;
  margin-bottom: 4px;
  color: rgba(0, 0, 0, 0.6);
  font-size: calc(12px * var(--text-scale));
  line-height: 1;
}

.login-field input {
  width: 100%;
  min-height: 56px;
  border: 1px solid rgba(0, 0, 0, 0.23);
  border-radius: 4px;
  background: #fff;
  padding: 16.5px 14px;
  color: #111827;
  font-size: calc(16px * var(--text-scale));
  line-height: 1.4375em;
}

.login-field input:hover {
  border-color: rgba(0, 0, 0, 0.87);
}

.login-field input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 1px var(--primary-color);
  outline: none;
}

.login-validation {
  display: block;
  min-height: 18px;
  margin-top: 4px;
  color: #b91c1c;
  font-size: calc(12px * var(--text-scale));
}

.login-submit {
  width: 100%;
  min-height: 42px;
  margin-top: 24px;
  margin-bottom: 16px;
  border: 0;
  border-radius: 4px;
  background: var(--primary-color);
  color: #fff;
  padding: 8px 22px;
  font-size: calc(14px * var(--text-scale));
  font-weight: 500;
  line-height: 1.75;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12);
}

.login-submit:hover {
  background: #15156a;
  box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.2), 0 4px 5px 0 rgba(0, 0, 0, 0.14), 0 1px 10px 0 rgba(0, 0, 0, 0.12);
}

.toast-provider {
  position: fixed;
  z-index: 80;
  display: grid;
  gap: 10px;
  width: min(460px, calc(100vw - 32px));
  pointer-events: none;
}

/* Where the stack sits; the choice comes from the "Toast:Position" setting. */
.toast-provider.is-top-right { top: 86px; right: 24px; }
.toast-provider.is-top-left { top: 86px; left: 24px; }
.toast-provider.is-top-center { top: 86px; left: 50%; transform: translateX(-50%); }
.toast-provider.is-bottom-right { bottom: 24px; right: 24px; }
.toast-provider.is-bottom-left { bottom: 24px; left: 24px; }
.toast-provider.is-bottom-center { bottom: 24px; left: 50%; transform: translateX(-50%); }
.toast-provider.is-center { top: 50%; left: 50%; transform: translate(-50%, -50%); }

.toast-message {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  border: 1px solid;
  border-left-width: 5px;
  border-radius: 4px;
  background: #fff;
  padding: 12px;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.18);
  pointer-events: auto;
  transition: opacity 0.25s ease;
}

.toast-message.is-leaving {
  opacity: 0;
}

.toast-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-top: 1px;
}

.toast-icon svg {
  width: 20px;
  height: 20px;
}

.toast-content {
  min-width: 0;
}

.toast-content strong {
  display: block;
  margin-bottom: 3px;
  color: #111827;
  font-size: calc(14px * var(--text-scale));
  font-weight: 700;
  line-height: 1.2;
}

.toast-content p {
  margin: 0;
  color: #334155;
  font-size: calc(14px * var(--text-scale));
  line-height: 1.35;
}

.toast-ok-button {
  min-width: 44px;
  min-height: 30px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #fff;
  color: #111827;
  padding: 4px 10px;
  font-size: calc(12px * var(--text-scale));
  font-weight: 700;
  cursor: pointer;
}

.toast-ok-button:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.toast-message-success {
  border-color: #86efac;
  border-left-color: #16a34a;
}

.toast-message-success .toast-icon {
  color: #15803d;
}

.toast-message-error {
  border-color: #fecaca;
  border-left-color: #dc2626;
}

.toast-message-error .toast-icon {
  color: #b91c1c;
}

.toast-message-warning {
  border-color: #fde68a;
  border-left-color: #d97706;
}

.toast-message-warning .toast-icon {
  color: #b45309;
}

.toast-message-info {
  border-color: #bfdbfe;
  border-left-color: var(--primary-color);
}

.toast-message-info .toast-icon {
  color: var(--primary-color);
}

.public-navbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: #fff;
  box-shadow: 0 2px 7px rgba(15, 23, 42, 0.28);
}

.public-navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 56px;
}

.public-navbar-left {
  display: flex;
  align-items: center;
  gap: 28px;
  min-width: 0;
}

.public-navbar-logo {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  text-decoration: none;
}

.public-navbar-logo img {
  width: 132px;
  height: auto;
  display: block;
}

.public-navbar-links {
  display: flex;
  align-items: center;
  gap: 26px;
}

.public-navbar-links a,
.public-navbar-mobile a {
  color: var(--primary-color);
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
  text-decoration: none;
}

.public-navbar-links a:hover,
.public-navbar-mobile a:hover {
  color: #cc4c25;
}

.public-navbar-title {
  color: var(--primary-color);
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.public-navbar-right {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: 24px;
}

.public-navbar-user {
  position: relative;
}

.public-navbar-profile {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 220px;
  height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 4px;
  background: none;
  color: var(--primary-color);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.public-navbar-profile:hover,
.public-navbar-profile[aria-expanded="true"] {
  background: #f1f5f9;
}

.public-navbar-profile:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.public-navbar-profile svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

.public-navbar-profile span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.public-navbar-user-caret {
  width: 16px;
  height: 16px;
  transition: transform 0.15s ease;
}

.public-navbar-user-caret.is-open {
  transform: rotate(180deg);
}

.public-navbar-user-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 50;
  display: grid;
  min-width: 210px;
  padding: 6px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 10px 20px -8px rgba(15, 23, 42, 0.28);
}

.public-navbar-user-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 4px;
  color: #1f2937;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.public-navbar-user-menu a:hover,
.public-navbar-user-menu a:focus-visible {
  background: #f1f5f9;
  color: var(--primary-color);
}

.public-navbar-user-menu a svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: #64748b;
}

.public-navbar-user-menu a.is-signout,
.public-navbar-user-menu a.is-signout svg {
  color: #cc4c25;
}

.public-navbar-user-menu a.is-signout:hover {
  background: #fef2f2;
}

.public-navbar-menu {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--primary-color);
  cursor: pointer;
}

.public-navbar-menu:hover {
  background: #f1f5f9;
}

.public-navbar-menu svg {
  width: 24px;
  height: 24px;
}

.public-navbar-mobile {
  display: none;
  border-top: 1px solid #e2e8f0;
  padding: 10px 24px 14px;
  background: #fff;
}

.public-navbar-mobile span {
  color: var(--primary-color);
  font-size: 16px;
  font-weight: 700;
}

.category-index-breadcrumb {
  margin: 0 0 12px;
}

.category-index-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.category-index-toolbar > div {
  min-width: 0;
}

.category-reference-date {
  flex: 0 0 180px;
  width: 180px;
  max-width: 100%;
}

.category-reference-date .mui-outlined-input-wrapper {
  height: 40px;
  padding: 0 12px 0 14px;
}

.category-reference-date .mui-outlined-input-wrapper:hover {
  border-color: rgba(0, 0, 0, 0.87);
}

.category-reference-date .mui-outlined-input-wrapper:focus-within {
  padding: 0 11px 0 13px;
}

.category-reference-date .mui-outlined-label {
  left: 9px;
  padding: 0 5px;
  font-size: calc(12px * var(--text-scale));
  font-weight: 400;
  line-height: 1.4375;
}

.category-reference-date .mui-input-field {
  font-size: calc(16px * var(--text-scale)) !important;
  font-family: Roboto, Helvetica, Arial, sans-serif;
  letter-spacing: 0.00938em;
}

.category-reference-date-icon {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  margin-left: 8px;
  color: rgba(0, 0, 0, 0.54);
}

.category-index-toolbar .mui-toggle-group {
  height: 40px;
}

.category-index-toolbar .mui-toggle-button {
  padding: 0 7px;
  font-weight: 500;
  letter-spacing: 0.02857em;
}

.category-row-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.category-row {
  flex: 1;
  display: flex;
  align-items: stretch;
  min-width: 0;
  border: 1px solid #d1d1d1;
  border-radius: 4px;
  background-color: #fafafa;
  color: #1b1c89;
  font-family: Roboto, Helvetica, Arial, sans-serif;
  font-size: calc(14px * var(--text-scale));
  text-decoration: none;
  transition: all 0.2s ease;
}

.category-row:hover {
  background-color: #f5f5f5;
  border-color: #1b1c89;
  box-shadow: 0 2px 8px rgba(27, 28, 137, 0.12);
}

.category-row:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 1px;
}

.category-row-number {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  min-width: 115px;
  padding: 6px 12px 6px 16px;
  font-weight: 700;
  line-height: 1.5;
}

.category-row-title {
  display: flex;
  align-items: center;
  flex: 1;
  padding: 6px 16px;
  border-left: 1px solid #e2e8f0;
  line-height: 1.4;
}

.admin-version-number {
  min-width: 160px;
}

.admin-version-title {
  gap: 16px;
}

.admin-version-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.admin-version-meta {
  display: flex;
  flex-wrap: wrap;
  color: #808080;
  font-size: calc(12px * var(--text-scale));
  line-height: 1.4;
}

.admin-version-meta > span + span::before {
  content: "\00B7";
  margin: 0 8px;
}

.admin-version-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  font-size: calc(0.8125rem * var(--text-scale));
  font-weight: 700;
  white-space: nowrap;
}

.admin-version-status svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.admin-version-status.is-working {
  color: #e67e22;
}

.admin-version-status.is-current {
  color: #2e7d32;
}

.admin-version-status.is-published {
  color: rgba(0, 0, 0, 0.3);
}

.admin-create-page {
  color: #1f2937;
}

.admin-create-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.admin-create-header h2 {
  margin: 0;
  color: var(--primary-color);
  font-size: calc(20px * var(--text-scale));
  font-weight: 700;
}

.admin-create-header p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: calc(14px * var(--text-scale));
}

.admin-create-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  align-items: start;
  gap: 20px;
  max-width: 1200px;
}

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

.admin-create-sidebar {
  display: grid;
  gap: 12px;
}

.admin-sidebar-card {
  display: grid;
  gap: 8px;
  border: 1px solid #dbe3ea;
  border-radius: 4px;
  background: #f8fafc;
  padding: 14px 16px;
}

.admin-sidebar-tag {
  display: inline-flex;
  align-self: start;
  padding: 3px 9px;
  border-radius: 4px;
  font-size: calc(12px * var(--text-scale));
  font-weight: 700;
  width: fit-content;
}

.admin-sidebar-tag.major {
  background: #e0e7ff;
  color: var(--primary-color);
}

.admin-sidebar-tag.minor {
  background: #e0f2fe;
  color: #0369a1;
}

.admin-sidebar-tag.fix {
  background: #dcfce7;
  color: #15803d;
}

.admin-warning-card {
  display: flex;
  gap: 12px;
  border: 1px solid #fecaca;
  border-radius: 4px;
  background: #fef6f6;
  padding: 12px 14px;
}

.admin-warning-card svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: #dc2626;
}

.admin-warning-card strong {
  display: block;
  margin-bottom: 2px;
  color: #991b1b;
  font-size: calc(13px * var(--text-scale));
  font-weight: 700;
}

.admin-warning-card p {
  margin: 0;
  color: #7f1d1d;
  font-size: calc(13px * var(--text-scale));
  line-height: 1.45;
}

.admin-sidebar-card p {
  margin: 0;
  color: #4b5563;
  font-size: calc(13px * var(--text-scale));
  line-height: 1.45;
}

.admin-create-panel {
  display: grid;
  gap: 18px;
  max-width: 980px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #fff;
  padding: 18px;
}

.admin-create-grid,
.admin-context-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 14px;
}

.admin-create-field {
  display: grid;
  align-self: start;
  align-content: start;
  gap: 6px;
}

.admin-create-field > span,
.admin-context-item > span {
  color: var(--primary-color);
  font-size: calc(13px * var(--text-scale));
  font-weight: 700;
}

.admin-create-field input,
.admin-create-field select,
.admin-create-field textarea {
  width: 100%;
  min-height: 38px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #fff;
  color: #111827;
  font-size: calc(14px * var(--text-scale));
  padding: 7px 10px;
  font-family: inherit;
}

.admin-create-field input:focus,
.admin-create-field select:focus,
.admin-create-field textarea:focus {
  outline: 2px solid rgba(27, 28, 137, 0.14);
  border-color: var(--primary-color);
}

.admin-create-field small,
.admin-context-item small {
  color: #64748b;
  font-size: calc(12px * var(--text-scale));
}

@media (max-width: 900px) {
  .public-navbar-inner {
    min-height: 64px;
    padding: 0 20px;
  }

  .public-navbar-left {
    gap: 18px;
  }

  .public-navbar-logo img {
    width: 124px;
  }

  .public-navbar-links,
  .public-navbar-right,
  .public-navbar-title {
    display: none;
  }

  .public-navbar-menu {
    display: inline-flex;
  }

  .public-navbar-mobile {
    display: grid;
    gap: 12px;
  }
}

.admin-context-item {
  display: grid;
  gap: 4px;
  min-height: 74px;
  border: 1px solid #dbe3ea;
  border-radius: 4px;
  background: #f8fafc;
  padding: 10px 12px;
}

.admin-context-item strong {
  color: #111827;
  font-size: calc(14px * var(--text-scale));
}

.admin-create-alert {
  border: 1px solid #fecaca;
  border-radius: 4px;
  background: #fef2f2;
  color: #991b1b;
  padding: 10px 12px;
  font-size: calc(14px * var(--text-scale));
}

.admin-create-success {
  border: 1px solid #bbf7d0;
  border-radius: 4px;
  background: #f0fdf4;
  color: #166534;
  padding: 10px 12px;
  font-size: calc(14px * var(--text-scale));
}

.admin-create-secret {
  display: grid;
  gap: 8px;
  border: 1px solid #dbe3ea;
  border-radius: 4px;
  background: #f8fafc;
  padding: 14px 16px;
}

.admin-create-secret > span {
  color: var(--primary-color);
  font-size: calc(13px * var(--text-scale));
  font-weight: 700;
}

.admin-create-secret-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.admin-create-secret code {
  flex: 1 1 220px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #fff;
  color: #111827;
  padding: 9px 12px;
  font-family: ui-monospace, SFMono-Regular, "Cascadia Mono", Consolas, monospace;
  font-size: calc(18px * var(--text-scale));
  font-weight: 600;
  letter-spacing: 0.08em;
  user-select: all;
}

.admin-create-secret small {
  color: #64748b;
  font-size: calc(12px * var(--text-scale));
}

.admin-create-validation {
  color: #b91c1c;
  font-size: calc(12px * var(--text-scale));
}

.admin-create-editor {
  min-height: 180px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #fff;
}

.admin-create-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid #e2e8f0;
}

/* Keeps the header, its Back button and the panels on one shared edge. */
.admin-page-narrow {
  max-width: 980px;
}

.admin-page-narrow .admin-create-panel + .admin-create-panel {
  margin-top: 16px;
}

.account-security {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.account-security > div > span {
  display: block;
  color: var(--primary-color);
  font-size: calc(13px * var(--text-scale));
  font-weight: 700;
}

.account-security > div > p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: calc(13px * var(--text-scale));
}

.admin-user-options {
  display: grid;
  gap: 8px;
}

.admin-user-options > span {
  color: var(--primary-color);
  font-size: calc(13px * var(--text-scale));
  font-weight: 700;
}

.admin-user-role-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-user-role {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #fff;
  padding: 6px 10px;
  color: #1f2937;
  font-size: calc(13px * var(--text-scale));
  font-weight: 600;
  cursor: pointer;
}

.admin-user-role:has(input:checked) {
  border-color: var(--primary-color);
  background: #f5f3ff;
  color: var(--primary-color);
}

.admin-user-role input,
.admin-user-toggle input {
  width: 15px;
  height: 15px;
  accent-color: var(--primary-color);
}

.admin-user-toggle {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  column-gap: 8px;
  row-gap: 2px;
  width: fit-content;
}

.admin-user-toggle span {
  color: #1f2937;
  font-size: calc(13px * var(--text-scale));
  font-weight: 700;
}

.admin-user-toggle small {
  grid-column: 2;
  color: #64748b;
  font-size: calc(12px * var(--text-scale));
}

.yfirlink {
  color: var(--primary-color) !important;
  font-weight: bold !important;
  margin-left: 8px !important;
  text-decoration: none;
  font-size: calc(14px * var(--text-scale)) !important;
  display: inline-block;
}
.yfirlink:hover {
  text-decoration: underline !important;
  cursor: pointer !important;
}

.undirlink {
  font-weight: bold !important;
  margin-left: 24px !important;
  color: var(--accent-color) !important;
  text-decoration: none;
  font-size: calc(14px * var(--text-scale)) !important;
  display: inline-block;
}
.undirlink:hover {
  text-decoration: underline !important;
  cursor: pointer !important;
}

.yfir-name {
  color: var(--primary-color) !important;
  font-weight: bold !important;
  margin-bottom: 4px !important;
  padding-left: 24px !important;
  font-size: calc(14px * var(--text-scale)) !important;
}

.under-name {
  margin-bottom: 4px !important;
  color: var(--accent-color) !important;
  padding-left: 24px !important;
  font-size: calc(14px * var(--text-scale)) !important;
}

.undirlink-dont-show {
  margin-left: 24px !important;
  color: transparent !important;
  user-select: none !important;
  font-size: calc(14px * var(--text-scale)) !important;
  display: inline-block;
}

.spacing-row {
  border-bottom: 1px solid #e5e5e5 !important;
  margin-bottom: 8px !important;
  padding-bottom: 8px !important;
  display: flex !important;
  align-items: start !important;
}

.spacing-row:hover {
  background-color: #f7f7f7 !important;
}

.tariff-row-details {
  border: 1px solid #d1d1d1;
  border-radius: 4px;
  background: #fafafa;
  color: var(--primary-color);
  margin: 4px 0;
  overflow: hidden;
  transition: all 0.2s ease;
}

.tariff-section-title {
  display: flex;
  align-items: center;
  margin: 16px 0 8px;
  padding: 6px 16px;
  color: var(--primary-color);
  font-family: Roboto, Helvetica, Arial, sans-serif;
  font-size: calc(0.95rem * var(--text-scale));
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
}

.tariff-section-title > span:first-child {
  flex: 1;
  min-width: 0;
}

.tariff-row-details:not([open]):hover {
  border-color: var(--primary-color);
  box-shadow: 0 2px 8px rgba(27, 28, 137, 0.12);
}

.tariff-row-details.is-target {
  border-left: 4px solid var(--secondary-color);
}

.tariff-row-details[open] {
  border-bottom-left-radius: 4px;
  border-bottom-right-radius: 4px;
}

.tariff-row-summary {
  display: flex;
  align-items: stretch;
  padding: 0;
  list-style: none;
  cursor: pointer;
  user-select: none;
  background: #fafafa;
  color: var(--primary-color);
  font-family: Roboto, Helvetica, Arial, sans-serif;
  transition: background-color 0.2s ease;
}

.tariff-row-summary:hover {
  background: #f5f5f5;
}

.tariff-row-summary::-webkit-details-marker {
  display: none;
}

.tariff-row-summary::marker {
  content: "";
}

.tariff-under-row:hover,
.tariff-under-summary:hover {
  background: #dfdcdc;
  color: var(--accent-color);
}

.tariff-row-code {
  display: flex;
  align-items: center;
  min-width: 115px;
  flex-shrink: 0;
  padding: 6px 12px 6px 16px;
  color: var(--primary-color);
  font-family: Roboto, Helvetica, Arial, sans-serif;
  font-size: calc(0.875rem * var(--text-scale));
  font-weight: 700;
  line-height: 1.5;
}

.tariff-row-title {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  border-left: 1px solid #e2e8f0;
  padding: 6px 16px;
  color: inherit;
  font-size: calc(0.875rem * var(--text-scale));
  line-height: 1.4;
}

.tariff-row-title > span:not(.tariff-row-lock) {
  flex: 1;
  min-width: 0;
}

.tariff-row-expand {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  margin-left: 16px;
  color: currentColor;
}

.tariff-row-details[open] > .tariff-row-summary .tariff-row-expand {
  transform: rotate(180deg);
}

.tariff-row-lock {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 24px;
  flex: 0 0 auto;
  margin-left: 12px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--primary-color);
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.tariff-row-lock svg {
  width: 20px;
  height: 20px;
  display: block;
}

.tariff-row-lock:hover {
  background: transparent;
  color: var(--accent-color);
}

.tariff-row-lock.is-locked {
  cursor: default;
  opacity: 0.42;
}

.tariff-row-lock.is-locked:hover {
  color: var(--primary-color);
}

.tariff-row-panel {
  background: var(--white);
  padding: 0;
}

.notes-accordion {
  margin: 4px 0;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
  color: #666565;
  font-family: Roboto, Helvetica, Arial, sans-serif;
}

.notes-accordion > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 32px;
  padding: 0 12px;
  list-style: none;
  cursor: pointer;
  user-select: none;
  background: #f8fafc;
  color: var(--primary-color);
  font-size: calc(0.85rem * var(--text-scale));
  font-weight: 600;
}

.notes-accordion > summary::-webkit-details-marker {
  display: none;
}

.notes-accordion > summary::marker {
  content: "";
}

.notes-accordion-icon {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  color: var(--primary-color);
  transition: transform 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.notes-accordion[open] > summary .notes-accordion-icon {
  transform: rotate(180deg);
}

.notes-accordion-body {
  border-top: 1px solid #cbd5e1;
  background: #fff;
  color: #000;
  font-size: calc(0.85rem * var(--text-scale));
  line-height: 1.45;
  padding: 10px;
}

.notes-accordion-body p,
.notes-accordion-body div {
  margin: 0;
  font-size: calc(0.85rem * var(--text-scale));
  line-height: 1.45;
}

.tariff-row-panel > .tariff-comment {
  margin: 0;
  border-width: 0 0 1px;
  border-radius: 0;
}

.tariff-under-list {
  border-left: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  border-bottom-left-radius: 4px;
  border-bottom-right-radius: 4px;
  background: var(--white);
}

.tariff-under-row,
.tariff-under-summary {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 4px 16px;
  color: var(--primary-color);
  font-family: Roboto, Helvetica, Arial, sans-serif;
  font-size: calc(0.875rem * var(--text-scale));
  line-height: 1.4;
  cursor: pointer;
}

.tariff-under-details[open] > .tariff-under-summary {
  color: var(--accent-color);
}

.tariff-under-row {
  cursor: default;
}

.tariff-under-details {
  border: 0;
  background: var(--white);
}

.tariff-under-summary {
  list-style: none;
}

.tariff-under-summary::-webkit-details-marker {
  display: none;
}

.tariff-under-code {
  flex: 0 0 115px;
  font-weight: 700;
}

.tariff-under-code.is-hidden {
  color: transparent;
  user-select: none;
}

.tariff-under-text {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  gap: 8px;
  padding-left: 16px;
  padding-right: 8px;
}

.tariff-under-dashes {
  color: inherit;
  white-space: nowrap;
}

.tariff-under-dashes:empty {
  display: none;
}

.tariff-under-heading {
  flex: 1;
  min-width: 0;
  margin-left: 82px;
  color: inherit;
  font-size: calc(0.875rem * var(--text-scale));
  font-weight: 700;
}

.tariff-under-row .tariff-row-lock,
.tariff-under-summary .tariff-row-lock {
  margin-left: auto;
  margin-right: 10px;
}

.tariff-under-panel {
  margin: 0 16px;
  padding: 8px 0 16px;
  background: #fff;
}

.tariff-detail-permalink {
    color: inherit;
    text-decoration: none;
}

.tariff-detail-permalink:hover,
.tariff-detail-permalink:focus-visible {
    text-decoration: underline;
}

.tariff-detail-package-body .tariff-detail-divider {
  margin: 0 0 12px;
}

.tariff-detail-package-body .tariff-detail-divider span {
  font-size: calc(13px * var(--text-scale));
}

.tariff-package-scroll {
  margin-bottom: 16px;
  overflow-x: auto;
}

.tariff-package-scroll:last-child {
  margin-bottom: 0;
}

.tariff-package-table {
  border-collapse: collapse;
  font-size: calc(16px * var(--text-scale));
  text-align: left;
}

.tariff-package-table th {
  padding: 0 28px 6px 0;
  vertical-align: bottom;
  color: var(--primary-color);
  font-size: calc(14px * var(--text-scale));
  font-weight: 700;
  line-height: 1.4;
}

.tariff-package-table td {
  padding: 3px 28px 3px 0;
  color: #000;
  font-variant-numeric: tabular-nums;
}

.tariff-detail-sections {
  width: 100%;
  overflow: hidden;
}

.tariff-detail-row-main span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tariff-detail-row-body > * + * {
  margin-top: 4px;
}

.tariff-detail-row-warning .tariff-detail-row-code,
.tariff-detail-row-warning .tariff-detail-row-single-value {
  color: var(--accent-color);
}

.tariff-detail {
  margin: 0;
  border: 0;
  border-radius: 4px;
  background: #f2f2f2;
  padding: 18px 16px 22px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.22);
  color: #000;
  font-family: Roboto, Helvetica, Arial, sans-serif;
}

.tariff-detail-header {
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0;
  display: block;
  margin-bottom: 8px;
  color: #000;
}

.tariff-detail-title {
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  display: block;
  margin-bottom: 10px;
  color: var(--primary-color);
  font-size: calc(16px * var(--text-scale));
  font-weight: 700;
  line-height: 1.35;
}

.tariff-detail-meta {
  flex-wrap: wrap;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  color: #808080;
  font-size: calc(14px * var(--text-scale));
  line-height: 1.4;
}

.tariff-detail-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.tariff-detail-meta-item strong {
  font-weight: 700;
}

.tariff-detail-icon {
  width: 18px;
  height: 18px;
  color: #000;
}

.tariff-detail-comments,
.tariff-detail-package {
  margin: 0 0 14px;
  border: 1px solid #c5d5e8;
  border-radius: 3px;
  background: #f8fafc;
}

.tariff-detail-comments > summary,
.tariff-detail-package > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 34px;
  padding: 6px 12px;
  color: var(--primary-color);
  font-size: calc(14px * var(--text-scale));
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.tariff-detail-comments > summary::-webkit-details-marker,
.tariff-detail-package > summary::-webkit-details-marker {
  display: none;
}

.tariff-detail-comments > summary::after,
.tariff-detail-package > summary::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--primary-color);
  border-bottom: 2px solid var(--primary-color);
  transform: rotate(45deg);
}

.tariff-detail-comments[open] > summary::after,
.tariff-detail-package[open] > summary::after {
  transform: rotate(225deg);
}

.tariff-detail-comments-body,
.tariff-detail-package-body {
  border-top: 1px solid #dbe3ea;
  padding: 10px 12px 12px;
  color: #111827;
  font-size: calc(14px * var(--text-scale));
  line-height: 1.45;
}

.tariff-detail-comments-body > :first-child {
  margin-top: 0;
}

.tariff-detail-comments-body > :last-child {
  margin-bottom: 0;
}

.tariff-detail-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 382px));
  justify-content: center;
  gap: 8px;
  max-width: 780px;
  margin: 14px auto 10px;
}

.tariff-detail-info-card {
  border: 0;
  border-radius: 2px;
  background: #fff;
  padding: 10px 10px 9px;
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.22);
  color: #000;
  font-size: calc(14px * var(--text-scale));
  font-weight: 400;
}

.tariff-detail-info-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  min-height: 28px;
}

.tariff-detail-info-row span:first-child {
  color: var(--primary-color);
  font-weight: 700;
}

.tariff-detail-info-row span:last-child {
  text-align: right;
  color: #000;
  font-weight: 400;
}

.tariff-detail-rate-row span:last-child {
  display: inline-flex;
  justify-content: flex-end;
  gap: 6px;
  white-space: nowrap;
}

.tariff-detail-units {
  display: inline-flex;
  justify-content: flex-end;
  gap: 0;
}

.tariff-detail-net-hint {
  color: #e97451 !important;
}

.tariff-detail-section-title {
  margin: 8px 0 18px;
  color: var(--primary-color);
  font-size: calc(14px * var(--text-scale));
  font-weight: 700;
}

.tariff-detail-section {
  margin-bottom: 18px;
}

.tariff-detail-divider {
  display: flex;
  align-items: center;
  margin: 0 0 8px;
  gap: 10px;
  color: var(--primary-color);
  font-size: calc(14px * var(--text-scale));
  font-weight: 700;
}

.tariff-detail-divider::before,
.tariff-detail-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: #d8d8d8;
}

.tariff-detail-divider span {
  border-radius: 16px;
  background: #e0e0e0;
  padding: 6px 12px;
}

.tariff-detail-divider-warning span {
  background: #e0e0e0;
}

.tariff-detail-column-head {
  display: grid;
  align-items: center;
  margin-bottom: 2px;
  color: #000;
  font-size: calc(16px * var(--text-scale));
}

.tariff-detail-tollar-head {
  grid-template-columns: minmax(0, 1fr) 90px 120px;
  padding: 0 34px 0 48px;
}

.tariff-detail-column-head span:nth-child(2),
.tariff-detail-column-head span:nth-child(3) {
  text-align: right;
}

.tariff-detail-gjold-head {
  margin: 0 34px 4px 0;
  color: #000;
  font-size: calc(16px * var(--text-scale));
  text-align: right;
}

.tariff-detail-row {
  display: block;
  margin: 0;
  color: #000;
}

.tariff-detail-row > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 3px;
  list-style: none;
  cursor: pointer;
}

.tariff-detail-row > summary::-webkit-details-marker {
  display: none;
}

.tariff-detail-row > summary::marker {
  content: "";
}

.tariff-detail-row > summary:hover {
  background: #f2f2f2;
  box-shadow: 0 0 3px #949494;
}

.tariff-detail-row-main {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 16px;
  color: #000;
  font-size: calc(16px * var(--text-scale));
  line-height: 1.45;
}

.tariff-detail-row-code {
  flex-shrink: 0;
  min-width: 24px;
  color: var(--primary-color);
  font-size: calc(13px * var(--text-scale));
  font-weight: 700;
  white-space: nowrap;
}

.tariff-detail-row-values {
  display: grid;
  white-space: nowrap;
  grid-template-columns: 90px 120px;
  gap: 0;
  color: #000;
  font-size: calc(16px * var(--text-scale));
  font-weight: 400;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.tariff-detail-row-values span {
  text-align: right;
}

.tariff-detail-row-single-value {
  white-space: nowrap;
  min-width: 120px;
  color: #000;
  font-size: calc(16px * var(--text-scale));
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.tariff-detail-row-body {
  margin: 5px 8px 8px 48px;
  padding: 12px;
  border-radius: 3px;
  background: #fff;
  color: #000;
  font-size: calc(14px * var(--text-scale));
}

.tariff-detail-row-warning .tariff-detail-row-code {
  color: var(--primary-color);
}

.tariff-detail-row-warning .tariff-detail-row-single-value {
  color: #000;
}

.page-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.page-heading-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.page-heading,
.page-heading-parent {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  column-gap: 10px;
  row-gap: 2px;
  margin: 0;
  color: var(--primary-color);
  font-family: Roboto, Helvetica, Arial, sans-serif;
}

.page-heading {
  font-size: calc(16px * var(--text-scale));
  line-height: 1.5;
}

.page-heading-parent {
  font-size: calc(13px * var(--text-scale));
  line-height: 1.4;
  color: rgba(27, 28, 137, 0.75);
  text-decoration: none;
  transition: color 0.2s ease;
}

.page-heading-parent:hover {
  color: var(--primary-color);
}

.page-heading-number {
  flex: 0 0 auto;
  font-weight: 700;
  white-space: nowrap;
}

.page-heading-name {
  min-width: 0;
  font-weight: 400;
}

.page-heading-number + .page-heading-name::before {
  content: "\00B7";
  margin-right: 10px;
  font-weight: 700;
}

.page-actions-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  padding: 5px 15px;
  border: 1px solid var(--primary-color);
  border-radius: 4px;
  background: var(--primary-color);
  color: #fff;
  font-family: Roboto, Helvetica, Arial, sans-serif;
  font-size: calc(16px * var(--text-scale));
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.02857em;
  text-align: center;
  text-decoration: none;
  text-transform: none;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12);
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1), border-color 250ms cubic-bezier(0.4, 0, 0.2, 1), color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.tav-button:hover {
  border-color: var(--secondary-color);
  background: var(--secondary-color);
  color: #000;
}

.tav-button svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin-left: -2px;
}

.tav-button.is-outline,
.tav-button.is-neutral,
.tav-button.is-danger {
  background: #fff;
  box-shadow: none;
}

.tav-button.is-outline {
  color: var(--primary-color);
}

.tav-button.is-neutral {
  border-color: #cbd5e1;
  color: var(--primary-color);
}

.tav-button.is-danger {
  border-color: #fca5a5;
  color: #b91c1c;
}

.tav-button.is-outline:hover,
.tav-button.is-neutral:hover {
  border-color: var(--primary-color);
  background: #f2f2f2;
  color: #000;
}

.tav-button.is-danger:hover {
  border-color: #b91c1c;
  background: #fef2f2;
  color: #b91c1c;
}

.tav-button:disabled,
.tav-button[aria-disabled="true"] {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

.tav-button:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.vip-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 8px 0 12px;
}

.vip-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.vip-title-group h2 {
  color: var(--primary-color);
  font-size: calc(18px * var(--text-scale));
  font-weight: 700;
}

.vip-status,
.vip-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: calc(12px * var(--text-scale));
  font-weight: 700;
  white-space: nowrap;
}

.vip-status span {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
}

.vip-status.working,
.vip-badge.warning {
  color: #cf6502;
  background: rgba(207, 101, 2, 0.08);
}

.vip-status.published {
  color: #2e7d32;
  background: rgba(46, 125, 50, 0.08);
}

.vip-badge.info {
  color: #027cab;
  background: rgba(2, 124, 171, 0.08);
}

.vip-badge.danger {
  color: #c62828;
  background: rgba(198, 40, 40, 0.08);
}

.vip-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e2e8f0;
  color: #718096;
  font-size: calc(13px * var(--text-scale));
}

.vip-summary {
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #f8fafc;
  color: #4a5568;
  font-size: calc(14px * var(--text-scale));
}

.vip-summary strong {
  display: block;
  margin-bottom: 4px;
  color: var(--primary-color);
  font-size: calc(16px * var(--text-scale));
}

.vip-lock-form {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) minmax(280px, 2fr);
  gap: 12px;
  align-items: end;
  margin: 12px 0 16px;
}

.vip-field {
  display: grid;
  gap: 5px;
  color: #4a5568;
  font-size: calc(12px * var(--text-scale));
  font-weight: 700;
}

.vip-field select,
.vip-field input {
  width: 100%;
  min-height: 38px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #fff;
  color: #1f2937;
  font-size: calc(14px * var(--text-scale));
  font-weight: 500;
}

.vip-field select {
  padding: 7px 10px;
}

.vip-field input {
  padding: 7px 42px 7px 10px;
}

.vip-number-field {
  position: relative;
}

.vip-icon-submit {
  position: absolute;
  right: 3px;
  bottom: 3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--primary-color);
  cursor: pointer;
}

.vip-icon-submit:hover {
  background: #eef2ff;
}

.vip-icon-submit svg {
  width: 20px;
  height: 20px;
}

.vip-section-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 8px;
}

.vip-section-divider::before,
.vip-section-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: #e2e8f0;
}

.vip-section-divider span {
  border-radius: 999px;
  background: #ede9fe;
  color: var(--primary-color);
  padding: 3px 11px;
  font-size: calc(12px * var(--text-scale));
  font-weight: 700;
}

.vip-progress-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 8px;
}

.vip-row-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 22px;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #f8fafc;
  padding: 6px 12px;
  color: var(--primary-color);
  text-align: left;
}

.vip-row-main:hover {
  background: #f2f2f2;
}

.vip-row-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: calc(14px * var(--text-scale));
  font-weight: 700;
}

.vip-chevron {
  width: 20px;
  height: 20px;
  transition: transform 150ms ease;
}

.vip-chevron.open {
  transform: rotate(180deg);
}

.vip-row-actions {
  display: flex;
  align-items: center;
  align-self: center;
  gap: 8px;
}

.vip-row-actions .tav-button {
  width: calc(100px * var(--text-scale));
  min-height: 36px;
  padding-right: 10px;
  padding-left: 10px;
}

.vip-row-details {
  grid-column: 1 / -1;
  margin-top: -8px;
  padding: 12px;
  border: 1px solid #cbd5e1;
  border-top: 0;
  border-radius: 0 0 4px 4px;
  background: #fff;
  color: #4a5568;
  font-size: calc(14px * var(--text-scale));
}

.vip-footer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
}

.vip-empty {
  padding: 48px 24px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #fff;
  text-align: center;
}

.vip-empty.compact {
  margin: 16px 0;
  padding: 24px;
}

.vip-empty h3 {
  color: var(--primary-color);
  font-size: calc(20px * var(--text-scale));
  font-weight: 700;
}

.vip-empty p {
  margin: 6px 0 18px;
  color: #718096;
}

.vip-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.vip-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}

.vip-modal-card {
  position: relative;
  width: min(100%, 440px);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1);
  padding: 20px;
}

.vip-modal-card h3 {
  margin-bottom: 8px;
  color: var(--primary-color);
  font-size: calc(18px * var(--text-scale));
  font-weight: 700;
}

.vip-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}

@media (max-width: 767px) {
  .tariff-under-panel {
    margin: 0;
    padding: 8px 0 12px;
  }

  .tariff-detail {
    margin: 0;
    padding: 14px 10px 18px;
  }

  .tariff-detail-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .tariff-detail-info-grid {
    grid-template-columns: 1fr;
  }

  .tariff-detail-info-row {
    gap: 12px;
    padding: 3px 0;
  }

  .tariff-detail-info-row span:first-child {
    flex-shrink: 0;
  }

  .tariff-detail-row > summary {
    align-items: start;
    gap: 8px;
    padding: 4px 6px;
  }

  .tariff-detail-row-main {
    align-items: flex-start;
    gap: 8px;
    font-size: calc(14px * var(--text-scale));
    line-height: 1.4;
  }

  .tariff-detail-row-code {
    min-width: 20px;
    font-size: calc(12px * var(--text-scale));
    line-height: 1.65;
  }

  .tariff-detail-tollar-head {
    grid-template-columns: minmax(0, 1fr) 52px 60px;
    gap: 8px;
    padding: 0 6px;
    font-size: calc(14px * var(--text-scale));
  }

  .tariff-detail-tollar-head span:first-child {
    display: none;
  }

  .tariff-detail-tollar-head span:nth-child(2) {
    grid-column: 2;
  }

  .tariff-detail-row-values {
    grid-template-columns: 52px 60px;
    gap: 8px;
    font-size: calc(14px * var(--text-scale));
  }

  .tariff-detail-row-single-value {
    min-width: 0;
    font-size: calc(14px * var(--text-scale));
  }

  .tariff-detail-gjold-head {
    margin-right: 6px;
    font-size: calc(14px * var(--text-scale));
  }

  .tariff-detail-row-body {
    margin: 4px 0 8px 34px;
    padding: 10px;
  }

  .vip-header,
  .vip-footer-actions,
  .vip-progress-row,
  .vip-lock-form {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .vip-row-main {
    grid-template-columns: minmax(0, 1fr) 22px;
  }

  .vip-row-main .vip-badge {
    grid-column: 1 / -1;
    width: fit-content;
  }

  .vip-row-actions {
    justify-content: flex-start;
  }
}

.rules-container {
  margin-top: 8px !important;
  font-family: Roboto, Arial, sans-serif !important;
}

.rule-title {
  font-weight: bold !important;
  color: var(--primary-color) !important;
  font-size: calc(1.25rem * var(--text-scale)) !important;
  border-bottom: 1px solid #e5e5e5 !important;
  padding-bottom: 8px !important;
  margin-bottom: 8px !important;
}

.rule-subtitle {
  color: #666565 !important;
  margin-bottom: 16px !important;
  font-size: calc(1rem * var(--text-scale)) !important;
  padding-left: 8px !important;
}

.rule-item {
  display: block !important;
  margin-bottom: 20px !important;
  font-size: calc(1rem * var(--text-scale)) !important;
  color: #1b1c89 !important;
  font-weight: 500 !important;
  line-height: 1.5 !important;
  padding-left: 8px !important;
}

.rule-subitem-text {
  display: block !important;
  margin-top: 8px !important;
  margin-left: 24px !important;
  font-weight: normal !important;
  color: #666565 !important;
  font-size: calc(0.95rem * var(--text-scale)) !important;
  line-height: 1.5 !important;
}

.mui-outlined-input-wrapper {
  position: relative;
  border: 1px solid rgba(0, 0, 0, 0.23);
  border-radius: 4px;
  background-color: #fff;
  height: 48px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  transition: border-color 200ms cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
}
.mui-outlined-input-wrapper:focus-within {
  border-color: var(--primary-color) !important;
  border-width: 2px !important;
  padding: 0 13px;
}
.mui-outlined-label {
  position: absolute;
  left: 8px;
  top: -9px;
  background-color: #fff;
  padding: 0 4px;
  font-size: calc(11px * var(--text-scale));
  font-weight: 500;
  color: rgba(0, 0, 0, 0.6);
  font-family: Roboto, Helvetica, Arial, sans-serif;
  pointer-events: none;
}
.mui-outlined-input-wrapper:focus-within .mui-outlined-label {
  color: var(--primary-color) !important;
}
.mui-input-field {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  width: 100% !important;
  height: 100% !important;
  font-size: calc(15px * var(--text-scale)) !important;
  color: rgba(0, 0, 0, 0.87) !important;
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
}

.mui-toggle-group {
  display: inline-flex;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 4px;
  overflow: hidden;
  height: 36px;
  box-sizing: border-box;
}
.import-export-toggle {
  flex: 0 0 auto;
  width: max-content;
  max-width: 100%;
}
.mui-toggle-button {
  border: none;
  background-color: #fff;
  color: rgba(0, 0, 0, 0.54);
  padding: 0 16px;
  font-size: calc(13px * var(--text-scale));
  font-weight: 600;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 250ms, color 250ms;
  font-family: Roboto, Helvetica, Arial, sans-serif;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  flex: 0 0 auto;
  white-space: nowrap;
}
.mui-toggle-button:not(:last-child) {
  border-right: 1px solid rgba(0, 0, 0, 0.12);
}
.mui-toggle-button.active {
  background-color: rgba(0, 0, 0, 0.08) !important;
  color: rgba(0, 0, 0, 0.87) !important;
}
.mui-toggle-button:hover {
  background-color: rgba(0, 0, 0, 0.04);
}

.mui-checkbox-label {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  font-size: calc(14px * var(--text-scale));
  color: rgba(0, 0, 0, 0.87);
  font-family: Roboto, Helvetica, Arial, sans-serif;
  user-select: none;
}
.mui-checkbox {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(0, 0, 0, 0.54);
  border-radius: 2px;
  margin-right: 8px;
  outline: none;
  cursor: pointer;
  position: relative;
  transition: border-color 200ms, background-color 200ms;
  box-sizing: border-box;
  background-color: #fff;
}
.mui-checkbox:checked {
  border-color: var(--primary-color) !important;
  background-color: var(--primary-color) !important;
}
.mui-checkbox:checked::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 0px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.breadcrumb-container {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 4px 0;
  font-size: calc(14px * var(--text-scale));
  line-height: 1;
  color: #718096;
  font-weight: 600;
  font-family: Roboto, Helvetica, Arial, sans-serif;
  margin-bottom: 12px;
  user-select: none;
}
.breadcrumb-link {
  color: rgba(27, 28, 137, 0.75);
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}
.breadcrumb-link:hover {
  color: #1b1c89;
  text-decoration: none;
}
.breadcrumb-home-icon {
  width: 1.05rem;
  height: 1.05rem;
  flex: 0 0 auto;
}
.breadcrumb-separator {
  color: #a0aec0;
  font-weight: 500;
}

.tariff-edit-page {
  background: #fff;
  color: #000;
  padding: 10px 16px 32px;
  font-family: Roboto, Helvetica, Arial, sans-serif;
}

.tariff-edit-page h1 {
  color: #1b1c89;
  font-size: calc(20px * var(--text-scale));
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 12px;
}

.tariff-edit-validity {
  align-items: center;
  border-bottom: 1px solid #e2e8f0;
  color: #718096;
  display: flex;
  flex-wrap: wrap;
  font-size: calc(13px * var(--text-scale));
  gap: 20px;
  margin-bottom: 20px;
  padding-bottom: 13px;
}

.tariff-edit-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tariff-edit-top-row {
  align-items: flex-start;
  display: flex;
  gap: 16px;
  width: 100%;
}

.tariff-edit-field {
  display: flex;
  flex-direction: column;
  position: relative;
}

.tariff-edit-field.compact {
  flex: 0 0 160px;
}

.tariff-edit-field.grow {
  flex: 1 1 auto;
  min-width: 220px;
}

.tariff-edit-field.full {
  width: 100%;
}

.tariff-edit-field > span:first-child {
  background: #fff;
  color: #667085;
  font-size: calc(12px * var(--text-scale));
  left: 12px;
  line-height: 1;
  padding: 0 4px;
  position: absolute;
  top: -6px;
  z-index: 1;
}

.tariff-edit-field input,
.tariff-edit-field select {
  background: #fff;
  border: 1px solid #bdbdbd;
  border-radius: 4px;
  color: #111827;
  font-size: calc(16px * var(--text-scale));
  height: 40px;
  outline: none;
  padding: 8px 12px;
  width: 100%;
}

.tariff-edit-field select {
  appearance: auto;
}

.tariff-edit-field input:focus,
.tariff-edit-field select:focus {
  border-color: #1b1c89;
  box-shadow: 0 0 0 1px rgba(27, 28, 137, 0.15);
}

.tariff-edit-editor {
  background: #fff;
  border: 1px solid #bdbdbd;
  border-radius: 4px;
  min-height: 210px;
}

.tariff-edit-editor .ql-editor {
  font-size: calc(14px * var(--text-scale));
  min-height: 158px;
}

.tariff-edit-editor .ql-toolbar.ql-snow,
.tariff-edit-editor .ql-container.ql-snow {
  border: 0;
}

.tariff-edit-editor .ql-toolbar.ql-snow {
  border-bottom: 1px solid #d6d6d6;
}

.tariff-edit-actions {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-top: 0;
}

.tariff-edit-action-group {
  display: flex;
  gap: 8px;
}

.tariff-edit-alert {
  background: #fff1f2;
  border: 1px solid #fecdd3;
  border-radius: 4px;
  color: #9f1239;
  font-size: calc(14px * var(--text-scale));
  padding: 10px 12px;
}

.tariff-edit-validation {
  color: #cc4c25;
  font-size: calc(12px * var(--text-scale));
  margin-top: 4px;
}

.tariff-edit-dialog-backdrop {
  align-items: center;
  background: rgba(15, 23, 42, 0.35);
  bottom: 0;
  display: flex;
  justify-content: center;
  left: 0;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 1000;
}

.tariff-edit-dialog-backdrop[hidden] {
  display: none;
}

.tariff-edit-dialog {
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.24);
  max-width: 420px;
  padding: 20px;
  width: calc(100% - 32px);
}

.tariff-edit-dialog h2 {
  color: #1b1c89;
  font-size: calc(18px * var(--text-scale));
  font-weight: 700;
  margin: 0 0 12px;
}

.tariff-edit-dialog p {
  color: #4b5563;
  margin: 0 0 18px;
}

.tariff-edit-dialog-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

@media (max-width: 720px) {
  .tariff-edit-top-row {
    flex-direction: column;
  }

  .tariff-edit-field.compact,
  .tariff-edit-field.grow {
    flex-basis: auto;
    width: 100%;
  }

  .tariff-edit-actions {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .tariff-edit-action-group {
    justify-content: flex-end;
  }
}

.vip-inline-form {
    display: inline-flex;
    margin: 0;
}

[x-cloak] {
    display: none !important;
}

.change-display-note {
    margin: 0 0 1rem;
    padding: 0.625rem 0.875rem;
    border: 1px solid #f0c42b;
    border-left-width: 3px;
    background: #fdf8e7;
    border-radius: 4px;
    font-size: calc(0.8125rem * var(--text-scale));
    color: #6b5510;
}

.change-display-html {
    margin: 0;
    font-size: calc(0.875rem * var(--text-scale));
    color: #0f172a;
}

.change-display-kicker {
    margin: 0 0 0.25rem;
    font-size: calc(0.75rem * var(--text-scale));
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
}

.change-display-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
}

.change-compare-summary {
    margin: 0 0 1rem;
    font-size: calc(0.875rem * var(--text-scale));
    color: #334155;
}

.change-compare {
    width: 100%;
    margin: 0 0 1.5rem;
    border-collapse: collapse;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: calc(0.875rem * var(--text-scale));
    table-layout: fixed;
}

.change-compare th,
.change-compare td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
    vertical-align: top;
    color: #0f172a;
    overflow-wrap: anywhere;
}

.change-compare thead th {
    background: #f8fafc;
    font-size: calc(0.6875rem * var(--text-scale));
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    color: #64748b;
}

.change-compare thead th:first-child {
    width: 11rem;
}

.change-compare tbody th {
    font-weight: 600;
    color: #475569;
}

.change-compare-version {
    text-transform: none;
    letter-spacing: 0;
    font-weight: 400;
}

.change-compare tr.is-changed th,
.change-compare tr.is-changed td {
    background: #fdf8e7;
}

.change-compare tr.is-changed th {
    box-shadow: inset 3px 0 0 var(--secondary-color);
}

.change-compare tr.is-changed:not(.is-html) .change-compare-before {
    color: #a12d1a;
    text-decoration: line-through;
    text-decoration-color: rgba(161, 45, 26, 0.5);
}

.change-compare tr.is-changed:not(.is-html) .change-compare-after {
    color: #14532d;
    font-weight: 600;
}

.change-compare-hint {
    display: block;
    margin-top: 0.25rem;
    font-size: calc(0.75rem * var(--text-scale));
    font-weight: 400;
    color: #6b5510;
}

@media (max-width: 640px) {
    .change-compare thead th:first-child {
        width: 7rem;
    }
}

.dropdown-menu {
    position: fixed;
    z-index: 1000;
}

.dropdown-menu.hidden {
    display: none;
}

.lock-toggle-form {
    display: inline-flex;
    margin: 0;
    flex: 0 0 auto;
}

.lock-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    padding: 0 0.75rem;
    margin: 2px 0;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    color: #4b5563;
    cursor: pointer;
    transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}

.lock-toggle:hover {
    background: #f9fafb;
}

.lock-toggle.category-row-lock {
    margin: 0;
}

.lock-toggle svg {
    width: 1rem;
    height: 1rem;
}

.lock-toggle.is-locked {
    color: #1B1C89;
    border-color: #1B1C89;
    background: #f1f1fb;
}

.lock-toggle.is-locked:hover {
    background: #e4e4f7;
}

.lock-toggle:focus-visible,
.tariff-row-lock:focus-visible {
    outline: 2px solid #1B1C89;
    outline-offset: 2px;
}

button.tariff-row-lock {
    border: 0;
    background: transparent;
    padding: 0;
    font: inherit;
}

.language-switch {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 2px;
}

.language-switch-item {
    width: 45px;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 2px 0;
    opacity: 0.5;
    transition: opacity 0.15s ease-in-out;
}

.language-switch-item:hover {
    cursor: pointer;
    box-shadow: 0 0 3px #949494;
}

.language-switch-item.is-active {
    opacity: 1;
}

.language-switch-item svg {
    width: 25px;
    height: auto;
    display: block;
}

.scroll-to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 70;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: none;
    border-radius: 9999px;
    background-color: #1B1C89;
    color: #ffffff;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
    visibility: hidden;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 160ms ease, transform 160ms ease, visibility 160ms;
}

.scroll-to-top.is-visible {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background-color: #15156a;
}

.scroll-to-top:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px #1B1C89;
}

.scroll-to-top svg {
    width: 22px;
    height: 22px;
    display: block;
}

@media (max-width: 640px) {
    .scroll-to-top {
        right: 16px;
        bottom: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .scroll-to-top {
        transition: none;
        transform: none;
    }

    .scroll-to-top.is-visible {
        transform: none;
    }
}

@media print {
    .scroll-to-top {
        display: none;
    }
}

.error-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 48px 16px 64px;
  text-align: center;
  font-family: Roboto, Arial, sans-serif;
}

.error-page-code {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--primary-color);
}

.error-page-digit {
  font-size: 120px;
  font-weight: 400;
  line-height: 1;
  color: var(--background-light);
  text-shadow: 5px 5px 5px var(--primary-color);
}

.error-page-face {
  width: 120px;
  height: 120px;
  flex-shrink: 0;
}

.error-page-title {
  margin: 16px 0 0;
  font-size: calc(20px * var(--text-scale));
  font-weight: 700;
  color: var(--primary-color);
}

.error-page-text {
  max-width: 40rem;
  margin: 0;
  font-size: calc(15px * var(--text-scale));
  color: #666565;
}

.error-page-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
}

.error-page-request {
  margin-top: 24px;
  font-size: calc(12px * var(--text-scale));
  color: #808080;
}

@media (max-width: 480px) {
  .error-page-digit {
    font-size: 88px;
  }

  .error-page-face {
    width: 88px;
    height: 88px;
  }
}

.site-footer {
  flex-shrink: 0;
  width: 100%;
  margin-top: auto;
  padding: 24px 16px;
  background-color: #242582;
  color: #fff;
  font-family: Roboto, Helvetica, Arial, sans-serif;
}

.site-footer-inner {
  max-width: 600px;
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 600px) {
  .site-footer-inner {
    padding: 0 24px;
  }
}

.site-footer a {
  color: inherit;
  text-decoration: underline;
}

.site-footer-social {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: calc(1rem * var(--text-scale));
  line-height: 1.5;
}

.site-footer-social svg {
  width: 1em;
  height: 1em;
  vertical-align: -0.125em;
}

.site-footer-text {
  margin: 0;
  text-align: center;
  font-size: calc(0.875rem * var(--text-scale));
  line-height: 1.43;
  letter-spacing: 0.01071em;
}

.tariff-load-status {
  margin: 0;
  padding: 12px 16px;
  color: #475569;
  font-size: calc(0.875rem * var(--text-scale));
  text-align: center;
}

.tariff-load-status.is-error {
  color: var(--accent-color);
}

/* Shown in the confirmation modal once an action has been sent. */
.vip-modal-wait {
  margin-top: 0.75rem;
  font-weight: 600;
  color: var(--primary-color);
}

/* ---- Navbar on narrower screens ----
   The bar holds the logo, up to five links, the Import/Export title and the user menu, which needs about 1200px.
   Below that the links move into the hamburger panel (which also repeats the title); below 780px the title leaves
   the bar as well. x-show hides the panel with an inline style, so it is displayed here and only hidden by that. */
@media (max-width: 1280px) {
  .public-navbar-inner {
    padding: 0 24px;
  }

  .public-navbar-links {
    display: none;
  }

  .public-navbar-menu {
    display: inline-flex;
  }

  .public-navbar-mobile {
    display: grid;
    gap: 14px;
  }
}

@media (max-width: 780px) {
  .public-navbar-title {
    display: none;
  }

  .public-navbar-logo img {
    width: 112px;
  }
}
