:root {
  color-scheme: light;
  --ink: #17192b;
  --muted: #72768a;
  --soft: #f5f6fb;
  --panel: rgba(255, 255, 255, 0.9);
  --panel-solid: #ffffff;
  --line: rgba(31, 35, 64, 0.1);
  --violet: #6557e8;
  --violet-dark: #4f42c9;
  --cyan: #49c7d6;
  --green: #20a66a;
  --amber: #cc7a17;
  --red: #d5495b;
  --navy: #111328;
  --shadow: 0 24px 70px rgba(23, 27, 55, 0.12);
  --shadow-soft: 0 12px 34px rgba(23, 27, 55, 0.08);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 15px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #f3f4f9;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 7% -8%, rgba(101, 87, 232, 0.16), transparent 30rem),
    radial-gradient(circle at 94% 4%, rgba(73, 199, 214, 0.15), transparent 28rem),
    #f3f4f9;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(101, 87, 232, 0.28);
  outline-offset: 3px;
}

.ambient {
  position: fixed;
  z-index: -1;
  width: 26rem;
  height: 26rem;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.23;
  pointer-events: none;
}

.ambient-one {
  top: -12rem;
  right: 3vw;
  background: #7768ff;
}

.ambient-two {
  bottom: -14rem;
  left: -8rem;
  background: #62d3dc;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.brand strong,
.mobile-brand strong {
  display: block;
  font-size: 17px;
  letter-spacing: -0.025em;
}

.brand small,
.mobile-brand small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.brand-light {
  color: #fff;
}

.brand-light small {
  color: rgba(255, 255, 255, 0.64);
}

.brand-logo {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  width: 50px;
  height: 50px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 16px;
  background: linear-gradient(145deg, #d9e3ee, #899aaa);
  box-shadow: 0 12px 28px rgba(9, 11, 28, 0.2);
}

.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.eyebrow {
  display: block;
  margin-bottom: 8px;
  color: var(--violet);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow-light {
  color: rgba(255, 255, 255, 0.66);
}

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  border-radius: 13px;
  padding: 10px 17px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:active {
  transform: translateY(0) scale(0.985);
}

.button-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--violet), #7568f5);
  box-shadow: 0 12px 24px rgba(101, 87, 232, 0.26);
}

.button-primary:hover {
  box-shadow: 0 15px 28px rgba(101, 87, 232, 0.32);
}

.button-secondary,
.button-route,
.button-quiet {
  color: var(--ink);
  background: #f0f1f7;
}

.button-secondary:hover,
.button-route:hover,
.button-quiet:hover {
  background: #e8e9f2;
}

.button-danger {
  color: #b22d43;
  background: rgba(213, 73, 91, 0.1);
}

.button-glass {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px);
}

.button-wide {
  width: 100%;
}

.button-small {
  min-height: 34px;
  padding: 7px 11px;
  border-radius: 10px;
  font-size: 11px;
}

.field {
  display: grid;
  gap: 7px;
  color: #555a70;
  font-size: 12px;
  font-weight: 700;
}

.field input,
.field select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 14px;
  color: var(--ink);
  background: #f7f7fb;
  font-size: 14px;
  font-weight: 500;
  transition: border 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.field input::placeholder {
  color: #a1a4b3;
}

.field input:focus,
.field select:focus {
  border-color: rgba(101, 87, 232, 0.5);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(101, 87, 232, 0.08);
  outline: 0;
}

.field-grow {
  flex: 1 1 260px;
}

.notice-stack {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.notice {
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 650;
}

.notice-error {
  color: #a82d43;
  border-color: rgba(213, 73, 91, 0.18);
  background: rgba(213, 73, 91, 0.09);
}

.notice-success {
  color: #137b4b;
  border-color: rgba(32, 166, 106, 0.18);
  background: rgba(32, 166, 106, 0.09);
}

.notice-warning {
  color: #9b5e12;
  border-color: rgba(204, 122, 23, 0.2);
  background: rgba(204, 122, 23, 0.1);
}

.toast {
  position: fixed;
  z-index: 1000;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  max-width: calc(100vw - 32px);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 14px;
  padding: 12px 18px;
  color: #fff;
  background: rgba(17, 19, 40, 0.94);
  box-shadow: 0 16px 44px rgba(7, 8, 22, 0.25);
  font-size: 13px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 14px);
  transition: opacity 180ms ease, transform 180ms ease;
  backdrop-filter: blur(18px);
}

.toast-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Login */
.login-page {
  overflow-x: hidden;
  background: var(--navy);
}

.login-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(0, 1.1fr) minmax(430px, 0.9fr);
}

.login-story {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(32px, 6vw, 72px);
  color: #fff;
  background:
    radial-gradient(circle at 82% 15%, rgba(104, 216, 226, 0.2), transparent 24rem),
    radial-gradient(circle at 5% 90%, rgba(112, 94, 236, 0.28), transparent 28rem),
    linear-gradient(145deg, #111328 0%, #181a38 58%, #20234a 100%);
}

.story-copy {
  max-width: 620px;
  padding: 64px 0;
}

.story-copy h1 {
  max-width: 600px;
  margin: 0;
  font-size: clamp(46px, 6vw, 82px);
  font-weight: 800;
  letter-spacing: -0.065em;
  line-height: 0.98;
}

.story-copy p {
  max-width: 520px;
  margin: 26px 0 0;
  color: rgba(255, 255, 255, 0.66);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.6;
}

.trust-list {
  display: grid;
  margin: 0;
  padding: 0;
  grid-template-columns: repeat(3, 1fr);
  list-style: none;
}

.trust-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 18px 18px 0 0;
}

.trust-list strong,
.trust-list small {
  display: block;
}

.trust-list strong {
  font-size: 13px;
}

.trust-list small {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 10px;
}

.trust-mark {
  color: var(--cyan);
  font-size: 11px;
  font-weight: 800;
}

.login-panel {
  display: grid;
  place-items: center;
  padding: clamp(24px, 5vw, 72px);
  background: #f5f6fa;
}

.login-card {
  width: 100%;
  max-width: 430px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: clamp(28px, 5vw, 44px);
  background: rgba(255, 255, 255, 0.93);
  box-shadow: var(--shadow);
}

.login-card h2 {
  margin: 0;
  font-size: 32px;
  letter-spacing: -0.04em;
}

.form-intro {
  margin: 10px 0 24px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.form-stack {
  display: grid;
  gap: 17px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #666a7d;
  font-size: 12px;
  cursor: pointer;
}

.check-row input {
  width: 17px;
  height: 17px;
  accent-color: var(--violet);
}

.privacy-note {
  margin: 18px 0 0;
  color: #9a9dac;
  font-size: 10px;
  line-height: 1.5;
  text-align: center;
}

.mobile-brand {
  display: none;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

/* Shared app */
.app-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 22px 0 56px;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.header-actions,
.row-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.user-pill {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 13px;
  color: #5d6175;
  background: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  font-weight: 700;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(32, 166, 106, 0.12);
}

.hero-card,
.admin-hero {
  display: flex;
  min-height: 240px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  overflow: hidden;
  position: relative;
  border-radius: var(--radius-xl);
  margin-bottom: 28px;
  padding: clamp(27px, 5vw, 48px);
  color: #fff;
  background:
    radial-gradient(circle at 84% 30%, rgba(91, 212, 223, 0.26), transparent 15rem),
    linear-gradient(135deg, #111328, #2d2f67 74%, #435091);
  box-shadow: 0 24px 65px rgba(21, 24, 59, 0.24);
}

.hero-card::after,
.admin-hero::after {
  position: absolute;
  right: -50px;
  top: -80px;
  width: 270px;
  height: 270px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  content: "";
  box-shadow: 0 0 0 34px rgba(255, 255, 255, 0.025), 0 0 0 68px rgba(255, 255, 255, 0.018);
}

.hero-copy,
.admin-hero > div,
.capacity,
.admin-hero .button {
  z-index: 1;
  position: relative;
}

.hero-copy h1,
.admin-hero h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 58px);
  letter-spacing: -0.055em;
  line-height: 1;
}

.hero-copy p,
.admin-hero p {
  max-width: 620px;
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 14px;
  line-height: 1.6;
}

.capacity {
  display: flex;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}

.capacity-slot {
  width: 35px;
  height: 7px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.16);
}

.capacity-slot-active {
  background: linear-gradient(90deg, #69d7df, #a49bff);
  box-shadow: 0 0 16px rgba(105, 215, 223, 0.35);
}

.content-grid {
  display: grid;
  align-items: start;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 24px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 15px;
}

.section-heading h2,
.side-card h2,
.admin-card h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.035em;
}

.count-badge,
.mini-badge,
.route-tag,
.route-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 99px;
  padding: 6px 10px;
  color: var(--violet-dark);
  background: rgba(101, 87, 232, 0.1);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.device-list {
  display: grid;
  gap: 14px;
}

.device-card,
.side-card,
.admin-card,
.add-device-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.device-card {
  padding: 20px;
}

.device-card-primary {
  border-color: rgba(101, 87, 232, 0.2);
  box-shadow: 0 15px 40px rgba(74, 64, 178, 0.11);
}

.device-topline,
.device-identity,
.device-name-row,
.route-heading {
  display: flex;
  align-items: center;
}

.device-topline,
.route-heading {
  justify-content: space-between;
  gap: 14px;
}

.device-identity {
  gap: 12px;
}

.device-name-row {
  flex-wrap: wrap;
  gap: 8px;
}

.device-name-row h3,
.add-device-card h3 {
  margin: 0;
  font-size: 16px;
  letter-spacing: -0.02em;
}

.device-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--violet), var(--cyan));
  box-shadow: 0 10px 22px rgba(101, 87, 232, 0.23);
}

.icon-button {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 0;
  border-radius: 11px;
  cursor: pointer;
  font-size: 19px;
}

.icon-button-danger {
  color: var(--red);
  background: rgba(213, 73, 91, 0.08);
}

.sync-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
}

.sync-state > span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.sync-ready {
  color: var(--green);
}

.sync-ready > span {
  background: var(--green);
}

.sync-pending {
  color: var(--amber);
}

.sync-pending > span {
  background: var(--amber);
}

.pending-panel,
.limit-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid rgba(204, 122, 23, 0.15);
  border-radius: 14px;
  margin-top: 15px;
  padding: 12px;
  color: #875314;
  background: rgba(204, 122, 23, 0.07);
  font-size: 11px;
}

.pending-panel p {
  margin: 0;
  line-height: 1.45;
}

.route-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.route-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  background: #f7f7fb;
}

.route-card-accent {
  border-color: rgba(101, 87, 232, 0.17);
  background: linear-gradient(145deg, rgba(101, 87, 232, 0.09), rgba(73, 199, 214, 0.07));
}

.route-heading strong,
.route-heading small {
  display: block;
}

.route-heading strong {
  font-size: 12px;
}

.route-heading small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

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

.button-route {
  min-height: 36px;
  padding: 7px;
  font-size: 10px;
}

.config-preview {
  display: block;
  overflow: hidden;
  margin-top: 10px;
  color: #9a9dac;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qr-panel {
  width: fit-content;
  border-radius: 15px;
  margin: 12px auto 0;
  padding: 10px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(23, 25, 43, 0.09);
}

.qr-panel img,
.qr-panel canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

.add-device-card {
  margin-top: 14px;
  padding: 20px;
}

.add-device-card p {
  margin: 6px 0 16px;
  color: var(--muted);
  font-size: 11px;
}

.inline-form {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.limit-note {
  margin-top: 14px;
  justify-content: flex-start;
}

.secondary-column {
  display: grid;
  gap: 14px;
  position: sticky;
  top: 18px;
}

.side-card {
  padding: 20px;
}

.download-list {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.download-card {
  display: grid;
  width: 100%;
  align-items: center;
  grid-template-columns: 38px 1fr auto;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 10px;
  color: var(--ink);
  background: #f8f8fb;
  text-align: left;
  text-decoration: none;
  transition: border 160ms ease, transform 160ms ease, background 160ms ease;
}

.download-card:hover {
  border-color: rgba(101, 87, 232, 0.22);
  background: #fff;
  transform: translateY(-1px);
}

.download-button {
  cursor: pointer;
  font: inherit;
}

.download-card strong,
.download-card small {
  display: block;
}

.download-card strong {
  font-size: 12px;
}

.download-card small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.app-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(135deg, var(--violet), #8478ff);
  font-size: 12px;
  font-weight: 850;
}

.app-mark-alt {
  background: linear-gradient(135deg, #34a4ba, #57d3d7);
}

.app-mark-warm {
  background: linear-gradient(135deg, #e28055, #d9a44e);
}

.guide-list {
  display: grid;
  gap: 13px;
  margin: 17px 0 0;
  padding: 0;
  list-style: none;
}

.guide-list li {
  display: flex;
  align-items: flex-start;
  gap: 11px;
}

.guide-list li > span {
  display: grid;
  flex: 0 0 auto;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 9px;
  color: var(--violet);
  background: rgba(101, 87, 232, 0.1);
  font-size: 9px;
  font-weight: 850;
}

.guide-list p {
  margin: 0;
}

.guide-list strong,
.guide-list small {
  display: block;
}

.guide-list strong {
  font-size: 11px;
}

.guide-list small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}

/* Admin */
.admin-shell {
  width: min(1260px, calc(100% - 40px));
}

.admin-hero {
  min-height: 210px;
}

.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.admin-card {
  margin-bottom: 16px;
  padding: 22px;
}

.admin-card-wide {
  width: 100%;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-grid > .button {
  align-self: end;
}

.monitor-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}

.monitor-grid > div {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: #f7f7fb;
}

.monitor-grid small,
.monitor-grid strong {
  display: block;
}

.monitor-grid small {
  color: var(--muted);
  font-size: 9px;
  text-transform: uppercase;
}

.monitor-grid strong {
  overflow: hidden;
  margin-top: 5px;
  font-size: 11px;
  text-overflow: ellipsis;
}

.table-scroll {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.admin-table th {
  padding: 10px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: uppercase;
}

.admin-table td {
  border-top: 1px solid var(--line);
  padding: 13px 10px;
  vertical-align: middle;
}

.admin-table td > strong,
.admin-table td > small {
  display: block;
}

.admin-table td > small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.text-button {
  border: 0;
  padding: 0;
  color: var(--violet-dark);
  background: transparent;
  cursor: pointer;
  font-size: 10px;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.uuid-list {
  display: grid;
}

.uuid-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid var(--line);
  padding: 13px 0;
}

.uuid-row:first-child {
  border-top: 0;
}

.uuid-row strong,
.uuid-row small {
  display: block;
}

.uuid-row strong {
  font-size: 12px;
}

.uuid-row small {
  max-width: 450px;
  overflow: hidden;
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
}

.warning-card {
  border-color: rgba(204, 122, 23, 0.2);
}

.empty-state {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 980px) {
  .login-shell {
    grid-template-columns: 1fr 440px;
  }

  .trust-list {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .trust-list li {
    padding-top: 10px;
  }

  .content-grid {
    grid-template-columns: 1fr;
  }

  .secondary-column {
    position: static;
    grid-template-columns: 1fr 1fr;
  }

  .admin-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .login-shell {
    display: block;
    padding: 18px;
    background:
      radial-gradient(circle at 90% 2%, rgba(73, 199, 214, 0.18), transparent 18rem),
      linear-gradient(145deg, #111328, #20234a);
  }

  .login-story {
    display: none;
  }

  .login-panel {
    min-height: calc(100vh - 36px);
    border-radius: 26px;
    padding: 20px;
  }

  .login-card {
    border: 0;
    padding: 10px;
    background: transparent;
    box-shadow: none;
  }

  .mobile-brand {
    display: flex;
  }

  .app-shell,
  .admin-shell {
    width: min(100% - 24px, 680px);
    padding-top: 14px;
  }

  .user-pill {
    display: none;
  }

  .hero-card,
  .admin-hero {
    min-height: 230px;
    align-items: flex-start;
    flex-direction: column;
    padding: 28px 24px;
  }

  .capacity {
    width: 100%;
  }

  .capacity-slot {
    flex: 1;
  }

  .route-grid,
  .secondary-column,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .inline-form {
    align-items: stretch;
    flex-direction: column;
  }

  .field-grow {
    flex: 0 0 auto;
  }

  .monitor-grid {
    grid-template-columns: 1fr 1fr;
  }

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

  .row-actions {
    width: 100%;
    flex-wrap: wrap;
  }
}

@media (max-width: 470px) {
  .brand small {
    display: none;
  }

  .header-actions .button {
    min-height: 38px;
    padding: 8px 12px;
  }

  .hero-copy h1,
  .admin-hero h1 {
    font-size: 37px;
  }

  .device-card,
  .side-card,
  .admin-card,
  .add-device-card {
    border-radius: 19px;
    padding: 16px;
  }

  .pending-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .route-actions {
    grid-template-columns: 1fr;
  }

  .monitor-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
