/**
 * PRA PDF — Phase B UI Stylesheet
 * Plans, Auth, Quotas, Payment, AI Assistant & Admin Panels
 * Preserving the PRA PDF Design Philosophy & Minimal Professional Aesthetic
 */

/* Navigation Header Additions */
.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--border, #E5E7EB);
  background: #FFFFFF;
  color: var(--text, #111827);
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}
.nav-btn:hover {
  border-color: var(--brand, #2563EB);
  color: var(--brand, #2563EB);
  background: var(--tint, #EFF6FF);
}

.nav-btn.ai-btn {
  background: var(--tint, #EFF6FF);
  border-color: #BFDBFE;
  color: var(--brand, #2563EB);
}
.nav-btn.ai-btn:hover {
  background: #DBEAFE;
}

.user-badge-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #FFFFFF;
  border: 1px solid var(--border, #E5E7EB);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text, #111827);
  cursor: pointer;
  transition: all 0.15s ease;
}
.user-badge-btn:hover {
  border-color: var(--brand, #2563EB);
}
.user-role-tag {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.tag-guest { background: #F3F4F6; color: #6B7280; }
.tag-free { background: #E0E7FF; color: #4338CA; }
.tag-paid { background: #DCFCE7; color: #15803D; }
.tag-admin { background: #FEE2E2; color: #B91C1C; }

/* Dropdown Menu */
.user-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 250px;
  background: #FFFFFF;
  border: 1px solid var(--border, #E5E7EB);
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 1000;
}
.dropdown-header {
  padding: 8px 10px;
  border-bottom: 1px solid #F3F4F6;
  margin-bottom: 4px;
}
.dropdown-email {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text, #111827);
  word-break: break-all;
}
.dropdown-plan {
  font-size: 12px;
  color: var(--muted, #6B7280);
  margin-top: 2px;
}
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text, #111827);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease;
}
.dropdown-item:hover {
  background: #F3F4F6;
  color: var(--brand, #2563EB);
}

/* Modals Overlay & Frame */
.pra-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.45);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}
.pra-modal-overlay[hidden] {
  display: none !important;
}

.pra-modal-card {
  background: #FFFFFF;
  border: 1px solid var(--border, #E5E7EB);
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
  width: 100%;
  max-width: 600px;
  padding: 28px;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}
.pra-modal-card.wide {
  max-width: 1100px;
}

.modal-close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  background: #F3F4F6;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #6B7280;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  transition: all 0.15s ease;
}
.modal-close-btn:hover {
  background: #E5E7EB;
  color: #111827;
}

.modal-title {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 800;
  color: var(--text, #111827);
  letter-spacing: -0.02em;
}
.modal-subtitle {
  margin: 0 0 24px;
  color: var(--muted, #6B7280);
  font-size: 14.5px;
  line-height: 1.5;
}

/* Pricing Grid */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(195px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.plan-col {
  background: #FAFAFA;
  border: 1px solid var(--border, #E5E7EB);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all 0.15s ease;
}
.plan-col.featured {
  background: #FFFFFF;
  border-color: var(--brand, #2563EB);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.1);
}
.plan-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--brand, #2563EB);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  text-transform: uppercase;
}
.plan-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text, #111827);
  margin: 0 0 6px;
}
.plan-price {
  font-size: 26px;
  font-weight: 800;
  color: var(--text, #111827);
  margin: 0 0 16px;
}
.plan-period {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted, #6B7280);
}
.plan-features {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13px;
  color: #374151;
  flex: 1;
}
.plan-features li {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  line-height: 1.4;
}
.plan-features li.locked {
  color: #9CA3AF;
  text-decoration: line-through;
}
.feat-icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  margin-top: 2px;
}
.plan-cta-btn {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--border, #E5E7EB);
  background: #FFFFFF;
  color: var(--text, #111827);
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}
.plan-cta-btn:hover {
  border-color: var(--brand, #2563EB);
  color: var(--brand, #2563EB);
}
.plan-cta-btn.primary {
  background: var(--brand, #2563EB);
  border-color: var(--brand, #2563EB);
  color: #FFFFFF;
}
.plan-cta-btn.primary:hover {
  background: var(--brand-d, #1D4ED8);
}
.plan-cta-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

/* Guest Locked Callout */
.guest-locked-callout {
  background: #FEF3C7;
  border: 1px solid #FDE68A;
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.guest-locked-text {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.guest-locked-text svg {
  width: 22px;
  height: 22px;
  stroke: #D97706;
  flex-shrink: 0;
  margin-top: 2px;
}
.guest-locked-title {
  font-size: 14.5px;
  font-weight: 700;
  color: #92400E;
  margin: 0 0 3px;
}
.guest-locked-desc {
  font-size: 13px;
  color: #B45309;
  margin: 0;
  line-height: 1.45;
}
.guest-locked-btn {
  background: var(--brand, #2563EB);
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease;
}
.guest-locked-btn:hover {
  background: var(--brand-d, #1D4ED8);
}

/* Forms & Inputs */
.form-group {
  margin-bottom: 16px;
}
.form-label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text, #111827);
  margin-bottom: 6px;
}
.form-input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border, #E5E7EB);
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  color: var(--text, #111827);
  background: #FFFFFF;
  box-sizing: border-box;
  transition: border-color 0.15s ease;
}
.form-input:focus {
  border-color: var(--brand, #2563EB);
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.form-submit-btn {
  width: 100%;
  padding: 12px;
  background: var(--brand, #2563EB);
  border: none;
  border-radius: 8px;
  color: #FFFFFF;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}
.form-submit-btn:hover {
  background: var(--brand-d, #1D4ED8);
}
.form-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Alert Boxes */
.pra-alert {
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 13.5px;
  line-height: 1.5;
  margin-bottom: 16px;
}
.pra-alert.success { background: #DCFCE7; border: 1px solid #BBF7D0; color: #166534; }
.pra-alert.error { background: #FEE2E2; border: 1px solid #FECACA; color: #991B1B; }
.pra-alert.info { background: #EFF6FF; border: 1px solid #DBEAFE; color: #1E40AF; }

/* UPI Payment Card */
.upi-qr-card {
  background: #FAFAFA;
  border: 1px solid var(--border, #E5E7EB);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  margin-bottom: 20px;
}
.upi-qr-image {
  width: 180px;
  height: 180px;
  margin: 0 auto 14px;
  background: #FFFFFF;
  border: 1px solid var(--border, #E5E7EB);
  border-radius: 10px;
  display: grid;
  place-items: center;
}
.upi-id-copy {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #FFFFFF;
  border: 1px solid var(--border, #E5E7EB);
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text, #111827);
  cursor: pointer;
  user-select: all;
}
.upi-id-copy:hover {
  border-color: var(--brand, #2563EB);
}

/* Quota Progress Meter */
.quota-card {
  background: #FAFAFA;
  border: 1px solid var(--border, #E5E7EB);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}
.quota-header {
  display: flex;
  justify-content: space-between;
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 8px;
}
.quota-bar-track {
  height: 8px;
  background: #E5E7EB;
  border-radius: 999px;
  overflow: hidden;
}
.quota-bar-fill {
  height: 100%;
  background: var(--brand, #2563EB);
  border-radius: 999px;
  transition: width 0.3s ease;
}

/* Navigation Auth Buttons */
.nav-auth-group {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-btn-login {
  background: #FFFFFF !important;
  color: var(--text, #111827) !important;
  border: 1px solid var(--border, #E5E7EB) !important;
  font-weight: 600 !important;
  font-size: 13.5px !important;
  padding: 8px 14px !important;
  border-radius: 8px !important;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}
.nav-btn-login:hover {
  border-color: var(--brand, #2563EB) !important;
  color: var(--brand, #2563EB) !important;
  background: #F8FAFC !important;
}
.nav-btn-signup {
  background: var(--brand, #2563EB) !important;
  color: #FFFFFF !important;
  border: 1px solid var(--brand, #2563EB) !important;
  font-weight: 700 !important;
  font-size: 13.5px !important;
  padding: 8px 16px !important;
  border-radius: 8px !important;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.12);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}
.nav-btn-signup:hover {
  background: var(--brand-d, #1D4ED8) !important;
  border-color: var(--brand-d, #1D4ED8) !important;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

/* Auth Modal Switch Tabs */
.auth-mode-switch {
  display: flex;
  background: #F3F4F6;
  border-radius: 8px;
  padding: 4px;
  gap: 4px;
  margin-bottom: 18px;
}
.auth-switch-tab {
  flex: 1;
  padding: 8px 10px;
  border: none;
  background: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted, #6B7280);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}
.auth-switch-tab:hover {
  color: var(--text, #111827);
}
.auth-switch-tab.active {
  background: #FFFFFF;
  color: var(--brand, #2563EB);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.auth-switch-link {
  font-size: 12.5px;
  color: var(--muted, #6B7280);
  text-align: center;
  margin-top: 14px;
}
.auth-switch-link button {
  background: none;
  border: none;
  color: var(--brand, #2563EB);
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  margin-left: 4px;
}
.auth-switch-link button:hover {
  text-decoration: underline;
}

/* AI Assistant Right-Side Sliding Drawer & Backdrop */
.pra-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.25);
  backdrop-filter: blur(1px);
  z-index: 9990;
  transition: opacity 0.25s ease;
  opacity: 1;
}
.pra-drawer-backdrop[hidden] {
  display: none !important;
  opacity: 0;
}

.pra-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 450px;
  max-width: 90vw;
  height: 100vh;
  height: 100dvh;
  background: #FFFFFF;
  border-left: 1px solid var(--border, #E5E7EB);
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.12);
  z-index: 9995;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s ease;
  overflow: hidden;
  visibility: hidden;
  pointer-events: none;
}

.pra-drawer.open {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
}

/* Drawer Header */
.pra-drawer-header {
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border, #E5E7EB);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  background: #FFFFFF;
  flex-shrink: 0;
}
.pra-drawer-title-group {
  flex: 1;
  min-width: 0;
}
.pra-drawer-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.ai-sparkle-icon {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: #EFF6FF;
  color: var(--brand, #2563EB);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.pra-drawer-title h3 {
  margin: 0;
  font-size: 16.5px;
  font-weight: 700;
  color: var(--text, #111827);
  letter-spacing: -0.01em;
}
.ai-badge-chip {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: #EFF6FF;
  color: var(--brand, #2563EB);
  border: 1px solid #DBEAFE;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.ai-badge-chip.locked {
  background: #FEF3C7;
  color: #92400E;
  border-color: #FDE68A;
}
.pra-drawer-subtitle {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted, #6B7280);
}
.drawer-close-btn {
  background: none;
  border: none;
  font-size: 24px;
  line-height: 1;
  color: var(--muted, #6B7280);
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  transition: all 0.12s ease;
  margin-top: -4px;
}
.drawer-close-btn:hover {
  color: var(--text, #111827);
  background: #F3F4F6;
}

/* Guest Lock Banner in Drawer */
.drawer-guest-banner {
  background: #FFFBEB;
  border-bottom: 1px solid #FDE68A;
  padding: 14px 18px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  flex-shrink: 0;
}
.drawer-guest-banner[hidden] {
  display: none !important;
}
.guest-banner-icon {
  color: #D97706;
  flex-shrink: 0;
  margin-top: 2px;
}
.guest-banner-content {
  flex: 1;
  min-width: 0;
}
.guest-banner-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #92400E;
  margin-bottom: 3px;
}
.guest-banner-text {
  font-size: 12.5px;
  color: #78350F;
  line-height: 1.45;
  margin: 0 0 10px;
}
.guest-banner-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.btn-drawer-signup {
  background: var(--brand, #2563EB);
  color: #FFFFFF;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease;
}
.btn-drawer-signup:hover {
  background: var(--brand-d, #1D4ED8);
}
.btn-drawer-login {
  background: #FFFFFF;
  color: var(--text, #111827);
  border: 1px solid #D1D5DB;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-drawer-login:hover {
  border-color: var(--brand, #2563EB);
  color: var(--brand, #2563EB);
}

/* Suggestions Bar */
.ai-suggestions-bar {
  padding: 10px 16px 8px;
  border-bottom: 1px solid #F3F4F6;
  background: #FAFAFA;
  flex-shrink: 0;
}
.suggestions-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted, #6B7280);
  margin-bottom: 6px;
}
.ai-quick-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ai-pill {
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 999px;
  background: #FFFFFF;
  border: 1px solid var(--border, #E5E7EB);
  color: var(--text, #111827);
  cursor: pointer;
  transition: all 0.12s ease;
  white-space: nowrap;
}
.ai-pill:hover {
  background: #EFF6FF;
  border-color: var(--brand, #2563EB);
  color: var(--brand, #2563EB);
}

/* Conversation Area */
.ai-chat-thread {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
  background: #FFFFFF;
}
.ai-msg {
  max-width: 86%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13.5px;
  line-height: 1.5;
  word-break: break-word;
}
.ai-msg.user {
  background: var(--brand, #2563EB);
  color: #FFFFFF;
  align-self: flex-end;
  border-bottom-right-radius: 3px;
}
.ai-msg.assistant {
  background: #F3F4F6;
  color: var(--text, #111827);
  align-self: flex-start;
  border-bottom-left-radius: 3px;
  border: 1px solid #E5E7EB;
}
.ai-msg.assistant.thinking {
  color: var(--muted, #6B7280);
  font-style: italic;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.ai-typing-dots {
  display: inline-flex;
  gap: 3px;
}
.ai-typing-dots span {
  width: 4px;
  height: 4px;
  background: var(--brand, #2563EB);
  border-radius: 50%;
  animation: typingBounce 1.2s infinite ease-in-out;
}
.ai-typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.ai-typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1.1); opacity: 1; }
}

/* AI Message Markdown & Code Rendering */
.ai-msg p {
  margin: 0 0 8px 0;
}
.ai-msg p:last-child {
  margin-bottom: 0;
}
.ai-msg pre {
  margin: 8px 0;
  padding: 10px 12px;
  background: #1E293B;
  color: #F8FAFC;
  border-radius: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12.5px;
  overflow-x: auto;
  line-height: 1.45;
}
.ai-msg code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
}
.ai-msg :not(pre) > code {
  background: rgba(0, 0, 0, 0.06);
  color: #DC2626;
  padding: 2px 5px;
  border-radius: 4px;
}
.ai-msg.user :not(pre) > code {
  background: rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
}
.ai-msg blockquote {
  border-left: 3px solid var(--brand, #2563EB);
  margin: 8px 0;
  padding: 4px 12px;
  background: #F8FAFC;
  color: var(--muted, #4B5563);
  font-style: italic;
  border-radius: 0 6px 6px 0;
}
.ai-msg h3, .ai-msg h4 {
  margin: 10px 0 6px;
  font-weight: 700;
  color: #111827;
}
.ai-msg h3 { font-size: 15px; }
.ai-msg h4 { font-size: 13.5px; }
.ai-msg ul, .ai-msg ol {
  margin: 6px 0 6px 20px;
  padding: 0;
}
.ai-msg li {
  margin-bottom: 4px;
}
.ai-table-wrapper {
  overflow-x: auto;
  margin: 10px 0;
  border-radius: 8px;
  border: 1px solid #E5E7EB;
}
.ai-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  background: #FFFFFF;
}
.ai-table th {
  background: #F9FAFB;
  font-weight: 600;
  text-align: left;
  padding: 8px 12px;
  border-bottom: 2px solid #E5E7EB;
  color: #374151;
}
.ai-table td {
  padding: 8px 12px;
  border-bottom: 1px solid #F3F4F6;
  color: #1F2937;
}
.ai-table tr:last-child td {
  border-bottom: none;
}
.code-block-wrapper {
  margin: 10px 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #334155;
}
.code-block-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #0F172A;
  padding: 5px 12px;
  font-size: 11px;
  color: #94A3B8;
  font-weight: 600;
  text-transform: uppercase;
}
.code-copy-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 4px;
  color: #E2E8F0;
  padding: 2px 8px;
  font-size: 11px;
  cursor: pointer;
}
.code-copy-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Drawer Footer / Input Area */
.pra-drawer-footer {
  padding: 12px 16px 14px;
  border-top: 1px solid var(--border, #E5E7EB);
  background: #FFFFFF;
  flex-shrink: 0;
}
.ai-chat-form {
  margin: 0;
}
.ai-input-bar {
  display: flex;
  gap: 8px;
  align-items: center;
}
.ai-input-bar .form-input {
  flex: 1;
  font-size: 14px;
  padding: 10px 12px;
}
.ai-send-btn {
  width: auto;
  padding: 10px 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.drawer-footer-note {
  font-size: 11px;
  color: var(--muted, #6B7280);
  text-align: center;
  margin-top: 8px;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .nav-btn span { display: none; }
  .nav-auth-group .nav-btn span { display: inline-block !important; }
  .nav-auth-group .nav-btn-login span { display: inline-block !important; }
  .nav-auth-group .nav-btn-signup span { display: inline-block !important; }
  .pricing-grid { grid-template-columns: 1fr; }
  .pra-modal-card { padding: 20px 16px; max-width: 95vw; box-sizing: border-box; }
  .guest-locked-callout { flex-direction: column; align-items: flex-start; }
  .pra-drawer {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100dvh !important;
    height: 100vh;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    border-radius: 0 !important;
    border-left: none !important;
  }
  .pra-drawer-header {
    height: 56px !important;
    min-height: 56px !important;
    padding: 0 12px !important;
  }
  .drawer-header-actions {
    gap: 6px !important;
  }
  .pra-drawer-footer {
    padding: 10px 12px max(12px, env(safe-area-inset-bottom)) 12px !important;
  }
  /* Prevent iOS Auto-Zoom on form inputs */
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="search"],
  input[type="number"],
  textarea,
  select,
  .form-input,
  #ai-chat-input,
  #history-search-input {
    font-size: 16px !important;
  }
  /* Mobile touch targets meeting standard accessibility (min 44x44px) */
  .nav-btn,
  .nav-btn-login,
  .nav-btn-signup,
  .pills button,
  .drawer-close-btn,
  .drawer-cancel-btn,
  .pra-modal-close,
  #btn-ai-send,
  #btn-ai-attach,
  #btn-history-toggle,
  #btn-history-close,
  #btn-ai-new-chat,
  #btn-ai-expand,
  .btn-res-action {
    min-height: 44px;
    touch-action: manipulation;
  }
  .ai-history-panel {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    max-width: 85vw;
    z-index: 40;
    background: #FFFFFF;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.18);
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    border-right: 1px solid var(--border, #E5E7EB);
  }
  .ai-history-panel.mobile-open {
    transform: translateX(0);
  }
  .history-close-btn {
    display: block !important;
  }
  /* Result cards stacking and full-width touch actions */
  .res li {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 10px !important;
    padding: 14px !important;
  }
  .res li .result-action-btns {
    width: 100% !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
  }
  .res li .result-action-btns > * {
    flex: 1 1 auto !important;
    min-height: 44px !important;
    justify-content: center !important;
  }
  .res li .nm,
  .stage-file-name,
  .doc-name {
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
  }
  /* Stage layout stacking */
  .stage-head {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 10px !important;
  }
  .stage-tools {
    width: 100% !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
  }
  .stage-tools .btn,
  .stage-tools .btn.compact,
  .stage-tools .btn-res-action {
    flex: 1 1 auto !important;
    min-height: 44px !important;
    justify-content: center !important;
  }
}

@media (max-width: 480px) {
  .nav-btn-login { padding: 6px 10px !important; font-size: 12.5px !important; }
  .nav-btn-signup { padding: 6px 12px !important; font-size: 12.5px !important; }
}

/* ==========================================================================
   PRA PDF — PHASE D.1 SPLIT-SCREEN AUTHENTICATION LAYOUT
   ========================================================================== */
#auth-page-view {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  background: #FFFFFF;
  overflow-y: auto;
  font-family: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
#auth-page-view[hidden] {
  display: none !important;
}

.auth-split-left {
  flex: 1;
  min-height: 100vh;
  background-color: #2563EB;
  background-image: 
    radial-gradient(circle at 100% 100%, rgba(29, 78, 216, 0.6) 0%, rgba(37, 99, 235, 1) 60%),
    radial-gradient(circle at 80% 90%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 48px 56px;
  color: #FFFFFF;
  overflow: hidden;
}

/* Ambient bottom right geometric curve */
.auth-split-left::after {
  content: "";
  position: absolute;
  bottom: -100px;
  right: -100px;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0) 70%);
  pointer-events: none;
}

.auth-brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #FFFFFF;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  z-index: 2;
}
.auth-brand-logo .logo-box {
  width: 32px;
  height: 32px;
  background: #FFFFFF;
  color: #2563EB;
  border-radius: 7px;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 18px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.auth-hero-center {
  margin: auto 0;
  max-width: 540px;
  z-index: 2;
}

.auth-hero-title {
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: clamp(2.4rem, 4vw, 3.8rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.035em;
  color: #FFFFFF;
  margin: 0 0 20px;
}

.auth-hero-desc {
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.88);
  margin: 0 0 32px;
}

.auth-hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.auth-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #FFFFFF;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.auth-hero-copy {
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.72);
  z-index: 2;
}

/* Right Form Section */
.auth-split-right {
  flex: 1;
  min-height: 100vh;
  background: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 32px;
  position: relative;
  overflow-y: auto;
}

.auth-form-container {
  width: 100%;
  max-width: 420px;
  margin: auto;
}

.auth-title {
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: clamp(1.8rem, 2.5vw, 2.2rem);
  font-weight: 800;
  color: #111827;
  letter-spacing: -0.025em;
  margin: 0 0 8px;
}

.auth-subtitle {
  font-size: 15px;
  color: #6B7280;
  margin: 0 0 28px;
  line-height: 1.5;
}

.auth-form-group {
  margin-bottom: 20px;
}

.auth-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 7px;
}

.auth-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #D1D5DB;
  border-radius: 8px;
  font-size: 15px;
  color: #111827;
  background: #FFFFFF;
  box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.auth-input:focus {
  outline: none;
  border-color: #2563EB;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.auth-input.otp-large {
  font-size: 24px;
  letter-spacing: 8px;
  text-align: center;
  font-weight: 700;
  padding: 12px;
}

.auth-password-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.auth-password-wrap .auth-input {
  padding-right: 64px;
}
.btn-toggle-pw {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: #2563EB;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 6px;
}
.btn-toggle-pw:hover {
  text-decoration: underline;
}

.auth-field-hint {
  display: block;
  font-size: 12.5px;
  color: #6B7280;
  margin-top: 6px;
}

.auth-row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
  font-size: 14px;
}

.auth-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #374151;
  cursor: pointer;
  user-select: none;
}
.auth-checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #2563EB;
  cursor: pointer;
}

.auth-terms-row {
  margin-bottom: 22px;
  font-size: 13.5px;
  color: #4B5563;
  line-height: 1.5;
}
.auth-terms-row a {
  color: #2563EB;
  text-decoration: none;
  font-weight: 500;
}
.auth-terms-row a:hover {
  text-decoration: underline;
}

.auth-link {
  color: #2563EB;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}
.auth-link:hover {
  text-decoration: underline;
}

.auth-link-bold {
  color: #2563EB;
  text-decoration: none;
  font-weight: 700;
}
.auth-link-bold:hover {
  text-decoration: underline;
}

.auth-primary-btn {
  width: 100%;
  padding: 13px 20px;
  background: #2563EB;
  color: #FFFFFF;
  border: 1px solid #2563EB;
  border-radius: 8px;
  font-size: 15.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.15s, box-shadow 0.15s, transform 0.1s;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.2);
}
.auth-primary-btn:hover {
  background: #1D4ED8;
  border-color: #1D4ED8;
}
.auth-primary-btn:active {
  transform: scale(0.99);
}

.auth-footer-prompt {
  text-align: center;
  margin-top: 22px;
  font-size: 14.5px;
  color: #4B5563;
}

.auth-footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 22px;
}

.auth-back-link {
  display: block;
  text-align: center;
  margin-top: 20px;
  color: #2563EB;
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
}
.auth-back-link:hover {
  text-decoration: underline;
}

.auth-alert {
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 13.5px;
  margin-bottom: 20px;
  line-height: 1.5;
}
.auth-alert.error {
  background: #FEE2E2;
  color: #B91C1C;
  border: 1px solid #FECACA;
}
.auth-alert.success {
  background: #DCFCE7;
  color: #15803D;
  border: 1px solid #BBF7D0;
}

.auth-btn-text {
  background: none;
  border: none;
  color: #2563EB;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}
.auth-btn-text:hover:not(:disabled) {
  text-decoration: underline;
}
.auth-btn-text:disabled {
  color: #9CA3AF;
  cursor: not-allowed;
}

/* Responsive Split-Screen Breakpoints */
@media (max-width: 900px) {
  #auth-page-view {
    flex-direction: column;
  }
  .auth-split-left {
    min-height: auto;
    padding: 36px 24px;
  }
  .auth-hero-title {
    font-size: 2rem;
    margin-bottom: 12px;
  }
  .auth-hero-desc {
    font-size: 1rem;
    margin-bottom: 20px;
  }
  .auth-hero-badges {
    gap: 8px;
  }
  .auth-badge {
    padding: 6px 14px;
    font-size: 13px;
  }
  .auth-hero-copy {
    display: none;
  }
  .auth-split-right {
    min-height: auto;
    padding: 32px 20px;
  }
}

/* ==========================================================================
   MASTER UX, NOVA AI, ACCOUNT, STORAGE & TOOL INTEGRATION (PHASE B/D/E UX)
   ========================================================================== */

/* 1. Desktop Side-by-Side Workspace Layout */
:root {
  --nova-desktop-width: 780px;
  --nova-desktop-collapsed-width: 520px;
}

body.nova-drawer-open {
  overflow-x: hidden;
}

@media (min-width: 900px) {
  .pra-drawer {
    width: 880px;
    max-width: min(940px, 94vw);
  }
  .history-close-btn {
    display: none !important;
  }
}

@media (min-width: 1024px) {
  body.nova-drawer-open header {
    right: var(--nova-desktop-width) !important;
    width: auto !important;
    transition: right 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  }
  body.nova-drawer-open header .bar,
  body.nova-drawer-open #top,
  body.nova-drawer-open #tv,
  body.nova-drawer-open #lv,
  body.nova-drawer-open #account-page-view,
  body.nova-drawer-open #storage-page-view,
  body.nova-drawer-open footer .wrap {
    margin-right: var(--nova-desktop-width) !important;
    max-width: calc(100vw - var(--nova-desktop-width)) !important;
    box-sizing: border-box !important;
    transition: margin-right 0.28s cubic-bezier(0.16, 1, 0.3, 1), max-width 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  }
  body.nova-drawer-open.nova-sidebar-collapsed header {
    right: var(--nova-desktop-collapsed-width) !important;
  }
  body.nova-drawer-open.nova-sidebar-collapsed header .bar,
  body.nova-drawer-open.nova-sidebar-collapsed #top,
  body.nova-drawer-open.nova-sidebar-collapsed #tv,
  body.nova-drawer-open.nova-sidebar-collapsed #lv,
  body.nova-drawer-open.nova-sidebar-collapsed #account-page-view,
  body.nova-drawer-open.nova-sidebar-collapsed #storage-page-view,
  body.nova-drawer-open.nova-sidebar-collapsed footer .wrap {
    margin-right: var(--nova-desktop-collapsed-width) !important;
    max-width: calc(100vw - var(--nova-desktop-collapsed-width)) !important;
  }
  body.nova-drawer-open .pra-drawer-backdrop {
    display: none !important;
    pointer-events: none !important;
  }
  .pra-drawer {
    width: var(--nova-desktop-width) !important;
    max-width: calc(100vw - 280px) !important;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), width 0.22s ease !important;
  }
  .pra-drawer.sidebar-collapsed {
    width: var(--nova-desktop-collapsed-width) !important;
  }
  .history-close-btn {
    display: none !important;
  }
}

/* 2. NOVA AI Drawer Header Actions & History Panel */
.drawer-header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}
.drawer-header-btn {
  background: none;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 6px;
  color: var(--muted, #6B7280);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.15s ease;
}
.drawer-header-btn:hover {
  background: #F3F4F6;
  color: var(--text, #111827);
  border-color: var(--border, #E5E7EB);
}
.nova-layout-body {
  display: flex;
  flex-direction: row;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  width: 100%;
  position: relative;
}

.ai-history-panel {
  width: 270px;
  flex-shrink: 0;
  height: 100%;
  background: #F9FAFB;
  border-right: 1px solid var(--border, #E5E7EB);
  border-bottom: none;
  overflow-y: auto;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  transition: width 0.22s ease, padding 0.22s ease, transform 0.22s ease;
}

.pra-drawer.sidebar-collapsed .ai-history-panel,
.ai-history-panel.collapsed {
  width: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  overflow: hidden !important;
  border-right: none !important;
}

.nova-main-chat {
  flex: 1;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #FFFFFF;
}
.history-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.history-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.history-panel-title {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted, #6B7280);
}
.history-new-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid var(--border, #E5E7EB);
  background: #FFFFFF;
  color: var(--brand, #2563EB);
  cursor: pointer;
}
.history-new-btn:hover {
  border-color: var(--brand, #2563EB);
  background: #EFF6FF;
}
.history-close-btn {
  background: none;
  border: none;
  font-size: 20px;
  line-height: 1;
  color: var(--muted, #6B7280);
  cursor: pointer;
}
.history-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #FFFFFF;
  border: 1px solid var(--border, #E5E7EB);
  border-radius: 6px;
  padding: 5px 10px;
  margin-bottom: 10px;
}
.history-search-box:focus-within {
  border-color: var(--brand, #2563EB);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}
.history-search-box input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 12px;
  width: 100%;
  color: var(--text, #111827);
}
.history-sessions-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.history-date-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.history-date-label {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #9CA3AF;
  padding: 4px 6px 2px;
}
.history-session-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  border-radius: 6px;
  background: #FFFFFF;
  border: 1px solid var(--border, #E5E7EB);
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text, #111827);
  transition: all 0.15s ease;
  position: relative;
  overflow: visible;
}
.history-session-item:hover {
  border-color: #D1D5DB;
  background: #F3F4F6;
}
.history-session-item.menu-open {
  z-index: 75;
  border-color: #9CA3AF;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.history-session-item.active {
  border-color: var(--brand, #2563EB);
  background: #EFF6FF;
  color: var(--brand, #2563EB);
  font-weight: 600;
  border-left-width: 3px;
}
.history-session-main {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex: 1;
  min-width: 0;
}
.history-session-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.history-session-time {
  font-size: 10px;
  color: #9CA3AF;
  margin-top: 1px;
}
.history-session-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: 6px;
  flex-shrink: 0;
}
.history-act-btn {
  background: none;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 3px 5px;
  cursor: pointer;
  color: var(--muted, #6B7280);
  font-size: 11px;
  display: grid;
  place-items: center;
  transition: all 0.1s ease;
}
.history-act-btn:hover {
  background: #FFFFFF;
  border-color: #D1D5DB;
  color: var(--text, #111827);
}
.history-act-btn.del-btn:hover {
  background: #FEE2E2;
  border-color: #FCA5A5;
  color: #DC2626;
}
.history-item-menu-btn {
  background: none;
  border: 1px solid transparent;
  padding: 2px 6px;
  font-size: 14px;
  line-height: 1;
  color: var(--muted, #6B7280);
  cursor: pointer;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.1s ease;
}
.history-item-menu-btn:hover {
  background: #E5E7EB;
  color: var(--text, #111827);
  border-color: #D1D5DB;
}
.history-item-dropdown {
  position: absolute;
  right: 6px;
  top: calc(100% + 2px);
  background: #FFFFFF;
  border: 1px solid var(--border, #E5E7EB);
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.16);
  padding: 4px;
  z-index: 100;
  display: none !important;
  flex-direction: column;
  min-width: 150px;
}
.history-item-dropdown.is-open:not([hidden]) {
  display: flex !important;
}
.history-item-dropdown[hidden] {
  display: none !important;
}
.history-item-dropdown.open-upward {
  top: auto;
  bottom: calc(100% + 2px);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.16);
}
.history-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  font-size: 12px;
  color: var(--text, #111827);
  background: none;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: background 0.1s ease;
}
.history-dropdown-item:hover {
  background: #F3F4F6;
}
.history-dropdown-item.danger {
  color: #DC2626;
}
.history-dropdown-item.danger:hover {
  background: #FEE2E2;
}
.history-pin-badge {
  display: inline-flex;
  align-items: center;
  color: var(--brand, #2563EB);
  margin-right: 4px;
  flex-shrink: 0;
}
.btn-chat-retry {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #FFFFFF;
  border: 1px solid #DC2626;
  border-radius: 6px;
  color: #DC2626;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 6px;
  transition: all 0.15s ease;
}
.btn-chat-retry:hover {
  background: #DC2626;
  color: #FFFFFF;
}

/* 3. Attachment Bar & File Button in Drawer */
.ai-attachment-bar {
  padding: 6px 14px 2px;
}
.attachment-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: #EFF6FF;
  border: 1px solid #DBEAFE;
  border-radius: 6px;
  font-size: 12.5px;
  color: #1E40AF;
}
.attachment-name {
  font-weight: 600;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.attachment-pages {
  font-size: 11.5px;
  color: #3B82F6;
}
.attachment-remove {
  background: none;
  border: none;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  color: #1E40AF;
  padding: 0 2px;
}
.ai-attach-btn {
  background: none;
  border: 1px solid var(--border, #E5E7EB);
  border-radius: 8px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--muted, #6B7280);
  flex-shrink: 0;
  transition: all 0.15s ease;
}
.ai-attach-btn:hover {
  border-color: var(--brand, #2563EB);
  color: var(--brand, #2563EB);
  background: #EFF6FF;
}
.pra-drawer.drag-over {
  border-left: 2px dashed var(--brand, #2563EB);
  background: #F8FAFC;
}

/* 4. Tool Completion Screen Actions */
.result-action-btns {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-left: auto;
}
.btn-res-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid var(--border, #E5E7EB);
  background: #FFFFFF;
  color: var(--text, #111827);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1;
}
.btn-res-action svg,
button.btn-res-action > svg {
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  min-height: 20px !important;
  max-width: 20px !important;
  max-height: 20px !important;
  display: inline-block !important;
  flex-shrink: 0 !important;
  vertical-align: middle !important;
}
.btn-res-action:hover {
  border-color: var(--brand, #2563EB);
  color: var(--brand, #2563EB);
  background: #EFF6FF;
}

/* 5. Dedicated Profile & Account Page */
.account-page {
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px var(--pad) 60px;
}
.account-container {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.account-card {
  background: #FFFFFF;
  border: 1px solid var(--border, #E5E7EB);
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.profile-summary-card {
  padding: 28px;
}
.profile-header-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563EB, #1D4ED8);
  color: #FFFFFF;
  font-size: 24px;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(37,99,235,0.22);
}
.profile-info-block {
  flex: 1;
  min-width: 220px;
}
.profile-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.profile-user-name {
  font-size: 22px;
  font-weight: 700;
  color: var(--text, #111827);
  margin: 0;
}
.role-badge {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.03em;
}
.role-badge.admin {
  background: #FEF3C7;
  color: #92400E;
  border: 1px solid #FDE68A;
}
.role-badge.paid {
  background: #EFF6FF;
  color: #1E40AF;
  border: 1px solid #DBEAFE;
}
.role-badge.free {
  background: #F3F4F6;
  color: #4B5563;
  border: 1px solid #E5E7EB;
}
.status-badge.active {
  background: #DCFCE7;
  color: #166534;
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
}
.profile-user-email {
  color: var(--muted, #6B7280);
  font-size: 14px;
  margin: 0 0 8px;
}
.profile-plan-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--muted, #6B7280);
}
.plan-tag {
  font-weight: 600;
  color: var(--brand, #2563EB);
}
.profile-quick-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.account-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.section-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.section-title {
  font-size: 19px;
  font-weight: 700;
  color: var(--text, #111827);
  margin: 0 0 4px;
}
.section-desc {
  font-size: 13.5px;
  color: var(--muted, #6B7280);
  margin: 0;
}
.permanent-reset-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: #F3F4F6;
  border: 1px solid var(--border, #E5E7EB);
  color: var(--text, #111827);
  font-size: 13px;
  font-weight: 600;
}
.permanent-reset-badge svg {
  color: var(--brand, #2563EB);
}
.quotas-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}
.quota-metric-card {
  background: #FFFFFF;
  border: 1px solid var(--border, #E5E7EB);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.quota-metric-card:hover {
  border-color: var(--brand, #2563EB);
  transform: translateY(-2px);
}
.quota-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.quota-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: grid;
  place-items: center;
}
.quota-icon svg {
  width: 18px;
  height: 18px;
}
.quota-icon.blue {
  background: #EFF6FF;
  color: #2563EB;
}
.quota-icon.indigo {
  background: #EEF2FF;
  color: #4F46E5;
}
.quota-icon.violet {
  background: #F5F3FF;
  color: #7C3AED;
}
.quota-icon.amber {
  background: #FFFBEB;
  color: #D97706;
}
.quota-icon.teal {
  background: #F0FDFA;
  color: #0D9488;
}
.quota-type-tag {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted, #6B7280);
  background: #F3F4F6;
  padding: 2px 6px;
  border-radius: 4px;
}
.quota-metric-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text, #111827);
  margin: 0 0 4px;
}
.quota-metric-desc {
  font-size: 12px;
  color: var(--muted, #6B7280);
  margin: 0 0 14px;
  min-height: 28px;
}
.quota-metric-numbers {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 10px;
}
.metric-used {
  font-size: 24px;
  font-weight: 800;
  color: var(--text, #111827);
}
.metric-sep {
  font-size: 18px;
  color: var(--muted, #6B7280);
}
.metric-allowed {
  font-size: 18px;
  font-weight: 700;
  color: var(--muted, #6B7280);
}
.metric-unit {
  font-size: 12.5px;
  color: var(--muted, #6B7280);
  margin-left: 2px;
}
.quota-bar-track {
  height: 7px;
  background: #F3F4F6;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 8px;
}
.quota-bar-fill {
  height: 100%;
  background: var(--brand, #2563EB);
  border-radius: 999px;
  transition: width 0.4s ease;
}
.quota-card-footer {
  font-size: 12px;
  color: var(--muted, #6B7280);
  font-weight: 500;
}
.security-card {
  display: flex;
  flex-direction: column;
}
.security-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
}
.security-row-title {
  font-size: 15.5px;
  font-weight: 600;
  color: var(--text, #111827);
  margin: 0 0 2px;
}
.security-row-desc {
  font-size: 13px;
  color: var(--muted, #6B7280);
  margin: 0;
}
.security-sep {
  height: 1px;
  background: #F3F4F6;
  margin: 4px 0;
}

/* 6. Dedicated Cloud Storage Page */
.storage-page {
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px var(--pad) 60px;
}
.storage-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.storage-card {
  background: #FFFFFF;
  border: 1px solid var(--border, #E5E7EB);
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.storage-header-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.storage-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}
.storage-icon-circle {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: #EFF6FF;
  color: var(--brand, #2563EB);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.storage-main-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text, #111827);
  margin: 0;
}
.storage-status-tag {
  font-size: 12px;
  font-weight: 700;
  color: #1E40AF;
  background: #DBEAFE;
  padding: 3px 8px;
  border-radius: 6px;
}
.storage-subtitle {
  font-size: 14px;
  color: var(--muted, #6B7280);
  margin: 0;
  max-width: 600px;
}
.storage-upgrade-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.upgrade-banner-icon {
  color: #D97706;
  flex-shrink: 0;
}
.upgrade-banner-content {
  flex: 1;
  min-width: 240px;
}
.upgrade-banner-title {
  font-size: 14.5px;
  font-weight: 700;
  color: #92400E;
  margin: 0 0 2px;
}
.upgrade-banner-desc {
  font-size: 13px;
  color: #78350F;
  margin: 0;
}
.storage-quota-meter-block {
  background: #F9FAFB;
  border: 1px solid var(--border, #E5E7EB);
  border-radius: 10px;
  padding: 14px 18px;
}
.meter-text-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text, #111827);
  margin-bottom: 8px;
}
.storage-meter-track {
  height: 9px;
  background: #E5E7EB;
  border-radius: 999px;
  overflow: hidden;
}
.storage-meter-bar {
  height: 100%;
  background: linear-gradient(90deg, #2563EB, #1D4ED8);
  border-radius: 999px;
  transition: width 0.4s ease;
}
.storage-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.storage-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border, #E5E7EB);
  border-radius: 8px;
  padding: 8px 12px;
  background: #F9FAFB;
  width: 100%;
  max-width: 340px;
}
.storage-search-box input {
  border: none;
  background: transparent;
  font-size: 13.5px;
  color: var(--text, #111827);
  width: 100%;
  outline: none;
}
.table-responsive-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.storage-files-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  text-align: left;
}
.storage-files-table th {
  padding: 12px 14px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted, #6B7280);
  border-bottom: 1px solid var(--border, #E5E7EB);
}
.storage-files-table td {
  padding: 14px 14px;
  font-size: 13.5px;
  color: var(--text, #111827);
  border-bottom: 1px solid #F3F4F6;
  vertical-align: middle;
}
.storage-files-table tr:hover td {
  background: #F9FAFB;
}
.file-name-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}
.file-icon-box {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: #EFF6FF;
  color: #2563EB;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.storage-table-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}
.storage-act-btn {
  background: #FFFFFF;
  border: 1px solid var(--border, #E5E7EB);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text, #111827);
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.storage-act-btn:hover {
  border-color: var(--brand, #2563EB);
  color: var(--brand, #2563EB);
  background: #EFF6FF;
}
.storage-act-btn.danger:hover {
  border-color: #DC2626;
  color: #DC2626;
  background: #FEF2F2;
}
.storage-empty-state {
  text-align: center;
  padding: 48px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.empty-icon-wrap {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #F3F4F6;
  color: var(--muted, #6B7280);
  display: grid;
  place-items: center;
  margin-bottom: 16px;
}
.empty-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text, #111827);
  margin: 0 0 6px;
}
.empty-desc {
  font-size: 13.5px;
  color: var(--muted, #6B7280);
  margin: 0;
  max-width: 440px;
}

/* ==========================================================================
   NOVA AI FULL-SCREEN WORKSPACE & SIDEBAR DROPDOWN REPAIRS (ISSUES 2 & 5)
   ========================================================================== */
.history-session-actions {
  position: relative !important;
}

.history-session-item.menu-open {
  z-index: 75 !important;
  border-color: #D1D5DB !important;
}

.history-item-dropdown.open-upward {
  top: auto !important;
  bottom: calc(100% + 2px) !important;
}

/* Zeravi AI Full-Screen Workspace & Modal State */
.pra-drawer.open.fullscreen,
.pra-drawer.fullscreen.open {
  width: 100vw !important;
  max-width: 100vw !important;
  left: 0 !important;
  right: 0 !important;
  top: 0 !important;
  bottom: 0 !important;
  border-left: none !important;
  z-index: 10005 !important;
  transform: translateX(0) !important;
}

/* Dedicated Drawer Cancel Button */
.drawer-cancel-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: #F3F4F6;
  border: 1px solid #D1D5DB;
  color: #374151;
  font-size: 13px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1;
  height: 32px;
  box-sizing: border-box;
  pointer-events: auto !important;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  position: relative;
  z-index: 50;
}
.drawer-cancel-btn:hover {
  background: #E5E7EB;
  color: #111827;
  border-color: #9CA3AF;
}
.drawer-cancel-btn:active {
  background: #D1D5DB;
  transform: translateY(1px);
}
.drawer-cancel-btn:focus-visible {
  outline: 2px solid #2563EB;
  outline-offset: 2px;
}

body.nova-drawer-fullscreen {
  margin-right: 0 !important;
  overflow: hidden !important;
}

.pra-drawer.fullscreen .ai-chat-thread,
.pra-drawer.fullscreen .ai-input-form,
.pra-drawer.fullscreen .ai-attachment-bar {
  max-width: 920px;
  margin-left: auto !important;
  margin-right: auto !important;
  width: 100%;
}

.pra-drawer.fullscreen .ai-msg.user {
  max-width: 75%;
}

.pra-drawer.fullscreen .ai-msg.assistant {
  max-width: 88%;
}

/* Generated Document Attachment Card inside NOVA AI */
.ai-generated-doc-card {
  margin: 12px 0 6px;
  background: #FFFFFF;
  border: 1px solid #DBEAFE;
  border-radius: 10px;
  padding: 12px 14px;
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.08);
}

.generated-doc-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.generated-doc-icon {
  width: 34px;
  height: 34px;
  background: #EFF6FF;
  color: var(--brand, #2563EB);
  border-radius: 8px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.generated-doc-meta {
  flex: 1;
  min-width: 0;
}

.generated-doc-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text, #111827);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.generated-doc-sub {
  font-size: 11.5px;
  color: var(--muted, #6B7280);
}

.generated-doc-badge {
  font-size: 11px;
  font-weight: 600;
  color: #15803D;
  background: #DCFCE7;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid #BBF7D0;
}

.generated-doc-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-doc-download {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--brand, #2563EB);
  color: #FFFFFF !important;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-doc-download:hover {
  background: #1D4ED8;
}

.btn-doc-action {
  background: #F3F4F6;
  border: 1px solid #D1D5DB;
  color: #374151;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-doc-action:hover {
  background: #E5E7EB;
  color: #111827;
}

/* ==========================================================================
   PRA PDF IN-APP TOAST & DIALOG NOTIFICATION SYSTEM
   ========================================================================== */
.pra-toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 11000;
  display: flex;
  flex-direction: column-reverse;
  gap: 10px;
  pointer-events: none;
  max-width: 420px;
  width: calc(100vw - 48px);
}
.pra-toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #111827;
  color: #FFFFFF;
  padding: 12px 16px;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.4;
  animation: praToastIn 0.24s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.pra-toast.info {
  background: #1F2937;
  border-left: 4px solid #3B82F6;
}
.pra-toast.success {
  background: #064E3B;
  border-left: 4px solid #10B981;
}
.pra-toast.warning {
  background: #78350F;
  border-left: 4px solid #F59E0B;
}
.pra-toast.error {
  background: #7F1D1D;
  border-left: 4px solid #EF4444;
}
.pra-toast-msg {
  flex: 1;
  min-width: 0;
  word-break: break-word;
}
.pra-toast-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 18px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}
.pra-toast-close:hover {
  color: #FFFFFF;
}
@keyframes praToastIn {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Sidebar Toggle Header Button Active State */
.drawer-header-btn.active {
  background: #EFF6FF !important;
  color: var(--brand, #2563EB) !important;
  border-color: #BFDBFE !important;
}

/* Image preview thumbnail inside chat output card */
.ai-image-output-preview {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 10px;
  padding: 10px;
  background: #F9FAFB;
  border-radius: 8px;
  border: 1px solid #E5E7EB;
}
.ai-image-thumb {
  max-width: 140px;
  max-height: 120px;
  border-radius: 6px;
  border: 1px solid #D1D5DB;
  object-fit: contain;
  background: #FFFFFF;
}

/* ==========================================================================
   ADMIN DASHBOARD COMPREHENSIVE STYLES
   ========================================================================== */
.admin-full-page-view {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 99999;
  background: #F9FAFB;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.admin-full-page-view[hidden],
#modal-admin[hidden] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.admin-sidebar .admin-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  background: transparent;
  border: 1.5px solid transparent;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  color: #4B5563;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}

.admin-sidebar .admin-nav-item:hover:not(.active) {
  background: #F3F4F6;
  color: #111827;
}

.admin-sidebar .admin-nav-item.active {
  background: #EFF6FF !important;
  color: #2563EB !important;
  border-color: #BFDBFE !important;
  font-weight: 600;
}

.admin-sidebar .admin-nav-item svg {
  flex-shrink: 0;
  stroke: currentColor;
}

.admin-sidebar .admin-nav-item.active svg {
  stroke: #2563EB !important;
}

.admin-card {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  margin-bottom: 20px;
}

.admin-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #F3F4F6;
}

.admin-card-title {
  font-size: 15px;
  font-weight: 700;
  color: #111827;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}

.admin-table thead th {
  padding: 10px 14px;
  background: #F9FAFB;
  color: #4B5563;
  font-weight: 600;
  border-bottom: 1px solid #E5E7EB;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.admin-table tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid #F3F4F6;
  color: #1F2937;
  vertical-align: middle;
}

.admin-table tbody tr:hover {
  background: #FBFBFC;
}

.admin-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
}

.admin-badge.active { background: #DCFCE7; color: #166534; }
.admin-badge.blocked { background: #FEE2E2; color: #991B1B; }
.admin-badge.pending { background: #FEF3C7; color: #92400E; }
.admin-badge.expired { background: #F3F4F6; color: #4B5563; }
.admin-badge.plan-admin { background: #FEE2E2; color: #B91C1C; }
.admin-badge.plan-paid { background: #DBEAFE; color: #1E40AF; }
.admin-badge.plan-free { background: #F3F4F6; color: #374151; }

.admin-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

.admin-btn.primary {
  background: #B91C1C;
  color: #FFFFFF;
}

.admin-btn.primary:hover {
  background: #991B1B;
}

.admin-btn.secondary {
  background: #FFFFFF;
  color: #374151;
  border-color: #D1D5DB;
}

.admin-btn.secondary:hover {
  background: #F9FAFB;
}

.admin-btn.danger {
  background: #FEE2E2;
  color: #B91C1C;
  border-color: #FECACA;
}

.admin-btn.danger:hover {
  background: #FCA5A5;
}

.admin-btn.success {
  background: #DCFCE7;
  color: #166534;
  border-color: #BBF7D0;
}

.admin-btn.success:hover {
  background: #86EFAC;
}

.admin-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.admin-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.admin-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

@media (max-width: 900px) {
  .admin-grid-2, .admin-grid-3, .admin-grid-4 {
    grid-template-columns: 1fr;
  }
}

.admin-metric-card {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  padding: 16px;
}

.admin-metric-val {
  font-size: 24px;
  font-weight: 700;
  color: #111827;
  margin: 4px 0;
}

.admin-metric-label {
  font-size: 12px;
  color: #6B7280;
  font-weight: 500;
}



