:root {
  --bg: #f3f7fb;
  --surface: #f7faf9;
  --surface-strong: #e9f4f0;
  --text: #151918;
  --muted: #697370;
  --line: #e1e7e4;
  --accent: #0f9f7a;
  --accent-dark: #087a5e;
  --blue: #4f79e8;
  --violet: #7d5df1;
  --amber: #ef8b3e;
  --red: #d94b45;
  --orange: #c98220;
  --green: #18835f;
  --shadow: 0 18px 50px rgba(22, 38, 51, 0.12);
  --radius: 8px;
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background:
    linear-gradient(155deg, #eef7f3 0%, #f7f8ff 48%, #fff7ed 100%);
  color: var(--text);
  min-height: 100vh;
  letter-spacing: 0;
}

button, input, textarea, select {
  font: inherit;
  letter-spacing: 0;
}

button {
  border: 0;
  cursor: pointer;
}

.app {
  min-height: 100vh;
  padding: max(14px, env(safe-area-inset-top)) 16px calc(84px + env(safe-area-inset-bottom));
  max-width: 620px;
  margin: 0 auto;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.82), rgba(255,255,255,0.96)),
    linear-gradient(135deg, rgba(15,159,122,0.10), rgba(79,121,232,0.08) 55%, rgba(239,139,62,0.08));
}

.boot {
  display: grid;
  min-height: 100vh;
  place-items: center;
  font-size: 28px;
  font-weight: 750;
  color: var(--accent);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.04;
  font-weight: 780;
  color: #0c1513;
}

.brand span {
  color: var(--muted);
  font-size: 13px;
}

.icon-button, .fab {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--blue));
  color: white;
  box-shadow: var(--shadow);
}

.icon-button svg, .fab svg, .nav svg, .row-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.search {
  position: sticky;
  top: max(10px, env(safe-area-inset-top));
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 14px;
  background: rgba(255,255,255,0.84);
  border: 1px solid rgba(210, 222, 219, 0.92);
  border-radius: var(--radius);
  margin-bottom: 14px;
}

.search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 15px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.hero-overview {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
  padding: 18px;
  margin-bottom: 12px;
  border-radius: 12px;
  background:
    radial-gradient(circle at 92% 0%, rgba(255, 255, 255, 0.35), transparent 34%),
    linear-gradient(135deg, #0d1c19 0%, #0f9f7a 48%, #4f79e8 100%);
  color: white;
  box-shadow: 0 18px 48px rgba(24, 77, 91, 0.22);
}

.hero-overview h2 {
  margin: 8px 0 7px;
  font-size: 26px;
  line-height: 1.05;
  font-weight: 820;
}

.hero-overview p {
  margin: 0;
  max-width: 360px;
  color: rgba(255,255,255,0.78);
  font-size: 14px;
  line-height: 1.35;
}

.hero-kicker {
  color: #aef0d9;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.hero-action {
  display: grid;
  place-items: center;
  gap: 5px;
  min-width: 76px;
  height: 76px;
  border-radius: 18px;
  background: rgba(255,255,255,0.16);
  color: white;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.22);
}

.hero-action svg {
  width: 21px;
  height: 21px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero-action span {
  font-size: 12px;
  font-weight: 760;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
  margin-bottom: 10px;
}

.hero-stat {
  text-align: left;
  min-width: 0;
  padding: 12px;
  border-radius: 10px;
  color: white;
  box-shadow: 0 12px 28px rgba(22, 38, 51, 0.11);
}

.hero-stat strong {
  display: block;
  font-size: 24px;
  line-height: 1;
  font-weight: 820;
}

.hero-stat span {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  font-weight: 720;
  opacity: 0.86;
}

.hero-stat.teal { background: linear-gradient(135deg, #0f9f7a, #22bd93); }
.hero-stat.blue { background: linear-gradient(135deg, #4f79e8, #7d5df1); }
.hero-stat.amber { background: linear-gradient(135deg, #ef8b3e, #e8b44f); }
.hero-stat.money { background: linear-gradient(135deg, #17201d, #0f9f7a); }

.metric {
  padding: 14px;
  min-height: 92px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #ffffff, #edf8f4);
  border: 1px solid rgba(208, 226, 220, 0.95);
  box-shadow: 0 10px 24px rgba(17, 34, 31, 0.07);
}

.metric.urgent {
  background: linear-gradient(135deg, #fff7f0, #fff1ed);
  border-color: #f1cbc6;
}

.metric-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  text-transform: uppercase;
}

.metric-value {
  margin-top: 10px;
  font-size: 27px;
  line-height: 1;
  font-weight: 800;
}

.metric-sub {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.section {
  margin-top: 22px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.section h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 760;
}

.link-button {
  color: var(--accent-dark);
  background: transparent;
  font-size: 14px;
  font-weight: 680;
}

.segmented {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow-x: auto;
}

.segmented button {
  flex: 1;
  min-width: max-content;
  padding: 9px 11px;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font-size: 13px;
  font-weight: 700;
}

.segmented button.active {
  background: var(--text);
  color: white;
}

.list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(255,255,255,0.88);
  box-shadow: 0 10px 28px rgba(22, 38, 51, 0.06);
}

.row {
  display: flex;
  gap: 12px;
  padding: 13px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,0.92);
}

.row:last-child { border-bottom: 0; }

.row-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(135deg, #e5f8f1, #eaf0ff);
  color: var(--accent-dark);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.72);
}

.row:nth-child(3n+2) .row-icon { color: var(--blue); background: linear-gradient(135deg, #eef3ff, #f3f0ff); }
.row:nth-child(3n+3) .row-icon { color: var(--amber); background: linear-gradient(135deg, #fff3e7, #fff9ef); }

.client-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,0.92);
}

.client-card:last-child {
  border-bottom: 0;
}

.client-card-main {
  min-width: 0;
}

.client-card-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 680;
}

.client-card-meta span {
  min-height: 24px;
  padding: 4px 7px;
  border-radius: 999px;
  background: var(--surface);
}

.row-main {
  min-width: 0;
  flex: 1;
}

.row-title {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-weight: 720;
  font-size: 15px;
  line-height: 1.25;
}

.row-title span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row-meta {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.row-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.chip {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.chip.red { background: #fff0ee; color: var(--red); }
.chip.orange { background: #fff7eb; color: var(--orange); }
.chip.green { background: #eaf7f2; color: var(--green); }
.chip.blue { background: #eef3ff; color: var(--blue); }
.chip.warm { background: #f4f0ff; color: var(--violet); }
.chip.violet { background: #f4f0ff; color: var(--violet); }
.chip.dark { background: var(--text); color: white; }

.small-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 10px;
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.funnel-board {
  display: flex;
  gap: 8px;
  margin: 0 0 12px;
  padding-bottom: 3px;
  overflow-x: auto;
  scrollbar-width: none;
}

.funnel-board::-webkit-scrollbar {
  display: none;
}

.funnel-stage {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(80px, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-width: 142px;
  padding: 10px 11px;
  border: 1px solid rgba(214, 225, 222, 0.94);
  border-radius: 10px;
  background: rgba(255,255,255,0.88);
  color: var(--text);
  box-shadow: 0 8px 22px rgba(22, 38, 51, 0.06);
}

.funnel-stage span {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.funnel-stage strong {
  display: grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--surface);
  font-size: 14px;
}

.funnel-stage.active {
  border-color: rgba(15,159,122,0.35);
  background: linear-gradient(135deg, #e8f8f2, #eef3ff);
}

.funnel-stage.new.active { background: linear-gradient(135deg, #eef3ff, #f6f8ff); }
.funnel-stage.discussion.active { background: linear-gradient(135deg, #f4f0ff, #faf8ff); }
.funnel-stage.proposal.active { background: linear-gradient(135deg, #f4f0ff, #eef3ff); }
.funnel-stage.waiting_payment.active { background: linear-gradient(135deg, #fff7eb, #fff2e5); }
.funnel-stage.in_work.active { background: linear-gradient(135deg, #eaf7f2, #edf8f4); }
.funnel-stage.won.active { background: linear-gradient(135deg, #eef2f1, #ffffff); }
.funnel-stage.lost.active { background: linear-gradient(135deg, #fff0ee, #fff8f7); }

.primary {
  height: 42px;
  width: 100%;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--accent), var(--blue));
  color: white;
  font-size: 15px;
  font-weight: 760;
}

.ghost {
  height: 42px;
  width: 100%;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
  font-weight: 720;
}

.empty {
  padding: 22px;
  text-align: center;
  color: var(--muted);
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  font-size: 14px;
}

.calendar-panel {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.calendar-toolbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.calendar-toolbar h2 {
  margin: 0;
  text-align: center;
  font-size: 18px;
  line-height: 1.2;
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.calendar-weekdays {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  text-align: center;
  text-transform: uppercase;
}

.calendar-day {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
  height: 58px;
  padding: 7px 5px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: white;
  color: var(--text);
}

.calendar-day.muted {
  color: #a2aaa7;
  background: #fbfcfc;
}

.calendar-day.today {
  border-color: var(--accent);
}

.calendar-day.selected {
  background: var(--text);
  color: white;
}

.day-number {
  justify-self: start;
  font-size: 13px;
  font-weight: 760;
}

.day-dots {
  display: flex;
  align-self: end;
  gap: 3px;
  min-height: 6px;
}

.day-dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.day-dots i.hot {
  background: var(--orange);
}

.calendar-day.selected .day-dots i {
  background: white;
}

.day-count {
  position: absolute;
  right: 5px;
  bottom: 5px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--accent-dark);
  font-size: 10px;
  font-weight: 800;
  line-height: 16px;
}

.calendar-day.selected .day-count {
  background: rgba(255,255,255,0.18);
  color: white;
}

.nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  z-index: 10;
  width: min(620px, 100%);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.94);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.nav button {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 56px;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
}

.nav button.active {
  color: var(--accent-dark);
  background: var(--surface-strong);
}

.fab {
  position: fixed;
  right: max(18px, calc((100vw - 620px) / 2 + 18px));
  bottom: calc(86px + env(safe-area-inset-bottom));
  z-index: 12;
  background: var(--accent);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: flex-end;
  background: rgba(0, 0, 0, 0.26);
}

.modal {
  width: 100%;
  max-width: 620px;
  max-height: 90vh;
  margin: 0 auto;
  overflow: auto;
  padding: 16px 16px calc(20px + env(safe-area-inset-bottom));
  background: white;
  border-radius: 14px 14px 0 0;
  box-shadow: 0 -20px 50px rgba(0, 0, 0, 0.18);
}

.modal h3 {
  margin: 0 0 14px;
  font-size: 19px;
}

.client-profile {
  display: grid;
  gap: 12px;
}

.client-profile-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 10px;
  background: linear-gradient(135deg, #f7fbfa, #eef3ff);
}

.client-profile-head h4 {
  margin: 0 0 7px;
  font-size: 16px;
}

.profile-money {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.profile-money div {
  padding: 12px;
  border-radius: 10px;
  background: linear-gradient(135deg, #eaf7f2, #f4f0ff);
}

.profile-money span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  text-transform: uppercase;
}

.profile-money strong {
  display: block;
  margin-top: 6px;
  font-size: 19px;
}

.profile-info {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px 12px;
  padding: 12px;
  border-radius: 10px;
  background: white;
  border: 1px solid var(--line);
}

.profile-info span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  text-transform: uppercase;
}

.profile-info strong {
  min-width: 0;
  font-size: 13px;
  line-height: 1.3;
}

.profile-note {
  padding: 12px;
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  line-height: 1.4;
}

.form {
  display: grid;
  gap: 10px;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  text-transform: uppercase;
}

.field input, .field textarea, .field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  color: var(--text);
  padding: 11px 12px;
  outline: 0;
  font-size: 15px;
}

.field textarea {
  min-height: 82px;
  resize: vertical;
}

.modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.event-form {
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.timeline {
  display: grid;
  gap: 9px;
}

.timeline-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  padding: 11px;
  border: 1px solid rgba(222, 231, 228, 0.96);
  border-radius: 8px;
  background: rgba(255,255,255,0.82);
}

.timeline-dot {
  width: 12px;
  height: 12px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--muted);
  box-shadow: 0 0 0 5px var(--surface);
}

.timeline-dot.green { background: var(--accent); }
.timeline-dot.blue { background: var(--blue); }
.timeline-dot.warm { background: var(--violet); }
.timeline-dot.violet { background: var(--violet); }
.timeline-dot.orange { background: var(--amber); }

.timeline-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 780;
}

.timeline-text {
  margin-top: 4px;
  font-size: 14px;
  line-height: 1.35;
}

.timeline-follow {
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: #eaf7f2;
  color: var(--accent-dark);
  font-size: 11px;
  line-height: 22px;
  white-space: nowrap;
}

.alert {
  padding: 14px;
  border-radius: var(--radius);
  background: #fff7eb;
  color: #6e4510;
  border: 1px solid #efd5ad;
  line-height: 1.45;
  font-size: 14px;
}

.access-app {
  display: flex;
  flex-direction: column;
}

.access-panel {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.88);
  box-shadow: var(--shadow);
}

.access-panel h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.access-panel p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.key-input {
  height: 46px;
  text-transform: uppercase;
}

.contact-admin {
  display: flex;
  justify-content: center;
  margin-top: 14px;
  color: var(--accent-dark);
  font-weight: 740;
  text-decoration: none;
}

.admin-form {
  margin-bottom: 12px;
}

.admin-list {
  margin-top: 12px;
  gap: 8px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.key-result {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  padding: 12px;
  border-radius: var(--radius);
  background: #eaf7f2;
  border: 1px solid #c7e9dc;
}

.key-result span {
  color: var(--green);
  font-size: 12px;
  font-weight: 760;
  text-transform: uppercase;
}

.key-result strong {
  word-break: break-all;
  font-size: 15px;
}

.admin-key-row .row-main {
  display: grid;
  gap: 6px;
}

.access-status-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(201, 223, 216, 0.96);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(232,247,242,0.96), rgba(240,244,255,0.96));
  box-shadow: 0 12px 32px rgba(22, 38, 51, 0.09);
}

.access-status-main {
  min-width: 0;
}

.access-status-title {
  font-size: 15px;
  font-weight: 780;
}

.access-status-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.3;
}

.admin-key-row {
  overflow: hidden;
  border: 1px solid rgba(214, 225, 222, 0.98);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.94);
  box-shadow: 0 10px 26px rgba(22, 38, 51, 0.07);
}

.admin-key-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 11px 12px;
  background: transparent;
  color: var(--text);
}

.admin-key-person {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  text-align: left;
}

.admin-key-person strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 15px;
}

.admin-key-caret {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  transition: transform 0.18s ease, background 0.18s ease;
}

.admin-key-caret.open {
  transform: rotate(180deg);
  background: #eaf7f2;
  color: var(--accent-dark);
}

.admin-key-caret svg {
  width: 19px;
  height: 19px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.admin-key-details {
  display: grid;
  gap: 10px;
  padding: 0 12px 12px;
}

.detail-grid {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px 12px;
  padding: 10px;
  border-radius: 8px;
  background: var(--surface);
}

.detail-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  text-transform: uppercase;
}

.detail-grid strong {
  min-width: 0;
  font-size: 13px;
  line-height: 1.25;
}

.admin-key-row.expired {
  border-color: #f0c5bf;
  background: #fff8f7;
}

.admin-key-row.expired .row-icon {
  background: #fff0ee;
  color: var(--red);
}

.key-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin-top: 2px;
}

.key-line code {
  min-width: 0;
  padding: 9px 10px;
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
  line-height: 1.3;
  word-break: break-all;
}

@media (min-width: 720px) {
  body { background: #eef3f1; }
  .app {
    margin-top: 18px;
    margin-bottom: 18px;
    min-height: calc(100vh - 36px);
    border-radius: 18px;
    background: white;
    box-shadow: var(--shadow);
  }
  .nav { border-radius: 16px 16px 0 0; }
}
