/* ==========================================================
   REN AI (蓮・連) — ChatGPT Theme Engine
   PT Azvera Technology Indonesia
   Clean, Fluid, Ultra-modern Conversational AI Interface
   ========================================================== */

:root {
  /* ChatGPT Exact Color Palette */
  --bg-canvas: #212121;
  --bg-sidebar: #171717;
  --bg-surface: #2f2f2f;
  --bg-surface-hover: #383838;
  --bg-surface-active: #424242;
  --bg-code: #0d0d0d;
  --bg-code-header: #1e1e1e;
  
  --border-light: rgba(255, 255, 255, 0.08);
  --border-subtle: rgba(255, 255, 255, 0.12);
  --border-focus: rgba(255, 255, 255, 0.24);
  
  --text-primary: #ececec;
  --text-secondary: #b4b4b4;
  --text-muted: #8e8e8e;
  --text-inverted: #0d0d0d;
  
  --accent-pink: #ec4899;
  --accent-purple: #a855f7;
  --accent-blue: #3b82f6;
  
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'Fira Code', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  
  --sidebar-width: 260px;
  --header-height: 56px;
  --chat-max-width: 768px;
  --transition-smooth: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  width: 100%;
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  font-family: var(--font-sans);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================
   Root Application Layout
   ========================================================== */
.app-container {
  display: flex;
  height: 100vh;
  width: 100vw;
  position: relative;
  overflow: hidden;
  background-color: var(--bg-canvas);
}

/* ==========================================================
   ChatGPT Sidebar
   ========================================================== */
.sidebar {
  width: var(--sidebar-width);
  height: 100%;
  background-color: var(--bg-sidebar);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), margin-left 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 40;
  border-right: 1px solid rgba(255, 255, 255, 0.04);
}

.sidebar.collapsed {
  margin-left: calc(-1 * var(--sidebar-width));
}

/* Sidebar Top Bar */
.sidebar-top {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.brand-avatar {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-lotus-icon {
  width: 28px;
  height: 28px;
}

.brand-text {
  display: flex;
  align-items: center;
  gap: 6px;
}

.brand-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.brand-badge {
  font-size: 0.65rem;
  font-weight: 700;
  background: rgba(236, 72, 153, 0.15);
  color: var(--accent-pink);
  border: 1px solid rgba(236, 72, 153, 0.3);
  padding: 1px 6px;
  border-radius: 4px;
}

.sidebar-top-actions {
  display: flex;
  align-items: center;
  gap: 2px;
}

.sidebar-icon-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.sidebar-icon-btn:hover {
  background: var(--bg-surface);
  color: var(--text-primary);
}

/* Sidebar New Chat Button (ChatGPT Pill: Obrolan baru) */
.sidebar-new-chat-wrapper {
  padding: 4px 12px 8px 12px;
}

.chatgpt-new-chat-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 9px 14px;
  border-radius: 20px;
  background: transparent;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: var(--transition-smooth);
  cursor: pointer;
}

.chatgpt-new-chat-btn:hover {
  background: var(--bg-surface);
  border-color: rgba(255, 255, 255, 0.16);
}

.new-chat-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.kbd-hint {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 6px;
  border-radius: 4px;
}

/* ChatGPT Sidebar Sections (Terbaru) */
.sidebar-section-block {
  padding: 2px 12px 4px 12px;
}

.sidebar-section-heading {
  padding: 4px 8px;
}

.sidebar-section-title {
  font-size: 0.72rem;
  font-weight: 600;
  color: #71717a;
  letter-spacing: 0.4px;
}

.sidebar-section-block.recent-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-bottom: 0;
}

/* ==========================================================
   Sidebar Search Box (ChatGPT Filter)
   ========================================================== */
.sidebar-search-wrapper {
  padding: 0 12px 10px 12px;
}

.sidebar-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #212121;
  border: 1px solid #333333;
  border-radius: 8px;
  padding: 6px 10px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.sidebar-search-box:focus-within {
  border-color: #52525b;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.05);
}

.sidebar-search-box .search-icon {
  color: #71717a;
  flex-shrink: 0;
}

.sidebar-search-box input {
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-size: 0.82rem;
  width: 100%;
  font-family: inherit;
}

.sidebar-search-box input::placeholder {
  color: #71717a;
}

.search-clear-btn {
  background: transparent;
  border: none;
  color: #a1a1aa;
  cursor: pointer;
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.search-clear-btn:hover {
  color: #ffffff;
}

/* ==========================================================
   Chat History List (Chronological Groups)
   ========================================================== */
.sidebar-history-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 4px 8px;
  display: flex;
  flex-direction: column;
}

.sidebar-history-scroll::-webkit-scrollbar {
  width: 4px;
}
.sidebar-history-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.history-group-section {
  margin-bottom: 14px;
}

.history-group-header {
  padding: 8px 10px 4px 10px;
}

.history-group-title {
  font-size: 0.7rem;
  font-weight: 600;
  color: #71717a;
  letter-spacing: 0.4px;
}

.sessions-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.empty-sessions-chatgpt {
  padding: 28px 14px;
  text-align: center;
  color: var(--text-muted);
}

.guest-empty-state {
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 20px 14px;
  margin: 8px 4px;
}

.empty-icon-capsule {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #212121;
  color: #10a37f;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px auto;
}

.empty-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 4px;
}

.empty-desc {
  font-size: 0.76rem;
  color: #8e8e8e;
  line-height: 1.4;
  margin-bottom: 12px;
}

.empty-login-btn {
  background: #10a37f;
  color: #ffffff;
  border: none;
  border-radius: 7px;
  padding: 7px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

.empty-login-btn:hover {
  background: #0d8c6d;
}

/* ==========================================================
   Session Items & Context Menu
   ========================================================== */
.session-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 8px;
  padding: 0 4px 0 8px;
  position: relative;
  height: 36px;
  transition: background-color 0.12s ease;
}

.session-item-row:hover {
  background-color: #212121;
}

.session-item-row.active {
  background-color: #262626;
}

.session-item-link {
  flex: 1;
  text-decoration: none;
  color: #d1d5db;
  font-size: 0.84rem;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  display: block;
  line-height: 36px;
}

.session-item-row.active .session-item-link,
.session-item-row:hover .session-item-link {
  color: #ffffff;
}

.session-item-actions {
  display: flex;
  align-items: center;
  position: relative;
}

.session-menu-trigger {
  background: transparent;
  border: none;
  color: #71717a;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition: all 0.12s ease;
}

.session-item-row:hover .session-menu-trigger,
.session-item-row.active .session-menu-trigger,
.session-menu-trigger.active {
  display: flex;
}

.session-menu-trigger:hover,
.session-menu-trigger.active {
  background: #2f2f2f;
  color: #ffffff;
}

/* Floating Context Dropdown */
.session-dropdown {
  position: absolute;
  top: 30px;
  right: 0;
  background: #212121;
  border: 1px solid #383838;
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.65), 0 0 1px 1px rgba(255, 255, 255, 0.05);
  z-index: 100;
  min-width: 140px;
  padding: 5px;
  display: none;
  flex-direction: column;
  gap: 2px;
  animation: dropdownFadeIn 0.12s cubic-bezier(0.16, 1, 0.3, 1);
}

.session-dropdown.open {
  display: flex;
}

@keyframes dropdownFadeIn {
  from { opacity: 0; transform: translateY(-4px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.session-dropdown-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: #d1d5db;
  font-size: 0.82rem;
  font-weight: 400;
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: background 0.12s ease, color 0.12s ease;
}

.session-dropdown-item:hover {
  background: #2f2f2f;
  color: #ffffff;
}

.session-dropdown-item.delete-action {
  color: #f87171;
}

.session-dropdown-item.delete-action:hover {
  background: rgba(239, 68, 68, 0.14);
  color: #ef4444;
}

.dropdown-divider {
  height: 1px;
  background: #2f2f2f;
  margin: 3px 0;
}

/* ==========================================================
   Sidebar User Footer (ChatGPT Member & Guest Layouts)
   ========================================================== */
.sidebar-user-footer {
  padding: 10px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
}

/* Guest Promo Card (Authentic ChatGPT Image 2 Style) */
.sidebar-guest-card-chatgpt {
  background: #212121;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.guest-card-headline {
  font-size: 0.86rem;
  font-weight: 600;
  color: #f3f4f6;
  line-height: 1.35;
  margin-bottom: 6px;
}

.guest-card-caption {
  font-size: 0.74rem;
  color: #9ca3af;
  line-height: 1.4;
  margin-bottom: 12px;
}

.guest-card-cta-btn {
  background: #ffffff;
  color: #000000;
  border: none;
  border-radius: 9999px;
  padding: 8px 16px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  width: 100%;
  text-align: center;
}

.guest-card-cta-btn:hover {
  background: #e5e5e5;
  transform: translateY(-1px);
}

/* Member Profile Bar Container */
.user-profile-menu-container {
  position: relative;
  width: 100%;
}

.user-profile-card {
  width: 100%;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  transition: background 0.12s ease;
}

.user-profile-card:hover,
.user-profile-card.active {
  background: #212121;
}

.user-avatar-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ec4899, #8b5cf6);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.user-avatar-circle.sm {
  width: 28px;
  height: 28px;
  font-size: 0.78rem;
}

.user-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.user-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
}

.user-plan-label,
.user-company {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-dots-icon {
  color: #71717a;
  flex-shrink: 0;
}

/* Authentic ChatGPT Profile Popover Menu */
.chatgpt-profile-popover {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #212121;
  border: 1px solid #383838;
  border-radius: 14px;
  padding: 6px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.7), 0 0 1px 1px rgba(255, 255, 255, 0.05);
  z-index: 120;
  display: none;
  flex-direction: column;
  gap: 2px;
  animation: popoverScale 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

.chatgpt-profile-popover.open {
  display: flex;
}

@keyframes popoverScale {
  from { opacity: 0; transform: translateY(6px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Authentic ChatGPT Account Header in Popover */
.chatgpt-popover-account {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.12s ease;
  user-select: none;
}

.chatgpt-popover-account:hover {
  background: #2a2a2a;
}

.chatgpt-popover-account .popover-meta {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

.chatgpt-popover-account .popover-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: #ffffff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chatgpt-popover-account .popover-sub {
  font-size: 0.74rem;
  color: #8e8e8e;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.popover-account-chevron {
  margin-left: auto;
  color: #71717a;
  flex-shrink: 0;
}

.popover-divider {
  height: 1px;
  background: #2f2f2f;
  margin: 4px 0;
}

.popover-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #d1d5db;
  font-size: 0.84rem;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  text-align: left;
  width: 100%;
  transition: all 0.12s ease;
  user-select: none;
}

.popover-menu-item:hover {
  background: #2f2f2f;
  color: #ffffff;
}

.popover-menu-item svg {
  flex-shrink: 0;
}

.flex-grow-label {
  flex: 1;
  text-align: left;
}

.submenu-chevron {
  margin-left: auto;
  color: #8e8e8e;
  flex-shrink: 0;
}

.popover-menu-item.dev-portal-item {
  color: #d1d5db;
}

.popover-menu-item.dev-portal-item:hover {
  background: #2f2f2f;
  color: #ffffff;
}

.popover-menu-item.logout-item {
  color: #ef4444;
}

.popover-menu-item.logout-item:hover {
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
}

/* Feature Modals Extension */
.app-feature-dialog {
  max-width: 460px;
}

.modal-dialog-lg {
  max-width: 520px;
}

.modal-feature-header {
  margin-bottom: 20px;
}

.modal-feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  margin-bottom: 14px;
}

.modal-feature-icon.gold-sparkle {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.modal-feature-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 6px 0;
}

.modal-feature-subtitle {
  font-size: 0.86rem;
  color: #9ca3af;
  margin: 0;
  line-height: 1.45;
}

.modal-textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #383838;
  background: #181818;
  color: #f3f4f6;
  font-family: inherit;
  font-size: 0.86rem;
  line-height: 1.45;
  resize: vertical;
  transition: border-color 0.15s ease;
  box-sizing: border-box;
}

.modal-textarea:focus {
  outline: none;
  border-color: #10a37f;
  box-shadow: 0 0 0 2px rgba(16, 163, 127, 0.2);
}

.modal-btn-row {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

.btn-primary {
  padding: 9px 18px;
  border-radius: 8px;
  border: none;
  background: #10a37f;
  color: #ffffff;
  font-weight: 600;
  font-size: 0.86rem;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-primary:hover {
  background: #0e8c6d;
}

.btn-secondary {
  padding: 9px 18px;
  border-radius: 8px;
  border: 1px solid #383838;
  background: transparent;
  color: #d1d5db;
  font-size: 0.86rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-secondary:hover {
  background: #2a2a2a;
  color: #ffffff;
}

.btn-danger-outline {
  padding: 7px 14px;
  border-radius: 7px;
  border: 1px solid rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.08);
  color: #ef4444;
  font-size: 0.82rem;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-danger-outline:hover {
  background: rgba(239, 68, 68, 0.18);
  border-color: #ef4444;
}

.upgrade-cards-grid {
  margin-top: 14px;
}

.upgrade-card {
  background: #181818;
  border: 1px solid #2f2f2f;
  border-radius: 12px;
  padding: 16px;
}

.upgrade-card.active-tier {
  border-color: rgba(16, 163, 127, 0.5);
  background: rgba(16, 163, 127, 0.04);
}

.upgrade-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.tier-title {
  font-size: 0.76rem;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.tier-badge {
  font-size: 0.72rem;
  font-weight: 600;
  color: #10a37f;
  background: rgba(16, 163, 127, 0.15);
  padding: 2px 8px;
  border-radius: 20px;
}

.tier-name {
  font-size: 1.18rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 12px;
}

.tier-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tier-features li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: #d1d5db;
}

.tier-features li svg {
  color: #10a37f;
  flex-shrink: 0;
}

/* ==========================================================================
   ADVANCED SETTINGS MODAL DIALOG (WITH SIDEBAR & FULL PANES)
   ========================================================================== */

.settings-modal-backdrop {
  z-index: 10000;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.settings-modal-dialog {
  width: 94vw !important;
  max-width: 980px !important;
  height: 680px !important;
  max-height: 88vh !important;
  display: flex !important;
  flex-direction: column !important;
  padding: 0 !important;
  overflow: hidden !important;
  border-radius: 18px;
  background: #171717;
  border: 1px solid #303030;
  box-shadow: 0 25px 70px -10px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.07);
  position: relative;
  transform: scale(0.97) translateY(8px);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-modal-backdrop.active .settings-modal-dialog {
  transform: scale(1) translateY(0);
}

/* Modal Header */
.settings-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: #1d1d1d;
  border-bottom: 1px solid #282828;
}

.settings-modal-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: #9ca3af;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.settings-modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.1);
}

.settings-modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.settings-modal-badge-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(16, 163, 127, 0.12);
  color: #10a37f;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.settings-modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #f3f4f6;
  margin: 0;
  line-height: 1.2;
}

.settings-modal-subtitle {
  font-size: 0.78rem;
  color: #9ca3af;
  margin: 2px 0 0 0;
}

/* Modal Layout */
.settings-modal-layout {
  display: flex;
  flex: 1;
  overflow: hidden;
  background: #171717;
}

/* Sidebar Navigation */
.settings-modal-nav {
  width: 235px;
  min-width: 235px;
  background: #141414;
  border-right: 1px solid #282828;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  overflow-y: auto;
}

.settings-tab-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: transparent;
  color: #9ca3af;
  font-size: 0.86rem;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}

.settings-tab-btn svg {
  color: #6b7280;
  transition: color 0.15s ease;
  flex-shrink: 0;
}

.settings-tab-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #e5e7eb;
}

.settings-tab-btn:hover svg {
  color: #d1d5db;
}

.settings-tab-btn.active {
  background: #232323;
  color: #ffffff;
  font-weight: 600;
  border-color: #333333;
}

.settings-tab-btn.active svg {
  color: #10a37f;
}

/* Content Area */
.settings-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 26px 36px;
  display: flex;
  flex-direction: column;
}

/* Custom Slim Scrollbars */
.settings-modal-body::-webkit-scrollbar,
.settings-modal-nav::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.settings-modal-body::-webkit-scrollbar-track,
.settings-modal-nav::-webkit-scrollbar-track {
  background: transparent;
}

.settings-modal-body::-webkit-scrollbar-thumb,
.settings-modal-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16);
  border-radius: 6px;
}

.settings-modal-body::-webkit-scrollbar-thumb:hover,
.settings-modal-nav::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Settings Panes */
.settings-pane {
  display: none;
  flex-direction: column;
  gap: 18px;
}

.settings-pane.active {
  display: flex;
  animation: settingsPaneFade 0.2s ease-out;
}

@keyframes settingsPaneFade {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.settings-pane-header {
  margin-bottom: 4px;
}

.settings-pane-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 4px 0;
}

.settings-pane-desc {
  font-size: 0.82rem;
  color: #9ca3af;
  margin: 0;
  line-height: 1.4;
}

/* Items Group */
.settings-items-group {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid #282828;
  border-radius: 12px;
  background: #191919;
  overflow: hidden;
}

.settings-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 22px;
  border-bottom: 1px solid #252525;
  gap: 20px;
}

.settings-item-row:last-child {
  border-bottom: none;
}

.settings-item-row.highlight-box {
  background: rgba(16, 163, 127, 0.06);
  border: 1px solid rgba(16, 163, 127, 0.2);
  border-radius: 12px;
}

.settings-item-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.settings-item-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: #f3f4f6;
}

.settings-item-sub {
  font-size: 0.78rem;
  color: #9ca3af;
  line-height: 1.4;
}

/* Select Control */
.settings-select-control {
  background: #111111;
  border: 1px solid #383838;
  color: #e5e7eb;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-family: inherit;
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.settings-select-control:focus {
  border-color: #10a37f;
}

/* Toggle Switch */
.settings-toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
}

.settings-toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #333333;
  border-radius: 24px;
  transition: all 0.25s ease;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: #ffffff;
  border-radius: 50%;
  transition: all 0.25s ease;
}

.settings-toggle-switch input:checked + .toggle-slider {
  background-color: #10a37f;
}

.settings-toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(20px);
}

/* Theme & Button Selectors */
.settings-theme-selector,
.settings-btn-selector {
  display: inline-flex;
  background: #111111;
  border: 1px solid #333333;
  border-radius: 9px;
  padding: 4px;
  gap: 3px;
  flex-shrink: 0;
}

.theme-choice-btn,
.btn-choice-opt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  background: transparent;
  color: #9ca3af;
  font-size: 0.82rem;
  font-family: inherit;
  font-weight: 500;
  padding: 7px 13px;
  border-radius: 7px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.theme-choice-btn:hover,
.btn-choice-opt:hover {
  color: #f3f4f6;
}

.theme-choice-btn.active,
.btn-choice-opt.active {
  background: #2a2a2a;
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* Profile Card Styling */
.settings-profile-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
}

.settings-avatar-wrapper {
  display: flex;
  align-items: center;
  gap: 16px;
}

.settings-avatar-preview {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.settings-avatar-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.settings-avatar-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
}

.settings-avatar-email {
  font-size: 0.8rem;
  color: #9ca3af;
}

.settings-avatar-plan-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.plan-pill {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
}

.pill-pro {
  background: rgba(16, 163, 127, 0.18);
  color: #10a37f;
  border: 1px solid rgba(16, 163, 127, 0.3);
}

.pill-enterprise {
  background: rgba(14, 165, 233, 0.18);
  color: #38bdf8;
  border: 1px solid rgba(14, 165, 233, 0.3);
}

.verified-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  color: #10a37f;
  font-weight: 500;
}

.settings-avatar-color-picker {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid #282828;
}

.color-picker-label {
  font-size: 0.8rem;
  color: #9ca3af;
  font-weight: 500;
}

.color-options-row {
  display: flex;
  gap: 8px;
}

.avatar-color-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.avatar-color-btn:hover {
  transform: scale(1.15);
}

.avatar-color-btn.active {
  border-color: #ffffff;
  transform: scale(1.15);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
}

/* Form Styles */
.settings-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-row-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-field-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label-bold {
  font-size: 0.82rem;
  font-weight: 600;
  color: #e5e7eb;
}

.field-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.char-counter {
  font-size: 0.74rem;
  color: #6b7280;
}

.field-hint {
  font-size: 0.74rem;
  color: #6b7280;
  line-height: 1.35;
}

.settings-text-input {
  width: 100%;
  background: #121212;
  border: 1px solid #333333;
  color: #f3f4f6;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 0.86rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease;
  box-sizing: border-box;
}

.settings-text-input:focus {
  border-color: #10a37f;
}

.settings-text-input.readonly-input {
  background: #181818;
  color: #9ca3af;
  border-color: #2a2a2a;
  cursor: not-allowed;
}

.password-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.toggle-pwd-btn {
  position: absolute;
  right: 10px;
  background: transparent;
  border: none;
  color: #6b7280;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  transition: color 0.15s ease;
}

.toggle-pwd-btn:hover {
  color: #d1d5db;
}

.settings-textarea {
  width: 100%;
  background: #121212;
  border: 1px solid #333333;
  color: #f3f4f6;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.84rem;
  font-family: inherit;
  outline: none;
  resize: vertical;
  line-height: 1.5;
  transition: border-color 0.15s ease;
  box-sizing: border-box;
}

.settings-textarea:focus {
  border-color: #10a37f;
}

/* Security & Section Cards */
.security-status-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: rgba(16, 163, 127, 0.08);
  border: 1px solid rgba(16, 163, 127, 0.25);
  border-radius: 12px;
}

.security-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(16, 163, 127, 0.15);
  color: #10a37f;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.security-card-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.security-card-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #f3f4f6;
}

.security-card-desc {
  font-size: 0.78rem;
  color: #9ca3af;
  line-height: 1.35;
}

.security-safe-tag {
  font-size: 0.74rem;
  font-weight: 700;
  color: #10a37f;
  background: rgba(16, 163, 127, 0.15);
  padding: 3px 10px;
  border-radius: 6px;
  border: 1px solid rgba(16, 163, 127, 0.3);
}

.settings-section-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  background: #191919;
  border: 1px solid #282828;
  border-radius: 12px;
}

.section-card-title {
  font-size: 0.94rem;
  font-weight: 700;
  color: #f3f4f6;
  margin: 0;
}

.session-device-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #121212;
  border: 1px solid #282828;
  border-radius: 9px;
}

.device-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #222222;
  color: #9ca3af;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.device-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.device-name {
  font-size: 0.84rem;
  font-weight: 600;
  color: #f3f4f6;
}

.device-sub {
  font-size: 0.74rem;
  color: #9ca3af;
}

.device-active-badge {
  font-size: 0.72rem;
  font-weight: 600;
  color: #10a37f;
  background: rgba(16, 163, 127, 0.12);
  padding: 2px 8px;
  border-radius: 6px;
}

.session-logout-row {
  display: flex;
  justify-content: flex-start;
  margin-top: 4px;
}

.logout-btn-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}

/* Storage Card */
.data-storage-status-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: #1a1a1a;
  border: 1px solid #282828;
  border-radius: 12px;
  margin-top: 10px;
}

.storage-status-icon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.storage-status-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.storage-status-title {
  font-size: 0.86rem;
  font-weight: 600;
  color: #f3f4f6;
}

.storage-status-desc {
  font-size: 0.76rem;
  color: #9ca3af;
}

.status-live-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #10a37f;
  box-shadow: 0 0 8px #10a37f;
}

/* About Pane Specs */
.about-hero-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  background: #191919;
  border: 1px solid #282828;
  border-radius: 12px;
}

.about-brand-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.about-brand-logo {
  font-weight: 800;
  font-size: 1.15rem;
  color: #ffffff;
  padding: 6px 12px;
  background: linear-gradient(135deg, #10a37f, #0d8a6a);
  border-radius: 9px;
}

.about-app-name {
  font-size: 1rem;
  font-weight: 700;
  color: #f3f4f6;
  margin: 0;
}

.about-app-version {
  font-size: 0.76rem;
  color: #9ca3af;
}

.about-app-summary {
  font-size: 0.82rem;
  color: #d1d5db;
  line-height: 1.45;
  margin: 0;
}

.about-specs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.spec-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  background: #151515;
  border: 1px solid #262626;
  border-radius: 9px;
}

.spec-label {
  font-size: 0.72rem;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.spec-value {
  font-size: 0.84rem;
  font-weight: 600;
  color: #f3f4f6;
}

.about-legal-footer {
  font-size: 0.74rem;
  color: #6b7280;
  text-align: center;
  padding-top: 12px;
}

/* Actions & Buttons */
.settings-pane-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 10px;
}

.btn-primary-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #10a37f;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 0.84rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-primary-action:hover {
  background: #0d8a6a;
  transform: translateY(-1px);
}

.btn-secondary-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #252525;
  color: #e5e7eb;
  border: 1px solid #383838;
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 0.82rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-secondary-action:hover {
  background: #303030;
  color: #ffffff;
}

.settings-feedback-alert {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.82rem;
  line-height: 1.4;
  margin-bottom: 4px;
}

.settings-feedback-alert.success {
  background: rgba(16, 163, 127, 0.15);
  border: 1px solid rgba(16, 163, 127, 0.4);
  color: #34d399;
}

.settings-feedback-alert.error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
}

.settings-guest-banner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  padding: 32px 20px;
  background: #1a1a1a;
  border: 1px dashed #383838;
  border-radius: 12px;
}

.guest-banner-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(16, 163, 127, 0.12);
  color: #10a37f;
  display: flex;
  align-items: center;
  justify-content: center;
}

.guest-banner-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #f3f4f6;
  margin: 0;
}

.guest-banner-desc {
  font-size: 0.84rem;
  color: #9ca3af;
  max-width: 440px;
  margin: 0;
  line-height: 1.45;
}

.guest-banner-actions {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

/* Modal Footer */
.settings-modal-footer {
  padding: 12px 22px;
  background: #171717;
  border-top: 1px solid #282828;
  display: flex;
  justify-content: flex-end;
}

/* Light Mode Overrides for Settings Modal */
[data-theme="light"] .settings-modal-dialog {
  background: #ffffff;
  border-color: #e5e7eb;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .settings-modal-header {
  background: #f9fafb;
  border-bottom-color: #e5e7eb;
}

[data-theme="light"] .settings-modal-title {
  color: #111827;
}

[data-theme="light"] .settings-modal-subtitle,
[data-theme="light"] .settings-pane-desc,
[data-theme="light"] .settings-item-sub,
[data-theme="light"] .field-hint {
  color: #6b7280;
}

[data-theme="light"] .settings-modal-layout {
  background: #ffffff;
}

[data-theme="light"] .settings-modal-nav {
  background: #f9fafb;
  border-right-color: #e5e7eb;
}

[data-theme="light"] .settings-tab-btn {
  color: #4b5563;
}

[data-theme="light"] .settings-tab-btn:hover {
  background: #f3f4f6;
  color: #111827;
}

[data-theme="light"] .settings-tab-btn.active {
  background: #e5e7eb;
  color: #111827;
  border-color: #d1d5db;
}

[data-theme="light"] .settings-pane-title,
[data-theme="light"] .settings-item-label,
[data-theme="light"] .form-label-bold,
[data-theme="light"] .section-card-title,
[data-theme="light"] .settings-avatar-name,
[data-theme="light"] .device-name,
[data-theme="light"] .storage-status-title,
[data-theme="light"] .about-app-name,
[data-theme="light"] .spec-value {
  color: #111827;
}

[data-theme="light"] .settings-items-group,
[data-theme="light"] .settings-profile-card,
[data-theme="light"] .settings-section-card,
[data-theme="light"] .data-storage-status-card,
[data-theme="light"] .about-hero-card {
  background: #f9fafb;
  border-color: #e5e7eb;
}

[data-theme="light"] .settings-item-row {
  border-bottom-color: #f3f4f6;
}

[data-theme="light"] .settings-text-input,
[data-theme="light"] .settings-textarea,
[data-theme="light"] .settings-select-control {
  background: #ffffff;
  border-color: #d1d5db;
  color: #111827;
}

[data-theme="light"] .settings-text-input.readonly-input {
  background: #f3f4f6;
  color: #6b7280;
  border-color: #e5e7eb;
}

[data-theme="light"] .session-device-row,
[data-theme="light"] .spec-item {
  background: #ffffff;
  border-color: #e5e7eb;
}

[data-theme="light"] .settings-theme-selector,
[data-theme="light"] .settings-btn-selector {
  background: #e5e7eb;
  border-color: #d1d5db;
}

[data-theme="light"] .theme-choice-btn.active,
[data-theme="light"] .btn-choice-opt.active {
  background: #ffffff;
  color: #111827;
}

[data-theme="light"] .btn-secondary-action {
  background: #f3f4f6;
  border-color: #d1d5db;
  color: #374151;
}

[data-theme="light"] .btn-secondary-action:hover {
  background: #e5e7eb;
  color: #111827;
}

[data-theme="light"] .settings-modal-footer {
  background: #ffffff;
  border-top-color: #e5e7eb;
}

[data-theme="light"] .settings-modal-close-btn {
  color: #4b5563;
}

[data-theme="light"] .settings-modal-close-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  color: #111827;
  border-color: rgba(0, 0, 0, 0.1);
}

/* Responsive Settings Modal */
@media (max-width: 768px) {
  .settings-modal-dialog {
    width: 96vw !important;
    height: 92vh !important;
    max-height: 92vh !important;
    border-radius: 14px;
  }
  .settings-modal-layout {
    flex-direction: column;
  }
  .settings-modal-nav {
    width: 100%;
    min-width: 100%;
    flex-direction: row;
    overflow-x: auto;
    border-right: none;
    border-bottom: 1px solid #282828;
    padding: 10px;
    gap: 6px;
  }
  .settings-tab-btn {
    white-space: nowrap;
    padding: 8px 12px;
    width: auto;
  }
  .settings-modal-body {
    padding: 18px 16px;
  }
  .form-row-group,
  .about-specs-grid {
    grid-template-columns: 1fr;
  }
  .settings-item-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

/* Font Size Modifiers on Chat Container */
[data-font-size="small"] .message-bubble,
[data-font-size="small"] .chat-message-content {
  font-size: 0.82rem !important;
}

[data-font-size="large"] .message-bubble,
[data-font-size="large"] .chat-message-content {
  font-size: 1.05rem !important;
  line-height: 1.65 !important;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .settings-modal-dialog {
    width: 98%;
    height: 94vh;
    max-height: 94vh;
    border-radius: 12px;
  }

  .settings-modal-layout {
    flex-direction: column;
  }

  .settings-modal-nav {
    width: 100%;
    min-width: 100%;
    border-right: none;
    border-bottom: 1px solid #282828;
    flex-direction: row;
    overflow-x: auto;
    padding: 8px 10px;
  }

  .settings-tab-btn {
    white-space: nowrap;
    padding: 7px 12px;
    font-size: 0.8rem;
  }

  .settings-modal-body {
    padding: 16px;
  }

  .form-row-group,
  .about-specs-grid {
    grid-template-columns: 1fr;
  }
}

.shortcuts-table {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.shortcut-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: #181818;
  border-radius: 8px;
  border: 1px solid #2f2f2f;
}

.shortcut-desc {
  font-size: 0.84rem;
  color: #e5e7eb;
}

.shortcut-combo, kbd.shortcut-key, .shortcut-combo kbd {
  display: inline-flex;
  align-items: center;
  background: #282828;
  border: 1px solid #404040;
  border-radius: 5px;
  padding: 2px 7px;
  font-size: 0.74rem;
  font-family: inherit;
  font-weight: 600;
  color: #d1d5db;
  box-shadow: 0 1px 1px rgba(0,0,0,0.3);
}

/* ==========================================================
   Chat Workspace
   ========================================================== */
.chat-workspace {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  background-color: var(--bg-canvas);
}

/* Header */
.chat-header {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: rgba(33, 33, 33, 0.88);
  backdrop-filter: blur(14px);
  position: relative;
  z-index: 70;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-icon-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.header-icon-btn:hover {
  background: var(--bg-surface);
  color: var(--text-primary);
}

/* Sidebar Toggle Visibility Sync (ChatGPT UX) */
#sidebarToggleBtn {
  display: flex;
}

@media (min-width: 769px) {
  /* On desktop: when sidebar is open, hide header toggle so only 1 collapse button appears */
  .sidebar:not(.collapsed) ~ .chat-workspace #sidebarToggleBtn {
    display: none !important;
  }

  /* When sidebar is collapsed, reveal header toggle so user can reopen it with 1 click */
  .sidebar.collapsed ~ .chat-workspace #sidebarToggleBtn {
    display: flex !important;
  }
}

@media (max-width: 768px) {
  /* On mobile: always show header toggle to open drawer */
  #sidebarToggleBtn {
    display: flex !important;
  }
}

/* ChatGPT Model Switcher Dropdown */
.model-dropdown-wrapper {
  position: relative;
  z-index: 80;
}

.model-dropdown-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 600;
  transition: var(--transition-smooth);
}

.model-dropdown-pill:hover, .model-dropdown-pill[aria-expanded="true"] {
  background: var(--bg-surface);
  color: var(--text-primary);
}

.chevron-icon {
  opacity: 0.6;
  transition: transform 0.2s ease;
}

.model-dropdown-pill[aria-expanded="true"] .chevron-icon {
  transform: rotate(180deg);
}

/* Floating Popover Menu */
.model-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 340px;
  background: #282828;
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.75);
  padding: 8px;
  z-index: 1000;
  max-height: calc(100vh - var(--header-height) - 40px);
  overflow-y: auto;
  animation: scaleDown 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

.model-dropdown-menu.open {
  display: block;
}

@keyframes scaleDown {
  from { opacity: 0; transform: scale(0.96) translateY(-4px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.model-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 6px;
}

.badge-router {
  font-size: 0.65rem;
  color: var(--accent-pink);
  background: rgba(236, 72, 153, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

.model-menu-items {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.model-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.model-item:hover {
  background: var(--bg-surface-hover);
}

.model-item.selected {
  background: var(--bg-surface);
}

.model-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-right: 8px;
}

.model-item-title {
  display: flex;
  align-items: center;
  gap: 6px;
}

.model-item-title strong {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-primary);
}

.model-badge {
  font-size: 0.65rem;
  background: rgba(168, 85, 247, 0.15);
  color: var(--accent-purple);
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 600;
}

.model-item-desc {
  font-size: 0.74rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.model-item-check {
  display: none;
  color: var(--text-primary);
}

.model-item.selected .model-item-check {
  display: block;
}

/* Header Right */
.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-pill-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: 20px;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.header-pill-btn:hover {
  background: var(--bg-surface);
  color: var(--text-primary);
}

.mobile-only-new-chat {
  display: none !important;
  color: var(--text-secondary);
}

.mobile-only-new-chat:hover {
  color: var(--text-primary);
}

@media (max-width: 768px) {
  .mobile-only-new-chat {
    display: flex !important;
  }
}

/* ==========================================================
   Chat Scroll Area (ChatGPT Center Column 768px)
   ========================================================== */
.chat-scroll-area {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px 16px 180px 16px;
  display: flex;
  justify-content: center;
  scroll-behavior: smooth;
}

.chat-scroll-area::-webkit-scrollbar {
  width: 6px;
}
.chat-scroll-area::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 6px;
}

.chat-messages {
  width: 100%;
  max-width: var(--chat-max-width);
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-bottom: 80px;
}

.chat-scroll-spacer {
  height: 180px;
  width: 100%;
  flex-shrink: 0;
  pointer-events: none;
  display: block;
}

/* ==========================================================
   ChatGPT Empty State Hero
   ========================================================== */
.chatgpt-hero-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 55vh;
  padding: 40px 16px 20px 16px;
  animation: fadeIn 0.4s ease;
}

.chatgpt-hero-brand {
  margin-bottom: 20px;
}

.chatgpt-hero-logo {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-lotus-svg {
  width: 52px;
  height: 52px;
  filter: drop-shadow(0 4px 14px rgba(236, 72, 153, 0.35));
}

.chatgpt-hero-title {
  font-size: 1.95rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.chatgpt-hero-sub {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 520px;
  line-height: 1.5;
  margin-bottom: 32px;
}

.chatgpt-suggestions-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  max-width: 680px;
}

.chatgpt-pill-btn {
  background: transparent;
  border: 1px solid var(--border-light);
  border-radius: 24px;
  padding: 8px 16px;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.84rem;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.chatgpt-pill-btn:hover {
  background: var(--bg-surface);
  border-color: var(--border-subtle);
  color: var(--text-primary);
}

.pill-icon {
  font-size: 1rem;
}

/* ==========================================================
   Chat Messages Rows (ChatGPT Style)
   ========================================================== */
.chatgpt-row {
  display: flex;
  width: 100%;
  animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* User Message Row */
.user-row {
  justify-content: flex-end;
}

.chatgpt-user-bubble {
  background-color: var(--bg-surface);
  color: var(--text-primary);
  padding: 10px 18px;
  border-radius: 22px;
  max-width: 78%;
  font-size: 0.98rem;
  line-height: 1.6;
  word-wrap: break-word;
  white-space: pre-wrap;
}

/* Assistant Message Row */
.assistant-row {
  justify-content: flex-start;
  gap: 14px;
}

.chatgpt-assistant-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #a855f7, #ec4899);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 4px;
  box-shadow: 0 2px 8px rgba(168, 85, 247, 0.3);
}

.chatgpt-assistant-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chatgpt-markdown {
  color: var(--text-primary);
  font-size: 1rem;
  line-height: 1.75;
  word-wrap: break-word;
}

/* Actions Toolbar under Assistant */
.chatgpt-actions-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
}

.action-icon-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 6px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.action-icon-btn:hover {
  background: var(--bg-surface);
  color: var(--text-primary);
}

/* ==========================================================
   Markdown Elements (Clean ChatGPT Typography)
   ========================================================== */
.markdown-body p {
  margin-bottom: 14px;
}

.markdown-body p:last-child {
  margin-bottom: 0;
}

.markdown-body h1, .markdown-body h2, .markdown-body h3, .markdown-body h4 {
  margin-top: 22px;
  margin-bottom: 10px;
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.015em;
}

.markdown-body ul, .markdown-body ol {
  margin-left: 24px;
  margin-bottom: 14px;
}

.markdown-body li {
  margin-bottom: 5px;
}

.markdown-body strong {
  font-weight: 600;
  color: #fff;
}

.markdown-body blockquote {
  border-left: 3px solid var(--accent-pink);
  padding-left: 14px;
  margin: 14px 0;
  color: var(--text-secondary);
  font-style: italic;
}

.markdown-body code:not(pre code) {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: rgba(255, 255, 255, 0.08);
  color: #f472b6;
  padding: 2px 6px;
  border-radius: 4px;
}

.markdown-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.markdown-body th, .markdown-body td {
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 8px 12px;
  text-align: left;
}

.markdown-body th {
  background: rgba(255, 255, 255, 0.06);
  font-weight: 600;
  color: #ffffff;
}

/* Code Blocks with Header & Copy Button */
.code-block-wrapper {
  margin: 16px 0;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-code);
  border: 1px solid #2e2e2e;
}

.code-block-wrapper pre {
  margin: 0;
  padding: 14px 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.code-header {
  background: var(--bg-code-header);
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #262626;
  font-size: 0.74rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.code-copy-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-family: var(--font-sans);
  padding: 2px 6px;
  border-radius: 4px;
  transition: var(--transition-smooth);
}

.code-copy-btn:hover {
  color: #fff;
}

.markdown-body pre {
  margin: 0;
  padding: 16px;
  overflow-x: auto;
  background: var(--bg-code);
}

.markdown-body pre code {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.6;
  background: transparent;
  padding: 0;
}

/* Streaming Cursor (Smooth Animated Glowing Dot) */
.streaming-cursor {
  display: inline-block;
  width: 8px;
  height: 16px;
  background: var(--text-primary);
  margin-left: 4px;
  vertical-align: middle;
  animation: blink 0.8s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ==========================================================
   ChatGPT Iconic Capsule Input Dock
   ========================================================== */
.chatgpt-input-dock {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0 16px 18px 16px;
  background: linear-gradient(180deg, rgba(33, 33, 33, 0) 0%, rgba(33, 33, 33, 0.9) 25%, rgba(33, 33, 33, 1) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 30;
  pointer-events: none;
}

.chatgpt-input-capsule {
  width: 100%;
  max-width: var(--chat-max-width);
  background-color: var(--bg-surface);
  border-radius: 26px;
  padding: 12px 14px 10px 18px;
  border: 1px solid var(--border-light);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
  transition: var(--transition-smooth);
  pointer-events: auto;
  position: relative;
  box-sizing: border-box;
  overflow: visible;
}

.chatgpt-input-capsule:focus-within {
  border-color: var(--border-focus);
}

.chatgpt-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chatgpt-form textarea {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  resize: none;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.5;
  max-height: 200px;
  min-height: 24px;
}

.chatgpt-form textarea::placeholder {
  color: var(--text-muted);
}

/* Capsule Bottom Toolbar */
.capsule-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: 4px;
}

.capsule-tools-left {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.capsule-tool-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.capsule-tool-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.capsule-tool-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  padding: 4px 10px;
  border-radius: 16px;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.capsule-tool-pill:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

.capsule-tool-pill.active {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.capsule-tools-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.mic-btn,
.wave-btn {
  color: var(--text-muted);
}

.mic-btn.recording,
.wave-btn.recording {
  color: #ef4444 !important;
  animation: pulse-mic 1.2s infinite;
}

@keyframes pulse-mic {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.15); opacity: 0.7; }
  100% { transform: scale(1); opacity: 1; }
}

/* ChatGPT Send Button (Iconic Circle) */
.chatgpt-send-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: #ffffff;
  color: #000000;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.chatgpt-send-btn:disabled {
  background-color: #383838;
  color: #717171;
  cursor: default;
}

.chatgpt-send-btn:not(:disabled):hover {
  background-color: #e5e5e5;
  transform: scale(1.04);
}

/* ChatGPT Stop Button */
.chatgpt-stop-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: #ffffff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.stop-square {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background-color: #000000;
}

.chatgpt-stop-btn:hover {
  background-color: #e5e5e5;
  transform: scale(1.04);
}

/* Micro Disclaimer Under Capsule */
.chatgpt-disclaimer {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 8px;
  text-align: center;
}

.chatgpt-disclaimer strong {
  color: var(--text-secondary);
}

/* ==========================================================
   ChatGPT Logged-In Empty State (Center Hero & Actions Parity)
   ========================================================== */
.chat-workspace.empty-chat-state {
  display: flex;
  flex-direction: column;
}

.chat-workspace.empty-chat-state .chat-scroll-area {
  display: none !important;
}

.chat-workspace.empty-chat-state .chatgpt-input-dock {
  position: relative !important;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px 20px 20px 20px;
  background: transparent !important;
  pointer-events: auto !important;
  max-width: 820px;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

.chat-workspace.empty-chat-state #emptyHeroTitle {
  display: block;
  margin-bottom: 28px;
  text-align: center;
  width: 100%;
}

.chatgpt-home-title {
  font-size: 2rem;
  font-weight: 500;
  color: #ececec;
  letter-spacing: -0.02em;
  margin: 0;
}

.chat-workspace.empty-chat-state #emptyQuickActions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  max-width: var(--chat-max-width);
  margin-top: 20px;
}

.chat-workspace.empty-chat-state .chatgpt-disclaimer {
  margin-top: auto;
  padding-top: 32px;
}

/* Hidden in active chat */
.chat-workspace:not(.empty-chat-state) #emptyHeroTitle,
.chat-workspace:not(.empty-chat-state) #emptyQuickActions {
  display: none !important;
}

/* Quick Action Items (ChatGPT Screenshot Parity: Buat gambar, Tulis atau edit, Cari di web) */
.quick-action-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #212121;
  border: 1px solid #333333;
  border-radius: 20px;
  padding: 8px 16px;
  color: #d1d5db;
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.quick-action-item:hover {
  background: #2f2f2f;
  border-color: #484848;
  color: #ffffff;
}

.quick-action-item .action-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
}

.quick-action-item:hover .action-icon {
  color: #ffffff;
}

/* Circular Waveform Voice Button (ChatGPT Dark Neutral Parity) */
.wave-btn-chatgpt {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: #2f2f2f;
  color: #ececec;
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.wave-btn-chatgpt:hover {
  background-color: #3f3f3f;
  color: #ffffff;
  transform: scale(1.04);
}

.wave-btn-chatgpt.recording {
  background-color: #ef4444;
  color: #ffffff;
  animation: pulse-mic 1.2s infinite;
}

/* Reasoning Pill [ 🧠 Berpikir ] */
.capsule-tool-pill.reason-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  padding: 5px 12px;
  border-radius: 16px;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.capsule-tool-pill.reason-pill:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

.capsule-tool-pill.reason-pill.active {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

/* ==========================================================
   Mobile & Responsive Drawer
   ========================================================== */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 35;
}

@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: 280px;
    max-width: 85vw;
    transform: translateX(-100%);
    margin-left: 0 !important;
    box-shadow: 10px 0 30px rgba(0,0,0,0.65);
    z-index: 50;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-overlay.active {
    display: block;
  }

  .chat-header {
    padding: 0 12px;
  }

  .chatgpt-suggestions-row {
    flex-direction: column;
    width: 100%;
  }

  .chatgpt-pill-btn {
    width: 100%;
    justify-content: center;
  }

  .chat-scroll-area {
    padding: 12px 12px 160px 12px;
  }

  .chatgpt-input-dock {
    padding: 0 12px 12px 12px;
  }

  .chatgpt-user-bubble {
    max-width: 85%;
  }

  .chatgpt-assistant-avatar {
    width: 26px;
    height: 26px;
    font-size: 0.75rem;
  }
}

@media (max-width: 640px) {
  .chat-header {
    height: 52px;
  }

  .model-dropdown-pill {
    padding: 6px 8px;
    font-size: 0.92rem;
  }

  .model-pill-name {
    max-width: 150px;
  }

  .chatgpt-input-capsule {
    border-radius: 22px;
    padding: 10px 12px 8px 12px;
  }

  .chatgpt-form textarea {
    font-size: 0.94rem;
  }

  .chatgpt-home-title {
    font-size: 1.6rem;
  }

  .chat-workspace.empty-chat-state .chatgpt-input-dock {
    padding: 24px 12px 14px 12px;
  }
}

@media (max-width: 480px) {
  .model-pill-name {
    max-width: 110px;
  }

  .model-dropdown-menu {
    width: calc(100vw - 24px);
    max-width: 330px;
    left: -6px;
  }

  .capsule-tool-pill span {
    display: none;
  }

  .capsule-tool-pill {
    padding: 6px;
    border-radius: 50%;
  }

  .capsule-tools-right {
    gap: 5px;
  }

  .chatgpt-send-btn,
  .chatgpt-stop-btn,
  .wave-btn-chatgpt {
    width: 30px;
    height: 30px;
  }

  .chatgpt-user-bubble {
    max-width: 90%;
    padding: 8px 13px;
    font-size: 0.92rem;
  }

  .quick-action-item {
    font-size: 0.78rem;
    padding: 6px 10px;
    gap: 6px;
  }
}

/* ==========================================================
   ChatGPT Auth Pages (Login & Register)
   ========================================================== */
.chatgpt-auth-body {
  min-height: 100vh;
  background-color: var(--bg-main);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  font-family: var(--font-primary);
  color: var(--text-primary);
}

.chatgpt-auth-container {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.auth-brand-header {
  text-align: center;
  margin-bottom: 24px;
}

.auth-lotus-logo {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-title {
  font-size: 1.7rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.auth-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.auth-card {
  width: 100%;
  background: var(--bg-sidebar);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 30px 26px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
}

.auth-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  margin-bottom: 18px;
}

.auth-alert-error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #f87171;
}

.auth-form {
  display: flex;
  flex-direction: column;
}

.auth-field {
  margin-bottom: 16px;
}

.auth-label {
  display: block;
  font-size: 0.84rem;
  font-weight: 500;
  color: #d1d5db;
  margin-bottom: 6px;
}

.auth-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  color: #ffffff;
  padding: 11px 14px;
  font-size: 0.92rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-input:focus {
  border-color: #10a37f;
  box-shadow: 0 0 0 2px rgba(16, 163, 127, 0.25);
}

.auth-input::placeholder {
  color: #6b7280;
}

.auth-toggle-pwd {
  position: absolute;
  right: 12px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  transition: color 0.15s ease;
}

.auth-toggle-pwd:hover {
  color: var(--text-primary);
}

.auth-btn-submit {
  width: 100%;
  background: #10a37f;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 12px 18px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 6px;
  transition: background 0.15s ease, transform 0.1s ease;
}

.auth-btn-submit:hover {
  background: #0d8c6d;
}

.auth-btn-submit:active {
  transform: scale(0.99);
}

.auth-divider {
  display: flex;
  align-items: center;
  margin: 20px 0;
  color: #6b7280;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
}

.auth-divider span {
  padding: 0 12px;
}

.auth-switch-link {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.auth-switch-link a {
  color: #10a37f;
  text-decoration: none;
  font-weight: 500;
  transition: text-decoration 0.15s ease;
}

.auth-switch-link a:hover {
  text-decoration: underline;
}

.auth-footer {
  margin-top: 24px;
  text-align: center;
  font-size: 0.76rem;
  color: var(--text-muted);
}

.auth-footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 6px;
}

.auth-footer-links a {
  color: var(--text-muted);
  text-decoration: none;
}

.auth-footer-links a:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

.auth-footer-org a {
  color: #10a37f;
  text-decoration: none;
}

/* User Menu & Dropdown */
.user-menu-popover {
  position: absolute;
  bottom: 62px;
  left: 12px;
  right: 12px;
  background: #212121;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
  z-index: 50;
  display: none;
  animation: fadeIn 0.15s ease;
}

.user-menu-popover.open {
  display: block;
}

.user-menu-header {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 6px;
}

.user-menu-name {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-primary);
}

.user-menu-email {
  font-size: 0.75rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  font-size: 0.84rem;
  color: var(--text-primary);
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.12s ease;
  cursor: pointer;
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
}

.user-menu-item:hover {
  background: var(--bg-surface);
}

.user-menu-item.logout {
  color: #f87171;
}

.user-menu-item.logout:hover {
  background: rgba(239, 68, 68, 0.12);
}

.sidebar-profile-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.sidebar-logout-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  text-decoration: none;
}

.sidebar-logout-btn:hover {
  color: #f87171;
  background: rgba(239, 68, 68, 0.12);
}

/* ==========================================================
   ChatGPT Auth Popup Modal (Direct in-page Dialog)
   ========================================================== */
.btn-signup-highlight {
  background: #ffffff !important;
  color: #000000 !important;
  font-weight: 600 !important;
  border: none !important;
}

.btn-signup-highlight:hover {
  background: #e5e5e5 !important;
}

.auth-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.auth-modal-dialog {
  background: #212121;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  width: 100%;
  max-width: 420px;
  padding: 34px 30px 24px 30px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.06);
  position: relative;
  transform: scale(0.96) translateY(8px);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-modal-backdrop.active .auth-modal-dialog {
  transform: scale(1) translateY(0);
}

.auth-modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: #8e8e8e;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
}

.auth-modal-close:hover {
  background: #2f2f2f;
  color: #ffffff;
}

.modal-auth-brand {
  text-align: center;
  margin-bottom: 22px;
}

.modal-auth-title {
  font-size: 1.6rem;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.modal-auth-subtitle {
  font-size: 0.88rem;
  color: #b4b4b4;
  line-height: 1.45;
  max-width: 340px;
  margin: 0 auto;
}

.auth-limit-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 0.82rem;
  color: #fca5a5;
  margin-bottom: 18px;
  line-height: 1.4;
}

.auth-modal-tabs {
  display: flex;
  background: #0d0d0d;
  padding: 4px;
  border-radius: 12px;
  margin-bottom: 20px;
  border: 1px solid #333333;
}

.auth-tab-btn {
  flex: 1;
  padding: 8px 14px;
  background: transparent;
  border: none;
  border-radius: 9px;
  font-size: 0.88rem;
  font-weight: 500;
  color: #8e8e8e;
  cursor: pointer;
  transition: all 0.15s ease;
}

.auth-tab-btn.active {
  background: #2a2a2a;
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.modal-alert-box {
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.84rem;
  margin-bottom: 16px;
}

.modal-alert-box.error {
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #f87171;
}

.modal-alert-box.success {
  background: rgba(16, 163, 127, 0.14);
  border: 1px solid rgba(16, 163, 127, 0.35);
  color: #34d399;
}

.modal-auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.modal-label {
  font-size: 0.84rem;
  font-weight: 500;
  color: #d1d5db;
}

.modal-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.modal-input {
  width: 100%;
  background: #0d0d0d;
  border: 1px solid #383838;
  border-radius: 12px;
  color: #ffffff;
  padding: 12px 14px;
  font-size: 0.94rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.modal-input:focus {
  border-color: #ffffff;
  box-shadow: 0 0 0 1px #ffffff;
}

.modal-input::placeholder {
  color: #555555;
}

.modal-toggle-pwd {
  position: absolute;
  right: 12px;
  background: transparent;
  border: none;
  color: #8e8e8e;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  transition: color 0.15s ease;
}

.modal-toggle-pwd:hover {
  color: #ffffff;
}

.modal-submit-btn {
  width: 100%;
  background: #ffffff;
  color: #0d0d0d;
  border: none;
  border-radius: 9999px;
  padding: 12px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
  transition: background 0.15s ease, transform 0.1s ease;
}

.modal-submit-btn:hover {
  background: #e5e5e5;
}

.modal-submit-btn:active {
  transform: scale(0.99);
}

.modal-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.modal-switch-text {
  text-align: center;
  margin-top: 10px;
  font-size: 0.85rem;
  color: #8e8e8e;
}

.modal-switch-text a {
  color: #ffffff;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
  transition: color 0.15s ease;
}

.modal-switch-text a:hover {
  color: #38bdf8;
}

.modal-auth-footer {
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  font-size: 0.73rem;
  color: #71717a;
  line-height: 1.4;
}

/* ==========================================================================
   DEVELOPER PORTAL & CONSOLE MERGED STYLES
   ========================================================================== */

/* ==========================================================================
   Ren AI Developer Console & Portal CSS
   PT Azvera Technology Indonesia — Enterprise AI Engineering
   ========================================================================== */

:root {
  --dev-bg: #07090e;
  --dev-bg-surface: #0e121b;
  --dev-bg-card: #121824;
  --dev-bg-hover: #192233;
  --dev-bg-active: #1e293b;
  
  --dev-border: #1e2738;
  --dev-border-subtle: #171f2d;
  --dev-border-glow: rgba(6, 182, 212, 0.35);

  --dev-text-main: #f8fafc;
  --dev-text-secondary: #cbd5e1;
  --dev-text-muted: #8492a6;
  --dev-text-dim: #4f5d75;

  --dev-primary: #06b6d4;
  --dev-primary-glow: rgba(6, 182, 212, 0.25);
  --dev-accent: #3b82f6;
  --dev-accent-purple: #a855f7;
  
  --dev-success: #10b981;
  --dev-success-bg: rgba(16, 185, 129, 0.12);
  --dev-warning: #f59e0b;
  --dev-warning-bg: rgba(245, 158, 11, 0.12);
  --dev-danger: #ef4444;
  --dev-danger-bg: rgba(239, 68, 68, 0.12);

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', Menlo, Monaco, Consolas, monospace;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html.dev-html,
html:has(body.dev-body) {
  height: auto !important;
  min-height: 100% !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

body.dev-body {
  background-color: var(--dev-bg);
  color: var(--dev-text-main);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  position: relative;
  min-height: 100vh;
  height: auto !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

/* Background grid & glowing ambient orbs */
.dev-bg-grid {
  position: fixed;
  inset: 0;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

.dev-glow-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  z-index: 0;
}

.dev-glow-1 {
  width: 500px;
  height: 500px;
  top: -150px;
  left: 20%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.15) 0%, transparent 70%);
}

.dev-glow-2 {
  width: 450px;
  height: 450px;
  bottom: -100px;
  right: 15%;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.12) 0%, transparent 70%);
}

.dev-glow-dashboard {
  width: 700px;
  height: 700px;
  top: -200px;
  right: 10%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.08) 0%, rgba(6, 182, 212, 0.06) 50%, transparent 75%);
}

/* Typography utilities */
.font-mono { font-family: var(--font-mono); }
.font-bold { font-weight: 700; }
.text-muted { color: var(--dev-text-muted); }
.text-secondary { color: var(--dev-text-secondary); }
.text-cyan { color: var(--dev-primary); }
.text-green { color: var(--dev-success); }
.text-center { text-align: center; }
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.flex-1 { flex: 1 1 0%; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-5 { gap: 20px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mt-2 { margin-top: 8px; }
.py-6 { padding-top: 24px; padding-bottom: 24px; }
.p-3 { padding: 12px; }
.p-4 { padding: 16px; }
.hidden { display: none; }

/* ==========================================================================
   DEVELOPER LOGIN PAGE STYLES — ULTRA MODERN & RESPONSIVE
   ========================================================================== */

.dev-login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: clamp(16px, 4vw, 32px);
  position: relative;
  overflow-x: hidden;
  background: #06080d;
}

/* Dynamic Cyber Mesh Grid with Radial Fade */
.dev-bg-grid {
  position: fixed;
  inset: 0;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 36px 36px;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(circle at 50% 50%, black 45%, transparent 88%);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, black 45%, transparent 88%);
}

/* Floating Ambient Neon Orbs */
.dev-glow-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.75;
}

.dev-glow-1 {
  width: clamp(320px, 45vw, 550px);
  height: clamp(320px, 45vw, 550px);
  top: -120px;
  left: 15%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.22) 0%, rgba(139, 92, 246, 0.12) 50%, transparent 75%);
  animation: devOrbFloat1 18s ease-in-out infinite alternate;
}

.dev-glow-2 {
  width: clamp(300px, 40vw, 500px);
  height: clamp(300px, 40vw, 500px);
  bottom: -100px;
  right: 12%;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.18) 0%, rgba(37, 99, 235, 0.1) 50%, transparent 75%);
  animation: devOrbFloat2 15s ease-in-out infinite alternate;
}

@keyframes devOrbFloat1 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, 40px) scale(1.08); }
  100% { transform: translate(-25px, 20px) scale(0.95); }
}

@keyframes devOrbFloat2 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-35px, -30px) scale(1.06); }
  100% { transform: translate(20px, -20px) scale(0.92); }
}

/* Card Container */
.dev-login-container {
  width: 100%;
  max-width: 470px;
  position: relative;
  z-index: 10;
  margin: auto;
}

/* Glassmorphism Card with Cyber Glow */
.dev-login-card {
  position: relative;
  background: rgba(13, 17, 26, 0.82);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid rgba(59, 130, 246, 0.22);
  border-radius: clamp(16px, 3vw, 24px);
  padding: clamp(24px, 5vw, 36px);
  box-shadow: 
    0 25px 60px -12px rgba(0, 0, 0, 0.85),
    0 0 40px -10px rgba(6, 182, 212, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
}

/* Glowing Top Accent Bar */
.dev-card-accent-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2.5px;
  background: linear-gradient(90deg, transparent, #3b82f6 25%, #06b6d4 50%, #8b5cf6 75%, transparent);
}

/* Header / Brand */
.dev-login-header {
  text-align: center;
  margin-bottom: 22px;
}

.dev-brand-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  margin-bottom: 16px;
  padding: 6px 14px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all 0.25s ease;
}

.dev-brand-link:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(6, 182, 212, 0.3);
  transform: translateY(-1px);
}

.dev-lotus-badge {
  position: relative;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dev-lotus-ring {
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1px dashed rgba(6, 182, 212, 0.5);
  animation: devSpinRing 20s linear infinite;
}

@keyframes devSpinRing {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.dev-lotus-icon {
  width: 100%;
  height: 100%;
}

.dev-lotus-char {
  position: absolute;
  font-family: serif;
  font-weight: 700;
  font-size: 15px;
  color: #ffffff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.9);
}

.dev-brand-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.dev-brand-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--dev-text-main);
  letter-spacing: -0.2px;
}

.dev-beacon {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-family: var(--font-mono);
  color: #10b981;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.dev-beacon-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: devPulse 2s infinite ease-in-out;
}

@keyframes devPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.dev-login-heading {
  font-size: clamp(20px, 4vw, 23px);
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 6px;
  letter-spacing: -0.4px;
}

.dev-login-desc {
  font-size: clamp(12px, 2.5vw, 13px);
  color: var(--dev-text-muted);
  line-height: 1.5;
  margin-bottom: 14px;
  max-width: 380px;
  margin-left: auto;
  margin-right: auto;
}

.dev-security-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.22);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
  color: #a5f3fc;
}

.dev-security-pill svg {
  color: var(--dev-primary);
  flex-shrink: 0;
}

/* Alert Box */
.dev-alert-box {
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 12.5px;
  margin-bottom: 16px;
  line-height: 1.45;
  display: flex;
  align-items: center;
  gap: 9px;
  animation: devFadeIn 0.25s ease;
}

@keyframes devFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.dev-alert-box.error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

.dev-alert-box.success {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #86efac;
}

/* Form Layout */
.dev-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.dev-input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dev-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--dev-text-secondary);
  letter-spacing: 0.3px;
  font-family: var(--font-mono);
}

.dev-hint {
  font-size: 10px;
  color: var(--dev-text-dim);
  font-family: var(--font-mono);
  font-weight: normal;
}

.dev-input-capsule {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(8, 12, 19, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 10px;
  transition: all 0.25s ease;
  overflow: hidden;
}

.dev-input-capsule:focus-within {
  border-color: #06b6d4;
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.2), 0 0 15px rgba(6, 182, 212, 0.12);
  background: rgba(10, 16, 26, 0.9);
}

.dev-input-icon {
  margin-left: 12px;
  color: var(--dev-text-dim);
  flex-shrink: 0;
  transition: color 0.2s ease;
}

.dev-input-capsule:focus-within .dev-input-icon {
  color: #06b6d4;
}

.dev-input-capsule input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 11px 12px;
  color: #ffffff;
  font-size: 13.5px;
  font-family: inherit;
  min-width: 0;
}

.dev-input-capsule input::placeholder {
  color: var(--dev-text-dim);
}

.dev-toggle-eye {
  background: transparent;
  border: none;
  color: var(--dev-text-dim);
  cursor: pointer;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.dev-toggle-eye:hover {
  color: var(--dev-text-main);
}

/* Options / Remember Row */
.dev-form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--dev-text-muted);
  margin-top: -2px;
}

.dev-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  color: var(--dev-text-secondary);
}

.dev-checkbox-label input[type="checkbox"] {
  accent-color: #06b6d4;
  width: 14px;
  height: 14px;
  cursor: pointer;
}

.dev-session-badge {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--dev-text-dim);
}

/* Submit Action Button */
.dev-submit-btn {
  position: relative;
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 50%, #06b6d4 100%);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 12px 18px;
  font-size: 13.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 18px rgba(37, 99, 235, 0.35);
  margin-top: 4px;
  overflow: hidden;
}

.dev-submit-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.6s ease;
}

.dev-submit-btn:hover::before {
  left: 100%;
}

.dev-submit-btn:hover {
  filter: brightness(1.12);
  transform: translateY(-1.5px);
  box-shadow: 0 6px 22px rgba(6, 182, 212, 0.4);
}

.dev-submit-btn:active {
  transform: translateY(0);
}

.dev-submit-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.dev-btn-arrow {
  transition: transform 0.2s ease;
}

.dev-submit-btn:hover .dev-btn-arrow {
  transform: translateX(3px);
}

/* Cyber Terminal Telemetry HUD */
.dev-terminal-box {
  background: #040609;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  margin-top: 20px;
  overflow: hidden;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.6);
}

.dev-terminal-header {
  background: #080c13;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 7px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.terminal-dots {
  display: flex;
  gap: 5px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.dot.red { background: #ef4444; }
.dot.yellow { background: #f59e0b; }
.dot.green { background: #10b981; }

.terminal-title {
  font-size: 10.5px;
  font-family: var(--font-mono);
  color: var(--dev-text-dim);
  letter-spacing: 0.3px;
}

.terminal-status-chip {
  font-size: 9.5px;
  font-family: var(--font-mono);
  color: #10b981;
}

.dev-terminal-body {
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #94a3b8;
  display: flex;
  flex-direction: column;
  gap: 5px;
  line-height: 1.45;
}

.term-line {
  display: flex;
  align-items: baseline;
  gap: 6px;
  word-break: break-all;
}

.term-tag {
  font-weight: 700;
  font-size: 10px;
}
.term-tag.tag-cyan { color: #06b6d4; }
.term-tag.tag-blue { color: #3b82f6; }
.term-tag.tag-green { color: #10b981; }
.term-tag.tag-red { color: #ef4444; }

.dev-cursor {
  display: inline-block;
  color: #06b6d4;
  animation: devBlink 1s infinite steps(2, start);
}

@keyframes devBlink {
  to { visibility: hidden; }
}

/* Footer Section */
.dev-login-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 11px;
  color: var(--dev-text-dim);
}

.dev-back-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--dev-primary);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
}

.dev-back-link:hover {
  color: #38bdf8;
  transform: translateX(-2px);
}

/* Shake Animation on Error */
@keyframes devShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

.dev-card-shake {
  animation: devShake 0.4s ease;
}

/* Media Queries for Maximum Mobile / Tablet Responsiveness */
@media (max-width: 480px) {
  .dev-login-body {
    padding: 12px;
  }
  .dev-login-card {
    padding: 20px 16px;
  }
  .dev-form-options {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .dev-login-footer {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
  .dev-terminal-body {
    padding: 8px 10px;
    font-size: 10px;
  }
}

.dev-back-link:hover {
  text-decoration: underline;
}

/* ==========================================================================
   DASHBOARD CONSOLE STYLES
   ========================================================================== */

.dev-topbar {
  position: sticky;
  top: 0;
  height: 60px;
  background: rgba(14, 18, 27, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--dev-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 100;
}

.dev-topbar-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.dev-topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.dev-brand-text-col {
  display: flex;
  flex-direction: column;
}

.dev-brand-main {
  font-size: 14px;
  font-weight: 800;
  color: #ffffff;
}

.dev-highlight {
  color: var(--dev-primary);
}

.dev-brand-sub {
  font-size: 10.5px;
  color: var(--dev-text-dim);
}

.dev-status-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  color: #86efac;
}

.status-pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

.dev-topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.dev-action-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--dev-text-muted);
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid var(--dev-border);
  background: var(--dev-bg);
  transition: all 0.2s ease;
}

.dev-action-link:hover {
  color: var(--dev-text-main);
  border-color: var(--dev-border-glow);
}

.dev-user-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 4px 10px;
  background: var(--dev-bg);
  border: 1px solid var(--dev-border);
  border-radius: 20px;
}

.dev-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
}

.dev-user-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.dev-user-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--dev-text-main);
}

.dev-user-role {
  font-size: 10px;
  color: var(--dev-text-dim);
}

.dev-logout-btn {
  background: transparent;
  border: 1px solid var(--dev-border);
  color: var(--dev-text-muted);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dev-logout-btn:hover {
  background: var(--dev-danger-bg);
  color: var(--dev-danger);
  border-color: rgba(239, 68, 68, 0.4);
}

.dev-mobile-toggle {
  display: none;
  background: var(--dev-bg-card);
  border: 1px solid var(--dev-border);
  color: var(--dev-text-main);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.dev-mobile-toggle:hover {
  background: var(--dev-bg-hover);
  border-color: var(--dev-primary);
  color: var(--dev-primary);
}

.dev-sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 998;
}

/* Layout */
.dev-layout {
  display: flex;
  min-height: calc(100vh - 60px);
  width: 100%;
  position: relative;
  overflow-y: visible;
}

/* Sidebar */
.dev-sidebar {
  width: 260px;
  flex-shrink: 0;
  background: var(--dev-bg-surface);
  border-right: 1px solid var(--dev-border);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px 12px;
  position: sticky;
  top: 60px;
  height: calc(100vh - 60px);
  overflow-y: auto;
  z-index: 40;
}

.dev-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dev-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--dev-text-muted);
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
  width: 100%;
}

.dev-nav-item:hover {
  background: var(--dev-bg-hover);
  color: var(--dev-text-main);
}

.dev-nav-item.active {
  background: rgba(6, 182, 212, 0.1);
  color: var(--dev-primary);
  border: 1px solid rgba(6, 182, 212, 0.25);
}

.dev-nav-item svg {
  color: inherit;
  flex-shrink: 0;
}

.nav-badge {
  margin-left: auto;
  font-size: 10.5px;
  font-family: var(--font-mono);
  background: var(--dev-bg);
  border: 1px solid var(--dev-border);
  color: var(--dev-text-secondary);
  padding: 1px 6px;
  border-radius: 10px;
}

.dev-sidebar-footer {
  padding-top: 14px;
  border-top: 1px solid var(--dev-border-subtle);
}

.dev-gateway-info {
  background: var(--dev-bg);
  border: 1px solid var(--dev-border-subtle);
  border-radius: 8px;
  padding: 8px 10px;
}

.gw-label {
  font-size: 10px;
  color: var(--dev-text-dim);
  margin-bottom: 2px;
}

.gw-url {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--dev-primary);
  word-break: break-all;
}

/* Main Content */
.dev-main {
  flex: 1;
  min-width: 0;
  padding: 28px 32px;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  overflow-y: visible;
}

.dev-tab-pane {
  display: none;
  animation: devTabFadeIn 0.2s ease;
}

.dev-tab-pane.active {
  display: block;
}

@keyframes devTabFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.dev-pane-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
}

.dev-pane-title {
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.3px;
  margin-bottom: 4px;
}

.dev-pane-sub {
  font-size: 13px;
  color: var(--dev-text-muted);
}

/* Buttons */
.dev-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.dev-btn.full-width {
  width: 100%;
}

.dev-btn-primary {
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.25);
}

.dev-btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.dev-btn-secondary {
  background: var(--dev-bg-card);
  color: var(--dev-text-main);
  border-color: var(--dev-border);
}

.dev-btn-secondary:hover {
  background: var(--dev-bg-hover);
  border-color: var(--dev-border-glow);
}

.dev-btn-outline {
  background: transparent;
  border-color: var(--dev-border);
  color: var(--dev-text-secondary);
}

.dev-btn-outline:hover {
  background: var(--dev-bg-hover);
  color: #ffffff;
}

.dev-btn-outline.danger:hover {
  background: var(--dev-danger-bg);
  border-color: rgba(239, 68, 68, 0.4);
  color: var(--dev-danger);
}

.dev-btn-link {
  background: transparent;
  border: none;
  color: var(--dev-primary);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.dev-btn-link:hover {
  text-decoration: underline;
}

/* Cards */
.dev-card {
  background: var(--dev-bg-surface);
  border: 1px solid var(--dev-border);
  border-radius: 12px;
  overflow: hidden;
}

.dev-card-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--dev-border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dev-card-title {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
}

.dev-card-sub {
  font-size: 11.5px;
  color: var(--dev-text-muted);
  margin-top: 2px;
}

/* Stats Grid */
.dev-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.dev-stat-card {
  background: var(--dev-bg-surface);
  border: 1px solid var(--dev-border);
  border-radius: 12px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.2s ease;
}

.dev-stat-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}

.stat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stat-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--dev-text-muted);
}

.stat-icon-wrap {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-icon-wrap.blue { background: rgba(37, 99, 235, 0.15); color: #3b82f6; }
.stat-icon-wrap.cyan { background: rgba(6, 182, 212, 0.15); color: #06b6d4; }
.stat-icon-wrap.purple { background: rgba(168, 85, 247, 0.15); color: #a855f7; }
.stat-icon-wrap.amber { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }

.stat-value {
  font-size: 26px;
  font-weight: 800;
  color: #ffffff;
  font-family: var(--font-mono);
  letter-spacing: -0.5px;
}

.stat-unit {
  font-size: 13px;
  font-weight: 500;
  color: var(--dev-text-muted);
  margin-left: 4px;
}

.stat-footer {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
}

.stat-footer.positive { color: #86efac; }
.stat-footer.neutral { color: var(--dev-text-dim); }

/* Banner Card */
.dev-banner-card {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(6, 182, 212, 0.08));
  border: 1px solid rgba(6, 182, 212, 0.3);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.banner-badge {
  display: inline-block;
  background: rgba(6, 182, 212, 0.2);
  border: 1px solid rgba(6, 182, 212, 0.4);
  color: var(--dev-primary);
  font-size: 10.5px;
  font-weight: 700;
  font-family: var(--font-mono);
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
}

.banner-heading {
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 6px;
}

.banner-desc {
  font-size: 13px;
  color: var(--dev-text-secondary);
  max-width: 680px;
  line-height: 1.5;
  margin-bottom: 14px;
}

.banner-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.b-tag {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--dev-border);
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 11px;
  color: var(--dev-text-muted);
  font-family: var(--font-mono);
}

.banner-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Notice Box */
.dev-notice-box {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.25);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 12.5px;
  color: var(--dev-text-secondary);
  margin-bottom: 20px;
  line-height: 1.4;
}

.dev-notice-box svg {
  color: var(--dev-primary);
  flex-shrink: 0;
  margin-top: 1px;
}

.dev-notice-box.warning {
  background: var(--dev-warning-bg);
  border-color: rgba(245, 158, 11, 0.35);
  color: #fde68a;
}

.dev-notice-box.warning svg {
  color: var(--dev-warning);
}

/* Tables */
.dev-table-wrap {
  overflow-x: auto;
}

.dev-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  text-align: left;
}

.dev-table th {
  background: var(--dev-bg);
  color: var(--dev-text-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--dev-border-subtle);
  white-space: nowrap;
}

.dev-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--dev-border-subtle);
  color: var(--dev-text-main);
  vertical-align: middle;
}

.dev-table tr:last-child td {
  border-bottom: none;
}

.dev-table tr:hover td {
  background: var(--dev-bg-card);
}

/* Badges */
.badge-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-mono);
}

.status-ok { background: var(--dev-success-bg); color: #86efac; border: 1px solid rgba(16, 185, 129, 0.3); }
.status-err { background: var(--dev-danger-bg); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.3); }
.status-revoked { background: rgba(148, 163, 184, 0.1); color: #94a3b8; border: 1px solid rgba(148, 163, 184, 0.2); }

.badge-method {
  display: inline-block;
  background: rgba(37, 99, 235, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(37, 99, 235, 0.3);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10.5px;
  font-family: var(--font-mono);
  font-weight: 700;
}

.badge-env {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font-mono);
}

.env-live { background: rgba(16, 185, 129, 0.15); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.3); }
.env-test { background: rgba(245, 158, 11, 0.15); color: #fcd34d; border: 1px solid rgba(245, 158, 11, 0.3); }

.scopes-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.badge-scope {
  font-size: 10.5px;
  font-family: var(--font-mono);
  background: var(--dev-bg);
  border: 1px solid var(--dev-border);
  color: var(--dev-text-muted);
  padding: 1px 6px;
  border-radius: 4px;
}

.key-prefix-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--dev-bg);
  border: 1px solid var(--dev-border);
  padding: 3px 8px;
  border-radius: 6px;
}

.btn-copy-small {
  background: transparent;
  border: 1px solid var(--dev-border);
  color: var(--dev-text-muted);
  border-radius: 5px;
  padding: 3px 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  transition: all 0.15s ease;
}

.btn-copy-small:hover {
  background: var(--dev-bg-hover);
  color: #ffffff;
  border-color: var(--dev-primary);
}

.key-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-action-revoke {
  background: transparent;
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: var(--dev-warning);
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-action-revoke:hover {
  background: var(--dev-warning-bg);
}

.btn-action-delete {
  background: transparent;
  border: 1px solid var(--dev-border);
  color: var(--dev-text-dim);
  padding: 4px 6px;
  border-radius: 5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.btn-action-delete:hover {
  background: var(--dev-danger-bg);
  color: var(--dev-danger);
  border-color: rgba(239, 68, 68, 0.4);
}

/* ==========================================================================
   PLAYGROUND STYLES
   ========================================================================== */

.playground-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 20px;
}

@media (max-width: 900px) {
  .playground-grid {
    grid-template-columns: 1fr;
  }
}

.pg-form-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dev-select, .dev-input, .dev-textarea {
  width: 100%;
  background: var(--dev-bg);
  border: 1px solid var(--dev-border);
  border-radius: 8px;
  padding: 9px 12px;
  color: #ffffff;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: all 0.2s ease;
}

.dev-select:focus, .dev-input:focus, .dev-textarea:focus {
  border-color: var(--dev-primary);
  box-shadow: 0 0 0 3px var(--dev-primary-glow);
}

.dev-textarea {
  resize: vertical;
  line-height: 1.5;
}

.slider-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.slider-val {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--dev-primary);
  font-weight: 700;
}

.dev-slider {
  width: 100%;
  accent-color: var(--dev-primary);
  cursor: pointer;
}

.slider-subtext {
  font-size: 10px;
  color: var(--dev-text-dim);
  margin-top: 4px;
}

.playground-telemetry-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--dev-bg-surface);
  border: 1px solid var(--dev-border);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
}

.pg-badge-label { color: var(--dev-text-muted); }
.pg-badge-val { font-weight: 700; color: var(--dev-primary); }

.latency-pill {
  background: rgba(6, 182, 212, 0.15);
  color: var(--dev-primary);
  border: 1px solid rgba(6, 182, 212, 0.3);
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 4px;
}

.pg-output-box {
  min-height: 280px;
  max-height: 500px;
  overflow-y: auto;
  padding: 18px 20px;
  background: #06090e;
}

.pg-output-content {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--dev-text-secondary);
  white-space: pre-wrap;
  word-break: break-word;
}

.pg-diagnostics-footer {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 10px 18px;
  background: var(--dev-bg);
  border-top: 1px solid var(--dev-border-subtle);
  font-size: 11.5px;
  font-family: var(--font-mono);
}

.diag-item {
  display: flex;
  gap: 6px;
}

.diag-lbl { color: var(--dev-text-dim); }
.diag-val { color: var(--dev-text-main); font-weight: 600; }

/* ==========================================================================
   DOCUMENTATION STYLES
   ========================================================================== */

.endpoint-capsule {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--dev-bg);
  border: 1px solid var(--dev-border);
  padding: 10px 14px;
  border-radius: 8px;
}

.ep-method {
  background: rgba(37, 99, 235, 0.2);
  color: #60a5fa;
  border: 1px solid rgba(37, 99, 235, 0.4);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
}

.ep-method.ep-get {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
  border-color: rgba(16, 185, 129, 0.4);
}

.ep-url {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--dev-text-main);
  flex: 1;
}

.docs-lang-tabs {
  display: flex;
  gap: 6px;
}

.lang-tab-btn {
  background: transparent;
  border: none;
  color: var(--dev-text-muted);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.lang-tab-btn:hover {
  color: #ffffff;
}

.lang-tab-btn.active {
  background: var(--dev-bg);
  color: var(--dev-primary);
  border: 1px solid var(--dev-border);
}

.code-snippet-pane pre {
  margin: 0;
  padding: 20px;
  background: #05070b;
  overflow-x: auto;
}

.code-snippet-pane code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.6;
  color: #e2e8f0;
}

/* ==========================================================================
   MODALS
   ========================================================================== */

.dev-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.15s ease;
}

.dev-modal-card {
  width: 100%;
  max-width: 520px;
  background: var(--dev-bg-surface);
  border: 1px solid var(--dev-border);
  border-radius: 14px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
  overflow: hidden;
}

.dev-modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--dev-border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dev-modal-title {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
}

.dev-modal-close {
  background: transparent;
  border: none;
  color: var(--dev-text-muted);
  cursor: pointer;
  font-size: 16px;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dev-modal-close:hover {
  background: var(--dev-bg-hover);
  color: #ffffff;
}

.dev-modal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dev-modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--dev-border-subtle);
  background: var(--dev-bg);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.scopes-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.checkbox-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--dev-bg);
  border: 1px solid var(--dev-border);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 11.5px;
  font-family: var(--font-mono);
  color: var(--dev-text-secondary);
  cursor: pointer;
  user-select: none;
}

.checkbox-pill input {
  accent-color: var(--dev-primary);
}

.success-icon-badge {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.2);
  color: var(--dev-success);
  border: 1px solid rgba(16, 185, 129, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: bold;
}

.created-key-box {
  display: flex;
  gap: 8px;
}

.plain-key-input {
  color: #a5f3fc !important;
  font-weight: 600;
  background: #040810 !important;
}

/* Toast */
.dev-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--dev-bg-card);
  border: 1px solid var(--dev-border-glow);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  color: #ffffff;
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 13px;
  z-index: 2000;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideUp 0.2s ease;
}

@keyframes slideUp {
  from { transform: translateY(12px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ==========================================================================
   PLAN MANAGEMENT & TIERS STYLES
   ========================================================================== */

.plan-tiers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  padding: 18px 20px 24px;
}

.plan-tier-card {
  background: var(--dev-bg);
  border: 1px solid var(--dev-border);
  border-radius: 12px;
  padding: 20px;
  position: relative;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
}

.plan-tier-card:hover {
  border-color: var(--dev-border-glow);
  transform: translateY(-2px);
}

.plan-tier-card.featured {
  border-color: rgba(168, 85, 247, 0.4);
  background: linear-gradient(180deg, rgba(168, 85, 247, 0.05) 0%, var(--dev-bg) 100%);
}

.tier-badge-pill {
  display: inline-block;
  align-self: flex-start;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 6px;
  margin-bottom: 12px;
  background: var(--dev-bg-hover);
  color: var(--dev-text-muted);
  border: 1px solid var(--dev-border);
}

.tier-badge-pill.popular {
  background: rgba(168, 85, 247, 0.2);
  color: #c084fc;
  border-color: rgba(168, 85, 247, 0.4);
}

.tier-badge-pill.enterprise {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
  border-color: rgba(16, 185, 129, 0.4);
}

.tier-name {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 8px 0;
}

.tier-price {
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 16px;
}

.tier-price span {
  font-size: 12px;
  font-weight: 400;
  color: var(--dev-text-dim);
}

.tier-features-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 12.5px;
  color: var(--dev-text-secondary);
}

.tier-features-list li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tier-features-list li.disabled {
  color: var(--dev-text-dim);
  opacity: 0.6;
}

.tier-features-list .check-icon {
  color: #10b981;
  font-weight: bold;
}

.tier-features-list .cross-icon {
  color: #ef4444;
  font-weight: bold;
}

/* User & Plan Table Controls */
.dev-filter-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dev-search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.dev-search-input-wrap svg {
  position: absolute;
  left: 10px;
  color: var(--dev-text-dim);
  pointer-events: none;
}

.dev-search-input-wrap .dev-input {
  padding-left: 32px;
  width: 220px;
}

.dev-user-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dev-avatar-sm {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dev-user-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.user-display-name {
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
}

.user-email-text {
  font-size: 11.5px;
  color: var(--dev-text-dim);
  font-family: var(--font-mono);
}

/* Plan Pills */
.plan-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-family: var(--font-mono);
}

.plan-pill-free {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.plan-pill-pro {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.35);
}

.plan-pill-enterprise {
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.plan-action-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.inline-plan-select {
  padding: 5px 8px;
  font-size: 12px;
  background: var(--dev-bg);
  border: 1px solid var(--dev-border);
  border-radius: 6px;
  color: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
}

.inline-plan-select:focus {
  border-color: var(--dev-primary);
}

.plan-change-spinner {
  color: var(--dev-primary);
}

.spin-icon {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   CUSTOM CYBER POPUP MODAL (REPLACES NATIVE BROWSER CONFIRM & ALERT)
   ========================================================================== */

.dev-custom-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 14, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2500;
  padding: 16px;
  animation: modalFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.dev-custom-modal-card {
  position: relative;
  background: linear-gradient(180deg, rgba(18, 24, 38, 0.95) 0%, rgba(10, 14, 23, 0.98) 100%);
  border: 1px solid rgba(6, 182, 212, 0.35);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(6, 182, 212, 0.2);
  border-radius: 16px;
  padding: 28px 24px;
  max-width: 440px;
  width: 100%;
  text-align: center;
  overflow: hidden;
  animation: modalZoomIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalZoomIn {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.dev-modal-glow {
  position: absolute;
  top: -50px;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 100px;
  background: radial-gradient(ellipse, rgba(6, 182, 212, 0.4) 0%, transparent 70%);
  pointer-events: none;
}

.dev-custom-modal-icon-wrap {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.dev-custom-modal-icon-wrap.danger {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #ef4444;
  box-shadow: 0 0 25px rgba(239, 68, 68, 0.3);
}

.dev-custom-modal-icon-wrap.warning {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #f59e0b;
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.3);
}

.dev-custom-modal-icon-wrap.info {
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid rgba(6, 182, 212, 0.4);
  color: #06b6d4;
  box-shadow: 0 0 25px rgba(6, 182, 212, 0.3);
}

.dev-custom-modal-icon-wrap.success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #10b981;
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.3);
}

.dev-custom-modal-title {
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 8px;
  letter-spacing: -0.2px;
}

.dev-custom-modal-message {
  font-size: 13.5px;
  color: var(--dev-text-muted);
  line-height: 1.5;
  margin-bottom: 22px;
  word-break: break-word;
}

.dev-custom-modal-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.dev-custom-modal-actions .dev-btn {
  flex: 1;
  padding: 10px 16px;
  font-size: 13.5px;
}

/* ==========================================================================
   USER MANAGEMENT ACTION BUTTONS & MODALS
   ========================================================================== */

.dev-action-btn-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-icon-action {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: 1px solid var(--dev-border);
  background: var(--dev-bg);
  color: var(--dev-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.18s ease;
}

.btn-icon-action:hover {
  transform: translateY(-1px);
}

.btn-icon-action.edit:hover {
  background: rgba(6, 182, 212, 0.15);
  border-color: rgba(6, 182, 212, 0.4);
  color: #06b6d4;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.25);
}

.btn-icon-action.key:hover {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.4);
  color: #fbbf24;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.25);
}

.btn-icon-action.danger:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: #ef4444;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.25);
}

/* Modal Headers & Badges */
.dev-modal-icon-badge {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.2), rgba(6, 182, 212, 0.2));
  border: 1px solid rgba(6, 182, 212, 0.35);
  color: #06b6d4;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dev-modal-icon-badge.key {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(234, 179, 8, 0.2));
  border-color: rgba(245, 158, 11, 0.4);
  color: #fbbf24;
}

.dev-notice-box {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 8px;
  padding: 12px 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12.5px;
  color: #bfdbfe;
  line-height: 1.4;
}

.dev-notice-box svg {
  color: #60a5fa;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ==========================================================================
   WEBSITE SETTINGS STUDIO & BRAND AUTO-FRAMING
   ========================================================================== */

/* Sub-tabs Navigation Bar */
.settings-subtabs-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(14, 18, 27, 0.7);
  border: 1px solid var(--dev-border);
  border-radius: 12px;
  padding: 6px;
  margin-bottom: 24px;
  overflow-x: auto;
  scrollbar-width: none;
}

.settings-subtabs-nav::-webkit-scrollbar {
  display: none;
}

.settings-subtab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--dev-text-muted);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.settings-subtab-btn svg {
  color: var(--dev-text-dim);
  transition: color 0.2s ease;
}

.settings-subtab-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.04);
}

.settings-subtab-btn.active {
  background: rgba(6, 182, 212, 0.12);
  border-color: rgba(6, 182, 212, 0.35);
  color: #38bdf8;
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.15);
}

.settings-subtab-btn.active svg {
  color: #38bdf8;
}

.settings-subtab-btn.studio-pill-link {
  margin-left: auto;
  border-color: rgba(6, 182, 212, 0.2);
  color: #06b6d4;
  background: rgba(6, 182, 212, 0.05);
}

.settings-subtab-btn.studio-pill-link:hover {
  background: rgba(6, 182, 212, 0.15);
  border-color: #06b6d4;
  color: #ffffff;
}

/* Subtab Content Panes */
.settings-subtab-content {
  display: none;
}

.settings-subtab-content.active {
  display: block;
  animation: devFadeIn 0.22s ease-out;
}

/* Card Content Padded */
.card-content-padded {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Two-column grid for clean settings */
.settings-two-col-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.full-width-span {
  grid-column: 1 / -1;
}

/* Toggles Grid */
.settings-toggles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}

.settings-bottom-bar {
  margin-top: 24px;
}

/* Brand Studio Container & Layouts */
.brand-studio-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.brand-config-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 20px;
}

.brand-assets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 24px;
}

.studio-badge-pill {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: #06b6d4;
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.28);
  padding: 3px 10px;
  border-radius: 12px;
  font-family: var(--font-mono, monospace);
}

.brand-bottom-actions {
  margin-top: 8px;
}

.settings-studio-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

.settings-form-col,
.settings-studio-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.settings-toggles-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.dev-switch-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: var(--dev-bg);
  border: 1px solid var(--dev-border);
  border-radius: 10px;
  padding: 12px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dev-switch-card:hover {
  border-color: var(--dev-border-glow);
  background: var(--dev-bg-hover);
}

.switch-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.switch-title {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
}

.switch-sub {
  font-size: 11px;
  color: var(--dev-text-dim);
}

.dev-toggle {
  appearance: none;
  -webkit-appearance: none;
  width: 44px;
  height: 24px;
  background: #1e293b;
  border-radius: 12px;
  position: relative;
  outline: none;
  cursor: pointer;
  transition: background 0.25s ease;
  flex-shrink: 0;
  border: 1px solid var(--dev-border);
}

.dev-toggle::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #94a3b8;
  transition: transform 0.25s ease, background 0.25s ease;
}

.dev-toggle:checked {
  background: #0284c7;
  border-color: #38bdf8;
}

.dev-toggle:checked::before {
  transform: translateX(20px);
  background: #ffffff;
}

/* Frame Style Picker (4 choices) */
.frame-style-picker {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 4px;
}

.frame-option {
  cursor: pointer;
}

.frame-option input {
  display: none;
}

.frame-option-card {
  background: var(--dev-bg);
  border: 1.5px solid var(--dev-border);
  border-radius: 10px;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all 0.2s ease;
  height: 100%;
}

.frame-option-card:hover {
  border-color: var(--dev-border-glow);
  transform: translateY(-2px);
}

.frame-option input:checked + .frame-option-card {
  background: rgba(6, 182, 212, 0.08);
  border-color: #06b6d4;
  box-shadow: 0 0 16px rgba(6, 182, 212, 0.25);
}

.frame-option-card span {
  font-size: 12.5px;
  font-weight: 700;
  color: #ffffff;
  margin-top: 8px;
}

.frame-option-card small {
  font-size: 10.5px;
  color: var(--dev-text-dim);
  margin-top: 2px;
}

/* Shape Mini Icons */
.frame-shape-mini {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.3), rgba(37, 99, 235, 0.3));
  border: 1.5px solid #06b6d4;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.shield-mini {
  clip-path: polygon(50% 0%, 100% 20%, 100% 80%, 50% 100%, 0% 80%, 0% 20%);
}

.squircle-mini {
  border-radius: 35%;
}

.hexa-mini {
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

.lotus-mini {
  border-radius: 50% 0 50% 0;
  transform: rotate(45deg);
}

/* Frame Color Picker */
.color-picker-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--dev-bg);
  border: 1px solid var(--dev-border);
  border-radius: 8px;
  padding: 8px 12px;
}

.dev-color-input {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  background: transparent;
}

.dev-color-input::-webkit-color-swatch-wrapper {
  padding: 0;
}

.dev-color-input::-webkit-color-swatch {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
}

.color-code {
  font-size: 12px;
  color: var(--dev-text-main);
  font-weight: 600;
  min-width: 65px;
}

.preset-colors {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.preset-btn {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.preset-btn:hover {
  transform: scale(1.2);
}

/* Upload Sections */
.upload-studio-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--dev-bg);
  border: 1px solid var(--dev-border-subtle);
  border-radius: 12px;
  padding: 16px;
}

.studio-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.studio-section-title {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
}

.studio-section-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: #06b6d4;
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid rgba(6, 182, 212, 0.3);
  padding: 2px 8px;
  border-radius: 12px;
}

.upload-dropzone {
  border: 2px dashed rgba(6, 182, 212, 0.3);
  background: rgba(6, 182, 212, 0.02);
  border-radius: 10px;
  padding: 20px 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--dev-text-muted);
}

.upload-dropzone:hover {
  border-color: #06b6d4;
  background: rgba(6, 182, 212, 0.06);
  color: #ffffff;
}

.upload-dropzone svg {
  color: #06b6d4;
}

.dropzone-text {
  font-size: 12.5px;
  line-height: 1.4;
}

.dropzone-sub {
  display: block;
  font-size: 10.5px;
  color: var(--dev-text-dim);
  margin-top: 2px;
}

/* Framed Preview Box */
.framed-preview-box {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(14, 18, 27, 0.6);
  border: 1px solid var(--dev-border);
  border-radius: 10px;
  padding: 12px 14px;
}

.framed-preview-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  flex-shrink: 0;
}

.canvas-downscale-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 9.5px;
  font-family: var(--font-mono, monospace);
  color: #38bdf8;
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.22);
  border-radius: 4px;
  padding: 2px 6px;
  white-space: nowrap;
}

.preview-stage {
  width: 80px;
  height: 80px;
  background: #080c14;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.6);
  flex-shrink: 0;
}

.preview-stage.mini {
  width: 54px;
  height: 54px;
}

.framed-canvas {
  width: 68px;
  height: 68px;
  object-fit: contain;
}

.framed-canvas-mini {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.framed-preview-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.live-preview-label {
  font-size: 10.5px;
  color: var(--dev-text-dim);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.simulated-header-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #0e121b;
  border: 1px solid var(--dev-border);
  padding: 5px 12px;
  border-radius: 20px;
  max-width: 100%;
}

.sim-logo-img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.sim-logo-fallback {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: bold;
}

.sim-brand-title {
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.simulated-browser-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #1e2433;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 6px 10px;
  border-radius: 8px 8px 0 0;
  font-size: 11px;
  max-width: 240px;
}

.sim-tab-icon {
  width: 14px;
  height: 14px;
  object-fit: contain;
}

.sim-tab-fallback {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  background: #06b6d4;
  color: #ffffff;
  font-size: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sim-tab-title {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #cbd5e1;
}

.sim-tab-close {
  color: var(--dev-text-dim);
  font-size: 9px;
  margin-left: 4px;
}

.btn-reset-art {
  background: transparent;
  border: none;
  color: var(--dev-text-dim);
  font-size: 11px;
  text-decoration: underline;
  cursor: pointer;
  align-self: flex-start;
  padding: 0;
}

.btn-reset-art:hover {
  color: #38bdf8;
}

/* ==========================================================================
   TOUCH-FRIENDLY & RESPONSIVE MEDIA QUERIES (MOBILE, TABLET, DESKTOP)
   ========================================================================== */

.dev-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
}

.dev-table {
  min-width: 650px;
}

@media (max-width: 1024px) {
  .settings-studio-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

@media (max-width: 900px) {
  .dev-mobile-toggle {
    display: flex;
  }

  .dev-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    height: 100vh;
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 12px 0 40px rgba(0, 0, 0, 0.85);
  }

  .dev-sidebar.mobile-open {
    transform: translateX(0);
  }

  .dev-main {
    padding: 20px 16px;
  }

  .playground-grid {
    grid-template-columns: 1fr;
  }

  .settings-two-col-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .brand-config-grid,
  .brand-assets-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .dev-topbar {
    padding: 0 14px;
    height: 56px;
  }

  .dev-brand-sub,
  .dev-status-tag {
    display: none;
  }

  .dev-pane-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .dev-pane-header .dev-btn {
    width: 100%;
  }

  .dev-stats-grid {
    grid-template-columns: 1fr;
  }

  .dev-filter-controls {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .dev-search-input-wrap .dev-input {
    width: 100%;
  }

  .dev-custom-modal-card {
    padding: 22px 16px;
  }

  .dev-custom-modal-actions {
    flex-direction: column;
  }

  .dev-custom-modal-actions .dev-btn {
    width: 100%;
  }
}

/* ==========================================================================
   ANTI-INSPECTION & UI SECURITY HARDENING
   ========================================================================== */
body {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

/* Allow text selection only in user messages, AI responses, code blocks and input fields */
.chatgpt-user-bubble,
.message-body,
.message-body *,
.dev-code-block,
.code-container,
.code-container *,
input,
textarea,
[contenteditable="true"] {
  -webkit-user-select: text !important;
  -moz-user-select: text !important;
  -ms-user-select: text !important;
  user-select: text !important;
}

/* Disallow dragging of all images and logos */
img {
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  pointer-events: auto;
}

/* ==========================================================================
   CHATGPT AUTHENTIC PRICING PAGE PARITY (#pricing)
   ========================================================================== */
.pricing-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 15, 15, 0.96);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  z-index: 2200;
  overflow-y: auto;
  display: none;
  justify-content: center;
  align-items: flex-start;
  padding: 30px 16px 60px 16px;
  opacity: 0;
  pointer-events: none;
}

.pricing-modal-backdrop.active {
  display: flex !important;
  opacity: 1;
  pointer-events: auto;
  animation: fadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.pricing-modal-container {
  width: 100%;
  max-width: 1060px;
  display: flex;
  flex-direction: column;
  position: relative;
}

.pricing-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.pricing-brand-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pricing-lotus {
  font-size: 1.3rem;
  color: #ec4899;
}

.pricing-brand-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #ffffff;
}

.pricing-brand-badge {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #a1a1aa;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
}

.pricing-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pricing-close-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  transform: scale(1.05);
}

.pricing-header-center {
  text-align: center;
  margin-bottom: 32px;
}

.pricing-hero-title {
  font-size: 2.2rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.pricing-hero-sub {
  font-size: 1rem;
  color: #94a3b8;
  max-width: 600px;
  margin: 0 auto 24px auto;
  line-height: 1.5;
}

.pricing-tab-switcher {
  display: inline-flex;
  align-items: center;
  background: #262626;
  border: 1px solid #383838;
  border-radius: 28px;
  padding: 4px;
  gap: 4px;
}

.pricing-tab-btn {
  background: transparent;
  border: none;
  color: #9ca3af;
  font-size: 13.5px;
  font-weight: 600;
  padding: 8px 20px;
  border-radius: 24px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pricing-tab-btn.active {
  background: #3a3a3a;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.pricing-grid-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: stretch;
}

.pricing-plan-card {
  background: #1e1e1e;
  border: 1px solid #333333;
  border-radius: 18px;
  padding: 30px 24px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.pricing-plan-card:hover {
  border-color: #4b5563;
  transform: translateY(-2px);
}

.pricing-plan-card.featured-pro-card {
  border: 1.5px solid #10a37f;
  background: linear-gradient(180deg, rgba(16, 163, 127, 0.08) 0%, #1e1e1e 28%);
  box-shadow: 0 12px 35px rgba(16, 163, 127, 0.12);
}

.featured-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: #10a37f;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 4px 14px;
  border-radius: 12px;
}

.plan-card-top {
  margin-bottom: 22px;
}

.plan-tier-name {
  font-size: 1.45rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 6px;
}

.plan-tier-desc {
  font-size: 0.88rem;
  color: #94a3b8;
  line-height: 1.4;
  min-height: 40px;
  margin-bottom: 16px;
}

.plan-price-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.plan-price-amount {
  font-size: 1.95rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.plan-price-period {
  font-size: 0.88rem;
  color: #94a3b8;
}

.pricing-cta-btn {
  width: 100%;
  height: 44px;
  border-radius: 22px;
  font-size: 0.94rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 22px;
  border: none;
}

.pricing-cta-btn.disabled {
  background: #2a2a2a;
  color: #71717a;
  cursor: default;
  border: 1px solid #383838;
}

.pricing-cta-btn.btn-outline {
  background: transparent;
  color: #ffffff;
  border: 1px solid #444444;
}

.pricing-cta-btn.btn-outline:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: #666666;
}

.pricing-cta-btn.btn-highlight-pro {
  background: #10a37f;
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 16px rgba(16, 163, 127, 0.3);
}

.pricing-cta-btn.btn-highlight-pro:hover {
  background: #0e8d6e;
  transform: translateY(-1px);
}

.plan-divider {
  height: 1px;
  background: #2d2d2d;
  margin-bottom: 20px;
}

.plan-benefits-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}

.plan-benefits-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.88rem;
  color: #cbd5e1;
  line-height: 1.4;
}

.plan-benefits-list li svg {
  color: #10a37f;
  flex-shrink: 0;
  margin-top: 2px;
}

.pricing-trust-footer {
  text-align: center;
  margin-top: 36px;
  font-size: 0.88rem;
  color: #71717a;
}

.pricing-trust-footer a {
  color: #10a37f;
  text-decoration: underline;
}

@media (max-width: 900px) {
  .pricing-grid-container {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin: 0 auto;
  }
}

/* ==========================================================================
   CODE BLOCK ENHANCEMENTS & LIVE WEB PREVIEW / CANVAS ARTIFACTS
   ========================================================================== */
.code-block-wrapper {
  margin: 16px 0;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-code);
  border: 1px solid #333333;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.code-header {
  background: #1c1c1c;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #2b2b2b;
  font-size: 0.78rem;
  color: #94a3b8;
  flex-wrap: wrap;
  gap: 8px;
}

.code-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.code-lang-tag {
  font-family: var(--font-mono);
  font-weight: 600;
  text-transform: uppercase;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.72rem;
}

.code-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.code-pill-btn {
  background: transparent;
  border: 1px solid transparent;
  color: #94a3b8;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.73rem;
  padding: 3px 8px;
  border-radius: 6px;
  transition: all 0.15s ease;
  font-family: inherit;
}

.code-pill-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.code-pill-btn.active {
  background: #10a37f;
  color: #ffffff;
  font-weight: 600;
}

.code-pill-btn.preview-highlight {
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.3);
  background: rgba(56, 189, 248, 0.08);
}

.code-pill-btn.preview-highlight:hover {
  background: rgba(56, 189, 248, 0.18);
  color: #ffffff;
}

.code-inline-preview {
  width: 100%;
  height: 380px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
}

.code-inline-iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: #ffffff;
}

/* ==========================================================================
   FULLSCREEN WEB CANVAS / LIVE PREVIEW MODAL
   ========================================================================== */
.live-preview-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 14, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 2500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn 0.2s ease-out;
}

.live-preview-window {
  width: 96vw;
  height: 92vh;
  max-width: 1400px;
  background: #18181b;
  border: 1px solid #3f3f46;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85);
}

.preview-window-topbar {
  height: 52px;
  background: #202023;
  border-bottom: 1px solid #2e2e33;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
}

.preview-title-col {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 180px;
}

.preview-badge-lotus {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #10b981;
  font-size: 12px;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 3px 8px;
  border-radius: 6px;
}

.preview-doc-title {
  font-size: 12.5px;
  color: #e4e4e7;
  font-family: var(--font-mono);
  font-weight: 500;
}

.preview-browser-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #121215;
  border: 1px solid #323238;
  border-radius: 20px;
  padding: 4px 12px;
  flex: 1;
  max-width: 440px;
}

.preview-browser-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 2px;
  transition: transform 0.2s;
}

.preview-browser-btn:hover {
  color: #ffffff;
  transform: rotate(90deg);
}

.preview-simulated-url {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #94a3b8;
  font-family: var(--font-mono);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-simulated-url svg {
  color: #10b981;
}

.preview-window-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.preview-device-switcher {
  display: flex;
  align-items: center;
  background: #121215;
  border: 1px solid #323238;
  border-radius: 8px;
  padding: 2px;
}

.device-switch-btn {
  background: transparent;
  border: none;
  color: #71717a;
  padding: 5px 8px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: all 0.15s ease;
}

.device-switch-btn:hover {
  color: #e4e4e7;
}

.device-switch-btn.active {
  background: #27272a;
  color: #38bdf8;
}

.preview-top-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e4e4e7;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.preview-top-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.preview-window-close {
  background: transparent;
  border: none;
  color: #a1a1aa;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  transition: all 0.15s ease;
}

.preview-window-close:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.preview-iframe-viewport {
  flex: 1;
  background: #ffffff;
  display: flex;
  justify-content: center;
  align-items: stretch;
  overflow: hidden;
  margin: 0 auto;
  transition: max-width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  width: 100%;
}

.live-sandbox-frame {
  width: 100%;
  height: 100%;
  border: none;
  background: #ffffff;
}

/* ==========================================================================
   ATTACHMENT POPOVER MENU (+ BUTTON PARITY)
   ========================================================================== */
.attach-menu-popover {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 0;
  width: 256px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: rgba(33, 33, 33, 0.98);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  box-shadow: 0 20px 48px -4px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.08);
  padding: 6px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 3px;
  pointer-events: auto;
  box-sizing: border-box;
  transform-origin: bottom left;
  animation: attachMenuPop 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes attachMenuPop {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(6px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.attach-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  background: transparent;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  text-align: left;
  transition: background-color 0.15s ease, transform 0.12s ease;
  width: 100%;
  box-sizing: border-box;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.attach-menu-item:hover,
.attach-menu-item:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

.attach-menu-item:active {
  transform: scale(0.98);
}

.attach-menu-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #ececec;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.attach-menu-item:hover .attach-menu-icon,
.attach-menu-item:focus-visible .attach-menu-icon {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.attach-menu-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

.attach-title {
  font-size: 0.86rem;
  font-weight: 600;
  color: #ececec;
  line-height: 1.25;
}

.attach-desc {
  font-size: 0.72rem;
  color: #9ca3af;
  line-height: 1.2;
}

/* ==========================================================================
   ATTACHMENT PREVIEW CHIPS STRIP (ABOVE INPUT TEXTAREA)
   ========================================================================== */
.attachment-preview-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 4px 10px 4px;
  margin-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  max-height: 180px;
  overflow-y: auto;
}

.attachment-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #212121;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 6px 10px 6px 6px;
  max-width: 260px;
  position: relative;
  transition: all 0.15s ease;
}

.attachment-chip:hover {
  border-color: rgba(255, 255, 255, 0.22);
  background: #262626;
}

.attachment-thumb {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.attachment-doc-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #d1d5db;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.attachment-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
  flex: 1;
}

.attachment-name {
  font-size: 0.78rem;
  font-weight: 500;
  color: #ececec;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.attachment-size {
  font-size: 0.68rem;
  color: #8e8e8e;
}

.attachment-remove-btn {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #9ca3af;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  margin-left: 2px;
  transition: all 0.15s ease;
}

.attachment-remove-btn:hover {
  background: #ef4444;
  color: #ffffff;
}

/* User Message Attachments in History */
.message-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.msg-image-thumb {
  max-width: 220px;
  max-height: 220px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.msg-image-thumb:hover {
  transform: scale(1.02);
}

.msg-doc-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 6px 12px;
  font-size: 0.82rem;
  color: #ececec;
}

/* ==========================================================================
   DIRECT CAMERA SNAPSHOT CAPTURE MODAL
   ========================================================================== */
.camera-modal-backdrop {
  z-index: 2600 !important;
  display: none;
  opacity: 0;
  pointer-events: none;
}

.camera-modal-backdrop.active {
  display: flex !important;
  opacity: 1;
  pointer-events: auto;
}

.camera-modal-dialog {
  background: #212121;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  width: 100%;
  max-width: 540px;
  padding: 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.camera-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.camera-modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #ececec;
}

.camera-modal-title-wrap h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
}

.camera-modal-close {
  background: transparent;
  border: none;
  color: #8e8e8e;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.camera-modal-close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.camera-preview-body {
  position: relative;
  width: 100%;
}

.camera-video-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #0d0d0d;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

#cameraVideo,
#cameraSnapshotPreview {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.camera-loading,
.camera-error-msg {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 20px;
  text-align: center;
  color: #b4b4b4;
  font-size: 0.88rem;
  background: #121212;
}

.camera-error-msg {
  color: #f87171;
}

.camera-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: #ececec;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.camera-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.btn-camera-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  border: none;
}

.btn-camera-secondary {
  background: #2f2f2f;
  color: #ececec;
}

.btn-camera-secondary:hover {
  background: #3a3a3a;
  color: #ffffff;
}

.btn-camera-primary {
  background: #ffffff;
  color: #0d0d0d;
}

.btn-camera-primary:hover {
  background: #e5e5e5;
  transform: scale(1.02);
}

/* ============================================================================
   COMPREHENSIVE LIGHT MODE THEME ENGINE
   Applies to all application pages EXCEPT Developer Portal (.dev-html / .dev-body)
   ============================================================================ */

html:not(.dev-html)[data-theme="light"],
body:not(.dev-body)[data-theme="light"] {
  --bg-canvas: #ffffff;
  --bg-sidebar: #f9f9f9;
  --bg-surface: #f4f4f4;
  --bg-surface-hover: #ececec;
  --bg-surface-active: #e3e3e3;
  --bg-code: #f6f8fa;
  --bg-code-header: #eef1f5;

  --border-light: rgba(0, 0, 0, 0.08);
  --border-subtle: rgba(0, 0, 0, 0.12);
  --border-focus: rgba(0, 0, 0, 0.24);

  --text-primary: #0d0d0d;
  --text-secondary: #5d5d5d;
  --text-muted: #8e8e8e;
  --text-inverted: #ffffff;

  background-color: #ffffff;
  color: #0d0d0d;
}

/* Custom Scrollbars in Light Mode */
html:not(.dev-html)[data-theme="light"] ::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

html:not(.dev-html)[data-theme="light"] ::-webkit-scrollbar-track {
  background: transparent;
}

html:not(.dev-html)[data-theme="light"] ::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.16);
  border-radius: 99px;
}

html:not(.dev-html)[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.28);
}

/* App Canvas & Layout */
html:not(.dev-html)[data-theme="light"] .app-container {
  background-color: #ffffff;
}

html:not(.dev-html)[data-theme="light"] .chat-main {
  background-color: #ffffff;
}

/* Sidebar Light Mode */
html:not(.dev-html)[data-theme="light"] .sidebar {
  background-color: #f9f9f9;
  border-right: 1px solid #e5e7eb;
}

html:not(.dev-html)[data-theme="light"] .sidebar-brand-name {
  color: #111827;
}

html:not(.dev-html)[data-theme="light"] .sidebar-icon-btn {
  color: #4b5563;
}

html:not(.dev-html)[data-theme="light"] .sidebar-icon-btn:hover {
  background: #ececec;
  color: #111827;
}

html:not(.dev-html)[data-theme="light"] .sidebar-new-chat-btn,
html:not(.dev-html)[data-theme="light"] .sidebar-new-chat {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  color: #111827;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

html:not(.dev-html)[data-theme="light"] .sidebar-new-chat-btn:hover,
html:not(.dev-html)[data-theme="light"] .sidebar-new-chat:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
  color: #000000;
}

html:not(.dev-html)[data-theme="light"] .sidebar-search-box {
  background: #ffffff;
  border: 1px solid #e5e7eb;
}

html:not(.dev-html)[data-theme="light"] .sidebar-search-box input {
  color: #111827;
}

html:not(.dev-html)[data-theme="light"] .sidebar-search-box input::placeholder {
  color: #9ca3af;
}

html:not(.dev-html)[data-theme="light"] .history-date-heading {
  color: #9ca3af;
}

html:not(.dev-html)[data-theme="light"] .session-item {
  color: #374151;
}

html:not(.dev-html)[data-theme="light"] .session-item:hover {
  background-color: #ececec;
  color: #111827;
}

html:not(.dev-html)[data-theme="light"] .session-item.active {
  background-color: #e5e7eb;
  color: #111827;
  font-weight: 600;
}

html:not(.dev-html)[data-theme="light"] .session-action-btn {
  color: #6b7280;
}

html:not(.dev-html)[data-theme="light"] .session-action-btn:hover {
  background: #d1d5db;
  color: #111827;
}

html:not(.dev-html)[data-theme="light"] .sidebar-footer {
  border-top: 1px solid #e5e7eb;
  background-color: #f9f9f9;
}

html:not(.dev-html)[data-theme="light"] .user-profile-btn {
  color: #111827;
}

html:not(.dev-html)[data-theme="light"] .user-profile-btn:hover {
  background: #ececec;
}

html:not(.dev-html)[data-theme="light"] .user-profile-name {
  color: #111827;
}

html:not(.dev-html)[data-theme="light"] .user-profile-sub {
  color: #6b7280;
}

html:not(.dev-html)[data-theme="light"] .user-popover-menu {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
  color: #111827;
}

html:not(.dev-html)[data-theme="light"] .popover-item {
  color: #374151;
}

html:not(.dev-html)[data-theme="light"] .popover-item:hover {
  background: #f3f4f6;
  color: #111827;
}

html:not(.dev-html)[data-theme="light"] .popover-divider {
  border-top: 1px solid #e5e7eb;
}

/* Header Light Mode */
html:not(.dev-html)[data-theme="light"] .chatgpt-header {
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid #e5e7eb;
  color: #111827;
}

html:not(.dev-html)[data-theme="light"] .model-selector-btn {
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  color: #111827;
}

html:not(.dev-html)[data-theme="light"] .model-selector-btn:hover {
  background: #e5e7eb;
}

html:not(.dev-html)[data-theme="light"] .model-selector-popover {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.14);
}

html:not(.dev-html)[data-theme="light"] .model-option {
  color: #374151;
}

html:not(.dev-html)[data-theme="light"] .model-option:hover {
  background: #f3f4f6;
}

html:not(.dev-html)[data-theme="light"] .model-option.active {
  background: #eef2ff;
}

html:not(.dev-html)[data-theme="light"] .model-option-title {
  color: #111827;
}

html:not(.dev-html)[data-theme="light"] .model-option-desc {
  color: #6b7280;
}

html:not(.dev-html)[data-theme="light"] .header-icon-btn {
  color: #4b5563;
}

html:not(.dev-html)[data-theme="light"] .header-icon-btn:hover {
  background: #f3f4f6;
  color: #111827;
}

html:not(.dev-html)[data-theme="light"] .header-pill-btn {
  border: 1px solid #d1d5db;
  color: #374151;
}

html:not(.dev-html)[data-theme="light"] .header-pill-btn:hover {
  background: #f3f4f6;
  color: #111827;
}

/* Chat Empty State & Suggestions */
html:not(.dev-html)[data-theme="light"] .chat-empty-greeting {
  color: #111827;
}

html:not(.dev-html)[data-theme="light"] .suggested-prompt-card,
html:not(.dev-html)[data-theme="light"] .prompt-suggestion {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  color: #374151;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

html:not(.dev-html)[data-theme="light"] .suggested-prompt-card:hover,
html:not(.dev-html)[data-theme="light"] .prompt-suggestion:hover {
  background: #f9fafb;
  border-color: #cbd5e1;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

html:not(.dev-html)[data-theme="light"] .prompt-card-title {
  color: #111827;
}

html:not(.dev-html)[data-theme="light"] .prompt-card-sub {
  color: #6b7280;
}

/* Chat Messages Light Mode */
html:not(.dev-html)[data-theme="light"] .chatgpt-user-bubble {
  background: #f4f4f4;
  color: #0d0d0d;
  border: 1px solid #e5e7eb;
}

html:not(.dev-html)[data-theme="light"] .chatgpt-assistant-message {
  color: #0d0d0d;
}

html:not(.dev-html)[data-theme="light"] .chatgpt-assistant-avatar {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  color: #111827;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

html:not(.dev-html)[data-theme="light"] .chatgpt-markdown,
html:not(.dev-html)[data-theme="light"] .markdown-body {
  color: #0d0d0d;
}

html:not(.dev-html)[data-theme="light"] .markdown-body h1,
html:not(.dev-html)[data-theme="light"] .markdown-body h2,
html:not(.dev-html)[data-theme="light"] .markdown-body h3,
html:not(.dev-html)[data-theme="light"] .markdown-body h4,
html:not(.dev-html)[data-theme="light"] .markdown-body strong {
  color: #111827;
}

html:not(.dev-html)[data-theme="light"] .markdown-body p,
html:not(.dev-html)[data-theme="light"] .markdown-body li {
  color: #1f2937;
}

html:not(.dev-html)[data-theme="light"] .markdown-body blockquote {
  border-left-color: #cbd5e1;
  background: rgba(0, 0, 0, 0.03);
  color: #4b5563;
}

html:not(.dev-html)[data-theme="light"] .markdown-body table {
  border-color: #e5e7eb;
}

html:not(.dev-html)[data-theme="light"] .markdown-body th {
  background: #f3f4f6;
  color: #111827;
  border-color: #e5e7eb;
}

html:not(.dev-html)[data-theme="light"] .markdown-body td {
  border-color: #e5e7eb;
}

html:not(.dev-html)[data-theme="light"] .markdown-body pre {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

html:not(.dev-html)[data-theme="light"] .markdown-body code:not(pre code) {
  background: #f1f5f9;
  color: #0f172a;
  border: 1px solid #e2e8f0;
}

html:not(.dev-html)[data-theme="light"] .code-block-header {
  background: #eef2f6;
  border-bottom: 1px solid #e2e8f0;
  color: #475569;
}

html:not(.dev-html)[data-theme="light"] .code-block-copy-btn {
  color: #64748b;
}

html:not(.dev-html)[data-theme="light"] .code-block-copy-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

html:not(.dev-html)[data-theme="light"] .message-action-btn {
  color: #6b7280;
}

html:not(.dev-html)[data-theme="light"] .message-action-btn:hover {
  background: #f3f4f6;
  color: #111827;
}

/* Composer / Input Capsule */
html:not(.dev-html)[data-theme="light"] .composer-capsule {
  background: #f4f4f4;
  border: 1px solid #e5e7eb;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05);
}

html:not(.dev-html)[data-theme="light"] .composer-capsule:focus-within {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.09);
}

html:not(.dev-html)[data-theme="light"] .composer-textarea {
  color: #0d0d0d;
}

html:not(.dev-html)[data-theme="light"] .composer-textarea::placeholder {
  color: #9ca3af;
}

html:not(.dev-html)[data-theme="light"] .dock-action-btn {
  color: #6b7280;
}

html:not(.dev-html)[data-theme="light"] .dock-action-btn:hover {
  background: #e5e7eb;
  color: #111827;
}

html:not(.dev-html)[data-theme="light"] .dock-action-pill {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  color: #374151;
}

html:not(.dev-html)[data-theme="light"] .dock-action-pill:hover {
  background: #f9fafb;
  border-color: #cbd5e1;
}

html:not(.dev-html)[data-theme="light"] .dock-send-btn:disabled {
  background: #e5e7eb;
  color: #9ca3af;
}

html:not(.dev-html)[data-theme="light"] .dock-send-btn:not(:disabled) {
  background: #111827;
  color: #ffffff;
}

html:not(.dev-html)[data-theme="light"] .dock-stop-btn {
  background: #111827;
  color: #ffffff;
}

html:not(.dev-html)[data-theme="light"] .composer-disclaimer {
  color: #9ca3af;
}

html:not(.dev-html)[data-theme="light"] .attachment-chip {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  color: #1f2937;
}

/* Auth Modal Light Mode (#chatgptAuthModal) */
html:not(.dev-html)[data-theme="light"] .auth-modal-dialog {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.16);
}

html:not(.dev-html)[data-theme="light"] .modal-auth-title {
  color: #111827;
}

html:not(.dev-html)[data-theme="light"] .modal-auth-subtitle {
  color: #6b7280;
}

html:not(.dev-html)[data-theme="light"] .auth-modal-close {
  color: #6b7280;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
}

html:not(.dev-html)[data-theme="light"] .auth-modal-close:hover {
  background: #e5e7eb;
  color: #111827;
}

html:not(.dev-html)[data-theme="light"] .auth-modal-tabs {
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
}

html:not(.dev-html)[data-theme="light"] .auth-tab-btn {
  color: #6b7280;
}

html:not(.dev-html)[data-theme="light"] .auth-tab-btn.active {
  background: #ffffff;
  color: #111827;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

html:not(.dev-html)[data-theme="light"] .modal-label {
  color: #374151;
}

html:not(.dev-html)[data-theme="light"] .modal-input {
  background: #ffffff;
  border: 1px solid #d1d5db;
  color: #111827;
}

html:not(.dev-html)[data-theme="light"] .modal-input:focus {
  border-color: #10a37f;
  box-shadow: 0 0 0 3px rgba(16, 163, 127, 0.2);
}

html:not(.dev-html)[data-theme="light"] .modal-switch-text {
  color: #6b7280;
}

html:not(.dev-html)[data-theme="light"] .modal-auth-footer {
  border-top: 1px solid #e5e7eb;
  color: #6b7280;
}

html:not(.dev-html)[data-theme="light"] .modal-toggle-pwd {
  color: #6b7280;
}

/* Pricing / Upgrade Modal Light Mode (#upgradeModal) */
html:not(.dev-html)[data-theme="light"] .pricing-modal-backdrop {
  background: rgba(255, 255, 255, 0.95);
}

html:not(.dev-html)[data-theme="light"] .pricing-brand-title {
  color: #111827;
}

html:not(.dev-html)[data-theme="light"] .pricing-hero-title {
  color: #111827;
}

html:not(.dev-html)[data-theme="light"] .pricing-hero-sub {
  color: #6b7280;
}

html:not(.dev-html)[data-theme="light"] .pricing-tab-switcher {
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
}

html:not(.dev-html)[data-theme="light"] .pricing-tab-btn {
  color: #6b7280;
}

html:not(.dev-html)[data-theme="light"] .pricing-tab-btn.active {
  background: #ffffff;
  color: #111827;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

html:not(.dev-html)[data-theme="light"] .pricing-plan-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05);
}

html:not(.dev-html)[data-theme="light"] .pricing-plan-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

html:not(.dev-html)[data-theme="light"] .pricing-plan-card.featured-pro-card {
  background: linear-gradient(180deg, rgba(16, 163, 127, 0.06) 0%, #ffffff 30%);
  border-color: #10a37f;
  box-shadow: 0 10px 30px rgba(16, 163, 127, 0.12);
}

html:not(.dev-html)[data-theme="light"] .plan-tier-name {
  color: #111827;
}

html:not(.dev-html)[data-theme="light"] .plan-tier-desc {
  color: #6b7280;
}

html:not(.dev-html)[data-theme="light"] .plan-price-num {
  color: #111827;
}

html:not(.dev-html)[data-theme="light"] .plan-price-curr,
html:not(.dev-html)[data-theme="light"] .plan-price-period {
  color: #6b7280;
}

html:not(.dev-html)[data-theme="light"] .feature-item {
  color: #374151;
}

html:not(.dev-html)[data-theme="light"] .pricing-close-btn {
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  color: #6b7280;
}

html:not(.dev-html)[data-theme="light"] .pricing-close-btn:hover {
  background: #e5e7eb;
  color: #111827;
}

html:not(.dev-html)[data-theme="light"] .pricing-cta-btn.btn-outline {
  background: #ffffff;
  border: 1px solid #d1d5db;
  color: #111827;
}

html:not(.dev-html)[data-theme="light"] .pricing-cta-btn.btn-outline:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
}

html:not(.dev-html)[data-theme="light"] .pricing-trust-footer {
  color: #9ca3af;
}

/* Keyboard Shortcuts Modal Light Mode (#shortcutsModal) */
html:not(.dev-html)[data-theme="light"] .app-feature-dialog {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  color: #111827;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.16);
}

html:not(.dev-html)[data-theme="light"] .modal-feature-title {
  color: #111827;
}

html:not(.dev-html)[data-theme="light"] .shortcut-row {
  border-bottom: 1px solid #f3f4f6;
}

html:not(.dev-html)[data-theme="light"] .shortcut-key {
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  color: #111827;
}

html:not(.dev-html)[data-theme="light"] .shortcut-desc {
  color: #4b5563;
}

html:not(.dev-html)[data-theme="light"] .modal-btn-row {
  border-top: 1px solid #e5e7eb;
}

/* Camera Modal Light Mode (#cameraCaptureModal) */
html:not(.dev-html)[data-theme="light"] .camera-modal-dialog {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  color: #111827;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.16);
}

html:not(.dev-html)[data-theme="light"] .camera-modal-header {
  border-bottom: 1px solid #e5e7eb;
}

html:not(.dev-html)[data-theme="light"] .camera-modal-title-wrap h3 {
  color: #111827;
}

html:not(.dev-html)[data-theme="light"] .camera-modal-close {
  color: #6b7280;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
}

html:not(.dev-html)[data-theme="light"] .camera-modal-close:hover {
  background: #e5e7eb;
  color: #111827;
}

html:not(.dev-html)[data-theme="light"] .camera-modal-footer {
  border-top: 1px solid #e5e7eb;
}

html:not(.dev-html)[data-theme="light"] .btn-camera-secondary {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
}

html:not(.dev-html)[data-theme="light"] .btn-camera-secondary:hover {
  background: #e5e7eb;
  color: #111827;
}

html:not(.dev-html)[data-theme="light"] .btn-camera-primary {
  background: #111827;
  color: #ffffff;
}

/* Interactive Canvas / Live Preview Modal Light Mode (#livePreviewModal) */
html:not(.dev-html)[data-theme="light"] .live-preview-modal-dialog {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.16);
}

html:not(.dev-html)[data-theme="light"] .preview-modal-header {
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
}

html:not(.dev-html)[data-theme="light"] .preview-doc-title {
  color: #111827;
}

/* ==========================================================================
   ATTACHMENT POPOVER LIGHT MODE & JAPANESE HERO BADGE
   ========================================================================== */
html:not(.dev-html)[data-theme="light"] .attach-menu-popover {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 20px 48px -4px rgba(0, 0, 0, 0.14), 0 0 0 1px rgba(0, 0, 0, 0.05);
}

html:not(.dev-html)[data-theme="light"] .attach-menu-item:hover,
html:not(.dev-html)[data-theme="light"] .attach-menu-item:focus-visible {
  background: rgba(0, 0, 0, 0.05);
}

html:not(.dev-html)[data-theme="light"] .attach-menu-icon {
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  color: #374151;
}

html:not(.dev-html)[data-theme="light"] .attach-menu-item:hover .attach-menu-icon,
html:not(.dev-html)[data-theme="light"] .attach-menu-item:focus-visible .attach-menu-icon {
  background: #e5e7eb;
  color: #111827;
  border-color: #d1d5db;
}

html:not(.dev-html)[data-theme="light"] .attach-title {
  color: #111827;
}

html:not(.dev-html)[data-theme="light"] .attach-desc {
  color: #6b7280;
}

/* Empty Hero Japanese Badge */
.empty-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 14px;
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  font-weight: 600;
  color: var(--text-muted);
  user-select: none;
}

.empty-hero-badge .hero-kanji {
  color: #ec4899;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
}

.empty-hero-badge .hero-brand-name {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
}

html:not(.dev-html)[data-theme="light"] .empty-hero-badge {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.08);
  color: #4b5563;
}

html:not(.dev-html)[data-theme="light"] .empty-hero-badge .hero-kanji {
  color: #db2777;
}





