/* ==========================================================================
   Red-Dot Technologies theme
   Layered over Bootstrap 5.3. Red / black / white / light grey.
   ========================================================================== */

:root {
  /*
   * Taken from the logo.
   *
   * Three things in the artwork drive this palette. The red is not flat - the
   * sphere and "Dot" run bright at the top into a deeper red below. The dark is
   * not black - the R and "Red" are a cool gunmetal that lightens towards the
   * top of the letterform. And the greys under the strapline are cool, not
   * neutral. The old palette had a flat red on a true black with neutral greys,
   * which is a different, colder brand than the one on the logo.
   */
  --rd-red: #e3192b;
  --rd-red-bright: #f0303a;
  --rd-red-dark: #b3111f;
  --rd-red-soft: #fdecee;

  /* The R: gunmetal, with a cool blue cast. --rd-black is the mid tone the
     artwork settles on; the other two are the ends of its gradient. */
  --rd-black: #1e232b;
  --rd-black-lift: #333a45;
  --rd-black-deep: #14171d;

  --rd-ink: #21252c;
  --rd-muted: #71767f;
  --rd-white: #ffffff;
  --rd-grey: #f5f6f8;
  --rd-grey-2: #eceef2;
  --rd-border: #e3e6eb;

  /* The gradients themselves, so every dark or red surface carries the same
     shading the logo does instead of a flat fill beside it.
     --rd-grad-red starts at the mid red rather than the bright one: white text
     sits on these surfaces, and the bright stop only reaches about 4:1 against
     white, under the 4.5:1 AA floor. The bright red is kept for the sphere,
     which carries no text. */
  --rd-grad-red: linear-gradient(180deg, var(--rd-red) 0%, var(--rd-red-dark) 100%);
  --rd-grad-sphere: radial-gradient(circle at 32% 28%, var(--rd-red-bright) 0%, var(--rd-red) 55%, var(--rd-red-dark) 100%);
  --rd-grad-dark: linear-gradient(157deg, var(--rd-black-lift) 0%, var(--rd-black) 48%, var(--rd-black-deep) 100%);

  --rd-radius: 12px;
  --rd-radius-sm: 9px;

  /*
   * Two-part shadows: a 1px contact edge that defines the shape, and a wide,
   * very faint cast that gives depth. A single heavy blur reads as a drop
   * shadow from a 2010s template; this reads as paper on a desk.
   */
  --rd-shadow-sm: 0 1px 1px rgba(22, 26, 33, .04), 0 1px 3px rgba(22, 26, 33, .05);
  --rd-shadow: 0 1px 2px rgba(22, 26, 33, .05), 0 12px 28px -10px rgba(22, 26, 33, .14);
  --rd-shadow-lg: 0 2px 4px rgba(22, 26, 33, .05), 0 24px 48px -16px rgba(22, 26, 33, .2);

  --rd-ring: 0 0 0 3px rgba(227, 25, 43, .16);
  --rd-sidebar-w: 254px;

  --bs-primary: var(--rd-red);
  --bs-primary-rgb: 227, 25, 43;
  --bs-body-color: var(--rd-ink);

  /*
   * White, not the grey page colour. Bootstrap paints inputs, dropdowns,
   * modals and popovers with --bs-body-bg, so pointing it at the page grey
   * made every text field render as though it were disabled.
   * The page background is set on body instead.
   */
  --bs-body-bg: var(--rd-white);
  --bs-border-color: var(--rd-border);
  --bs-link-color: var(--rd-red);
  --bs-link-hover-color: var(--rd-red-dark);

  /*
   * Bootstrap 5.3 paints links with rgba(var(--bs-link-color-rgb), ...), so the
   * two properties above are read by almost nothing. Without these every link
   * in the app fell back to Bootstrap's default blue - off-brand, and the one
   * colour this site should never show.
   */
  --bs-link-color-rgb: 227, 25, 43;
  --bs-link-hover-color-rgb: 179, 17, 31;
  --bs-font-sans-serif: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { -webkit-tap-highlight-color: transparent; }

body {
  background: var(--rd-grey);
  color: var(--rd-ink);
  font-family: var(--bs-font-sans-serif);
  font-size: .9375rem;
  line-height: 1.6;
  /* Nothing in this app may scroll sideways. */
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 { font-weight: 700; letter-spacing: -.021em; color: var(--rd-black); }
h1 { font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.9rem); line-height: 1.12; letter-spacing: -.03em; }
h2 { font-size: clamp(1.4rem, 1.1rem + 1.4vw, 2.1rem); line-height: 1.18; letter-spacing: -.025em; }
h3 { font-size: clamp(1.15rem, 1rem + .7vw, 1.5rem); }

a { text-decoration: none; }
a:hover { text-decoration: none; }

/* --- The red dot ---------------------------------------------------------- */

.rd-dot {
  display: inline-block;
  width: .55em; height: .55em;
  border-radius: 50%;
  background: var(--rd-red);
  vertical-align: baseline;
}

.rd-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--rd-red);
  margin-bottom: .75rem;
}
.rd-eyebrow::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--rd-red);
  box-shadow: 0 0 0 4px var(--rd-red-soft);
}

.rd-logo {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-weight: 800;
  font-size: 1.075rem;
  letter-spacing: -.02em;
  color: var(--rd-black);
}
.rd-logo__mark {
  width: 30px; height: 30px;
  border-radius: 9px;
  background: var(--rd-grad-dark);
  display: grid; place-items: center;
  flex: 0 0 auto;
}
.rd-logo__mark::after {
  content: "";
  width: 11px; height: 11px;
  border-radius: 50%;
  /* Lit from the top left, like the sphere it stands in for. */
  background: var(--rd-grad-sphere);
}
/*
 * Uploaded artwork. Each surface sets its own ceiling through the two custom
 * properties, because a horizontal lockup that reads well across a 1200px
 * navbar is illegible squeezed into a 254px sidebar.
 */
.rd-logo img {
  height: auto;
  width: auto;
  max-height: var(--rd-logo-h, 34px);
  max-width: var(--rd-logo-w, 190px);
  object-fit: contain;
}

/*
 * Generous ceilings. The company lockup is a wide, detailed piece - mark,
 * wordmark, strapline and a three-part feature strip - so it needs real estate
 * to stay readable. These are maximums: a simpler logo just sits smaller.
 */
.rd-nav .rd-logo        { --rd-logo-h: 54px; --rd-logo-w: 320px; }
.rd-authside .rd-logo   { --rd-logo-h: 96px; --rd-logo-w: 380px; }
.rd-authform .rd-logo   { --rd-logo-h: 64px; --rd-logo-w: 300px; }
.rd-footer .rd-logo     { --rd-logo-h: 68px; --rd-logo-w: 300px; }
.rd-sidebar__brand .rd-logo { --rd-logo-h: 78px; --rd-logo-w: 214px; }

/* In the navbar and the auth panel there is room for the full name on one line,
   and a wrapped wordmark beside the mark reads as a layout fault. Only the
   fixed-width sidebar is allowed to wrap, and it opts in above. */
.rd-nav .rd-logo, .rd-authside .rd-logo { white-space: nowrap; }

/* Settings preview, on a chequerboard so a transparent logo is obvious. */
.rd-logo-preview {
  display: inline-block;
  padding: .5rem .65rem;
  border: 1px solid var(--rd-border);
  border-radius: var(--rd-radius-sm);
  background:
    linear-gradient(45deg, #f0f1f4 25%, transparent 25%, transparent 75%, #f0f1f4 75%),
    linear-gradient(45deg, #f0f1f4 25%, #fff 25%, #fff 75%, #f0f1f4 75%);
  background-size: 14px 14px;
  background-position: 0 0, 7px 7px;
}
.rd-logo-preview img { max-height: 44px; max-width: 100%; display: block; }
.rd-logo--light, .rd-logo--light .rd-logo__mark { color: #fff; }
.rd-logo--light .rd-logo__mark { background: rgba(255, 255, 255, .12); }

/* --- Buttons -------------------------------------------------------------- */

.btn {
  --bs-btn-font-weight: 600;
  --bs-btn-border-radius: var(--rd-radius-sm);
  --bs-btn-padding-y: .58rem;
  --bs-btn-padding-x: 1.15rem;
  letter-spacing: -.005em;
  transition: transform .12s ease, box-shadow .12s ease,
              background-color .12s ease, border-color .12s ease;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { box-shadow: var(--rd-ring); }

.btn-primary {
  --bs-btn-bg: var(--rd-red);
  --bs-btn-border-color: var(--rd-red);
  --bs-btn-hover-bg: var(--rd-red-dark);
  --bs-btn-hover-border-color: var(--rd-red-dark);
  --bs-btn-active-bg: var(--rd-red-dark);
  --bs-btn-active-border-color: var(--rd-red-dark);
  --bs-btn-disabled-bg: #f0a3a6;
  --bs-btn-disabled-border-color: #f0a3a6;
  /* Shaded like the sphere in the logo - bright at the top, deeper below -
     rather than a flat fill sitting next to a gradient wordmark. */
  background-image: var(--rd-grad-red);
  /* Tight and low: enough to lift the button off the page, not a red halo. */
  box-shadow: 0 1px 2px rgba(179, 17, 31, .24), 0 2px 8px -2px rgba(227, 25, 43, .34);
}
.btn-primary:hover {
  background-image: linear-gradient(180deg, var(--rd-red-dark) 0%, #990d19 100%);
  box-shadow: 0 2px 4px rgba(179, 17, 31, .26), 0 6px 16px -4px rgba(227, 25, 43, .42);
}
.btn-primary:disabled, .btn-primary.disabled { background-image: none; }

.btn-dark {
  --bs-btn-bg: var(--rd-black);
  --bs-btn-border-color: var(--rd-black);
  --bs-btn-hover-bg: var(--rd-black-lift);
  --bs-btn-hover-border-color: var(--rd-black-lift);
}

.btn-outline-primary {
  --bs-btn-color: var(--rd-red);
  --bs-btn-border-color: var(--rd-red);
  --bs-btn-hover-bg: var(--rd-red);
  --bs-btn-hover-border-color: var(--rd-red);
  --bs-btn-active-bg: var(--rd-red-dark);
}

.btn-light-soft {
  background: var(--rd-grey);
  border: 1px solid var(--rd-border);
  color: var(--rd-ink);
  font-weight: 600;
}
.btn-light-soft:hover { background: var(--rd-grey-2); color: var(--rd-black); }

/* Every tappable control clears the 44px touch target on phones. */
@media (max-width: 767.98px) {
  .btn, .form-control, .form-select { min-height: 44px; }
}

/* --- Cards & surfaces ----------------------------------------------------- */

.rd-card {
  background: var(--rd-white);
  border: 1px solid var(--rd-border);
  border-radius: var(--rd-radius);
  box-shadow: var(--rd-shadow-sm);
}
.rd-card__head {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--rd-border);
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  flex-wrap: wrap;
}
.rd-card__title { font-size: 1rem; font-weight: 700; margin: 0; }
.rd-card__body { padding: 1.25rem; }
.rd-card__foot {
  padding: .9rem 1.25rem;
  border-top: 1px solid var(--rd-border);
  background: var(--rd-grey);
  border-radius: 0 0 var(--rd-radius) var(--rd-radius);
}

.rd-hover-lift { transition: transform .16s ease, box-shadow .16s ease; }
.rd-hover-lift:hover { transform: translateY(-3px); box-shadow: var(--rd-shadow); }

/* --- Stat tiles ----------------------------------------------------------- */

.rd-stat {
  background: var(--rd-white);
  border: 1px solid var(--rd-border);
  border-radius: var(--rd-radius);
  box-shadow: var(--rd-shadow-sm);
  padding: 1.15rem 1.2rem;
  position: relative;
  overflow: hidden;
  height: 100%;
}
/*
 * No red rule down the side. A row of four tiles each wearing one is noise,
 * and the tinted icon already carries the brand.
 */
.rd-stat__label {
  /* Clears the absolutely positioned icon, so a long label wraps instead of
     running underneath it and being clipped by the tile's overflow. */
  padding-right: 2.75rem;
  min-height: 2.1em;
  font-size: .7rem; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; color: var(--rd-muted);
  margin-bottom: .3rem;
  line-height: 1.35;
}
.rd-stat__value {
  font-size: 1.6rem; font-weight: 800; line-height: 1.1;
  color: var(--rd-black); letter-spacing: -.02em;
}
.rd-stat__meta { font-size: .8125rem; color: var(--rd-muted); margin-top: .3rem; }
.rd-stat__icon {
  position: absolute; right: .95rem; top: .95rem;
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--rd-red-soft); color: var(--rd-red); font-size: 1rem;
}

/* Tiles that link somewhere should say so on hover. */
a .rd-stat { transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
a:hover .rd-stat { border-color: #cfd3da; box-shadow: var(--rd-shadow); transform: translateY(-2px); }
.rd-stat--dark { background: var(--rd-grad-dark); border-color: var(--rd-black-deep); }
.rd-stat--dark .rd-stat__label { color: rgba(255, 255, 255, .6); }
.rd-stat--dark .rd-stat__value { color: #fff; }
.rd-stat--dark .rd-stat__meta { color: rgba(255, 255, 255, .55); }
.rd-stat--dark .rd-stat__icon { background: rgba(227, 25, 43, .18); color: #ff6b70; }

/* --- Wallet balance card -------------------------------------------------- */

.rd-wallet {
  /* The gunmetal of the R, warming into the red at the far corner. */
  background: linear-gradient(135deg, var(--rd-black-lift) 0%, var(--rd-black) 52%, #3a1116 100%);
  color: #fff;
  border-radius: var(--rd-radius);
  padding: 1.4rem 1.5rem;
  position: relative;
  overflow: hidden;
}
.rd-wallet::after {
  content: "";
  position: absolute; right: -46px; top: -46px;
  width: 168px; height: 168px; border-radius: 50%;
  background: radial-gradient(circle, rgba(227, 25, 43, .45) 0%, rgba(227, 25, 43, 0) 68%);
}
.rd-wallet__label {
  font-size: .75rem; letter-spacing: .08em; text-transform: uppercase;
  color: rgba(255, 255, 255, .62); font-weight: 600;
}
.rd-wallet__amount {
  font-size: clamp(1.9rem, 1.4rem + 2vw, 2.6rem);
  font-weight: 800; letter-spacing: -.03em; line-height: 1.1;
}
.rd-wallet__amount small { font-size: .42em; font-weight: 700; opacity: .7; margin-left: .3rem; }
.rd-wallet--negative .rd-wallet__amount { color: #ff8b8f; }

/* --- Status pills --------------------------------------------------------- */

.rd-pill {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .26rem .65rem;
  border-radius: 999px;
  font-size: .75rem; font-weight: 700; letter-spacing: .01em;
  white-space: nowrap;
  border: 1px solid transparent;
}
.rd-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.rd-pill-success { background: #e8f6ee; color: #17794a; border-color: #cbe9d8; }
.rd-pill-danger  { background: var(--rd-red-soft); color: var(--rd-red-dark); border-color: #f7cbcd; }
.rd-pill-warning { background: #fff5e5; color: #a25c00; border-color: #ffe2b8; }
.rd-pill-info    { background: #e9f2fd; color: #1256a0; border-color: #cfe1f8; }
.rd-pill-primary { background: var(--rd-red-soft); color: var(--rd-red-dark); border-color: #f7cbcd; }
.rd-pill-secondary { background: var(--rd-grey-2); color: #4b5563; border-color: var(--rd-border); }
.rd-pill-dark    { background: #e6e7ea; color: var(--rd-black); border-color: #d6d8dd; }

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

.form-label {
  font-weight: 600; font-size: .8125rem;
  color: #363b44;
  margin-bottom: .4rem;
  letter-spacing: -.005em;
}

.form-control, .form-select {
  background-color: var(--rd-white);
  border-radius: var(--rd-radius-sm);
  border: 1px solid #d9dce2;
  padding: .62rem .85rem;
  font-size: .9375rem;
  color: var(--rd-ink);
  box-shadow: 0 1px 1px rgba(22, 26, 33, .02) inset;
  transition: border-color .14s ease, box-shadow .14s ease, background-color .14s ease;
}
.form-control:hover:not(:focus):not(:disabled):not([readonly]),
.form-select:hover:not(:focus):not(:disabled) { border-color: #c2c7d0; }

.form-control:focus, .form-select:focus {
  background-color: var(--rd-white);
  border-color: var(--rd-red);
  box-shadow: var(--rd-ring);
}
.form-control::placeholder { color: #a3a9b4; }

/* Disabled must look disabled - which it could not while every field was grey. */
.form-control:disabled, .form-select:disabled, .form-control[readonly] {
  background-color: var(--rd-grey);
  border-color: var(--rd-border);
  color: var(--rd-muted);
  box-shadow: none;
}

.form-control.is-invalid, .form-select.is-invalid { border-color: var(--rd-red); }
.form-control.is-invalid:focus, .form-select.is-invalid:focus { box-shadow: var(--rd-ring); }

textarea.form-control { line-height: 1.55; }

.input-group-text {
  background: var(--rd-grey);
  border: 1px solid #d9dce2;
  font-weight: 600; font-size: .875rem;
  color: #4b5563;
}

/* A file input's button should not look like a primary action. */
.form-control[type="file"] { padding: .45rem .5rem; }
.form-control::file-selector-button {
  background: var(--rd-grey); border: 0;
  border-radius: 6px; padding: .35rem .7rem; margin-inline-end: .75rem;
  font-weight: 600; font-size: .8125rem; color: var(--rd-ink);
  transition: background-color .14s ease;
}
.form-control::file-selector-button:hover { background: var(--rd-grey-2); }
.form-check-input:checked { background-color: var(--rd-red); border-color: var(--rd-red); }
.form-check-input:focus { box-shadow: 0 0 0 .2rem rgba(227, 25, 43, .14); border-color: var(--rd-red); }
.form-text { font-size: .8125rem; }
.invalid-feedback { font-size: .8125rem; font-weight: 500; }

/* --- Choice cards --------------------------------------------------------- */
/*
 * A radio rendered as a card. Bootstrap's .btn-check + .btn-outline-* fills the
 * selected option with solid brand colour and leaves the browser's blue focus
 * ring on top, which reads as a pressed button rather than a chosen option.
 * Selection here is carried by the border, a faint tint and a tick - so two
 * options sit as equals until one is picked.
 */

/* display:block matters: a <label> is inline by default, so each card would
   shrink to its own wording and the options would come out different widths. */
.rd-choice { display: block; position: relative; height: 100%; }
.rd-choice input {
  position: absolute; inset: 0;
  opacity: 0; margin: 0; cursor: pointer;
  /* Kept in the layer above so the whole card is the hit area. */
  z-index: 1;
}

.rd-choice__body {
  display: flex; align-items: flex-start; gap: .8rem;
  height: 100%;
  padding: 1rem 1.05rem;
  background: var(--rd-white);
  border: 1px solid #d9dce2;
  border-radius: var(--rd-radius);
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.rd-choice__icon {
  flex: 0 0 auto;
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: var(--rd-grey);
  color: #4b5563;
  font-size: 1.05rem;
  transition: background-color .15s ease, color .15s ease;
}

.rd-choice__title {
  display: block;
  font-weight: 700; font-size: .9375rem;
  color: var(--rd-black);
  letter-spacing: -.01em;
  line-height: 1.3;
}
.rd-choice__note {
  display: block;
  font-size: .8125rem; line-height: 1.45;
  color: var(--rd-muted);
  margin-top: .1rem;
}

/* The tick only exists once chosen, so nothing shifts when it appears. */
.rd-choice__check {
  position: absolute; top: .7rem; right: .8rem;
  width: 18px; height: 18px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--rd-red); color: #fff;
  font-size: .62rem;
  opacity: 0; transform: scale(.6);
  transition: opacity .15s ease, transform .15s ease;
  pointer-events: none;
}

.rd-choice input:hover + .rd-choice__body { border-color: #b9bfc9; }

.rd-choice input:focus-visible + .rd-choice__body {
  border-color: var(--rd-red);
  box-shadow: var(--rd-ring);
}

.rd-choice input:checked + .rd-choice__body {
  border-color: var(--rd-red);
  background: linear-gradient(180deg, #fffafa 0%, var(--rd-white) 100%);
  box-shadow: var(--rd-ring);
}
.rd-choice input:checked + .rd-choice__body .rd-choice__icon {
  background: var(--rd-red-soft);
  color: var(--rd-red);
}
.rd-choice input:checked ~ .rd-choice__check { opacity: 1; transform: scale(1); }

/* Budget consumption bar, used wherever spend is shown against a commitment. */
.rd-progress {
  height: 4px;
  border-radius: 999px;
  background: var(--rd-grey-2);
  overflow: hidden;
}
.rd-progress > span {
  display: block; height: 100%;
  background: var(--rd-grad-red);
  border-radius: inherit;
}

/* Category chips under a publisher, so a client can see what they cover. */
.rd-choice__tags { display: flex; flex-wrap: wrap; gap: .25rem; margin-top: .4rem; }
.rd-tag {
  font-size: .68rem; font-weight: 600;
  color: #4b5563; background: var(--rd-grey);
  border: 1px solid var(--rd-border);
  border-radius: 999px; padding: .08rem .45rem;
}

/* A publisher who cannot take the work stays visible but unpickable - the
   reason is more useful to the client than an absence. */
.rd-choice.is-disabled { opacity: .62; }
.rd-choice.is-disabled input { cursor: not-allowed; }
.rd-choice.is-disabled .rd-choice__body { background: var(--rd-grey); }
.rd-choice.is-disabled input:hover + .rd-choice__body { border-color: #d9dce2; }

/* --- Stars ----------------------------------------------------------------- */

.rd-stars { color: #f0a500; font-size: .82rem; letter-spacing: .04em; white-space: nowrap; }
.rd-stars--lg { font-size: 1.25rem; }

/*
 * The rating input. Radios in reverse order with a sibling selector, so
 * hovering or selecting a star fills every star to its left - and the value is
 * a plain radio, which keeps it keyboard-operable and working without JS.
 */
.rd-rate {
  /* flex, not inline-flex: as an inline box the next label rides up beside
     the stars instead of starting its own line. */
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: .2rem;
  width: fit-content;
}
.rd-rate input { position: absolute; opacity: 0; width: 0; height: 0; }
.rd-rate label {
  font-size: 1.6rem; line-height: 1; color: var(--rd-grey-2);
  cursor: pointer; transition: color .12s ease, transform .12s ease;
}
.rd-rate label:hover, .rd-rate label:hover ~ label,
.rd-rate input:checked ~ label { color: #f0a500; }
.rd-rate label:hover { transform: scale(1.12); }
.rd-rate input:focus-visible + label { outline: 2px solid var(--rd-red); outline-offset: 3px; border-radius: 4px; }

/* The badge a best-rated publisher carries wherever clients choose one. */
.rd-bestseller {
  display: inline-flex; align-items: center; gap: .25rem;
  font-size: .62rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: #8a5a00; background: #fff5e5; border: 1px solid #ffe2b8;
  border-radius: 4px; padding: .1rem .35rem;
}

/* --- Publisher day planner ------------------------------------------------ */
/*
 * One row per day. Each row is its own form so a publisher saves the day they
 * touched without a single button committing a fortnight of changes at once.
 */
.rd-day {
  display: grid;
  grid-template-columns: 110px 150px 1fr 1fr auto;
  align-items: center;
  gap: .75rem;
  padding: .7rem .85rem;
  border: 1px solid var(--rd-border);
  border-radius: var(--rd-radius-sm);
  background: var(--rd-grey);
}
.rd-day.is-open { background: var(--rd-white); border-color: #cfe3d5; }
.rd-day.is-today { border-color: var(--rd-red); }

.rd-day__dow { font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--rd-muted); }
.rd-day__date { font-weight: 700; color: var(--rd-black); }

@media (max-width: 991.98px) {
  .rd-day { grid-template-columns: 1fr 1fr; }
  .rd-day__when { grid-column: 1 / -1; display: flex; align-items: baseline; gap: .5rem; }
  .rd-day__note, .rd-day__save { grid-column: 1 / -1; }
  .rd-day__save .btn { width: 100%; }
}

/* --- Paid ad slots -------------------------------------------------------- */
/*
 * One slot is visible at a time and the rest are [hidden], so only the ad on
 * screen is in the layout - no stacking, no height jump as they rotate.
 */
.rd-ads { position: relative; }

.rd-ads__slot {
  display: flex; align-items: center; gap: 1rem;
  padding: .85rem 1rem;
  background: var(--rd-white);
  border: 1px solid var(--rd-border);
  border-radius: var(--rd-radius);
  box-shadow: var(--rd-shadow-sm);
  color: var(--rd-ink);
  text-decoration: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.rd-ads__slot:hover { border-color: #cfd3da; box-shadow: var(--rd-shadow); color: var(--rd-ink); }

.rd-ads__media {
  flex: 0 0 auto;
  width: 132px; height: 74px;
  object-fit: cover;
  border-radius: var(--rd-radius-sm);
  background: var(--rd-grey);
}

.rd-ads__body { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.rd-ads__headline {
  font-weight: 700; font-size: .95rem; color: var(--rd-black);
  letter-spacing: -.01em; line-height: 1.3;
}
.rd-ads__text {
  font-size: .8125rem; color: var(--rd-muted); line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* Disclosure. Small, but never absent - a paid slot has to be identifiable. */
.rd-ads__label {
  margin-left: auto; align-self: flex-start; flex: 0 0 auto;
  font-size: .62rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  color: var(--rd-muted);
  background: var(--rd-grey);
  border: 1px solid var(--rd-border);
  border-radius: 4px;
  padding: .1rem .3rem;
}

.rd-ads__dots { display: flex; justify-content: center; gap: .3rem; margin-top: .5rem; }
.rd-ads__dot {
  width: 7px; height: 7px; padding: 0;
  border: 0; border-radius: 50%;
  background: var(--rd-border);
  transition: background-color .15s ease, transform .15s ease;
}
.rd-ads__dot.is-active { background: var(--rd-red); transform: scale(1.25); }

@media (max-width: 575.98px) {
  .rd-ads__slot { flex-wrap: wrap; }
  .rd-ads__media { width: 100%; height: 150px; }
  .rd-ads__label { position: absolute; top: .6rem; right: .7rem; }
}

/* --- Sign-up terms -------------------------------------------------------- */
/*
 * The panel someone has to read before they can accept. The box scrolls rather
 * than the page, so "reached the end" is a question this element can answer.
 */
.rd-terms__scroll {
  max-height: 210px;
  overflow-y: auto;
  padding: .9rem 1rem;
  border: 1px solid #d9dce2;
  border-radius: var(--rd-radius-sm);
  background: var(--rd-white);
  font-size: .8125rem;
  line-height: 1.6;
  color: #4b5563;
  /* The cut-off edge is the cue that there is more below. */
  scroll-behavior: smooth;
}
.rd-terms__scroll:focus-visible { border-color: var(--rd-red); box-shadow: var(--rd-ring); outline: none; }

.rd-terms__scroll > :first-child { margin-top: 0; }
.rd-terms__scroll > :last-child { margin-bottom: 0; }
.rd-terms__scroll h1, .rd-terms__scroll h2,
.rd-terms__scroll h3, .rd-terms__scroll h4 {
  font-size: .875rem; margin: 1rem 0 .4rem; color: var(--rd-black);
}
.rd-terms__scroll ul, .rd-terms__scroll ol { padding-left: 1.2rem; }

.rd-terms__hint {
  font-size: .75rem; font-weight: 600;
  color: var(--rd-red);
  margin-top: .4rem;
}
.rd-terms.is-read .rd-terms__hint { color: #17794a; }

/* --- Tables that become cards on small screens ---------------------------- */

.rd-table { width: 100%; margin: 0; border-collapse: separate; border-spacing: 0; }
.rd-table thead th {
  background: var(--rd-grey);
  font-size: .7rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: var(--rd-muted);
  padding: .7rem 1rem;
  border-bottom: 1px solid var(--rd-border);
  white-space: nowrap;
}
.rd-table tbody td {
  padding: .85rem 1rem;
  border-bottom: 1px solid var(--rd-border);
  vertical-align: middle;
}
.rd-table tbody tr:last-child td { border-bottom: 0; }
.rd-table tbody tr:hover { background: #fafbfc; }
.rd-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

@media (max-width: 767.98px) {
  .rd-table--stack thead { display: none; }
  .rd-table--stack tbody tr {
    display: block;
    border: 1px solid var(--rd-border);
    border-radius: var(--rd-radius-sm);
    margin-bottom: .75rem;
    padding: .35rem .25rem;
    background: #fff;
  }
  .rd-table--stack tbody td {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    border-bottom: 1px dashed var(--rd-border);
    padding: .55rem .85rem;
    text-align: right;
  }
  .rd-table--stack tbody tr td:last-child { border-bottom: 0; }
  .rd-table--stack tbody td::before {
    content: attr(data-label);
    font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
    color: var(--rd-muted);
    text-align: left;
    flex: 0 0 auto;
  }
}

/* --- Empty state ---------------------------------------------------------- */

.rd-empty { padding: 3rem 1.25rem; text-align: center; color: var(--rd-muted); }
.rd-empty__icon {
  width: 58px; height: 58px; border-radius: 16px;
  background: var(--rd-grey); color: var(--rd-muted);
  display: grid; place-items: center; margin: 0 auto 1rem;
  font-size: 1.5rem;
}
.rd-empty h5 { color: var(--rd-black); margin-bottom: .35rem; }

/* --- Slot picker ---------------------------------------------------------- */

.rd-slot-picker { display: flex; align-items: center; gap: .6rem; }
.rd-slot-picker .rd-step {
  width: 46px; height: 46px; flex: 0 0 auto;
  border-radius: var(--rd-radius-sm);
  border: 1px solid var(--rd-border);
  background: var(--rd-white);
  font-size: 1.15rem; font-weight: 700; color: var(--rd-black);
  display: grid; place-items: center;
}
.rd-slot-picker .rd-step:hover:not(:disabled) { border-color: var(--rd-red); color: var(--rd-red); }
.rd-slot-picker .rd-step:disabled { opacity: .4; }
.rd-slot-picker input {
  text-align: center; font-weight: 800; font-size: 1.2rem;
  height: 46px; max-width: 110px;
}

.rd-quickslots { display: flex; flex-wrap: wrap; gap: .4rem; }
.rd-quickslot {
  border: 1px solid var(--rd-border); background: #fff;
  border-radius: 999px; padding: .3rem .8rem;
  font-size: .8125rem; font-weight: 600; color: var(--rd-ink);
}
.rd-quickslot:hover { border-color: var(--rd-red); color: var(--rd-red); }
.rd-quickslot.is-active { background: var(--rd-red); border-color: var(--rd-red); color: #fff; }

/* --- Order summary -------------------------------------------------------- */

.rd-summary { border: 1px solid var(--rd-border); border-radius: var(--rd-radius); overflow: hidden; }
.rd-summary__row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  padding: .7rem 1.1rem;
  border-bottom: 1px solid var(--rd-border);
  font-size: .9375rem;
}
.rd-summary__row span:first-child { color: var(--rd-muted); }
.rd-summary__row span:last-child { font-weight: 700; color: var(--rd-black); text-align: right; }
.rd-summary__row--total {
  background: var(--rd-grad-dark); border-bottom: 0;
  padding: .95rem 1.1rem;
}
.rd-summary__row--total span:first-child { color: rgba(255, 255, 255, .68); font-weight: 600; }
.rd-summary__row--total span:last-child { color: #fff; font-size: 1.3rem; font-weight: 800; }

/* --- Public navbar -------------------------------------------------------- */

.rd-nav {
  background: rgba(255, 255, 255, .96);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--rd-border);
  position: sticky; top: 0; z-index: 1030;
}
.rd-nav .nav-link {
  font-weight: 600; font-size: .9rem; color: #3f434c;
  padding: .5rem .9rem; border-radius: var(--rd-radius-sm);
}
.rd-nav .nav-link:hover, .rd-nav .nav-link.active { color: var(--rd-red); background: var(--rd-red-soft); }

/* --- Panel shell ---------------------------------------------------------- */

.rd-shell { display: flex; min-height: 100vh; }

/*
 * Light, not black.
 *
 * The company logo is a dark wordmark on white, and it has to sit at the top of
 * this panel. On a black sidebar it either disappeared or needed a white plate
 * bolted behind it. Turning the chrome light lets the real artwork sit here
 * untouched. The black is not lost - it still carries the public hero, the
 * order totals and the dark stat tile, where no logo has to survive.
 */
.rd-sidebar {
  width: var(--rd-sidebar-w); flex: 0 0 var(--rd-sidebar-w);
  background: var(--rd-white);
  border-right: 1px solid var(--rd-border);
  color: #4b5563;
  position: fixed; inset: 0 auto 0 0;
  z-index: 1045;
  display: flex; flex-direction: column;
  overflow-y: auto;
}
.rd-sidebar__brand {
  padding: 1.1rem 1.15rem;
  border-bottom: 1px solid var(--rd-border);
  display: flex; align-items: center; justify-content: center;
  min-height: 72px;
}
/* The sidebar is a fixed 254px. A long site name wraps to a tight second line
   rather than being cut with an ellipsis - truncating a company's own name
   looks broken, and the mark stays aligned to the first line either way. */
.rd-sidebar__brand .rd-logo {
  display: flex; align-items: flex-start;
  font-size: .95rem; line-height: 1.25;
  max-width: 100%;
}
.rd-sidebar__brand .rd-logo > span:last-child { min-width: 0; padding-top: .1rem; }
.rd-sidebar__brand .rd-logo__mark { width: 28px; height: 28px; border-radius: 8px; }
.rd-sidebar__nav { padding: .85rem .7rem 2rem; }
.rd-sidebar__heading {
  font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: #9ca3af;
  padding: 1.1rem .75rem .45rem;
}
.rd-sidebar__link {
  display: flex; align-items: center; gap: .7rem;
  padding: .62rem .75rem;
  border-radius: var(--rd-radius-sm);
  color: #4b5563;
  font-size: .875rem; font-weight: 600;
  margin-bottom: .12rem;
  position: relative;
  transition: background-color .14s ease, color .14s ease;
}
.rd-sidebar__link i { font-size: 1.02rem; width: 1.25rem; text-align: center; flex: 0 0 auto; }
.rd-sidebar__link:hover { background: var(--rd-grey); color: var(--rd-black); }
/* Solid red still marks the current page - the one place the brand colour earns
   its keep in the navigation. */
.rd-sidebar__link.is-active {
  background: var(--rd-grad-red); color: #fff;
  box-shadow: 0 1px 2px rgba(179, 17, 31, .2), 0 4px 12px -3px rgba(227, 25, 43, .4);
}
.rd-sidebar__link.is-active:hover { background: var(--rd-grad-red); color: #fff; }
.rd-sidebar__badge {
  margin-left: auto;
  background: var(--rd-red); color: #fff;
  font-size: .68rem; font-weight: 700;
  border-radius: 999px; padding: .05rem .42rem;
}
.rd-sidebar__link.is-active .rd-sidebar__badge { background: rgba(255, 255, 255, .25); }

.rd-main { flex: 1 1 auto; min-width: 0; margin-left: var(--rd-sidebar-w); display: flex; flex-direction: column; }

.rd-topbar {
  background: #fff;
  border-bottom: 1px solid var(--rd-border);
  padding: .7rem 1.25rem;
  display: flex; align-items: center; gap: .85rem;
  position: sticky; top: 0; z-index: 1020;
}
.rd-topbar__title { font-size: 1.05rem; font-weight: 700; margin: 0; }
.rd-content { padding: 1.35rem; flex: 1 1 auto; }

.rd-burger {
  display: none;
  width: 42px; height: 42px; flex: 0 0 auto;
  border: 1px solid var(--rd-border); background: #fff;
  border-radius: var(--rd-radius-sm); font-size: 1.15rem;
}

.rd-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(22, 26, 33, .5);
  z-index: 1040;
}

@media (max-width: 991.98px) {
  /* Sliding over the page, a white panel needs a shadow to separate from the
     white content behind it - the black one used to do that by contrast. */
  .rd-sidebar {
    transform: translateX(-100%);
    transition: transform .24s ease;
    box-shadow: var(--rd-shadow-lg);
  }
  body.rd-nav-open .rd-sidebar { transform: translateX(0); }
  body.rd-nav-open .rd-backdrop { display: block; }
  .rd-main { margin-left: 0; }
  .rd-burger { display: grid; place-items: center; }
  .rd-content { padding: 1rem; }
}

/* --- Timeline ------------------------------------------------------------- */

.rd-timeline { list-style: none; margin: 0; padding: 0 0 0 1.4rem; position: relative; }
.rd-timeline::before {
  content: ""; position: absolute; left: 5px; top: .4rem; bottom: .4rem;
  width: 2px; background: var(--rd-border);
}
.rd-timeline__item { position: relative; padding: 0 0 1.15rem .35rem; }
.rd-timeline__item::before {
  content: ""; position: absolute; left: -1.4rem; top: .35rem;
  width: 12px; height: 12px; border-radius: 50%;
  background: #fff; border: 3px solid var(--rd-border);
}
.rd-timeline__item.is-current::before { border-color: var(--rd-red); box-shadow: 0 0 0 4px var(--rd-red-soft); }
.rd-timeline__title { font-weight: 700; font-size: .9375rem; color: var(--rd-black); }
.rd-timeline__meta { font-size: .8125rem; color: var(--rd-muted); }
.rd-timeline__note { font-size: .875rem; margin-top: .2rem; }

/* --- Hero & marketing sections -------------------------------------------- */

.rd-hero {
  background: var(--rd-grad-dark);
  color: #fff;
  position: relative;
  overflow: hidden;
  padding: clamp(3rem, 2rem + 6vw, 6rem) 0;
}
.rd-hero::before {
  content: "";
  position: absolute; right: -10%; top: -30%;
  width: 620px; height: 620px; border-radius: 50%;
  background: radial-gradient(circle, rgba(227, 25, 43, .38) 0%, rgba(227, 25, 43, 0) 65%);
}
.rd-hero h1 { color: #fff; }
.rd-hero p.lead { color: rgba(255, 255, 255, .74); font-size: 1.075rem; }
.rd-hero__grid {
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.8), transparent 75%);
}

/* --- Auth split layout ---------------------------------------------------- */
/*
 * The brand side holds the viewport and stays put while a long form scrolls
 * next to it. Sticky rather than fixed, so it still participates in the grid
 * and needs no magic offsets.
 */
.rd-authside {
  position: sticky; top: 0;
  height: 100vh;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 2.75rem;
  /* Light, so the logo can be the real artwork. The red is still here, just as
     a wash across the top-left rather than a black field. */
  background:
    radial-gradient(120% 90% at 8% -12%, rgba(227, 25, 43, .13) 0%, rgba(227, 25, 43, 0) 60%),
    linear-gradient(165deg, #ffffff 0%, #f7f8fa 58%, #eef0f4 100%);
  color: var(--rd-ink);
  border-right: 1px solid var(--rd-border);
  overflow: hidden;
}
/* Lift the real content above the texture - but not the texture itself, which
   must stay absolutely positioned or it becomes a flex item and pushes the
   logo down the panel. */
.rd-authside > *:not(.rd-hero__grid) { position: relative; z-index: 1; }
.rd-authside > .rd-hero__grid {
  z-index: 0;
  /* The shared grid draws white dots for the dark public hero; on this light
     panel they have to be ink instead or nothing shows. */
  background-image: radial-gradient(rgba(22, 26, 33, .07) 1px, transparent 1px);
}

.rd-authside__lead {
  color: var(--rd-muted);
  max-width: 40ch;
  margin-bottom: 1.6rem;
  line-height: 1.65;
}

.rd-authside__list { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.rd-authside__list li {
  display: flex; align-items: flex-start; gap: .6rem;
  color: #4b5563;
  font-size: .9rem;
}
.rd-authside__list i { color: var(--rd-red); font-size: .95rem; line-height: 1.55; }

.rd-authside__foot { color: #9ca3af; font-size: .8125rem; }

/* The form side: generous gutters, and never wider than a comfortable measure. */
.rd-authform {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 2rem 1.25rem;
}
.rd-authform__inner { width: 100%; max-width: 448px; }

@media (min-width: 992px) {
  .rd-authform { padding: 3.5rem 3rem; }
}

.rd-section { padding: clamp(2.5rem, 2rem + 3vw, 4.5rem) 0; }
.rd-section--grey { background: var(--rd-grey); }
.rd-section--white { background: #fff; }

.rd-service-card { height: 100%; padding: 1.5rem; }
.rd-service-card__icon {
  width: 48px; height: 48px; border-radius: 13px;
  background: var(--rd-red-soft); color: var(--rd-red);
  display: grid; place-items: center; font-size: 1.35rem;
  margin-bottom: 1rem;
}
.rd-price-tag {
  display: inline-flex; align-items: baseline; gap: .25rem;
  font-weight: 800; color: var(--rd-black); font-size: 1.5rem; letter-spacing: -.02em;
}
.rd-price-tag small { font-size: .78rem; font-weight: 600; color: var(--rd-muted); letter-spacing: 0; }

/* --- Availability --------------------------------------------------------- */

.rd-avail {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .8rem 1rem;
  border: 1px solid var(--rd-border); border-radius: var(--rd-radius-sm);
  background: #fff;
}
.rd-avail__count { font-size: 1.25rem; font-weight: 800; color: var(--rd-black); line-height: 1.1; }
.rd-avail__count small { font-size: .72rem; font-weight: 600; color: var(--rd-muted); display: block; }
.rd-avail--empty { background: var(--rd-grey); }
.rd-avail--empty .rd-avail__count { color: var(--rd-muted); }
.rd-avail__bar { height: 5px; border-radius: 999px; background: var(--rd-grey-2); overflow: hidden; margin-top: .5rem; }
.rd-avail__bar span { display: block; height: 100%; background: var(--rd-red); border-radius: 999px; }

/* --- Banner rotation ------------------------------------------------------ */

.rd-banner { border-radius: var(--rd-radius); overflow: hidden; box-shadow: var(--rd-shadow-sm); }
.rd-banner .carousel-item img { width: 100%; height: auto; display: block; }
.rd-banner .carousel-indicators { margin-bottom: .35rem; }
.rd-banner .carousel-indicators [data-bs-target] { width: 22px; height: 3px; border-radius: 999px; }

/* --- Telegram float ------------------------------------------------------- */

.rd-telegram {
  position: fixed; right: 18px; bottom: 18px; z-index: 1035;
  display: inline-flex; align-items: center; gap: .5rem;
  background: #229ed9; color: #fff;
  padding: .7rem 1.05rem;
  border-radius: 999px; font-weight: 700; font-size: .875rem;
  box-shadow: 0 8px 24px rgba(34, 158, 217, .38);
}
.rd-telegram:hover { color: #fff; background: #1c8ec3; }
.rd-telegram i { font-size: 1.15rem; }

/* Collapse to a circle on phones so it never covers a form control. */
@media (max-width: 575.98px) {
  .rd-telegram { right: 14px; bottom: 78px; padding: .75rem; }
  .rd-telegram span { display: none; }
}

/* Keep the float clear of the sticky order bar. */
body.rd-has-actionbar .rd-telegram { bottom: 88px; }

/* --- Sticky mobile action bar --------------------------------------------- */

.rd-actionbar {
  position: fixed; inset: auto 0 0 0; z-index: 1032;
  background: #fff; border-top: 1px solid var(--rd-border);
  padding: .7rem 1rem calc(.7rem + env(safe-area-inset-bottom));
  display: none;
  align-items: center; justify-content: space-between; gap: 1rem;
  box-shadow: 0 -4px 20px rgba(22, 26, 33, .08);
}
.rd-actionbar__total { font-size: .72rem; color: var(--rd-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.rd-actionbar__value { font-size: 1.15rem; font-weight: 800; color: var(--rd-black); line-height: 1.1; }

@media (max-width: 991.98px) {
  .rd-actionbar { display: flex; }
  body.rd-has-actionbar { padding-bottom: 84px; }
}

/* --- Footer --------------------------------------------------------------- */

.rd-footer {
  background: var(--rd-white);
  border-top: 1px solid var(--rd-border);
  color: var(--rd-muted);
  padding: 3rem 0 1.5rem;
}
.rd-footer h6 { color: var(--rd-black); font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: .9rem; }
.rd-footer a { color: #4b5563; font-size: .9rem; }
.rd-footer a:hover { color: var(--rd-red); }
.rd-footer__bottom {
  border-top: 1px solid var(--rd-border);
  margin-top: 2.25rem; padding-top: 1.25rem;
  font-size: .8125rem; color: #9ca3af;
}

/* --- Misc ----------------------------------------------------------------- */

.rd-copy { cursor: pointer; }
.rd-mono { font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace; font-size: .85em; }
.rd-truncate { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rd-qr { background: #fff; padding: .75rem; border-radius: var(--rd-radius-sm); border: 1px solid var(--rd-border); display: inline-block; }
.rd-qr svg { display: block; width: 100%; height: auto; max-width: 200px; }
.rd-avatar {
  width: 38px; height: 38px; border-radius: 50%; flex: 0 0 auto;
  background: var(--rd-red-soft); color: var(--rd-red);
  display: grid; place-items: center; font-weight: 700; font-size: .8125rem;
  object-fit: cover;
}
.rd-avatar--staff { background: var(--rd-black); color: #fff; }
.alert { border-radius: var(--rd-radius-sm); border-width: 0; border-left-width: 3px; font-size: .9rem; }
.modal-content { border: 0; border-radius: var(--rd-radius); }
.dropdown-menu { border-color: var(--rd-border); border-radius: var(--rd-radius-sm); box-shadow: var(--rd-shadow); font-size: .9rem; }
.pagination { --bs-pagination-color: var(--rd-ink); --bs-pagination-active-bg: var(--rd-red); --bs-pagination-active-border-color: var(--rd-red); --bs-pagination-border-color: var(--rd-border); }
