/* admin.css — administrationsvyn. Grunden ligger i shared/base.css. */

.admin-nav {
  flex: 1 1 auto;
}

.admin-user {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-left: auto;
}

.tab-external {
  color: var(--accent) !important;
}

/* Översikt */
.mode-hero {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: center;
}

.mode-hero .badge-lg {
  font-size: 1.15rem;
  padding: 8px 18px;
}

.service-number {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.kpi-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

.kpi a {
  color: inherit;
  text-decoration: none;
}

.kpi a:hover .kpi-value {
  color: var(--accent);
}

/* Segmenterade filterknappar (Ärenden) */
.segmented {
  display: inline-flex;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.segmented button {
  min-height: 36px;
  padding: 6px 12px;
  border: 0;
  font: inherit;
  font-weight: 600;
  color: var(--text);
  background: var(--surface);
  cursor: pointer;
}

.segmented button + button {
  border-left: 1px solid var(--border-strong);
}

.segmented button[aria-pressed="true"] {
  color: var(--on-accent);
  background: var(--accent);
}

/* Inställningar */
.settings-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}

@media (min-width: 900px) {
  .settings-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.settings-grid input[type="number"],
.settings-grid input[type="time"] {
  max-width: 200px;
}

/* Öppettider: veckodagarna som en rad kryssrutor */
.day-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
}

.day-picker .day-check {
  margin-bottom: 4px;
  font-weight: 400;
}

/* Medarbetare */
.order-cell {
  white-space: nowrap;
}

.order-cell .btn {
  min-width: 32px;
  padding-right: 6px;
  padding-left: 6px;
}

.order-cell .order-number {
  display: inline-block;
  min-width: 1.5em;
  text-align: center;
  font-weight: 600;
}

/* Ärenden */
.case-row-sub {
  display: block;
  margin-top: 2px;
  font-size: 0.8rem;
  color: var(--muted);
}

.case-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.case-head h1 {
  margin: 0;
}

.timeline {
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline li {
  display: grid;
  gap: 2px 12px;
  grid-template-columns: 5.5em 1fr;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

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

.timeline .tl-time {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--muted);
}

.timeline .tl-body {
  min-width: 0;
}

.timeline .tl-type {
  font-weight: 600;
}

.timeline .tl-leg {
  margin-left: 6px;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
}

.timeline .tl-message {
  display: block;
  overflow-wrap: anywhere;
}

.timeline code {
  display: block;
  margin-top: 2px;
  font-size: 0.8rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.legs-table td {
  white-space: nowrap;
}

.legs-table td.wrap {
  white-space: normal;
  min-width: 160px;
}

/* Rad under ett värde i översiktens egenskapslista */
.block {
  display: block;
  margin-top: 4px;
}
