/* ============================================================
   PinPoint Design System
   Inspired by Apple Business + Cloudflare dashboards
   ============================================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* --- CSS Variables --- */
:root {
  /* Brand */
  --orange:        #f97316;
  --orange-dark:   #ea6b0c;
  --orange-light:  #fff7ed;

  /* Sidebar */
  --sidebar-bg:    #111827;
  --sidebar-text:  #9ca3af;
  --sidebar-hover: #1f2937;
  --sidebar-active:#ffffff;
  --sidebar-width: 220px;

  /* Page */
  --page-bg:       #f9fafb;
  --card-bg:       #ffffff;
  --border:        #e5e7eb;
  --border-strong: #d1d5db;

  /* Text */
  --text:          #111827;
  --text-muted:    #6b7280;
  --text-xmuted:   #9ca3af;

  /* States */
  --success:       #22c55e;
  --success-bg:    #f0fdf4;
  --danger:        #ef4444;
  --danger-bg:     #fef2f2;
  --warning:       #f59e0b;
  --warning-bg:    #fffbeb;
  --info:          #3b82f6;
  --info-bg:       #eff6ff;

  /* Shadows */
  --shadow-sm:     0 1px 2px rgba(0,0,0,0.06);
  --shadow:        0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md:     0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg:     0 10px 15px rgba(0,0,0,0.08), 0 4px 6px rgba(0,0,0,0.05);

  /* Radius */
  --radius-sm:     6px;
  --radius:        10px;
  --radius-lg:     14px;
  --radius-xl:     20px;

  /* Topbar */
  --topbar-h:      56px;

  /* Transitions */
  --transition:    0.15s ease;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--text);
  background: var(--page-bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--orange); text-decoration: none; }
a:hover { color: var(--orange-dark); }

img { max-width: 100%; height: auto; display: block; }

ul, ol { list-style: none; }

/* ============================================================
   APP SHELL (sidebar + content)
   ============================================================ */

.app-shell {
  display: flex;
  min-height: 100vh;
}

/* ============================================================
   SIDEBAR
   ============================================================ */

.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 100;
  flex-shrink: 0;
}

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: #374151; border-radius: 4px; }

/* Logo */
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 16px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}

.sidebar-logo img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  flex-shrink: 0;
}

.sidebar-logo-text {
  font-size: 1.0625rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.02em;
}

/* Nav */
.sidebar-nav {
  flex: 1;
  padding: 12px 0;
}

.sidebar-section {
  margin-bottom: 4px;
}

.sidebar-section-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #4b5563;
  padding: 12px 16px 4px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  color: var(--sidebar-text);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0;
  transition: background var(--transition), color var(--transition);
  cursor: pointer;
  text-decoration: none;
}

.sidebar-link:hover {
  background: var(--sidebar-hover);
  color: var(--sidebar-active);
}

.sidebar-link.active {
  background: rgba(249, 115, 22, 0.15);
  color: var(--orange);
}

.sidebar-link .material-icons {
  font-size: 18px;
  flex-shrink: 0;
  opacity: 0.8;
}

.sidebar-link.active .material-icons { opacity: 1; }

/* Sidebar divider */
.sidebar-divider {
  height: 1px;
  background: rgba(255,255,255,0.06);
  margin: 8px 0;
}

/* Sidebar footer (profile) */
.sidebar-footer {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 12px 0 8px;
  flex-shrink: 0;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
}

.sidebar-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--orange);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.sidebar-user-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #e5e7eb;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */

.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Top bar */
.topbar {
  height: var(--topbar-h);
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.topbar-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.topbar-breadcrumb a { color: var(--text-muted); }
.topbar-breadcrumb a:hover { color: var(--text); }
.topbar-breadcrumb .sep { opacity: 0.5; }

.topbar-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Company switcher */
.company-switcher {
  position: relative;
}

.company-switcher-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--page-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.company-switcher-btn:hover {
  border-color: var(--orange);
  box-shadow: 0 0 0 2px rgba(249,115,22,0.12);
}

.company-switcher-btn .material-icons { font-size: 16px; color: var(--text-muted); }

.company-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 200px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  z-index: 200;
}

.company-dropdown.open { display: block; }

.company-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  font-size: 0.875rem;
  color: var(--text);
  cursor: pointer;
  transition: background var(--transition);
  text-decoration: none;
}

.company-dropdown-item:hover { background: var(--page-bg); }
.company-dropdown-item.active { color: var(--orange); font-weight: 600; }

/* Page content wrapper */
.page-content {
  padding: 28px;
  flex: 1;
}

/* ============================================================
   PAGE HEADER
   ============================================================ */

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.page-header-left h1 {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.page-header-left p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* ============================================================
   STATS GRID
   ============================================================ */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.03em;
  line-height: 1;
}

.stat-sub {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ============================================================
   CARD
   ============================================================ */

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card + .card { margin-top: 20px; }

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--card-bg);
}

.card-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
}

.card-subtitle {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.card-body {
  padding: 20px;
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ============================================================
   DATA TABLE
   ============================================================ */

.table-wrapper {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: left;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--page-bg);
  white-space: nowrap;
}

.data-table td {
  font-size: 0.875rem;
  color: var(--text);
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.data-table tr:last-child td { border-bottom: none; }

.data-table tbody tr { transition: background var(--transition); }
.data-table tbody tr:hover { background: #fafafa; }

.data-table td.actions {
  white-space: nowrap;
  text-align: right;
}

.table-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.table-empty .material-icons {
  font-size: 40px;
  display: block;
  margin: 0 auto 12px;
  opacity: 0.3;
}

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition),
              box-shadow var(--transition), opacity var(--transition);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}

.btn .material-icons { font-size: 16px; }

.btn:disabled { opacity: 0.5; pointer-events: none; }

/* Sizes */
.btn-sm {
  font-size: 0.8125rem;
  padding: 6px 12px;
}

.btn-lg {
  font-size: 1rem;
  padding: 12px 22px;
}

/* Variants */
.btn-primary {
  background: var(--orange);
  color: #fff;
  border-color: var(--orange);
}
.btn-primary:hover {
  background: var(--orange-dark);
  border-color: var(--orange-dark);
  box-shadow: 0 2px 8px rgba(249,115,22,0.3);
}

.btn-secondary {
  background: var(--card-bg);
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-secondary:hover {
  background: var(--page-bg);
  border-color: #adb5bd;
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: transparent;
}
.btn-ghost:hover {
  background: var(--page-bg);
  color: var(--text);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}
.btn-danger:hover {
  background: #dc2626;
  border-color: #dc2626;
  box-shadow: 0 2px 8px rgba(239,68,68,0.3);
}

.btn-success {
  background: var(--success);
  color: #fff;
  border-color: var(--success);
}

/* ============================================================
   BADGES / PILLS
   ============================================================ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 99px;
}

.badge-success { background: var(--success-bg); color: #15803d; }
.badge-danger  { background: var(--danger-bg);  color: #b91c1c; }
.badge-warning { background: var(--warning-bg); color: #92400e; }
.badge-info    { background: var(--info-bg);    color: #1d4ed8; }
.badge-gray    { background: #f3f4f6;            color: #374151; }
.badge-orange  { background: var(--orange-light); color: #c2410c; }

/* ============================================================
   FORMS
   ============================================================ */

.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.form-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  font-family: inherit;
  font-size: 0.9375rem;
  color: var(--text);
  background: var(--card-bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 10px 13px;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  appearance: none;
}

.form-input::placeholder { color: var(--text-xmuted); }

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(249,115,22,0.15);
}

.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

.form-textarea { resize: vertical; min-height: 90px; line-height: 1.5; }

/* Error state */
.form-input.is-error { border-color: var(--danger); }
.form-input.is-error:focus { box-shadow: 0 0 0 3px rgba(239,68,68,0.15); }
.form-error-msg { font-size: 0.75rem; color: var(--danger); margin-top: 4px; }

/* Form row */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* Form card */
.form-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  max-width: 560px;
}

.form-card-title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
}

.form-submit-row {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* ============================================================
   ALERTS / NOTIFICATION BANNERS
   ============================================================ */

.alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  margin-bottom: 20px;
}

.alert .material-icons { font-size: 18px; flex-shrink: 0; margin-top: 1px; }

.alert-success { background: var(--success-bg); color: #15803d; }
.alert-danger  { background: var(--danger-bg);  color: #b91c1c; }
.alert-warning { background: var(--warning-bg); color: #92400e; }
.alert-info    { background: var(--info-bg);    color: #1d4ed8; }

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */

#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: #1f2937;
  color: #f9fafb;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  font-size: 0.875rem;
  font-weight: 500;
  pointer-events: all;
  animation: toast-in 0.2s ease;
  min-width: 240px;
  max-width: 360px;
}

.toast.toast-success { border-left: 3px solid var(--success); }
.toast.toast-error   { border-left: 3px solid var(--danger); }
.toast.toast-warning { border-left: 3px solid var(--warning); }

.toast .material-icons { font-size: 18px; flex-shrink: 0; }
.toast.toast-success .material-icons { color: var(--success); }
.toast.toast-error   .material-icons { color: var(--danger); }
.toast.toast-warning .material-icons { color: var(--warning); }

.toast-exit { animation: toast-out 0.2s ease forwards; }

@keyframes toast-in  { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toast-out { from { opacity: 1; transform: translateY(0); }    to { opacity: 0; transform: translateY(12px); } }

/* ============================================================
   MODAL
   ============================================================ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 28px;
  max-width: 460px;
  width: 100%;
  transform: scale(0.96);
  transition: transform 0.15s ease;
}

.modal-overlay.open .modal { transform: scale(1); }

.modal-title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.modal-body {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 24px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ============================================================
   PUBLIC / STANDALONE PAGES (login, signup, signout)
   ============================================================ */

.public-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
  padding: 24px;
}

.public-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 40px 36px;
  width: 100%;
  max-width: 420px;
}

.public-logo {
  display: block;
  max-width: 180px;
  max-height: 48px;
  object-fit: contain;
  margin: 0 auto 28px;
}

.public-logo-fallback {
  text-align: center;
  font-size: 1.375rem;
  font-weight: 800;
  color: var(--orange);
  letter-spacing: -0.03em;
  margin-bottom: 28px;
}

.public-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  margin-bottom: 4px;
}

.public-subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 28px;
}

.public-divider {
  height: 1px;
  background: var(--border);
  margin: 20px 0;
}

.public-link {
  display: block;
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 20px;
}

.public-link a { color: var(--orange); font-weight: 500; }

/* ============================================================
   SIGNOUT CHOICE PAGE
   ============================================================ */

.signout-choices {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

.signout-choice-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  background: var(--page-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.signout-choice-btn:hover {
  border-color: var(--orange);
  box-shadow: 0 0 0 2px rgba(249,115,22,0.12);
  color: var(--text);
}

.signout-choice-btn .material-icons { font-size: 18px; color: var(--text-muted); }

/* ============================================================
   WORKSITE MAP / PIN VIEWER
   ============================================================ */

.map-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.map-toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  background: var(--page-bg);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.map-toolbar-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.map-scroll {
  overflow: auto;
  max-height: 70vh;
  position: relative;
  cursor: grab;
}

.map-scroll:active { cursor: grabbing; }

.map-inner {
  position: relative;
  display: inline-block;
  transform-origin: top left;
}

.map-inner img {
  display: block;
  max-width: none;
  user-select: none;
}

/* Pin badges */
:root { --pin-size: 28px; }

.pin-badge {
  position: absolute;
  width: var(--pin-size);
  height: var(--pin-size);
  background: var(--orange);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: calc(var(--pin-size) * 0.4);
  font-weight: 700;
  cursor: pointer;
  transform: translate(-50%, -50%);
  border: 2px solid rgba(255,255,255,0.7);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  transition: transform var(--transition), box-shadow var(--transition);
  user-select: none;
  z-index: 10;
}

.pin-badge:hover {
  transform: translate(-50%, -50%) scale(1.15);
  box-shadow: 0 4px 12px rgba(249,115,22,0.5);
}

/* Zoom controls */
.zoom-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.zoom-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.zoom-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  background: var(--orange);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* Pin resize slider */
.pin-size-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pin-size-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 80px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.pin-size-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  background: #374151;
  border-radius: 50%;
  cursor: pointer;
}

/* Pin detail panel */
.pin-panel {
  display: none;
  position: fixed;
  right: 24px;
  top: 80px;
  width: 320px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 500;
  overflow: hidden;
}

.pin-panel.open { display: flex; flex-direction: column; }

.pin-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--page-bg);
}

.pin-panel-title { font-size: 0.9375rem; font-weight: 600; color: var(--text); }

.pin-panel-body { padding: 16px; overflow-y: auto; max-height: 60vh; }

.pin-photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 10px;
}

.pin-photo-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

/* ============================================================
   STATUS PAGE (pending approval, 403, 503)
   ============================================================ */

.status-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--page-bg);
  padding: 24px;
}

.status-card {
  text-align: center;
  max-width: 400px;
}

.status-icon {
  font-size: 64px;
  margin-bottom: 16px;
  color: var(--text-xmuted);
}

.status-card h1 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.status-card p {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  line-height: 1.6;
}

/* ============================================================
   MOBILE RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.2s ease;
  }

  .sidebar.open { transform: translateX(0); }

  .main-content { margin-left: 0; }

  .mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text);
  }

  .mobile-menu-btn .material-icons { font-size: 22px; }

  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 99;
  }

  .sidebar-overlay.open { display: block; }

  .form-row { grid-template-columns: 1fr; }

  .page-content { padding: 16px; }

  .topbar { padding: 0 16px; }

  .stats-grid { grid-template-columns: 1fr 1fr; }

  .public-card { padding: 28px 20px; }
}

@media (min-width: 769px) {
  .mobile-menu-btn { display: none; }
  .sidebar-overlay { display: none !important; }
}

/* ============================================================
   UTILITIES
   ============================================================ */

.text-muted  { color: var(--text-muted) !important; }
.text-small  { font-size: 0.8125rem; }
.text-right  { text-align: right; }
.text-center { text-align: center; }

.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }

.flex         { display: flex; }
.flex-center  { display: flex; align-items: center; justify-content: center; }
.gap-8        { gap: 8px; }
.gap-12       { gap: 12px; }

.w-full { width: 100%; }

/* Divider */
hr.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 20px 0;
}

/* Placeholder image */
.img-placeholder {
  background: var(--page-bg);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-xmuted);
  font-size: 0.75rem;
}
