/* ===== PROFILE MODAL ===== */
/* ===== PROFILE MODAL REDESIGN V2 (NO AVATAR, TYPO-HERO) ===== */
#profile-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

#profile-overlay.open {
  opacity: 1;
  pointer-events: all;
}

#profile-modal {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.02);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 0;
  transform: scale(0.96) translateY(8px);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

#profile-overlay.open #profile-modal {
  transform: scale(1) translateY(0);
}

.profile-header-typo {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  background: linear-gradient(to bottom right, #1e293b, #475569);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.profile-card-minimal {
  background: #fcfdfe;
  border: 1px solid #f1f5f9;
  border-radius: 12px;
  padding: 14px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.profile-card-minimal:hover {
  border-color: #006857;
  background: white;
  box-shadow: 0 10px 20px -10px rgba(0, 104, 87, 0.1);
}

.profile-stat-widget {
  padding: 16px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid #f1f5f9;
  text-align: center;
}

.profile-divider {
  height: 1px;
  background: #f1f5f9;
  width: 100%;
}

/* ===== SETTINGS PANEL ===== */
/* ===== SETTINGS MODAL REDESIGN (ARCHITECTURAL) ===== */
#settings-overlay {
  position: fixed;
  inset: 0;
  z-index: 9500;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

#settings-overlay.open {
  opacity: 1;
  pointer-events: all;
}

#settings-modal {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.02);
  width: 100%;
  max-width: 680px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.96) translateY(12px);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

#settings-overlay.open #settings-modal {
  transform: scale(1) translateY(0);
}

/* Modal Header */
.settings-header {
  padding: 20px 28px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  background: white;
  z-index: 10;
}

/* Modal Scrollable Body */
.settings-body {
  padding: 28px;
  overflow-y: auto;
  flex: 1;
}

.settings-body::-webkit-scrollbar {
  width: 4px;
}
.settings-body::-webkit-scrollbar-thumb {
  background: #e2e8f0;
  border-radius: 10px;
}

/* Section Groups */
.settings-section {
  margin-bottom: 40px;
}

.settings-section-title {
  font-size: 13px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 20px;
  padding-left: 4px;
}

/* Unified Control Surface */
.control-group {
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  border-radius: 16px;
  overflow: hidden;
}

.control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #f1f5f9;
}

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

.control-label-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.control-title {
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
}

.control-desc {
  font-size: 12px;
  color: #64748b;
}

/* Segmented Control (Pill Selector) */
.segmented-control {
  background: #e2e8f0;
  padding: 3px;
  border-radius: 10px;
  display: flex;
  gap: 2px;
}

.segmented-btn {
  padding: 6px 14px;
  border-radius: 8px;
  border: none;
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.segmented-btn:hover {
  color: #1e293b;
}

.segmented-btn.active {
  background: white;
  color: #006857;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* Visual Option Cards (Map) */
.visual-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.visual-option {
  cursor: pointer;
  position: relative;
}

.visual-preview {
  width: 100%;
  height: 60px;
  border-radius: 10px;
  border: 2px solid transparent;
  background-size: cover;
  background-position: center;
  margin-bottom: 8px;
  transition: all 0.2s;
}

.visual-option:hover .visual-preview {
  transform: translateY(-2px);
}

.visual-option.active .visual-preview {
  border-color: #006857;
  box-shadow: 0 0 0 3px rgba(0, 104, 87, 0.1);
}

.visual-label {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  text-align: center;
  display: block;
}

.visual-option.active .visual-label {
  color: #006857;
}

/* Unified detail modal overlay */
#nira-detail-modal {
  position: fixed;
  inset: 0;
  z-index: 19000;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
#nira-detail-modal.open {
  opacity: 1;
  pointer-events: all;
}
#nira-detail-modal-box {
  background: white;
  border-radius: 20px;
  width: 90%;
  max-width: 420px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 24px 60px rgba(0,0,0,0.25);
  transform: translateY(20px) scale(0.97);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
#nira-detail-modal.open #nira-detail-modal-box {
  transform: translateY(0) scale(1);
}
#nira-detail-modal-img {
  width: 100%;
  max-height: 240px;
  object-fit: cover;
  border-radius: 20px 20px 0 0;
  display: block;
}
#nira-detail-modal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.nira-detail-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: #334155;
}
.nira-detail-row .material-symbols-outlined {
  font-size: 16px;
  color: #94a3b8;
  flex-shrink: 0;
  margin-top: 1px;
}
.nira-detail-label {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #94a3b8;
}
.nira-detail-value {
  font-weight: 600;
  color: #0f172a;
}
