/* Dropdowns sitewide: custom arrow sits 12px inside the right edge, never on the border. */
select:not([multiple]):not([size]) {
  -webkit-appearance: none; appearance: none;
  padding-right: 40px;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%230a0a0a' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5.5 7.5 10 12l4.5-4.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 18px;
  text-overflow: ellipsis;
}

/* Text fields sitewide: no blue border or glow on hover or focus. The border only goes near-black. */
textarea:hover, textarea:focus, textarea:focus-visible,
input:not([type=checkbox]):not([type=radio]):hover, input:not([type=checkbox]):not([type=radio]):focus,
select:hover, select:focus {
  outline: none !important; box-shadow: none !important; --tw-ring-shadow: 0 0 #0000 !important; --tw-ring-offset-shadow: 0 0 #0000 !important;
}
textarea:focus, input:not([type=checkbox]):not([type=radio]):not([type=file]):focus, select:focus { border-color: #0a0a0a !important; }

/* No grey outlines on cards, tiles and panels. Form fields keep their border so they stay visible. */
:is([class*="border-slate-"], [class*="border-gray-"], [class*="border-zinc-"], [class*="border-neutral-"]):not(input):not(select):not(textarea):not(button):not(th):not(td):not(tr) {
  border-color: transparent !important;
}
.divide-y > :not([hidden]) ~ :not([hidden]), .divide-slate-100 > * { border-color: transparent !important; }

/* Back button: arrow + label in a soft pill */
.back-link { display: inline-flex !important; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px 0 10px; border-radius: 999px; background: #fff; color: #0a0a0a !important; font-size: .92rem !important; font-weight: 650; line-height: 1; text-decoration: none; transition: background-color .15s, transform .12s; }
.back-link:hover { background: #e7f2f9; }
.back-link:active { transform: scale(.96); }
.back-ico { width: 18px; height: 18px; flex: none; stroke-width: 2.2; }

/* ====================================================================
 * Brand blue is a gradient everywhere it fills a surface (buttons, bands,
 * avatars, badges, progress). One definition, applied sitewide.
 * ==================================================================== */
:root { --tmd-grad: linear-gradient(135deg, #2d9cd6 0%, #0070ac 52%, #00507f 100%); --tmd-grad-h: linear-gradient(135deg, #1f8bc6 0%, #005f94 52%, #00436b 100%); }

/* buttons */
body.auth .btn:not(.ghost), .ch-btn-primary, .btn-soft, .btn-primary, .pf-btn.p, .ap-b.p, .rv-go, .rs-btn.primary, .ck-btn.p, .adm-btn.primary,
.hrs-save, .dq-b.ok:not([class*="green"]), .bg-sky-500, .bg-sky-600, .bg-sky-700, .bg-blue-600, .bg-blue-500 { background-image: var(--tmd-grad) !important; background-color: #0070ac; }
@media (hover: hover) {
body.auth .btn:not(.ghost):hover, .ch-btn-primary:hover, .btn-soft:hover, .btn-primary:hover, .pf-btn.p:hover, .ap-b.p:hover, .rv-go:hover, .rs-btn.primary:hover,
.ck-btn.p:hover, .adm-btn.primary:hover, .hrs-save:hover, .hover\:bg-sky-600:hover, .hover\:bg-sky-700:hover { background-image: var(--tmd-grad-h) !important; }
}
body.auth .btn[disabled], .rv-go[disabled] { background-image: var(--tmd-grad) !important; }

/* bands, headers, selected states, avatars, badges, progress */
.side, .ring, .ch-d-head, .closing, .ck-l2, .ck-l4, .ck-bar span, .ck-ps, .rq-kind input:checked + .rq-card, .role input:checked + .body,
.ch-av, .adm-av, .adm-b:not(.red):not(.amber):not(.violet), .pf-on, .chip[aria-pressed="true"], .ch-chip.on { background-image: var(--tmd-grad) !important; }
.ring { background-color: #0070ac; }
.role input:checked + .body { background-color: #0070ac; }

/* App: "Back" is pinned to the top bar, on the same line as the round menu button, and never scrolls away. */
@media (max-width: 960px) {
  body:not(.adm) .back-link {
    position: fixed !important; z-index: 1100;
    top: calc(5px + env(safe-area-inset-top)); left: calc(62px + env(safe-area-inset-left));
    height: 42px; min-height: 42px; margin: 0 !important; padding: 0 16px 0 12px;
    background: #fff; box-shadow: 0 2px 12px rgba(0, 0, 0, .18);
  }
  body:not(.adm) .back-link[hidden] { display: none !important; }
}

/* Touch screens: every typing field is at least 16px, which is what stops phones from zooming in when you tap one. */
@media (max-width: 960px), (pointer: coarse) {
  input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=file]), select, textarea { font-size: 16px !important; }
  a, button, input, select, textarea, label { touch-action: manipulation; }
}

/* Selected role tile on the sign-up page: gradient fill, so every bit of text and the icon inside must be white. */
.role input:checked + .body, .role input:checked + .body * { color: #fff !important; }
.role input:checked + .body { border-color: transparent; box-shadow: none; }

/* Cloudflare Turnstile: sits above the submit button, full width of the form */
.ts-wrap { display: block; min-height: 65px; margin: 4px 0 2px; }
.ts-wrap .cf-turnstile { width: 100%; }


/* White buttons that sit on a blue card keep a white look on hover (a darker gradient would hide their dark text) */
.m-about-hero .btn-primary, .m-about-hero .btn-primary:hover { background-image: none !important; background-color: #fff; color: #005a8c; }
@media (hover: hover) { .m-about-hero .btn-primary:hover { background-color: #e6f2fa; } }

/* "Choose file" buttons are small everywhere (the field's own text stays at 16px so phones do not zoom). */
input[type="file"]::file-selector-button,
.m-form .fld-file input::file-selector-button,
.field input[type="file"]::file-selector-button {
  margin-right: 10px !important; padding: 4px 10px !important; border: 0 !important; border-radius: 8px !important;
  background: #fff !important; color: #0a0a0a !important; font-family: inherit; font-size: 12px !important; font-weight: 700 !important; line-height: 1.4; cursor: pointer;
}
input[type="file"] { font-size: 13px; }
