/* === Reset & base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #f5f6fa;
  color: #1a1a2e;
  line-height: 1.5;
}

a { color: #005bff; text-decoration: none; }
a:hover { text-decoration: underline; }

/* === Navbar === */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #1a1a2e;
  padding: 0 24px;
  height: 56px;
}
.nav-brand a { color: #fff; font-weight: 700; font-size: 18px; }
.nav-brand a:hover { text-decoration: none; }
.nav-links { display: flex; align-items: center; gap: 20px; }
.nav-links a { color: #cbd5e1; font-size: 14px; }
.nav-links a:hover { color: #fff; text-decoration: none; }
.nav-user { color: #94a3b8; font-size: 13px; }

/* === Nav dropdown === */
.nav-dropdown { position: relative; display: flex; align-items: center; align-self: stretch; }
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
  min-width: 240px;
  z-index: 1000;
  overflow: hidden;
}
.nav-dropdown:hover .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a {
  display: block;
  padding: 9px 16px;
  font-size: 13px;
  color: #374151 !important;
  border-bottom: 1px solid #f1f5f9;
  white-space: nowrap;
}
.nav-dropdown-menu a:last-child { border-bottom: none; }
.nav-dropdown-menu a:hover { background: #f8fafc; color: #111 !important; text-decoration: none !important; }
.nav-dropdown-menu .nav-dd-section {
  padding: 6px 16px 4px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #9ca3af;
  border-bottom: 1px solid #f1f5f9;
}

/* === Container === */
.container { max-width: min(1600px, 95vw); margin: 24px auto; padding: 0 16px; }

/* === Alerts === */
.alert {
  padding: 10px 16px;
  border-radius: 6px;
  margin-bottom: 16px;
  font-size: 14px;
}
.alert-success { background: #d1fae5; color: #065f46; }
.alert-error { background: #fee2e2; color: #991b1b; }

/* === Tables === */
.table-wrapper { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
th, td { padding: 10px 14px; text-align: left; font-size: 14px; }
th { background: #1a1a2e; color: #fff; font-weight: 600; }
tr:nth-child(even) { background: #f8fafc; }
tr:hover { background: #eef2ff; }
td.actions { white-space: nowrap; }
td.actions a { margin-right: 10px; }

/* === Forms === */
.form-card {
  background: #fff;
  padding: 24px;
  border-radius: 8px;
  max-width: 520px;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.form-card h2 { margin-bottom: 16px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 4px; color: #475569; }
.form-control {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color .15s;
}
.form-control:focus { outline: none; border-color: #005bff; box-shadow: 0 0 0 3px rgba(0,91,255,.12); }

/* === Buttons === */
.btn {
  display: inline-block;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
}
.btn-primary { background: #005bff; color: #fff; }
.btn-primary:hover { background: #0047cc; text-decoration: none; }
.btn-danger { background: #ef4444; color: #fff; }
.btn-danger:hover { background: #dc2626; text-decoration: none; }
.btn-secondary { background: #e2e8f0; color: #1a1a2e; }
.btn-secondary:hover { background: #cbd5e1; text-decoration: none; }
.btn-warning { background: #f59e0b; color: #fff; }
.btn-warning:hover { background: #d97706; text-decoration: none; }

/* === Toolbar (search + add) === */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
  flex-wrap: wrap;
}
.toolbar form { display: flex; gap: 8px; }
.toolbar input[type="text"] {
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 14px;
  width: 260px;
}

/* === Confirm delete === */
.confirm-card {
  background: #fff;
  padding: 24px;
  border-radius: 8px;
  max-width: 480px;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.confirm-card p { margin-bottom: 16px; }
.confirm-card .btn { margin-right: 8px; }

/* === Page heading === */
.page-heading { margin-bottom: 20px; }
.page-heading h1 { font-size: 22px; font-weight: 700; }

/* === Feedback widget === */
[hidden] { display: none !important; }
.feedback-fab {
    position: fixed; right: 24px; bottom: 56px;
    background: #24292f; color: #fff; border: 0; border-radius: 999px;
    padding: 10px 18px; font-size: 0.9rem; font-weight: 500;
    cursor: pointer; box-shadow: 0 4px 12px rgba(0,0,0,.18);
    z-index: 1000;
}
.feedback-fab:hover { background: #1f2328; }
.feedback-modal {
    position: fixed; inset: 0;
    background: rgba(15, 17, 21, .55);
    display: flex; align-items: center; justify-content: center;
    z-index: 1001;
}
.feedback-card { background: #fff; width: min(520px, 92vw); border-radius: 8px; box-shadow: 0 12px 40px rgba(0,0,0,.25); overflow: hidden; }
.feedback-card header { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid #eaeef2; }
.feedback-card header h3 { margin: 0; font-size: 1.05rem; }
.feedback-close { background: transparent; border: 0; cursor: pointer; font-size: 1.1rem; color: #57606a; padding: 4px 8px; }
.feedback-close:hover { color: #1f2328; }
.feedback-card form { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.feedback-kind { display: flex; gap: 16px; }
.feedback-kind label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.feedback-card textarea { width: 100%; resize: vertical; font: inherit; padding: 8px 10px; border: 1px solid #d0d7de; border-radius: 4px; }
.feedback-card textarea:focus { outline: 2px solid #0969da; outline-offset: -1px; }
.feedback-hint { margin: 0; font-size: 0.78rem; color: #8c959f; }
.feedback-actions { display: flex; align-items: center; gap: 10px; justify-content: flex-end; }
.feedback-actions button { padding: 6px 16px; background: #2da44e; color: #fff; border: 0; border-radius: 4px; cursor: pointer; font-size: 0.9rem; }
.feedback-actions button:hover { background: #2c974b; }
.feedback-status { margin-right: auto; font-size: 0.85rem; color: #57606a; }
