/* ── Dashboard panel styles ── */

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: 2fr 3fr;
  }
}

/* Header section mimicking pages 350-351 */
.dash-header-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  padding: 1rem;
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .dash-header-card {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

.dash-header-row {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.dash-header-row label {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.dash-header-input {
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  padding: 0.4rem 0.6rem;
  font-size: 0.9rem;
  width: 100%;
  box-sizing: border-box;
  transition: var(--transition, all 0.2s ease);
}

.dash-header-input:focus {
  border-color: var(--border-focus, var(--accent));
  background: var(--input-bg-focus);
  box-shadow: 0 0 8px var(--accent-glow);
  outline: none;
}

.dash-header-input[readonly] {
  background: var(--input-bg);
  opacity: 0.65;
  border-color: var(--border);
  color: var(--text-dim);
  cursor: default;
}

/* Resources panel */
.dash-resources-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.dash-resource-card {
  padding: 0.75rem 1rem;
  border-left: 4px solid var(--accent);
  transition: var(--transition);
}

.dash-resource-card[data-resource="telo"] { border-left-color: #ef4444; }
.dash-resource-card[data-resource="duse"] { border-left-color: #3b82f6; }
.dash-resource-card[data-resource="vliv"] { border-left-color: #10b981; }

.dash-resource-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.dash-resource-title {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 1.05rem;
}

.dash-resource-circle-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Visual state circle */
.dash-resource-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--bg);
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--text);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.25);
}

.dash-resource-circle.status-ok {
  border-color: #10b981;
  color: #10b981;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.15);
}
.dash-resource-circle.status-warning {
  border-color: #f59e0b;
  color: #f59e0b;
  animation: pulseYellow 3s infinite;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.15);
}
.dash-resource-circle.status-critical {
  border-color: #ef4444;
  color: #ef4444;
  animation: pulseRed 2s infinite;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.2);
}

/* Resource controls inside dashboard */
.dash-counter-row {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.dash-counter-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
}

.dash-counter-item span {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-weight: 500;
}

.dash-counter-controls {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  height: 28px;
  overflow: hidden;
}

.dash-counter-btn {
  background: transparent;
  border: none;
  color: var(--text);
  width: 26px;
  height: 100%;
  cursor: pointer;
  font-weight: bold;
  font-size: 0.85rem;
  transition: var(--transition);
}

.dash-counter-btn:hover:not(:disabled) {
  background: var(--bg2);
  color: var(--accent);
}

.dash-counter-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.dash-counter-value {
  flex: 1;
  text-align: center;
  border: none;
  background: transparent;
  color: var(--text);
  font-weight: bold;
  font-size: 0.85rem;
  width: 100%;
}

/* Scars section inside resource card */
.dash-scars-title {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-weight: 600;
  margin-top: 0.5rem;
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.dash-scars-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.dash-scar-badge {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.25rem 0.5rem;
  font-size: 0.78rem;
}

.dash-scar-sev {
  font-weight: bold;
  color: var(--accent);
  background: rgba(167, 139, 250, 0.15);
  padding: 0.05rem 0.25rem;
  border-radius: 3px;
  margin-right: 0.35rem;
}

.dash-scar-delete {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0 0.15rem;
  transition: var(--transition);
}
.dash-scar-delete:hover {
  color: #ef4444;
}

.dash-scar-empty {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-style: italic;
}

/* Add Scar Form in Resource card */
.dash-add-scar-toggle {
  background: transparent;
  border: 1px dashed var(--border);
  color: var(--text-dim);
  font-size: 0.72rem;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  cursor: pointer;
  margin-top: 0.35rem;
  width: 100%;
  text-align: center;
  transition: var(--transition);
}
.dash-add-scar-toggle:hover {
  border-color: var(--accent);
  color: var(--text);
  background: rgba(255, 255, 255, 0.02);
}

.dash-add-scar-form {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.4rem;
  margin-top: 0.35rem;
}

/* Threat and Advantage card */
.dash-status-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
}

/* Right Column Panels */
.dash-right-card {
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.dash-section-title {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--accent);
  border-bottom: 1px solid rgba(167, 139, 250, 0.2);
  padding-bottom: 0.25rem;
  margin-top: 0;
  margin-bottom: 0.35rem;
}

.dash-professions-grid {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.dash-prof-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.4rem 0.6rem;
  font-size: 0.85rem;
}

.dash-prof-level {
  font-weight: bold;
  color: var(--accent2);
  background: rgba(167, 139, 250, 0.1);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  border: 1px solid rgba(167, 139, 250, 0.15);
}

/* Abilities table/grid */
.dash-abilities-grid {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.dash-ability-item {
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.1);
  padding: 0.4rem 0.5rem;
  transition: var(--transition);
}

.dash-ability-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.dash-ability-name {
  font-weight: 700;
  font-size: 0.85rem;
}

.dash-ability-meta {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.dash-ability-desc {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 0.3rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.05);
  padding-top: 0.3rem;
  line-height: 1.4;
}

/* Wealth and items section */
.dash-wealth-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

@media (min-width: 600px) {
  .dash-wealth-row {
    grid-template-columns: 1.5fr 1fr 1fr;
  }
}

.dash-wealth-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.dash-wealth-item span {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-weight: 500;
}

.dash-coin-input-wrap {
  display: flex;
  gap: 0.25rem;
  align-items: center;
}

.dash-coin-input {
  background: rgba(10, 10, 15, 0.4);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  padding: 0.25rem 0.4rem;
  font-size: 0.85rem;
  width: 100%;
  text-align: center;
  box-sizing: border-box;
}

.dash-items-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  max-height: 220px;
  overflow-y: auto;
  padding-right: 0.2rem;
}

.dash-item-row {
  display: flex;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.35rem 0.5rem;
  font-size: 0.8rem;
}

.dash-item-name {
  font-weight: 600;
}

.dash-item-qty {
  color: var(--accent2);
  font-weight: bold;
}
