.v3-dashboard {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding-inline: var(--inline-pad, 2rem);
  font-size: 0.85rem;
}
.v3-dashboard h1, .v3-dashboard h2 {
  text-align: center;
}

.v3-dash-menu {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding: 1rem;
  flex-wrap: wrap;
}
.v3-dash-menu li a {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  border-radius: 0.5rem;
  transition: background 0.15s, color 0.15s;
  text-decoration: none;
  white-space: nowrap;
}
.v3-dash-menu li a .icon {
  transition: stroke 0.15s;
}
.v3-dash-menu li a:hover {
  background: #000;
  color: #fff;
}
.v3-dash-menu li a:hover .icon {
  stroke: #fff;
}
.v3-dash-menu li a.active {
  background: #000;
  color: #fff;
}
.v3-dash-menu li a.active .icon {
  stroke: #fff;
}

.v3-date-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  font-size: 1.1rem;
  font-weight: bold;
}
.v3-date-nav a {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.9rem;
  font-weight: normal;
}

.v3-kpi-grid {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.v3-kpi-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 2px solid #000;
  border-radius: 1rem;
  padding: 1.5rem 2rem;
  min-width: 180px;
  text-align: center;
}
.v3-kpi-box .v3-kpi-label {
  font-size: 0.85rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}
.v3-kpi-box .v3-kpi-value {
  font-size: 1.5rem;
  font-weight: normal;
}

.v3-filters-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.v3-filter-select,
.v3-filter-date {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  flex: 1;
  min-width: 160px;
  background: #fff 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='%23000' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 0.8rem center;
  padding-right: 2rem;
}
.v3-filter-select option,
.v3-filter-date option {
  font-family: sans-serif;
  font-size: 0.9rem;
}

.v3-filter-date {
  background-image: none;
  min-width: 140px;
  flex: 0 0 auto;
}

.v3-search-input {
  width: 100%;
  box-sizing: border-box;
  font-family: sans-serif;
  font-size: 0.9rem;
  letter-spacing: 0;
}

.v3-table-wrapper {
  overflow-x: auto;
}
.v3-table-wrapper .dt-search {
  display: none;
}
.v3-table-wrapper .dataTables_filter {
  display: none;
}

table.v3-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}
table.v3-table th, table.v3-table td {
  border: 1px solid #000;
  padding: 6px 8px;
  text-align: left;
  white-space: nowrap;
}
table.v3-table th {
  background: #f2f2f2;
  font-weight: bold;
  position: sticky;
  top: 0;
  z-index: 1;
}
table.v3-table tbody tr:hover td {
  background: #fafafa;
}

.v3-actions {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}
.v3-actions a, .v3-actions svg {
  cursor: pointer;
  color: inherit;
}
.v3-actions .icon {
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
}

.v3-tooltip {
  position: relative;
  cursor: help;
  text-decoration: underline dotted;
}
.v3-tooltip::after {
  content: attr(data-tip);
  position: absolute;
  bottom: 120%;
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: #fff;
  padding: 0.3rem 0.6rem;
  border-radius: 0.3rem;
  white-space: nowrap;
  font-size: 0.75rem;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 100;
}
.v3-tooltip:hover::after {
  opacity: 1;
}

.v3-count-badge {
  font-weight: bold;
  background: #000;
  color: #fff;
  border-radius: 0.4rem;
  padding: 0.1rem 0.5rem;
  font-size: 0.85rem;
}

.v3-form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}
.v3-form .v3-form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
}
.v3-form .v3-form-row label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.85rem;
  flex: 1;
  min-width: 160px;
}
.v3-form .v3-form-row input, .v3-form .v3-form-row select {
  padding: 0.4rem 0.6rem;
  border: 1px solid #000;
  border-radius: 0.4rem;
  font-size: 0.85rem;
  width: 100%;
}
.v3-form .v3-form-section {
  border: 1px solid #000;
  border-radius: 0.5rem;
  padding: 1rem;
}
.v3-form .v3-form-section-title {
  font-weight: bold;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
}

.v3-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.v3-modal-overlay.active {
  display: flex;
}

.v3-modal {
  background: #fff;
  border-radius: 0.75rem;
  padding: 2rem;
  width: 100%;
  max-width: 420px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.v3-modal .v3-modal-close {
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  background: none;
  border: none;
}
.v3-modal h3 {
  margin: 0;
}
.v3-modal label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.85rem;
}
.v3-modal input {
  padding: 0.4rem 0.6rem;
  border: 1px solid #000;
  border-radius: 0.4rem;
  font-size: 0.85rem;
  width: 100%;
}
.v3-modal .v3-modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.v3-confirm-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.v3-confirm-overlay.active {
  display: flex;
}

.v3-confirm-box {
  background: #fff;
  border-radius: 0.75rem;
  padding: 2rem;
  max-width: 320px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.v3-confirm-box .v3-confirm-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.v3-detail-row {
  display: none;
  background: #f9f9f9;
}
.v3-detail-row td {
  padding: 1rem;
}
.v3-detail-row.open {
  display: table-row;
}

.v3-detail-inner {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}
.v3-detail-inner ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.v3-detail-inner li {
  padding: 0.2rem 0;
}

.v3-email-status {
  display: flex;
  gap: 0.5rem;
}
.v3-email-status .icon.opened {
  stroke: var(--green, #2ecc71);
}
.v3-email-status .icon.pending {
  opacity: 0.4;
}

.v3-notice {
  padding: 0.75rem 1rem;
  border-radius: 0.4rem;
  font-size: 0.9rem;
}
.v3-notice.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}
.v3-notice.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.v3-chart-wrapper {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}
