:root {
  color-scheme: light;
  --bg: #f7f7f2;
  --shell: #fcfcfa;
  --sidebar: #d9ddd7;
  --sidebar-strong: #c8cdc7;
  --panel: #ffffff;
  --panel-soft: #f3f4ef;
  --text: #1f211d;
  --muted: #6d7269;
  --line: #e5e7df;
  --accent: #8dbfa3;
  --accent-strong: #4d7a5e;
  --danger: #b44d4d;
  --shadow: 0 24px 60px rgba(74, 82, 66, 0.12);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: 'Manrope', sans-serif;
  background:
    radial-gradient(circle at top left, rgba(141, 191, 163, 0.18), transparent 32%),
    linear-gradient(180deg, #fafaf7 0%, var(--bg) 100%);
  color: var(--text);
}

body {
  min-height: 100vh;
  padding: 24px;
}

.hidden {
  display: none !important;
}

.app-shell {
  min-height: calc(100vh - 48px);
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  background: var(--shell);
  border: 1px solid rgba(109, 114, 105, 0.12);
  border-radius: 34px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.sidebar {
  background: linear-gradient(180deg, var(--sidebar) 0%, var(--sidebar-strong) 100%);
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.75);
  color: var(--accent-strong);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-block h1,
.dashboard-header h2,
.login-copy h2 {
  margin: 0;
}

.brand-block h1 {
  font-size: 1.3rem;
}

.admin-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: var(--radius-lg);
}

.avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent) 0%, #6f987e 100%);
  color: #fff;
  font-weight: 800;
  font-size: 1.1rem;
}

.admin-name,
.admin-role,
.login-copy p,
.field span,
.nav-item,
.logout-button,
.primary-button,
.error-message {
  margin: 0;
}

.admin-name {
  font-weight: 700;
}

.admin-role {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.92rem;
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nav-item,
.logout-button {
  width: 100%;
  border: 0;
  border-radius: 16px;
  padding: 14px 16px;
  font: inherit;
  text-align: left;
  background: transparent;
  color: var(--text);
}

.nav-item.active {
  background: rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

.nav-item:disabled {
  color: rgba(31, 33, 29, 0.46);
  cursor: not-allowed;
}

.logout-button {
  margin-top: auto;
  background: rgba(255, 255, 255, 0.56);
  cursor: pointer;
}

.content-panel {
  background: #fcfcfb;
  padding: 36px;
  display: flex;
  align-items: stretch;
}

.login-panel,
.dashboard-panel {
  width: 100%;
}

.login-panel {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(320px, 420px);
  gap: 28px;
  align-items: center;
}

.login-copy {
  max-width: 520px;
}

.login-copy h2 {
  font-size: clamp(2rem, 4vw, 3.8rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.login-copy p {
  margin-top: 18px;
  max-width: 420px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.65;
}

.login-card {
  padding: 28px;
  background: var(--panel);
  border-radius: 28px;
  border: 1px solid var(--line);
  box-shadow: 0 18px 36px rgba(84, 90, 77, 0.08);
  display: grid;
  gap: 18px;
}

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

.field span {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.field input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  font: inherit;
  color: var(--text);
  background: #fbfbf9;
  outline: none;
}

.field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(141, 191, 163, 0.18);
}

.primary-button {
  border: 0;
  border-radius: 16px;
  padding: 15px 18px;
  font: inherit;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--accent-strong) 0%, #6b9d7b 100%);
  cursor: pointer;
}

.primary-button:disabled {
  opacity: 0.7;
  cursor: wait;
}

.error-message {
  min-height: 1.4rem;
  color: var(--danger);
  font-size: 0.92rem;
}

.dashboard-panel {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 24px;
}

.dashboard-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.dashboard-header h2 {
  font-size: clamp(2rem, 3vw, 3.4rem);
  letter-spacing: -0.05em;
}

.dashboard-surface {
  min-height: 420px;
  border-radius: 28px;
  border: 1px solid rgba(229, 231, 223, 0.85);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88) 0%, rgba(249, 249, 246, 0.96) 100%),
    radial-gradient(circle at top right, rgba(141, 191, 163, 0.12), transparent 22%);
}

@media (max-width: 980px) {
  body {
    padding: 12px;
  }

  .app-shell {
    min-height: calc(100vh - 24px);
    grid-template-columns: 1fr;
  }

  .sidebar {
    padding: 20px;
    gap: 18px;
  }

  .nav-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .content-panel {
    padding: 22px;
  }

  .login-panel {
    grid-template-columns: 1fr;
  }

  .dashboard-surface {
    min-height: 280px;
  }
}

@media (max-width: 640px) {
  .brand-block {
    align-items: flex-start;
  }

  .nav-list {
    grid-template-columns: 1fr;
  }

  .content-panel {
    padding: 18px;
  }

  .login-card {
    padding: 22px;
  }
}
.bento-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  padding: 0;
  align-items: start;
  align-content: start;
}

.bento-card {
  background: var(--panel);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: none;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  height: 135px;
  gap: 12px;
  border-left: 6px solid var(--line);
}

.bento-title {
  margin: 0;
  font-size: 1rem;
  color: var(--muted);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.bento-title svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  opacity: 0.8;
}

.bento-value {
  margin: 0;
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}

.bento-device { border-left-color: #a7f3d0; /* Pastel green */ }
.bento-users { border-left-color: #bfdbfe; /* Pastel blue */ }

.bento-label { font-size: 1rem; font-weight: 500; color: var(--muted); margin-left: 4px; display: inline-block; vertical-align: middle; }

.bento-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
}

.bento-stack-item {
  font-size: 1rem;
  color: var(--muted);
  display: flex;
  align-items: baseline;
}

.bento-stack-value {
  font-weight: 800;
  color: var(--text);
  font-size: 1.3rem;
}

.bento-stack-label {
  margin-left: 6px;
}

/* Panel and Table Styles */
.devices-panel {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.panel-content {
  background: var(--panel);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  padding: 0;
  overflow: hidden;
}

.table-container {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th,
.data-table td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}

.data-table th {
  background: #fafaf8;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr:hover {
  background: rgba(141, 191, 163, 0.04);
}

.status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
}

.status-badge.ACTIVE { background: #d1fae5; color: #065f46; }
.status-badge.STOCK { background: #dbeafe; color: #1e40af; }
.status-badge.RMA { background: #fef3c7; color: #92400e; }
.status-badge.LOST { background: #fee2e2; color: #991b1b; }

.loading-state,
.empty-state {
  padding: 40px;
  text-align: center;
  color: var(--muted);
}


.pill-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pill-inactive {
  background: var(--line);
  color: var(--muted);
  border-color: #d1d5db;
}

.pill-active {
  background: #dcfce7;
  color: #065f46;
  border-color: #34d399;
}

