:root {
  color-scheme: light;
  --bg: #f6f2ff;
  --panel: rgba(255, 255, 255, 0.86);
  --panel-solid: #ffffff;
  --panel-2: #f4f0ff;
  --text: #121826;
  --muted: #70758b;
  --line: rgba(151, 143, 189, 0.18);
  --accent: #bfff00;
  --danger: #ef4444;
  --warning: #ffbe0b;
  --blue: #7a5cff;
  --purple: #6f63b6;
  --purple-deep: #3d367e;
  --lime: #c9ff00;
  --shadow: 0 22px 60px rgba(68, 55, 130, 0.14);
  --soft-shadow: 0 12px 32px rgba(68, 55, 130, 0.09);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 6% 8%, rgba(202, 255, 0, 0.18), transparent 17%),
    radial-gradient(circle at 18% 0%, rgba(122, 92, 255, 0.22), transparent 28%),
    radial-gradient(circle at 82% 8%, rgba(255, 255, 255, 0.9), transparent 22%),
    linear-gradient(135deg, #f9f7ff 0%, #f1edff 44%, #fbfbff 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

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

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

h1 {
  font-size: 21px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: 0;
}

.app-shell {
  min-height: 100vh;
  padding-bottom: 82px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background:
    radial-gradient(circle at 16% 0%, rgba(202, 255, 0, 0.1), transparent 24%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.66), rgba(246, 243, 255, 0.48));
  border-bottom: 1px solid rgba(255, 255, 255, 0.58);
  box-shadow: 0 14px 38px rgba(68, 55, 130, 0.08);
  backdrop-filter: blur(24px) saturate(1.16);
  -webkit-backdrop-filter: blur(24px) saturate(1.16);
}

.topbar-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 16px 10px;
}

.title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand-title {
  min-width: 0;
}

.brand-kicker {
  display: block;
  margin-bottom: 2px;
  color: var(--purple);
  font-size: 11px;
  font-weight: 800;
}

.subtitle {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.top-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.session-pill {
  display: none;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 4px 10px 4px 5px;
  border: 1px solid rgba(151, 143, 189, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 26px rgba(68, 55, 130, 0.08);
  color: #1f2440;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.session-logout {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(151, 143, 189, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  color: #43377f;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(68, 55, 130, 0.08);
}

.admin-pill {
  display: none;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 4px 10px 4px 5px;
  border: 1px solid rgba(151, 143, 189, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 26px rgba(68, 55, 130, 0.08);
  color: #1f2440;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.avatar-dot {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffe2c4, #f59e0b);
  color: #392417;
  font-size: 12px;
}

.role-switch {
  display: inline-flex;
  flex-shrink: 0;
  gap: 4px;
  padding: 3px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.65);
}

.role-switch button,
.segmented button,
.chip {
  min-height: 32px;
  padding: 0 11px;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  white-space: nowrap;
  font-size: 12px;
}

.role-switch button.active,
.segmented button.active,
.chip.active {
  background: linear-gradient(135deg, #8066ff, #4c3bd6);
  color: #fff;
  box-shadow: 0 10px 18px rgba(122, 92, 255, 0.24);
}

.site-login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 16px 40px;
}

.site-login-card {
  width: min(420px, 100%);
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 28px;
  background:
    radial-gradient(circle at 12% 0%, rgba(202, 255, 0, 0.14), transparent 24%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.74), rgba(247, 243, 255, 0.9));
  box-shadow: 0 22px 60px rgba(68, 55, 130, 0.14);
  backdrop-filter: blur(24px) saturate(1.14);
  -webkit-backdrop-filter: blur(24px) saturate(1.14);
}

.site-login-card.loading {
  text-align: center;
}

.site-login-brand {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.site-login-brand h1 {
  font-size: clamp(34px, 6vw, 46px);
}

.site-login-brand p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.site-login-form {
  display: grid;
  gap: 14px;
}

.site-login-form .field > span {
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.site-login-form input {
  min-height: 50px;
  border-radius: 16px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.site-login-submit {
  justify-content: center;
  width: 100%;
  min-height: 50px;
  border-radius: 16px;
  font-size: 16px;
}

.site-login-tip {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.tabs {
  position: fixed;
  right: 0;
  bottom: 10px;
  left: 10px;
  z-index: 25;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 22px;
  background:
    radial-gradient(circle at 8% 20%, rgba(202, 255, 0, 0.2), transparent 19%),
    linear-gradient(135deg, rgba(132, 122, 199, 0.94), rgba(94, 86, 166, 0.94));
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 -14px 42px rgba(47, 39, 105, 0.24);
}

.nav-bubble {
  position: absolute;
  top: 8px;
  bottom: calc(8px + env(safe-area-inset-bottom));
  left: 10px;
  z-index: 0;
  width: calc((100% - 44px) / 5);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 10px 24px rgba(47, 39, 105, 0.18);
  transform: translateX(calc(var(--nav-active, 0) * (100% + 6px)));
  animation: navBubbleX .28s cubic-bezier(.2, .85, .2, 1) both;
}

@keyframes navBubbleX {
  from {
    transform: translateX(calc(var(--nav-from, 0) * (100% + 6px)));
  }
  to {
    transform: translateX(calc(var(--nav-active, 0) * (100% + 6px)));
  }
}

.tabs button {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  gap: 2px;
  min-height: 50px;
  border-radius: 16px;
  background: transparent;
  color: rgba(255, 255, 255, 0.84);
  font-size: 11px;
  font-weight: 800;
  transition: transform .16s ease, color .16s ease;
}

.tabs button:active {
  transform: scale(.96);
}

.tabs button:hover {
  color: #fff;
}

.tabs button span {
  font-size: 18px;
  line-height: 1;
}

.tabs button.active {
  background: transparent;
  color: #fff;
}

.tabs button.active span {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: var(--lime);
  color: #2b3350;
}

.main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 16px 12px;
}

.toolbar {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin: 10px 0;
}

.search-box {
  position: relative;
}

.search-box input {
  width: 100%;
  height: 42px;
  padding: 0 16px 0 40px;
  border: 1px solid rgba(151, 143, 189, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.search-icon {
  position: absolute;
  top: 8px;
  left: 13px;
  color: var(--muted);
}

.filters {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  overflow: visible;
  padding-bottom: 2px;
}

.filters select,
.filters input,
.filters label {
  height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(151, 143, 189, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
  font-size: 12px;
  box-shadow: 0 8px 22px rgba(68, 55, 130, 0.06);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.filters input:not([type="checkbox"]) {
  width: 92px;
  outline: none;
}

.filter-select {
  position: relative;
  flex: 0 0 auto;
}

.filter-select > button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 96px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(151, 143, 189, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
  font-size: 12px;
  box-shadow: 0 8px 22px rgba(68, 55, 130, 0.06);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.filter-select > button b {
  font-size: 12px;
  transition: transform .16s ease;
}

.filter-select.open > button b {
  transform: rotate(180deg);
}

.filter-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 60;
  display: grid;
  min-width: 150px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 46px rgba(68, 55, 130, 0.16);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.filter-menu[hidden] {
  display: none;
}

.filter-menu button {
  display: flex;
  align-items: center;
  min-height: 34px;
  padding: 0 11px;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  text-align: left;
  font-size: 13px;
  font-weight: 750;
}

.filter-menu button:hover,
.filter-menu button.active {
  background: rgba(122, 92, 255, 0.12);
  color: var(--purple-deep);
}

.filters label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  white-space: nowrap;
}

.filters label input[type="checkbox"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.available-toggle {
  min-width: 118px;
}

.available-toggle span {
  position: relative;
  width: 34px;
  height: 20px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: rgba(151, 143, 189, 0.22);
  box-shadow: inset 0 0 0 1px rgba(151, 143, 189, 0.14);
}

.available-toggle span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 4px 10px rgba(68, 55, 130, 0.18);
  transition: transform .16s ease, background .16s ease;
}

.available-toggle input:checked + span {
  background: linear-gradient(135deg, #c9ff00, #9df000);
}

.available-toggle input:checked + span::after {
  transform: translateX(14px);
  background: #24310d;
}

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

.device-view-toggle {
  margin-left: auto;
}

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

.device-list-item {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--soft-shadow);
  cursor: pointer;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.device-list-item:hover {
  border-color: rgba(122, 92, 255, 0.24);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.device-list-item.dimmed .device-list-photo img {
  filter: saturate(0.75);
  opacity: 0.86;
}

.device-list-photo {
  display: grid;
  place-items: center;
  width: 92px;
  aspect-ratio: 1.2;
  border-radius: 15px;
  background:
    radial-gradient(circle at 72% 18%, rgba(202, 255, 0, 0.16), transparent 22%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(238, 240, 250, 0.94));
  overflow: hidden;
}

.device-list-photo img {
  width: 100%;
  height: 100%;
  padding: 4px;
  object-fit: contain;
}

.device-list-main {
  min-width: 0;
}

.device-list-head {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 5px;
}

.corner-tag.inline {
  position: static;
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.device-list-main h2 {
  display: -webkit-box;
  overflow: hidden;
  color: var(--text);
  font-size: 16px;
  line-height: 1.25;
  font-weight: 900;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.device-list-main p {
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.device-card {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 14px;
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.device-card:hover {
  border-color: rgba(122, 92, 255, 0.24);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.device-card.dimmed .device-img {
  filter: saturate(0.75);
  opacity: 0.86;
}

.device-photo {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1.45;
  padding: 7px;
  background:
    radial-gradient(circle at 72% 18%, rgba(202, 255, 0, 0.18), transparent 20%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(238, 240, 250, 0.92));
}

.device-img {
  width: 100%;
  height: 100%;
  padding: 1px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(151, 143, 189, 0.12);
  border-radius: 11px;
}

.corner-tag {
  position: absolute;
  top: 6px;
  left: 6px;
  min-height: 19px;
  padding: 1px 6px;
  border-radius: 7px;
  background: #ede8ff;
  color: #5b42ef;
  font-size: 11px;
  font-weight: 700;
}

.device-body {
  min-width: 0;
  min-height: 54px;
  padding: 9px;
}

.device-head {
  display: block;
}

.device-name {
  display: -webkit-box;
  min-height: 18px;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.22;
  font-weight: 800;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.device-variant {
  display: -webkit-box;
  min-height: 16px;
  margin-top: 3px;
  overflow: hidden;
  color: #334155;
  font-size: 12px;
  line-height: 1.25;
  font-weight: 650;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 62px;
  min-height: 22px;
  margin-top: 7px;
  padding: 0 7px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.status-available {
  background: #e8ffd0;
  color: #35a000;
}

.status-borrowed {
  background: #ffe6e1;
  color: #f04424;
}

.status-maintenance,
.status-pending_check {
  background: #fef3c7;
  color: #d97706;
}

.status-unavailable {
  background: #ebeaf3;
  color: #77758f;
}

.status-reserved {
  background: #fff3c4;
  color: #c78200;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.tag {
  max-width: 100%;
  padding: 3px 7px;
  border-radius: 8px;
  background: rgba(122, 92, 255, 0.09);
  color: #5b55a1;
  font-size: 11px;
}

.borrow-line {
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.home-dashboard {
  padding: 14px;
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 18px;
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.dashboard-page .home-dashboard {
  min-height: calc(100vh - 150px);
}

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

.home-dashboard h3 {
  font-size: 16px;
}

.home-dashboard p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.mini-refresh {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(151, 143, 189, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--purple);
  font-size: 18px;
  line-height: 1;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(86px, 1fr));
  gap: 8px;
}

.stat {
  display: block;
  width: 100%;
  min-height: 76px;
  padding: 10px;
  text-align: left;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(151, 143, 189, 0.15);
  border-radius: 13px;
  box-shadow: 0 10px 24px rgba(68, 55, 130, 0.06);
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.stat:hover,
.stat.active {
  border-color: rgba(122, 92, 255, 0.52);
  box-shadow: 0 16px 34px rgba(122, 92, 255, 0.16);
  transform: translateY(-1px);
}

.stat:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.2);
  outline-offset: 2px;
}

.stat b {
  display: block;
  margin-top: 5px;
  font-size: 23px;
  line-height: 1;
}

.stat span {
  color: var(--muted);
  font-size: 12px;
}

.tone-green {
  border-color: rgba(202, 255, 0, 0.72);
  background: linear-gradient(180deg, #fbfff0, #f3ffe2);
}

.tone-green b {
  color: #41aa00;
}

.tone-red {
  border-color: rgba(255, 120, 106, 0.38);
  background: #fff6f5;
}

.tone-red b {
  color: #ef4444;
}

.tone-blue {
  border-color: rgba(122, 92, 255, 0.34);
  background: #f6f3ff;
}

.tone-blue b {
  color: var(--blue);
}

.tone-orange {
  border-color: #fde68a;
  background: #fffbeb;
}

.tone-orange b {
  color: #d97706;
}

.tone-gray b {
  color: #64748b;
}

.dashboard-panels {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 10px;
}

.dashboard-panel {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(151, 143, 189, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.panel-title h4 {
  margin: 0;
  font-size: 13px;
}

.panel-title span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #f0ecff;
  color: var(--purple);
  font-size: 12px;
  font-weight: 800;
}

.mini-list {
  display: grid;
  gap: 6px;
}

.mini-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  width: 100%;
  min-height: 42px;
  padding: 7px 8px;
  border: 1px solid rgba(151, 143, 189, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--text);
  text-align: left;
}

.mini-row strong,
.mini-row em {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.mini-row em {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.mini-row b {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.mini-actions {
  display: inline-flex;
  gap: 4px;
}

.mini-actions button {
  height: 28px;
  padding: 0 8px;
  border-radius: 9px;
  background: var(--lime);
  color: #17210b;
  font-size: 11px;
  font-weight: 700;
}

.mini-actions button + button {
  background: #fee2e2;
  color: #ef4444;
}

.mini-empty {
  min-height: 42px;
  padding: 12px 8px;
  border: 1px dashed rgba(151, 143, 189, 0.28);
  border-radius: 12px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.detail-hero {
  background: rgba(255, 255, 255, 0.52);
  border-bottom: 1px solid rgba(151, 143, 189, 0.13);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.detail-hero-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 16px 16px;
}

.back-btn {
  height: 34px;
  padding: 0 10px;
  margin-bottom: 10px;
  border: 1px solid rgba(151, 143, 189, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
  box-shadow: 0 8px 20px rgba(68, 55, 130, 0.07);
}

.project-detail-hero .back-btn {
  height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(182, 255, 0, 0.54);
  border-radius: 999px;
  background: linear-gradient(135deg, #c9ff00, #9df000);
  color: #152000;
  font-size: 15px;
  font-weight: 900;
  box-shadow: 0 14px 30px rgba(182, 255, 0, 0.22);
}

.project-detail-hero .back-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 36px rgba(182, 255, 0, 0.28);
}

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

.detail-media img {
  width: 100%;
  max-height: 300px;
  object-fit: contain;
  border: 1px solid rgba(151, 143, 189, 0.16);
  border-radius: 18px;
  background:
    radial-gradient(circle at 78% 20%, rgba(202, 255, 0, 0.18), transparent 20%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(238, 240, 250, 0.92));
  box-shadow: var(--soft-shadow);
}

.detail-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.detail-title h2 {
  font-size: 22px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  background: var(--lime);
  color: #17210b;
  font-weight: 850;
  box-shadow: 0 12px 24px rgba(174, 225, 0, 0.28);
}

.btn.secondary {
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(122, 92, 255, 0.36);
  color: #5b42ef;
  box-shadow: none;
}

.btn.danger {
  background: var(--danger);
  color: #fff;
  box-shadow: none;
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px;
}

.panel {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 18px;
  padding: 14px;
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.pagination-summary,
.pagination-bar {
  margin: 6px 0 10px;
  padding: 0 2px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.pagination-bar > span {
  white-space: nowrap;
}

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.pagination-actions {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  max-width: 100%;
  overflow-x: auto;
  padding: 2px 0;
}

.page-jump {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 5px 0 9px;
  border: 1px solid rgba(151, 143, 189, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  box-shadow: 0 5px 12px rgba(68, 55, 130, 0.05);
}

.page-jump input {
  width: 42px;
  height: 22px;
  border: 0;
  border-radius: 999px;
  background: rgba(246, 243, 255, 0.9);
  color: var(--purple-deep);
  text-align: center;
  outline: none;
  font-size: 12px;
  font-weight: 850;
}

.page-jump button {
  height: 22px;
  min-width: 32px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--lime);
  color: #17210b;
  font-size: 11px;
  font-weight: 900;
}

.pagination-actions button {
  flex: 0 0 auto;
  min-width: 30px;
  height: 30px;
  padding: 0 9px;
  border: 1px solid rgba(151, 143, 189, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--purple-deep);
  font-size: 13px;
  font-weight: 850;
  box-shadow: 0 5px 12px rgba(68, 55, 130, 0.06);
}

.pagination-actions button.active {
  background: var(--lime);
  border-color: rgba(202, 255, 0, 0.8);
  color: #17210b;
}

.pagination-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.admin-pager {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.admin-pager button {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(151, 143, 189, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--purple-deep);
  box-shadow: 0 5px 12px rgba(68, 55, 130, 0.06);
}

.admin-pager button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

@media (max-width: 520px) {
  .pagination-bar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .pagination-actions {
    width: 100%;
  }

  .admin-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .admin-layout .panel {
    min-width: 0;
  }

  .table-wrap {
    overflow: visible;
  }

  table {
    min-width: 0;
    background: transparent;
  }

  thead {
    display: none;
  }

  tbody {
    display: grid;
    gap: 10px;
  }

  tr {
    display: grid;
    gap: 7px;
    padding: 12px;
    border: 1px solid rgba(151, 143, 189, 0.14);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 10px 24px rgba(68, 55, 130, 0.06);
  }

  td {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 8px;
    padding: 0;
    border: 0;
    font-size: 12px;
  }

  td::before {
    color: var(--muted);
    font-weight: 800;
  }

  td:nth-child(1)::before { content: "设备"; }
  td:nth-child(2)::before { content: "类型"; }
  td:nth-child(3)::before { content: "存储"; }
  td:nth-child(4)::before { content: "状态"; }
  td:nth-child(5)::before { content: "借用人"; }
  td:nth-child(6)::before { content: "位置"; }
  td:nth-child(7)::before { content: "操作"; }

  .table-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 3px;
  }

  .table-actions::before {
    flex: 0 0 70px;
  }

  .table-actions .btn {
    flex: 1 1 76px;
  }
}

.panel h3 {
  margin-bottom: 10px;
  font-size: 16px;
}

.kv {
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: 8px 12px;
  font-size: 13px;
}

.kv span:nth-child(odd) {
  color: var(--muted);
}

.list,
.notice-list,
.record-list,
.request-list {
  display: grid;
  gap: 8px;
}

.list-item,
.record-card {
  padding: 10px;
  border: 1px solid rgba(151, 143, 189, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.75);
  font-size: 13px;
  line-height: 1.5;
}

.record-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: start;
  background: rgba(255, 255, 255, 0.82);
}

.record-card p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.request-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(151, 143, 189, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
}

.request-card p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.request-actions {
  display: flex;
  gap: 8px;
}

.request-actions .btn {
  flex: 1;
}

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

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

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

.field label {
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid rgba(151, 143, 189, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
  outline: none;
}

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

.project-select-field {
  position: relative;
  z-index: 3;
}

.project-select-field.open {
  z-index: 30;
}

.project-select-control,
.project-date-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid rgba(151, 143, 189, 0.18);
  border-radius: 12px;
  background:
    radial-gradient(circle at 12% 0%, rgba(182, 255, 0, 0.1), transparent 30%),
    rgba(255, 255, 255, 0.82);
  color: var(--text);
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.68);
  backdrop-filter: blur(16px) saturate(1.08);
  -webkit-backdrop-filter: blur(16px) saturate(1.08);
}

.project-select-control {
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.project-select-control span {
  min-width: 0;
  overflow: hidden;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-select-control b {
  color: #6a4df5;
  font-size: 14px;
  transition: transform .18s ease;
}

.project-select-field.open .project-select-control b {
  transform: rotate(180deg);
}

.project-select-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  z-index: 80;
  display: grid;
  gap: 6px;
  max-height: 300px;
  overflow: auto;
  padding: 8px;
  border: 1px solid rgba(151, 143, 189, 0.22);
  border-radius: 18px;
  background:
    radial-gradient(circle at 16% 0%, rgba(182, 255, 0, 0.16), transparent 28%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(247, 244, 255, 0.82));
  box-shadow: 0 22px 54px rgba(68, 55, 130, 0.18);
  backdrop-filter: blur(22px) saturate(1.18);
  -webkit-backdrop-filter: blur(22px) saturate(1.18);
  overscroll-behavior: contain;
}

.project-select-menu[hidden] {
  display: none;
}

.project-select-menu button {
  min-height: 40px;
  padding: 0 12px;
  border-radius: 12px;
  color: #111827;
  font-size: 15px;
  font-weight: 850;
  text-align: left;
}

.project-select-menu button:hover {
  background: rgba(106, 77, 245, 0.08);
}

.project-select-menu button.active {
  background: #b6ff00;
  color: #111315;
  box-shadow: 0 10px 24px rgba(182, 255, 0, 0.28);
}

.project-date-control {
  gap: 10px;
  padding: 0 12px;
}

.project-date-control input {
  min-height: 40px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-weight: 850;
}

.project-date-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: rgba(106, 77, 245, 0.1);
  color: #6a4df5;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}

.project-date-trigger:hover {
  background: rgba(106, 77, 245, 0.16);
}

.project-date-control input::-webkit-calendar-picker-indicator {
  opacity: 0;
  pointer-events: none;
}

.image-field {
  grid-column: 1 / -1;
}

.image-upload {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  align-items: center;
  min-height: 112px;
  padding: 10px;
  border: 1px solid rgba(151, 143, 189, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.68);
}

.image-upload img {
  width: 96px;
  height: 96px;
  object-fit: contain;
  border: 1px solid rgba(151, 143, 189, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
}

.image-upload input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.upload-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 12px;
  background: var(--lime);
  color: #17210b;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.image-upload p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.form-tip {
  margin: -2px 0 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.form-status {
  grid-column: 1 / -1;
  min-height: 42px;
  margin: 0;
  padding: 11px 12px;
  border: 1px solid rgba(151, 143, 189, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.form-status.saving {
  border-color: #c7d2fe;
  background: #f4f7ff;
  color: var(--blue);
}

.form-status.success {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #16a34a;
}

.form-status.error {
  border-color: #fecaca;
  background: #fff7f7;
  color: #ef4444;
}

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

.admin-table-head {
  align-items: center;
  margin-bottom: 10px;
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  background: rgba(255, 255, 255, 0.84);
  font-size: 13px;
}

th,
td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.table-actions .btn {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 10px;
}

th {
  background: #f7f4ff;
  color: var(--muted);
  font-weight: 600;
}

@media (max-width: 520px) {
  .admin-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .admin-layout .panel {
    min-width: 0;
  }

  .table-wrap {
    overflow: visible;
  }

  table {
    min-width: 0;
    background: transparent;
  }

  thead {
    display: none;
  }

  tbody {
    display: grid;
    gap: 10px;
  }

  tr {
    display: grid;
    gap: 7px;
    padding: 12px;
    border: 1px solid rgba(151, 143, 189, 0.14);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 10px 24px rgba(68, 55, 130, 0.06);
  }

  td {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 8px;
    padding: 0;
    border: 0;
    font-size: 12px;
  }

  td::before {
    color: var(--muted);
    font-weight: 800;
  }

  td:nth-child(1)::before { content: "设备"; }
  td:nth-child(2)::before { content: "类型"; }
  td:nth-child(3)::before { content: "存储"; }
  td:nth-child(4)::before { content: "状态"; }
  td:nth-child(5)::before { content: "借用人"; }
  td:nth-child(6)::before { content: "位置"; }
  td:nth-child(7)::before { content: "操作"; }

  .table-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 3px;
  }

  .table-actions::before {
    flex: 0 0 70px;
  }

  .table-actions .btn {
    flex: 1 1 76px;
  }
}

.empty {
  padding: 28px 16px;
  color: var(--muted);
  text-align: center;
  background: rgba(255, 255, 255, 0.6);
  border: 1px dashed rgba(151, 143, 189, 0.28);
  border-radius: 14px;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 16px;
  background:
    radial-gradient(circle at 18% 12%, rgba(191, 255, 0, 0.12), transparent 22%),
    radial-gradient(circle at 82% 18%, rgba(122, 92, 255, 0.2), transparent 28%),
    rgba(30, 27, 53, 0.36);
  backdrop-filter: blur(22px) saturate(1.1);
  -webkit-backdrop-filter: blur(22px) saturate(1.1);
  animation: modalBackdropIn .2s ease-out both;
}

.modal-card {
  width: min(680px, 100%);
  max-height: min(84vh, 760px);
  overflow: auto;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 32px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(248, 246, 255, 0.78));
  box-shadow: 0 34px 100px rgba(48, 39, 103, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(24px) saturate(1.14);
  -webkit-backdrop-filter: blur(24px) saturate(1.14);
  transform-origin: center;
  animation: modalCardIn .24s cubic-bezier(.2, .9, .2, 1) both;
}

.modal.closing {
  pointer-events: none;
  animation: modalBackdropOut .18s ease-in both;
}

.modal.closing .modal-card {
  animation: modalCardOut .18s ease-in both;
}

@keyframes modalBackdropIn {
  from {
    opacity: 0;
    backdrop-filter: blur(0);
    -webkit-backdrop-filter: blur(0);
  }
  to {
    opacity: 1;
    backdrop-filter: blur(22px) saturate(1.1);
    -webkit-backdrop-filter: blur(22px) saturate(1.1);
  }
}

@keyframes modalBackdropOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@keyframes modalCardIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(.965);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes modalCardOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(12px) scale(.975);
  }
}

@media (prefers-reduced-motion: reduce) {
  .modal,
  .modal-card,
  .modal.closing,
  .modal.closing .modal-card {
    animation: none;
  }
}

.detail-modal-card {
  width: min(1120px, 100%);
  padding: 18px;
}

.detail-modal-card .detail-hero {
  margin: -6px -6px 0;
  border: 0;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.56);
}

.detail-modal-card .detail-hero-inner {
  padding: 16px;
}

.detail-modal-card .detail-media {
  align-items: center;
}

.detail-modal-card .content-grid {
  padding: 14px 0 0;
}

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

.modal-head h3 {
  font-size: 24px;
  line-height: 1.15;
}

.close-btn {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  background: rgba(122, 92, 255, 0.08);
  color: #111827;
  font-size: 24px;
  font-weight: 900;
}

.modal-card .field input,
.modal-card .field select,
.modal-card .field textarea {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(151, 143, 189, 0.22);
  border-radius: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.toast {
  position: fixed;
  bottom: 86px;
  left: 50%;
  z-index: 80;
  max-width: min(420px, calc(100vw - 32px));
  padding: 10px 14px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: #26204f;
  color: #fff;
  box-shadow: var(--shadow);
}

.notice {
  padding: 10px;
  border-top: 1px solid rgba(151, 143, 189, 0.16);
  border-right: 1px solid rgba(151, 143, 189, 0.16);
  border-bottom: 1px solid rgba(151, 143, 189, 0.16);
  border-left: 4px solid var(--accent);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
  font-size: 13px;
}

.notice.warn {
  border-left-color: var(--warning);
}

.notice.danger {
  border-left-color: var(--danger);
}

@media (min-width: 720px) {
  .app-shell {
    padding-bottom: 0;
    padding-left: 116px;
  }

  .topbar {
    position: sticky;
    margin-left: 0;
    background:
      radial-gradient(circle at 16% 0%, rgba(202, 255, 0, 0.1), transparent 24%),
      linear-gradient(135deg, rgba(255, 255, 255, 0.66), rgba(246, 243, 255, 0.48));
    border-bottom: 1px solid rgba(255, 255, 255, 0.58);
  }

  .topbar-inner {
    max-width: 1420px;
    padding: 18px 24px 14px;
  }

  h1 {
    font-size: 24px;
  }

  .admin-pill {
    display: inline-flex;
  }

  .session-pill {
    display: inline-flex;
  }

  .brand-kicker {
    font-size: 12px;
  }

  .main,
  .content-grid,
  .detail-hero-inner {
    max-width: 1420px;
    padding-right: 20px;
    padding-left: 20px;
  }

  .toolbar {
    grid-template-columns: minmax(280px, 1fr) auto;
    align-items: center;
  }

  .device-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
  }

  .device-name {
    font-size: 14px;
  }

  .device-body {
    padding: 9px;
  }

  .stats-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .dashboard-panels {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .tabs {
    position: fixed;
    top: 12px;
    bottom: 12px;
    left: 12px;
    z-index: 35;
    display: flex;
    flex-direction: column;
    width: 92px;
    gap: 10px;
    padding: 84px 10px 18px;
    border: 1px solid rgba(255, 255, 255, 0.34);
    border-radius: 22px;
    background:
      radial-gradient(circle at 25% 10%, rgba(202, 255, 0, 0.22), transparent 16%),
      linear-gradient(180deg, rgba(132, 122, 199, 0.98), rgba(94, 86, 166, 0.98));
    box-shadow: 0 24px 60px rgba(47, 39, 105, 0.32);
    backdrop-filter: blur(18px);
  }

  .nav-bubble {
    top: 84px;
    right: 10px;
    bottom: auto;
    left: 10px;
    width: auto;
    height: 58px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(calc(var(--nav-active, 0) * 68px));
    animation: navBubbleY .28s cubic-bezier(.2, .85, .2, 1) both;
  }

  @keyframes navBubbleY {
    from {
      transform: translateY(calc(var(--nav-from, 0) * 68px));
    }
    to {
      transform: translateY(calc(var(--nav-active, 0) * 68px));
    }
  }

  .tabs::before {
    content: "布鲁厚米";
    position: absolute;
    top: 18px;
    right: 12px;
    left: 12px;
    display: grid;
    place-items: center;
    height: 44px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 14px;
    font-weight: 900;
  }

  .tabs::after {
    content: "工作室";
    margin-top: auto;
    padding: 12px 6px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.13);
    color: rgba(255, 255, 255, 0.88);
    font-size: 12px;
    font-weight: 800;
    text-align: center;
  }

  .tabs button {
    display: grid;
    grid-template-columns: 1fr;
    place-items: center;
    width: 100%;
    min-height: 58px;
    padding: 8px 4px;
    border: 0;
    border-radius: 16px;
    background: transparent;
    color: rgba(255, 255, 255, 0.88);
    font-size: 12px;
    font-weight: 800;
  }

  .tabs button span {
    font-size: 22px;
  }

  .tabs button.active {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
  }

  .tabs button.active span {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: var(--lime);
    color: #2b3350;
  }

  .detail-media {
    grid-template-columns: 360px 1fr;
    align-items: center;
  }

  .content-grid,
  .admin-layout {
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  }

  .form-grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .request-card {
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .request-actions .btn {
    flex: initial;
  }
}

@media (min-width: 1080px) {
  .device-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
  }
}

@media (min-width: 1320px) {
  .device-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px;
  }
}

/* Studio project system skin */
.app-shell {
  background: #f6f7f8;
}

.topbar {
  margin-left: 0;
  background: rgba(246, 247, 248, 0.82);
  border-bottom: 1px solid rgba(15, 17, 21, 0.06);
  box-shadow: none;
}

.brand-kicker {
  color: #111315;
}

.subtitle {
  color: #6b7280;
}

.studio-main {
  max-width: 1480px;
  margin: 0 auto;
  padding: 18px 14px 96px;
}

.project-detail-page {
  max-width: 1320px;
  padding-bottom: 120px;
}

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

.studio-toolbar h2,
.studio-card h2 {
  font-size: 22px;
  line-height: 1.2;
}

.studio-toolbar p,
.studio-card p {
  margin-top: 4px;
  color: #6b7280;
  font-size: 13px;
}

.studio-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: #b6ff00;
  color: #111315;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(182, 255, 0, 0.24);
}

.project-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.project-view-toggle {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(151, 143, 189, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(16px) saturate(1.08);
  -webkit-backdrop-filter: blur(16px) saturate(1.08);
}

.project-view-toggle button {
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  color: #6b7280;
  font-size: 13px;
  font-weight: 900;
}

.project-view-toggle button.active {
  background: #111315;
  color: #b6ff00;
}

.studio-card,
.studio-side-panel {
  border: 1px solid rgba(15, 17, 21, 0.06);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 50px rgba(15, 17, 21, 0.06);
  padding: 16px;
}

.project-wall-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.project-wall-layout.list-mode {
  grid-template-columns: minmax(0, 1fr);
}

.project-search-row {
  margin-bottom: 12px;
}

.studio-search {
  position: relative;
}

.studio-search span {
  position: absolute;
  top: 9px;
  left: 14px;
  color: #8b929e;
}

.studio-search input,
.project-admin-filters input,
.project-admin-filters select {
  width: 100%;
  min-height: 42px;
  padding: 0 14px 0 38px;
  border: 1px solid rgba(15, 17, 21, 0.08);
  border-radius: 999px;
  background: #fff;
  outline: none;
}

.project-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-bottom: 14px;
  padding-bottom: 2px;
}

.project-tabs button {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(15, 17, 21, 0.08);
  color: #424853;
  font-weight: 800;
}

.project-tabs button.active {
  background: #b6ff00;
  color: #111315;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: 18px;
  justify-content: start;
  align-items: start;
}

.project-card {
  overflow: hidden;
  border: 1px solid rgba(15, 17, 21, 0.06);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(15, 17, 21, 0.06);
  transition: transform .16s ease, box-shadow .16s ease;
}

.project-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 60px rgba(15, 17, 21, 0.1);
}

.project-cover {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #f4f6fb;
}

.project-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.025);
  transform-origin: center;
}

.project-type,
.project-status {
  position: absolute;
  top: 10px;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.project-type {
  left: 10px;
  background: #b6ff00;
  color: #111315;
}

.project-status {
  right: 10px;
  background: rgba(17, 19, 21, 0.82);
  color: #fff;
}

.project-type.inline,
.project-status.inline {
  position: static;
  display: inline-flex;
  margin-right: 6px;
}

.project-cover em {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(17, 19, 21, 0.82);
  color: #fff;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.project-card-body {
  padding: 12px;
}

.project-card-body h3 {
  display: -webkit-box;
  min-height: 40px;
  overflow: hidden;
  font-size: 16px;
  line-height: 1.25;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.project-card-body p {
  margin-top: 6px;
  color: #6b7280;
  font-size: 13px;
}

.owner-dot {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-right: 6px;
  border-radius: 999px;
  background: #111315;
  color: #b6ff00;
  font-size: 12px;
  font-weight: 900;
}

.studio-side-panel h3 {
  margin: 0 0 10px;
}

.studio-mini-list {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.studio-mini-list button,
.calendar-event-row {
  display: grid;
  gap: 4px;
  padding: 10px;
  border-radius: 14px;
  background: #f7f8fa;
  text-align: left;
}

.studio-mini-list span,
.calendar-event-row span {
  color: #6b7280;
  font-size: 12px;
}

.project-admin-filters {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 14px;
}

.project-wall-list-filters {
  grid-template-columns: minmax(160px, 220px) minmax(160px, 220px);
  justify-content: start;
}

.project-manage-card {
  padding: 0;
  overflow: hidden;
}

.project-wall-manage-panel {
  margin-top: 4px;
}

.project-manage-card > .studio-toolbar,
.project-manage-card > .project-admin-filters,
.project-manage-summary {
  margin-right: 16px;
  margin-left: 16px;
}

.project-manage-card > .studio-toolbar {
  margin-top: 16px;
}

.project-manage-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-bottom: 14px;
  color: #7b8088;
  font-size: 14px;
  font-weight: 800;
}

.project-manage-summary span {
  padding: 0 18px;
  border-right: 1px solid rgba(15, 17, 21, 0.1);
}

.project-manage-summary span:first-child {
  padding-left: 0;
}

.project-manage-summary span:last-child {
  border-right: 0;
}

.project-manage-list {
  display: grid;
}

.project-manage-item {
  display: grid;
  grid-template-columns: 184px minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  min-height: 156px;
  padding: 22px 16px;
  border-top: 1px solid rgba(15, 17, 21, 0.08);
  background: rgba(255, 255, 255, 0.72);
}

.project-manage-cover {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  background: #f3f4f6;
}

.project-manage-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-manage-cover em {
  position: absolute;
  right: 6px;
  bottom: 6px;
  padding: 2px 6px;
  border-radius: 8px;
  background: rgba(15, 17, 21, 0.82);
  color: #fff;
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
}

.project-manage-info {
  min-width: 0;
}

.project-manage-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.project-manage-title-row h3 {
  min-width: 0;
  overflow: hidden;
  font-size: 20px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-manage-date {
  margin-top: 14px;
  color: #4b5563;
  font-size: 16px;
  font-weight: 700;
}

.project-manage-sub {
  margin-top: 8px;
  color: #4b5563;
  font-size: 15px;
  font-weight: 700;
}

.project-manage-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 18px;
  color: #9aa0aa;
  font-size: 14px;
  font-weight: 800;
}

.project-manage-meta span {
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-manage-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.project-manage-actions .btn {
  min-width: 74px;
  min-height: 42px;
  border-radius: 8px;
}

.studio-table-wrap {
  overflow-x: auto;
}

.studio-table {
  min-width: 860px;
}

.path-cell {
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-detail-grid,
.calendar-layout,
.settings-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.project-detail-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.project-detail-title h2 {
  max-width: 980px;
  font-size: 24px;
  line-height: 1.25;
}

.project-detail-title p {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
  color: #6b7280;
  font-weight: 800;
}

.project-detail-cover {
  width: 100%;
  border-radius: 18px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  margin-bottom: 14px;
}

.material-path,
.calendar-link-box input {
  width: 100%;
  overflow: hidden;
  padding: 10px 12px;
  border-radius: 14px;
  background: #f7f8fa;
  color: #111315;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-list,
.linked-device-grid,
.calendar-event-list {
  display: grid;
  gap: 10px;
}

.task-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 10px;
  border-radius: 16px;
  background: #f7f8fa;
}

.task-row input,
.task-row select,
.project-device-picker select {
  min-height: 36px;
  border: 1px solid rgba(15, 17, 21, 0.08);
  border-radius: 12px;
  background: #fff;
  padding: 0 10px;
}

.project-device-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.linked-device {
  display: grid;
  gap: 6px;
  padding: 12px;
  border-radius: 16px;
  background: #f7f8fa;
}

.linked-device span,
.linked-device em {
  color: #6b7280;
  font-size: 12px;
  font-style: normal;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  grid-auto-rows: 112px;
}

.calendar-cell {
  min-height: 0;
  height: 112px;
  overflow: hidden;
  padding: 7px;
  border-radius: 14px;
  background: #f7f8fa;
  cursor: pointer;
}

.calendar-cell b {
  display: block;
  margin-bottom: 5px;
}

.calendar-cell button {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 2px;
  width: 100%;
  margin-top: 3px;
  overflow: hidden;
  padding: 3px 6px;
  border-radius: 8px;
  background: #eaff9d;
  color: #111315;
  font-size: 9px;
  line-height: 1.15;
  text-align: left;
  white-space: normal;
  cursor: pointer;
}

.calendar-cell button span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-cell button em {
  color: rgba(17, 19, 21, 0.68);
  font-size: 9px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.calendar-add-btn {
  display: inline-grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #111315;
  box-shadow: 0 16px 36px rgba(182, 255, 0, 0.34);
  font-size: 24px;
  font-weight: 950;
  cursor: pointer;
}

.calendar-popover {
  position: fixed;
  z-index: 120;
  display: grid;
  gap: 10px;
  max-height: min(420px, calc(100svh - 24px));
  overflow: auto;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 28px 70px rgba(20, 20, 30, 0.22);
  backdrop-filter: blur(22px);
  animation: calendarPopoverIn 0.18s ease-out;
}

.calendar-popover::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 50%;
  width: 14px;
  height: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.68);
  border-left: 1px solid rgba(255, 255, 255, 0.68);
  background: rgba(255, 255, 255, 0.78);
  transform: translateX(-50%) rotate(45deg);
}

.calendar-popover-title {
  padding-right: 38px;
  color: #111827;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 950;
}

.calendar-popover-muted {
  color: #8a909b;
  font-size: 14px;
  font-weight: 850;
}

.calendar-popover-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-top: 1px solid rgba(15, 17, 21, 0.08);
  color: #6b7280;
  font-size: 14px;
  font-weight: 800;
}

.calendar-popover-line strong {
  color: #111827;
}

.calendar-popover-path {
  overflow: hidden;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(247, 248, 250, 0.76);
  color: #6b7280;
  font-size: 13px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-popover-action {
  width: 100%;
  justify-content: center;
}

.calendar-popover-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 0;
  border-radius: 12px;
  background: rgba(238, 239, 246, 0.86);
  color: #111827;
  font-size: 22px;
  font-weight: 900;
  cursor: pointer;
}

.calendar-popover-form {
  display: grid;
  gap: 10px;
}

.calendar-popover-form label {
  display: grid;
  gap: 6px;
  color: #111827;
  font-size: 13px;
  font-weight: 900;
}

.calendar-popover-form input,
.calendar-popover-form select {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(15, 17, 21, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.74);
  color: #111827;
  padding: 0 12px;
  font: inherit;
  font-weight: 800;
}

@keyframes calendarPopoverIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.calendar-layout > .studio-card:last-child {
  padding: 18px;
}

.calendar-layout > .studio-card:last-child h3 {
  margin-bottom: 10px;
  font-size: 20px;
}

.calendar-event-list {
  gap: 7px;
}

.calendar-event-row {
  min-width: 0;
  padding: 10px 11px;
  border-radius: 14px;
}

.calendar-event-row strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.25;
  font-weight: 900;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.calendar-event-row span {
  display: block;
  margin-top: 5px;
  color: #6b7280;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
  white-space: normal;
}

.calendar-link-box {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.link-button {
  padding: 0;
  background: transparent;
  color: #5b42ef;
  font-weight: 850;
  text-align: left;
}

@media (min-width: 720px) {
  .app-shell {
    padding-left: 176px;
  }

  .tabs {
    width: 148px;
    padding: 78px 10px 18px;
    border-color: rgba(255, 255, 255, 0.34);
    background:
      radial-gradient(circle at 8% 20%, rgba(202, 255, 0, 0.2), transparent 19%),
      linear-gradient(135deg, rgba(132, 122, 199, 0.94), rgba(94, 86, 166, 0.94));
    box-shadow: 0 24px 60px rgba(47, 39, 105, 0.26);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
  }

  .tabs::before {
    content: "蓝朋友TV";
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
  }

  .tabs::after {
    content: "Hans\A 管理员";
    white-space: pre-line;
    background: rgba(255, 255, 255, 0.14);
  }

  .nav-bubble {
    background: rgba(255, 255, 255, 0.18);
  }

  .tabs button.active span {
    background: #b6ff00;
  }

  .project-wall-layout.grid-mode {
    grid-template-columns: minmax(0, 1fr) 260px;
  }

  .project-wall-layout.list-mode {
    grid-template-columns: minmax(0, 1fr);
  }

  .project-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }

  .project-admin-filters {
    grid-template-columns: minmax(220px, 1fr) 160px 160px 150px 150px;
  }

  .project-detail-grid {
    grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
    align-items: start;
  }

  .project-editor-card {
    max-width: none;
    margin: 0;
  }

  .calendar-layout {
    grid-template-columns: minmax(0, 1fr) clamp(210px, 18vw, 250px);
    align-items: start;
  }

  .settings-grid {
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: start;
  }

  .task-row {
    grid-template-columns: minmax(160px, 1fr) 120px 180px 120px auto auto;
    align-items: center;
  }
}

/* Project collaboration refinements */
.tabs {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.tabs button.active {
  background: transparent !important;
  box-shadow: none !important;
}

.nav-bubble {
  will-change: transform;
}

.project-cover {
  aspect-ratio: 4 / 3;
}

.project-detail-cover {
  aspect-ratio: 4 / 3;
  max-height: 220px;
  object-fit: cover;
  background: #f4f6fb;
}

.project-cover-upload {
  grid-template-columns: 120px 1fr;
  align-items: stretch;
}

.project-cover-upload img {
  width: 120px;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.project-detail-edit-form {
  align-items: start;
}

.project-editor-card {
  padding: 18px;
}

.project-detail-form {
  display: grid;
  gap: 14px;
}

.project-summary-card {
  display: grid;
  gap: 18px;
  padding: 24px;
}

.project-back-btn {
  position: fixed;
  bottom: 24px;
  left: 198px;
  z-index: 34;
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 44px;
  margin: 0 0 12px;
  padding: 0;
  justify-self: start;
  border: 1px solid rgba(182, 255, 0, 0.72);
  border-radius: 999px;
  background: linear-gradient(135deg, #c9ff00, #9df000);
  color: #152000;
  font-size: 26px;
  font-weight: 950;
  line-height: 1;
  box-shadow: 0 18px 38px rgba(182, 255, 0, 0.28), 0 10px 28px rgba(47, 39, 105, 0.1);
  backdrop-filter: blur(18px) saturate(1.08);
  -webkit-backdrop-filter: blur(18px) saturate(1.08);
  transition: width .18s ease, transform .18s ease, box-shadow .18s ease;
}

.project-back-btn:hover {
  width: 64px;
  transform: translateY(-1px);
  box-shadow: 0 22px 44px rgba(182, 255, 0, 0.34), 0 14px 34px rgba(47, 39, 105, 0.13);
}

.project-summary-body {
  display: grid;
  grid-template-columns: minmax(260px, 390px) minmax(0, 1fr) auto;
  gap: 30px;
  align-items: center;
}

.project-summary-cover-block {
  display: grid;
  grid-template-columns: minmax(170px, 240px) minmax(110px, auto);
  gap: 14px;
  align-items: center;
}

.project-summary-cover {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 14px;
  box-shadow: 0 16px 34px rgba(15, 17, 21, 0.08);
}

.project-summary-cover-tools {
  display: grid;
  align-content: center;
  margin: 0;
  padding: 0;
  background: transparent;
}

.project-autosave-card {
  display: grid;
  gap: 8px;
  justify-items: end;
  color: #6b7280;
  font-weight: 800;
}

.project-autosave-card .form-status {
  margin: 0;
  padding: 12px 18px;
  border: 1px solid rgba(151, 143, 189, 0.22);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
}

.project-autosave-card small {
  font-size: 12px;
}

.project-edit-dashboard {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
}

.project-basic-card {
  grid-column: 1 / -1;
}

.project-overview-card {
  grid-column: span 4;
}

.project-resource-card {
  grid-column: 1 / -1;
}

.project-notes-card,
.project-activity-card {
  grid-column: span 6;
}

.project-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.project-section-head h3 {
  font-size: 20px;
  line-height: 1.2;
}

.project-section-head p {
  margin-top: 6px;
  color: #6b7280;
  font-size: 13px;
  font-weight: 800;
}

.project-basic-fields {
  grid-template-columns: repeat(4, minmax(150px, 280px));
  gap: 16px 18px;
  justify-content: start;
  align-items: start;
}

.project-basic-fields .field:first-child {
  grid-column: span 2;
}

.project-basic-notes {
  grid-column: 1 / -1;
  max-width: 760px;
}

.project-basic-notes textarea {
  min-height: 116px;
}

.project-info-list {
  display: grid;
}

.project-info-list div {
  display: grid;
  grid-template-columns: minmax(90px, 0.7fr) minmax(0, 1fr);
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid rgba(15, 17, 21, 0.06);
}

.project-info-list div:last-child {
  border-bottom: 0;
}

.project-info-list span {
  color: #6b7280;
  font-weight: 800;
}

.project-info-list strong {
  min-width: 0;
  overflow: hidden;
  color: #111827;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-resource-grid {
  display: grid;
  grid-template-columns: minmax(320px, 620px) minmax(260px, 520px);
  gap: 22px;
  align-items: start;
  justify-content: start;
}

.resource-main {
  display: grid;
  gap: 12px;
}

.nas-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.nas-jump-btn {
  min-height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: 14px;
  background: var(--lime);
  color: #111315;
  font-weight: 900;
  white-space: nowrap;
  box-shadow: 0 12px 28px rgba(182, 255, 0, 0.22);
  cursor: pointer;
}

.nas-jump-btn:disabled {
  background: rgba(151, 143, 189, 0.16);
  color: #8a8fa3;
  box-shadow: none;
  cursor: not-allowed;
}

.project-cover-manager {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.project-cover-manager h4 {
  grid-column: 1 / -1;
  font-size: 16px;
}

.project-cover-manager .project-detail-cover {
  width: 132px;
  max-height: none;
  margin: 0;
  border-radius: 12px;
}

.project-cover-manager .project-cover-inline {
  align-self: stretch;
  align-content: center;
  background: transparent;
  padding: 0;
}

.project-notes-card .field label {
  display: none;
}

.project-notes-card textarea {
  min-height: 150px;
}

.project-activity-list {
  display: grid;
  gap: 12px;
}

.project-activity-item {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(15, 17, 21, 0.06);
}

.project-activity-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.project-activity-item i {
  width: 10px;
  height: 10px;
  margin-top: 6px;
  border-radius: 50%;
  background: #a3aab8;
  box-shadow: 0 0 0 4px rgba(163, 170, 184, 0.12);
}

.project-activity-item i.purple {
  background: #6a4df5;
  box-shadow: 0 0 0 4px rgba(106, 77, 245, 0.12);
}

.project-activity-item i.blue {
  background: #3478f6;
  box-shadow: 0 0 0 4px rgba(52, 120, 246, 0.12);
}

.project-activity-item strong,
.project-activity-item span {
  display: block;
}

.project-activity-item strong {
  color: #111827;
  font-weight: 900;
}

.project-activity-item span,
.project-activity-item time {
  color: #6b7280;
  font-size: 13px;
  font-weight: 750;
}

.project-editor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(15, 17, 21, 0.08);
}

.project-editor-head h3 {
  font-size: 22px;
  line-height: 1.2;
}

.project-editor-head p {
  margin-top: 5px;
  color: #6b7280;
  font-size: 13px;
  font-weight: 750;
}

.project-editor-layout {
  display: grid;
  grid-template-columns: minmax(240px, 330px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  padding-top: 18px;
}

.project-cover-card {
  display: grid;
  gap: 12px;
}

.project-cover-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 0;
  padding: 10px;
  border-radius: 16px;
  background: #f7f8fa;
}

.project-cover-inline input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.project-cover-inline p {
  color: #6b7280;
  font-size: 13px;
  font-weight: 700;
}

.project-editor-fields {
  min-width: 0;
}

.project-inline-fields {
  gap: 14px;
}

.project-inline-fields .field:first-child {
  grid-column: 1 / -1;
}

.project-inline-fields .field textarea {
  min-height: 120px;
}

.project-inline-fields .field:last-child {
  grid-column: 1 / -1;
}

.copy-doc-actions {
  align-self: end;
}

.material-folder-actions {
  align-self: end;
}

.material-path-box {
  display: grid;
  gap: 8px;
  min-height: 44px;
}

.material-path-box strong {
  display: block;
  max-width: 100%;
  padding: 11px 12px;
  overflow: hidden;
  color: #5f687a;
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1px solid rgba(15, 17, 21, 0.06);
  border-radius: 14px;
  background: #f7f8fa;
}

.material-path-box .action-row {
  gap: 8px;
}

.material-path-box .btn {
  min-height: 44px;
  border-radius: 14px;
}

.copy-doc-actions .action-row {
  gap: 8px;
}

.copy-doc-actions .btn {
  min-height: 44px;
  border-radius: 14px;
}

.copy-doc-preview-card {
  position: sticky;
  top: 104px;
  z-index: 8;
  margin-top: 16px;
  margin-left: 0;
  width: 100%;
  max-width: 100%;
  height: calc(100svh - 128px);
  min-height: 620px;
  max-height: none;
  overflow: hidden;
  padding: 0;
  border-radius: 24px;
  overscroll-behavior: contain;
}

.copy-doc-preview-card[hidden] {
  display: none;
}

.copy-doc-preview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(15, 17, 21, 0.08);
}

.copy-doc-preview-head h3 {
  font-size: 22px;
  line-height: 1.2;
}

.copy-doc-preview-head p {
  max-width: 680px;
  font-weight: 750;
}

.copy-doc-frame-wrap {
  position: relative;
  height: 100%;
  min-height: 0;
  max-height: none;
  border: 1px solid rgba(15, 17, 21, 0.08);
  border-radius: 24px;
  overflow: hidden;
  overscroll-behavior: contain;
  background: #f7f8fb;
}

.copy-doc-frame-wrap iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

.copy-doc-frame-tip {
  padding: 10px 14px;
  color: #6b7280;
  font-size: 13px;
  font-weight: 750;
  background: rgba(255, 255, 255, 0.88);
  border-top: 1px solid rgba(15, 17, 21, 0.08);
}

.copy-doc-empty {
  display: grid;
  place-items: center;
  min-height: 180px;
  text-align: center;
  color: #6b7280;
  border: 1px dashed rgba(15, 17, 21, 0.15);
  border-radius: 18px;
  background: #f8fafc;
}

.copy-doc-empty strong {
  color: #111827;
  font-size: 18px;
}

.copy-doc-empty span {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 750;
}

.calendar-toolbar {
  align-items: flex-start;
}

.calendar-controls,
.calendar-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.calendar-controls strong {
  min-width: 112px;
  text-align: center;
}

.calendar-filters {
  margin: 12px 0;
}

.calendar-filters select {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(15, 17, 21, 0.08);
  border-radius: 999px;
  background: #fff;
  font-weight: 800;
}

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

.calendar-weekdays span {
  color: #6b7280;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.calendar-cell {
  min-height: 0;
  border: 1px solid rgba(15, 17, 21, 0.06);
  background: rgba(255, 255, 255, 0.76);
}

.calendar-cell.muted {
  color: #a4aab4;
  background: rgba(247, 248, 250, 0.56);
}

.calendar-cell.today {
  border-color: rgba(182, 255, 0, 0.85);
  box-shadow: inset 0 0 0 2px rgba(182, 255, 0, 0.2);
}

.calendar-cell small {
  display: inline-flex;
  margin-top: 4px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(17, 19, 21, 0.06);
  color: #6b7280;
  font-size: 11px;
  font-weight: 800;
}

@media (min-width: 720px) {
  .tabs button.active {
    background: transparent !important;
  }

  .project-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}

@media (max-width: 719px) {
  .app-shell {
    background: #f7f8fa;
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    margin: 0;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(15, 17, 21, 0.06);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
  }

  .topbar-inner {
    padding: 12px 12px 10px;
  }

  .title-row {
    align-items: center;
  }

  .brand-kicker {
    display: none;
  }

  .brand-title h1 {
    font-size: 22px;
    line-height: 1;
  }

  .subtitle {
    font-size: 12px;
  }

  .admin-pill {
    display: none;
  }

  .role-switch {
    height: 40px;
    padding: 3px;
  }

  .role-switch button {
    min-width: 58px;
    font-size: 13px;
  }

  .studio-main {
    padding: 10px 8px 104px;
  }

  .project-detail-page {
    padding-bottom: calc(116px + env(safe-area-inset-bottom));
  }

  .project-back-btn {
    bottom: calc(96px + env(safe-area-inset-bottom));
    left: 18px;
    width: 48px;
    height: 42px;
    font-size: 24px;
  }

  .project-wall-layout {
    display: block;
  }

  .project-main {
    min-width: 0;
  }

  .studio-toolbar {
    align-items: flex-start;
    margin-bottom: 10px;
    padding: 0 2px;
  }

  .project-toolbar-actions {
    gap: 8px;
  }

  .project-view-toggle {
    order: 2;
    width: 100%;
  }

  .project-view-toggle button {
    flex: 1;
  }

  .studio-toolbar h2 {
    font-size: 22px;
  }

  .studio-toolbar p {
    display: none;
  }

  .studio-toolbar .studio-btn {
    width: 36px;
    min-width: 36px;
    height: 36px;
    padding: 0;
    overflow: hidden;
    border-radius: 999px;
    font-size: 0;
  }

  .studio-toolbar .studio-btn::before {
    content: "+";
    font-size: 22px;
    line-height: 1;
  }

  .project-search-row {
    margin: 0 0 8px;
  }

  .studio-search input {
    min-height: 38px;
    border-radius: 999px;
    background: #fff;
    font-size: 14px;
  }

  .studio-search span {
    top: 7px;
  }

  .project-tabs {
    gap: 18px;
    margin: 0 -8px 8px;
    padding: 2px 8px 8px;
    background: #fff;
    border-bottom: 1px solid rgba(15, 17, 21, 0.05);
  }

  .project-tabs button {
    min-height: 34px;
    padding: 0 2px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #5f6673;
    font-size: 15px;
    font-weight: 900;
  }

  .project-tabs button.active {
    position: relative;
    background: transparent;
    color: #111315;
  }

  .project-tabs button.active::after {
    content: "";
    position: absolute;
    right: 8px;
    bottom: 0;
    left: 8px;
    height: 3px;
    border-radius: 999px;
    background: #b6ff00;
  }

  .project-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 156px), 1fr));
    gap: 8px;
  }

  .project-card {
    border: 0;
    border-radius: 10px;
    background: #fff;
    box-shadow: none;
  }

  .project-card:hover {
    transform: none;
    box-shadow: none;
  }

  .project-cover {
    aspect-ratio: 4 / 3;
    border-radius: 10px 10px 0 0;
    overflow: hidden;
  }

  .project-type,
  .project-status {
    top: 6px;
    min-height: 18px;
    padding: 2px 6px;
    font-size: 10px;
  }

  .project-type {
    left: 6px;
  }

  .project-status {
    right: 6px;
  }

  .project-cover em {
    right: 5px;
    bottom: 5px;
    padding: 2px 6px;
    font-size: 10px;
  }

  .project-card-body {
    padding: 8px 6px 10px;
  }

  .project-card-body h3 {
    min-height: 38px;
    font-size: 14px;
    line-height: 1.35;
  }

  .project-card-body p {
    margin-top: 3px;
    overflow: hidden;
    color: #7a8190;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .project-card-body div {
    margin-top: 5px;
    color: #7a8190;
    font-size: 11px;
  }

  .owner-dot {
    width: 18px;
    height: 18px;
    margin-right: 4px;
    font-size: 10px;
  }

  .studio-side-panel {
    margin-top: 12px;
    border-radius: 16px;
    padding: 12px;
    box-shadow: none;
  }

  .studio-side-panel h3 {
    font-size: 15px;
  }

  .studio-mini-list button {
    padding: 8px;
    border-radius: 10px;
  }

  .project-manage-card > .studio-toolbar,
  .project-manage-card > .project-admin-filters,
  .project-wall-list-filters,
  .project-manage-summary {
    margin-right: 10px;
    margin-left: 10px;
  }

  .project-wall-list-filters {
    grid-template-columns: 1fr;
  }

  .project-manage-summary {
    gap: 10px 0;
    font-size: 12px;
  }

  .project-manage-summary span {
    padding: 0 10px;
  }

  .project-manage-item {
    grid-template-columns: 118px minmax(0, 1fr);
    gap: 10px;
    min-height: 0;
    padding: 14px 10px;
  }

  .project-manage-title-row {
    align-items: flex-start;
    gap: 6px;
  }

  .project-manage-title-row .project-type {
    display: none;
  }

  .project-manage-title-row h3 {
    display: -webkit-box;
    font-size: 15px;
    line-height: 1.35;
    white-space: normal;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .project-manage-date,
  .project-manage-sub {
    margin-top: 6px;
    font-size: 12px;
  }

  .project-manage-meta {
    gap: 8px;
    margin-top: 8px;
    font-size: 11px;
  }

  .project-manage-meta span {
    max-width: 100%;
  }

  .project-manage-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }

  .project-manage-actions .btn {
    min-width: 58px;
    min-height: 34px;
    font-size: 12px;
  }

  .project-detail-hero {
    border-radius: 18px;
  }

  .project-summary-card {
    gap: 14px;
    padding: 16px;
  }

  .project-summary-body {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .project-summary-cover {
    max-height: 220px;
  }

  .project-autosave-card {
    justify-items: stretch;
  }

  .project-edit-dashboard {
    grid-template-columns: 1fr;
  }

  .project-basic-card,
  .project-overview-card,
  .project-resource-card,
  .project-notes-card,
  .project-activity-card {
    grid-column: 1 / -1;
  }

  .project-resource-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .project-basic-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .project-basic-fields .field:first-child,
  .project-basic-notes {
    grid-column: 1 / -1;
    max-width: none;
  }

  .project-basic-fields .field {
    gap: 4px;
  }

  .project-basic-fields .field label {
    font-size: 12px;
  }

  .project-basic-fields .field input,
  .project-basic-fields .field textarea,
  .project-basic-fields .project-select-control,
  .project-basic-fields .project-date-control {
    min-height: 44px;
    padding: 8px 10px;
    border-radius: 14px;
    font-size: 15px;
  }

  .project-basic-fields .project-select-control span,
  .project-basic-fields .project-date-control input {
    font-size: 15px;
    line-height: 1.2;
  }

  .project-basic-fields .project-date-control {
    gap: 6px;
  }

  .project-basic-fields .project-date-trigger {
    width: 30px;
    height: 30px;
    border-radius: 10px;
  }

  .project-basic-notes textarea {
    min-height: 118px;
  }

  .nas-input-row {
    grid-template-columns: 1fr;
  }

  .nas-jump-btn {
    width: 100%;
  }

  .project-cover-manager {
    grid-template-columns: 116px minmax(0, 1fr);
  }

  .project-cover-manager .project-detail-cover {
    width: 116px;
  }

  .project-activity-item {
    grid-template-columns: 12px minmax(0, 1fr);
  }

  .project-activity-item time {
    grid-column: 2;
  }

  .project-detail-title h2 {
    font-size: 20px;
  }

  .project-detail-title .action-row {
    width: 100%;
  }

  .project-detail-title .studio-btn {
    width: 100%;
  }

  .project-editor-card {
    padding: 12px;
    border-radius: 18px;
  }

  .project-editor-head {
    align-items: stretch;
    flex-direction: column;
    padding-bottom: 12px;
  }

  .project-editor-head .studio-btn {
    width: 100%;
  }

  .project-editor-layout {
    grid-template-columns: 1fr;
    gap: 14px;
    padding-top: 12px;
  }

  .project-detail-cover {
    max-height: none;
  }

  .project-inline-fields {
    grid-template-columns: 1fr;
  }

  .copy-doc-preview-card {
    top: 114px;
    margin-left: calc(50% - 50vw + 8px);
    margin-bottom: 0;
    width: calc(100vw - 16px);
    height: calc(100svh - 226px - env(safe-area-inset-bottom));
    min-height: 460px;
    max-height: none;
    border-radius: 16px;
    box-shadow: none;
  }

  .copy-doc-preview-head {
    flex-direction: column;
    align-items: stretch;
  }

  .copy-doc-preview-head .action-row {
    width: 100%;
  }

  .copy-doc-preview-head .btn {
    flex: 1;
  }

  .copy-doc-frame-wrap {
    height: 100%;
    min-height: 0;
    max-height: none;
    border-radius: 16px;
  }

  .copy-doc-frame-wrap iframe {
    height: 100%;
  }

  .calendar-layout {
    gap: 10px;
  }

  .calendar-grid,
  .calendar-weekdays {
    gap: 5px;
  }

  .calendar-grid {
    grid-auto-rows: 70px;
  }

  .calendar-layout > .studio-card:last-child {
    padding: 14px;
  }

  .calendar-cell {
    height: 70px;
    padding: 5px;
    border-radius: 12px;
  }

  .calendar-cell button {
    grid-template-columns: 1fr;
    gap: 1px;
    padding: 3px 5px;
    font-size: 9px;
  }

  .calendar-cell button em {
    display: none;
  }

  .calendar-event-row {
    padding: 9px 10px;
  }

  .calendar-event-row strong {
    font-size: 13px;
    -webkit-line-clamp: 1;
  }
}
