/* ============================================================
   PeakList - Dark Outdoor Theme
   ============================================================ */

:root {
  --bg-base:       #13181e;
  --bg-panel:      #1c2228;
  --bg-card:       #242b33;
  --bg-card-hover: #2c3540;
  --bg-input:      #1a2028;

  --accent:        #e8952a;   /* Bernstein - Summit-Feeling */
  --accent-dim:    #b87020;
  --accent-glow:   rgba(232, 149, 42, 0.15);

  --green:         #3da86d;
  --green-dim:     #2a7550;
  --green-glow:    rgba(61, 168, 109, 0.2);

  --text-primary:  #dde3ec;
  --text-muted:    #7a8898;
  --text-faint:    #4a5666;

  --border:        #2a323e;
  --border-hover:  #3a4655;

  --radius-sm:     6px;
  --radius-md:     10px;
  --radius-lg:     16px;

  --shadow-card:   0 2px 12px rgba(0,0,0,0.4);
  --shadow-modal:  0 8px 40px rgba(0,0,0,0.7);

  --sidebar-w:     260px;
  --header-h:      56px;

  /* Visit-Farben (Marker-Heatmap) */
  --visit-0: #3a4655;
  --visit-1: #2e6b4a;
  --visit-2: #38895d;
  --visit-3: #48a87a;
  --visit-5: #e8952a;
  --visit-8: #e05c2a;
  --visit-12:#c02020;
}

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

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.5;
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  display: flex;
  align-items: center;
}

.header-inner {
  width: 100%;
  max-width: 1800px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  text-decoration: none;
  color: inherit;
}
.logo:hover .logo-text { color: var(--accent); }

.logo-icon { font-size: 22px; }

.logo-text {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--accent);
}

.view-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 3px;
}

.tab-btn {
  padding: 5px 18px;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}

.tab-btn.active {
  background: var(--accent);
  color: #fff;
}

.tab-btn:hover:not(.active) {
  background: var(--bg-card);
  color: var(--text-primary);
}

.header-meta {
  margin-left: auto;
  display: flex;
  gap: 20px;
  font-size: 12px;
  color: var(--text-muted);
}

.header-meta strong {
  color: var(--accent);
  font-size: 15px;
}

/* ============================================================
   LAYOUT
   ============================================================ */
.app-layout {
  display: flex;
  height: calc(100vh - var(--header-h));
  margin-top: var(--header-h);
}

/* ---- SIDEBAR ---- */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--bg-panel);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 12px;
}

.sidebar-section h3 {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.filter-label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
  margin-top: 10px;
}

.filter-label:first-of-type { margin-top: 0; }

.filter-select {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 7px 10px;
  font-size: 13px;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237a8898' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
}

.filter-select:focus {
  border-color: var(--accent);
}

/* Checkbox-Filter */
.filter-checkbox {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
}

.filter-checkbox input[type="checkbox"] {
  width: 14px;
  height: 14px;
  accent-color: var(--accent);
  cursor: pointer;
}

.filter-checkbox:hover { color: var(--text-primary); }

.btn-reset {
  width: 100%;
  margin-top: 14px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 12px;
  transition: all 0.15s;
}

.btn-reset:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Alle-Peaks Toggle */
.btn-all-peaks {
  width: 100%;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 12px;
  transition: all 0.15s;
}

.btn-all-peaks:hover,
.btn-all-peaks.active {
  border-color: var(--green);
  color: var(--green);
  background: var(--green-glow);
}

.btn-all-peaks:disabled {
  opacity: 0.5;
  cursor: wait;
}

.btn-pois {
  width: 100%;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 12px;
  transition: all 0.15s;
}

.btn-pois:hover,
.btn-pois.active {
  border-color: #ff8c42;
  color: #ff8c42;
  background: rgba(255, 140, 66, 0.1);
}

.btn-pois:disabled {
  opacity: 0.5;
  cursor: wait;
}

.all-peaks-hint {
  font-size: 10px;
  color: var(--text-faint);
  margin-top: 5px;
  line-height: 1.4;
}

/* ============================================================
   MULTI-SELECT KOMPONENTE
   ============================================================ */
.ms-wrap {
  position: relative;
  width: 100%;
}

.ms-trigger {
  width: 100%;
  text-align: left;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  padding: 7px 28px 7px 10px;
  font-size: 13px;
  cursor: pointer;
  outline: none;
  transition: border-color 0.15s, color 0.15s;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237a8898' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ms-trigger:hover,
.ms-trigger:focus { border-color: var(--border-hover); }

.ms-trigger.ms-has-value {
  color: var(--text-primary);
  border-color: var(--accent);
}

.ms-panel {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 500;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
  max-height: 200px;
  overflow-y: auto;
  padding: 4px 0;
}

.ms-panel[hidden] { display: none; }

.ms-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  font-size: 13px;
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.1s;
  user-select: none;
}

.ms-option:hover { background: var(--bg-card-hover); }

.ms-option input[type="checkbox"] {
  width: 14px;
  height: 14px;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}

/* Karten-Tile-Toggle */
.tile-toggle-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
}

.tile-btn {
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 12px;
  white-space: nowrap;
  transition: all 0.15s;
  display: block;
  width: 100%;
  text-align: left;
}

.tile-btn:hover  { border-color: var(--border-hover); color: var(--text-primary); }
.tile-btn.active { border-color: var(--accent); color: var(--accent); background: var(--accent-glow); }

/* Leaflet Tooltip */
.peak-tooltip {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: 5px 8px;
  font-size: 12px;
  box-shadow: var(--shadow-card);
}

.peak-tooltip::before {
  border-top-color: var(--border) !important;
}

/* Stats-Grid */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.stat-item {
  background: var(--bg-base);
  border-radius: var(--radius-sm);
  padding: 10px 8px;
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.2;
}

.stat-label {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 2px;
}

/* ---- VIEW PANELS ---- */
.view-panel {
  flex: 1;
  overflow: hidden;
  display: none;
}

.view-panel.active { display: flex; flex-direction: column; }

/* ============================================================
   MAP VIEW
   ============================================================ */
#map {
  flex: 1;
  width: 100%;
  height: 100%;
}

/* Leaflet-Anpassungen */
.leaflet-container {
  background: #1a2028;
}

/* Custom Marker */
.peak-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.6);
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  transition: transform 0.15s;
  box-shadow: 0 2px 6px rgba(0,0,0,0.5);
}

.peak-marker:hover { transform: scale(1.3); }

/* Leaflet Popup */
.leaflet-popup-content-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

.leaflet-popup-tip { background: var(--bg-card); }

.leaflet-popup-content {
  margin: 10px 14px;
  font-size: 13px;
}

.popup-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--accent);
}

.popup-meta {
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 2px;
}

.popup-btn {
  display: inline-block;
  margin-top: 8px;
  padding: 5px 12px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 12px;
  cursor: pointer;
  border: none;
  font-weight: 500;
}

.popup-btn:hover { background: var(--accent-dim); }

/* ============================================================
   LIST VIEW
   ============================================================ */
.list-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  background: var(--bg-panel);
  flex-wrap: wrap;
}

.search-input {
  flex: 1;
  min-width: 200px;
  padding: 8px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
}

.search-input::placeholder { color: var(--text-faint); }
.search-input:focus { border-color: var(--accent); }

.sort-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.sort-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-right: 4px;
}

.sort-btn {
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 12px;
  transition: all 0.15s;
}

.sort-btn.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
}

.sort-btn:hover:not(.active) {
  border-color: var(--border-hover);
  color: var(--text-primary);
}

/* ---- List Controls ---- */
.list-count {
  font-size: 12px;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* ---- Peak Table ---- */
.peak-table-wrap {
  flex: 1;
  overflow: auto;
}

.peak-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 600px;
}

.peak-table thead {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg-panel);
}

.peak-table th {
  padding: 10px 12px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
  user-select: none;
}

.peak-table th.sortable {
  cursor: pointer;
  transition: color 0.1s;
}

.peak-table th.sortable:hover { color: var(--text-primary); }
.peak-table th.active          { color: var(--accent); }

.sort-arrow { margin-left: 3px; opacity: 0.7; font-size: 10px; }

.peak-table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--text-primary);
}

.peak-table tbody tr {
  cursor: pointer;
  transition: background 0.1s;
}

.peak-table tbody tr:hover td { background: var(--bg-card); }
.peak-table tbody tr:last-child td { border-bottom: none; }

/* Spalten-Breiten */
.col-rank      { width: 40px; color: var(--text-faint); text-align: right; }
.col-type-icon { width: 38px; }
.col-name      { min-width: 160px; }
.col-elevation { width: 80px; }
.col-region    { width: 110px; }
.col-visits    { width: 90px; }
.col-last      { width: 100px; }
.col-first     { width: 100px; }

/* Sport-Typ Icon-Zelle */
.type-icon-cell {
  width: 38px;
  text-align: center;
  font-size: 16px;
  border-left: 3px solid transparent;
  padding: 0 !important;
  line-height: 1;
  vertical-align: middle;
  user-select: none;
}

.rank-cell  { color: var(--text-faint); font-size: 12px; text-align: right; }
.name-cell  { font-weight: 600; }
.elev-cell  { color: var(--text-muted); }
.region-cell { font-size: 11px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.04em; }
.date-cell  { font-size: 12px; color: var(--text-muted); white-space: nowrap; }

/* Besuchs-Bar in der Tabelle */
.visit-bar-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
}

.visit-bar {
  height: 6px;
  border-radius: 3px;
  min-width: 4px;
  flex-shrink: 0;
}

.visit-count {
  font-weight: 700;
  font-size: 13px;
}

/* Leer-Zustand */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state-icon { font-size: 48px; margin-bottom: 12px; opacity: 0.4; }

.table-empty-row td {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  cursor: default;
}

/* Visit-Badge (noch für Modal genutzt) */
.peak-visit-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  opacity: 0.9;
}

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  backdrop-filter: blur(3px);
}

.modal-overlay[hidden] { display: none; }

.modal {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 640px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-modal);
  overflow: hidden;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: all 0.15s;
}

.modal-close:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.modal-header {
  position: relative;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-shrink: 0;
}

.modal-header h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
  padding-right: 40px;
}

.modal-meta {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.modal-meta span { display: flex; align-items: center; gap: 4px; }

.modal-badge {
  background: var(--accent);
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  white-space: nowrap;
  flex-shrink: 0;
  text-align: center;
  line-height: 1.1;
}

.modal-badge small {
  display: block;
  font-size: 10px;
  font-weight: 400;
  opacity: 0.8;
}

.modal-body {
  overflow-y: auto;
  padding: 16px 20px;
  flex: 1;
}

/* Aktivitäten-Tabelle */
.activity-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.activity-table th {
  text-align: left;
  padding: 6px 8px;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border);
}

.activity-table td {
  padding: 9px 8px;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  vertical-align: middle;
}

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

.activity-table tr:hover td { background: var(--bg-card); }

.activity-type-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  background: var(--bg-base);
  border: 1px solid var(--border);
}

.strava-link {
  color: var(--accent);
  text-decoration: none;
  font-size: 16px;
  opacity: 0.8;
  transition: opacity 0.1s;
}

.strava-link:hover { opacity: 1; }

.modal-section-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 10px;
  margin-top: 16px;
}

.modal-section-title:first-child { margin-top: 0; }

/* Peak-Statistiken im Modal */
.peak-stats-row {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.peak-stat-card {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  text-align: center;
}

.peak-stat-card .value {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
}

.peak-stat-card .label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-faint); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  :root { --sidebar-w: 100%; }

  .app-layout {
    flex-direction: column;
    height: auto;
  }

  .sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border);
    max-height: 220px;
    overflow-y: auto;
  }

  .view-panel.active { min-height: 50vh; }

  #map { min-height: 50vh; }

  .peak-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }

  .header-meta { display: none; }
}

/* ============================================================
   LOADING STATE
   ============================================================ */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-base);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  gap: 16px;
}

.loading-overlay.hidden { display: none; }

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.loading-text { color: var(--text-muted); font-size: 14px; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   AKTIVITÄTEN-TABELLE - neue Spalten
   ============================================================ */
.col-elev { width: 64px; text-align: right; }
.col-dist { width: 54px; text-align: right; }
.elev-cell, .dist-cell {
  color: var(--text-muted);
  text-align: right;
  white-space: nowrap;
}

/* ============================================================
   PASSWORT-MODAL (Aktivitäten-Schutz)
   ============================================================ */
#pw-overlay {
  position: fixed;
  inset: 0;
  background: rgba(13, 18, 25, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  backdrop-filter: blur(6px);
}
#pw-overlay[hidden] { display: none; }

.pw-box {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 32px 32px;
  width: 300px;
  text-align: center;
  box-shadow: var(--shadow-modal);
}
.pw-icon  { font-size: 36px; margin-bottom: 10px; }
.pw-title { font-size: 17px; font-weight: 600; color: var(--text-primary); margin-bottom: 4px; }
.pw-sub   { font-size: 13px; color: var(--text-muted); margin-bottom: 20px; }

.pw-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 16px;
  text-align: center;
  letter-spacing: 3px;
  outline: none;
  transition: border-color 0.2s;
  margin-bottom: 8px;
}
.pw-input:focus { border-color: var(--accent); }

.pw-error {
  font-size: 12px;
  color: #e05c2a;
  margin-bottom: 6px;
  min-height: 18px;
}
.pw-actions { display: flex; gap: 8px; margin-top: 12px; }

.pw-btn-primary {
  flex: 1; padding: 10px;
  background: var(--accent); color: #fff;
  border: none; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: background 0.2s;
}
.pw-btn-primary:hover { background: var(--accent-dim); }

.pw-btn-secondary {
  flex: 1; padding: 10px;
  background: transparent; color: var(--text-muted);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 14px; cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.pw-btn-secondary:hover { border-color: var(--border-hover); color: var(--text-primary); }

@keyframes pw-shake {
  0%, 100% { transform: translateX(0); }
  20%, 60%  { transform: translateX(-7px); }
  40%, 80%  { transform: translateX(7px); }
}
.pw-shake { animation: pw-shake 0.4s ease; }

/* ============================================================
   UTIL
   ============================================================ */
.text-accent { color: var(--accent); }
.text-muted  { color: var(--text-muted); }
.mt-8 { margin-top: 8px; }
