/* LockboxIQ Dashboard — extends theme.css + compliance.css */

.mp-page {
  padding-top: 80px;
  min-height: 100vh;
}

/* ─── HEADER ─────────────────────────────────────── */
.mp-header {
  background: var(--navy-mid);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 48px;
}
.mp-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
}
.mp-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.mp-badge {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--amber);
  background: rgba(240,165,0,0.12);
  border: 1px solid rgba(240,165,0,0.3);
  padding: 4px 10px;
  border-radius: 4px;
}
.mp-subtitle {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.05em;
}
.mp-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--white);
  margin-bottom: 12px;
}
.mp-description {
  font-size: 16px;
  font-weight: 300;
  color: var(--muted);
  max-width: 480px;
  line-height: 1.65;
}
.mp-header-right {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 8px;
}
.btn-pricing {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(240,165,0,0.1);
  color: var(--amber);
  border: 1px solid rgba(240,165,0,0.25);
  padding: 10px 18px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn-pricing:hover { background: rgba(240,165,0,0.2); border-color: var(--amber); }

/* ─── STATS BAR ────────────────────────────────────── */
.mp-stats-bar {
  background: var(--navy-mid);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 0 48px;
}
.mp-stats-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0;
  padding: 24px 0;
  flex-wrap: wrap;
}
.mp-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 28px;
}
.mp-stat:first-child { padding-left: 0; }
.mp-stat-value {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--white);
  line-height: 1;
  margin-bottom: 6px;
}
.mp-stat-critical .mp-stat-value { color: #EF4444; }
.mp-stat-warning  .mp-stat-value { color: var(--amber); }
.mp-stat-healthy  .mp-stat-value { color: #00D4FF; }
.mp-stat-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
  line-height: 1.4;
}
.mp-stat-divider {
  width: 1px;
  height: 40px;
  background: rgba(255,255,255,0.08);
}
.mp-stat-legend {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 16px;
}

/* ─── TABLE AREA ───────────────────────────────────── */
.mp-table-area {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 48px 32px;
}
.mp-table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 0 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 0;
}
.mp-table-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--white);
}
.mp-table-meta {
  display: flex;
  align-items: center;
  gap: 16px;
}
.mp-record-count {
  font-size: 13px;
  color: var(--muted);
}
.btn-lock-new {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--amber);
  color: var(--navy);
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
  white-space: nowrap;
}
.btn-lock-new:hover { opacity: 0.85; }

.mp-table-scroll {
  overflow-x: auto;
}
.mp-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
}
.mp-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.mp-table td {
  padding: 14px 16px;
  font-size: 14px;
  color: var(--off-white);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.mp-table tr:last-child td { border-bottom: none; }
.mp-table tr:hover td { background: rgba(255,255,255,0.02); }

/* Row urgency tints */
.row-critical td { background: rgba(220,38,38,0.04); }
.row-warning  td { background: rgba(240,165,0,0.04); }
.row-healthy  td { background: rgba(0,212,255,0.03); }

/* Merchant name cell */
.merchant-name {
  font-weight: 600;
  color: var(--white);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.funder-name, .broker-name { color: var(--off-white); }
.deal-value { color: var(--amber); font-weight: 500; }
.locked-date { color: var(--muted); }

/* Empty state */
.mp-empty-state {
  padding: 80px 48px;
  text-align: center;
}
.mp-empty-icon { font-size: 56px; margin-bottom: 20px; }
.mp-empty-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 10px;
}
.mp-empty-desc {
  font-size: 15px;
  color: var(--muted);
  max-width: 440px;
  margin: 0 auto 28px;
  line-height: 1.6;
}
.btn-lock-first {
  background: var(--amber);
  color: var(--navy);
  border: none;
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}
.btn-lock-first:hover { opacity: 0.85; }

/* No results */
.mp-no-results {
  padding: 60px 48px;
  text-align: center;
}
.mp-no-results p { font-size: 16px; color: var(--muted); margin-bottom: 16px; }

/* Release button */
.btn-release-lock {
  background: rgba(220,38,38,0.1);
  color: #F87171;
  border: 1px solid rgba(220,38,38,0.25);
  padding: 5px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn-release-lock:hover { background: rgba(220,38,38,0.2); border-color: rgba(220,38,38,0.4); }

/* Header "New Lock" button */
.btn-new-lock {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--amber);
  color: var(--navy);
  border: none;
  padding: 10px 18px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
  white-space: nowrap;
}
.btn-new-lock:hover { opacity: 0.85; }

/* Table row actions */
.actions-cell {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.btn-extend-row {
  background: rgba(0,212,255,0.08);
  color: #00D4FF;
  border: 1px solid rgba(0,212,255,0.25);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-extend-row:hover { background: rgba(0,212,255,0.15); border-color: rgba(0,212,255,0.4); }

.btn-edit-row {
  background: rgba(255,255,255,0.05);
  color: var(--muted);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-edit-row:hover { color: var(--off-white); border-color: rgba(255,255,255,0.2); }

/* Extend popover */
.extend-buttons {
  display: flex;
  gap: 10px;
  margin: 16px 0;
}
.btn-extend-days {
  flex: 1;
  background: rgba(0,212,255,0.08);
  color: #00D4FF;
  border: 1px solid rgba(0,212,255,0.25);
  padding: 12px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-extend-days:hover { background: rgba(0,212,255,0.15); }
.btn-extend-days:active { background: rgba(0,212,255,0.25); }

/* ─── FILTER BAR ──────────────────────────────────── */
.mp-filter-bar {
  padding: 24px 48px;
  background: var(--surface);
  border-top: 1px solid rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.mp-filter-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  gap: 20px;
  flex-wrap: wrap;
}
.filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.filter-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.filter-input,
.filter-select {
  background: var(--navy-mid);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--off-white);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.15s;
  min-width: 140px;
}
.filter-input { min-width: 180px; }
.filter-input:focus, .filter-select:focus { border-color: var(--amber); }
.filter-input::placeholder { color: var(--muted); }
.filter-select option { background: var(--navy-mid); }

/* Tier buttons */
.tier-buttons { display: flex; gap: 4px; }
.tier-btn {
  background: var(--navy-mid);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--muted);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.tier-btn:hover { color: var(--off-white); border-color: rgba(255,255,255,0.2); }
.tier-btn.active { background: rgba(255,255,255,0.08); color: var(--off-white); border-color: rgba(255,255,255,0.2); }
.tier-btn.tier-critical.active { background: rgba(220,38,38,0.15); color: #F87171; border-color: rgba(220,38,38,0.4); }
.tier-btn.tier-warning.active  { background: rgba(240,165,0,0.1);  color: var(--amber); border-color: rgba(240,165,0,0.3); }
.tier-btn.tier-healthy.active  { background: rgba(0,212,255,0.08); color: var(--cyan); border-color: rgba(0,212,255,0.2); }

.filter-results-count {
  max-width: 1200px;
  margin: 12px auto 0;
  font-size: 12px;
  color: var(--muted);
}

/* ─── MODAL ───────────────────────────────────────── */
.mp-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.mp-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10,22,40,0.75);
  backdrop-filter: blur(4px);
}
.mp-modal-panel {
  position: relative;
  background: var(--navy-mid);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 32px;
  width: 100%;
  max-width: 560px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.6);
}
.mp-modal-sm { max-width: 420px; }
.mp-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}
.mp-modal-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--white);
}
.mp-modal-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: color 0.15s;
}
.mp-modal-close:hover { color: var(--white); }

.mp-modal-form { display: flex; flex-direction: column; gap: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.form-input {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--off-white);
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 14px;
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.15s;
}
.form-input:focus { border-color: var(--amber); }
.form-input::placeholder { color: var(--muted); }
.form-input option { background: var(--navy-mid); }

.form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}
.form-msg { font-size: 13px; flex: 1; }
.form-msg.error { color: #F87171; }

.btn-cancel {
  background: var(--navy-light);
  color: var(--muted);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-cancel:hover { color: var(--off-white); border-color: rgba(255,255,255,0.2); }

.btn-submit {
  background: var(--amber);
  color: var(--navy);
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}
.btn-submit:hover { opacity: 0.85; }
.btn-submit:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-release {
  background: rgba(220,38,38,0.15);
  color: #F87171;
  border: 1px solid rgba(220,38,38,0.3);
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-release:hover { background: rgba(220,38,38,0.25); }
.btn-release:disabled { opacity: 0.5; cursor: not-allowed; }

.mp-modal-body { margin-bottom: 24px; }
.release-msg {
  font-size: 15px;
  color: var(--off-white);
  line-height: 1.6;
  margin-bottom: 24px;
}

/* ─── UPSELL ──────────────────────────────────────── */
.mp-upsell {
  background: var(--navy-mid);
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 48px;
}
.mp-upsell-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}
.mp-upsell-icon { font-size: 36px; flex-shrink: 0; }
.mp-upsell-content { flex: 1; min-width: 240px; }
.mp-upsell-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 8px;
}
.mp-upsell-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
}
.btn-upsell-mp {
  display: inline-block;
  background: var(--amber);
  color: var(--navy);
  border: none;
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.15s;
  flex-shrink: 0;
}
.btn-upsell-mp:hover { opacity: 0.85; }

/* Sort icons */
th.sortable { cursor: pointer; user-select: none; transition: color 0.15s; }
th.sortable:hover { color: var(--amber); }
.sort-icon { font-size: 10px; opacity: 0.5; margin-left: 4px; }
th.sortable:hover .sort-icon { opacity: 1; color: var(--amber); }

/* ─── PLAN BADGE ────────────────────────────────── */
.mp-plan-badge {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 4px;
}
.mp-plan-solo   { background: rgba(0,212,255,0.12); color: var(--cyan);    border: 1px solid rgba(0,212,255,0.3); }
.mp-plan-team   { background: rgba(240,165,0,0.12); color: var(--amber);   border: 1px solid rgba(240,165,0,0.3); }
.mp-plan-network { background: rgba(168,85,247,0.12); color: #C084FC;      border: 1px solid rgba(168,85,247,0.3); }

/* ─── PAST-DUE BANNER ───────────────────────────── */
.past-due-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 300;
  background: #7A1010;
  color: #FFFFFF;
  padding: 12px 24px;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.past-due-banner a {
  color: #FF6B6B;
  font-weight: 700;
  text-decoration: underline;
}
.past-due-banner a:hover { color: #FFB3B3; }

.mp-page.past-due-padded { padding-top: 130px; }

/* ─── RESPONSIVE ──────────────────────────────────── */
@media (max-width: 768px) {
  .mp-header { padding: 32px 24px; }
  .mp-header-inner { flex-direction: column; }
  .mp-header-right { width: 100%; }
  .mp-stats-bar { padding: 0 24px; }
  .mp-stats-inner { padding: 20px 0; gap: 12px; }
  .mp-stat { padding: 0 16px; }
  .mp-stat-value { font-size: 28px; }
  .mp-stat-legend { margin-left: 0; width: 100%; }
  .mp-table-area { padding: 0 24px 32px; }
  .mp-filter-bar { padding: 16px 24px; }
  .mp-filter-inner { gap: 12px; }
  .mp-upsell { padding: 32px 24px; }
  .mp-upsell-inner { gap: 20px; }
  .form-row { grid-template-columns: 1fr; }
}