/* ============ SHARED MODAL COMPONENTS ============ */
/* Include this file in any page that needs modals */

/* Base modal overlay */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal-box {
  width: 480px;
  max-width: 92vw;
  max-height: 85vh;
  overflow-y: auto;
  background: #1a2742;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 20px;
  padding: 32px;
  position: relative;
  box-shadow: 0 30px 80px rgba(0,0,0,0.3);
  transform: translateY(20px) scale(0.96);
  transition: transform 0.35s ease;
}
.modal-overlay.active .modal-box {
  transform: translateY(0) scale(1);
}

.modal-box.wide { width: 640px; }
.modal-box.narrow { width: 380px; }

.modal-close-btn {
  position: absolute;
  top: 16px; right: 16px;
  width: 32px; height: 32px;
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.35);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all 0.3s;
}
.modal-close-btn:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

.modal-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 6px;
}
.modal-subtitle {
  font-size: 14px;
  color: rgba(255,255,255,0.5);
  margin-bottom: 24px;
}

/* ============ RECHARGE MODAL ============ */
.recharge-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 24px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.recharge-tab {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255,255,255,0.4);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.3s;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-family: inherit;
}
.recharge-tab:hover { color: rgba(255,255,255,0.7); }
.recharge-tab.active {
  color: #00d4aa;
  border-bottom-color: #00d4aa;
}

.recharge-panel { display: none; }
.recharge-panel.active { display: block; }

/* Recharge tiers */
.recharge-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}
.recharge-tier {
  padding: 16px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
}
.recharge-tier:hover {
  border-color: rgba(0,212,170,0.3);
  background: rgba(0,212,170,0.03);
}
.recharge-tier.selected {
  border-color: rgba(0,212,170,0.5);
  background: rgba(0,212,170,0.06);
  box-shadow: 0 0 0 1px rgba(0,212,170,0.2);
}
.recharge-tier .tier-amount {
  font-size: 24px;
  font-weight: 900;
  color: #fff;
  margin-bottom: 2px;
}
.recharge-tier .tier-bonus {
  font-size: 12px;
  color: #f59e0b;
  font-weight: 500;
}
.recharge-tier .tier-label {
  position: absolute;
  top: -8px; right: -8px;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff;
}

.recharge-payment {
  margin-bottom: 20px;
}
.recharge-payment .pay-label {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.5);
  margin-bottom: 10px;
}
.pay-methods {
  display: flex;
  gap: 10px;
}
.pay-method {
  flex: 1;
  padding: 12px;
  border-radius: 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  color: rgba(255,255,255,0.6);
}
.pay-method:hover { border-color: rgba(255,255,255,0.15); }
.pay-method.selected {
  border-color: rgba(0,212,170,0.4);
  background: rgba(0,212,170,0.05);
  color: #00d4aa;
}
.pay-method .pay-icon { font-size: 20px; }

.btn-recharge {
  width: 100%;
  height: 48px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #00d4aa, #0ea5e9);
  color: #0f0f12;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s;
}
.btn-recharge:hover {
  box-shadow: 0 4px 24px rgba(0,212,170,0.35);
}

/* Card key input */
.kami-input-group {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}
.kami-input {
  flex: 1;
  height: 44px;
  padding: 0 14px;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: #fff;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  letter-spacing: 2px;
}
.kami-input::placeholder { color: rgba(255,255,255,0.25); letter-spacing: normal; }
.kami-input:focus { border-color: rgba(0,212,170,0.4); }

/* ============ PRICE QUERY MODAL ============ */
.price-search {
  margin-bottom: 16px;
}
.price-search input {
  width: 100%;
  height: 40px;
  padding: 0 14px;
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  outline: none;
}
.price-search input::placeholder { color: rgba(255,255,255,0.25); }

.price-table {
  width: 100%;
  border-collapse: collapse;
}
.price-table th {
  text-align: left;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.35);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.price-table td {
  padding: 10px 12px;
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  border-bottom: 1px solid rgba(255,255,255,0.03);
}
.price-table tr:hover td { background: rgba(255,255,255,0.02); }
.price-cat {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
}
.price-cat.chat { background: rgba(0,212,170,0.1); color: #00d4aa; }
.price-cat.image { background: rgba(14,165,233,0.1); color: #0ea5e9; }
.price-cat.video { background: rgba(168,85,247,0.1); color: #a855f7; }
.price-cat.audio { background: rgba(245,158,11,0.1); color: #f59e0b; }

/* ============ RECORDS MODAL ============ */
.records-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.records-filter {
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.records-filter.active {
  background: rgba(0,212,170,0.1);
  border-color: rgba(0,212,170,0.3);
  color: #00d4aa;
}

.record-item {
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.record-item:last-child { border-bottom: none; }
.record-left { display: flex; align-items: center; gap: 12px; }
.record-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}
.record-icon.consume { background: rgba(239,68,68,0.1); }
.record-icon.recharge { background: rgba(0,212,170,0.1); }
.record-info .ri-title { font-size: 13px; font-weight: 500; }
.record-info .ri-time { font-size: 11px; color: rgba(255,255,255,0.3); margin-top: 2px; }
.record-amount { font-size: 15px; font-weight: 700; }
.record-amount.negative { color: #ef4444; }
.record-amount.positive { color: #00d4aa; }


/* ============ CONSUMPTION RECORDS V2 ============ */
.consumption-wide { max-width: 960px !important; width: 95% !important; max-height: 90vh; overflow-y: auto; }
.csp-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.csp-header-icon { width: 40px; height: 40px; border-radius: 12px; background: rgba(16,185,129,0.12); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.csp-title { font-size: 20px; font-weight: 700; margin: 0; }
.csp-subtitle { font-size: 12px; color: rgba(255,255,255,0.4); margin: 2px 0 0; }
.csp-notice { display: flex; align-items: center; gap: 6px; padding: 8px 12px; background: rgba(245,158,11,0.06); border: 1px solid rgba(245,158,11,0.15); border-radius: 8px; font-size: 12px; color: #f59e0b; margin-bottom: 14px; }
.csp-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.csp-stat { padding: 14px 16px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06); border-radius: 10px; text-align: center; }
.csp-stat-label { font-size: 12px; color: rgba(255,255,255,0.4); margin-bottom: 6px; display: flex; align-items: center; justify-content: center; gap: 4px; }
.csp-stat-value { font-size: 20px; font-weight: 700; }
.csp-stat-value.green { color: #10b981; }
.csp-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; }
.csp-dot.green { background: #10b981; }
.csp-dot.orange { background: #f59e0b; }
.csp-filters { margin-bottom: 12px; }
.csp-date-tabs { display: flex; gap: 0; margin-bottom: 10px; flex-wrap: wrap; }
.csp-date-tab { padding: 5px 14px; font-size: 12px; background: transparent; border: 1px solid rgba(255,255,255,0.08); color: rgba(255,255,255,0.5); cursor: pointer; font-family: inherit; transition: all 0.2s; }
.csp-date-tab:first-child { border-radius: 6px 0 0 6px; }
.csp-date-tab:last-child { border-radius: 0 6px 6px 0; }
.csp-date-tab + .csp-date-tab { border-left: none; }
.csp-date-tab.active { background: rgba(16,185,129,0.12); border-color: rgba(16,185,129,0.3); color: #10b981; }
.csp-date-tab:hover:not(.active) { background: rgba(255,255,255,0.04); }
.csp-filter-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.csp-select { padding: 6px 28px 6px 10px; border-radius: 6px; font-size: 12px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); color: rgba(255,255,255,0.7); font-family: inherit; cursor: pointer; appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23999' fill='none' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 8px center; }
.csp-select option { background: #0b2948; color: #fff; }
.csp-export-btn { margin-left: auto; padding: 6px 14px; border-radius: 6px; font-size: 12px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); color: rgba(255,255,255,0.6); cursor: pointer; font-family: inherit; display: flex; align-items: center; gap: 4px; transition: all 0.2s; }
.csp-export-btn:hover { background: rgba(255,255,255,0.08); color: #fff; }
.csp-table-wrap { overflow-x: auto; margin: 0 -20px; padding: 0 20px; }
.csp-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.csp-table thead th { padding: 10px 8px; text-align: left; font-size: 11px; color: rgba(255,255,255,0.35); font-weight: 500; border-bottom: 1px solid rgba(255,255,255,0.06); white-space: nowrap; }
.csp-table tbody td { padding: 10px 8px; border-bottom: 1px solid rgba(255,255,255,0.04); vertical-align: middle; }
.csp-table tbody tr:hover { background: rgba(255,255,255,0.02); }
.csp-model-cell { display: flex; align-items: center; gap: 8px; min-width: 120px; }
.csp-model-avatar { width: 24px; height: 24px; border-radius: 6px; object-fit: contain; flex-shrink: 0; background: rgba(255,255,255,0.06); }
.csp-model-avatar-fallback { width: 24px; height: 24px; border-radius: 6px; background: rgba(255,255,255,0.08); display: flex; align-items: center; justify-content: center; font-size: 11px; color: rgba(255,255,255,0.5); flex-shrink: 0; font-weight: 600; }
.csp-model-name { white-space: nowrap; font-weight: 500; }
.csp-cat-badge { padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 500; }
.csp-cat-badge.chat { background: rgba(0,212,170,0.1); color: #00d4aa; }
.csp-cat-badge.image { background: rgba(14,165,233,0.1); color: #0ea5e9; }
.csp-cat-badge.video { background: rgba(168,85,247,0.1); color: #a855f7; }
.csp-cat-badge.audio { background: rgba(245,158,11,0.1); color: #f59e0b; }
.csp-channel-badge { padding: 2px 8px; border-radius: 4px; font-size: 11px; background: rgba(99,102,241,0.12); color: #818cf8; }
.csp-status-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; white-space: nowrap; }
.csp-status-badge.success { color: #10b981; }
.csp-status-badge.refund { color: #f59e0b; }
.csp-dim { color: rgba(255,255,255,0.35); font-size: 12px; }
.csp-time-cell { white-space: nowrap; font-size: 12px; }
.csp-pagination { display: flex; justify-content: center; gap: 4px; margin-top: 12px; }
.csp-page-btn { width: 32px; height: 32px; border-radius: 6px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); color: rgba(255,255,255,0.5); cursor: pointer; font-size: 12px; font-family: inherit; display: flex; align-items: center; justify-content: center; }
.csp-page-btn.active { background: rgba(16,185,129,0.15); border-color: rgba(16,185,129,0.3); color: #10b981; }
.csp-page-btn:hover:not(.active) { background: rgba(255,255,255,0.08); }

/* Mobile consumption */
@media (max-width: 768px) {
  .consumption-wide { width: 100% !important; max-width: 100% !important; max-height: 100vh !important; border-radius: 0 !important; height: 100vh; }
  .csp-summary { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .csp-stat { padding: 10px 12px; }
  .csp-stat-value { font-size: 16px; }
  .csp-date-tabs { flex-wrap: wrap; gap: 0; }
  .csp-date-tab { padding: 4px 10px; font-size: 11px; }
  .csp-filter-row { flex-wrap: wrap; }
  .csp-select { flex: 1; min-width: 100px; font-size: 11px; }
  .csp-export-btn { font-size: 11px; padding: 6px 10px; }
  .csp-hide-m { display: none !important; }
  .csp-table { font-size: 12px; }
  .csp-table thead th { padding: 8px 4px; font-size: 10px; }
  .csp-table tbody td { padding: 8px 4px; }
  .csp-model-cell { min-width: 80px; }
  .csp-model-name { font-size: 11px; overflow: hidden; text-overflow: ellipsis; max-width: 80px; }
  .csp-model-avatar, .csp-model-avatar-fallback { width: 20px; height: 20px; }
  .csp-time-cell { font-size: 10px; }
}

/* ============ CUSTOMER SERVICE MODAL ============ */
.cs-card {
  padding: 20px;
  border-radius: 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  text-align: center;
  margin-bottom: 12px;
}
.cs-card .cs-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00d4aa, #0ea5e9);
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}
.cs-card .cs-name { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.cs-card .cs-desc { font-size: 13px; color: rgba(255,255,255,0.4); margin-bottom: 12px; }
.cs-card .cs-qr {
  width: 160px; height: 160px;
  border-radius: 12px;
  background: #fff;
  margin: 0 auto 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #999;
}
.cs-card .cs-hint { font-size: 12px; color: rgba(255,255,255,0.3); }

/* ============ ANNOUNCEMENT MODAL ============ */
#modalAnnouncement .modal-box {
  width: 680px;
  max-width: 94vw;
  max-height: 92vh;
  padding: 0;
  background: linear-gradient(160deg, #0e2444 0%, #0c1e35 40%, #101b30 100%);
  border: 1px solid rgba(0,202,224,0.15);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 40px 100px rgba(0,0,0,0.7), 0 0 80px rgba(0,202,224,0.06), inset 0 1px 0 rgba(0,202,224,0.08);
}
/* --- Header --- */
.ann-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 28px 32px 20px;
  border-bottom: 1px solid rgba(0,202,224,0.1);
  position: relative;
  background: linear-gradient(135deg, rgba(0,202,224,0.06) 0%, transparent 60%);
}
.ann-header-icon {
  width: 52px; height: 52px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(0,202,224,0.18), rgba(14,165,233,0.12));
  border: 1px solid rgba(0,202,224,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 20px rgba(0,202,224,0.1);
}
.ann-header-icon svg { width: 26px; height: 26px; color: #00cae0; }
.ann-header-text h2 {
  font-size: 22px;
  font-weight: 800;
  color: #f1f5f9;
  margin: 0 0 4px;
  letter-spacing: 0.5px;
}
.ann-header-text p {
  font-size: 13px;
  color: #4a5568;
  margin: 0;
}
#modalAnnouncement .modal-close-btn {
  position: absolute;
  top: 20px; right: 20px;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(0,202,224,0.08);
  border: 1px solid rgba(0,202,224,0.15);
  z-index: 10;
}
/* --- Content scrollable area --- */
.ann-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px 32px;
  position: relative;
}
.ann-body::-webkit-scrollbar { width: 4px; }
.ann-body::-webkit-scrollbar-track { background: transparent; }
.ann-body::-webkit-scrollbar-thumb { background: rgba(0,202,224,0.15); border-radius: 4px; }
/* Decorative dots */
.ann-dot {
  position: absolute;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: rgba(0,202,224,0.25);
  pointer-events: none;
  animation: annDotPulse 3s ease-in-out infinite;
}
@keyframes annDotPulse {
  0%,100% { opacity: 0.2; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.6); }
}
/* --- Version badge --- */
.ann-version-badge {
  display: inline-block;
  padding: 6px 20px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  color: #00cae0;
  background: rgba(0,202,224,0.08);
  border: 1px solid rgba(0,202,224,0.2);
  margin-bottom: 24px;
  letter-spacing: 0.5px;
}
/* --- Section --- */
.ann-section {
  margin-bottom: 24px;
}
.ann-section-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.ann-section-bar {
  width: 4px;
  height: 20px;
  border-radius: 2px;
  background: #00cae0;
  flex-shrink: 0;
}
.ann-section-title {
  font-size: 17px;
  font-weight: 800;
  color: #e2e8f0;
}
.ann-section-tag {
  padding: 2px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.ann-section-tag.tag-red { background: rgba(239,68,68,0.15); color: #ef4444; }
.ann-section-tag.tag-yellow { background: rgba(245,158,11,0.15); color: #f59e0b; }
.ann-section-tag.tag-cyan { background: rgba(0,202,224,0.12); color: #00cae0; }
.ann-section-tag.tag-green { background: rgba(16,185,129,0.15); color: #10b981; }
/* --- Content card --- */
.ann-card {
  background: rgba(14,36,68,0.7);
  border: 1px solid rgba(0,202,224,0.1);
  border-radius: 12px;
  padding: 20px;
  line-height: 1.8;
  font-size: 14px;
  color: rgba(255,255,255,0.75);
}
.ann-card p { margin: 0 0 10px; }
.ann-card p:last-child { margin-bottom: 0; }
.ann-card .ann-hl-red { color: #ef4444; font-weight: 700; }
.ann-card .ann-hl-cyan { color: #00cae0; font-weight: 600; }
.ann-card .ann-hl-bold { color: #e2e8f0; font-weight: 700; }
/* Nested inner card */
.ann-inner-card {
  background: rgba(12,30,53,0.6);
  border: 1px solid rgba(0,202,224,0.08);
  border-radius: 10px;
  padding: 16px;
  margin-top: 12px;
}
.ann-inner-card ol, .ann-inner-card ul {
  padding-left: 20px;
  margin: 8px 0 0;
  color: rgba(255,255,255,0.55);
}
.ann-inner-card li { margin-bottom: 6px; font-size: 13px; }
/* --- Footer nav --- */
.ann-footer {
  display: flex;
  gap: 0;
  padding: 0 32px 24px;
  border-top: 1px solid rgba(0,202,224,0.1);
  padding-top: 18px;
}
.ann-nav-btn {
  flex: 1;
  height: 44px;
  border: 1px solid rgba(0,202,224,0.12);
  background: rgba(0,202,224,0.04);
  color: rgba(255,255,255,0.55);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.25s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.ann-nav-btn:first-child { border-radius: 10px 0 0 10px; }
.ann-nav-btn:last-child { border-radius: 0 10px 10px 0; }
.ann-nav-btn:not(:last-child) { border-right: none; }
.ann-nav-btn:hover {
  background: rgba(0,202,224,0.1);
  color: #00cae0;
}
.ann-nav-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.ann-nav-btn:disabled:hover {
  background: rgba(0,202,224,0.04);
  color: rgba(255,255,255,0.55);
}
/* Empty state */
.ann-empty {
  text-align: center;
  padding: 60px 20px;
  color: rgba(255,255,255,0.25);
  font-size: 14px;
}
.ann-empty svg {
  width: 48px; height: 48px;
  color: rgba(255,255,255,0.1);
  margin-bottom: 16px;
}
@media (max-width: 640px) {
  #modalAnnouncement .modal-box { max-width: 98vw; }
  .ann-header { padding: 20px 20px 16px; }
  .ann-body { padding: 20px; }
  .ann-footer { padding: 0 20px 20px; padding-top: 14px; }
  .ann-section-title { font-size: 15px; }
  .ann-card { padding: 16px; font-size: 13px; }
}

/* ============ FEEDBACK MODAL ============ */
.feedback-form textarea {
  width: 100%;
  min-height: 120px;
  padding: 14px;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  outline: none;
  margin-bottom: 16px;
}
.feedback-form textarea::placeholder { color: rgba(255,255,255,0.25); }
.feedback-form textarea:focus { border-color: rgba(0,212,170,0.3); }

/* ============ SHARE REWARDS MODAL ============ */
.share-code-box {
  padding: 20px;
  border-radius: 12px;
  background: rgba(0,212,170,0.05);
  border: 1px solid rgba(0,212,170,0.15);
  text-align: center;
  margin-bottom: 20px;
}
.share-code {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 4px;
  color: #00d4aa;
  margin-bottom: 8px;
}
.share-link {
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  word-break: break-all;
}
.btn-copy-share {
  margin-top: 12px;
  padding: 8px 24px;
  border-radius: 8px;
  background: rgba(0,212,170,0.15);
  border: 1px solid rgba(0,212,170,0.3);
  color: #00d4aa;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.3s;
}
.btn-copy-share:hover { background: rgba(0,212,170,0.2); }

.share-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.share-stat {
  text-align: center;
  padding: 14px;
  border-radius: 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.04);
}
.share-stat .ss-value {
  font-size: 22px;
  font-weight: 900;
  color: #fff;
}
.share-stat .ss-label {
  font-size: 12px;
  color: rgba(255,255,255,0.35);
  margin-top: 2px;
}

/* ============ TOAST NOTIFICATION ============ */
.toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  z-index: 3000;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast.success {
  background: rgba(0,212,170,0.15);
  border: 1px solid rgba(0,212,170,0.3);
  color: #00d4aa;
}
.toast.error {
  background: rgba(239,68,68,0.15);
  border: 1px solid rgba(239,68,68,0.3);
  color: #ef4444;
}
.toast.info {
  background: rgba(14,165,233,0.15);
  border: 1px solid rgba(14,165,233,0.3);
  color: #0ea5e9;
}

/* ============ AGENT JOIN MODAL ============ */
.aj-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  padding: 16px 14px 12px;
  transition: all 0.25s;
}
.aj-card:hover {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.1);
  transform: translateY(-2px);
}
.aj-card-hl {
  border-color: rgba(251,191,36,0.35) !important;
  background: linear-gradient(135deg, rgba(249,115,22,0.08), rgba(139,92,246,0.06)) !important;
  box-shadow: 0 0 20px rgba(251,191,36,0.08);
}
.aj-icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}
.aj-title {
  font-size: 14px;
  font-weight: 700;
  color: #e2e8f0;
  margin-bottom: 5px;
}
.aj-desc {
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.5;
  margin-bottom: 10px;
}
.aj-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 6px;
  border: 1px solid;
  display: inline-block;
  background: rgba(0,0,0,0.15);
}
@keyframes ajPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}
.aj-pulse-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #f59e0b;
  animation: ajPulse 1.5s ease-in-out infinite;
  vertical-align: middle;
}
@media (max-width: 640px) {
  #ajCards { grid-template-columns: repeat(2, 1fr) !important; }
}


/* --- Recharge/Kami modal mobile compact --- */
@media (max-width: 768px) {
  #modalRecharge .modal-box {
    padding: 16px !important;
    max-width: 94vw !important;
    max-height: 94vh !important;
  }
  #modalRecharge .modal-close-btn {
    top: 10px !important;
    right: 10px !important;
    width: 28px !important;
    height: 28px !important;
    font-size: 16px !important;
  }
  #modalRecharge .modal-title {
    font-size: 18px !important;
    margin-bottom: 2px !important;
  }
  #modalRecharge .modal-subtitle {
    font-size: 11px !important;
    margin-bottom: 12px !important;
  }
  #modalRecharge .recharge-tabs {
    margin-bottom: 14px !important;
  }
  #modalRecharge .recharge-tab {
    padding: 8px 16px !important;
    font-size: 13px !important;
  }
  #modalRecharge .recharge-grid {
    display: flex !important;
    justify-content: center !important;
    gap: 12px !important;
    margin-bottom: 16px !important;
    flex-wrap: wrap !important;
  }
  #modalRecharge #kamiPlanGrid {
    max-width: 300px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  #modalRecharge #kamiPlanGrid .recharge-tier {
    flex: 1 1 120px !important;
    max-width: 144px !important;
    padding: 14px 10px !important;
    border-radius: 12px !important;
  }
  #modalRecharge #kamiDenomGrid .recharge-tier {
    flex: 0 0 auto !important;
    min-width: 80px !important;
    padding: 10px 8px !important;
    border-radius: 10px !important;
  }
  #modalRecharge .recharge-tier .tier-amount {
    font-size: 14px !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    letter-spacing: 0.5px !important;
  }
  #modalRecharge .modal-title {
    text-align: center !important;
  }
  #modalRecharge .modal-subtitle {
    text-align: center !important;
  }
  #modalRecharge .recharge-panel > div:first-child {
    text-align: center !important;
  }
  #modalRecharge #kamiAgentContact {
    text-align: center !important;
  }
  #modalRecharge .kami-input-group {
    margin-bottom: 12px !important;
  }
  #modalRecharge .kami-input {
    height: 38px !important;
    font-size: 13px !important;
    padding: 0 10px !important;
    border-radius: 8px !important;
    letter-spacing: 1px !important;
  }
  #modalRecharge .btn-recharge {
    height: 40px !important;
    font-size: 14px !important;
    border-radius: 10px !important;
  }
  #modalRecharge #kamiAgentContact {
    margin-top: 12px !important;
  }
}

/* === MOBILE ANTI-FLICKER: force 16px inputs === */
@media (max-width: 768px) {
  .kami-input {
    font-size: 16px !important;
  }
  .modal-overlay {
    align-items: flex-start !important;
    padding-top: 8vh !important;
  }
  .modal-box {
    margin-top: 0 !important;
  }
}
