/* Dash Faucet account pages. Brand navy and Dash blue, like the public faucet;
   monospace only where the content is code (keys, codes, commands). */
:root { --navy-1: var(--dh-page); --navy-2: var(--dh-page); --surface: var(--dh-surface); --surface-2: var(--dh-sunken); --rule: var(--dh-line); --text: var(--dh-ink); --muted: var(--dh-ink-2); --blue: var(--dh-brand-ink); --blue-hover: var(--dh-brand-ink); --focus: var(--dh-focus); --green: var(--dh-good); --red: var(--dh-bad); --amber: var(--dh-warn); --radius: var(--dh-r3); --mono: var(--dh-mono); }

* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--navy-2); }
body {
  font-family: var(--dh-font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--dh-page);
  min-height: 100vh;
  padding: 0;
}
[hidden] { display: none !important; }
a { color: var(--dh-brand-ink); text-underline-offset: 3px; }
a:hover { color: var(--dh-brand-ink); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px;  }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.fine { font-size: 13px; }


/* Top bar */
.topbar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 22px 0; margin-bottom: 28px; border-bottom: 1px solid var(--rule);
}
.brand { color: var(--blue); font-weight: 700; font-size: 17px; text-decoration: none; letter-spacing: -0.01em; }
.brand:hover { color: var(--blue-hover); }
.crumb { color: var(--muted); font-size: 15px; }
.crumb::before { content: "/"; margin-right: 14px; color: var(--rule); }
.who { margin-left: auto; display: flex; align-items: center; gap: 16px; font-size: 14px; }
.who-name { color: var(--muted); max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Type */
h2 { font-size: 17px; font-weight: 600; margin-bottom: 6px; }
.lede { color: var(--muted); max-width: 62ch; margin-bottom: 22px; }
.intro { margin-bottom: 26px; }

/* Forms */
label.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
label.field .hint { font-size: 12px; color: var(--dh-ink-2); }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px 16px; }
.form-actions { display: flex; gap: 10px; align-items: center; margin-top: 18px; flex-wrap: wrap; }

/* Regions */

.section { margin-bottom: 34px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }

/* Sign-in */

.providers { display: flex; gap: 12px; flex-wrap: wrap; margin: 6px 0 14px; }

/* The key slip: the one loud element. */

.slip-title { font-weight: 600; margin-bottom: 14px; }
.slip-key {
  font-family: var(--mono); font-size: 19px; line-height: 1.4; letter-spacing: 0.01em;
  word-break: break-all; padding: 14px 16px; border-radius: var(--radius);
  background: var(--dh-sunken); border: 1px dashed var(--dh-good); user-select: all;
}
.slip .form-actions { margin-top: 14px; }
@media (prefers-reduced-motion: no-preference) {
  .slip:not([hidden]) { animation: slip-in 220ms ease-out; }
  @keyframes slip-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
}

.snippet { margin-top: 18px; }
.snippet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; color: var(--muted); font-size: 13px; }
pre {
  font-family: var(--mono); font-size: 13px; line-height: 1.6; white-space: pre-wrap; word-break: break-all;
  background: var(--dh-sunken); border: 1px solid var(--rule); border-radius: var(--radius); padding: 14px 16px;
}

/* Create row */
.create { display: flex; gap: 10px; }
.create input { flex: 1; }

/* Key list */
.key-list { list-style: none; border-top: 1px solid var(--rule); }
.key-row {
  display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; align-items: center;
  padding: 14px 2px; border-bottom: 1px solid var(--rule);
}
.key-name { font-weight: 600; }
.key-name .mono { font-weight: 400; color: var(--muted); font-size: 12.5px; margin-left: 8px; }
.key-meta { grid-column: 1; display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.key-side { grid-column: 2; grid-row: 1 / span 2; display: flex; align-items: center; gap: 6px; }
.empty { color: var(--muted); padding: 18px 2px; }
details.past { margin-top: 14px; color: var(--muted); font-size: 14px; }
details.past summary { cursor: pointer; padding: 6px 0; }
details.past .key-row { opacity: 0.7; }

/* Tables (admin) */
.table-wrap { overflow-x: auto; }

td.actions { text-align: right; white-space: nowrap; }
td .sub { display: block; color: var(--muted); font-size: 12.5px; }
.usage { min-width: 130px; }

.bar { height: 4px; border-radius: 2px; background: var(--rule); margin-top: 6px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--blue); }
.toolbar { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.toolbar input[type=checkbox] { width: auto; height: auto; accent-color: var(--blue); }

/* Dialogs */
dialog { margin: auto; background: var(--surface); color: var(--text); border: 1px solid var(--rule); border-radius: var(--dh-r3); padding: 24px; width: min(620px, 92vw); }
dialog::backdrop { background: rgba(5, 8, 20, 0.7); }
dialog h2 { margin-bottom: 14px; }

@media (max-width: 640px) {
  .create { flex-direction: column; }
  .create input { flex: none; }
  .key-row { grid-template-columns: 1fr; }
  .key-side { grid-column: 1; grid-row: auto; }
  .who { margin-left: 0; gap: 8px; }
  .who-name { display: none; }

}

.signin { margin-block: 24px; }
.page-admin .signin { max-width: var(--dh-w-narrow); }
.dh-card, .slip { margin-bottom: 26px; }
.dh-tabs, .dh-seg { margin-bottom: 18px; }

body > main { width: 100%; }
