* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* --white: #ffffff; */
  --color-header-text: #ffffff;
  --color-navbar-text: #ffffff;
  --color-footer-text: #ffffff;
  --color-dashboard-main-background: #ffffff;
  --color-dashboard-table-background: #ffffff;
  --color-dashboard-table-header-text: #ffffff;
  --color-dashboard-modal-background: #ffffff;
  --color-dashboard-modal-button-text: #ffffff;
    
  --color-dashboard-text: #ffffff;

   /* --dirty-white: #f5f5f5; */
  --color-dashboard-body-background: #f5f5f5;
    

  --color-dashboard-table-row-hover: #e8eeff;
  --color-dashboard-table-row-even: #f9f9f9;

  --color-dashboard-table-border: #d0d0d0;
  --color-dashboard-input-border: #d0d0d0;


  --color-dashboard-table-text: #303030;

  /* --button-green: #218838; */
  --color-index-button: #218838;
  --color-login-button: #218838;
  --color-register-button: #218838;
  --color-dashboard-button: #218838;
  --color-admin-dashboard-button: #218838;
    
  /* --button-green-hover: #28a745; */
  --color-index-button-hover: #28a745;
  --color-login-button-hover: #28a745;
  --color-register-button-hover: #28a745;
  --color-dashboard-button-hover: #28a745;
  --color-admin-dashboard-button-hover: #28a745;

  --color-button-inactive: #6c757d;

  --color-dashboard-modal-container-background: #f5f5f5;

  /* --blue: #007bff; */
  --color-dashboard-table-header-background: #007bff;
  --color-dashboard-table-link: #007bff;
  --color-dashboard-input-focus: #007bff;
  --color-dashboard-input-outline-error: #ff0000;

  /* --dark-blue: #0b5caf; */
  --color-index-header-background: #0b5caf;
  --color-dashboard-header-background: #0b5caf;
  --color-dashboard-footer-background: #0b5caf;

  /* black: #000000; */
  --color-options-button-text: #000000;

  /* transparent: #00000000; */
  --color-transparent: #00000000;

  --color-modal-background: #00000070;

  /* shared tokens of the new design: pages are moved to them step by step, old names above stay until then */
  --brand: #0b5caf;
  --brand-strong: #084a8d;
  --brand-soft: #e7f0fa;
  --action: #218838;
  --action-hover: #1b6f2e;
  --page: #f3f5f8;
  --surface: #ffffff;
  --text: #1d2733;
  --text-muted: #5d6a79;
  --border: #d7dee6;
  --status-ok: #1f7a3a;
  --status-warn: #b26a00;
  --status-error: #c62828;
  --status-idle: #5d6a79;
  --radius: 8px;
  --gap: 16px;
  --tap: 44px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

html {
  height: 100%;
}

body {
  font-family: var(--font);
  background-color: var(--color-dashboard-body-background);
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

footer {
  flex-shrink: 0;
  background: var(--color-dashboard-footer-background);
  color: var(--color-footer-text);
  padding: 10px;
  text-align: center;
}

.unselectable {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

/* phones: small links and the numbers a tap copies get a place to tap of 40px and more.
   Links that stand in rows of their own (footer, guest headers, links under forms) get real room, so the places to tap of two
   rows do not cover each other; the menu of the cabinet has its own 44px items. A link inside a sentence takes its padding
   back by margins, so the lines of the text stay where they were */
@media (max-width: 760px) {
  footer a, .register-link a, .contact p a, .support-guest-bar a, header nav:not(.cab-nav) a {
    display: inline-block;
    min-width: 40px;
    padding-top: 12px;
    padding-bottom: 12px;
  }
  .unselectable[onclick], a.u-link, .admin-page dd a {
    display: inline-block;
    min-width: 40px;
    padding-top: 11px;
    padding-bottom: 11px;
    margin-top: -11px;
    margin-bottom: -11px;
  }
}

/* links under the forms of login and registration: back to the main page and the community, plain links with room to tap */
.login-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  column-gap: 24px;
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px solid #e5e5e5;
}
.login-foot a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 14px;
  color: #555;
  text-decoration: none;
}
.login-foot a:hover {
  color: #007bff;
  text-decoration: underline;
}

/* the switch of languages: the current language short with a mark, the list of languages under it; the colour of the button
   comes from the bar it stands in, the list is always dark on white */
.lang-switch {
  position: relative;
}

.lang-switch summary {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: var(--tap, 44px);
  min-height: var(--tap, 44px);
  padding: 0 8px;
  border-radius: 6px;
  color: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  box-sizing: border-box;
  user-select: none;
}

.lang-switch summary::-webkit-details-marker {
  display: none;
}

.lang-switch summary::after {
  content: "▾";
  font-size: 12px;
}

.lang-switch summary:hover, .lang-switch[open] summary {
  background-color: rgba(255, 255, 255, 0.15);
}

.lang-list {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 50;
  min-width: 160px;
  margin: 0;
  padding: 4px 0;
  list-style: none;
  background-color: #ffffff;
  border: 1px solid var(--border, #d0d7de);
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

.lang-list a {
  display: flex;
  align-items: center;
  min-height: var(--tap, 44px);
  padding: 0 14px;
  color: var(--text, #1f2328);
  font-size: 15px;
  text-decoration: none;
}

.lang-list a:hover {
  background-color: var(--brand-soft, #e8f0fb);
}

.lang-list a[aria-current="true"] {
  font-weight: 700;
}

/* the languages under the forms of guests: plain links in a row, the current one in bold */
.lang-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  column-gap: 16px;
  font-size: 14px;
}

.lang-links a, .lang-links span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #555;
  text-decoration: none;
}

.lang-links span {
  font-weight: 700;
  color: #333;
}

.lang-links a:hover {
  color: #007bff;
  text-decoration: underline;
}
