body {
  margin: 0;
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  background: #f6f8fa;
  color: #222;
}
#admin-layout {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: 240px;
  background: #1976d2;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0;
  box-shadow: 2px 0 16px rgba(25, 118, 210, 0.08);
  z-index: 100;
}
.sidebar-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 2rem 1.5rem 1.5rem 1.5rem;
  border-bottom: 1px solid #1565c0;
}
.agency-logo {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: #fff;
  padding: 4px;
}
.agency-name {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}
.sidebar-nav {
  display: flex;
  flex-direction: column;
  margin-top: 2rem;
  gap: 0.5rem;
  padding: 0 1.5rem;
}
.nav-link {
  color: #bbdefb;
  text-decoration: none;
  font-size: 1.08rem;
  font-weight: 600;
  padding: 0.7rem 1rem;
  border-radius: 6px;
  transition: background 0.18s, color 0.18s;
}
.nav-link.active, .nav-link:hover {
  background: #fff;
  color: #1976d2;
}
.sidebar-logout {
  margin: 2rem 1.5rem 1.5rem 1.5rem;
  background: #e53935;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.7rem 1.4rem;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  box-shadow: 0 2px 8px rgba(229,57,53,0.08);
}
.sidebar-logout:hover {
  background: #b71c1c;
}
.main-content {
  flex: 1;
  padding: 2.5rem 2.5rem 2.5rem 2rem;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.main-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e3e8ee;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 10;
}
.main-header h1 {
  font-size: 2.2rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: -1px;
  color: #1976d2;
}
.dashboard-stats {
  display: flex;
  gap: 2rem;
  margin-bottom: 1.5rem;
  font-size: 1.15rem;
  font-weight: 500;
  color: #1976d2;
}
.map-section {
  width: 100%;
  height: 400px;
  margin-bottom: 2rem;
  border-radius: 12px;
  overflow: hidden;
  border: 1.5px solid #e3e8ee;
  box-shadow: 0 2px 12px rgba(25, 118, 210, 0.06);
}
#map {
  width: 100%;
  height: 100%;
  border-radius: 12px;
}
.table-section {
  overflow-x: auto;
}
#staff-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fafbfc;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(25, 118, 210, 0.04);
}
#staff-table th, #staff-table td {
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid #e3e8ee;
  text-align: left;
}
#staff-table th {
  background: #f0f4f8;
  font-weight: 700;
  color: #1976d2;
  font-size: 1.05rem;
  position: sticky;
  top: 0;
  z-index: 1;
}
#staff-table tr:nth-child(even) td {
  background: #f7fafd;
}
#staff-table tr:hover td {
  background: #e3f0fc;
  transition: background 0.2s;
}
#staff-table tr:last-child td {
  border-bottom: none;
}
.action-btn {
  padding: 0.45rem 1.1rem 0.45rem 0.9rem;
  border: none;
  border-radius: 5px;
  margin-right: 0.3rem;
  font-size: 0.98rem;
  cursor: pointer;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  transition: background 0.18s, color 0.18s;
}
.show-btn {
  background: #fff;
  color: #1976d2;
  border: 1.5px solid #1976d2;
  font-weight: 700;
  transition: background 0.18s, color 0.18s;
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
}
.show-btn:hover {
  background: #1976d2;
  color: #fff;
}
.edit-btn {
  background: #1976d2;
  color: #fff;
}
.edit-btn:hover {
  background: #125ea2;
}
.delete-btn {
  background: #e53935;
  color: #fff;
}
.delete-btn:hover {
  background: #b71c1c;
}
.action-btn + .action-btn {
  margin-left: 0.3rem;
}
.modal {
  display: flex;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.3);
  align-items: center;
  justify-content: center;
}
.modal-content {
  background: #fff;
  padding: 2rem 2.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 32px rgba(25, 118, 210, 0.10);
  min-width: 320px;
  max-width: 95vw;
  position: relative;
}
.close {
  position: absolute;
  top: 10px;
  right: 18px;
  font-size: 2rem;
  color: #888;
  cursor: pointer;
}
.close:hover {
  color: #d32f2f;
}
#edit-form label {
  display: block;
  margin: 0.7rem 0 0.2rem 0;
  font-weight: 500;
}
#edit-form input, #edit-form select {
  width: 100%;
  padding: 0.5rem;
  margin-bottom: 0.7rem;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 1rem;
}
#edit-form button {
  width: 100%;
  padding: 0.7rem;
  background: #1976d2;
  color: #fff;
  border: none;
  border-radius: 5px;
  font-size: 1rem;
  cursor: pointer;
  margin-top: 0.5rem;
}
#edit-form button:hover {
  background: #125ea2;
}
.attendance-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 12px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}
.attendance-table th, .attendance-table td {
  text-align: center;
  vertical-align: middle;
  padding: 12px 8px;
  font-size: 1rem;
}
.attendance-table th {
  background: #f5f7fa;
  font-weight: 600;
}
.attendance-table td img {
  display: block;
  margin: 0 auto;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  border-radius: 10px;
  max-width: 120px;
  max-height: 120px;
}
.attendance-table tr {
  background: #fff;
  border-radius: 8px;
}
.attendance-table tr:not(:last-child) {
  border-bottom: 1px solid #e0e6ed;
}
#staff-section {
  margin-top: 2rem;
}
#staff-stats {
  display: flex;
  gap: 2rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  justify-content: flex-start;
}
#staff-stats > div {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(25,118,210,0.07);
  padding: 1.5rem 2.5rem;
  min-width: 160px;
  text-align: center;
  margin-bottom: 1rem;
  transition: box-shadow 0.2s;
}
#staff-stats > div:hover {
  box-shadow: 0 4px 16px rgba(25,118,210,0.13);
}
#staff-stats .present {
  background: #e8f5e9;
  color: #388e3c;
}
#staff-stats .absent {
  background: #ffebee;
  color: #d32f2f;
}
#staff-stats .inactive {
  background: #e3f2fd;
  color: #0288d1;
}
#staff-stats .attendance {
  background: #fff3e0;
  color: #f57c00;
}
#staff-table-stafftab {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 10px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
  border-radius: 12px;
  overflow: hidden;
}
#staff-table-stafftab th, #staff-table-stafftab td {
  text-align: center;
  vertical-align: middle;
  padding: 14px 10px;
  font-size: 1rem;
}
#staff-table-stafftab th {
  background: #f5f7fa;
  font-weight: 600;
}
#staff-table-stafftab tr {
  background: #fff;
  border-radius: 8px;
}
#staff-table-stafftab tr:not(:last-child) {
  border-bottom: 1px solid #e0e6ed;
}
@media (max-width: 1100px) {
  .main-content {
    padding: 1rem 0.5rem 1rem 0.5rem;
  }
  .sidebar {
    width: 60px;
    min-width: 60px;
    padding: 0;
  }
  .sidebar-header {
    flex-direction: column;
    gap: 0.2rem;
    padding: 1rem 0.5rem 1rem 0.5rem;
  }
  .agency-name {
    font-size: 0.9rem;
    display: none;
  }
  .sidebar-nav {
    padding: 0 0.5rem;
  }
  .sidebar-logout {
    margin: 1rem 0.5rem 1rem 0.5rem;
    padding: 0.5rem 0.7rem;
    font-size: 0.9rem;
  }
}
@media (max-width: 800px) {
  #admin-layout {
    flex-direction: column;
  }
  .sidebar {
    flex-direction: row;
    width: 100vw;
    height: 60px;
    min-width: 0;
    padding: 0;
    align-items: center;
    justify-content: space-between;
  }
  .sidebar-header, .sidebar-nav, .sidebar-logout {
    display: none;
  }
  .main-content {
    padding: 0.5rem;
  }
  .dashboard-stats {
    flex-direction: column;
    gap: 0.5rem;
  }
  .map-section {
    height: 250px;
  }
  .main-header h1 {
    font-size: 1.3rem;
  }
}
@media (max-width: 900px) {
  #staff-stats {
    flex-direction: column;
    gap: 1rem;
  }
  #staff-stats > div {
    min-width: 120px;
    padding: 1rem 1.2rem;
  }
} 