/* ========================================
   Bid Management — Vercel-inspired Design
   ======================================== */

:root {
  --black: #000;
  --white: #fff;
  --gray-50: #fafafa;
  --gray-100: #f5f5f5;
  --gray-200: #e5e5e5;
  --gray-300: #d4d4d4;
  --gray-400: #a3a3a3;
  --gray-500: #737373;
  --gray-600: #525252;
  --gray-700: #404040;
  --gray-800: #262626;
  --gray-900: #171717;

  --red-50: #fef2f2;
  --red-500: #ef4444;
  --red-600: #dc2626;

  --radius-sm: 4px;
  --radius: 6px;
  --radius-lg: 8px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.1);
  --transition: 150ms ease;

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 14px;
}

body {
  font-family: var(--font);
  color: var(--gray-900);
  background: var(--white);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ---- Navbar ---- */

.navbar {
  border-bottom: 1px solid var(--gray-200);
  background: var(--white);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-brand {
  font-weight: 600;
  font-size: 15px;
  color: var(--black);
  text-decoration: none;
  letter-spacing: -0.3px;
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.navbar-user {
  font-size: 13px;
  color: var(--gray-500);
}

/* ---- Main Content ---- */

.main-content {
  max-width: 1650px;
  margin: 0 auto;
  padding: 24px;
}

/* ---- Buttons ---- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  background: var(--white);
  color: var(--gray-700);
  line-height: 1;
  white-space: nowrap;
}

.btn:hover {
  background: var(--gray-50);
  border-color: var(--gray-300);
}

.btn-primary {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}
.btn-primary:hover {
  background: var(--gray-800);
}

.btn-danger {
  background: var(--red-600);
  color: var(--white);
  border-color: var(--red-600);
}
.btn-danger:hover {
  background: var(--red-500);
}

.btn-ghost {
  border-color: transparent;
  background: transparent;
}
.btn-ghost:hover {
  background: var(--gray-100);
}

.btn-sm {
  padding: 4px 10px;
  font-size: 12px;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 6px;
}

.btn-icon-text {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.icon-sm {
  width: 14px;
  height: 14px;
  stroke-width: 2;
}

.btn-full {
  width: 100%;
  justify-content: center;
  padding: 10px;
}

.btn kbd {
  background: var(--gray-700);
  color: var(--gray-300);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 11px;
  font-family: var(--font);
  margin-left: 4px;
}

/* ---- Forms ---- */

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-700);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 8px 12px;
  font-size: 13px;
  font-family: var(--font);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--gray-900);
  transition: border-color var(--transition);
  outline: none;
}
.form-input:focus {
  border-color: var(--black);
}
.form-input::placeholder {
  color: var(--gray-400);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.required {
  color: var(--red-500);
}

.radio-group {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  cursor: pointer;
  color: var(--gray-700);
}

.radio-label input[type="radio"] {
  accent-color: var(--black);
}

/* ---- Alerts ---- */

.alert {
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  margin-bottom: 16px;
}

.alert-error {
  background: var(--red-50);
  color: var(--red-600);
  border: 1px solid #fecaca;
}

/* ---- Login ---- */

.login-body {
  background: var(--gray-50);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.login-container {
  width: 100%;
  max-width: 380px;
  padding: 24px;
}

.login-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow);
}

.login-title {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.4px;
  text-align: center;
}

.login-subtitle {
  text-align: center;
  color: var(--gray-500);
  font-size: 13px;
  margin: 6px 0 24px;
}

/* ---- Tabs ---- */

.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--gray-200);
  margin-bottom: 24px;
}

.tab {
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font);
  color: var(--gray-500);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.tab:hover {
  color: var(--gray-900);
}
.tab.active {
  color: var(--black);
  border-bottom-color: var(--black);
}

/* ---- Tables ---- */

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th {
  text-align: left;
  padding: 10px 12px;
  font-weight: 500;
  color: var(--gray-500);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--gray-200);
  background: var(--gray-50);
  white-space: nowrap;
  user-select: none;
}

.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--gray-100);
  vertical-align: middle;
}

.data-table tbody tr {
  transition: background-color var(--transition);
}

.clickable-row {
  cursor: pointer;
}

.sortable {
  cursor: pointer;
}
.sortable:hover {
  color: var(--black);
}
.sortable::after {
  content: " ↕";
  font-size: 10px;
  opacity: 0.4;
}
.sortable.sorted.asc::after {
  content: " ↑";
  opacity: 1;
}
.sortable.sorted.desc::after {
  content: " ↓";
  opacity: 1;
}

.empty-state {
  text-align: center;
  padding: 40px !important;
  color: var(--gray-400);
}

/* ---- Section Header ---- */

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.section-header h2 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.3px;
}

/* ---- Page Header ---- */

.page-header {
  margin-bottom: 24px;
}

.back-link {
  font-size: 13px;
  color: var(--gray-500);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 8px;
}
.back-link:hover {
  color: var(--black);
}

.page-header h1 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

/* ---- Status Cards ---- */

.status-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.status-card {
  padding: 16px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  text-align: center;
}

.status-card-value {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -1px;
  color: var(--black);
}

.status-card-label {
  font-size: 12px;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

.source-counts {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.source-badge {
  padding: 4px 12px;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  font-size: 12px;
  color: var(--gray-600);
}

/* ---- Table Toolbar ---- */

.table-toolbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: 12px;
  gap: 12px;
}

.row-select, #select-all {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--gray-900);
}

#btn-bulk-resume {
  white-space: nowrap;
}

#btn-bulk-resume:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.search-box {
  flex: 1;
  max-width: 360px;
}

/* ---- Bid Table Specifics ---- */

.table-wrapper {
  overflow-x: auto;
}

.bid-table td {
  font-size: 13px;
}

.inline-select {
  padding: 4px 8px;
  font-size: 12px;
  font-family: var(--font);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  background: var(--white);
  cursor: pointer;
  outline: none;
}
.inline-select:focus {
  border-color: var(--black);
}

.inline-input {
  padding: 4px 8px;
  font-size: 13px;
  font-family: var(--font);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  width: 100%;
  outline: none;
  transition: border-color var(--transition);
}
.inline-input:hover {
  border-color: var(--gray-200);
}
.inline-input:focus {
  border-color: var(--black);
  background: var(--white);
}

.truncate {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copyable {
  cursor: pointer;
}
.copyable:hover {
  background: var(--gray-100);
  border-radius: var(--radius-sm);
}

.priority-cell {
  color: #f59e0b;
  letter-spacing: 1px;
  font-size: 12px;
}

.actions-cell {
}

/* ---- Tags / Applicants ---- */

.tag-container {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  cursor: pointer;
  min-height: 26px;
  align-items: center;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-700);
}

.tag-blue    { background: #dbeafe; color: #1e40af; border-color: #93c5fd; }
.tag-green   { background: #dcfce7; color: #166534; border-color: #86efac; }
.tag-orange  { background: #ffedd5; color: #9a3412; border-color: #fdba74; }
.tag-purple  { background: #ede9fe; color: #5b21b6; border-color: #c4b5fd; }
.tag-red     { background: #fee2e2; color: #991b1b; border-color: #fca5a5; }
.tag-teal    { background: #ccfbf1; color: #115e59; border-color: #5eead4; }
.tag-pink    { background: #fce7f3; color: #9d174d; border-color: #f9a8d4; }
.tag-indigo  { background: #e0e7ff; color: #3730a3; border-color: #a5b4fc; }
.tag-amber   { background: #fef3c7; color: #92400e; border-color: #fcd34d; }
.tag-cyan    { background: #cffafe; color: #155e75; border-color: #67e8f9; }

.applicant-dropdown {
  position: absolute;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  z-index: 200;
  min-width: 120px;
}

.applicant-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
}
.applicant-option:hover {
  background: var(--gray-50);
}
.applicant-option input {
  accent-color: var(--black);
}

/* ---- Autocomplete ---- */

.autocomplete-wrapper {
  position: relative;
}

.autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 300;
  max-height: 200px;
  overflow-y: auto;
}

.autocomplete-item {
  padding: 8px 12px;
  cursor: pointer;
  font-size: 13px;
}
.autocomplete-item:hover {
  background: var(--gray-50);
}

/* ---- Modals ---- */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(2px);
}

.modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.16);
}

.modal-lg {
  max-width: 600px;
}
.modal-sm {
  max-width: 380px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px 0;
}

.modal-header h3 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.3px;
}

.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray-400);
  padding: 4px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.modal-close .icon-sm {
  width: 18px;
  height: 18px;
}
.modal-close:hover {
  color: var(--black);
}

.modal-body {
  padding: 20px 24px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 0 24px 20px;
}

/* ---- Pagination ---- */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 0;
}

.pagination-info {
  font-size: 13px;
  color: var(--gray-500);
}

/* ---- Toast ---- */

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 10px 20px;
  background: var(--gray-900);
  color: var(--white);
  border-radius: var(--radius);
  font-size: 13px;
  z-index: 2000;
  box-shadow: var(--shadow-lg);
  transition:
    opacity 0.3s,
    transform 0.3s;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}
.toast.hidden {
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
}

/* ---- Settings ---- */

.settings-page {
  max-width: 900px;
}

.settings-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--gray-200);
  margin-bottom: 24px;
}

.settings-tab {
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font);
  color: var(--gray-500);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
}

.settings-tab:hover {
  color: var(--gray-900);
}
.settings-tab.active {
  color: var(--black);
  border-bottom-color: var(--black);
}

/* ---- Toggle Switch ---- */

.toggle {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
}
.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--gray-300);
  border-radius: 999px;
  transition: var(--transition);
}
.toggle-slider::before {
  content: "";
  position: absolute;
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background: var(--white);
  border-radius: 50%;
  transition: var(--transition);
}
.toggle input:checked + .toggle-slider {
  background: var(--black);
}
.toggle input:checked + .toggle-slider::before {
  transform: translateX(16px);
}

/* ---- Badges ---- */

.badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 500;
  border-radius: 999px;
}

.badge-green {
  background: #dcfce7;
  color: #166534;
}
.badge-red {
  background: #fee2e2;
  color: #991b1b;
}

/* ---- Placeholder ---- */

.placeholder-content {
  text-align: center;
  padding: 80px 0;
  color: var(--gray-400);
}

.placeholder-icon {
  font-size: 48px;
  margin-bottom: 16px;
}
.placeholder-content h3 {
  font-size: 18px;
  color: var(--gray-600);
  margin-bottom: 4px;
}
.placeholder-content p {
  font-size: 13px;
}

/* ---- AI Action Cell ---- */

.ai-cell {
  white-space: nowrap;
}

.ai-action {
  display: flex;
  gap: 4px;
  align-items: center;
}

.ai-action-resume {
  flex-wrap: wrap;
}

.ai-action-resume .resume-style-select,
.ai-action-resume .resume-theme-inline {
  max-width: 90px;
  font-size: 11px;
  padding: 2px 4px;
}

.ai-prompt-select {
  flex: 1;
  min-width: 90px;
}

.btn-ai-generate {
  flex-shrink: 0;
}

.ai-result-content {
  font-size: 14px;
  line-height: 1.7;
  max-height: 60vh;
  overflow-y: auto;
  padding: 4px 0;
}

.ai-result-content h1,
.ai-result-content h2,
.ai-result-content h3 {
  margin: 16px 0 8px;
  font-weight: 600;
}
.ai-result-content h3 {
  font-size: 15px;
}
.ai-result-content p {
  margin: 8px 0;
}
.ai-result-content ul,
.ai-result-content ol {
  margin: 8px 0;
  padding-left: 24px;
}
.ai-result-content li {
  margin: 4px 0;
}
.ai-result-content strong {
  font-weight: 600;
}

/* ---- Settings Hint ---- */

.settings-hint {
  font-size: 12px;
  color: var(--gray-500);
  margin-bottom: 12px;
}

.settings-hint code {
  background: var(--gray-100);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-size: 11px;
}

/* ---- Model Selector ---- */

.model-selector {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.model-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
}

.model-option:hover {
  border-color: var(--gray-300);
  background: var(--gray-50);
}

.model-option--selected {
  border-color: var(--black);
  background: var(--gray-50);
}

.model-option input[type="radio"] {
  accent-color: var(--black);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.model-option-name {
  font-size: 14px;
  font-weight: 500;
  flex: 1;
}

.model-option-badge {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--white);
  background: var(--black);
  padding: 2px 8px;
  border-radius: 999px;
}

.model-option-delete {
  background: none;
  border: none;
  font-size: 18px;
  color: var(--gray-400);
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  flex-shrink: 0;
}
.model-option-delete:hover {
  color: var(--red-500);
}

/* ---- Applicant Cards ---- */

.applicant-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.applicant-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  transition: border-color var(--transition);
}
.applicant-card:hover {
  border-color: var(--gray-300);
}

.applicant-card-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.applicant-code {
  font-weight: 700;
  font-size: 14px;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 4px 10px;
  min-width: 40px;
  text-align: center;
}

.applicant-code.tag-blue    { background: #dbeafe; color: #1e40af; border-color: #93c5fd; }
.applicant-code.tag-green   { background: #dcfce7; color: #166534; border-color: #86efac; }
.applicant-code.tag-orange  { background: #ffedd5; color: #9a3412; border-color: #fdba74; }
.applicant-code.tag-purple  { background: #ede9fe; color: #5b21b6; border-color: #c4b5fd; }
.applicant-code.tag-red     { background: #fee2e2; color: #991b1b; border-color: #fca5a5; }
.applicant-code.tag-teal    { background: #ccfbf1; color: #115e59; border-color: #5eead4; }
.applicant-code.tag-pink    { background: #fce7f3; color: #9d174d; border-color: #f9a8d4; }
.applicant-code.tag-indigo  { background: #e0e7ff; color: #3730a3; border-color: #a5b4fc; }
.applicant-code.tag-amber   { background: #fef3c7; color: #92400e; border-color: #fcd34d; }
.applicant-code.tag-cyan    { background: #cffafe; color: #155e75; border-color: #67e8f9; }

/* Color picker grid */
.color-picker-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px 0;
}

.color-swatch {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.1s, border-color 0.1s;
  padding: 0;
  outline: none;
}

.color-swatch:hover {
  transform: scale(1.15);
}

.color-swatch.selected {
  border-color: #333;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #333;
}

.applicant-card-name {
  font-weight: 600;
  font-size: 14px;
}
.applicant-card-role {
  font-size: 12px;
}
.applicant-card-actions {
  display: flex;
  gap: 4px;
}

/* ---- Applicant Modal ---- */

.modal-xl {
  max-width: 720px;
}

.modal-body-scroll {
  max-height: 70vh;
  overflow-y: auto;
}

.form-section-title {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gray-500);
  border-bottom: 1px solid var(--gray-200);
  padding-bottom: 6px;
  margin: 20px 0 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.form-section-title:first-child {
  margin-top: 0;
}

.form-row-3 {
  grid-template-columns: 1fr 1fr 1fr;
}

.repeatable-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.repeatable-entry {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 12px;
  position: relative;
}

.repeatable-entry .btn-remove-entry {
  position: absolute;
  top: 8px;
  right: 8px;
  background: none;
  border: none;
  font-size: 16px;
  color: var(--gray-400);
  cursor: pointer;
  line-height: 1;
  padding: 2px;
}
.repeatable-entry .btn-remove-entry:hover {
  color: var(--red-500);
}

/* ---- Prompt Cards ---- */

.prompt-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.prompt-card {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 16px;
  transition: border-color var(--transition);
}
.prompt-card:hover {
  border-color: var(--gray-300);
}

.prompt-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.prompt-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.prompt-name {
  font-weight: 600;
  font-size: 14px;
}

.prompt-card-actions {
  display: flex;
  gap: 4px;
}

.prompt-card-preview {
  font-size: 13px;
  color: var(--gray-500);
  line-height: 1.5;
  overflow: hidden;
  max-height: 3em;
}

.prompt-card-preview p {
  margin: 0;
}
.prompt-card-preview h1,
.prompt-card-preview h2,
.prompt-card-preview h3 {
  font-size: 13px;
  margin: 0;
  display: inline;
}

/* ---- Toggle Inline Label ---- */

.toggle-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  cursor: pointer;
}

.toggle-inline input[type="checkbox"] {
  accent-color: var(--black);
  width: 16px;
  height: 16px;
}

/* ---- Resume Modal & Styles ---- */

.modal-resume {
  max-width: 850px;
}

.modal-body-resume {
  padding: 0;
  max-height: 80vh;
  overflow-y: auto;
  background: var(--gray-100);
}

#resume-preview {
  width: 210mm;
  min-height: 297mm;
  margin: 20px auto;
  background: var(--white);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
  padding: 40px 48px;
  font-size: 11px;
  line-height: 1.5;
  color: #1a1a1a;
  overflow: hidden;
}

/* ---- Resume Export List ---- */

.resume-export-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-100);
}

.resume-export-row:last-child {
  border-bottom: none;
}

.resume-export-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.resume-export-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--black);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resume-export-link:hover {
  text-decoration: underline;
}

.resume-export-meta {
  font-size: 11px;
  color: var(--gray-400);
}

.btn-delete-export {
  color: var(--gray-400);
  flex-shrink: 0;
}

.btn-delete-export:hover {
  color: #ef4444;
}

/* ---- Company People Count ---- */

.job-link-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.job-link-row .form-input {
  flex: 1;
}

.job-link-row .btn {
  white-space: nowrap;
  flex-shrink: 0;
}

.job-alerts {
  margin-top: 8px;
  padding: 10px 14px;
  background: #fef2f2;
  border: 1px solid #fca5a5;
  border-radius: 6px;
}

.job-alerts .job-alert-title {
  font-size: 12px;
  font-weight: 700;
  color: #991b1b;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.job-alerts .job-alert-item {
  font-size: 12px;
  color: #7f1d1d;
  padding: 3px 0;
  display: flex;
  gap: 8px;
  align-items: baseline;
}

.job-alerts .job-alert-tag {
  display: inline-block;
  background: #fee2e2;
  color: #dc2626;
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 3px;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}

.job-alerts .job-alert-detail {
  color: #991b1b;
}

.company-people-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.company-people-row .btn {
  font-size: 12px;
  padding: 3px 10px;
  white-space: nowrap;
}

.people-count-badge {
  display: inline-block;
  background: var(--gray-100);
  color: var(--gray-600);
  padding: 3px 10px;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--gray-200);
}

/* ---- Resume Theme Picker ---- */

.resume-theme-picker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  margin-right: 12px;
}

.resume-theme-picker label {
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.resume-theme-picker select {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  background: var(--white);
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.15s;
}

.resume-theme-picker select:hover {
  border-color: var(--gray-400);
}

.resume-theme-picker select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.05);
}

/* ---- Loading Spinner ---- */

.btn-loading {
  position: relative;
  pointer-events: none;
  color: transparent !important;
}

.btn-loading::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  top: 50%;
  left: 50%;
  margin: -7px 0 0 -7px;
  border: 2px solid var(--gray-300);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---- Utilities ---- */

.hidden {
  display: none !important;
}
.text-muted {
  color: var(--gray-400);
}

/* ---- Quill Editor Overrides ---- */

.ql-container {
  border-radius: 0 0 var(--radius) var(--radius);
  font-family: var(--font);
  font-size: 13px;
}
.ql-toolbar {
  border-radius: var(--radius) var(--radius) 0 0;
}
.ql-editor {
  min-height: 120px;
}

/* ---- Responsive ---- */

@media (max-width: 768px) {
  .status-cards {
    grid-template-columns: repeat(2, 1fr);
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .table-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .search-box {
    max-width: 100%;
  }
}

/* ---- Settings Unlock ---- */

.settings-unlock {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 60vh;
}

.unlock-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 40px;
  width: 100%;
  max-width: 400px;
}

.unlock-card h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
}

.unlock-card .text-muted {
  margin-bottom: 20px;
}

.unlock-card .error-text {
  color: var(--red-500);
  font-size: 13px;
  margin-bottom: 12px;
}

.unlock-card .form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

/* ---- Contacts ---- */

.contact-card {
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 10px;
  background: var(--gray-50);
}

.contact-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.contact-role {
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.contact-field {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.contact-field label {
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-500);
  width: 60px;
  flex-shrink: 0;
}

.contact-field .form-input {
  flex: 1;
  font-size: 13px;
  padding: 5px 8px;
}

.contact-field .copyable-link {
  flex: 1;
  font-size: 13px;
  color: #2563eb;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 5px 0;
}

.contact-field .copyable-link:hover {
  text-decoration: underline;
}

/* ---- Image Gallery ---- */

.image-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.image-gallery-item {
  position: relative;
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  overflow: hidden;
  background: var(--gray-50);
}

.image-gallery-item img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
  cursor: pointer;
}

.image-gallery-item .image-info {
  padding: 6px 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.image-gallery-item .image-name {
  font-size: 11px;
  color: var(--gray-600);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.image-gallery-item .btn-delete-image {
  font-size: 12px;
  color: var(--gray-400);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0 4px;
  flex-shrink: 0;
}

.image-gallery-item .btn-delete-image:hover {
  color: var(--red-500);
}

.image-fullview {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.85);
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.image-fullview img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 4px;
}

/* ---- Admin User Selector (Dashboard) ---- */

.admin-user-selector {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding: 10px 14px;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-700);
}

.admin-user-selector select {
  font-size: 13px;
  padding: 5px 10px;
}

/* ---- Global Search (Admin Dashboard) ---- */

.global-search-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.global-search-bar input {
  flex: 1;
}

.global-search-results {
  margin-bottom: 24px;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  overflow: hidden;
}

.global-search-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
}

.global-search-header h3 {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
}

.global-search-results .data-table {
  margin: 0;
  border: none;
  border-radius: 0;
}

.global-search-results .clickable-row:hover {
  background: var(--gray-50);
}

/* ---- User Management Panel ---- */

.user-mgmt-panel {
  border-top: 1px solid var(--gray-200);
  margin-top: 24px;
  padding-top: 8px;
}

.mgmt-section {
  margin-top: 24px;
}

.mgmt-section-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--gray-900);
}

.mgmt-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.mgmt-stat-card {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  padding: 14px 16px;
  text-align: center;
}

.mgmt-stat-card .stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1;
}

.mgmt-stat-card .stat-label {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 4px;
}

.mgmt-breakdown-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.mgmt-breakdown-card {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  padding: 16px;
}

.mgmt-breakdown-card h4 {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--gray-700);
}

.mgmt-breakdown-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mgmt-breakdown-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  padding: 4px 0;
}

.mgmt-breakdown-item .bk-label {
  color: var(--gray-700);
}

.mgmt-breakdown-item .bk-value {
  font-weight: 600;
  color: var(--gray-900);
  background: var(--gray-200);
  border-radius: 10px;
  padding: 1px 10px;
  font-size: 12px;
}

.mgmt-trend-card {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 20px;
}

.mgmt-trend-card h4 {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--gray-700);
}

.mgmt-trend-chart {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 80px;
  padding-top: 4px;
}

.mgmt-trend-bar {
  flex: 1;
  min-width: 0;
  background: var(--blue-500, #2563eb);
  border-radius: 2px 2px 0 0;
  position: relative;
  transition: background .15s;
  cursor: default;
}

.mgmt-trend-bar:hover {
  background: var(--blue-700, #1d4ed8);
}

.mgmt-trend-bar[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--gray-900);
  color: #fff;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
  z-index: 10;
}

.mgmt-column-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
}

.mgmt-column-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  user-select: none;
}

.mgmt-column-toggle:hover {
  border-color: var(--gray-400);
}

.mgmt-column-toggle.col-hidden {
  background: #fff;
  opacity: .5;
}

.mgmt-column-toggle input[type="checkbox"] {
  accent-color: var(--blue-500, #2563eb);
}

/* Disabled bid date row */
.row-disabled {
  opacity: .55;
}

.badge-muted {
  font-size: 10px;
  background: var(--gray-300);
  color: var(--gray-700);
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 500;
  vertical-align: middle;
  margin-left: 4px;
}

/* Disabled page */
.disabled-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 24px;
}

.disabled-notice {
  text-align: center;
  padding: 64px 24px;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  background: var(--gray-50);
  margin-top: 24px;
}

.disabled-notice h2 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
}

.disabled-notice p {
  color: var(--gray-500);
  font-size: 14px;
  line-height: 1.6;
}

/* Access toggle in user management */
.access-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.access-toggle .toggle-label {
  font-size: 12px;
  font-weight: 500;
}

/* ---- Jobs Section ---- */

.jobs-section {
  margin: 24px 0;
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  background: var(--white);
  overflow: hidden;
}

.jobs-tabs {
  display: flex;
  align-items: center;
  gap: 0;
  border-bottom: 1px solid var(--gray-200);
  padding: 0 16px;
}

.jobs-tab {
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-500);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color .15s, border-color .15s;
}

.jobs-tab:hover {
  color: var(--black);
}

.jobs-tab.active {
  color: var(--black);
  border-bottom-color: var(--black);
}

.jobs-count {
  margin-left: auto;
  font-size: 12px;
  color: var(--gray-500);
  font-weight: 500;
}

.jobs-tab-content {
  padding: 12px 16px 16px;
}

.jobs-search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.jobs-search .form-input {
  padding: 6px 10px;
  font-size: 13px;
  max-width: 160px;
}

.jobs-search input[type="date"] {
  max-width: 140px;
}

.jobs-checkbox-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--gray-700);
  white-space: nowrap;
  cursor: pointer;
}

.jobs-checkbox-label input[type="checkbox"] {
  accent-color: var(--black);
}

.jobs-search-spacer {
  flex: 1;
}

.jobs-table td {
  font-size: 12px;
  padding: 6px 8px;
}

.jobs-table th {
  font-size: 11px;
  padding: 8px;
}

.jobs-sortable {
  cursor: pointer;
  user-select: none;
}

.jobs-sortable::after {
  content: '⇅';
  margin-left: 4px;
  opacity: .3;
  font-size: 10px;
}

.jobs-sortable.sorted.asc::after {
  content: '↑';
  opacity: .8;
}

.jobs-sortable.sorted.desc::after {
  content: '↓';
  opacity: .8;
}

.jobs-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 8px 0 0;
}

.jobs-btn-check.checked {
  color: var(--black);
}

.jobs-placeholder {
  text-align: center;
  padding: 48px 24px;
  color: var(--gray-400);
  font-size: 14px;
}

/* ---- Email ---- */

.email-actions-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 12px;
  background: #e8f0fe;
  border-bottom: 1px solid #c5d7f2;
  font-size: 13px;
}

.email-actions-bar.hidden { display: none; }

.email-select-all-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 13px;
  color: #444;
  user-select: none;
}

.email-col-check,
.email-cell-check {
  width: 40px;
  padding: 0 4px !important;
}

.email-cell-check input[type="checkbox"],
.email-col-check input[type="checkbox"],
.email-select-all-wrap input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #1a73e8;
}

.email-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.email-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.email-layout {
  display: flex;
  gap: 0;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  overflow: hidden;
  min-height: 500px;
}

.email-sidebar {
  width: 160px;
  flex-shrink: 0;
  background: var(--gray-50);
  border-right: 1px solid var(--gray-200);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.email-folder-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-600);
  text-align: left;
  transition: background 0.15s;
}

.email-folder-btn:hover {
  background: var(--gray-200);
}

.email-folder-btn.active {
  background: #e8f0fe;
  color: #1a73e8;
  font-weight: 600;
}

.email-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.email-table {
  margin: 0;
  border: none;
  border-radius: 0;
}

.email-table thead th {
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--gray-500);
  border-bottom: 1px solid var(--gray-200);
}

.email-row {
  cursor: pointer;
  transition: background 0.15s;
  color: #5f6368;
}

.email-row:hover {
  background: #f1f3f4;
}

.email-row td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--gray-100);
  font-size: 13px;
  vertical-align: middle;
  font-weight: 400;
}

.email-row .email-cell-from {
  color: #5f6368;
}

.email-row .email-subject {
  color: #5f6368;
}

.email-row .email-snippet {
  color: #999;
}

/* Unread: bold text, blue left border, light blue bg */
.email-unread {
  background: #e8f0fe;
  border-left: 3px solid #1a73e8;
}

.email-unread:hover {
  background: #d3e3fd;
}

.email-unread td {
  font-weight: 600;
  color: #202124;
}

.email-unread .email-cell-from {
  color: #1a1a1a;
}

.email-unread .email-subject {
  font-weight: 700;
  color: #1a1a1a;
}

.email-unread .email-snippet {
  color: #5f6368;
  font-weight: 400;
}

.email-cell-from {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
  color: var(--gray-800);
}

.email-cell-subject {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 0;
  width: 100%;
}

.email-subject {
  color: var(--gray-800);
}

.email-snippet {
  color: var(--gray-400);
  margin-left: 6px;
  font-weight: 400;
}

.email-cell-date {
  white-space: nowrap;
  font-size: 12px;
  color: var(--gray-500);
  text-align: right;
}

.email-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 8px 12px;
  border-top: 1px solid var(--gray-200);
  font-size: 13px;
}

/* Email Detail */

.email-detail-meta {
  padding: 16px 24px;
  border-bottom: 1px solid var(--gray-100);
  font-size: 13px;
  line-height: 1.8;
}

.email-detail-row strong {
  display: inline-block;
  width: 45px;
  color: var(--gray-500);
  font-weight: 500;
}

.email-detail-attachments {
  padding: 10px 24px;
  border-bottom: 1px solid var(--gray-100);
  font-size: 13px;
}

.email-attachment-link {
  display: inline-block;
  padding: 3px 10px;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 4px;
  font-size: 12px;
  color: #2563eb;
  text-decoration: none;
  margin: 2px;
}

.email-attachment-link:hover {
  background: #e8f0fe;
}

.email-detail-body {
  padding: 0;
  max-height: 55vh;
  overflow-y: auto;
}

.email-body-iframe {
  width: 100%;
  min-height: 200px;
  border: none;
  display: block;
}

/* Compose */

#compose-editor {
  border-radius: 0 0 6px 6px;
}

#compose-editor .ql-editor {
  min-height: 180px;
  font-family: Inter, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
}

/* ── Email reload button ── */

#btn-reload-email {
  padding: 6px 8px;
}

#btn-reload-email.spinning svg,
#btn-reload-email.spinning .icon-sm {
  animation: spin-once 0.6s ease;
}

@keyframes spin-once {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ── Notification bell & dropdown ── */

.notify-wrapper {
  position: relative;
  display: inline-flex;
}

.notify-bell {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  margin-right: 8px;
  color: #6b7280;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}

.notify-bell:hover {
  background: #f3f4f6;
  color: #111827;
}

.notify-bell .icon-sm {
  width: 20px;
  height: 20px;
}

.notify-badge {
  position: absolute;
  top: 0;
  right: 2px;
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  border-radius: 9px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 17px;
  text-align: center;
  pointer-events: none;
  transform: translate(40%, -30%);
}

.notify-badge.hidden {
  display: none;
}

/* Dropdown panel */

.notify-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 400px;
  max-width: calc(100vw - 24px);
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18), 0 2px 8px rgba(0, 0, 0, 0.06);
  z-index: 9999;
  overflow: hidden;
  animation: notifyDropIn 0.15s ease-out;
}

@keyframes notifyDropIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.notify-dropdown.hidden {
  display: none;
}

.notify-dropdown-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px 10px;
  border-bottom: 1px solid #f0f0f0;
}

.notify-dropdown-title {
  font-size: 14px;
  font-weight: 700;
  color: #1a1a1a;
}

.notify-clear-all {
  background: none;
  border: none;
  font-size: 12px;
  color: #6b7280;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
}

.notify-clear-all:hover {
  background: #f3f4f6;
  color: #111;
}

.notify-dropdown-body {
  max-height: 420px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.notify-empty {
  text-align: center;
  color: #9ca3af;
  padding: 40px 16px;
  font-size: 13px;
}

/* Notification items */

.notify-item {
  padding: 12px 16px;
  border-bottom: 1px solid #f5f5f5;
  cursor: default;
  transition: background 0.12s;
  position: relative;
}

.notify-item:last-child {
  border-bottom: none;
}

.notify-item:hover {
  background: #f9fafb;
}

.notify-item.unread {
  background: #eff6ff;
  border-left: 3px solid #3b82f6;
  padding-left: 13px;
}

.notify-item.unread:hover {
  background: #e0edff;
}

.notify-item-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3px;
}

.notify-item-emails {
  font-size: 11px;
  color: #6b7280;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.notify-item.unread .notify-item-emails {
  color: #3b82f6;
  font-weight: 600;
}

.notify-item-time {
  font-size: 11px;
  color: #9ca3af;
  white-space: nowrap;
  margin-left: 8px;
  flex-shrink: 0;
}

.notify-item-subject {
  font-size: 13px;
  font-weight: 600;
  color: #1a1a1a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.notify-item.unread .notify-item-subject {
  color: #111827;
}

.notify-item-snippet {
  font-size: 12px;
  color: #9ca3af;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notify-item-actions {
  display: flex;
  gap: 4px;
  position: absolute;
  top: 10px;
  right: 12px;
  opacity: 0;
  transition: opacity 0.15s;
}

.notify-item:hover .notify-item-actions {
  opacity: 1;
}

.notify-action-btn {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 4px;
  cursor: pointer;
  color: #6b7280;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}

.notify-action-btn:hover {
  background: #f3f4f6;
  color: #111;
  border-color: #d1d5db;
}

.notify-action-btn .icon-xs {
  width: 14px;
  height: 14px;
}

/* Detail modal meta */

.notify-detail-meta {
  font-size: 13px;
  color: #374151;
  line-height: 1.8;
}

.notify-detail-meta strong {
  color: #111827;
  min-width: 50px;
  display: inline-block;
}

/* ── Notification toasts ── */

#notify-toast-container {
  position: fixed;
  top: 72px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-height: calc(100vh - 90px);
  overflow: hidden;
}

.notify-toast {
  pointer-events: auto;
  width: 360px;
  max-width: calc(100vw - 40px);
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.06);
  border-left: 4px solid #4285f4;
  padding: 14px 16px;
  cursor: pointer;
  opacity: 0;
  transform: translateX(100%);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.notify-toast.show {
  opacity: 1;
  transform: translateX(0);
}

.notify-toast.hide {
  opacity: 0;
  transform: translateX(100%);
}

.notify-toast-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.notify-toast-account {
  font-size: 11px;
  color: #4285f4;
  font-weight: 600;
  text-transform: lowercase;
}

.notify-toast-close {
  background: none;
  border: none;
  font-size: 18px;
  color: #999;
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
}

.notify-toast-close:hover {
  color: #333;
}

.notify-toast-sender {
  font-size: 12px;
  color: #555;
  margin-bottom: 3px;
}

.notify-toast-subject {
  font-size: 13px;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notify-toast-snippet {
  font-size: 12px;
  color: #777;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
