/* =====================================================
   NIA INVITE — CLIENTS (CUSTOMERS) LUXURY COCKPIT
   ===================================================== */

.clients-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
  background: rgba(14, 16, 23, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 12px;
  border-radius: 14px;
  backdrop-filter: blur(10px);
}

.search-box-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.search-icon-left {
  position: absolute;
  left: 14px;
  color: var(--muted);
  display: flex;
  align-items: center;
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 11px 40px 11px 38px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  color: #fff;
  font-size: 0.82rem;
  outline: none;
  transition: border-color 0.2s;
}

.search-input:focus {
  border-color: var(--gold);
}

.btn-clear-search {
  position: absolute;
  right: 12px;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 4px;
  display: none;
}

/* Tabs Penapis Status */
.filter-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.tab-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: var(--muted);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.tab-btn.active {
  background: rgba(212, 175, 55, 0.12);
  border-color: rgba(212, 175, 55, 0.4);
  color: var(--gold-glow);
}

.tab-count {
  font-size: 0.65rem;
  padding: 1px 6px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
}

.tab-btn.active .tab-count {
  background: var(--gold);
  color: #000;
}

/* Senarai Kad Pengantin */
.client-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.client-card {
  background: linear-gradient(145deg, #131620 0%, #0c0e14 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
  text-align: left;
}

.client-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--gold);
}

.client-card.status-inactive::before {
  background: var(--muted);
}

.client-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
}

.client-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 6px;
  flex: 1;
}

.client-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  margin: 0;
}

.client-tags {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.client-code {
  font-family: monospace;
  font-size: 0.72rem;
  color: var(--gold-glow);
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.25);
  padding: 2px 7px;
  border-radius: 6px;
  letter-spacing: 0.5px;
}

.client-aff-badge {
  font-size: 0.68rem;
  font-weight: 700;
  color: #60a5fa;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.25);
  padding: 2px 7px;
  border-radius: 6px;
}

.client-pkg-badge {
  font-size: 0.68rem;
  font-weight: 700;
  color: #a78bfa;
  background: rgba(167, 139, 250, 0.1);
  border: 1px solid rgba(167, 139, 250, 0.25);
  padding: 2px 7px;
  border-radius: 6px;
  text-transform: uppercase;
}

/* Status Badge */
.badge-status {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.badge-status::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
}

.badge-active {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
}

.badge-active::before {
  background: #10b981;
}

.badge-inactive {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
}

.badge-inactive::before {
  background: #ef4444;
}

.badge-pending {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fbbf24;
}

.badge-pending::before {
  background: #f59e0b;
}

/* Metadata Stack */
.client-details-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(0, 0, 0, 0.35);
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.client-detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  gap: 12px;
}

.client-detail-label {
  color: var(--muted);
  font-size: 0.68rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  flex-shrink: 0;
}

.client-detail-val {
  color: #f3f4f6;
  font-weight: 500;
  text-align: right;
  word-break: break-all;
}

/* Button Actions */
.client-actions {
  display: flex;
  gap: 8px;
}

.btn-client-view {
  flex: 2;
  padding: 9px 12px;
  background: rgba(212, 175, 55, 0.06);
  border: 1px solid rgba(212, 175, 55, 0.3);
  color: var(--gold-glow);
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-client-edit {
  flex: 1;
  padding: 9px 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #e5e7eb;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: all 0.2s;
}

.btn-client-toggle {
  padding: 9px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: all 0.2s;
}

.btn-client-view:active,
.btn-client-edit:active,
.btn-client-toggle:active {
  transform: scale(0.97);
}

/* =====================================================
   EXECUTIVE MODAL STYLES (DETAIL & EDIT)
   ===================================================== */

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(4, 5, 8, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
}

.modal-overlay.open {
  display: flex;
}

.modal-box {
  background: linear-gradient(160deg, #161925 0%, #0a0c12 100%);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 20px;
  width: 100%;
  max-width: 420px;
  padding: 22px 20px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.95), 0 0 30px rgba(212, 175, 55, 0.05);
  max-height: 88vh;
  overflow-y: auto;
  position: relative;
}

.modal-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 25%;
  right: 25%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.modal-header-deck {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 18px;
}

.modal-title {
  font-size: 1.12rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.5px;
  line-height: 1.2;
}

.btn-modal-close-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.btn-modal-close-icon:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* Luxury 2x2 HUD Grid */
.stats-hud-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
}

.stat-metric-tile {
  background: rgba(10, 12, 18, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  position: relative;
  overflow: hidden;
}

.stat-metric-tile::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 2px;
  height: 100%;
  background: rgba(255, 255, 255, 0.1);
}

.stat-metric-tile.gold-accent::before {
  background: var(--gold);
}

.stat-metric-tile.green-accent::before {
  background: #10b981;
}

.stat-metric-label {
  font-size: 0.62rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 700;
}

.stat-metric-val {
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.3px;
}

.modal-section-title {
  font-size: 0.65rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-weight: 800;
  margin: 18px 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.07);
}

/* Tile Senarai Kad & Order */
.client-modal-cards,
.client-modal-orders {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 200px;
  overflow-y: auto;
  padding-right: 2px;
}

.card-item-tile,
.order-item-tile {
  background: rgba(7, 9, 14, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 12px 14px;
  border-radius: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s ease;
}

.card-item-tile:hover,
.order-item-tile:hover {
  border-color: rgba(212, 175, 55, 0.3);
  background: rgba(12, 15, 22, 0.9);
}

.tile-title-main {
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.3px;
}

.tile-sub-code {
  font-size: 0.68rem;
  color: var(--muted);
  font-family: monospace;
  margin-top: 3px;
}

/* Executive Package Selector (Pill Grid) */
.pkg-selector-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 4px;
}

.pkg-option-card {
  background: #090b10;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.pkg-option-card:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.15);
}

.pkg-option-card.selected {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.15) 0%, rgba(212, 175, 55, 0.05) 100%);
  border-color: var(--gold);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.2);
}

.pkg-option-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pkg-option-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.5px;
}

.pkg-option-card.selected .pkg-option-name {
  color: var(--gold-glow);
}

.pkg-option-sub {
  font-size: 0.62rem;
  color: var(--muted);
}

.pkg-option-check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.pkg-option-card.selected .pkg-option-check {
  background: var(--gold);
  border-color: var(--gold);
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.5);
}

.pkg-option-check svg {
  display: none;
}

.pkg-option-card.selected .pkg-option-check svg {
  display: block;
}

/* Form Fields */
.form-group-client {
  margin-bottom: 14px;
}

.form-group-client label {
  display: block;
  font-size: 0.68rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 700;
  margin-bottom: 6px;
}

.form-group-client input {
  width: 100%;
  padding: 11px 12px;
  background: #08090e;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 9px;
  color: #fff;
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.2s;
}

.form-group-client input:focus {
  border-color: var(--gold);
}

/* Modal Buttons */
.modal-footer-btns {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.btn-modal-close-deck {
  width: 100%;
  padding: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #f3f4f6;
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-modal-close-deck:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-modal-cancel {
  flex: 1;
  padding: 11px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.btn-modal-save {
  flex: 1;
  padding: 11px;
  background: var(--gold-gradient);
  border: none;
  color: #000;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}
