/* ========================================
   Meeting Module — Complete Redesign
   Grey-white minimalist · Line icons · Card-based
   ======================================== */

/* ══════════════════════════════════════════
   Section Label
   ══════════════════════════════════════════ */
.mtg-section-label {
  font-size: 11px;
  font-weight: 600;
  color: #aeaeb2;
  text-transform: uppercase;
  letter-spacing: .6px;
  padding: 26px 20px 8px;
  margin: 0;
}

/* ══════════════════════════════════════════
   Group Header (Continue / IF sections)
   ══════════════════════════════════════════ */
.mtg-group-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 24px 20px 10px;
  font-size: 11px;
  font-weight: 600;
  color: #aeaeb2;
  text-transform: uppercase;
  letter-spacing: .6px;
}

.mtg-group-header svg {
  width: 14px;
  height: 14px;
  stroke: #aeaeb2;
  fill: none;
  stroke-width: 1.5;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════
   Form Card (Settings / New Archive)
   ══════════════════════════════════════════ */
.mtg-form-card {
  margin: 0 16px;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #e8e8ed;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}

.mtg-form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 18px;
  min-height: 48px;
}

.mtg-form-col {
  padding: 16px 18px;
}

.mtg-form-sublabel {
  font-size: 12px;
  color: #86868b;
  font-weight: 500;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: .3px;
}

.mtg-form-label {
  font-size: 15px;
  font-weight: 400;
  color: #1d1d1f;
  flex-shrink: 0;
  margin-right: 16px;
}

.mtg-form-divider {
  height: 1px;
  background: #f2f2f7;
  margin: 0 18px;
}

.mtg-form-input {
  width: 100%;
  padding: 0;
  font-size: 15px;
  color: #1d1d1f;
  background: transparent;
  border: none;
  outline: none;
  font-family: inherit;
  box-sizing: border-box;
}
.mtg-form-input::placeholder {
  color: #c7c7cc;
}

.mtg-form-num {
  width: 64px;
  text-align: right;
  font-size: 15px;
  font-weight: 500;
  color: #1d1d1f;
  background: transparent;
  border: none;
  outline: none;
  padding: 0;
  font-family: inherit;
  -moz-appearance: textfield;
}
.mtg-form-num::-webkit-inner-spin-button,
.mtg-form-num::-webkit-outer-spin-button {
  opacity: 1;
}

.mtg-form-textarea {
  width: 100%;
  padding: 0;
  font-size: 14px;
  color: #1d1d1f;
  background: transparent;
  border: none;
  outline: none;
  font-family: inherit;
  resize: vertical;
  min-height: 80px;
  line-height: 1.55;
  box-sizing: border-box;
}
.mtg-form-textarea::placeholder {
  color: #c7c7cc;
}

.mtg-form-actions {
  padding: 24px 16px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}


/* ══════════════════════════════════════════
   Buttons
   ══════════════════════════════════════════ */
.mtg-primary-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 15px 0;
  background: #1d1d1f;
  color: #fff;
  border: none;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  gap: 6px;
  -webkit-tap-highlight-color: transparent;
  transition: opacity .15s;
  letter-spacing: .1px;
}
.mtg-primary-btn:active {
  opacity: .72;
}

.mtg-secondary-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 15px 0;
  background: #f5f5f7;
  color: #636366;
  border: 1px solid #e8e8ed;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: opacity .15s;
}
.mtg-secondary-btn:active {
  opacity: .72;
}


/* ══════════════════════════════════════════
   Segmented Control
   ══════════════════════════════════════════ */
.mtg-seg {
  display: flex;
  background: #ebebf0;
  border-radius: 9px;
  padding: 3px;
}

.mtg-seg-opt {
  flex: 1;
  padding: 7px 0;
  text-align: center;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 500;
  color: #86868b;
  cursor: pointer;
  transition: all .18s ease;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.mtg-seg-opt.active {
  background: #fff;
  color: #1d1d1f;
  box-shadow: 0 1px 4px rgba(0,0,0,.10), 0 0 0 .5px rgba(0,0,0,.04);
}


/* ══════════════════════════════════════════
   Toggle Switch
   ══════════════════════════════════════════ */
.mtg-toggle {
  position: relative;
  width: 51px;
  height: 31px;
  min-width: 51px;
  background: #e5e5ea;
  border-radius: 15.5px;
  cursor: pointer;
  transition: background .25s ease;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.mtg-toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 27px;
  height: 27px;
  background: #fff;
  border-radius: 50%;
  transition: transform .25s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,.12), 0 1px 2px rgba(0,0,0,.06);
}

.mtg-toggle.active {
  background: #34aadc;
}

.mtg-toggle.active::after {
  transform: translateX(20px);
}


/* ══════════════════════════════════════════
   Character Select List
   ══════════════════════════════════════════ */
.mtg-char-select-list {
  max-height: 240px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.mtg-char-select-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  transition: background .12s;
}
.mtg-char-select-item:active {
  background: #f9f9fb;
}

.mtg-char-select-item + .mtg-char-select-item {
  border-top: 1px solid #f0f0f5;
}

.mtg-char-select-item input[type="checkbox"] {
  display: none;
}

.mtg-char-select-check {
  width: 22px;
  height: 22px;
  border: 2px solid #d1d1d6;
  border-radius: 6px;
  flex-shrink: 0;
  position: relative;
  transition: all .15s ease;
}

.mtg-char-select-item input:checked + .mtg-char-select-check {
  background: #1d1d1f;
  border-color: #1d1d1f;
}

.mtg-char-select-item input:checked + .mtg-char-select-check::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 6px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.mtg-char-select-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f0f0f5;
  flex-shrink: 0;
  object-fit: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.mtg-char-select-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mtg-char-select-name {
  font-size: 15px;
  color: #1d1d1f;
  font-weight: 400;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mtg-char-empty-msg {
  text-align: center;
  padding: 24px 16px;
  color: #86868b;
  font-size: 14px;
}

.mtg-if-only {
  transition: max-height .3s ease, opacity .3s ease;
  overflow: hidden;
}


/* ══════════════════════════════════════════
   Archive Card (Main + Manage pages)
   ══════════════════════════════════════════ */
.mtg-archive-card {
  background: #fff;
  border: 1px solid #e8e8ed;
  border-radius: 14px;
  margin: 0 16px 10px;
  overflow: hidden;
  transition: transform .12s, box-shadow .12s;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
}

.mtg-archive-card-body {
  padding: 18px 18px 14px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background .12s;
}
.mtg-archive-card-body:active {
  background: #fafafc;
}

.mtg-archive-card-name {
  font-size: 16px;
  font-weight: 600;
  color: #1d1d1f;
  line-height: 1.3;
  margin-bottom: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: -.1px;
}

.mtg-archive-card-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.mtg-archive-info-row {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: #aeaeb2;
}

.mtg-archive-info-row svg {
  width: 14px;
  height: 14px;
  stroke: #aeaeb2;
  fill: none;
  stroke-width: 1.3;
  flex-shrink: 0;
}

.mtg-archive-actions {
  display: flex;
  border-top: 1px solid #f2f2f7;
}

.mtg-archive-action-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 11px 0;
  background: none;
  border: none;
  font-size: 12px;
  font-weight: 500;
  color: #aeaeb2;
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background .12s, color .12s;
}
.mtg-archive-action-btn:active {
  background: #f5f5f7;
  color: #636366;
}
.mtg-archive-action-btn + .mtg-archive-action-btn {
  border-left: 1px solid #f2f2f7;
}
.mtg-archive-action-btn svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}


/* ── Empty State ── */
.mtg-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 72px 20px 60px;
  color: #c7c7cc;
}

.mtg-empty-state svg {
  margin-bottom: 16px;
}

.mtg-empty-state-title {
  font-size: 15px;
  font-weight: 500;
  color: #c7c7cc;
  margin-bottom: 6px;
}

.mtg-empty-state-sub {
  font-size: 12.5px;
  color: #d1d1d6;
}


/* ══════════════════════════════════════════
   Chat Screen — Nav Center
   ══════════════════════════════════════════ */
.mtg-write-nav-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  min-width: 0;
}

.mtg-write-nav-name {
  font-size: 15px;
  font-weight: 600;
  color: #1d1d1f;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 160px;
  letter-spacing: -.1px;
}

.mtg-write-nav-char {
  font-size: 11px;
  color: #aeaeb2;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 160px;
  margin-top: 1px;
}


/* ══════════════════════════════════════════
   Chat Screen — Message Area
   ══════════════════════════════════════════ */
.mtg-chat-scroll {
  padding-bottom: 80px !important;
  background: #f0f0f5;
}

.mtg-chat-content {
  padding: 14px 0;
}


/* ── Message Card ── */
.mtg-msg-card {
  margin: 0 14px 8px;
  background: #fff;
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 14px;
  overflow: hidden;
  transition: opacity .2s, transform .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.05), 0 0 0 .5px rgba(0,0,0,.03);
}

.mtg-msg-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 15px 0;
}

.mtg-msg-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f0f0f5;
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mtg-msg-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mtg-msg-avatar-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e8e8ed;
  border-radius: 50%;
}

.mtg-msg-avatar-placeholder svg {
  width: 18px;
  height: 18px;
  stroke: #aeaeb2;
  fill: none;
  stroke-width: 1.5;
}

.mtg-msg-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.mtg-msg-sender {
  font-size: 13px;
  font-weight: 600;
  color: #1d1d1f;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: -.1px;
}

.mtg-msg-time {
  font-size: 10.5px;
  color: #d1d1d6;
  font-weight: 400;
  flex-shrink: 0;
  margin-left: 8px;
  letter-spacing: .1px;
}

.mtg-msg-body {
  padding: 7px 15px 15px;
  padding-left: 57px;
  font-size: 14.5px;
  line-height: 1.7;
  color: #1d1d1f;
  white-space: pre-wrap;
  word-break: break-word;
}

.mtg-msg-actions {
  display: flex;
  border-top: 1px solid #f2f2f7;
}

.mtg-msg-action-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 10px 0;
  background: none;
  border: none;
  font-size: 11.5px;
  font-weight: 500;
  color: #aeaeb2;
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background .12s, color .12s;
}
.mtg-msg-action-btn:active {
  background: rgba(0,0,0,.03);
  color: #636366;
}
.mtg-msg-action-btn + .mtg-msg-action-btn {
  border-left: 1px solid #f2f2f7;
}
.mtg-msg-action-btn svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}


/* ── System message card ── */
.mtg-msg-card-system {
  background: #fafafc;
  border: 1px dashed #e0e0e5;
  box-shadow: none;
}

.mtg-msg-card-system .mtg-msg-sender {
  color: #aeaeb2;
  font-weight: 500;
}

.mtg-msg-card-system .mtg-msg-body {
  color: #636366;
  font-size: 13.5px;
}


/* ── Summary card ── */
.mtg-summary-card {
  margin: 4px 14px 8px;
  padding: 13px 15px;
  background: #fafafc;
  border: 1px dashed #e0e0e5;
  border-radius: 12px;
}

.mtg-summary-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  font-weight: 600;
  color: #c7c7cc;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 7px;
}

.mtg-summary-text {
  font-size: 13px;
  color: #86868b;
  line-height: 1.55;
}


/* ── Typing indicator ── */
.mtg-typing-indicator {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 18px 16px;
  margin: 0 14px 8px;
  background: #fff;
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
}

.mtg-typing-indicator span {
  width: 6px;
  height: 6px;
  background: #c7c7cc;
  border-radius: 50%;
  animation: mtgDotPulse 1.2s infinite ease-in-out;
}
.mtg-typing-indicator span:nth-child(2) { animation-delay: .2s; }
.mtg-typing-indicator span:nth-child(3) { animation-delay: .4s; }

@keyframes mtgDotPulse {
  0%, 80%, 100% { opacity: .3; transform: scale(.8); }
  40% { opacity: 1; transform: scale(1); }
}


/* ── Empty chat state ── */
.mtg-chat-empty {
  text-align: center;
  padding: 60px 20px;
  color: #c7c7cc;
}

.mtg-chat-empty svg {
  display: block;
  margin: 0 auto 14px;
}

.mtg-chat-empty-text {
  font-size: 14px;
  color: #aeaeb2;
}


/* ══════════════════════════════════════════
   Chat Bottom Bar
   ══════════════════════════════════════════ */
.mtg-chat-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255,255,255,.97);
  border-top: 1px solid #e8e8ed;
  z-index: 10;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.mtg-chat-bar-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 10px 14px;
  padding-bottom: max(10px, env(safe-area-inset-bottom));
}

.mtg-chat-input {
  flex: 1;
  padding: 10px 16px;
  font-size: 15px;
  color: #1d1d1f;
  background: #f5f5f7;
  border: 1.5px solid transparent;
  border-radius: 22px;
  outline: none;
  font-family: inherit;
  resize: none;
  max-height: 100px;
  line-height: 1.45;
  box-sizing: border-box;
  transition: border-color .18s, background .18s;
}
.mtg-chat-input:focus {
  background: #fff;
  border-color: #d1d1d6;
  box-shadow: 0 0 0 3px rgba(0,0,0,.04);
}
.mtg-chat-input::placeholder {
  color: #c7c7cc;
}

.mtg-chat-send {
  width: 34px;
  height: 34px;
  border: none;
  background: #1d1d1f;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  transition: opacity .15s, transform .15s;
}
.mtg-chat-send:active { opacity: .72; transform: scale(.93); }
.mtg-chat-send:disabled { opacity: .18; pointer-events: none; }

/* ── Edit banner ── */
.mtg-edit-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 18px;
  background: #f5f5f7;
  border-bottom: 1px solid #ebebf0;
  font-size: 11.5px;
  font-weight: 500;
  color: #aeaeb2;
}

.mtg-edit-banner-info {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mtg-edit-banner-cancel {
  background: none;
  border: none;
  color: #636366;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  padding: 4px 10px;
  border-radius: 6px;
  -webkit-tap-highlight-color: transparent;
}
.mtg-edit-banner-cancel:active {
  background: #e8e8ed;
}


/* ══════════════════════════════════════════
   Memory Card (Settings page)
   ══════════════════════════════════════════ */
.mtg-mem-card {
  margin: 0 16px 8px;
  background: #fff;
  border: 1px solid #e8e8ed;
  border-radius: 14px;
  padding: 15px 18px;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}

.mtg-mem-round {
  font-size: 10.5px;
  font-weight: 600;
  color: #c7c7cc;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 7px;
}

.mtg-mem-text {
  font-size: 13.5px;
  color: #1d1d1f;
  line-height: 1.6;
}


/* ══════════════════════════════════════════
   End Session Modal
   ══════════════════════════════════════════ */
.mtg-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.32);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: mtgFadeIn .2s ease;
}

@keyframes mtgFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.mtg-modal {
  background: #fff;
  border-radius: 16px;
  width: calc(100% - 48px);
  max-width: 320px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0,0,0,.14), 0 2px 8px rgba(0,0,0,.06);
  animation: mtgSlideUp .25s ease;
}

@keyframes mtgSlideUp {
  from { opacity: 0; transform: translateY(12px) scale(.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.mtg-modal-icon {
  display: flex;
  justify-content: center;
  padding: 20px 0 0;
}

.mtg-modal-title {
  font-size: 16px;
  font-weight: 700;
  color: #1d1d1f;
  text-align: center;
  padding: 14px 24px 0;
  letter-spacing: -.1px;
}

.mtg-modal-body {
  padding: 10px 24px 20px;
  text-align: center;
}

.mtg-modal-body p {
  font-size: 13px;
  color: #636366;
  line-height: 1.6;
  margin: 0 0 6px;
}
.mtg-modal-body p:last-child { margin-bottom: 0; }
.mtg-modal-sub {
  color: #aeaeb2 !important;
  font-size: 12px !important;
}

.mtg-modal-btns {
  border-top: 1px solid #f0f0f5;
}

.mtg-modal-btn {
  display: block;
  width: 100%;
  padding: 14px 16px;
  border: none;
  background: none;
  font-size: 15px;
  font-family: inherit;
  cursor: pointer;
  text-align: center;
  transition: background .12s;
  -webkit-tap-highlight-color: transparent;
  border-bottom: 1px solid #f0f0f5;
}
.mtg-modal-btn:last-child { border-bottom: none; }
.mtg-modal-btn:active { background: #f5f5f7; }

.mtg-modal-btn-primary {
  color: #1d1d1f;
  font-weight: 600;
}
.mtg-modal-btn-secondary {
  color: #636366;
  font-weight: 500;
}
.mtg-modal-btn-cancel {
  color: #86868b;
  font-weight: 400;
}


/* ══════════════════════════════════════════
   Manage Page — Archive Card (simplified)
   ══════════════════════════════════════════ */
.mtg-manage-card {
  background: #fff;
  border: 1px solid #e8e8ed;
  border-radius: 14px;
  margin: 0 16px 10px;
  padding: 18px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
}

.mtg-manage-card-name {
  font-size: 16px;
  font-weight: 600;
  color: #1d1d1f;
  margin-bottom: 9px;
  line-height: 1.3;
  letter-spacing: -.1px;
}

.mtg-manage-card-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.mtg-manage-info-row {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: #aeaeb2;
}

.mtg-manage-info-row svg {
  width: 14px;
  height: 14px;
  stroke: #aeaeb2;
  fill: none;
  stroke-width: 1.3;
  flex-shrink: 0;
}


/* ══════════════════════════════════════════
   Status Tags
   ══════════════════════════════════════════ */
.mtg-status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: 4px;
}

.mtg-status-dot-active {
  background: #86868b;
}

.mtg-status-dot-ended {
  background: #c7c7cc;
}
/* ══════════════════════════════════════════
   ★★★ NEW: Secondary Panel Button (Archive) ★★★
   ══════════════════════════════════════════ */
.mtg-panel-secondary-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 15px 0;
  background: #f5f5f7;
  color: #636366;
  border: 1px solid #e8e8ed;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  gap: 6px;
  -webkit-tap-highlight-color: transparent;
  transition: opacity .15s, background .15s;
}
.mtg-panel-secondary-btn:active {
  opacity: .72;
  background: #ebebed;
}
.mtg-panel-secondary-btn.mtg-btn-pressed {
  background: #e0e0e2;
  transition: background .08s;
}

/* ══════════════════════════════════════════
   Panel Components (Settings / Manage pages)
   ══════════════════════════════════════════ */
.mtg-panel-section-hdr {
  font-size: 11px;
  font-weight: 600;
  color: #aeaeb2;
  text-transform: uppercase;
  letter-spacing: .6px;
  padding: 26px 20px 8px;
  margin: 0;
}

.mtg-panel-card {
  margin: 0 16px;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #e8e8ed;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}

.mtg-panel-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 18px;
  min-height: 48px;
}

.mtg-panel-col-row {
  padding: 16px 18px;
}

.mtg-panel-divider {
  height: 1px;
  background: #f2f2f7;
  margin: 0 18px;
}

.mtg-panel-label {
  font-size: 15px;
  font-weight: 400;
  color: #1d1d1f;
  flex-shrink: 0;
  margin-right: 16px;
}

.mtg-panel-sublabel {
  font-size: 11px;
  font-weight: 600;
  color: #aeaeb2;
  text-transform: uppercase;
  letter-spacing: .4px;
  margin-bottom: 10px;
}

.mtg-panel-num {
  width: 64px;
  text-align: right;
  font-size: 15px;
  font-weight: 500;
  color: #1d1d1f;
  background: transparent;
  border: none;
  outline: none;
  padding: 0;
  font-family: inherit;
  -moz-appearance: textfield;
}
.mtg-panel-num::-webkit-inner-spin-button,
.mtg-panel-num::-webkit-outer-spin-button {
  opacity: 1;
}

.mtg-panel-text-input {
  width: 100%;
  padding: 0;
  font-size: 15px;
  color: #1d1d1f;
  background: transparent;
  border: none;
  outline: none;
  font-family: inherit;
  box-sizing: border-box;
}
.mtg-panel-text-input::placeholder {
  color: #c7c7cc;
}

.mtg-panel-textarea {
  width: 100%;
  padding: 0;
  font-size: 14px;
  color: #1d1d1f;
  background: transparent;
  border: none;
  outline: none;
  font-family: inherit;
  resize: vertical;
  min-height: 80px;
  line-height: 1.6;
  box-sizing: border-box;
}
.mtg-panel-textarea::placeholder {
  color: #c7c7cc;
}

.mtg-panel-primary-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 15px 0;
  background: #1d1d1f;
  color: #fff;
  border: none;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  gap: 6px;
  -webkit-tap-highlight-color: transparent;
  transition: opacity .15s;
  letter-spacing: .1px;
}
.mtg-panel-primary-btn:active {
  opacity: .72;
}

/* ══════════════════════════════════════════
   Toggle label column (label + hint stacked)
   ══════════════════════════════════════════ */
.mtg-toggle-label-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
  margin-right: 12px;
}

.mtg-panel-hint {
  font-size: 12px;
  color: #86868b;
  font-weight: 400;
  line-height: 1.4;
}
