/* ═══════════════════════════════════════════
   WAYGO Admin — Shared Component Styles
   Brand: #7d9363 (sage green)  BG: #f5f6f8
   ═══════════════════════════════════════════ */

/* ── 1. Reset & Base ── */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: system-ui, -apple-system, sans-serif;
  background: #f5f6f8;
}

/* ── 2. Cards ── */
.card {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.card-header {
  font-size: 15px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f3f4f6;
}

/* ── 3. Buttons ── */
.btn {
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  transition: all .15s;
  border: none;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-primary { background: #7d9363; color: #fff; }
.btn-primary:hover { background: #6a7f52; }
.btn-danger { background: #ef4444; color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-red { background: #ef4444; color: #fff; }
.btn-red:hover { background: #dc2626; }
.btn-green { background: #10b981; color: #fff; }
.btn-green:hover { background: #059669; }
.btn-outline {
  background: #fff;
  border: 1px solid #e5e7eb;
  color: #4b5563;
}
.btn-outline:hover { background: #f9fafb; border-color: #7d9363; color: #7d9363; }
.btn-sm { padding: 5px 12px; font-size: 12px; }

/* Users-page variant: danger as outlined */
.btn-danger-outlined {
  background: #fff;
  color: #ef4444;
  border: 1px solid #fecaca;
}
.btn-danger-outlined:hover { background: #fef2f2; }

/* ── 4. Inputs ── */
.input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 13px;
  outline: none;
}
.input:focus {
  border-color: #7d9363;
  box-shadow: 0 0 0 3px rgba(125,147,99,.1);
}
textarea.input { resize: vertical; min-height: 80px; }
select.input {
  appearance: none;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%239ca3af'%3E%3Cpath d='M6 8L1 3h10z'/%3E%3C/svg%3E") no-repeat right 14px center;
}
.input-group { display: flex; gap: 8px; align-items: center; }

/* Generic focus for inputs without .input class */
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: #7d9363;
  box-shadow: 0 0 0 3px rgba(125,147,99,.08);
}

/* ── 5. Tables ── */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  text-align: left;
  font-size: 12px;
  color: #9ca3af;
  font-weight: 500;
  padding: 10px 12px;
  border-bottom: 1px solid #e5e7eb;
}
.data-table td {
  padding: 10px 12px;
  font-size: 13px;
  border-bottom: 1px solid #f3f4f6;
}
.data-table tr:hover { background: #f9fafb; }

/* Legacy table support (used by older pages) */
table { width: 100%; border-collapse: collapse; }
th {
  text-align: left;
  font-size: 12px;
  color: #9ca3af;
  font-weight: 500;
  padding: 12px 16px;
  border-bottom: 2px solid #f3f4f6;
}
td {
  padding: 14px 16px;
  font-size: 13px;
  border-bottom: 1px solid #f9fafb;
}

/* ── 6. Badges ── */
.badge {
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  display: inline-block;
}
.badge-green { background: #d1fae5; color: #065f46; }
.badge-red { background: #fee2e2; color: #991b1b; }
.badge-amber { background: #fef3c7; color: #d97706; }
.badge-blue { background: #dbeafe; color: #2563eb; }
.badge-purple { background: #ede9fe; color: #7c3aed; }
.badge-gray { background: #f3f4f6; color: #6b7280; }

/* ── 7. Toast Notifications ── */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 12px 24px;
  border-radius: 8px;
  color: #fff;
  font-size: 13px;
  z-index: 9999;
  box-shadow: 0 8px 24px rgba(0,0,0,.15);
  animation: toastIn .3s;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── 8. Modals ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.35);
  backdrop-filter: blur(4px);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-box {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,.15);
}

/* ── 9. Form Layout ── */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-hint { font-size: 10px; color: #9ca3af; margin-top: 4px; }

/* ── 10. Breadcrumb ── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #9ca3af;
  margin-bottom: 16px;
}
.breadcrumb a { color: #7d9363; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .sep { color: #d1d5db; }

/* ── 11. Pagination ── */
.pagination {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}
.pagination button {
  padding: 6px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #fff;
  font-size: 12px;
  cursor: pointer;
  transition: all .15s;
}
.pagination button:hover { background: #f3f4f6; }
.pagination button.active {
  background: #7d9363;
  color: #fff;
  border-color: #7d9363;
}
.pagination button:disabled { opacity: .4; cursor: default; }

/* ── 12. Toggle Switch ── */
.toggle { position: relative; display: inline-block; width: 44px; height: 24px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle span {
  position: absolute; cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #e5e7eb; border-radius: 24px; transition: .2s;
}
.toggle span:before {
  content: ''; position: absolute;
  height: 18px; width: 18px;
  left: 3px; bottom: 3px;
  background: #fff; border-radius: 50%; transition: .2s;
}
.toggle input:checked + span { background: #7d9363; }
.toggle input:checked + span:before { transform: translateX(20px); }

/* ── 13. Filter Tabs ── */
.filter-tab {
  padding: 8px 20px;
  border-radius: 10px;
  font-size: 13px;
  cursor: pointer;
  transition: all .15s;
  border: none;
  background: #f3f4f6;
  color: #6b7280;
  font-weight: 500;
}
.filter-tab.active {
  background: #7d9363;
  color: #fff;
  box-shadow: 0 2px 8px rgba(125,147,99,.25);
}

/* ── 14. Avatar ── */
.avatar {
  width: 40px; height: 40px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700; color: #fff; flex-shrink: 0;
}

/* ── 15. Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #9ca3af; }

/* ── 16. Utility Classes ── */
.text-accent { color: #7d9363; }
.bg-accent { background-color: #7d9363; }

/* Sidebar link (legacy, for pages not yet migrated) */
.sidebar-link {
  transition: all .15s; cursor: pointer;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; border-radius: 8px;
  color: #4b5563; font-size: 14px; text-decoration: none;
}
.sidebar-link:hover { background: #e5e7eb; }
.sidebar-link.active {
  background: #fff; color: #7d9363; font-weight: 600;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.nav {
  transition: all .15s; cursor: pointer;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; border-radius: 8px;
  color: #4b5563; font-size: 14px; text-decoration: none;
}
.nav:hover { background: #e5e7eb; }
.nav.active {
  background: #fff; color: #7d9363; font-weight: 600;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

/* Log row hover */
.log-row:hover { background: #f9fafb; }
