/* Shared form baseline for public pages and SysAdmin. Keep overrides local. */
:root { color-scheme: dark; }
:where(input:not([type]), input[type=text], input[type=email], input[type=password],
  input[type=search], input[type=url], input[type=tel], input[type=number],
  input[type=date], input[type=time], input[type=datetime-local], textarea, select) {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  caret-color: var(--amber);
  font: inherit;
  font-size: 16px;
  line-height: 1.5;
  transition: border-color .18s ease, box-shadow .18s ease;
}
:where(textarea) { resize: vertical; }
:where(input, textarea)::placeholder { color: var(--text-dim); opacity: .8; }
:where(input, textarea, select):focus {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
  border-color: var(--amber);
}
:where(button, a, summary):focus-visible { outline: 2px solid var(--amber); outline-offset: 4px; }
/* .form-action and .form-action-secondary are styled with the .tc-btn family in theme.css. */
/* One field label and one field hint. Public pages give bare <label> the same look in the page shell. */
.tc-label { display: block; margin: 0; padding: 0; font: 500 12px/1.4 var(--font-text); letter-spacing: .1em; text-transform: uppercase; color: var(--text-dim); }
.tc-hint { display: block; margin: 6px 0 0; font: 13px/1.5 var(--font-text); letter-spacing: 0; text-transform: none; color: var(--text-dim); overflow-wrap: anywhere; }
.tc-hint.is-error { color: var(--danger); }
.form-disclosure { box-sizing: border-box; min-height: 44px; padding: 12px 0; cursor: pointer; overflow-wrap: anywhere; }
:where(input, textarea, select)[aria-invalid=true] { border-color: #e58c7a; }
:where(input, textarea, select):disabled { opacity: .55; cursor: not-allowed; }
/* Chromium/WebKit otherwise paint saved credentials pale blue on dark pages. */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text);
  -webkit-box-shadow: 0 0 0 1000px var(--bg) inset;
  caret-color: var(--amber);
}
input:autofill { color: var(--text); box-shadow: 0 0 0 1000px var(--bg) inset; }
[hidden] { display: none !important; }
/* One checkbox with its label: the whole line is the 44px target. */
.tc-check { display: flex; align-items: center; gap: 12px; min-height: 44px; margin: 0; cursor: pointer; font: 15px/1.4 var(--font-text); letter-spacing: 0; text-transform: none; color: var(--text); overflow-wrap: anywhere; }
.tc-check input { flex: 0 0 auto; width: 22px; height: 22px; margin: 0; accent-color: var(--amber); }
/* One deployment in an inventory: a tile inside a page or a card, never a card of its own.
   Tiles share a grid; its facts are label/value rows, with long ids wrapping in place. */
.deployment-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 12px; margin: 0 0 12px; }
.deployment-card { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.deployment-head { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; margin-bottom: 10px; }
.deployment-card h3 { margin: 0; font-size: 20px; line-height: 1.25; }
.deployment-card h3 a { color: inherit; }
.deployment-facts { display: grid; gap: 6px; margin: 0; }
.deployment-facts div { display: grid; grid-template-columns: 7.5em minmax(0, 1fr); gap: 12px; }
.deployment-facts dt { color: var(--text-dim); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; line-height: 1.9; }
.deployment-facts dd { margin: 0; font-size: 14px; line-height: 1.55; min-width: 0; }
.deployment-facts code { font-size: 12px; color: var(--text-dim); word-break: break-all; }
.deployment-card p { margin: 8px 0 0; font-size: 14px; line-height: 1.55; color: var(--text-dim); }
.deployment-card .tc-alert { margin: 10px 0 0; }
.deployment-cleanup { margin-top: 8px; }
.deployment-cleanup p { margin: 0 0 4px; }
.deployment-manage { margin: 0 0 8px; }
/* SysAdmin: a LunaNode tent's volumes, any still to attach, and Attach volume. */
.deployment-volumes { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--rule); }
.deployment-volumes h4 { margin: 0 0 4px; color: var(--text-dim); font-size: 11px; font-weight: 400; letter-spacing: .08em; text-transform: uppercase; }
.deployment-volume-list { margin: 0; padding: 0; list-style: none; font-size: 14px; line-height: 1.55; }
.deployment-volume-list code { font-size: 12px; }
.deployment-volume-pending { display: grid; gap: 6px; justify-items: start; margin-top: 8px; }
.deployment-volume-add { margin-top: 8px; }
.deployment-volume-add .tent-form { gap: 12px; margin-top: 8px; }
.deployment-account { margin: 0 0 28px; }
.deployment-account-head { display: flex; align-items: baseline; gap: 6px 14px; flex-wrap: wrap; margin-bottom: 12px; }
.deployment-account-head h3 { margin: 0; font-size: 20px; }
.tent-inventory { max-width: 1080px; min-width: 0; }
.tent-inventory > .tent-note { margin: -4px 0 18px; }
@media (max-width: 420px) { .deployment-facts div { grid-template-columns: 1fr; gap: 0; } }
.fleet-page { max-width: 1080px; margin: 0 auto; min-width: 0; }
.fleet-heading { margin-bottom: 24px; }
.fleet-panel { margin-bottom: 24px; }
.fleet-panel p { margin: 12px 0 20px; color: var(--text-dim); }
.fleet-panel label { display: block; margin: 0 0 8px; }
.fleet-panel small { display: block; margin-top: 8px; color: var(--text-dim); }
.fleet-panel fieldset { border: 0; min-width: 0; }
.fleet-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px; }
.fleet-form details { margin: 24px 0; }
.fleet-form summary { padding: 12px 0; cursor: pointer; min-height: 44px; }
.fleet-form .fleet-primary { margin-top: 8px; }
.fleet-host { overflow-wrap: anywhere; }
.fleet-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.fleet-panel textarea { margin-bottom: 24px; }
#show-secret { margin-top: 12px; }
@media (max-width: 600px) { .fleet-fields { grid-template-columns: 1fr; } .card.fleet-panel { padding: 20px 16px; } }
.tent-orders { max-width: 1080px; min-width: 0; margin-bottom: 32px; }
.tent-inventory-title { font-family: 'Cormorant Garamond', serif; font-weight: 600; color: var(--text); }
.tent-intro p, .tent-meta, .tent-note, .tent-field small, .tent-choice small { color: var(--text-dim); }
.tent-intro p { margin: 6px 0 20px; }
.tent-panel { margin-bottom: 20px; min-width: 0; }
.tent-head h2 { margin: 0; }
.tent-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tent-meta { margin: 6px 0 14px; overflow-wrap: anywhere; }
.tent-form { display: grid; gap: 18px; margin-top: 14px; }
.tent-form .tc-btn, .tent-form .form-action { justify-self: start; }
.tent-field { display: grid; gap: 8px; min-width: 0; }
.tent-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.tent-runtimes { border: 0; min-width: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tent-runtimes legend { margin-bottom: 8px; }
.tent-choice { position: relative; display: block; cursor: pointer; }
.tent-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tent-choice span { display: grid; gap: 4px; min-height: 64px; padding: 12px 14px; border: 1px solid var(--rule); border-radius: 6px; font-size: 15px; color: var(--text); }
.tent-choice small { font-size: 12px; }
.tent-choice input:checked + span { border-color: var(--amber); box-shadow: inset 0 0 0 1px var(--amber); }
.tent-choice input:focus-visible + span { outline: 2px solid var(--amber); outline-offset: 2px; }
.tent-claws { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.tent-claw { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr) minmax(0, 1fr) minmax(0, 1.5fr) minmax(0, 1.5fr); gap: 10px 20px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.tent-claw p { margin: 4px 0 0; overflow-wrap: anywhere; }
.tent-claw form { margin-top: 8px; }
.tent-account { min-width: 0; }
.tent-address { overflow-wrap: anywhere; margin-right: 4px; }
.tent-reset .form-disclosure { color: var(--amber); }
.tent-reset form { display: grid; gap: 8px; justify-items: start; margin-top: 0; }
.tent-reset .tent-note { margin: 0; }
/* A CLAW's SOUL.md takes the whole row: its editor needs the width. */
.tent-soul { grid-column: 1 / -1; }
.tent-soul textarea { width: 100%; }
/* Delete CLAW: the whole row too, its warning read in full; Remove and Delete keep Cancel beside them. */
.tent-delete { grid-column: 1 / -1; }
.tent-delete .form-disclosure { color: var(--danger); }
.tent-actions { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 900px) { .tent-claw { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tent-services { grid-column: 1 / -1; } }
.tent-role, .tent-label { color: var(--text-dim); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.tent-label { display: block; margin-bottom: 2px; }
.tent-receipt { display: block; color: var(--text-dim); font-size: 11px; overflow-wrap: anywhere; }
.tent-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--amber); margin-left: 6px; }
.tent-add, .tent-delete { margin-top: 12px; border-top: 1px solid var(--rule); }
.tent-delete .delete-account { margin: 4px 0 12px; }
.tent-delete ul { padding-left: 20px; margin: 8px 0; overflow-wrap: anywhere; }
.tent-delete .delete-actions { margin-top: 12px; }
.tent-inventory-title { font-size: 26px; margin: 8px 0 12px; }
.tent-runtimes.tent-source { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tent-jobs { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; }
.tent-jobs form { margin-top: 8px; }
.tent-check { margin-top: 14px; }
@media (max-width: 600px) { .tent-fields, .tent-runtimes, .tent-runtimes.tent-source, .tent-claw { grid-template-columns: 1fr; } .card.tent-panel { padding: 20px 16px; } }
@media (prefers-reduced-motion: reduce) {
  :where(input, textarea, select) { transition: none; }
}
