:root {
  --bg: #0a1325;
  --bg-2: #101d38;
  --panel: rgba(11, 22, 45, 0.72);
  --panel-strong: rgba(8, 16, 34, 0.92);
  --line: rgba(255, 255, 255, 0.12);
  --text: #eef4ff;
  --muted: #9fb2d3;
  --green: #44d492;
  --red: #ff657b;
  --amber: #ffcb6b;
  --cyan: #58d3ff;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "DM Sans", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(88, 211, 255, 0.18), transparent 30%),
    radial-gradient(circle at top right, rgba(255, 101, 123, 0.16), transparent 30%),
    linear-gradient(135deg, #07101e 0%, #0b1430 38%, #122448 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.7), transparent 92%);
}

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

.shell {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

.glass {
  background: var(--panel);
  border: 1px solid var(--line);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.hero {
  padding: 10px 0 30px;
}

.topbar,
.hero-grid,
.dashboard-grid,
.section-title,
.asset-card-top,
.asset-actions,
.modal-header,
.modal-footer,
.filters,
.inline-actions {
  display: flex;
  gap: 16px;
}

.topbar,
.section-title,
.asset-card-top,
.modal-header,
.modal-footer {
  align-items: center;
  justify-content: space-between;
}

.hero-grid,
.dashboard-grid {
  align-items: stretch;
}

.hero-grid {
  margin-top: 18px;
}

.hero-copy,
.hero-card,
.panel,
.asset-card,
.modal-card {
  border-radius: 28px;
}

.hero-copy {
  flex: 1.3;
  padding: 38px;
}

.hero-card {
  flex: 0.8;
  padding: 30px;
}

.panel {
  padding: 24px;
}

.hero-copy h2 {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1;
  margin: 14px 0;
  max-width: 11ch;
}

.hero-copy p,
.helper-text,
.asset-meta,
.asset-timeline,
table,
.custody-item p {
  color: var(--muted);
}

.eyebrow,
.chip,
.status-pill,
th {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.75rem;
}

.eyebrow,
.chip {
  color: var(--cyan);
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(88, 211, 255, 0.1);
  border: 1px solid rgba(88, 211, 255, 0.24);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
}

h1 {
  font-size: 1.8rem;
}

.hero-actions,
.metric-grid,
.inventory-grid,
.form-grid {
  display: grid;
  gap: 16px;
}

.hero-actions {
  grid-template-columns: repeat(auto-fit, minmax(180px, max-content));
  margin-top: 28px;
}

.metric-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 18px;
}

.metric {
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.metric strong {
  display: block;
  font-size: 1.8rem;
  color: var(--text);
  margin-top: 8px;
}

button {
  border: 0;
  cursor: pointer;
  transition: transform 180ms ease, opacity 180ms ease, background 180ms ease;
}

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

.primary-button,
.secondary-button,
.ghost-button,
.action-button,
.icon-button {
  border-radius: 16px;
}

.primary-button,
.secondary-button,
.ghost-button,
.action-button {
  padding: 14px 18px;
}

.primary-button {
  background: linear-gradient(135deg, #44d492 0%, #27a0ff 100%);
  color: #041423;
  font-weight: 700;
}

.secondary-button,
.ghost-button,
.action-button,
.icon-button {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.filters {
  flex-wrap: wrap;
  margin-top: 18px;
}

.add-asset-form {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.search-field,
.select-field,
label {
  display: grid;
  gap: 8px;
}

label span {
  font-size: 0.86rem;
  color: var(--muted);
}

input,
select,
textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: var(--text);
  border-radius: 16px;
  padding: 14px 16px;
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(88, 211, 255, 0.7);
  box-shadow: 0 0 0 4px rgba(88, 211, 255, 0.14);
}

.search-field {
  min-width: min(340px, 100%);
  flex: 1;
}

.select-field {
  min-width: 180px;
}

.inventory-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  margin: 22px 0;
}

.asset-card {
  padding: 20px;
  display: grid;
  gap: 16px;
  position: relative;
  overflow: hidden;
}

.asset-card::after {
  content: "";
  position: absolute;
  inset: auto -10% -45% 35%;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(88, 211, 255, 0.25), transparent 60%);
}

.asset-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  font-size: 1.8rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
}

.asset-name {
  font-size: 1.25rem;
}

.status-pill {
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 700;
}

.status-available {
  color: #062314;
  background: rgba(68, 212, 146, 0.95);
}

.status-issued {
  color: #30040b;
  background: rgba(255, 101, 123, 0.95);
}

.asset-meta,
.asset-timeline {
  display: grid;
  gap: 8px;
  position: relative;
  z-index: 1;
}

.asset-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.asset-line strong,
.custody-item strong,
td strong {
  color: var(--text);
}

.dashboard-grid {
  margin-top: 6px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 14px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

td {
  font-size: 0.95rem;
}

.action-checkout {
  color: var(--amber);
}

.action-return {
  color: var(--green);
}

.action-edit {
  color: var(--cyan);
}

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

.custody-item {
  padding: 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.custody-item strong {
  display: block;
  margin-bottom: 4px;
}

.modal {
  border: 0;
  padding: 0;
  background: transparent;
}

.modal::backdrop {
  background: rgba(3, 7, 18, 0.72);
  backdrop-filter: blur(8px);
}

.modal-card {
  width: min(760px, calc(100vw - 24px));
  padding: 24px;
  background: var(--panel-strong);
  border: 1px solid var(--line);
}

.email-card {
  width: min(680px, calc(100vw - 24px));
}

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

.toggle {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 14px;
}

.toggle input {
  width: auto;
}

.icon-button {
  width: 42px;
  height: 42px;
}

.empty-state {
  padding: 30px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.03);
}

.edit-issued-only[hidden],
.edit-available-only[hidden] {
  display: none;
}

@media (max-width: 960px) {
  .hero-grid,
  .dashboard-grid,
  .form-grid {
    grid-template-columns: 1fr;
    display: grid;
  }
}

@media (max-width: 680px) {
  .shell {
    width: min(100% - 20px, 1280px);
  }

  .hero-copy,
  .hero-card,
  .panel,
  .modal-card {
    padding: 20px;
    border-radius: 24px;
  }

  .hero-copy h2 {
    max-width: none;
  }

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

  .asset-card-top,
  .modal-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .status-pill {
    align-self: flex-start;
  }
}
