/* Support Desk, variant A (BACKLOG D-10, docs/design/DESIGN.md).
   The tokens below are the only colors: every rule after :root uses them
   through var(), never by value. Square corners, no shadows, no gradients. */

/* Inter, self-hosted (BACKLOG D-22): @fontsource/inter 5.3.0, SIL Open Font
   License (inter-ofl.txt). Latin carries ASCII with ç ö ü and ı; Latin
   Extended carries ğ ş İ, so a page loads only the subsets it prints.
   Nothing is fetched from another host; until a file arrives, and if it
   never does, the system stack below stands in. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("inter-latin-300-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("inter-latin-ext-300-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("inter-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("inter-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("inter-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("inter-latin-ext-500-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --ground: #faf9f5;
  --surface: #ffffff;
  --surface-muted: #f1efe6;
  --line: #ddd9d2;
  --line-soft: #efece7;
  --ink: #1c1b19;
  --ink-body: #33322e;
  --ink-muted: #6b6862;
  --ink-soft: #5a5852;
  --accent: #d1543d;
  --accent-ink: #a33c28;
  --info: #1f5f8b;
  --on-dark: #faf9f5;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-weight: 300;
  font-size: 14px;
  line-height: 1.5;
}

h1,
h2,
h3,
p,
ul {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

a {
  color: var(--accent-ink);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.muted {
  color: var(--ink-muted);
}

.rule {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 28px 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Brand */

.brand-mark {
  display: inline-block;
  width: 10px;
  height: 10px;
  background: var(--accent);
  margin-right: 10px;
  vertical-align: 1px;
}

.brand,
.wordmark {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 2px;
  color: var(--ink);
}

/* Top bar */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 64px;
  padding: 0 40px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.topbar .wordmark:hover {
  text-decoration: none;
}

.topbar-account {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
}

.topbar-company {
  color: var(--ink);
  font-weight: 400;
}

.topbar-divider {
  width: 1px;
  height: 16px;
  background: var(--line);
}

.topbar-user {
  color: var(--ink-muted);
}

.topbar-signout {
  margin: 0;
}

.link-button {
  border: 0;
  padding: 0;
  background: none;
  font: inherit;
  color: var(--accent-ink);
  cursor: pointer;
}

.topbar-dark {
  background: var(--ink);
  border-bottom-color: var(--ink);
}

.topbar-dark .wordmark,
.topbar-dark .topbar-company,
.topbar-dark .topbar-user {
  color: var(--on-dark);
}

.topbar-dark .link-button {
  color: var(--accent);
}

/* An administrator's two sections beside the wordmark (DESIGN §2), the
   current one at weight 500. */

.topbar-start {
  display: flex;
  align-items: center;
  gap: 24px;
  min-width: 0;
}

.topbar-sections {
  display: flex;
  gap: 24px;
  font-size: 13px;
}

/* --ink-muted would be too faint on the dark bar; the light divider tone
   reads as secondary and stays legible. */
.topbar-sections a {
  color: var(--line);
}

.topbar-sections a:hover {
  color: var(--on-dark);
  text-decoration: none;
}

.topbar-sections a[aria-current="true"] {
  color: var(--on-dark);
  font-weight: 500;
}

/* Page frame */

.page {
  padding: 40px;
}

.page-title {
  font-size: 30px;
  font-weight: 300;
  line-height: 1.2;
}

.page-title-spaced {
  margin-bottom: 28px;
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.page-header .muted {
  margin-top: 8px;
}

.back-link {
  display: inline-block;
  font-size: 13px;
  margin-bottom: 16px;
}

/* Narrow column: sign-in, password, not-found, error */

.narrow {
  width: 420px;
  max-width: 100%;
  margin: 0 auto;
  padding: 110px 16px 40px;
}

.narrow .brand {
  margin-bottom: 20px;
}

.narrow-title {
  font-size: 34px;
  font-weight: 300;
  line-height: 1.2;
  margin-bottom: 12px;
}

.narrow-title-small {
  font-size: 28px;
}

.narrow-note {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-muted);
}

.text-link {
  color: var(--accent-ink);
  font-weight: 400;
}

/* Forms */

.stack {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.field label,
.label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ink-muted);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  padding: 0 14px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
select {
  height: 46px;
}

textarea {
  padding: 14px;
  min-height: 110px;
  line-height: 1.6;
  resize: vertical;
}

.field-error {
  font-size: 13px;
  color: var(--accent-ink);
}

.field-invalid input,
.field-invalid select,
.field-invalid textarea {
  border-color: var(--accent);
}

.form-error {
  font-size: 14px;
  color: var(--accent-ink);
}

.form-error li + li {
  margin-top: 4px;
}

.rules {
  font-size: 13px;
  color: var(--ink-muted);
}

.rules li::before {
  content: "· ";
}

.rules li + li {
  margin-top: 6px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

/* Buttons */

.button {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  padding: 12px 22px;
  cursor: pointer;
  text-align: center;
}

.button:hover {
  text-decoration: none;
}

.button-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--surface);
}

.button-small {
  font-size: 13px;
  padding: 9px 16px;
}

.button-block {
  display: block;
  width: 100%;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.button-row-split {
  justify-content: space-between;
}

/* Status pill: always a word; color never carries the meaning alone. */

.pill {
  display: inline-block;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  padding: 4px 10px;
  border: 1px solid var(--line);
  white-space: nowrap;
}

.pill-open,
.pill-waiting_customer {
  border-color: var(--accent);
  color: var(--accent-ink);
}

.pill-in_progress {
  border-color: var(--info);
  color: var(--info);
}

.pill-resolved {
  border-color: var(--line);
  color: var(--ink-soft);
}

/* A company's status: active is quiet, inactive stands out in plain ink. */

.pill-active {
  border-color: var(--line);
  color: var(--ink-muted);
}

.pill-inactive {
  border-color: var(--ink);
  color: var(--ink);
}

/* Status filters */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
}

.filters a {
  display: inline-block;
  padding-bottom: 14px;
  margin-bottom: -1px;
  color: var(--ink-muted);
  font-size: 14px;
  border-bottom: 2px solid transparent;
}

.filters a:hover {
  text-decoration: none;
  color: var(--ink);
}

.filters a[aria-current="page"] {
  color: var(--ink);
  font-weight: 500;
  border-bottom-color: var(--accent);
}

/* Table */

.table-frame {
  background: var(--surface);
  border: 1px solid var(--line);
}

.table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.table th {
  text-align: left;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ink-muted);
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
}

.table td {
  padding: 18px 24px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink-muted);
  vertical-align: middle;
}

.table tr:last-child td {
  border-bottom: 0;
}

.table .col-number {
  width: 90px;
}

.table .col-status {
  width: 140px;
}

.table .col-priority {
  width: 110px;
}

.table .col-activity {
  width: 150px;
}

.table .cell-subject a {
  color: var(--ink);
  font-weight: 400;
  overflow-wrap: anywhere;
}

.table-note {
  margin-top: 16px;
  font-size: 12px;
  color: var(--ink-muted);
}

.pager {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
  font-size: 13px;
  color: var(--ink-muted);
}

/* Empty state */

.empty {
  padding: 56px 24px;
  text-align: center;
}

.empty-title {
  font-size: 14px;
  color: var(--ink);
}

.empty-hint {
  margin-top: 6px;
  font-size: 13px;
  color: var(--ink-muted);
}

.empty .button {
  margin-top: 24px;
}

/* New request */

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 40px;
  align-items: start;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 32px;
}

.card-actions {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.dropzone {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px dashed var(--line);
  padding: 22px 22px;
  font-size: 13px;
  color: var(--ink-muted);
}

.dropzone input[type="file"] {
  font: inherit;
  font-size: 13px;
  color: var(--accent-ink);
  max-width: 55%;
}

.side-note {
  border-left: 2px solid var(--accent);
  padding: 2px 0 2px 16px;
}

.side-note-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 8px;
}

.side-note p,
.side-aside {
  font-size: 13px;
  color: var(--ink-muted);
  line-height: 1.7;
}

.side-aside {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

/* Request detail */

.detail-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.detail-title h1 {
  font-size: 28px;
  font-weight: 300;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin-top: 16px;
  font-size: 13px;
  color: var(--ink-muted);
}

.thread {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.message {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 24px;
}

.message-staff {
  background: var(--surface-muted);
}

.message-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 12px;
}

.message-author {
  font-size: 14px;
  font-weight: 500;
}

.message-company {
  color: var(--ink-muted);
}

.message-time {
  margin-left: auto;
  font-size: 12px;
  color: var(--ink-muted);
}

.message-body {
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink-body);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.message-files {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.file-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.file-link::before {
  content: "";
  width: 14px;
  height: 14px;
  border: 1px solid var(--ink-muted);
  flex: none;
}

.file-size {
  color: var(--ink-muted);
}

.reply-card {
  margin-top: 20px;
}

.reply-actions {
  margin-top: 24px;
}

.file-inline {
  position: relative;
  overflow: hidden;
}

.file-inline input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.file-inline:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.file-chosen {
  margin-top: 12px;
  font-size: 13px;
  color: var(--ink-muted);
}

.file-chosen:empty {
  display: none;
}

.notice {
  margin-bottom: 20px;
  font-size: 14px;
  color: var(--accent-ink);
}

/* Staff side (D-23): the company sidebar beside the page. */

.staff-layout {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  min-height: calc(100vh - 64px);
}

.company-nav {
  background: var(--surface);
  border-right: 1px solid var(--line);
  padding: 32px 0;
}

.company-nav-title {
  padding: 0 24px 16px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.company-nav a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 24px 11px 22px;
  border-left: 2px solid transparent;
  color: var(--ink);
  font-size: 14px;
}

.company-nav a:hover {
  text-decoration: none;
  background: var(--ground);
}

.company-nav a[aria-current="page"] {
  border-left-color: var(--accent);
  font-weight: 500;
}

.company-count {
  color: var(--ink-muted);
  font-weight: 300;
}

.company-nav-note {
  margin-top: 16px;
  padding: 20px 24px 0;
  border-top: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.7;
  color: var(--ink-muted);
}

.list-search {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.list-search input[type="search"] {
  width: 240px;
}

.list-search select {
  width: auto;
}

.table .col-company {
  width: 140px;
}

.table .col-assignee {
  width: 150px;
}

.table .cell-company {
  color: var(--ink);
}

.table .cell-unassigned {
  color: var(--accent-ink);
  font-weight: 500;
}

/* Staff request detail (D-23): thread and composer beside the panel. */

.staff-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 32px;
  align-items: start;
}

.message-customer {
  background: var(--surface);
}

.message-note {
  background: var(--surface-muted);
  border-left: 3px solid var(--ink-muted);
}

.note-label {
  display: inline-block;
  border: 1px solid var(--ink-muted);
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.composer {
  margin-top: 20px;
  padding: 24px;
}

.composer-tabs {
  display: flex;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}

.composer-tabs a {
  display: inline-block;
  padding-bottom: 12px;
  margin-bottom: -1px;
  border-bottom: 2px solid transparent;
  color: var(--ink-muted);
  font-size: 14px;
}

.composer-tabs a:hover {
  text-decoration: none;
  color: var(--ink);
}

.composer-tabs a[aria-current="page"] {
  color: var(--ink);
  font-weight: 500;
  border-bottom-color: var(--accent);
}

/* A note is written in the note's own dress, so nobody mistakes it for a
   reply on its way to the customer. */
.composer-note {
  background: var(--surface-muted);
  border-left: 3px solid var(--ink-muted);
}

.composer-note .composer-tabs a[aria-current="page"] {
  border-bottom-color: var(--ink-muted);
}

.composer-label {
  margin-bottom: 14px;
}

.composer-error {
  margin-top: 20px;
}

.ticket-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 24px;
}

.panel-title {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 20px;
}

.panel-form {
  gap: 18px;
}

.panel-take {
  margin-top: 12px;
}

.facts {
  margin: 24px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 13px;
}

.facts div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.facts dt {
  color: var(--ink-muted);
}

.facts dd {
  margin: 0;
  color: var(--ink);
  text-align: right;
}

.panel-history {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-muted);
}

.panel-history a {
  display: inline-block;
  margin-top: 8px;
}

/* Administration (D-26): the companies table and the company forms. */

.table .cell-name {
  color: var(--ink);
  font-weight: 400;
  overflow-wrap: anywhere;
}

.table .col-slug {
  width: 160px;
  overflow-wrap: anywhere;
}

.table .col-count {
  width: 130px;
}

.table .col-company-status {
  width: 110px;
}

.table .col-actions {
  width: 210px;
}

.cell-actions {
  white-space: nowrap;
}

.cell-actions a + a {
  margin-left: 16px;
}

.link-quiet {
  color: var(--ink-soft);
}

.slug-fixed {
  font-size: 15px;
  color: var(--ink);
}

.field-help {
  font-size: 13px;
  color: var(--ink-muted);
}

/* Accounts (D-26): a company's users and the team. Row actions are forms
   whose buttons read as links: reset in accent ink, the others quieter. */

.table .col-email {
  width: 26%;
}

.table .cell-email {
  overflow-wrap: anywhere;
}

.table .col-role {
  width: 110px;
}

.table .col-login {
  width: 150px;
}

.table .col-account-status {
  width: 100px;
}

.table .col-account-actions {
  width: 250px;
}

.table .col-account-actions-wide {
  width: 340px;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
}

.row-actions form {
  margin: 0;
}

/* The generated password, shown once (DESIGN, Yönetim, kullanıcılar). */

.password-panel {
  background: var(--surface-muted);
  border: 1px solid var(--accent);
  padding: 24px;
  margin-bottom: 28px;
}

.password-panel-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
}

.password-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin: 16px 0;
}

.password-row form {
  margin: 0;
}

/* The copy button until the page script finds a clipboard to write to. */
.password-row .button[hidden] {
  display: none;
}

.password-value {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 12px 16px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 17px;
  letter-spacing: 1px;
  color: var(--ink);
  user-select: all;
}

.password-note {
  font-size: 13px;
  color: var(--ink-body);
}

.explainer {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.explainer-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
}

.explainer p {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-muted);
}

/* Son işlemler (D-26): the recent administrative actions below a list or
   form, one compact line each, metadata at 13px (DESIGN §1). */

.trail {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.trail-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
}

.trail-list {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.trail-list li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2px 16px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 14px;
}

.trail-list li:last-child {
  border-bottom: 0;
}

.trail-text {
  color: var(--ink-body);
  overflow-wrap: anywhere;
}

.trail-meta,
.trail-empty {
  font-size: 13px;
  color: var(--ink-muted);
}

.trail-empty {
  margin-top: 8px;
}

.account-form {
  max-width: 760px;
}

.field-narrow {
  max-width: 280px;
}

.delete-name {
  font-size: 15px;
  font-weight: 400;
  color: var(--ink);
}

/* Below this width the sidebar would leave the subject column no room: the
   companies move above the list as a row of links. */

@media (max-width: 1100px) {
  .staff-layout {
    grid-template-columns: 1fr;
  }

  .company-nav {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 16px 0 0;
  }

  .company-nav ul {
    display: flex;
    flex-wrap: wrap;
    padding: 0 16px;
  }

  .company-nav a {
    border-left: 0;
    border-bottom: 2px solid transparent;
    padding: 8px 12px;
  }

  .company-nav a[aria-current="page"] {
    border-bottom-color: var(--accent);
  }

  .company-nav-note {
    display: none;
  }

  /* The slug is on each company's edit page; the name needs the room. */
  .table .col-slug {
    display: none;
  }

  /* An account's actions stack; the role is the list's own on a company's
     page and shows in the role action on the team's. */
  .table .col-role {
    display: none;
  }

  .table .col-account-actions,
  .table .col-account-actions-wide {
    width: 150px;
  }

  .row-actions {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Narrow screens: one column; the table drops priority first. */

@media (max-width: 900px) {
  .page {
    padding: 24px 16px;
  }

  .topbar {
    padding: 0 16px;
  }

  .topbar-company,
  .topbar-divider {
    display: none;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .two-column,
  .field-row {
    grid-template-columns: 1fr;
  }

  .table .col-priority,
  .table .cell-priority {
    display: none;
  }

  .table th,
  .table td {
    padding: 14px 12px;
  }

  .table .col-number {
    width: 64px;
  }

  .table .col-status {
    width: 112px;
  }

  .table .col-activity {
    width: 96px;
  }

  .card {
    padding: 20px;
  }

  .dropzone {
    flex-direction: column;
    align-items: flex-start;
  }

  .dropzone input[type="file"] {
    max-width: 100%;
  }

  .narrow {
    padding-top: 56px;
  }

  .staff-detail {
    grid-template-columns: 1fr;
  }

  .table .col-company,
  .table .cell-company,
  .table .col-assignee,
  .table .cell-assignee {
    display: none;
  }

  .list-search input[type="search"] {
    width: 100%;
  }

  /* The companies table keeps name, status and the links; an accounts
     table keeps name, status and the actions. */
  .table .col-slug,
  .table .col-count,
  .table .col-email,
  .table .col-login {
    display: none;
  }

  .table .col-account-actions,
  .table .col-account-actions-wide {
    width: 130px;
  }

  .table .col-actions {
    width: 112px;
  }

  .cell-actions {
    white-space: normal;
  }

  .cell-actions a {
    display: block;
  }

  .cell-actions a + a {
    margin-left: 0;
    margin-top: 4px;
  }

  .topbar-start,
  .topbar-sections {
    gap: 16px;
  }
}

/* Phones: an administrator's top bar carries the section links as well, so
   the account part moves to a second row rather than squeezing the first. */

@media (max-width: 600px) {
  .topbar-dark {
    flex-wrap: wrap;
    height: auto;
    min-height: 64px;
    padding-top: 14px;
    padding-bottom: 14px;
    row-gap: 10px;
  }

  .topbar-dark .wordmark,
  .topbar-dark .topbar-user {
    white-space: nowrap;
  }
}
