/*
 * dashboard.css — shared stylesheet for all dashboard pages
 *
 * Sections (in order):
 *   RESET / BASE
 *   NAV
 *   DASHBOARD LAYOUT
 *   SIDEBAR
 *   MAIN CHAT
 *   CHAT CONTAINER / MESSAGES
 *   SEARCH BAR (userdashboard)
 *   INBOX / SENT (table, folder bar, row actions)
 *   MODALS (generic, sign-in, delete, save, sign-out, token warning, login, sign out)
 *   OTP VERIFICATION
 *   DEBUG PANEL — remove before production
 *   SIGNUP PAGE
 *
 * Colour palette:
 *   Primary blue  #145DA0
 *   Accent cyan   #1FABCD
 *   Green CTA     #50D101  (Sign In button / upgrade CTA only)
 *   Background    #E5EDF6  (sidebar)
 *   Error red     #e03e3e
 */

/* ─── RESET / BASE ──────────────────────────────────────────────────────── */
@keyframes pageFadeIn { from { opacity: 0 } to { opacity: 1 } }

/* RESET */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: #fff;
  min-height: 100vh;
  font-family: 'Inter', sans-serif;
  color: #111;
  animation: pageFadeIn 0.22s ease-out;
}

/* NAV */
.main-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  height: 80px;
  padding: 0 48px;
  box-shadow: 0px 4px 4px 0px #00000040;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 100;
}

.nav-logo img { width: 75px; height: 74px; object-fit: contain; }

.signin-btn {
  background: #50D101;
  color: #fff;
  border: 1px solid rgba(0,0,0,0.15);
  border-radius: 12px;
  width: 101px;
  height: 40px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.signin-btn:hover { background: #44b801; }

/* DASHBOARD LAYOUT */
.dashboard {
  display: flex;
  height: calc(100vh - 96px);
  overflow: hidden;
}

/* SIDEBAR */
.sidebar {
  width: 340px;
  min-width: 340px;
  background: #E5EDF6;
  display: flex;
  flex-direction: column;
  padding: 16px 12px;
  transition: width 0.25s ease, min-width 0.25s ease;
  overflow: hidden;
}

.sidebar.collapsed {
  width: 68px;
  min-width: 68px;
}

.sidebar-toggle {
  background: #fff;
  border: 1px solid #d0d8e4;
  border-radius: 8px;
  cursor: pointer;
  align-self: flex-end;
  padding: 6px 8px;
  margin-bottom: 16px;
  flex-shrink: 0;
}

.sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-left: 15px;
  padding-right: 20px;
}

.section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: #7a8fa6;
  text-transform: uppercase;
  padding: 18px 4px 6px;
  white-space: nowrap;
}

.sidebar.collapsed .section-label { display: none; }

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border-radius: 12px;
  padding: 14px 16px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
  font-family: 'Inter', sans-serif;
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
  color: rgba(0, 0, 0, 0.85);
}

.menu-item.active-menu-item {
  background-color: #145DA0;
  color: #FFFFFF;
  opacity: 1
}

.menu-item.active-menu-item svg {
  stroke: #FFFFFF;
  opacity: 1
}

.menu-item.active-menu-item .menu-text,
.menu-item.active-menu-item .menu-arrow {
  color: #FFFFFF;
  opacity: 1
}

.menu-item:hover {
  background-color: #145DA0;
  color: #FFFFFF;
  opacity: 1;
}

.menu-item:hover svg {
  stroke: #FFFFFF;
  opacity: 1
}

.menu-item:hover .menu-text,
.menu-item:hover .menu-arrow {
  color: #FFFFFF;
  opacity: 1
}

.menu-icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  color: #555;
}

.menu-text {
  flex: 1;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 400;
  font-style: normal;
  line-height: 1;
  letter-spacing: 0;
  text-align: left;
  color: #000000D9;
  opacity: 0.8;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar.collapsed .menu-text { display: none; }

.menu-arrow {
  color: #aaa;
  font-size: 18px;
}

.sidebar.collapsed .menu-arrow { display: none; }

.sidebar.collapsed .menu-item {
  justify-content: center;
  padding: 10px;
}

.token-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #145DA0;
  color: #fff;
  border-radius: 20px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  margin-top: 12px;
  white-space: nowrap;
  align-self: flex-start;
}

.sidebar.collapsed .token-badge { padding: 8px; align-self: center; }
.sidebar.collapsed .token-text { display: none; }

/* MAIN CHAT */
.chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 24px 6%;
  gap: 16px;
  overflow: hidden;
  background: #fff;
}

/* CHAT CONTAINER */
.chat-container {
  flex: 1;
  border: 1px solid #00000038;
  border-radius: 15px;
  box-shadow: 0px 4px 4px 0px #00000040;
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

/* MESSAGES */
.message-row {
  display: flex;
}

.user-row { justify-content: flex-end; }
.ai-row   { justify-content: flex-start; }

.user-message {
  background: #1FABCD1A;
  border: 1px solid #0000003B;
  border-radius: 25px;
  box-shadow: 0px 4px 4px 0px #00000040;
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0;
  display: inline-block;
}

.ai-message {
  background: #FFFFFF;
  border: 1.5px solid #1FABCD;
  border-radius: 25px;
  box-shadow: 0px 4px 4px 0px #00000040;
  padding: 20px 24px;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0;
  display: inline-block;
  width: fit-content;
  max-width: 85%;
}

.ai-message p { margin: 0; }

.ai-thinking {
  display: flex;
  align-items: center;
  padding: 8px 0;
}

.thinking-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  animation: logoPulse 1.4s infinite ease-in-out;
}

@keyframes logoPulse {
  0%, 100% {
    opacity: 0.45;
    transform: scale(0.95);
  }

  50% {
    opacity: 1;
    transform: scale(1);
  }
}

.message-meta {
  font-size: 12px;
  color: #aaa;
  margin-top: 2px;
  margin-bottom: 4px;
}

.user-meta { text-align: right; }

.message-actions {
  display: flex;
  gap: 8px;
  padding-left: 4px;
  margin-bottom: 12px;
}

.action-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #999;
  padding: 4px;
  display: flex;
  align-items: center;
  transition: color 0.15s;
}

.action-btn:hover { color: #333; }

/* SEARCH BAR */
.search-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-bar {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #1FABCD;
  border-radius: 28px;
  height: 84px;
  padding: 0 16px;
  background: #fff;
  cursor: text;
}

.search-logo-btn img { height: 68px; width: 68px; object-fit: contain; }

.search-bar input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 15px;
  color: #333;
  background: transparent;
}

.icon-btn {
  border: none;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.leaf-btn img  { height: 30px; width: 30px; object-fit: contain; }
.mic-btn img   { height: 32px; width: 32px; object-fit: contain; }

/* INBOX */
.active-menu-item {
  background: #dceeff;
}

.inbox-search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #1FABCD;
  border-radius: 28px;
  height: 44px;
  padding: 0 18px;
  background: #fff;
}

.inbox-search-bar input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 14px;
  color: #333;
  background: transparent;
}

.inbox-count {
  font-size: 13px;
  color: #999;
  white-space: nowrap;
  flex-shrink: 0;
}


.inbox-table-wrapper {
  flex: 1;
  border: 2px solid #145DA0;
  border-radius: 12px;
  overflow: hidden;
  overflow-y: auto;
}

.inbox-table {
  width: 100%;
  border-collapse: collapse;
}

.inbox-table thead tr {
  border-bottom: 1px solid #e0e0e0;
}

.inbox-table th {
  text-align: left;
  padding: 14px 20px;
  font-size: 14px;
  font-weight: 600;
  color: #444;
  background: #fff;
}

.inbox-table td {
  padding: 13px 20px;
  font-size: 14px;
  color: #333;
  border-bottom: 1px solid #f0f0f0;
}

.inbox-table tbody tr:last-child td { border-bottom: none; }

.inbox-table tbody tr:hover { background: #fafcff; }

.row-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
}

.row-action-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #bbb;
  display: flex;
  align-items: center;
  padding: 2px;
  transition: color 0.15s;
}

.row-action-btn:hover { color: #555; }
.row-action-btn.delete-btn:hover { color: #e03e3e; }

/* FOLDER BAR */
.folders-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.folder-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  border: 1px solid #d0dce8;
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  color: #555;
  background: #fff;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s;
}

.folder-chip:hover { background: #f0f5ff; border-color: #1FABCD; }

.folder-chip.active {
  background: #E5EDF6;
  border-color: #145DA0;
  color: #145DA0;
  font-weight: 600;
}

.folder-chip-new {
  display: flex;
  align-items: center;
  gap: 5px;
  border: 1px dashed #1FABCD;
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  color: #1FABCD;
  background: #fff;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}

.folder-chip-new:hover { background: #f0faff; }

/* ROW SAVE DROPDOWN */
.row-save-dropdown {
  position: fixed;
  background: #fff;
  border: 1px solid #d0dce8;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.14);
  z-index: 300;
  min-width: 180px;
  padding: 6px 0;
  display: none;
}

.row-save-dropdown.open { display: block; }

.row-save-dropdown-header {
  font-size: 11px;
  font-weight: 600;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 6px 14px 4px;
}

.row-save-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  font-size: 13px;
  color: #333;
  cursor: pointer;
  transition: background 0.12s;
}

.row-save-dropdown-item:hover { background: #f0f5ff; }

.row-save-dropdown-item.saved {
  color: #145DA0;
  font-weight: 600;
}

.row-save-dropdown-empty {
  padding: 10px 14px;
  font-size: 13px;
  color: #aaa;
  font-style: italic;
}

/* END INBOX */

/* MODALS */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 200;
  align-items: center;
  justify-content: center;
}

.modal-overlay.open { display: flex; }

.modal-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  padding: 24px 32px;
  width: 360px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal-close {
  position: absolute;
  top: 14px;
  left: 16px;
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #555;
  line-height: 1;
}

.modal-title {
  font-size: 16px;
  font-weight: 600;
  color: #111;
  text-align: left;
  padding-left: 20px;
}

.modal-select-wrap {
  border: 1px solid #1FABCD;
  border-radius: 8px;
  overflow: hidden;
}

.modal-select-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #1FABCD;
  padding: 10px 16px;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  color: #333;
  background: #fff;
}

.modal-options-list {
  background: #E5EDF6;
  padding: 4px 0;
}

.modal-option-item {
  padding: 7px 22px;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  color: #333;
  cursor: pointer;
  transition: background 0.12s;
}

.modal-option-item:hover { background: #C0D5ED; }
.modal-option-item.selected { background: #C0D5ED; font-weight: 500; }

.modal-textarea {
  width: 100%;
  border: 1px solid #1FABCD;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  color: #333;
  outline: none;
  resize: none;
  min-height: 40px;
  height: 40px;
  overflow: hidden;
  box-sizing: border-box;
}

.modal-submit {
  align-self: flex-end;
  background: #145DA0;
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 9px 22px;
  font-size: 14px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: background 0.15s;
}

.modal-submit:hover { background: #0f4a82; }

/* SIGN IN MODAL */
.signin-modal-card {
  width: 520px;
  padding: 36px 48px 32px;
  border-radius: 24px;
  text-align: center;
  gap: 26px;
}

.signin-modal-title {
  font-size: 16px;
  font-weight: 700;
  color: #111;
  white-space: nowrap;
}

.signin-type-row {
  display: flex;
  justify-content: center;
  gap: 56px;
}

.signin-type-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
}

.signin-type-icon {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: #145DA0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: box-shadow 0.15s;
}

.signin-type-btn.selected .signin-type-icon {
  box-shadow: 0 0 0 4px #c0d5ed;
}

.signin-type-label {
  font-size: 14px;
  font-weight: 600;
  color: #145DA0;
}

.signin-continue-btn {
  align-self: center;
  background: #145DA0;
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 13px 44px;
  font-size: 15px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}

.signin-continue-btn:hover { background: #0f4a82; }

/* DELETE CHAT MODAL */
.delete-chat-card {
  width: 340px;
  padding: 24px 28px;
  gap: 10px;
}

.delete-chat-card .modal-title {
  padding-left: 0;
  font-size: 17px;
}

.delete-chat-text {
  font-size: 14px;
  color: #333;
  line-height: 1.55;
  margin: 0;
}

.delete-chat-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 6px;
}

.delete-cancel-btn {
  background: #fff;
  border: 1px solid #d0dce8;
  border-radius: 20px;
  padding: 8px 22px;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  color: #333;
  cursor: pointer;
  transition: background 0.15s;
}

.delete-cancel-btn:hover { background: #f0f4f8; }

.delete-confirm-btn {
  background: #145DA0;
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 8px 22px;
  font-size: 14px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: background 0.15s;
}

.delete-confirm-btn:hover { background: #0f4a82; }

/* SAVE MODAL */
.save-modal-card {
  width: 220px;
  padding: 0;
  gap: 0;
  background: #fff;
  border: none;
  box-shadow: 0 4px 20px rgba(0,0,0,0.18);
  overflow: hidden;
}

.save-saved-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid #d0dce8;
}

.save-saved-label {
  font-size: 14px;
  font-weight: 600;
  color: #111;
}

.save-bookmark-icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #555;
  display: flex;
  align-items: center;
  padding: 0;
}

.save-bookmark-icon-btn:hover { color: #145DA0; }

.save-collection-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  color: #111;
  padding: 10px 16px 6px;
  margin-bottom: 0;
  background: #E5EDF6;
}

.save-new-text {
  color: #145DA0;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  background: none;
  border: none;
  font-family: 'Inter', sans-serif;
  padding: 0;
}

.save-collection-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: #E5EDF6;
  padding: 0 16px 12px;
}

.save-collection-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 2px;
  font-size: 14px;
  color: #222;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.12s;
}

.save-collection-item:hover { background: #d4e2f0; }

.save-collection-item button {
  background: none;
  border: none;
  cursor: pointer;
  color: #555;
  display: flex;
  align-items: center;
  transition: color 0.12s;
  padding: 0;
}

.save-collection-item button:hover { color: #145DA0; }

#voiceSelect {
  height: 40px;
  padding: 0 32px 0 14px;
  border: 1px solid #1FABCD;
  border-radius: 20px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23145DA0' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 12px center;
  color: #145DA0;
  font-family: 'Arimo', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  max-width: 160px;
  flex-shrink: 0;
  appearance: none;
  -webkit-appearance: none;
}

#voiceSelect:hover {
  background-color: #eef7ff;
}

.lang-picker {
  position: relative;
  flex-shrink: 0;
}

.lang-pill {
  background: #145DA0;
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Arimo', sans-serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
  border: none;
  cursor: pointer;
}

.lang-pill:hover { background: #0e4a82; }

.lang-dropdown {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border: 1px solid #1FABCD;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  min-width: 130px;
  z-index: 100;
}

.lang-dropdown.open { display: block; }

.lang-option {
  display: block;
  width: 100%;
  padding: 10px 16px;
  background: none;
  border: none;
  text-align: left;
  font-family: 'Arimo', sans-serif;
  font-size: 14px;
  color: #333;
  cursor: pointer;
}

.lang-option:hover { background: #eef7ff; color: #145DA0; }
.lang-option.active { color: #145DA0; font-weight: 700; }

/* TOKEN WARNING POPUPS */
.token-warn-card {
  width: 390px;
  padding: 44px 48px 40px;
  border-radius: 20px;
  text-align: center;
  align-items: center;
  gap: 20px;
}

.token-warn-icon-area {
  position: relative;
  width: 84px;
  height: 84px;
  margin: 0 auto;
  flex-shrink: 0;
}

.token-warn-icon-area svg { display: block; }

.token-warn-center {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.token-warn-center-disc {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #145DA0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.token-sparkle {
  position: absolute;
  font-size: 12px;
  line-height: 1;
  pointer-events: none;
  user-select: none;
}
.token-sparkle-tl { top: -2px;  left: -10px; color: #50D101; font-size: 14px; }
.token-sparkle-tr { top: 8px;   right: -12px; color: #50D101; font-size: 9px; }
.token-sparkle-bl { bottom: 8px; left: -12px; color: #50D101; font-size: 9px; }
.token-sparkle-br { bottom: -2px; right: -10px; color: #145DA0; font-size: 12px; }

.token-warn-title {
  font-size: 19px;
  font-weight: 700;
  color: #111;
  line-height: 1.2;
  margin: 0;
}

.token-warn-body {
  font-size: 13px;
  color: #888;
  line-height: 1.6;
  max-width: 270px;
  margin: 0;
}

.token-progress-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
}

.token-progress-label {
  font-size: 13px;
  font-weight: 700;
  color: #222;
}

.token-progress-bar {
  width: 100%;
  height: 8px;
  background: #e0e0e0;
  border-radius: 4px;
  overflow: hidden;
}

.token-progress-fill {
  height: 100%;
  border-radius: 4px;
  background: #145DA0;
  transition: width 0.3s;
}

.token-warn-btns {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 4px;
}

.token-warn-dismiss {
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 20px;
  padding: 10px 20px;
  font-size: 12px;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  color: #333;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}
.token-warn-dismiss:hover { background: #f5f5f5; }

.token-warn-upgrade {
  background: #50D101;
  border: none;
  border-radius: 20px;
  padding: 10px 20px;
  font-size: 12px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  color: #fff;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}
.token-warn-upgrade:hover { background: #44b801; }

/* SIGNUP & VERIFY PANELS */
#chatView { flex: 1; display: flex; flex-direction: column; gap: 16px; overflow: hidden; }

/* OTP VERIFICATION MODAL (used on signup.html after form submit) */
.verify-card {
  width: 420px;
  align-items: center;
  text-align: center;
  gap: 24px;
}

.verify-prompt {
  font-size: 14px;
  color: #333;
  line-height: 1.55;
  max-width: 300px;
  margin: 0;
}

.otp-row {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.otp-input {
  width: 50px;
  height: 54px;
  border: 1.5px solid #1FABCD;
  border-radius: 10px;
  text-align: center;
  font-size: 22px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  color: #145DA0;
  outline: none;
  transition: border-color 0.15s;
  caret-color: #145DA0;
}
.otp-input:focus { border-color: #145DA0; box-shadow: 0 0 0 2px #c0d5ed; }
.otp-input.otp-error { border-color: #e03e3e; }

.verify-enter-btn {
  background: #145DA0;
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 11px 52px;
  font-size: 14px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: background 0.15s;
  margin-top: 16px;
}
.verify-enter-btn:hover { background: #0f4a82; }

.verify-error-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.verify-error-msg {
  font-size: 15px;
  font-weight: 600;
  color: #111;
  margin: 0;
}

.verify-retry-btn {
  background: #145DA0;
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 10px 40px;
  font-size: 14px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: background 0.15s;
}
.verify-retry-btn:hover { background: #0f4a82; }

.verify-locked-msg {
  font-size: 14px;
  color: #e03e3e;
  font-weight: 500;
  margin: 0;
}

/* ─── DEBUG PANEL ───────────────────────────────────────────────────────────
 * NOTE: This panel lets developers manually set token counts to test the
 * token-warning modals without using real tokens. It is rendered in
 * userdashboard.html and controlled by the debugSetTokens() JS function.
 * REMOVE the debug panel HTML and these CSS rules before going to production.
 * ─────────────────────────────────────────────────────────────────────────── */
.debug-panel {
  position: fixed;
  bottom: 16px;
  right: 16px;
  background: #fff8e1;
  border: 1.5px dashed #f0ad4e;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 12px;
  font-family: 'Inter', sans-serif;
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 210px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.debug-panel strong {
  color: #7d5a00;
  display: block;
  margin-bottom: 2px;
  font-size: 12px;
}

.debug-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.debug-row label { color: #555; flex: 1; }

.debug-row input[type="number"] {
  width: 52px;
  padding: 3px 6px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 12px;
  font-family: 'Inter', sans-serif;
}

.debug-btn {
  background: #f0ad4e;
  border: none;
  border-radius: 5px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: background 0.15s;
}
.debug-btn:hover { background: #d9962c; color: #fff; }
.debug-reset { background: #e0e0e0; color: #555; margin-top: 2px; }
.debug-reset:hover { background: #ccc; }

/* LOGIN MODAL */
.login-modal-card {
  width: 440px;
  padding: 36px 44px 32px;
  border-radius: 20px;
  gap: 18px;
}

.login-modal-title {
  font-size: 20px;
  font-weight: 700;
  color: #111;
  text-align: center;
  margin: 0;
}

.login-tabs {
  display: flex;
  border-bottom: 1.5px solid #e0e0e0;
}

.login-tab {
  flex: 1;
  background: none;
  border: none;
  border-bottom: 2.5px solid transparent;
  padding: 10px 0;
  font-size: 14px;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  color: #888;
  cursor: pointer;
  margin-bottom: -1.5px;
  transition: color 0.15s, border-color 0.15s;
}

.login-tab.active {
  color: #145DA0;
  border-bottom-color: #145DA0;
  font-weight: 600;
}

.login-fields {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.login-field label {
  font-size: 13px;
  font-weight: 500;
  color: #555;
}

.login-field input {
  border: 1px solid #1FABCD;
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  color: #333;
  outline: none;
  transition: border-color 0.15s;
}

.login-field input:focus { border-color: #145DA0; }

.login-forgot {
  font-size: 12px;
  color: #145DA0;
  text-decoration: none;
  align-self: flex-end;
  margin-top: -8px;
}

.login-forgot:hover { text-decoration: underline; }

.login-error {
  font-size: 12px;
  color: #e03e3e;
  min-height: 16px;
  margin-top: -8px;
}

.login-submit-btn {
  background: #145DA0;
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 13px;
  font-size: 14px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: background 0.15s;
}

.login-submit-btn:hover { background: #0f4a82; }

/* SIGN OUT MODAL */
.signout-card {
  width: 360px;
  padding: 32px 36px;
  border-radius: 20px;
  text-align: center;
  gap: 14px;
}

.signout-title {
  font-size: 18px;
  font-weight: 700;
  color: #111;
  margin: 0;
}

.signout-body {
  font-size: 14px;
  color: #555;
  line-height: 1.55;
  margin: 0;
}

.signout-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 6px;
}

.signout-cancel-btn {
  background: #fff;
  border: 1px solid #d0dce8;
  border-radius: 20px;
  padding: 10px 28px;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  color: #333;
  cursor: pointer;
  transition: background 0.15s;
}

.signout-cancel-btn:hover { background: #f0f4f8; }

.signout-confirm-btn {
  background: #e03e3e;
  border: none;
  border-radius: 20px;
  padding: 10px 28px;
  font-size: 14px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  color: #fff;
  cursor: pointer;
  transition: background 0.15s;
}

.signout-confirm-btn:hover { background: #c0392b; }

/* Company-only sidebar items — hidden by default, shown when body has .is-company class */
[data-role="company"] { display: none; }
body.is-company [data-role="company"] { display: flex; }

/* DEDICATED SIGNUP PAGE */
.signup-page-layout {
  display: flex;
  height: calc(100vh - 96px);
  overflow: hidden;
}

.signup-page-sidebar {
  width: 230px;
  min-width: 230px;
  background: #E5EDF6;
  border-right: 1px solid #d0dce8;
  display: flex;
  flex-direction: column;
  padding: 16px 12px;
  overflow-y: auto;
}

.signup-page-main {
  flex: 1;
  padding: 48px 64px 64px;
  background: #fff;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.signup-form-wrapper {
  width: 100%;
  max-width: 500px;
}

.signup-page-type-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #145DA0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.signup-page-heading {
  font-size: 22px;
  font-weight: 700;
  color: #111;
  margin: 0 0 6px;
  font-family: 'Inter', sans-serif;
}

.signup-page-subtitle {
  font-size: 13px;
  color: #888;
  margin: 0 0 32px;
  font-family: 'Inter', sans-serif;
}

.signup-page-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 580px;
}

.signup-page-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.signup-page-field label {
  font-size: 13px;
  font-weight: 500;
  color: #333;
  font-family: 'Inter', sans-serif;
}

.signup-page-input-wrap {
  position: relative;
}

.signup-page-field input[type="text"],
.signup-page-field input[type="email"],
.signup-page-field input[type="password"] {
  width: 100%;
  border: none;
  border-radius: 8px;
  padding: 11px 14px;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  color: #2a4a58;
  outline: none;
  background: #D9E8ED;
  transition: box-shadow 0.15s;
  box-sizing: border-box;
}

.signup-page-field input::placeholder { color: #7aaabb; }
.signup-page-field input:focus { box-shadow: 0 0 0 2px #145DA040; }
.signup-page-field input.has-icon  { padding-left: 42px; }
.signup-page-field input.has-eye   { padding-right: 44px; }

.signup-input-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: #5a8fa8;
  display: flex;
  align-items: center;
  pointer-events: none;
}

.signup-eye-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #5a8fa8;
  display: flex;
  align-items: center;
  padding: 0;
  line-height: 1;
}

.signup-eye-btn:hover { color: #145DA0; }

.signup-page-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.signup-page-checkbox {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  color: #333;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  user-select: none;
}

.signup-page-checkbox input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: #145DA0;
  cursor: pointer;
  flex-shrink: 0;
}

.signup-page-error {
  font-size: 12px;
  color: #e03e3e;
  min-height: 16px;
  margin-top: -4px;
}

.signup-page-submit {
  background: #145DA0;
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 13px;
  font-size: 15px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: background 0.15s;
  width: 100%;
  max-width: 580px;
}

.signup-page-submit:hover { background: #0f4a82; }

.menu-item.sp-active {
  background: rgba(20, 93, 160, 0.12);
  color: #145DA0;
}

.menu-item.sp-active .menu-icon { color: #145DA0; }
