/* ═══════════════════════════════════════════
   BRICK LINK — SHARED CSS
   Used by all app/* pages
   ═══════════════════════════════════════════ */

:root {
  --orange: #D97706;
  --orange-dark: #B45309;
  --orange-light: #F59E0B;
  --navy: #1E293B;
  --navy-light: #334155;
  --white: #FFFFFF;
  --gray-50: #F8FAFC;
  --gray-100: #F1F5F9;
  --gray-200: #E2E8F0;
  --gray-500: #64748B;
  --green: #10B981;
  --red: #EF4444;
  --blue: #3B82F6;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--gray-50);
  min-height: 100vh;
  color: var(--navy);
}

/* ── App Nav ── */
.app-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1.5px solid var(--gray-200);
  display: flex;
  align-items: center;
  padding: 0 32px;
  height: 62px;
  gap: 0;
}

.app-nav-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--orange);
  text-decoration: none;
  letter-spacing: -.3px;
  margin-right: 32px;
  white-space: nowrap;
}

.app-nav-links {
  display: flex;
  list-style: none;
  gap: 0;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}
.app-nav-links::-webkit-scrollbar { display: none; }

.app-nav-links li a {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 16px;
  height: 62px;
  text-decoration: none;
  font-size: .84rem;
  font-weight: 500;
  color: var(--gray-500);
  border-bottom: 2.5px solid transparent;
  transition: color .15s, border-color .15s;
  white-space: nowrap;
}
.app-nav-links li a:hover { color: var(--navy); }
.app-nav-links li a.active { color: var(--orange); border-bottom-color: var(--orange); font-weight: 600; }

.app-nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}

.notif-btn {
  position: relative;
  width: 38px; height: 38px;
  border-radius: 10px;
  border: 1.5px solid var(--gray-200);
  background: var(--white);
  font-size: 1rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.notif-btn:hover { background: var(--gray-50); }
.notif-dot {
  position: absolute;
  top: 6px; right: 6px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--orange);
  border: 2px solid var(--white);
  display: none;
}
.notif-dot.visible { display: block; }

.profile-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1.5px solid var(--gray-200);
  border-radius: 10px;
  background: var(--white);
  padding: 6px 12px;
  cursor: pointer;
  transition: background .15s;
}
.profile-btn:hover { background: var(--gray-50); }
.profile-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  color: white;
  font-size: .78rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.profile-name {
  font-size: .84rem;
  font-weight: 600;
  color: var(--navy);
}

/* ── Profile Dropdown ── */
.profile-dropdown {
  position: fixed;
  top: 68px;
  right: 20px;
  width: 200px;
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0,0,0,.12);
  z-index: 200;
  overflow: hidden;
  display: none;
}
.profile-dropdown.open { display: block; }

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 13px 16px;
  font-family: 'DM Sans', sans-serif;
  font-size: .88rem;
  font-weight: 500;
  color: var(--navy);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  transition: background .15s;
}
.dropdown-item:hover { background: var(--gray-50); }
.dropdown-item.danger { color: var(--red); }
.dropdown-sep { height: 1px; background: var(--gray-100); }

/* ── Page Content ── */
.page-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 32px;
}
@media (max-width: 768px) { .page-content { padding: 20px 16px; } }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 10px;
  border: none;
  font-family: 'DM Sans', sans-serif;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform .18s, box-shadow .18s, background .15s;
  text-decoration: none;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  color: white;
  box-shadow: 0 3px 12px rgba(217,119,6,.3);
}
.btn-primary:hover { box-shadow: 0 6px 20px rgba(217,119,6,.4); }

.btn-secondary {
  background: var(--white);
  color: var(--navy);
  border: 1.5px solid var(--gray-200);
}
.btn-secondary:hover { border-color: var(--orange); color: var(--orange); }

.btn-success {
  background: rgba(16,185,129,.12);
  color: var(--green);
  border: 1.5px solid rgba(16,185,129,.25);
}
.btn-success:hover { background: rgba(16,185,129,.2); }

.btn-danger {
  background: rgba(239,68,68,.1);
  color: var(--red);
  border: 1.5px solid rgba(239,68,68,.2);
}
.btn-danger:hover { background: rgba(239,68,68,.18); }

.btn-sm { padding: 6px 14px; font-size: .8rem; border-radius: 8px; }
.btn-lg { padding: 13px 28px; font-size: 1rem; }

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 600;
}
.badge-orange { background: rgba(217,119,6,.12); color: var(--orange-dark); }
.badge-green { background: rgba(16,185,129,.1); color: #059669; }
.badge-red { background: rgba(239,68,68,.1); color: #DC2626; }
.badge-blue { background: rgba(59,130,246,.1); color: #2563EB; }
.badge-navy { background: rgba(30,41,59,.08); color: var(--navy); }
.badge-pending { background: rgba(245,158,11,.12); color: #D97706; }

/* ── Card ── */
.card {
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: 16px;
  padding: 24px;
}

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--white);
  border-radius: 20px;
  padding: 36px;
  width: 100%;
  max-width: 520px;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
  max-height: 90vh;
  overflow-y: auto;
}
.modal-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--navy);
  margin-bottom: 24px;
}
.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 28px;
}

/* ── Form ── */
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: var(--navy-light);
  margin-bottom: 7px;
  letter-spacing: .2px;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: .92rem;
  color: var(--navy);
  background: var(--gray-50);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(217,119,6,.1);
  background: var(--white);
}
.form-group textarea { resize: vertical; min-height: 90px; }

/* ── Toast ── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  background: var(--navy);
  color: white;
  padding: 14px 20px;
  border-radius: 12px;
  font-size: .88rem;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
  animation: slideIn .3s ease;
  max-width: 320px;
}
.toast.success { background: #059669; }
.toast.error { background: #DC2626; }
@keyframes slideIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }

/* ── Skeleton ── */
.skeleton {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ── Empty State ── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--gray-500);
}
.empty-state-icon { font-size: 3rem; margin-bottom: 16px; }
.empty-state-title { font-family: 'Playfair Display', serif; font-size: 1.2rem; font-weight: 700; color: var(--navy); margin-bottom: 8px; }
.empty-state-desc { font-size: .9rem; }

/* ── Notifications Panel ── */
.notif-panel {
  position: fixed;
  top: 68px;
  right: 20px;
  width: 320px;
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,.12);
  z-index: 200;
  display: none;
  max-height: 480px;
  overflow: hidden;
}
.notif-panel.open { display: block; }
.notif-panel-header {
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--gray-100);
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
}
.notif-list { overflow-y: auto; max-height: 380px; }
.notif-item {
  display: flex;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--gray-100);
  cursor: pointer;
  transition: background .15s;
}
.notif-item:hover { background: var(--gray-50); }
.notif-item.unread { background: rgba(217,119,6,.04); }
.notif-icon { font-size: 1.3rem; flex-shrink: 0; }
.notif-text { font-size: .84rem; color: var(--navy); line-height: 1.5; }
.notif-time { font-size: .72rem; color: var(--gray-500); margin-top: 3px; }
