* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, sans-serif;
  background: #f5f7fa;
  color: #2d3748;
}

.layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 240px;
  background: #1a202c;
  color: white;
  flex-shrink: 0;
}

.sidebar-header {
  padding: 1.5rem 1.5rem 1rem;
  border-bottom: 1px solid #2d3748;
}

.sidebar h2 {
  font-size: 1.5rem;
}

nav ul {
  list-style: none;
  padding: 1rem 0;
}

nav a {
  display: block;
  padding: 0.9rem 1.5rem;
  color: #cbd5e0;
  text-decoration: none;
  transition: all 0.15s;
}

nav a:hover,
nav a.active {
  background: #2d3748;
  color: white;
}

.main-content {
  flex: 1;
  padding: 1.5rem;
  background: white;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 2rem;
}

.topbar h1 {
  font-size: 1.6rem;
}



.notification-bell {
  font-size: 1.4rem;
  cursor: pointer;
  position: relative;
}

#notification-count {
  position: absolute;
  top: -8px;
  right: -10px;
  background: #e53e3e;
  color: white;
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 999px;
  min-width: 16px;
  text-align: center;
}

.notification-panel {
  position: absolute;
  right: 0;
  top: 36px;
  width: 360px;
  background: white;
  border: 1px solid #cbd5e0;
  border-radius: 8px;
  box-shadow: 0 10px 25px -5px rgba(0,0,0,0.15);
  z-index: 100;
  max-height: 420px;
  overflow-y: auto;
}

.notification-panel.hidden { display: none; }

.notification-item {
  padding: 1rem;
  border-bottom: 1px solid #edf2f7;
}

.notification-item:last-child { border-bottom: none; }

.page {
  display: none;
}

.page.active {
  display: block;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0;
}

.stat-card {
  background: white;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
  text-align: center;
}

.stat-card h3 {
  font-size: 0.95rem;
  color: #718096;
  margin-bottom: 0.6rem;
}

.stat-card p {
  font-size: 2.1rem;
  font-weight: 700;
}

.stat-card.warning p { color: #d69e2e; }
.stat-card.danger p   { color: #e53e3e; }

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.search-input {
  padding: 0.7rem 1rem;
  border: 1px solid #cbd5e0;
  border-radius: 6px;
  width: 280px;
  font-size: 0.95rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}

.device-card, .employee-card {
  background: white;
  border-radius: 10px;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
  padding: 1.4rem;
  transition: transform 0.12s;
}

.device-card:hover, .employee-card:hover {
  transform: translateY(-3px);
}

.card-title {
  font-size: 1.15rem;
  margin-bottom: 0.8rem;
}

.card-meta {
  color: #718096;
  font-size: 0.9rem;
  line-height: 1.5;
}

.status-badge {
  display: inline-block;
  padding: 0.35em 0.75em;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: 0.6rem;
}

.status-active  { background:#d4f4e2; color:#276749; }
.status-repair  { background:#fefcbf; color:#744210; }
.status-retired { background:#fed7d7; color:#742a2a; }
.status-lost    { background:#e2e8f0; color:#2d3748; }

.form-page {
  max-width: 600px;
  margin: 0 auto;
}

.form-row {
  margin-bottom: 1.4rem;
}

.form-row label {
  display: block;
  margin-bottom: 0.45rem;
  font-weight: 500;
}

.form-row input,
.form-row select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #cbd5e0;
  border-radius: 6px;
  font-size: 0.95rem;
}

.btn {
  padding: 0.8rem 1.6rem;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
}

.btn-primary {
  background: #3182ce;
  color: white;
}

.btn-primary:hover {
  background: #2b6cb0;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

th, td {
  padding: 0.9rem 1rem;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}

th {
  background: #f7fafc;
  font-weight: 600;
  color: #4a5568;
}

/* Footer Styles */
.footer {
  background: #1a202c;
  color: #cbd5e0;
  text-align: center;
  padding: 1rem;
  font-size: 0.9rem;
}

.footer a {
  color: #63b3ed;
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

/* Hamburger Menu Styles */
.hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #2d3748;
  padding: 0.5rem;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 99;
}

.sidebar.open {
  transform: translateX(0);
}

.sidebar-overlay.open {
  display: block;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .main-content {
    padding: 1rem;
  }

  .topbar h1 {
    font-size: 1.4rem;
  }

  .search-input {
    width: 200px;
  }

  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }

  .card-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

@media (max-width: 768px) {
  .layout {
    flex-direction: column;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 240px;
    z-index: 100;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-overlay.open {
    display: block;
  }

  .main-content {
    width: 100%;
    padding: 1rem;
  }

  .topbar {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
  }

  .hamburger {
    display: block;
  }

  .topbar h1 {
    font-size: 1.2rem;
    flex: 1;
    text-align: center;
    margin: 0 1rem;
  }

  .topbar-right {
    display: flex;
    align-items: center;
  }

  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
  }

  .stat-card {
    padding: 1rem;
  }

  .stat-card h3 {
    font-size: 0.85rem;
  }

  .stat-card p {
    font-size: 1.8rem;
  }

  .page-header {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .search-input {
    width: 100%;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .device-card, .employee-card {
    padding: 1.2rem;
  }

  .card-title {
    font-size: 1.1rem;
  }

  .card-meta {
    font-size: 0.85rem;
  }

  table {
    font-size: 0.9rem;
  }

  th, td {
    padding: 0.7rem 0.5rem;
  }

  .form-page {
    max-width: none;
    margin: 0;
  }

  .form-row input,
  .form-row select {
    font-size: 0.9rem;
  }

  .btn {
    padding: 0.7rem 1.4rem;
    font-size: 0.9rem;
  }

  .footer {
    padding: 0.8rem;
    font-size: 0.85rem;
  }
}


