:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --success: #10b981;
  --success-hover: #059669;
  --danger: #ef4444;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --radius: 8px;
  --header-height: 56px;
  --dock-height: 62px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  height: 100%;
  width: 100%;
  overflow: hidden;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--gray-800);
  background-color: #e5e7eb;
  display: flex;
  flex-direction: column;
}

/* Visibility helpers */
.desktop-only {
  display: flex;
}

.mobile-only-inline {
  display: none;
}

/* App Header */
header {
  height: var(--header-height);
  background: #ffffff;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 20;
  box-shadow: var(--shadow-sm);
  position: relative;
  flex-shrink: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gray-900);
  user-select: none;
}

.brand-icon {
  font-size: 1.4rem;
  color: var(--primary);
}

.header-center {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.format-selector-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.format-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gray-600);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 7px 12px;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
}

.btn-default {
  background: #ffffff;
  border-color: var(--gray-300);
  color: var(--gray-700);
}
.btn-default:hover, .btn-default:active {
  background: var(--gray-100);
  border-color: var(--gray-400);
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
}
.btn-primary:hover, .btn-primary:active {
  background: var(--primary-hover);
}

.btn-success {
  background: var(--success);
  color: #ffffff;
}
.btn-success:hover, .btn-success:active {
  background: var(--success-hover);
}

.btn-danger {
  background: var(--danger);
  color: #ffffff;
}
.btn-danger:hover, .btn-danger:active {
  background: #dc2626;
}

.btn-sm {
  padding: 5px 9px;
  font-size: 0.775rem;
}

.btn-icon {
  padding: 6px 10px;
  font-size: 1rem;
  min-width: 36px;
  height: 36px;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Format selects */
.format-select {
  padding: 6px 10px;
  border-radius: var(--radius);
  border: 1px solid var(--gray-300);
  font-size: 0.825rem;
  background: white;
  color: var(--gray-800);
  outline: none;
  font-weight: 500;
}

.format-select-sm {
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid var(--gray-300);
  font-size: 0.8rem;
  background: white;
}

/* Mobile More Dropdown */
.mobile-more-dropdown {
  display: none;
  position: absolute;
  top: var(--header-height);
  right: 12px;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 6px 0;
  min-width: 190px;
  z-index: 30;
}

.mobile-more-dropdown.active {
  display: block;
}

.dropdown-item {
  padding: 10px 14px;
  font-size: 0.85rem;
  color: var(--gray-700);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dropdown-item:active {
  background: var(--gray-100);
}

.dropdown-divider {
  height: 1px;
  background: var(--gray-200);
  margin: 4px 0;
}

.dropdown-format-row {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
}

/* Main Layout */
.main-container {
  flex: 1;
  display: flex;
  overflow: hidden;
  position: relative;
}

/* Desktop Sidebar */
.sidebar {
  width: 270px;
  background: #ffffff;
  border-right: 1px solid var(--gray-200);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  z-index: 5;
  flex-shrink: 0;
}

.sidebar-section {
  padding: 14px;
  border-bottom: 1px solid var(--gray-200);
}

.sidebar-title {
  font-size: 0.725rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-400);
  font-weight: 700;
  margin-bottom: 10px;
}

.stamp-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stamp-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  background: var(--gray-50);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.stamp-card:hover {
  border-color: var(--primary);
  background: var(--primary-light);
  transform: translateY(-1px);
}

.stamp-icon {
  font-size: 1.2rem;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border-radius: 6px;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.stamp-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.stamp-name {
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--gray-800);
}

.stamp-sub {
  font-size: 0.7rem;
  color: var(--gray-400);
}

.preset-preview-box {
  margin-top: 4px;
  max-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px dashed var(--gray-300);
  border-radius: 4px;
  padding: 2px 4px;
}

.preset-preview-box img {
  max-height: 32px;
  max-width: 100%;
  object-fit: contain;
}

/* Properties Panel (Desktop) */
.properties-panel {
  display: none;
  background: #f8fafc;
  border: 1px solid var(--primary-light);
  border-radius: var(--radius);
  padding: 10px;
  margin-top: 10px;
}

.properties-panel.active {
  display: block;
}

.form-group {
  margin-bottom: 10px;
}

.form-group label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gray-600);
  margin-bottom: 4px;
}

.form-control {
  width: 100%;
  padding: 8px 10px;
  font-size: 0.875rem;
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  outline: none;
}

.form-control:focus {
  border-color: var(--primary);
}

/* Center Workspace Canvas */
.workspace {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #dbe0e6;
  overflow: hidden;
  position: relative;
}

.workspace-toolbar {
  height: 42px;
  background: white;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  flex-shrink: 0;
  z-index: 4;
}

.page-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.825rem;
  font-weight: 500;
}

.doc-info-label {
  font-size: 0.775rem;
  color: var(--gray-600);
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  max-width: 180px;
}

.viewport-scroll {
  flex: 1;
  overflow: auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 16px;
  -webkit-overflow-scrolling: touch;
}

.document-page-wrapper {
  position: relative;
  background: white;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  border-radius: 2px;
  user-select: none;
  max-width: 100%;
}

.page-image {
  display: block;
  max-width: 100%;
  height: auto;
  pointer-events: none;
}

.annotation-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: auto;
  touch-action: pan-x pan-y;
}

/* Interactive Stamp Item */
.annotation-item {
  position: absolute;
  cursor: move;
  border: 1.5px dashed transparent;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  touch-action: none; /* Prevents page scroll while dragging stamp */
}

.annotation-item:hover, .annotation-item:active {
  border-color: rgba(37, 99, 235, 0.4);
}

.annotation-item.selected {
  border: 1.5px solid var(--primary);
  background: rgba(37, 99, 235, 0.06);
}

.annotation-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.annotation-item .text-content {
  width: 100%;
  height: 100%;
  overflow: hidden;
  white-space: pre-wrap;
  word-break: break-word;
  pointer-events: none;
  line-height: 1.25;
}

/* Resize Handle (Touch-Optimized) */
.resize-handle {
  display: none;
  position: absolute;
  right: -12px;
  bottom: -12px;
  width: 28px;
  height: 28px;
  z-index: 10;
  touch-action: none;
  cursor: se-resize;
  align-items: center;
  justify-content: center;
}

.resize-handle::after {
  content: '';
  width: 12px;
  height: 12px;
  background: var(--primary);
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
  display: block;
}

.annotation-item.selected .resize-handle {
  display: flex;
}

/* Delete Button on Item */
.item-delete-btn {
  display: none;
  position: absolute;
  top: -14px;
  right: -14px;
  width: 28px;
  height: 28px;
  background: var(--danger);
  color: white;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  border: 2px solid white;
  box-shadow: var(--shadow-sm);
  z-index: 12;
}

.annotation-item.selected .item-delete-btn {
  display: flex;
}

/* Empty State / Welcome Dropzone */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px 20px;
  text-align: center;
  background: white;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  max-width: 460px;
  margin: auto;
  border: 2px dashed var(--gray-300);
}

.empty-state.drag-over {
  border-color: var(--primary);
  background: var(--primary-light);
}

.empty-state-icon {
  font-size: 2.8rem;
  margin-bottom: 8px;
}

.empty-state h3 {
  font-size: 1.15rem;
  margin-bottom: 6px;
  color: var(--gray-900);
}

.empty-state p {
  color: var(--gray-600);
  font-size: 0.85rem;
  margin-bottom: 16px;
}

.empty-state-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Mobile Bottom Dock */
.mobile-dock {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--dock-height);
  background: #ffffff;
  border-top: 1px solid var(--gray-200);
  box-shadow: 0 -3px 12px rgba(0, 0, 0, 0.08);
  z-index: 15;
  padding: 0 6px;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  align-items: center;
  justify-content: space-around;
}

.dock-btn {
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 6px 10px;
  cursor: pointer;
  border-radius: 8px;
  min-width: 48px;
  transition: background 0.15s ease;
}

.dock-btn:active {
  background: var(--primary-light);
}

.dock-icon {
  font-size: 1.3rem;
  line-height: 1;
}

.dock-label {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--gray-700);
}

/* Mobile Floating Properties Sheet */
.mobile-props-sheet {
  display: none;
  position: fixed;
  bottom: calc(var(--dock-height) + env(safe-area-inset-bottom, 0px) + 8px);
  left: 12px;
  right: 12px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--gray-200);
  z-index: 16;
  padding: 12px 14px;
  animation: slideUp 0.2s ease-out;
}

.mobile-props-sheet.active {
  display: block;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.mobile-props-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gray-800);
}

.btn-sheet-close {
  background: none;
  border: none;
  font-size: 1.3rem;
  line-height: 1;
  color: var(--gray-400);
  cursor: pointer;
  padding: 2px 6px;
}

.m-props-row {
  margin-bottom: 8px;
}

.m-props-controls-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.m-props-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.m-props-group label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gray-600);
}

.counter-buttons {
  display: flex;
  align-items: center;
  gap: 4px;
}

#mFontSizeDisplay {
  font-size: 0.8rem;
  font-weight: 700;
  min-width: 22px;
  text-align: center;
}

.color-picker-input {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  cursor: pointer;
}

/* Modals */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(3px);
  z-index: 50;
  align-items: center;
  justify-content: center;
  padding: 12px;
}

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

.modal-card {
  background: white;
  border-radius: 14px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.modal-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.modal-header h4 {
  font-size: 0.95rem;
  color: var(--gray-800);
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--gray-400);
  line-height: 1;
}

.modal-body {
  padding: 16px 18px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.modal-footer {
  padding: 12px 18px;
  border-top: 1px solid var(--gray-200);
  background: var(--gray-50);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

/* Signature & Initials Pads */
.tab-bar {
  display: flex;
  border-bottom: 1px solid var(--gray-200);
  margin-bottom: 14px;
  gap: 6px;
}

.tab-btn {
  padding: 7px 12px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--gray-600);
  cursor: pointer;
  transition: all 0.15s ease;
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

.sig-pad-wrapper {
  background: #f8fafc;
  border: 1.5px dashed var(--gray-300);
  border-radius: 8px;
  padding: 8px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.sig-pad-canvas {
  background: #ffffff;
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  cursor: crosshair;
  display: block;
  margin: 0 auto;
  touch-action: none;
  max-width: 100%;
}

.setup-banner {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Toast notifications */
.toast-container {
  position: fixed;
  bottom: calc(var(--dock-height) + 16px);
  right: 16px;
  left: 16px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.toast {
  padding: 9px 16px;
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.92);
  color: white;
  font-size: 0.825rem;
  box-shadow: var(--shadow-md);
  animation: fadeIn 0.2s ease;
  backdrop-filter: blur(4px);
  text-align: center;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========================================================
   📱 Mobile Responsive Styles (Screens up to 767px)
   ======================================================== */
@media (max-width: 767px) {
  .desktop-only {
    display: none !important;
  }

  .mobile-only-inline {
    display: inline-flex !important;
  }

  header {
    padding: 0 10px;
  }

  .brand-text {
    font-size: 1.05rem;
  }

  /* Make workspace occupy full screen and add bottom margin for dock */
  .workspace {
    padding-bottom: var(--dock-height);
  }

  .viewport-scroll {
    padding: 8px 6px;
  }

  .document-page-wrapper {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  }

  /* Show mobile dock */
  .mobile-dock {
    display: flex;
  }

  /* Ensure toast sits above dock */
  .toast-container {
    bottom: calc(var(--dock-height) + 16px);
  }

  /* Optimize empty state for phone */
  .empty-state {
    margin: 20px auto;
    padding: 24px 16px;
  }

  .empty-state-buttons .btn {
    width: 100%;
  }

  /* Sticky page bar on phone */
  .workspace-toolbar {
    height: 38px;
    padding: 0 10px;
  }

  .doc-info-label {
    max-width: 130px;
  }

  /* Modal optimizations */
  .modal-card {
    border-radius: 12px;
  }

  .modal-header {
    padding: 12px 14px;
  }

  .modal-body {
    padding: 12px 14px;
  }

  .modal-footer {
    padding: 10px 14px;
  }
}

/* ========================================================
   🔒 Sign-In Overlay & User Header Badge
   ======================================================== */
.login-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  z-index: 200;
  align-items: flex-start;
  justify-content: center;
  padding: 6vh 16px 24px;
  overflow-y: auto;
}

.login-overlay.active {
  display: flex;
}

.login-card {
  background: #ffffff;
  border-radius: 14px;
  width: 100%;
  max-width: 390px;
  padding: 26px 24px;
  box-shadow: 0 20px 35px -10px rgba(0, 0, 0, 0.45);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.login-brand h2 {
  font-size: 1.35rem;
  color: var(--gray-900);
  font-weight: 700;
}

.login-subtitle {
  font-size: 0.84rem;
  color: var(--gray-600);
  margin-bottom: 18px;
}

.password-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input-wrap .form-control {
  padding-right: 64px;
}

.btn-toggle-pw {
  position: absolute;
  right: 6px;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: 5px;
  padding: 4px 8px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--gray-700);
  cursor: pointer;
}

.btn-toggle-pw:hover {
  background: var(--gray-200);
}

.login-error {
  display: none;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  font-size: 0.8rem;
  padding: 8px 10px;
  border-radius: 6px;
  margin-bottom: 12px;
}

.login-error.active {
  display: block;
}

.user-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 20px;
  background: var(--gray-100);
  color: var(--gray-700);
  font-size: 0.78rem;
  font-weight: 600;
}

.auth-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--gray-100);
  border-radius: 8px;
  margin-bottom: 16px;
}

.auth-tab-btn {
  flex: 1;
  padding: 7px 10px;
  border: none;
  border-radius: 6px;
  background: transparent;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--gray-600);
  cursor: pointer;
  transition: all 0.15s ease;
}

.auth-tab-btn.active {
  background: #ffffff;
  color: var(--gray-900);
  box-shadow: var(--shadow-sm);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0;
  color: var(--gray-400);
  font-size: 0.75rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gray-200);
}

/* Admin Users Modal */
.admin-toolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.admin-add-box {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 14px;
  display: none;
}

.admin-add-box.active {
  display: block;
}

.admin-add-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

@media (max-width: 520px) {
  .admin-add-grid {
    grid-template-columns: 1fr;
  }
}

.admin-user-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 360px;
  overflow-y: auto;
}

.admin-user-card {
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  padding: 10px 12px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-user-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-user-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--gray-900);
}

.admin-badges {
  display: flex;
  gap: 5px;
  align-items: center;
}

.badge-tag {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  text-transform: uppercase;
}

.badge-admin {
  background: #dbeafe;
  color: #1d4ed8;
}

.badge-locked {
  background: #fee2e2;
  color: #b91c1c;
}

.badge-sig {
  background: #d1fae5;
  color: #047857;
}

.admin-user-meta {
  font-size: 0.775rem;
  color: var(--gray-600);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-user-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.badge-unverified {
  background: #fef3c7;
  color: #b45309;
}

/* Verification code panel (Zimnur style) */
.verify-code-hint {
  font-size: 0.82rem;
  color: var(--gray-600);
  margin: 0 0 8px 0;
  line-height: 1.4;
}

.verify-code-input {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 1.35rem;
  letter-spacing: 0.4em;
  text-align: center;
  min-height: 48px;
  padding: 0.5rem 0.75rem;
  box-sizing: border-box;
  font-weight: 700;
}

.verify-code-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}

.btn-link {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 0.84rem;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 8px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.btn-link:hover {
  color: var(--primary-hover);
}

.btn-link:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-link-muted {
  color: var(--gray-500);
  font-size: 0.78rem;
}
