/*
 * R-License — Redmine 6.1 skin.
 *
 * The app is meant to read as part of Redmine, so the palette, typography,
 * radii and components below are taken from core's own
 * `app/assets/stylesheets/application.css` rather than invented:
 *
 *   text #333 · headings #555 · links #169 (hover #c61a1a) · muted #999
 *   borders #d0d7de (panels) and #ccc (inputs) · panels #f9fafb
 *   table header #EEEEEE · row stripe #f6f7f8 · row hover #ffffdd
 *   chrome gradient #628DB6 → #356D92 · accent #759FCF · selected #9DB9D5
 *   radius 3px everywhere · Noto Sans · 0.875rem base, 0.8125rem in lists
 *
 * Bulma still supplies the primitives (grid, form structure, helpers); this
 * file retunes its design tokens and overrides the components it renders
 * differently from Redmine. The layout links bulma.min.css first and this file
 * second — Propshaft has no manifest, so that order is what makes the
 * overrides below win.
 */

@font-face {
  font-family: "Noto Sans";
  src: url("/assets/NotoSans-Regular-439816c3.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Noto Sans";
  src: url("/assets/NotoSans-Bold-f8da741d.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Noto Sans";
  src: url("/assets/NotoSans-Italic-3a265c8a.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Noto Sans";
  src: url("/assets/NotoSans-BoldItalic-2c873f21.woff2") format("woff2");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

/* Design tokens ------------------------------------------------------------ */

:root {
  --fonts-main: "Noto Sans", sans-serif;
  --fonts-code: Consolas, Menlo, "Liberation Mono", Courier, monospace;

  --rm-text: #333;
  --rm-heading: #555;
  --rm-muted: #999;
  --rm-link: #169;
  --rm-link-hover: #c61a1a;
  --rm-border: #d0d7de;
  --rm-border-input: #ccc;
  --rm-panel: #f9fafb;
  --rm-content: #fff;
  --rm-th: #eeeeee;
  --rm-stripe: #f6f7f8;
  --rm-row-hover: #ffffdd;
  --rm-accent: #759fcf;
  --rm-accent-mid: #628db6;
  --rm-accent-dark: #356d92;
  --rm-selected: #9db9d5;
  --rm-hover-tint: #eef5fd;
  --rm-hover-text: #2a5685;

  /* Semantic colours, from core's flash classes. */
  --rm-ok-bg: #dfffdf;
  --rm-ok-border: #9fcf9f;
  --rm-ok-text: #005f00;
  --rm-warn-bg: #f3edd1;
  --rm-warn-border: #eadbbc;
  --rm-warn-text: #a6750c;
  --rm-error-bg: #ffe3e3;
  --rm-error-border: #d88;
  --rm-error-text: #880000;

  --rm-sidebar-width: 15rem;

  /* Bulma tokens, pointed at the palette above. #169 is hsl(202.5, 80%, 33%). */
  --bulma-primary-h: 202.5deg;
  --bulma-primary-s: 80%;
  --bulma-primary-l: 33%;
  --bulma-link-h: 202.5deg;
  --bulma-link-s: 80%;
  --bulma-link-l: 33%;
  --bulma-scheme-h: 210;
  --bulma-scheme-s: 16%;
  --bulma-family-primary: var(--fonts-main);
  --bulma-family-code: var(--fonts-code);
  /* No `--bulma-body-size` override: Bulma puts it on <html>, and core's sizes
     (0.875rem body, 0.8125rem lists) are all relative to a 16px root. */
  --bulma-radius-small: 3px;
  --bulma-radius: 3px;
  --bulma-radius-medium: 3px;
  --bulma-radius-large: 3px;
  --bulma-body-background-color: var(--rm-content);
}

/* Base --------------------------------------------------------------------- */

html,
body {
  background-color: var(--rm-content);
  color-scheme: light;
}

body {
  color: var(--rm-text);
  font-family: var(--fonts-main);
  font-size: 0.875rem;
}

a,
a:link,
a:visited {
  color: var(--rm-link);
  text-decoration: none;
}

a:hover,
a:active {
  color: var(--rm-link-hover);
  text-decoration: underline;
}

h1,
h2,
h3,
h4 {
  color: var(--rm-heading);
  font-family: var(--fonts-main);
}

code,
.is-family-monospace,
.copyable code {
  background: transparent;
  color: inherit;
  font-family: var(--fonts-code);
  font-size: 0.8125rem;
  padding: 0;
}

hr {
  background: var(--rm-border-input);
  border: 0;
  height: 1px;
  margin: 1em 0;
}

/* Icons — same rules core uses, so a sprite icon looks identical here. ------- */

svg.icon-svg {
  fill: none;
  stroke: #343a40;
  stroke-width: 1.5;
  vertical-align: middle;
}

svg.icon-svg-filled {
  fill: #343a40;
  stroke: none;
}

svg.s20 { width: 1.25rem; height: 1.25rem; }
svg.s18 { width: 1.125rem; height: 1.125rem; }
svg.s16 { width: 1rem; height: 1rem; }
svg.s14 { width: 0.875rem; height: 0.875rem; }
svg.s12 { width: 0.75rem; height: 0.75rem; }

span.icon-label {
  margin-left: 4px;
}

a .icon-svg,
button .icon-svg {
  stroke: var(--rm-link);
}

a:hover .icon-svg {
  stroke: var(--rm-link-hover);
}

/* Brand -------------------------------------------------------------------- */

.brand {
  align-items: center;
  display: inline-flex;
  gap: 8px;
}

.brand-mark {
  border-radius: 3px;
  flex: none;
}

.brand-name {
  font-size: 1.125rem;
  font-weight: 700;
  white-space: nowrap;
}

/* Shell -------------------------------------------------------------------- */

.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Core's header: a blue gradient band with the app name on the left. */
.app-header {
  align-items: center;
  background: linear-gradient(180deg, #628db6 30%, #356d92);
  color: #f8f8f8;
  display: flex;
  gap: 12px;
  padding: 8px 16px;
}

.app-header a,
.app-header .brand-name {
  color: #f8f8f8;
}

.app-header a:hover {
  color: #fff;
  text-decoration: none;
}

.app-header-spacer {
  flex: 1 1 auto;
}

.app-body {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
}

.app-sidebar {
  background: var(--rm-panel);
  border-right: 1px solid var(--rm-border);
  flex: none;
  font-size: 0.8125rem;
  padding: 12px 8px 24px;
  width: var(--rm-sidebar-width);
}

.app-content {
  background-color: var(--rm-content);
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  padding: 10px 16px 32px;
}

.app-footer {
  background: var(--rm-content);
  border-top: 1px solid var(--rm-border);
  color: var(--rm-muted);
  font-size: 0.8125rem;
  padding: 6px;
  text-align: center;
}

.app-backdrop {
  background: rgba(0, 0, 0, 0.35);
  inset: 0;
  opacity: 0;
  pointer-events: none;
  position: fixed;
  transition: opacity 120ms ease;
  z-index: 35;
}

/* Sidebar navigation ------------------------------------------------------- */

.nav-section + .nav-section {
  margin-top: 16px;
}

.nav-section-title {
  color: var(--rm-heading);
  font-size: 0.875rem;
  font-weight: 700;
  margin-bottom: 4px;
  padding: 0 4px;
}

.nav-link {
  align-items: center;
  border-radius: 2px;
  color: var(--rm-link);
  display: flex;
  gap: 6px;
  line-height: 1.7em;
  padding: 1px 4px 2px;
}

.nav-link:hover {
  color: var(--rm-link-hover);
  text-decoration: underline;
}

.nav-link.is-active,
.nav-link.is-active:hover {
  background-color: var(--rm-selected);
  color: #fff;
  text-decoration: none;
}

.nav-link.is-active .icon-svg {
  stroke: #fff;
}

.nav-link-label {
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-count {
  color: var(--rm-muted);
  font-variant-numeric: tabular-nums;
}

.nav-link.is-active .nav-count {
  color: #fff;
}

.nav-empty {
  color: var(--rm-muted);
  padding: 2px 4px;
}

/* Header user menu --------------------------------------------------------- */

.user-chip {
  align-items: center;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 3px;
  color: #f8f8f8;
  cursor: pointer;
  display: inline-flex;
  font-family: inherit;
  font-size: 0.8125rem;
  gap: 6px;
  height: 24px;
  padding: 0 8px;
}

.user-chip:hover {
  background: rgba(255, 255, 255, 0.22);
}

.user-chip .icon-svg {
  stroke: #f8f8f8;
}

.icon-button {
  align-items: center;
  background: none;
  border: 0;
  border-radius: 3px;
  cursor: pointer;
  display: inline-flex;
  height: 24px;
  justify-content: center;
  padding: 0;
  width: 24px;
}

.icon-button:hover {
  background-color: rgba(0, 0, 0, 0.06);
}

.app-header .icon-button:hover {
  background-color: rgba(255, 255, 255, 0.22);
}

.app-header .icon-button .icon-svg {
  stroke: #f8f8f8;
}

.sidebar-toggle {
  display: none;
}

/* Page header -------------------------------------------------------------- */

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

.page-head-eyebrow {
  color: var(--rm-muted);
  font-size: 0.75rem;
}

.page-head-title {
  align-items: center;
  color: var(--rm-heading);
  display: flex;
  flex-wrap: wrap;
  font-size: 1.25rem;
  font-weight: 700;
  gap: 8px;
  margin: 0;
}

.page-head-description {
  color: var(--rm-muted);
  margin-top: 2px;
}

/* Core puts page-level actions top right, as plain icon links. */
.page-head-actions,
.contextual {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.section-title {
  align-items: center;
  color: var(--rm-heading);
  display: flex;
  font-size: 1.0625rem;
  font-weight: 700;
  gap: 6px;
  margin: 16px 0 8px;
}

/* Boxes -------------------------------------------------------------------- */

.box,
.surface,
.card,
.data-card,
.stat-card,
.plugin-tile,
.link-card,
.pair-tile {
  background-color: var(--rm-panel);
  border: 1px solid var(--rm-border);
  border-radius: 3px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  color: #505050;
}

.box,
.surface-body,
.card-content {
  padding: 8px;
}

.data-card {
  background-color: var(--rm-content);
  overflow: hidden;
  padding: 0;
}

/* Bulma spaces a table that is not the last child; here the pagination bar
   below it provides the separation. */
.data-card .table-container:not(:last-child),
.data-card .table:not(:last-child) {
  margin-bottom: 0;
}

.surface-head,
.card-header {
  align-items: center;
  background-color: var(--rm-panel);
  border-bottom: 1px solid var(--rm-border);
  box-shadow: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
  padding: 6px 8px;
}

.surface-head-title,
.card-header-title {
  align-items: center;
  color: var(--rm-heading);
  display: flex;
  font-size: 0.9375rem;
  font-weight: 700;
  gap: 6px;
  padding: 0;
}

.tile-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
  margin-bottom: 12px;
}

.plugin-tile {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.plugin-tile-body {
  flex: 1 1 auto;
  padding: 8px;
}

.plugin-tile-head {
  align-items: center;
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}

.plugin-tile-name {
  color: var(--rm-link);
  flex: 1 1 auto;
  font-size: 0.9375rem;
  font-weight: 700;
}

.plugin-tile-head .tag {
  flex: none;
}

.plugin-tile-id {
  color: var(--rm-muted);
  display: block;
  font-family: var(--fonts-code);
  font-size: 0.75rem;
}

.plugin-tile-foot {
  background-color: var(--rm-content);
  border-top: 1px solid var(--rm-border);
  display: flex;
}

.plugin-tile-foot a {
  align-items: center;
  display: flex;
  flex: 1 1 0;
  gap: 4px;
  font-size: 0.8125rem;
  justify-content: center;
  padding: 4px;
}

.plugin-tile-foot a + a {
  border-left: 1px solid var(--rm-border);
}

.link-card {
  align-items: center;
  display: flex;
  gap: 8px;
  padding: 8px;
}

.link-card-title {
  color: var(--rm-link);
  display: block;
  font-weight: 700;
}

.link-card-text {
  color: var(--rm-muted);
  display: block;
  font-size: 0.8125rem;
}

.link-card-body {
  flex: 1 1 auto;
  min-width: 0;
}

/* Figures ------------------------------------------------------------------ */

.stat-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
}

.stat-card {
  padding: 8px 10px;
}

/* The figures inside a plugin tile sit in one row, not one per line. */
.stat-grid.is-compact {
  gap: 6px;
  grid-template-columns: repeat(auto-fit, minmax(3.25rem, 1fr));
}

.stat-value {
  color: var(--rm-heading);
  font-size: 1.5rem;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  line-height: 1.2;
}

.stat-value.is-small {
  font-size: 1.125rem;
}

.stat-value.is-muted {
  color: var(--rm-muted);
}

.stat-label {
  color: var(--rm-muted);
  font-size: 0.75rem;
}

.stat-hint {
  color: var(--rm-muted);
  font-size: 0.75rem;
}

.pair-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
}

.pair-card {
  border: 1px solid var(--rm-border);
  border-radius: 3px;
  color: inherit;
  display: block;
  padding: 6px 8px;
}

.pair-card:hover {
  background-color: var(--rm-hover-tint);
  border-color: var(--rm-accent-mid);
  color: inherit;
  text-decoration: none;
}

.pair-date {
  font-weight: 700;
}

.pair-tile {
  padding: 8px;
}

.pair-tile .stat-value {
  font-size: 1.125rem;
}

.pair-tile-head {
  align-items: center;
  display: flex;
  gap: 6px;
  justify-content: space-between;
  margin-bottom: 4px;
}

/* Tables — core's `table.list`. --------------------------------------------- */

.table {
  background-color: transparent;
  border-bottom: 1px solid var(--rm-border);
  border-collapse: collapse;
  border-top: 1px solid var(--rm-border);
  color: var(--rm-text);
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
  width: 100%;
}

.table thead th,
.data-card .table thead th {
  background-color: var(--rm-th);
  border: 0;
  border-bottom: 2px solid var(--rm-border);
  color: var(--rm-text);
  font-weight: 700;
  letter-spacing: 0;
  padding: 4px 6px;
  text-align: left;
  text-transform: none;
  white-space: nowrap;
}

.table tbody td,
.data-card .table tbody td {
  border: 0;
  border-top: 1px solid var(--rm-border);
  padding: 3px 10px 3px 6px;
  vertical-align: middle;
}

/* Core stripes its lists and flags the hovered row in pale yellow. */
.table tbody tr:nth-child(even),
.data-card .table tbody tr:nth-child(even) {
  background-color: var(--rm-stripe);
}

.table.is-hoverable tbody tr:hover,
.data-card .table.is-hoverable tbody tr:hover {
  background-color: var(--rm-row-hover);
}

.table thead th a {
  align-items: center;
  color: var(--rm-link);
  display: inline-flex;
  gap: 3px;
}

.sort-indicator {
  font-size: 0.7em;
}

.cell-primary {
  font-weight: 700;
}

.cell-muted {
  color: var(--rm-muted);
}

.table .cell-numeric,
.table thead th.cell-numeric {
  text-align: right;
}

.table .cell-actions {
  padding-right: 6px;
  text-align: right;
  white-space: nowrap;
  width: 1%;
}

.is-truncated {
  display: inline-block;
  max-width: 22ch;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
  white-space: nowrap;
}

/* Copyable value ----------------------------------------------------------- */

.copyable {
  align-items: center;
  display: inline-flex;
  gap: 2px;
}

.copy-button {
  align-items: center;
  background: none;
  border: 0;
  cursor: pointer;
  display: inline-flex;
  height: 18px;
  justify-content: center;
  padding: 0;
  width: 18px;
}

.copy-button .icon-svg {
  opacity: 0.45;
}

.copy-button:hover .icon-svg {
  opacity: 1;
}

.copy-button.is-copied .icon-svg {
  opacity: 1;
  stroke: var(--rm-ok-text);
}

/* Action menu — core's `.drdn` dropdown. ------------------------------------ */

.action-menu {
  display: inline-block;
  position: relative;
}

/* Fixed, and positioned by the controller: a menu inside a horizontally
   scrolling table would otherwise be clipped by the scroll container. */
.action-menu-panel {
  background-color: #fff;
  border: 1px solid var(--rm-border-input);
  border-radius: 3px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
  display: none;
  min-width: 160px;
  padding: 2px;
  position: fixed;
  text-align: left;
  z-index: 60;
}

.action-menu.is-open .action-menu-panel {
  display: block;
}

.action-menu-panel form {
  display: block;
  margin: 0;
}

.action-menu-item {
  align-items: center;
  background: none;
  border: 1px solid #fff;
  border-radius: 3px;
  color: var(--rm-link);
  cursor: pointer;
  display: flex;
  font-family: inherit;
  font-size: 0.8125rem;
  gap: 6px;
  overflow: hidden;
  padding: 5px 8px;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
}

.action-menu-item:hover {
  background-color: var(--rm-hover-tint);
  border-color: var(--rm-accent-mid);
  color: var(--rm-hover-text);
  text-decoration: none;
}

.action-menu-item:hover .icon-svg {
  stroke: var(--rm-hover-text);
}

.action-menu-item.is-danger,
.action-menu-item.is-danger .icon-svg {
  color: var(--rm-error-text);
  stroke: var(--rm-error-text);
}

.action-menu-item.is-danger:hover {
  background-color: var(--rm-error-bg);
  border-color: var(--rm-error-border);
  color: var(--rm-error-text);
}

.action-menu-divider {
  background-color: var(--rm-border-input);
  height: 1px;
  margin: 2px 0;
}

/* Status pills and tags ---------------------------------------------------- */

.tag:not(body) {
  border-radius: 3px;
  font-size: 0.75rem;
  font-weight: 400;
  height: auto;
  padding: 1px 6px;
}

.status-pill {
  border: 1px solid;
  border-radius: 3px;
  display: inline-block;
  font-size: 0.75rem;
  padding: 0 6px;
  white-space: nowrap;
}

.status-pill.is-active {
  background-color: var(--rm-ok-bg);
  border-color: var(--rm-ok-border);
  color: var(--rm-ok-text);
}

.status-pill.is-expiring,
.tag.is-warning.is-light {
  background-color: var(--rm-warn-bg);
  border-color: var(--rm-warn-border);
  color: var(--rm-warn-text);
}

.status-pill.is-expired {
  background-color: var(--rm-error-bg);
  border-color: var(--rm-error-border);
  color: var(--rm-error-text);
}

.status-pill.is-revoked,
.tag.is-light {
  background-color: #f0f0f0;
  border-color: var(--rm-border-input);
  color: #777;
}

.status-pill.is-pending {
  background-color: var(--rm-hover-tint);
  border-color: var(--rm-accent-mid);
  color: var(--rm-hover-text);
}

.tag.is-success.is-light {
  background-color: var(--rm-ok-bg);
  border: 1px solid var(--rm-ok-border);
  color: var(--rm-ok-text);
}

/* Used for the validation-mode badge: blue reads as "which kind", where green
   and amber would read as "good" and "watch out". */
.tag.is-info.is-light {
  background-color: var(--rm-hover-tint);
  border: 1px solid var(--rm-accent-mid);
  color: var(--rm-hover-text);
}

.tag.is-warning.is-light {
  border: 1px solid var(--rm-warn-border);
}

/* Filter chips — styled like core's tabs. ----------------------------------- */

.chip-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.chip {
  background-color: var(--rm-content);
  border: 1px solid var(--rm-border-input);
  border-radius: 3px;
  color: var(--rm-link);
  display: inline-flex;
  font-size: 0.8125rem;
  gap: 5px;
  padding: 2px 8px;
}

.chip:hover {
  background-color: var(--rm-hover-tint);
  border-color: var(--rm-accent-mid);
  color: var(--rm-hover-text);
  text-decoration: none;
}

.chip.is-active,
.chip.is-active:hover {
  background-color: var(--rm-accent);
  border-color: var(--rm-accent-mid);
  color: #fff;
  font-weight: 700;
}

.chip-count {
  color: var(--rm-muted);
  font-variant-numeric: tabular-nums;
}

.chip.is-active .chip-count {
  color: #fff;
}

/* Forms -------------------------------------------------------------------- */

.label {
  color: var(--rm-text);
  font-size: 0.875rem;
  font-weight: 700;
  margin-bottom: 3px;
}

.input,
.select select,
.textarea {
  background-color: #fff;
  border: 1px solid var(--rm-border-input);
  border-radius: 3px;
  box-shadow: none;
  color: var(--rm-text);
  font-family: inherit;
  font-size: 0.875rem;
  height: 24px;
  padding: 0 7px;
}

.textarea {
  height: auto;
  padding: 4px 7px;
}

.input:focus,
.select select:focus,
.textarea:focus {
  border-color: #5ad;
  box-shadow: none;
}

.help {
  color: var(--rm-muted);
  font-size: 0.8125rem;
}

.search-field {
  position: relative;
}

.search-field .input {
  padding-left: 26px;
}

.search-field-icon {
  align-items: center;
  bottom: 0;
  display: flex;
  left: 6px;
  pointer-events: none;
  position: absolute;
  top: 0;
}

.search-field-icon .icon-svg {
  stroke: var(--rm-muted);
}

.filter-bar {
  align-items: flex-end;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-bar .field {
  margin-bottom: 0;
}

.filter-panel {
  padding: 8px;
}

.form-column {
  max-width: 46rem;
}

.form-actions {
  border-top: 1px solid var(--rm-border);
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  margin-top: 12px;
  padding-top: 8px;
}

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

.search-form {
  min-width: min(20rem, 100%);
}

/* Buttons — core has no vivid primary; every button is the same plain one. --- */

.button {
  background-color: #fff;
  border: 1px solid var(--rm-border-input);
  border-radius: 3px;
  color: var(--rm-text);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 400;
  gap: 4px;
  height: 28px;
  padding: 0 10px;
  transition: background-color 100ms linear;
}

.button:hover {
  background-color: #ddd;
  border-color: var(--rm-border-input);
  color: var(--rm-text);
  text-decoration: none;
}

.button .icon-svg {
  stroke: var(--rm-text);
}

/* The one emphasised button stays inside the palette: accent border and text,
   not a filled block Redmine would never show. */
.button.is-primary,
.button.is-link {
  background-color: #fff;
  border-color: var(--rm-accent-mid);
  box-shadow: none;
  color: var(--rm-hover-text);
  font-weight: 700;
}

.button.is-primary:hover,
.button.is-link:hover {
  background-color: var(--rm-hover-tint);
  border-color: var(--rm-accent-dark);
  color: var(--rm-hover-text);
}

.button.is-primary .icon-svg,
.button.is-link .icon-svg {
  stroke: var(--rm-hover-text);
}

.button.is-small {
  font-size: 0.8125rem;
  height: 24px;
  padding: 0 8px;
}

/* Inputs are 24px in Redmine, so a button glued to one has to match. */
.field.has-addons .button {
  height: 24px;
}

.button.is-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--rm-link);
  text-decoration: none;
}

.button.is-ghost:hover {
  background: transparent;
  color: var(--rm-link-hover);
  text-decoration: underline;
}

.button.is-static {
  background-color: var(--rm-panel);
  color: var(--rm-muted);
}

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

.buttons form:not(:last-child) {
  margin-right: 6px;
}

/* Flash and notifications — core's flash palette. --------------------------- */

.notification {
  border: 1px solid;
  border-radius: 3px;
  font-size: 0.875rem;
  margin-bottom: 12px;
  padding: 6px 30px 6px 10px;
}

.flash-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.flash-body {
  align-items: flex-start;
  display: flex;
  gap: 6px;
}

.notification.is-success,
.notification.is-success.is-light {
  background-color: var(--rm-ok-bg);
  border-color: var(--rm-ok-border);
  color: var(--rm-ok-text);
}

.notification.is-success .icon-svg {
  stroke: var(--rm-ok-text);
}

.notification.is-danger,
.notification.is-danger.is-light {
  background-color: var(--rm-error-bg);
  border-color: var(--rm-error-border);
  color: var(--rm-error-text);
}

.notification.is-danger .icon-svg {
  stroke: var(--rm-error-text);
}

.notification.is-warning,
.notification.is-warning.is-light {
  background-color: var(--rm-warn-bg);
  border-color: var(--rm-warn-border);
  color: var(--rm-warn-text);
}

.notification.is-info,
.notification.is-info.is-light {
  background-color: var(--rm-hover-tint);
  border-color: var(--rm-accent-mid);
  color: var(--rm-hover-text);
}

/* Breadcrumbs, pagination, empty state -------------------------------------- */

.breadcrumb {
  font-size: 0.8125rem;
  margin-bottom: 8px;
}

.breadcrumb li.is-active a {
  color: var(--rm-text);
  font-weight: 700;
}

.pagination-bar {
  align-items: center;
  border-top: 1px solid var(--rm-border);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
  padding: 6px 8px;
}

.pagination-summary {
  color: var(--rm-muted);
  font-size: 0.8125rem;
}

.empty-state {
  align-items: center;
  color: var(--rm-muted);
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 32px 16px;
  text-align: center;
}

.empty-state-icon .icon-svg {
  stroke: var(--rm-muted);
}

.empty-state-title {
  color: var(--rm-heading);
  font-weight: 700;
}

.empty-state-text {
  font-size: 0.8125rem;
  max-width: 32rem;
}

/* Sign-in — core's amber login box. ----------------------------------------- */

.auth-page {
  align-items: flex-start;
  display: flex;
  justify-content: center;
  min-height: 100vh;
  padding: 5em 1rem 2em;
}

.auth-panel {
  max-width: 340px;
  width: 100%;
}

.auth-card {
  background-color: #ffebc1;
  border: 1px solid #fdbf3b;
  border-radius: 4px;
  padding: 20px;
}

.auth-head {
  margin-bottom: 16px;
  text-align: center;
}

.auth-head .brand {
  flex-direction: column;
  gap: 8px;
}

.auth-head .brand-name {
  color: var(--rm-heading);
  font-size: 1.25rem;
}

.auth-tagline {
  color: #8a7040;
  font-size: 0.8125rem;
  margin-top: 4px;
}

.auth-card .label {
  margin-bottom: 4px;
}

.auth-card .input {
  height: 29px;
}

.auth-foot {
  color: var(--rm-muted);
  font-size: 0.75rem;
  margin-top: 12px;
  text-align: center;
}

/* Responsive --------------------------------------------------------------- */

@media screen and (max-width: 1023px) {
  .sidebar-toggle {
    display: inline-flex;
  }

  .app-sidebar {
    bottom: 0;
    overflow-y: auto;
    position: fixed;
    top: 0;
    transform: translateX(-100%);
    transition: transform 150ms ease;
    z-index: 40;
  }

  .app-sidebar.is-open {
    box-shadow: 0 0 16px rgba(0, 0, 0, 0.25);
    transform: translateX(0);
  }

  .app-sidebar.is-open ~ .app-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .app-content {
    padding: 10px;
  }

  .search-form {
    width: 100%;
  }
}

@media print {
  .app-header,
  .app-sidebar,
  .cell-actions,
  .page-head-actions {
    display: none !important;
  }
}
