/* Dashboard-specific layout */

#paneDashboard {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

#paneDashboard .dashboard-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  border-radius: 12px;
  background: rgba(10, 14, 24, 0.95);
  border: 1px solid rgba(64, 102, 255, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

#paneDashboard .dashboard-card:hover {
  transform: translateY(-6px);
  border-color: rgba(96, 146, 255, 0.4);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 18px 32px rgba(9, 15, 26, 0.48);
}

#paneDashboard .dashboard-missing-metrics {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

#paneDashboard .dashboard-metric {
  border-radius: 12px;
  padding: 12px;
  color: #f8fbff;
  background: rgba(46, 57, 88, 0.9);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

#paneDashboard .dashboard-metric:nth-child(1) {
  background: linear-gradient(135deg, rgba(82, 131, 255, 0.25), rgba(28, 42, 88, 0.75));
}

#paneDashboard .dashboard-metric:nth-child(2) {
  background: linear-gradient(135deg, rgba(54, 211, 153, 0.25), rgba(19, 58, 48, 0.75));
}

#paneDashboard .dashboard-metric:nth-child(3) {
  background: linear-gradient(135deg, rgba(214, 116, 178, 0.28), rgba(68, 32, 59, 0.8));
}

#paneDashboard .dashboard-metric:nth-child(4) {
  background: linear-gradient(135deg, rgba(248, 204, 42, 0.3), rgba(74, 54, 14, 0.78));
}

#paneDashboard .dashboard-metric:hover {
  transform: translateY(-4px);
  border-color: rgba(126, 178, 255, 0.55);
  box-shadow: 0 16px 24px rgba(8, 13, 24, 0.38);
}

#paneDashboard .dashboard-metric-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.82;
}

#paneDashboard .dashboard-metric-value {
  font-size: 20px;
  font-weight: 600;
  margin-top: 4px;
}

#paneDashboard .dashboard-recent {
  font-size: 13px;
  font-weight: 500;
  margin-top: 4px;
}

#paneDashboard .dashboard-metrics-table {
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(5, 8, 18, 0.94);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

#paneDashboard .dashboard-metrics-table:hover {
  border-color: rgba(114, 170, 255, 0.32);
  box-shadow: 0 16px 34px rgba(7, 11, 20, 0.45);
}

#paneDashboard table.dashboard-metrics {
  width: 100%;
  border-spacing: 0;
  border-collapse: collapse;
}

#paneDashboard .dashboard-metrics-table th,
#paneDashboard .dashboard-metrics-table td {
  padding: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  text-align: center;
}

#paneDashboard .dashboard-metrics-table th {
  background: rgba(255, 255, 255, 0.05);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 12px;
  border-top: none;
}

#paneDashboard .dashboard-metrics-table th.dash-col-merchant,
#paneDashboard .dashboard-metrics-table td.dash-col-merchant {
  text-align: left;
}

#paneDashboard .dashboard-metrics-table td.dash-col-amount {
  font-variant-numeric: tabular-nums;
}

#paneDashboard .dashboard-metrics-table td.dash-col-action button {
  margin: 0 auto;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

#paneDashboard .dashboard-metrics-table td.dash-col-action button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 20px rgba(46, 122, 255, 0.25);
}

#paneDashboard .dashboard-metrics-table tbody tr:hover td {
  background: rgba(96, 140, 255, 0.08);
}

#paneDashboard .dashboard-metrics-table tbody tr:first-child td {
  border-top: none;
}

#paneDashboard .dashboard-empty {
  padding: 16px;
  text-align: center;
  opacity: 0.8;
}

#paneDashboard .dashboard-status {
  margin: 0;
}

#paneDashboard .dashboard-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 8px;
}


#paneDashboard .dashboard-actions button {
  min-width: 180px;
  justify-content: center;
}

.terms-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  border-radius: 12px;
  background: rgba(10, 14, 24, 0.95);
  border: 1px solid rgba(64, 102, 255, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.terms-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.terms-card-header h2 {
  margin: 0;
}

.terms-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.terms-drop-zone {
  border: 1px dashed rgba(120, 146, 255, 0.45);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  background: rgba(18, 22, 34, 0.75);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.terms-drop-zone.drag-over {
  border-color: rgba(149, 188, 255, 0.85);
  background: rgba(33, 54, 94, 0.8);
  transform: translateY(-2px);
}

.terms-drop-message {
  font-size: 15px;
  margin-bottom: 4px;
}

.terms-drop-message strong {
  color: #dbe7ff;
}

.terms-drop-zone .terms-browse {
  color: #7ab8ff;
  text-decoration: underline;
}

.terms-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.terms-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.terms-form-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: #d8dcff;
}

.terms-form-grid input,
.terms-form-grid textarea {
  border-radius: 10px;
  padding: 10px 12px;
  background: rgba(14, 18, 30, 0.92);
  border: 1px solid rgba(120, 146, 255, 0.18);
  color: #f3f6ff;
  font-size: 14px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.terms-form-grid input:focus,
.terms-form-grid textarea:focus {
  outline: none;
  border-color: rgba(130, 182, 255, 0.5);
  box-shadow: 0 12px 24px rgba(10, 18, 36, 0.28);
}

.terms-notes-field {
  grid-column: 1 / -1;
}

.terms-notes-field textarea {
  min-height: 120px;
  resize: vertical;
}

.terms-form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.terms-table-wrap {
  overflow: auto;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.terms-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 780px;
}

.terms-table th,
.terms-table td {
  padding: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  text-align: left;
  vertical-align: top;
}

.terms-table th {
  background: rgba(255, 255, 255, 0.05);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 12px;
}

.terms-table tbody tr:hover td {
  background: rgba(96, 140, 255, 0.08);
}

.terms-table tbody tr:nth-child(even):not(:hover) td {
  background: rgba(18, 24, 44, 0.65);
}

.terms-table .terms-actions-cell {
  white-space: nowrap;
  text-align: center;
}

.terms-table .terms-actions-cell button {
  margin-right: 6px;
}

.terms-table .terms-actions-cell button:last-child {
  margin-right: 0;
}

.terms-table td:nth-child(4) {
  color: #50d890;
}

.terms-table td:nth-child(1) {
  position: relative;
  font-weight: 600;
  color: #cdb4ff;
  padding-left: 18px;
}

.terms-table td:nth-child(1)::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 3px;
  background: linear-gradient(180deg, rgba(205, 180, 255, 0.7), rgba(168, 132, 255, 0.5));
}

.terms-table td:nth-child(2) {
  font-weight: 700;
  text-decoration: underline;
  color: #3fc4c9;
}

.terms-table td:nth-child(3) {
  color: #f2a65a;
  font-weight: 600;
}

.terms-table td:nth-child(6) {
  color: #ff6b6b;
}

.credit-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  border-radius: 12px;
  background: rgba(10, 14, 24, 0.95);
  border: 1px solid rgba(64, 102, 255, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.credit-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.credit-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.credit-drop-zone {
  border: 1px dashed rgba(120, 146, 255, 0.45);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  background: rgba(18, 22, 34, 0.75);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.credit-drop-zone.drag-over {
  border-color: rgba(149, 188, 255, 0.85);
  background: rgba(33, 54, 94, 0.8);
  transform: translateY(-2px);
}

.credit-drop-message {
  font-size: 15px;
  margin-bottom: 4px;
}

.credit-drop-zone .credit-browse {
  color: #7ab8ff;
  text-decoration: underline;
}

.credit-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.credit-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.credit-form-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: #ded3ff;
}

.credit-form-grid input {
  border-radius: 10px;
  padding: 10px 12px;
  background: rgba(18, 14, 34, 0.92);
  border: 1px solid rgba(155, 140, 255, 0.18);
  color: #f3f6ff;
  font-size: 14px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.credit-form-grid input:focus {
  outline: none;
  border-color: rgba(176, 160, 255, 0.5);
  box-shadow: 0 12px 24px rgba(30, 20, 60, 0.28);
}

.credit-form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.credit-table-wrap {
  overflow: auto;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.credit-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

.credit-table th,
.credit-table td {
  padding: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  text-align: left;
  vertical-align: top;
}

.credit-table th {
  background: rgba(255, 255, 255, 0.05);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 12px;
}

.credit-table tbody tr:hover td {
  background: rgba(96, 140, 255, 0.08);
}

.credit-table tbody tr:nth-child(even):not(:hover) td {
  background: rgba(18, 24, 44, 0.65);
}

.credit-table td:nth-child(1) {
  position: relative;
  font-weight: 600;
  color: #cdb4ff;
  padding-left: 18px;
}

.credit-table td:nth-child(1)::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 3px;
  background: linear-gradient(180deg, rgba(205, 180, 255, 0.7), rgba(168, 132, 255, 0.5));
}

.credit-table td:nth-child(2) {
  color: #ff6b6b;
}

.credit-table td:nth-child(3) {
  color: #63d471;
}

.credit-table td:nth-child(6) {
  color: #f2a65a;
}

.credit-table .credit-actions-cell {
  white-space: nowrap;
  text-align: center;
}

.credit-util-cell {
  min-width: 180px;
}

.credit-util-bar {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin-bottom: 6px;
}

.credit-util-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  background: linear-gradient(90deg, rgba(99, 212, 113, 0.8), rgba(82, 131, 255, 0.9));
  transition: width 0.3s ease;
}

.credit-util-text {
  font-variant-numeric: tabular-nums;
}

.credit-util-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 10px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.08);
  color: #f8fbff;
}

.credit-util-badge.warn {
  background: rgba(242, 166, 90, 0.25);
  color: #ffcf85;
}

.credit-util-badge.critical {
  background: rgba(255, 107, 107, 0.25);
  color: #ff9f9f;
}

.credit-updated {
  font-size: 13px;
  color: rgba(213, 219, 255, 0.82);
  white-space: nowrap;
}

.credit-table .credit-actions-cell button {
  margin-right: 6px;
}

.credit-table .credit-actions-cell button:last-child {
  margin-right: 0;
 }
.dashboard-bulletin-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dashboard-bulletin-form input,
.dashboard-bulletin-form textarea {
  width: 100%;
  border-radius: 10px;
  padding: 10px 12px;
  background: rgba(14, 18, 30, 0.92);
  border: 1px solid rgba(120, 146, 255, 0.18);
  color: #f3f6ff;
  font-size: 14px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.dashboard-bulletin-form input:focus,
.dashboard-bulletin-form textarea:focus {
  outline: none;
  border-color: rgba(130, 182, 255, 0.5);
  box-shadow: 0 12px 24px rgba(10, 18, 36, 0.28);
}

.dashboard-bulletin-actions {
  display: flex;
  justify-content: flex-end;
}

.dashboard-bulletin-actions button {
  min-width: 140px;
}

.dashboard-bulletin-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dashboard-bulletin-item {
  border-radius: 10px;
  padding: 12px 14px;
  background: rgba(16, 20, 32, 0.92);
  border: 1px solid rgba(120, 146, 255, 0.2);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dashboard-bulletin-title {
  font-weight: 600;
  color: #f8fbff;
}

.dashboard-bulletin-message {
  color: #d5dbff;
  line-height: 1.45;
  white-space: pre-wrap;
}

.dashboard-bulletin-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: rgba(213, 219, 255, 0.72);
}

.dashboard-bulletin-remove {
  padding: 4px 10px;
  font-size: 12px;
}

#paneDashboard .dashboard-metrics-table td.mp-tag-cell {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
    padding: 4px 0 4px 12px;
  }

#paneDashboard .dashboard-metrics-table td.mp-tag-cell .badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 164px;
  }

#paneDashboard .dashboard-metrics-table td.mp-tag-cell button {
    flex: 0 0 auto;
  }
