/*
 * Staff-facing console. Not ported from a single reference file -- built in the same
 * idiom: 960px column (per businesses.css), the shared palette, uppercase futura for
 * structure and minion-pro for content. Weights stay at 400/500.
 */

#admin {
  padding: 40px 0 80px;
}

#admin .container {
  width: 960px;
  margin: 0 auto;
}

#admin .page-head {
  position: relative;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(0, 0, 0, .1);
}

#admin .page-head h2 {
  font-size: 24px;
  line-height: 30px;
  font-weight: 400;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 1px;
}

#admin .page-head p {
  margin-top: 8px;
  font-size: 16px;
  line-height: 22px;
  font-family: var(--font-body);
  color: var(--text-muted);
}

#admin .page-head .actions {
  position: absolute;
  top: 0;
  right: 0;
}

#admin .page-head .actions form {
  display: inline-block;
}

/* Status pills */
#admin .pill {
  display: inline-block;
  padding: 4px 9px;
  font-size: 11px;
  line-height: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: 3px;
  vertical-align: middle;
}

#admin .pill.open    { color: #fff; background: var(--accent); }
#admin .pill.draft   { color: var(--text-muted); background: var(--bg-placeholder); }
#admin .pill.closed  { color: #fff; background: var(--text-muted); }
#admin .pill.done    { color: #fff; background: #3a9a5c; }
#admin .pill.waiting { color: var(--text-muted); background: var(--bg-placeholder); }
#admin .pill.failed  { color: #fff; background: var(--error); }

/* Summary tiles */
#admin .stats {
  margin-top: 24px;
  font-size: 0;
}

#admin .stats .stat {
  display: inline-block;
  width: 33.33%;
  box-sizing: border-box;
  padding: 18px 20px;
  background: var(--bg-tint);
  border-right: 1px solid #fff;
  vertical-align: top;
}

#admin .stats .stat:last-child { border-right: none; }

#admin .stats .stat strong {
  display: block;
  font-size: 32px;
  line-height: 36px;
  font-weight: 500;
  color: var(--text);
}

#admin .stats .stat span {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  line-height: 14px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Tables */
#admin table {
  width: 100%;
  margin-top: 24px;
  border-collapse: collapse;
}

#admin table th {
  padding: 10px 12px;
  font-size: 12px;
  line-height: 14px;
  font-weight: 500;
  color: var(--text-muted);
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 1px solid var(--border);
}

#admin table td {
  padding: 14px 12px;
  font-size: 15px;
  line-height: 20px;
  font-family: var(--font-body);
  color: var(--text);
  border-bottom: 1px solid rgba(0, 0, 0, .08);
  vertical-align: middle;
}

#admin table td.name {
  font-family: var(--font-ui);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 14px;
}

#admin table td.name small {
  display: block;
  margin-top: 4px;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 13px;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text-muted);
}

#admin table td.actions {
  text-align: right;
  white-space: nowrap;
}

#admin table td.actions form,
#admin table td.actions a,
#admin table td.actions button {
  display: inline-block;
  margin-left: 6px;
  vertical-align: middle;
}

#admin table tr.inactive td { opacity: .5; }

#admin table td .error-note {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  line-height: 17px;
  color: var(--error);
}

/* Excludes .button deliberately: `#admin a` (1-0-1) outranks `.button` (0-1-0), so a bare
   `#admin a` rule would repaint link-buttons accent-blue on their near-black background.
   The explicit a.button rules below restate the button colours at winning specificity. */
#admin a:not(.button) { color: var(--accent); }

#admin a.button { color: #fff; }
#admin a.button.secondary { color: var(--text); }
#admin a.button.secondary:hover { color: var(--accent); }
#admin a.button.danger { color: var(--error); }
#admin a.button.danger:hover { color: #fff; }

#admin .empty {
  margin-top: 30px;
  padding: 50px 20px;
  font-size: 16px;
  line-height: 24px;
  font-family: var(--font-body);
  color: var(--text-muted);
  text-align: center;
  background: var(--bg-tint);
  border-radius: 5px;
}

/* Forms inside admin reuse the portal field pattern at a narrower width. */
#admin .form-column {
  max-width: 620px;
  margin-top: 24px;
}

#admin .field { margin-top: 18px; }

#admin .field label {
  display: block;
  margin-bottom: 7px;
  font-size: 14px;
  line-height: 14px;
  font-weight: 500;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 1px;
}

#admin .field input[type=text],
#admin .field input[type=email],
#admin .field input[type=date],
#admin .field input[type=password],
#admin .field textarea {
  display: block;
  width: 100%;
  padding: 7px;
  font-size: 16px;
  line-height: 20px;
  color: var(--text);
  font-family: var(--font-body);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 3px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
  box-sizing: border-box;
}

#admin .field textarea { min-height: 90px; resize: vertical; }
#admin .field textarea.tall { min-height: 220px; }

#admin .field .hint {
  margin-top: 6px;
  font-size: 13px;
  line-height: 18px;
  font-family: var(--font-body);
  color: var(--text-muted);
}

#admin .field.checkbox label {
  text-transform: none;
  letter-spacing: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 15px;
}

#admin .errors {
  margin-top: 18px;
  padding: 14px 18px;
  border: 1px solid var(--error);
  border-radius: 3px;
}

#admin .errors li {
  list-style: none;
  font-size: 15px;
  line-height: 20px;
  font-family: var(--font-body);
  color: var(--error);
}

#admin .form-actions { margin-top: 24px; }
#admin .form-actions a { margin-left: 12px; font-size: 14px; }

/* The copyable vendor link */
#admin .link-cell {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  color: var(--text-muted);
  word-break: break-all;
}

#admin .section-title {
  margin-top: 40px;
  padding-bottom: 10px;
  font-size: 18px;
  line-height: 18px;
  font-weight: 400;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 1px solid rgba(0, 0, 0, .1);
}

@media (min-width: 320px) and (max-width: 999px) {
  #admin .container {
    width: 100%;
    padding: 0 20px;
    box-sizing: border-box;
  }

  #admin .page-head .actions {
    position: static;
    margin-top: 14px;
  }

  #admin .table-scroll { overflow-x: auto; }
  #admin .table-scroll table { min-width: 720px; }

  #admin .stats .stat { width: 100%; border-right: none; border-bottom: 1px solid #fff; }
}
