/* =======================================================
   Chicken Road 2 - Exact Profile & Management System Styles
   Matches user screenshots 100% + Full Submodal Support
   ======================================================= */

/* 1. Header Logo Alignment */
[class*="HeaderLogo"], [class*="header-logo"] {
  margin-left: 44px !important;
}

/* 2. Top-Left Profile Trigger Button */
.cr-profile-btn {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 10000;
  width: 34px;
  height: 33px;
  background: rgba(45, 47, 54, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  color: #ffffff;
}

.cr-profile-btn:hover {
  background: rgba(62, 66, 76, 1);
  border-color: rgba(255, 193, 7, 0.4);
  transform: scale(1.05);
}

.cr-profile-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* 3. Global Modal Overlay */
.profile-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 300000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  box-sizing: border-box;
}

.profile-modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

/* 4. Base White Card */
.profile-modal-card {
  background: #ffffff;
  border-radius: 24px;
  width: 360px;
  max-width: 94vw;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: #111111;
  transform: scale(0.95);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
  position: relative;
}

.profile-modal-overlay.open .profile-modal-card {
  transform: scale(1);
}

.profile-modal-card::-webkit-scrollbar {
  width: 4px;
}
.profile-modal-card::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 4px;
}

/* 5. Modal Header */
.pm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.pm-title {
  font-size: 21px;
  font-weight: 800;
  color: #111827;
  margin: 0;
  letter-spacing: -0.3px;
}

.pm-close-btn {
  background: transparent;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s;
  border-radius: 50%;
}

.pm-close-btn:hover {
  color: #111827;
  background: #f3f4f6;
}

.pm-close-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2.2;
}

/* 6. Profile User Details */
.pm-user-name {
  font-size: 20px;
  font-weight: 800;
  color: #111827;
  text-align: center;
  margin: 2px 0 2px 0;
}

.pm-user-id {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 13px;
  color: #6b7280;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s;
  padding: 2px 8px;
  border-radius: 6px;
  width: fit-content;
  margin: 0 auto;
}

.pm-user-id:hover {
  color: #111827;
  background: #f3f4f6;
}

.pm-user-id svg {
  width: 14px;
  height: 14px;
  fill: #6b7280;
}

/* 7. Account Balance & Actions Box */
.pm-account-box {
  background: #f4f5f7;
  border-radius: 16px;
  padding: 16px;
  margin: 14px 0;
}

.pm-account-label {
  font-size: 12px;
  color: #6b7280;
  font-weight: 600;
}

.pm-account-balance {
  font-size: 23px;
  font-weight: 800;
  color: #111827;
  margin: 4px 0 12px 0;
  letter-spacing: -0.2px;
}

.pm-account-btn-row {
  display: flex;
  gap: 10px;
}

.pm-btn-deposit {
  flex: 1;
  height: 42px;
  background: #00b74a;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s;
}

.pm-btn-deposit:hover {
  background: #00a342;
  box-shadow: 0 2px 8px rgba(0, 183, 74, 0.3);
}

.pm-btn-deposit:active {
  transform: scale(0.98);
}

.pm-btn-withdraw {
  flex: 1;
  height: 42px;
  background: #ffffff;
  color: #111827;
  border: none;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.pm-btn-withdraw:hover {
  background: #f9fafb;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.pm-btn-withdraw:active {
  transform: scale(0.98);
}

/* 8. Profile Menu Groups */
.pm-group {
  background: #f4f5f7;
  border-radius: 16px;
  margin-bottom: 12px;
  overflow: hidden;
}

.pm-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid #e5e7eb;
}

.pm-item:last-child {
  border-bottom: none;
}

.pm-item:hover {
  background: #eceef2;
}

.pm-item-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  flex-shrink: 0;
  position: relative;
}

.pm-item-icon svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.pm-item-dot {
  position: absolute;
  top: -1px;
  right: -1px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f97316;
}

.pm-item-content {
  display: flex;
  flex-direction: column;
}

.pm-item-title {
  font-size: 14.5px;
  font-weight: 700;
  color: #111827;
}

.pm-item-sub {
  font-size: 12px;
  color: #6b7280;
  font-weight: 500;
  margin-top: 1px;
}

/* 9. Back to Profile and Action Buttons */
.pm-back-btn, .tx-appeal-btn {
  background: #f4f5f7;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  width: 100%;
  height: 42px;
  font-weight: 700;
  font-size: 13.5px;
  color: #111827;
  cursor: pointer;
  margin: 10px 0 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s;
}

.pm-back-btn:hover, .tx-appeal-btn:hover {
  background: #e5e7eb;
  color: #000000;
}

.pm-back-btn:active, .tx-appeal-btn:active {
  transform: scale(0.98);
}

/* 10. Deposit View */
.dp-tabs-pill {
  display: flex;
  background: #f3f4f6;
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 14px;
}

.dp-tab-btn {
  flex: 1;
  padding: 9px;
  border-radius: 10px;
  border: none;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  background: transparent;
  color: #6b7280;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s;
}

.dp-tab-btn.active {
  background: #ffffff;
  color: #111827;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.dp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}

.dp-tile {
  background: #f4f5f7;
  border-radius: 14px;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all 0.18s;
  position: relative;
}

.dp-tile:hover {
  background: #eef0f4;
  border-color: #cbd5e1;
}

.dp-tile.active {
  border-color: #0073f7;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 115, 247, 0.15);
}

.dp-tile-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #0073f7;
  color: #ffffff;
  font-size: 9px;
  font-weight: 900;
  padding: 1px 5px;
  border-radius: 4px;
}

.dp-tile-name {
  font-size: 12.5px;
  font-weight: 700;
  color: #111827;
  margin-top: 6px;
}

/* Payment drawer inside deposit */
.dp-pay-drawer {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 14px;
  margin-top: 12px;
}

.dp-amount-chips {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 10px 0;
}

.dp-chip-btn {
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 7px 4px;
  font-size: 12.5px;
  font-weight: 700;
  color: #111827;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
}

.dp-chip-btn.active, .dp-chip-btn:hover {
  border-color: #00b74a;
  background: #e8f7ee;
  color: #008736;
}

/* 11. Transaction History View */
.tx-tabs-pill {
  display: flex;
  background: #f3f4f6;
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 14px;
}

.tx-tab-btn {
  flex: 1;
  padding: 9px;
  border-radius: 10px;
  border: none;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  background: transparent;
  color: #6b7280;
  transition: all 0.15s;
  text-align: center;
}

.tx-tab-btn.active {
  background: #ffffff;
  color: #111827;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.tx-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #f3f4f6;
}

.tx-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tx-logo {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 11px;
  color: #ffffff;
}

.tx-title {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
}

.tx-status-row {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  margin-top: 2px;
}

.tx-status-canceled {
  color: #6b7280;
}

.tx-status-success {
  color: #00b74a;
  font-weight: 600;
}

.tx-status-pending {
  color: #f59e0b;
  font-weight: 600;
}

.tx-right {
  text-align: right;
}

.tx-amount {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
}

.tx-amount.canceled {
  text-decoration: line-through;
  color: #6b7280;
}

.tx-date {
  font-size: 11px;
  color: #9ca3af;
  margin-top: 2px;
}

/* 12. Settings View */
.st-section-title {
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
  margin: 12px 0 6px 4px;
}

.st-group {
  background: #f4f5f7;
  border-radius: 16px;
  padding: 0 14px;
}

.st-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 0;
  border-bottom: 1px solid #e5e7eb;
  font-size: 13.5px;
  cursor: pointer;
  transition: opacity 0.15s;
}

.st-row:hover {
  opacity: 0.85;
}

.st-row:last-child {
  border-bottom: none;
}

.st-label {
  font-weight: 700;
  color: #111827;
}

.st-val {
  color: #6b7280;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

.st-hint {
  font-size: 11px;
  color: #f97316;
  margin: 4px 0 8px 4px;
  font-weight: 600;
}

.st-hint.blue {
  color: #6b7280;
}

.st-hint.blue a {
  color: #0073f7;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
}

.st-btn-end {
  color: #ea580c;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  background: #ffedd5;
  padding: 4px 10px;
  border-radius: 6px;
}

.st-btn-logout {
  width: 100%;
  height: 44px;
  background: #fff1f2;
  color: #e11d48;
  border: none;
  border-radius: 12px;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 16px;
  transition: all 0.15s;
}

.st-btn-logout:hover {
  background: #ffe4e6;
}

/* 13. Live Support & Chat Component */
.support-chat-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  height: 220px;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

.chat-bubble {
  max-width: 80%;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 12.5px;
  line-height: 1.4;
}

.chat-bubble.bot {
  background: #ffffff;
  color: #1e293b;
  border: 1px solid #e2e8f0;
  align-self: flex-start;
  border-bottom-left-radius: 2px;
}

.chat-bubble.user {
  background: #0073f7;
  color: #ffffff;
  align-self: flex-end;
  border-bottom-right-radius: 2px;
}

/* 14. In-App Floating Toast Notification */
.cr-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #111827;
  color: #ffffff;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
  z-index: 500000;
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.cr-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.cr-toast.success {
  background: #00b74a;
}

.cr-toast.error {
  background: #e11d48;
}
