/* ── Modal overlay for edit dialogs ────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9000;
}

.modal-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 32px;
  width: 90%;
  max-width: 420px;
  color: var(--text);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

/* ── DASHBOARD ────────────────────────── */
.dashboard-top-section {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.db-left-col {
  flex: 1;
  min-width: 300px;
}

.db-manager-select {
  font-size: 3rem;
  font-weight: 800;
  color: var(--text);
  background: transparent;
  border: none;
  outline: none;
  cursor: pointer;
  margin-bottom: 20px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.db-manager-select:hover {
  opacity: 0.8;
}

.db-counters {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
}

.db-counter-item {
  display: flex;
  flex-direction: column;
}

.db-counter-val {
  font-size: 2rem;
  font-weight: 800;
}

.db-counter-lbl {
  font-size: 0.75rem;
  color: #a1a1aa;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.db-right-col {
  display: flex;
  gap: 40px;
  align-items: center;
  margin-top: 20px;
}

.db-circle-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.db-circle {
  width: 90px;
  height: 90px;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 8px;
}

.circular-chart {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  max-height: 100%;
}

.circle-bg {
  fill: none;
  stroke: var(--surface2);
  stroke-width: 2.5;
}

.circle {
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  transition: stroke-dasharray 0.5s ease;
}

.circular-chart.orange .circle {
  stroke: #fb923c;
}

.circular-chart.red .circle {
  stroke: #ef4444;
}

.db-circle-val {
  position: absolute;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text);
}

.db-circle-title {
  text-align: center;
  font-size: 0.8rem;
  color: #ef4444;
  font-weight: bold;
}

.db-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 30px 0;
}

.db-chart-section {
  background: var(--surface);
  border-radius: 12px;
  padding: 30px;
  margin-bottom: 30px;
  overflow-x: auto;
}

.db-chart-title {
  font-size: 0.8rem;
  color: #a1a1aa;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 20px;
}

.db-chart-container {
  display: flex;
  align-items: flex-end;
  height: 150px;
  gap: 15px;
  min-width: 600px;
}

.db-chart-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

.db-chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 120px;
  width: 100%;
  justify-content: center;
}

.db-bar-q {
  width: 12px;
  background: #9ca3af;
  border-radius: 4px 4px 0 0;
  transition: height 0.3s ease;
}

.db-bar-e {
  width: 12px;
  background: #fca5a5;
  border-radius: 4px 4px 0 0;
  transition: height 0.3s ease;
}

.db-chart-date {
  font-size: 0.7rem;
  color: #a1a1aa;
  margin-top: 8px;
}

.db-list-section {
  background: transparent;
}

.db-list-title {
  font-size: 0.8rem;
  color: #a1a1aa;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 20px;
}

.db-list-header {
  display: flex;
  padding: 10px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 0.75rem;
  color: #a1a1aa;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.db-list-items {
  display: flex;
  flex-direction: column;
}

.db-list-row {
  display: flex;
  padding: 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  margin-bottom: 8px;
  border-radius: 12px;
  align-items: flex-start;
}

.db-col {
  padding: 0 10px;
}

.db-col-date {
  flex: 0 0 100px;
}

.db-col-q {
  flex: 0 0 70px;
  font-weight: bold;
  text-align: center;
}

.db-col-e {
  flex: 0 0 70px;
  font-weight: bold;
  text-align: center;
}

.db-col-client {
  flex: 1;
}

.db-col-dur {
  flex: 0 0 80px;
  color: #a1a1aa;
  text-align: center;
}

.db-col-status {
  flex: 0 0 110px;
  text-align: right;
}

.db-date-val {
  color: #ef4444;
  font-weight: bold;
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.db-time-val {
  color: #a1a1aa;
  font-size: 0.8rem;
}

.db-score-val {
  font-size: 1.1rem;
  border-bottom: 2px solid;
  padding-bottom: 2px;
  display: inline-block;
}

.db-score-val.q {
  border-color: #18181b;
}

.db-score-val.e {
  color: #ef4444;
  border-color: #ef4444;
}

.db-client-name {
  font-weight: 500;
  margin-bottom: 8px;
}

.db-client-desc {
  font-size: 0.8rem;
  color: #a1a1aa;
  margin-bottom: 8px;
}

.db-client-quote {
  background: #f0f4ff;
  color: #4f46e5;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-style: italic;
  display: inline-block;
  line-height: 1.4;
}

.db-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: bold;
  text-transform: uppercase;
}

.db-badge.status-в-работе {
  background: #e5e7eb;
  color: #4b5563;
}

.db-badge.status-закрыто {
  background: #18181b;
  color: white;
}

.db-badge.status-продажа {
  background: #22c55e;
  color: white;
}