:root {
  --teal: #00B4A0;
  --teal-dark: #009688;
  --teal-deeper: #00796B;
  --white: #FFFFFF;
  --bg-light: #F5F7FA;
  --charcoal: #2D3436;
  --gray: #636E72;
  --gray-light: #B2BEC3;
  --border: #E0E6EA;
  --red: #E31B23;
  --green: #27AE60;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  --radius: 10px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, sans-serif;
  color: var(--charcoal);
  background: var(--bg-light);
  line-height: 1.6;
}

/* ─────────── LOGIN PAGE ─────────── */
.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-dark) 100%);
}

.login-container {
  width: 100%;
  max-width: 400px;
  padding: 20px;
}

.login-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow-lg);
}

.login-header {
  text-align: center;
  margin-bottom: 30px;
}

.logo-icon {
  width: 60px;
  height: 60px;
  background: var(--teal);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 24px;
  margin: 0 auto 16px;
}

.login-header h1 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.login-header p {
  color: var(--gray);
  font-size: 14px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-weight: 500;
  color: var(--charcoal);
  font-size: 14px;
}

.form-group input {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  transition: border-color 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(0, 180, 160, 0.1);
}

.btn-login {
  background: var(--teal);
  color: white;
  padding: 12px 16px;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s;
}

.btn-login:hover {
  background: var(--teal-dark);
}

.login-footer {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--gray);
}

.login-footer p {
  margin: 0;
}

/* ─────────── ADMIN DASHBOARD ─────────── */
.admin-body {
  display: flex;
  min-height: 100vh;
}

.admin-sidebar {
  width: 250px;
  background: var(--charcoal);
  color: white;
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}

.sidebar-logo {
  width: 40px;
  height: 40px;
  background: var(--teal);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 20px;
}

.sidebar-header h3 {
  font-size: 16px;
  font-weight: 600;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.nav-item {
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  border: none;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  transition: all 0.2s;
  white-space: nowrap;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.nav-item.active {
  background: var(--teal);
  color: white;
}

.sidebar-footer {
  margin-top: auto;
}

.btn-logout {
  width: 100%;
  background: var(--red);
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 500;
  font-size: 14px;
  transition: background 0.2s;
}

.btn-logout:hover {
  background: #C21520;
}

.admin-container {
  margin-left: 250px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.admin-topbar {
  background: white;
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow);
}

.admin-topbar h2 {
  font-size: 20px;
  font-weight: 700;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.admin-content {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
}

.page-content {
  display: none;
}

.page-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.page-content h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 24px;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.edit-form {
  background: white;
  padding: 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: 600px;
}

.form-group {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-weight: 500;
  font-size: 14px;
  color: var(--charcoal);
}

.form-group input,
.form-group textarea {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(0, 180, 160, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

/* ─────────── BUTTONS ─────────── */
.btn-primary,
.btn-secondary {
  padding: 10px 16px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--teal);
  color: white;
  margin-bottom: 24px;
}

.btn-primary:hover {
  background: var(--teal-dark);
}

.btn-secondary {
  background: var(--border);
  color: var(--charcoal);
}

.btn-secondary:hover {
  background: var(--gray-light);
}

.btn-danger {
  background: var(--red);
  color: white;
}

.btn-danger:hover {
  background: #C21520;
}

/* ─────────── ITEM LIST ─────────── */
.item-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.item-card {
  background: white;
  padding: 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.item-info h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.item-info p {
  font-size: 13px;
  color: var(--gray);
}

.item-actions {
  display: flex;
  gap: 8px;
}

.btn-edit,
.btn-delete {
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.2s;
}

.btn-edit {
  background: #3498db;
  color: white;
}

.btn-edit:hover {
  background: #2980b9;
}

.btn-delete {
  background: var(--red);
  color: white;
}

.btn-delete:hover {
  background: #C21520;
}

/* ─────────── MODAL ─────────── */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: white;
  border-radius: var(--radius);
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  padding: 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h4 {
  font-size: 16px;
  font-weight: 600;
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--gray);
  transition: color 0.2s;
}

.modal-close:hover {
  color: var(--charcoal);
}

.modal-content form {
  padding: 20px;
}

.modal-buttons {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.modal-buttons button {
  flex: 1;
}

/* ─────────── RESPONSIVE ─────────── */
@media (max-width: 768px) {
  .admin-sidebar {
    width: 70px;
    padding: 16px 8px;
  }

  .sidebar-header h3 {
    display: none;
  }

  .nav-item {
    padding: 12px 8px;
    font-size: 0;
  }

  .admin-container {
    margin-left: 70px;
  }

  .admin-topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .admin-content {
    padding: 16px;
  }
}
