:root {
  --bg-dark: #0a0b10;
  --bg-card: rgba(18, 20, 32, 0.72);
  --bg-card-hover: rgba(26, 29, 46, 0.85);
  --border-color: rgba(255, 255, 255, 0.09);
  --border-focus: #7952f5;
  
  --primary: #7952f5;
  --primary-glow: rgba(121, 82, 245, 0.35);
  --primary-hover: #8f6cf7;
  
  --accent: #00d2ff;
  --accent-glow: rgba(0, 210, 255, 0.35);
  
  --success: #10b981;
  --success-glow: rgba(16, 185, 129, 0.3);
  
  --warning: #f59e0b;
  --danger: #ef4444;

  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-dim: #6b7280;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-mono: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-sans);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  line-height: 1.5;
}

/* Background Glowing Orbs */
.glow-sphere {
  position: fixed;
  border-radius: 50%;
  filter: blur(130px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
  animation: floatOrb 20s infinite alternate ease-in-out;
}

.sphere-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #7952f5, transparent 70%);
  top: -100px;
  left: -100px;
}

.sphere-2 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, #00d2ff, transparent 70%);
  bottom: 50px;
  right: -50px;
  animation-duration: 25s;
}

.sphere-3 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, #ec4899, transparent 70%);
  top: 40%;
  left: 30%;
  opacity: 0.25;
  animation-duration: 30s;
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(60px, 40px) scale(1.1); }
  100% { transform: translate(-40px, 80px) scale(0.95); }
}

/* App Header */
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(10, 11, 16, 0.75);
  border-bottom: 1px solid var(--border-color);
}

.nav-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 20px var(--primary-glow);
}

.brand-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-name {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, #fff, #d1d5db);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-tabs {
  display: flex;
  background: rgba(255, 255, 255, 0.04);
  padding: 4px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
}

.nav-tab {
  text-decoration: none;
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 8px 18px;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.25s ease;
}

.nav-tab:hover {
  color: var(--text-main);
}

.nav-tab.active {
  background: linear-gradient(135deg, rgba(121, 82, 245, 0.8), rgba(99, 102, 241, 0.8));
  color: #fff;
  box-shadow: 0 2px 12px var(--primary-glow);
}

/* Main Container */
.main-container {
  max-width: 1440px;
  margin: 32px auto 80px;
  padding: 0 32px;
  position: relative;
  z-index: 1;
}

body.admin-view .main-container {
  max-width: 1620px;
  padding: 0 24px;
}

/* Glass Card */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
  transition: border-color 0.3s ease;
}

.glass-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

/* Announcement */
.announcement-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(90deg, rgba(121, 82, 245, 0.15), rgba(0, 210, 255, 0.08));
  border: 1px solid rgba(121, 82, 245, 0.3);
  border-radius: var(--radius-md);
  padding: 14px 22px;
  margin-bottom: 24px;
  font-size: 0.92rem;
  color: #e5e7eb;
}

.announcement-icon {
  font-size: 1.25rem;
}

.success-feed-card {
  padding: 18px 22px;
  margin-bottom: 24px;
  border: 1px solid rgba(16, 185, 129, 0.28);
  border-radius: var(--radius-md);
  background: linear-gradient(110deg, rgba(16, 185, 129, 0.12), rgba(18, 20, 32, 0.8) 60%);
}

.success-feed-header,
.success-feed-latest {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.success-feed-title {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  color: #d1fae5;
}

.success-feed-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 12px rgba(52, 211, 153, 0.7);
}

.success-feed-sync,
.success-feed-latest span {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.success-feed-latest {
  justify-content: flex-start;
  margin: 12px 0;
}

.success-feed-latest strong {
  font-size: 1.3rem;
  color: #fff;
}

.success-feed-list {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 0;
  list-style: none;
}

.success-feed-square {
  position: relative;
  flex: 0 0 21px;
  width: 21px;
  height: 21px;
  border-radius: 6px;
  background: #60c773;
  border: 1px solid rgba(167, 243, 178, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
  cursor: default;
  transition: transform 0.15s ease, background 0.15s ease;
}

.success-feed-square:hover,
.success-feed-square:focus-visible {
  z-index: 2;
  background: #7add8a;
  transform: translateY(-2px);
  outline: 2px solid rgba(167, 243, 178, 0.65);
  outline-offset: 2px;
}

.success-feed-square::after {
  content: attr(data-time);
  position: absolute;
  left: 0;
  bottom: calc(100% + 10px);
  width: max-content;
  max-width: min(260px, calc(100vw - 36px));
  padding: 8px 10px;
  border: 1px solid rgba(167, 243, 178, 0.3);
  border-radius: 8px;
  background: #1a2825;
  color: #eaffef;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.36);
  font-size: 0.76rem;
  line-height: 1.35;
  white-space: normal;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
}

.success-feed-square:nth-child(n+11)::after {
  left: auto;
  right: 0;
}

.success-feed-square:hover::after,
.success-feed-square:focus-visible::after {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

@media (max-width: 720px) {
  .success-feed-list {
    justify-content: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 10px 2px 12px;
    scrollbar-width: thin;
  }
  .success-feed-square::after { display: none; }
}

/* Tab Panes */
.tab-pane {
  display: none;
  animation: fadeIn 0.3s ease-out;
}

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

html.admin-entry-loading .tab-pane {
  visibility: hidden;
}

body.admin-view .glow-sphere {
  display: none;
}

body.admin-view .announcement-card {
  display: none !important;
}

body.admin-view .app-header,
body.admin-view .glass-card {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body.admin-view .app-header {
  background: #0a0b10;
}

body.admin-view .glass-card {
  background: #121420;
}

body.admin-view #pane-admin {
  animation: none;
}

#pane-verify, #pane-query {
  max-width: 860px;
  margin: 0 auto;
}

#pane-admin {
  width: 100%;
}

.admin-login-card {
  max-width: 480px;
  margin: 40px auto;
}

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

/* Workflow Steps */
.main-workflow-card {
  background: linear-gradient(180deg, rgba(20, 24, 38, 0.75) 0%, rgba(12, 14, 24, 0.88) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(121, 82, 245, 0.1);
  border-radius: var(--radius-lg);
  padding: 38px 44px;
  position: relative;
  overflow: hidden;
}

.main-workflow-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 15%;
  right: 15%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(167, 139, 250, 0.6), transparent);
}

.workflow-steps {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
  padding: 0 10px;
}

.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
}

.step-num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  border: 2px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-muted);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.step-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dim);
  transition: all 0.3s ease;
}

.step-item.active .step-num {
  background: linear-gradient(135deg, #7952f5, #6366f1);
  border-color: #a78bfa;
  color: #fff;
  box-shadow: 0 0 24px var(--primary-glow);
  transform: scale(1.08);
}

.step-item.active .step-label {
  color: #fff;
  font-weight: 700;
}

.step-item.done .step-num {
  background: rgba(16, 185, 129, 0.2);
  border-color: #34d399;
  color: #34d399;
  font-weight: 800;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.25);
}

.step-item.done .step-label {
  color: #34d399;
}

.step-connector {
  flex: 1;
  height: 2px;
  background: rgba(255, 255, 255, 0.08);
  margin: 0 14px -16px;
  transition: background 0.3s ease;
}

.step-connector.active {
  background: linear-gradient(90deg, #10b981, #7952f5);
}

/* Flow Stages */
.flow-stage {
  display: none;
}

.flow-stage.active {
  display: block;
  animation: fadeIn 0.3s ease-out;
}

.stage-header {
  margin-bottom: 28px;
}

.stage-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #a78bfa;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.stage-header h2 {
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  color: #fff;
}

.stage-header p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

/* Form Styles */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: #e5e7eb;
}

.required-star {
  color: var(--danger);
}

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

.input-icon {
  position: absolute;
  left: 16px;
  color: var(--text-dim);
  pointer-events: none;
}

.form-input, .form-select {
  width: 100%;
  background: rgba(10, 12, 20, 0.7);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: var(--text-main);
  font-size: 0.93rem;
  font-family: inherit;
  transition: all 0.25s ease;
}

.input-wrapper .form-input {
  padding-left: 48px;
}

.form-textarea {
  min-height: 90px;
  resize: none;
  line-height: 1.6;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.form-textarea::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

#inputSheerId {
  resize: none !important;
  overflow: hidden !important;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

#inputSheerId::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.form-input:focus, .form-select:focus {
  outline: none;
  border-color: var(--border-focus);
  background: rgba(0, 0, 0, 0.5);
  box-shadow: 0 0 0 3px rgba(121, 82, 245, 0.2);
}

.input-hint {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 6px;
}

.btn-paste {
  position: absolute;
  right: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: #d1d5db;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-paste:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #7952f5, #6366f1);
  color: #fff;
  box-shadow: 0 4px 18px var(--primary-glow);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #8f6cf7, #7478f7);
  box-shadow: 0 6px 24px rgba(121, 82, 245, 0.5);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: #e5e7eb;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.btn-block {
  width: 100%;
}

.btn-lg {
  padding: 16px 28px;
  font-size: 1.05rem;
}

.btn-sm {
  padding: 7px 14px;
  font-size: 0.82rem;
  border-radius: var(--radius-sm);
}

.btn-group {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.flex-1 {
  flex: 1;
}

/* Stage 2 Redesign */
.verified-card-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.28);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  margin-bottom: 24px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.pill-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pill-check-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #10b981;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

.pill-label {
  font-size: 0.84rem;
  font-weight: 700;
  color: #34d399;
  letter-spacing: 0.02em;
}

.pill-key {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.88rem;
  color: #fff;
  background: rgba(0, 0, 0, 0.35);
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  letter-spacing: 0.04em;
}

.pill-change-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: #d1d5db;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: var(--radius-sm);
  padding: 4px 12px;
  transition: all 0.2s;
}

.pill-change-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

/* Stage 2 Forms & Inputs */
.form-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.form-label-row .form-label {
  margin-bottom: 0;
}

.btn-quick-paste {
  background: rgba(121, 82, 245, 0.12);
  border: 1px solid rgba(121, 82, 245, 0.3);
  color: #c4b5fd;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-quick-paste:hover {
  background: rgba(121, 82, 245, 0.25);
  color: #fff;
  border-color: #a78bfa;
}

.textarea-wrapper {
  position: relative;
  display: block;
}

.textarea-icon {
  position: absolute;
  top: 14px;
  left: 16px;
  color: var(--text-dim);
  pointer-events: none;
}

.textarea-wrapper .form-textarea {
  padding-left: 46px;
  padding-top: 12px;
  min-height: 90px;
  line-height: 1.55;
  font-family: var(--font-mono);
  font-size: 0.88rem;
}

.field-callout {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  margin-top: 8px;
  font-size: 0.82rem;
  line-height: 1.5;
}

.warning-callout {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.22);
  color: #fef3c7;
}

.warning-callout code {
  background: rgba(0, 0, 0, 0.35);
  padding: 2px 6px;
  border-radius: 4px;
  color: #fbbf24;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.info-callout {
  background: rgba(121, 82, 245, 0.08);
  border: 1px solid rgba(121, 82, 245, 0.22);
  color: #e0e7ff;
}

.info-callout strong {
  color: #c7d2fe;
}

.callout-icon {
  font-size: 1rem;
  flex-shrink: 0;
  line-height: 1.2;
}

.callout-content {
  flex: 1;
}

.action-footer-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 32px;
}

.btn-back {
  padding: 14px 22px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-submit-task {
  flex: 1;
  height: 50px;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 4px 20px rgba(121, 82, 245, 0.45);
}

/* Stage 3: Modern Process Dashboard & Metrics */
.process-dashboard-card {
  padding: 34px 30px !important;
  background: linear-gradient(160deg, rgba(20, 24, 38, 0.95), rgba(12, 15, 25, 0.98)) !important;
  border: 1px solid rgba(139, 92, 246, 0.22) !important;
  border-radius: 20px !important;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), 0 0 45px rgba(121, 82, 245, 0.12) !important;
  position: relative;
  overflow: hidden;
}

.process-dashboard-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #7952f5, #00d2ff, #10b981, #7952f5);
  background-size: 300% 100%;
  animation: streamGlow 4s linear infinite;
}

@keyframes streamGlow {
  0% { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}

/* Hero Status Header */
.process-hero-status {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-bottom: 26px;
}

.process-pulse-ring {
  position: relative;
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.radar-spinner {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid rgba(121, 82, 245, 0.15);
  border-top-color: #a78bfa;
  border-right-color: #00d2ff;
  animation: spin 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
  box-shadow: 0 0 25px rgba(121, 82, 245, 0.35);
}

.radar-center-icon {
  font-size: 24px;
  animation: pulseIcon 2s ease-in-out infinite;
}

@keyframes pulseIcon {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 8px rgba(167, 139, 250, 0.6)); }
  50% { transform: scale(1.12); filter: drop-shadow(0 0 16px rgba(0, 210, 255, 0.8)); }
}

.process-headline {
  flex: 1;
  min-width: 0;
}

.process-badge-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  background: rgba(121, 82, 245, 0.12);
  border: 1px solid rgba(167, 139, 250, 0.3);
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 700;
  color: #c4b5fd;
  margin-bottom: 8px;
}

.live-dot-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 10px #10b981;
  animation: pulseDot 1.4s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.6; }
}

.process-title {
  font-size: 21px;
  font-weight: 700;
  color: #f8fafc;
  margin: 0 0 6px 0;
  letter-spacing: -0.02em;
}

.process-subtitle {
  font-size: 13px;
  color: #94a3b8;
  margin: 0;
  line-height: 1.5;
}

/* Micro Steps Flow Track */
.process-flow-track {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(10, 14, 25, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 14px 18px;
  margin-bottom: 22px;
}

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

.track-node {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11.5px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.06);
  color: #64748b;
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.track-step.active .track-node {
  background: #7952f5;
  color: #ffffff;
  border-color: #a78bfa;
  box-shadow: 0 0 12px rgba(121, 82, 245, 0.5);
}

.track-step.done .track-node {
  background: #10b981;
  color: #ffffff;
  border-color: #34d399;
}

.track-info {
  display: flex;
  flex-direction: column;
}

.track-title {
  font-size: 12.5px;
  font-weight: 650;
  color: #e2e8f0;
}

.track-step:not(.active):not(.done) .track-title {
  color: #64748b;
}

.track-sub {
  font-size: 10.5px;
  color: #718096;
}

.track-divider {
  flex: 1;
  height: 2px;
  background: rgba(255, 255, 255, 0.08);
  margin: 0 12px;
  position: relative;
}

.track-step.active + .track-divider {
  background: linear-gradient(90deg, #7952f5, rgba(255, 255, 255, 0.1));
}

/* Metrics Grid (Average Duration + Elapsed Time) */
.process-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}

.metric-card {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  background: rgba(15, 20, 35, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  padding: 15px 16px;
  transition: all 0.25s ease;
}

.metric-card:hover {
  border-color: rgba(167, 139, 250, 0.3);
  transform: translateY(-2px);
  background: rgba(20, 26, 45, 0.9);
}

.metric-icon {
  font-size: 22px;
  flex-shrink: 0;
  line-height: 1;
  margin-top: 2px;
}

.metric-content {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.metric-label {
  font-size: 11px;
  color: #8fa0b9;
  font-weight: 500;
}

.metric-value {
  font-size: 18px;
  font-weight: 750;
  color: #f1f5f9;
  letter-spacing: -0.01em;
}

.metric-value.text-accent {
  color: #38bdf8;
  text-shadow: 0 0 15px rgba(56, 189, 248, 0.25);
}

.metric-hint {
  font-size: 10.5px;
  color: #64748b;
}

/* Meta Panel */
.process-meta-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 12px 24px;
  background: rgba(8, 12, 22, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 20px;
}

.p-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  min-width: 0;
  white-space: nowrap;
}

.p-meta-label {
  color: #718096;
  white-space: nowrap;
  flex-shrink: 0;
}

.p-meta-val {
  color: #e2e8f0;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 320px;
}

.text-card {
  color: #38bdf8;
}

.text-highlight {
  color: #a78bfa;
}

/* Footer Bar */
.process-footer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.process-sync-status {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sync-text {
  font-size: 11.5px;
  color: #8fa0b9;
}

.process-footer-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

@media (max-width: 768px) {
  .process-metrics-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .process-meta-panel {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .p-meta-item {
    width: 100%;
    justify-content: space-between;
  }
  .process-flow-track {
    display: none;
  }
  .process-hero-status {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
}

/* Stage 3: Control Action Bar */
.action-bar-task {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.action-bar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.action-bar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

/* Refresh Button */
.btn-task-refresh {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.btn-task-refresh:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(121, 82, 245, 0.45);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(121, 82, 245, 0.18);
}

.btn-task-refresh:active {
  transform: translateY(0);
}

.refresh-icon {
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

.refresh-icon.is-spinning {
  animation: spinRefresh 0.65s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes spinRefresh {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Sync Indicator */
.sync-indicator {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.82rem;
  color: var(--text-dim);
  user-select: none;
}

.sync-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.sync-dot.live {
  background: #10b981;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.7);
  animation: pulseDot 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.sync-dot.ended {
  background: #f59e0b;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
  animation: none;
}

@keyframes pulseDot {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.4;
    transform: scale(0.85);
  }
}

.sync-label {
  letter-spacing: 0.01em;
}

/* Restart Button - Primary Prominent CTA */
.btn-task-restart {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: linear-gradient(135deg, #7952f5 0%, #6366f1 100%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffffff;
  padding: 11px 22px;
  border-radius: var(--radius-md);
  font-size: 0.94rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(121, 82, 245, 0.42);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-task-restart:hover {
  background: linear-gradient(135deg, #8f6cf7 0%, #7579f9 100%);
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 6px 24px rgba(121, 82, 245, 0.6);
  transform: translateY(-1.5px);
  color: #fff;
}

.btn-task-restart:hover svg {
  transform: rotate(-30deg);
}

.btn-task-restart svg {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.btn-task-restart:active {
  transform: translateY(0);
}

@media (max-width: 640px) {
  .action-bar-task {
    flex-direction: column;
    align-items: stretch;
  }
  .action-bar-left, .action-bar-right {
    width: 100%;
    justify-content: space-between;
  }
  .btn-task-refresh, .btn-task-restart {
    flex: 1;
    justify-content: center;
  }
}

/* Success Screen */
.success-splash {
  text-align: center;
  padding: 20px 0;
}

.success-icon-wrap {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(16, 185, 129, 0.05));
  border: 2px solid #10b981;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: #10b981;
  box-shadow: 0 0 30px var(--success-glow);
}

.success-splash h2 {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.success-sub {
  color: var(--text-muted);
  margin-bottom: 24px;
}

.success-details-card {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px 24px;
  max-width: 480px;
  margin: 0 auto 24px;
  text-align: left;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.9rem;
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-row span {
  color: var(--text-muted);
}

.guide-steps {
  display: none !important;
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(12px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.25s ease-out;
}

.modal-content {
  position: relative;
  width: 100%;
  max-width: 540px;
  background: #11131e;
  border: 1px solid rgba(121, 82, 245, 0.4);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
  border-radius: var(--radius-lg);
}

.modal-header {
  text-align: center;
  margin-bottom: 20px;
}

.modal-badge-pulse {
  display: inline-block;
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #fca5a5;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  margin-bottom: 8px;
  animation: pulse 1.5s infinite;
}

.modal-badge-pulse.badge-purple {
  background: rgba(121, 82, 245, 0.2);
  border: 1px solid rgba(121, 82, 245, 0.5);
  color: #c4b5fd;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.countdown-circle-wrap {
  text-align: center;
  margin-bottom: 20px;
  padding: 14px;
  background: rgba(0,0,0,0.3);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255,255,255,0.06);
}

.countdown-digits {
  font-size: 2.2rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #ef4444;
}

.countdown-sub {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.modal-steps-guide {
  font-size: 0.9rem;
  color: #d1d5db;
  line-height: 1.6;
}

/* Admin Tabs & Tables */
.admin-subnav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  overflow-x: auto;
  padding: 6px;
  background: rgba(14, 17, 28, 0.7);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
}

.subnav-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  padding: 9px 18px;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.88rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.subnav-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.subnav-btn.active {
  background: linear-gradient(135deg, rgba(121, 82, 245, 0.9), rgba(99, 102, 241, 0.9));
  border-color: rgba(167, 139, 250, 0.5);
  color: #fff;
  box-shadow: 0 4px 16px rgba(121, 82, 245, 0.4);
}

.admin-subpane {
  display: none;
}

.admin-subpane.active {
  display: block;
}

/* Card Stats Grid */
.card-stats-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 20px;
}

@media (max-width: 1280px) {
  .card-stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1024px) {
  .card-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.stat-mini-card {
  background: rgba(14, 17, 28, 0.65);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  transition: all 0.25s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.stat-mini-card:hover {
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-2px);
}

.card-filter-tab {
  width: 100%;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.card-filter-tab.active {
  border-color: var(--primary);
  background: rgba(121, 82, 245, 0.14);
  box-shadow: 0 0 0 1px rgba(121, 82, 245, 0.4), 0 4px 16px rgba(0, 0, 0, 0.25);
}

.card-filter-tab:focus-visible {
  outline: 2px solid var(--primary-hover);
  outline-offset: 3px;
}

.stat-icon-pill {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.icon-purple { background: rgba(121, 82, 245, 0.18); border: 1px solid rgba(121, 82, 245, 0.35); }
.icon-green { background: rgba(16, 185, 129, 0.18); border: 1px solid rgba(16, 185, 129, 0.35); }
.icon-amber { background: rgba(245, 158, 11, 0.18); border: 1px solid rgba(245, 158, 11, 0.35); }
.icon-slate { background: rgba(107, 114, 128, 0.18); border: 1px solid rgba(107, 114, 128, 0.35); }

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-val {
  font-size: 1.95rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #fff;
  line-height: 1.1;
}

.stat-name {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-dim);
  margin-top: 5px;
}

.text-success { color: #34d399; }
.text-warning { color: #fbbf24; }

/* Card Studio Form */
.gen-studio-card {
  padding: 28px 32px;
}

.gen-studio-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
  flex-wrap: wrap;
  gap: 12px;
}

.gen-studio-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.gen-studio-title h3 {
  font-size: 1.25rem;
  font-weight: 800;
}

.gen-badge {
  font-size: 0.76rem;
  font-weight: 700;
  background: rgba(121, 82, 245, 0.2);
  color: #a78bfa;
  border: 1px solid rgba(121, 82, 245, 0.4);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.gen-studio-hint {
  font-size: 0.88rem;
  color: var(--text-dim);
}

.gen-studio-form {
  display: grid;
  grid-template-columns: 290px 1.3fr 1.3fr auto;
  align-items: end;
  gap: 20px;
}

@media (max-width: 1200px) {
  .gen-studio-form {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .gen-studio-form {
    grid-template-columns: 1fr;
  }
}

.gen-field-group {
  display: flex;
  flex-direction: column;
}

.gen-count-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.gen-count-input {
  width: 90px !important;
  height: 44px;
  font-weight: 700;
  font-family: var(--font-mono);
  font-size: 1rem;
}

.quick-preset-btns {
  display: flex;
  gap: 6px;
}

.preset-pill {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 7px 11px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.preset-pill:hover {
  background: rgba(121, 82, 245, 0.25);
  color: #fff;
  border-color: rgba(121, 82, 245, 0.5);
}

.preset-pill.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 2px 10px rgba(121, 82, 245, 0.4);
}

.gen-btn-wrap {
  margin-top: auto;
}

.btn-sparkle {
  height: 44px;
  padding: 0 26px;
  box-shadow: 0 4px 18px rgba(121, 82, 245, 0.4);
  white-space: nowrap;
  font-size: 0.95rem;
  font-weight: 700;
}

.gen-result {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border-color);
}

.gen-result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}

.gen-result-keys {
  display: block;
  width: 100%;
  min-height: 110px;
  max-height: 260px;
  resize: vertical;
  font-family: var(--font-mono);
  line-height: 1.6;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.gen-result-keys::-webkit-scrollbar {
  display: none;
}

/* Table Toolbar */
.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 14px;
}

.toolbar-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.toolbar-title-wrap h3 {
  font-size: 1.2rem;
  font-weight: 800;
}

.badge-total {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.06);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
}

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.card-bulk-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 0;
  color: var(--text-muted);
  font-size: 0.86rem;
}

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

.card-select-cell {
  width: 52px;
  padding-right: 0 !important;
  text-align: center;
}

.card-select-cell input {
  width: 17px;
  height: 17px;
  cursor: pointer;
  accent-color: var(--primary);
}

.search-mini-wrap input {
  padding: 9px 14px;
  font-size: 0.86rem;
  width: 240px;
  border-radius: var(--radius-sm);
}

.btn-copy-sm {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #d1d5db;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  margin-left: 10px;
  transition: all 0.2s;
  white-space: nowrap;
  vertical-align: middle;
}

.btn-copy-sm:hover {
  background: rgba(121, 82, 245, 0.3);
  color: #fff;
  border-color: #a78bfa;
}

.btn-card-status {
  margin-left: 0;
  margin-right: 8px;
}

.card-status-summary {
  color: var(--text-muted);
  line-height: 1.8;
  overflow-wrap: anywhere;
}

/* --- Manual Resolve Status Modal Design --- */
.manual-resolve-modal {
  max-width: 530px !important;
  width: 95%;
  background: linear-gradient(145deg, #131726, #0e111c) !important;
  border: 1px solid rgba(167, 139, 250, 0.22) !important;
  border-radius: 20px !important;
  padding: 28px 26px !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.75), 0 0 40px rgba(121, 82, 245, 0.12) !important;
}

.manual-resolve-modal .modal-header {
  margin-bottom: 16px;
  position: relative;
}

.manual-resolve-modal .modal-header h3 {
  font-size: 19px;
  font-weight: 700;
  color: #f3f4f6;
  margin: 8px 0 4px;
}

.manual-resolve-modal .modal-subtitle {
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.5;
  margin: 0;
}

.manual-meta-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  background: rgba(15, 20, 35, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 14px;
}

.manual-meta-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.manual-meta-label {
  font-size: 11px;
  color: #7d8ca3;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.manual-meta-val {
  font-size: 13px;
  color: #e2e8f0;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Choice Cards Grid */
.manual-outcome-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 8px;
}

.manual-outcome-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  background: rgba(18, 22, 36, 0.9);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  border-radius: 13px;
  cursor: pointer;
  user-select: none;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.manual-outcome-card:hover:not(.disabled) {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(24, 30, 48, 0.95);
}

.manual-outcome-card .outcome-radio-circle {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #475569;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.manual-outcome-card .outcome-radio-circle::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: transparent;
  transition: all 0.2s ease;
}

.manual-outcome-card .outcome-icon {
  font-size: 19px;
  flex-shrink: 0;
}

.manual-outcome-card .outcome-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.manual-outcome-card .outcome-title {
  font-size: 13.5px;
  font-weight: 650;
  color: #e2e8f0;
}

.manual-outcome-card .outcome-desc {
  font-size: 11px;
  color: #8fa0b9;
  line-height: 1.3;
}

/* Success Card Active State */
.manual-outcome-card.outcome-card-success.active {
  border-color: #10b981;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.14), rgba(6, 78, 59, 0.22));
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.18);
}

.manual-outcome-card.outcome-card-success.active .outcome-radio-circle {
  border-color: #10b981;
}

.manual-outcome-card.outcome-card-success.active .outcome-radio-circle::after {
  background: #10b981;
}

.manual-outcome-card.outcome-card-success.active .outcome-title {
  color: #34d399;
}

/* Failed Card Active State */
.manual-outcome-card.outcome-card-failed.active {
  border-color: #ef4444;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.14), rgba(127, 29, 29, 0.22));
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.18);
}

.manual-outcome-card.outcome-card-failed.active .outcome-radio-circle {
  border-color: #ef4444;
}

.manual-outcome-card.outcome-card-failed.active .outcome-radio-circle::after {
  background: #ef4444;
}

.manual-outcome-card.outcome-card-failed.active .outcome-title {
  color: #f87171;
}

/* Disabled State */
.manual-outcome-card.disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

/* Alert Notice */
.manual-alert-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 10px;
  padding: 10px 13px;
  color: #fde68a;
  font-size: 11.5px;
  line-height: 1.55;
}

.manual-alert-notice .alert-icon {
  font-size: 14px;
  flex-shrink: 0;
  margin-top: 1px;
}

/* Modal Footer */
.manual-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.manual-modal-footer .btn {
  min-height: 40px;
  padding: 0 20px;
  font-size: 13.5px;
  font-weight: 600;
}

@media (max-width: 520px) {
  .manual-outcome-grid {
    grid-template-columns: 1fr;
  }
  .manual-meta-panel {
    grid-template-columns: 1fr;
  }
}

.btn-del-sm {
  display: inline-flex;
  align-items: center;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  padding: 5px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-del-sm:hover {
  background: rgba(239, 68, 68, 0.3);
  border-color: #ef4444;
  color: #fff;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(10, 12, 20, 0.35);
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.92rem;
  text-align: left;
  min-width: 960px;
}

.data-table th, .data-table td {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  vertical-align: middle;
}

.data-table th {
  color: var(--text-dim);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.025);
  white-space: nowrap;
}

.data-table tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

/* Keep the order stream readable inside the admin card. */
.order-stream-card {
  min-width: 0;
}

.order-stream-card .table-responsive {
  overflow-x: auto;
  overflow-y: hidden;
}

.order-stream-table {
  table-layout: fixed;
  min-width: 960px;
  width: 100%;
}

.order-stream-table th, .order-stream-table td { padding: 14px 12px; vertical-align: middle; }
.order-stream-table .order-info-column { width: 235px; }
.order-stream-table .order-submit-column { width: 220px; }
.order-stream-table .order-status-column { width: 120px; white-space: nowrap; }
.order-stream-table .order-actions-column { width: 145px; text-align: right; white-space: nowrap; }
.order-cell-stack { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; min-width: 0; }
.order-submit-time { color: var(--text-dim); font: 11px var(--font-mono); white-space: nowrap; }
.order-stream-table .table-id-cell { font-size: 12px; }
.order-stream-table .table-card-cell { font-size: 11px; }
.order-row-actions { display: flex; flex-wrap: nowrap; justify-content: flex-end; align-items: center; gap: 6px; white-space: nowrap; }
.order-row-actions .btn,
.order-task-controls .btn { white-space: nowrap; flex-shrink: 0; }

@media (max-width: 1200px) {
  .order-stream-card .table-responsive { border: 0; background: transparent; }
  .order-stream-table, .order-stream-table tbody { display: block; }
  .order-stream-table thead { display: none; }
  .order-stream-table .order-stream-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; padding: 18px; margin-bottom: 12px; border: 1px solid var(--border-color); border-radius: 12px; background: #121522; }
  .admin-dashboard .order-stream-table .order-stream-row td { display: block; width: auto; padding: 0; border: 0; min-width: 0; }
  .order-stream-table .order-info-column { grid-column: 1; grid-row: 1; }
  .order-stream-table .order-status-column { grid-column: 2; grid-row: 1; }
  .order-stream-table .order-submit-column { grid-column: 1 / -1; grid-row: 2; }
  .order-stream-table .order-submit-column .order-cell-stack { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
  .order-stream-table .order-progress-column { grid-column: 1 / -1; grid-row: 3; font-size: 13px; line-height: 1.6; }
  .order-stream-table .order-actions-column { grid-column: 1 / -1; grid-row: 4; }
  .order-stream-table .order-empty-cell { display: block; }
}

@media (max-width: 440px) {
  .order-stream-table .order-stream-row { grid-template-columns: minmax(0, 1fr); padding: 14px; }
  .order-stream-table .order-status-column { grid-column: 1; grid-row: 2; }
  .order-stream-table .order-submit-column { grid-row: 3; }
  .order-stream-table .order-progress-column { grid-row: 4; }
  .order-stream-table .order-actions-column { grid-row: 5; }
}

.order-stream-table .table-id-cell,
.order-stream-table .table-card-cell {
  max-width: 100%;
  white-space: nowrap;
  overflow-wrap: normal;
}

.order-stream-table .table-email-cell {
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.order-stream-table .table-id-cell span:first-child,
.order-stream-table .table-card-cell span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-stream-table .copy-subicon { flex-shrink: 0; }

.order-stream-table .order-step-cell {
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.badge-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: 0.02em;
  line-height: 1.4;
}

.badge-unused { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.badge-in_use { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.badge-used { background: rgba(107, 114, 128, 0.25); color: #9ca3af; }
.badge-failed { background: rgba(239, 68, 68, 0.18); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.25); }
.badge-success { background: rgba(16, 185, 129, 0.18); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.25); }
.badge-processing, .badge-form_filling, .badge-tg_init, .badge-tg_paying, .badge-uploading_doc {
  background: rgba(121, 82, 245, 0.18);
  color: #c4b5fd;
  border: 1px solid rgba(121, 82, 245, 0.25);
}
.badge-waiting, .badge-waiting_email_link {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.25);
}
.badge-pending {
  background: rgba(107, 114, 128, 0.18);
  color: #94a3b8;
  border: 1px solid rgba(107, 114, 128, 0.25);
}

.table-id-cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 3px 8px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.88rem;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s;
}
.table-id-cell:hover {
  background: rgba(121, 82, 245, 0.15);
  border-color: rgba(121, 82, 245, 0.4);
  color: #c4b5fd;
}

.table-card-cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(121, 82, 245, 0.06);
  border: 1px solid rgba(121, 82, 245, 0.15);
  border-radius: var(--radius-sm);
  padding: 3px 8px;
  font-family: var(--font-mono);
  font-size: 0.84rem;
  color: #c4b5fd;
  cursor: pointer;
  transition: all 0.2s;
}
.table-card-cell:hover {
  background: rgba(121, 82, 245, 0.2);
  border-color: rgba(121, 82, 245, 0.5);
  color: #fff;
}

.table-email-cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.86rem;
  color: #e2e8f0;
  cursor: pointer;
  transition: color 0.2s;
}
.table-email-cell:hover {
  color: var(--primary-light);
}

.copy-subicon {
  font-size: 0.72rem;
  opacity: 0.45;
  transition: opacity 0.2s;
}
.table-id-cell:hover .copy-subicon,
.table-card-cell:hover .copy-subicon {
  opacity: 1;
}

.order-step-cell {
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.84rem;
  line-height: 1.4;
}

.grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* Modern Proxy Card & Switch */
.proxy-card-panel {
  background: rgba(12, 14, 24, 0.65);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.proxy-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.proxy-title-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.proxy-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #f3f4f6;
}

.proxy-desc {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.switch-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.switch-toggle input {
  display: none;
}

.switch-slider {
  position: relative;
  width: 44px;
  height: 24px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.switch-slider::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.switch-toggle input:checked + .switch-slider {
  background: linear-gradient(135deg, #7952f5, #6366f1);
  border-color: #8b5cf6;
  box-shadow: 0 0 12px rgba(121, 82, 245, 0.4);
}

.switch-toggle input:checked + .switch-slider::before {
  transform: translateX(20px);
}

.switch-text {
  font-size: 0.88rem;
  font-weight: 600;
  color: #e5e7eb;
}

.proxy-grid-inputs {
  display: grid;
  grid-template-columns: 140px 1fr 120px;
  gap: 14px;
  transition: opacity 0.3s, filter 0.3s;
}

.browser-proxy-grid {
  grid-template-columns: 130px 1fr 160px;
}

.proxy-grid-inputs.disabled {
  opacity: 0.4;
  pointer-events: none;
  filter: grayscale(0.6);
}

.form-sublabel {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.mb-0 {
  margin-bottom: 0 !important;
}

.flex-2 {
  grid-column: span 1;
}

/* Telegram Configuration Polish */
.tg-header-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 26px;
  gap: 20px;
  flex-wrap: wrap;
}

.tg-header-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

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

.tg-header-title-wrap h3 {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.tg-badge-bot {
  font-size: 0.68rem;
  font-weight: 800;
  background: rgba(0, 210, 255, 0.15);
  color: var(--accent);
  border: 1px solid rgba(0, 210, 255, 0.35);
  padding: 2px 7px;
  border-radius: var(--radius-full);
}

.tg-header-desc {
  font-size: 0.85rem;
  color: var(--text-dim);
}

.tg-header-desc code {
  color: #a78bfa;
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 6px;
  border-radius: 4px;
}

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

/* Config Section Cards */
.config-section-card {
  padding: 24px;
}

.section-title-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.section-num {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.9rem;
  color: #a78bfa;
  background: rgba(121, 82, 245, 0.15);
  border: 1px solid rgba(121, 82, 245, 0.3);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}

.section-title-bar h4 {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.section-title-bar p {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 2px;
}

.input-prefix-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-at-tag {
  position: absolute;
  left: 14px;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--text-dim);
  pointer-events: none;
}

.input-with-at {
  padding-left: 34px !important;
  font-family: var(--font-mono);
  color: #a78bfa !important;
  font-weight: 600;
}

.underline {
  text-decoration: underline;
}

/* Phone Login Assistant */
.phone-login-box {
  background: rgba(10, 12, 20, 0.7);
  border: 1px solid rgba(121, 82, 245, 0.25);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-top: 20px;
}

.phone-box-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.phone-icon-pill {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: rgba(121, 82, 245, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.phone-box-header h5 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}

.phone-box-header p {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 2px;
}

.phone-step-row {
  display: flex;
  gap: 12px;
  align-items: center;
}

.btn-nowrap {
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  padding: 12px 22px;
}

.phone-code-panel {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 16px;
  border-radius: var(--radius-md);
  animation: fadeIn 0.3s ease-out;
}

.form-footer-actions {
  display: flex;
  justify-content: flex-end;
}

.hidden {
  display: none !important;
}

.ml-auto {
  margin-left: auto;
}

.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 14px; }
.mt-4 { margin-top: 20px; }
.mb-4 { margin-bottom: 20px; }

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: #181b2a;
  border: 1px solid var(--border-color);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--danger); }
.toast.info { border-left: 4px solid var(--primary); }

/* Multi-Account Pool & Modal Styles */
.account-modal-content {
  max-width: 620px;
}

.modal-close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-dim);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10;
}

.modal-close-btn:hover {
  color: #fff;
  background: rgba(239, 68, 68, 0.25);
  border-color: rgba(239, 68, 68, 0.4);
  transform: scale(1.05);
}

.account-modal-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 4px;
  gap: 6px;
  margin-top: 14px;
}

.acc-tab-btn {
  flex: 1;
  padding: 10px 14px;
  font-size: 0.88rem;
  font-weight: 600;
  border: none;
  background: transparent;
  color: var(--text-dim);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.acc-tab-btn.active {
  background: rgba(121, 82, 245, 0.25);
  color: #fff;
  border: 1px solid rgba(121, 82, 245, 0.4);
  box-shadow: 0 4px 12px rgba(121, 82, 245, 0.15);
}

.flex-end-align {
  display: flex;
  align-items: flex-end;
}

/* Pool Status Badges */
.badge-pool-active {
  background: rgba(52, 211, 153, 0.15);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.3);
}

.badge-pool-warning {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.badge-pool-busy {
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.3);
  animation: pulseGlow 1.5s infinite alternate;
}

.badge-pool-disabled {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.badge-pool-error {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

@keyframes pulseGlow {
  0% { opacity: 0.8; }
  100% { opacity: 1; filter: brightness(1.2); }
}

.pool-action-btns {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.btn-xs {
  padding: 4px 10px !important;
  font-size: 0.78rem !important;
  border-radius: var(--radius-sm) !important;
}

/* --- Order Query Redesign --- */
.query-card {
  max-width: 680px;
  margin: 0 auto;
}

.query-search-box {
  display: flex;
  gap: 10px;
  align-items: stretch;
  margin-bottom: 24px;
}

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

.query-search-icon {
  position: absolute;
  left: 16px;
  color: var(--text-dim);
  pointer-events: none;
}

.query-input {
  width: 100%;
  background: rgba(10, 12, 22, 0.75);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 13px 18px 13px 46px;
  color: var(--text-main);
  font-size: 0.95rem;
  font-family: inherit;
  transition: all 0.25s ease;
}

.query-input:focus {
  outline: none;
  border-color: var(--border-focus);
  background: rgba(14, 17, 30, 0.95);
  box-shadow: 0 0 0 3px rgba(121, 82, 245, 0.25);
}

.query-btn {
  white-space: nowrap !important;
  flex-shrink: 0;
  padding: 0 22px !important;
  font-size: 0.92rem !important;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.query-results-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Individual Query Order Card */
.q-order-card {
  background: rgba(15, 18, 32, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: all 0.25s ease;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  position: relative;
  overflow: hidden;
}

.q-order-card:hover {
  border-color: rgba(121, 82, 245, 0.35);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  transform: translateY(-2px);
}

.q-order-card.success-border {
  border-left: 4px solid #10b981;
}

.q-order-card.failed-border {
  border-left: 4px solid #ef4444;
}

.q-order-card.progress-border {
  border-left: 4px solid #7952f5;
}

.q-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 8px;
}

.q-card-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.q-card-id {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.q-card-id:hover {
  background: rgba(121, 82, 245, 0.2);
  color: #a78bfa;
}

.q-card-time {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.q-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.q-meta-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.q-meta-label {
  font-size: 0.72rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.q-meta-val {
  font-size: 0.88rem;
  color: #e2e8f0;
  word-break: break-all;
}

.q-status-box {
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 14px;
  font-size: 0.88rem;
}

.q-status-box.success {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.q-status-box.success .q-status-title {
  color: #34d399;
  font-weight: 600;
  margin-bottom: 3px;
}

.q-status-box.failed {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.q-status-box.failed .q-status-title {
  color: #f87171;
  font-weight: 600;
  margin-bottom: 3px;
}

.q-status-box.progress {
  background: rgba(121, 82, 245, 0.08);
  border: 1px solid rgba(121, 82, 245, 0.2);
}

.q-status-box.progress .q-status-title {
  color: #a78bfa;
  font-weight: 600;
  margin-bottom: 3px;
}

.q-status-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
}

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

.q-order-logs {
  margin-top: 14px;
  background: rgba(5, 7, 14, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  max-height: 200px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#pane-query .q-order-logs {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

#pane-query .q-order-logs::-webkit-scrollbar {
  display: none;
}

.q-log-line {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  line-height: 1.4;
}

.q-log-time {
  color: var(--text-dim);
  flex-shrink: 0;
}

.q-log-msg {
  color: #cbd5e1;
}

.query-empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.query-empty-state h4 {
  font-size: 1.05rem;
  color: #e2e8f0;
  margin-bottom: 6px;
}

.query-empty-state p {
  font-size: 0.85rem;
  color: var(--text-dim);
}


#apiKeyCreateForm { display: flex; flex-wrap: wrap; align-items: end; gap: 16px; }
#apiKeyCreateForm label { display: grid; gap: 8px; flex: 1 1 200px; }
#apiKeyCreateForm button { margin-top: 0; }
#subpane-api .glass-card { padding: 24px; }
#subpane-api p { margin: 12px 0; overflow-wrap: anywhere; }
#apiKeysBody [data-quota] { width: 130px; }
#apiKeyCreated { padding: 16px; border: 1px solid var(--border-color, #555); border-radius: 12px; }
#apiKeySecret { font-family: var(--font-mono, monospace); margin-bottom: 12px; }

/* Admin order audit dialog */
.order-audit-modal {
  max-width: 860px;
  max-height: min(900px, calc(100dvh - 40px));
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #121522;
  border-color: rgba(167, 139, 250, 0.22);
}

.order-audit-header {
  text-align: left;
  flex: 0 0 auto;
  margin: 0;
  padding: 26px 32px 20px;
  border-bottom: 1px solid var(--border-color);
  background: linear-gradient(120deg, rgba(121, 82, 245, 0.12), transparent 58%);
}

.order-audit-eyebrow {
  display: block;
  margin-bottom: 5px;
  color: #a78bfa;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.order-audit-header h3 {
  font-size: 1.35rem;
  line-height: 1.3;
  padding-right: 50px;
}

.order-audit-status { margin-top: 12px; }
.order-audit-browser-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 14px; }
.order-audit-browser-actions .text-muted { font-size: .78rem; }
.order-audit-modal .modal-close-btn { top: 22px; right: 24px; }

.order-audit-body {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 24px 32px 28px;
  scrollbar-color: rgba(167, 139, 250, 0.35) transparent;
}

.order-audit-summary {
  padding: 14px 17px;
  margin-bottom: 22px;
  border-radius: 12px;
  border: 1px solid rgba(167, 139, 250, 0.25);
  background: rgba(121, 82, 245, 0.09);
}

.order-audit-summary.is-failed {
  border-color: rgba(248, 113, 113, 0.28);
  background: rgba(239, 68, 68, 0.09);
}

.order-audit-summary.is-success {
  border-color: rgba(52, 211, 153, 0.27);
  background: rgba(16, 185, 129, 0.09);
}

.order-audit-summary-label {
  display: block;
  margin-bottom: 5px;
  color: #c4b5fd;
  font-size: 0.73rem;
  font-weight: 700;
}

.order-audit-summary.is-failed .order-audit-summary-label { color: #fca5a5; }
.order-audit-summary.is-success .order-audit-summary-label { color: #6ee7b7; }
.order-audit-summary p { color: #f3f4f6; font-size: 0.91rem; line-height: 1.55; overflow-wrap: anywhere; }

.order-audit-meta {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 24px;
}

.order-audit-meta .q-meta-item {
  min-width: 0;
  padding: 12px 14px;
  gap: 6px;
  background: rgba(255, 255, 255, 0.025);
  border-color: rgba(255, 255, 255, 0.08);
  border-radius: 11px;
}

.order-audit-meta .q-meta-label { font-size: 0.75rem; letter-spacing: 0; }
.order-audit-meta .q-meta-val { font-size: 0.84rem; line-height: 1.45; overflow-wrap: anywhere; }

.order-audit-section { margin-top: 22px; }
.order-audit-section h4 { font-size: 0.92rem; font-weight: 700; color: #e5e7eb; }

.order-audit-link-row {
  margin-top: 10px;
  padding: 12px 14px;
  background: rgba(5, 7, 14, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 11px;
}

.order-audit-link-label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
}

.order-audit-link-content { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.order-audit-link-value {
  flex: 1;
  min-width: 0;
  color: #c4b5fd;
  font-size: 0.79rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
  word-break: break-word;
  user-select: text;
}

.order-audit-copy { flex: 0 0 auto; padding: 6px 12px; }

.order-audit-section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.order-audit-section-heading > span { color: var(--text-dim); font-size: 0.76rem; }

.order-audit-timeline {
  position: relative;
  margin-top: 14px;
  padding: 4px 0 0 4px;
}

.order-audit-timeline::before {
  content: "";
  position: absolute;
  top: 13px;
  bottom: 14px;
  left: 11px;
  width: 1px;
  background: rgba(167, 139, 250, 0.24);
}

.order-audit-log-row { position: relative; display: flex; gap: 16px; padding-bottom: 18px; }
.order-audit-log-row:last-child { padding-bottom: 0; }
.order-audit-log-dot {
  position: relative;
  z-index: 1;
  flex: 0 0 15px;
  height: 15px;
  margin-top: 3px;
  border: 3px solid #251d3f;
  border-radius: 50%;
  background: #9b7af5;
}
.order-audit-log-row:last-child .order-audit-log-dot { background: #d7c8ff; }
.order-audit-log-content { min-width: 0; }
.order-audit-log-time { display: block; margin-bottom: 3px; color: #8d91aa; font: 0.72rem var(--font-mono); }
.order-audit-log-message { color: #dce0ef; font-size: 0.84rem; line-height: 1.55; overflow-wrap: anywhere; }
.order-audit-empty { color: var(--text-dim); text-align: center; padding: 24px 0; font-size: 0.84rem; }

.order-audit-footer {
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-end;
  padding: 14px 32px;
  border-top: 1px solid var(--border-color);
  background: #121522;
}
.order-audit-footer .btn { min-width: 112px; }

@media (max-width: 640px) {
  #adminOrderModal { padding: 10px; }
  .order-audit-modal { max-height: calc(100dvh - 20px); }
  .order-audit-header { padding: 21px 20px 17px; }
  .order-audit-header h3 { font-size: 1.15rem; }
  .order-audit-modal .modal-close-btn { top: 18px; right: 18px; }
  .order-audit-body { padding: 20px; }
  .order-audit-meta { grid-template-columns: 1fr; }
  .order-audit-footer { padding: 12px 20px; }
  .order-audit-footer .btn { width: 100%; }
}
/* Upstream verification maintenance */
.maintenance-banner {
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  align-items:center;
  gap:12px;
  text-align:center;
  padding: 16px 20px;
  margin-bottom: 20px;
  border: 1px solid rgba(245, 166, 35, .38);
  border-radius: 16px;
  background: rgba(245, 166, 35, .1);
  color: #f6d69a;
  font-weight: 600;
}
.maintenance-banner.hidden { display: none; }
.maintenance-probe-result { width:100%; font-size:12px; font-weight:400; }
.maintenance-banner .btn { flex-shrink:0; }
.maintenance-admin-card { margin-bottom: 20px; }
.maintenance-admin-status { margin: 14px 0 4px; color: #f6d69a; font-weight: 700; }
.maintenance-admin-detail { color: var(--text-dim); font-size: .85rem; line-height: 1.6; margin: 8px 0 0; }
.maintenance-admin-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.maintenance-admin-actions .btn:disabled { opacity: .5; cursor: not-allowed; }

.order-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.order-pagination-actions { display: flex; gap: 8px; }

/* Unified admin workspace. Public verification pages retain their own layout. */
body.admin-view .main-container { max-width: 1620px; margin-top: 24px; padding: 0 24px; }
.admin-dashboard { display: grid; grid-template-columns: 224px minmax(0, 1fr); align-items: start; gap: 28px; }
.admin-dashboard.hidden { display: none; }
.admin-dashboard .admin-subnav { grid-column: 1; grid-row: 1; position: sticky; top: 100px; display: flex; flex-direction: column; align-items: stretch; overflow: visible; gap: 5px; padding: 18px 12px; margin: 0; background: #111421; border: 1px solid #242a3d; border-radius: 18px; }
.admin-nav-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 20px; font-size: 14px; font-weight: 650; }
.admin-brand-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: #7952f5; font: 700 14px var(--font-mono); color: white; }
.admin-nav-brand small { display: block; margin-top: 3px; color: #858fa8; font-size: 11px; font-weight: 400; }
.admin-nav-label { padding: 0 12px 8px; font-size: 11px; color: #858fa8; letter-spacing: .08em; }
.admin-dashboard .subnav-btn { justify-content: flex-start; padding: 12px; border-radius: 10px; font-size: 13px; color: #a9b2c8; transition: background .15s, color .15s; }
.admin-dashboard .subnav-btn:hover { color: #f0edff; background: #1c2032; }
.admin-dashboard .subnav-btn.active { background: #29213f; color: #d7c9ff; box-shadow: inset 3px 0 #a78bfa; }
.admin-dashboard #btnAdminLogout { margin: 20px 0 0; padding: 11px; border-top: 1px solid #2a3042; }
.admin-dashboard .admin-subpane { grid-column: 2; grid-row: 1; min-width: 0; }
.admin-page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 3px 0 24px; }
.admin-page-eyebrow { display: block; color: #b5a0f5; font-size: 11px; font-weight: 600; letter-spacing: .06em; margin-bottom: 7px; }
.admin-page-heading h2 { font-size: 25px; font-weight: 650; letter-spacing: -.025em; line-height: 1.4; }
.admin-page-heading p { margin-top: 7px; font-size: 13px; color: #949fb7; line-height: 1.7; }
.admin-page-tag { flex-shrink: 0; border: 1px solid #2b3146; border-radius: 8px; padding: 7px 10px; color: #8d99b3; font: 11px var(--font-mono); }
.admin-dashboard .glass-card { padding: 24px; background: #121624; border: 1px solid #262c40; border-radius: 16px; box-shadow: 0 5px 20px #00000014; }
.admin-dashboard .glass-card + .glass-card { margin-top: 20px; }
.admin-dashboard h3 { font-size: 16px; font-weight: 650; line-height: 1.5; }
.admin-dashboard .glass-card > h3 + p { margin-top: 7px; font-size: 13px; color: #99a5bb; line-height: 1.8; }
.admin-dashboard .form-label, .admin-dashboard .form-sublabel { font-size: 13px; color: #d1d8e7; font-weight: 500; }
.admin-dashboard .form-input, .admin-dashboard .form-select { background: #0d1120; border-color: #30384e; border-radius: 9px; font-size: 13px; min-height: 43px; padding: 11px 13px; }
.admin-dashboard .form-input::placeholder { color: #748098; }
.admin-dashboard .form-input:focus, .admin-dashboard .form-select:focus { border-color: #a78bfa; box-shadow: 0 0 0 3px #7952f51c; }
.admin-dashboard textarea.form-input { line-height: 1.8; resize: vertical; }
.admin-dashboard .btn { border-radius: 9px; font-size: 13px; font-weight: 600; min-height: 38px; box-shadow: none; }
.admin-dashboard .btn-primary { background: #7952f5; }
.admin-dashboard .btn-secondary, .admin-dashboard .maintenance-admin-actions .btn:not(.btn-primary) { background: #202638; border: 1px solid #343d53; color: #d4dced; }
.admin-dashboard button:focus-visible { outline: 2px solid #c4b5fd; outline-offset: 3px; }
.admin-dashboard .text-muted { font-size: 12px; line-height: 1.8; color: #99a5bb; overflow-wrap: anywhere; }
.admin-dashboard .card-stats-grid { grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); gap: 12px; }
.admin-dashboard .stat-mini-card { padding: 18px 16px; gap: 12px; background: #121624; border-color: #262c40; border-radius: 12px; box-shadow: none; }
.admin-dashboard .stat-mini-card:hover { transform: none; background: #191d30; }
.admin-dashboard .stat-icon-pill { width: 36px; height: 36px; flex-shrink: 0; border-radius: 10px; font-size: 16px; }
.admin-dashboard .stat-val { font-size: 25px; }
.admin-dashboard .stat-name { font-size: 11px; line-height: 1.5; color: #99a5bb; }
.admin-dashboard .card-filter-tab.active { background: #201c34; border-color: #7961ba; }
.admin-dashboard .table-toolbar { gap: 16px; flex-wrap: wrap; }
.admin-dashboard .toolbar-actions { gap: 8px; flex-wrap: wrap; }
.admin-dashboard .table-responsive { background: #101421; border-color: #2a3044; border-radius: 10px; overscroll-behavior-x: contain; }
.admin-dashboard .data-table { font-size: 12px; }
.admin-dashboard .data-table th { color: #a9b4cb; font-size: 11px; letter-spacing: 0; background: #1b2030; padding: 13px 16px; }
.admin-dashboard .data-table td { padding: 15px 16px; border-color: #252c3d; }
.admin-dashboard .data-table tr:hover td { background: #ffffff03; }
.admin-dashboard .badge-total { font-size: 11px; padding: 5px 9px; }
.admin-dashboard .gen-studio-header { margin-bottom: 18px; }
.admin-dashboard .gen-studio-title h3 { font-size: 16px; }
.admin-dashboard .gen-studio-badge, .admin-dashboard .tg-badge-bot { font-size: 10px; background: #29213f; color: #c9b7ff; box-shadow: none; }
.admin-dashboard .tg-header-desc { font-size: 13px; line-height: 1.8; color: #99a5bb; }
.admin-dashboard .section-title-bar p { font-size: 12px; }
.admin-dashboard .maintenance-admin-actions { padding-top: 18px; border-top: 1px solid #262d40; margin-top: 20px; }
#mailboxImportSummary:not(:empty) { padding: 12px 14px; margin-top: 16px; background: #0d1120; border: 1px solid #30384e; border-radius: 9px; }
#mailboxImportText { font-family: var(--font-mono); min-height: 168px; }
#mailboxUpdateExisting { accent-color: #a78bfa; margin-right: 7px; }
#subpane-mailboxes .form-group > label:not(.form-label) { font-size: 12px; color: #b2bdd2; line-height: 1.7; }
#mailboxImportResults:empty { display: none; }
#mailboxImportResults { margin-top: 12px; border-radius: 10px; }
#subpane-api .data-table { min-width: 700px; }
.admin-api-guide { padding: 20px; margin-top: 24px; border: 1px solid #2a3044; background: #0d1120; border-radius: 12px; }
.admin-api-guide h4 { font-size: 13px; margin-bottom: 12px; }
.admin-api-guide p { font-size: 12px; color: #a9b4cb; line-height: 2; overflow-wrap: anywhere; }
.admin-api-guide code { color: #c4b5fd; font-size: 11px; }
#apiKeyCreated { padding: 16px; background: #211b35; border: 1px solid #63508e; border-radius: 10px; }
#apiKeyCreated p { font-size: 12px; margin-bottom: 10px; }
#apiKeyCreated .btn { margin-top: 10px; }
@media (max-width: 1200px) {
  .admin-dashboard { grid-template-columns: 195px minmax(0, 1fr); gap: 20px; }
  .admin-page-tag { display: none; }
  .admin-dashboard .card-stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .admin-dashboard { display: block; }
  .admin-dashboard .admin-subnav { position: static; flex-direction: row; align-items: center; flex-wrap: nowrap; overflow-x: auto; padding: 8px; margin-bottom: 24px; border-radius: 12px; }
  .admin-nav-brand, .admin-nav-label { display: none; }
  .admin-dashboard .subnav-btn { flex: 0 0 auto; padding: 10px 12px; }
  .admin-dashboard .subnav-btn.active { box-shadow: inset 0 -2px #a78bfa; }
  .admin-dashboard #btnAdminLogout { flex-shrink: 0; margin: 0 0 0 8px; border-top: 0; }
}
@media (max-width: 640px) {
  body.admin-view .main-container { padding: 0 16px; margin-top: 16px; }
  .admin-page-heading { padding-bottom: 18px; }
  .admin-page-heading h2 { font-size: 22px; }
  .admin-dashboard .glass-card { padding: 18px; border-radius: 12px; }
  .admin-dashboard .card-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .admin-dashboard .stat-mini-card { padding: 14px 12px; gap: 9px; }
  .admin-dashboard .stat-icon-pill { width: 30px; height: 30px; font-size: 14px; }
  .admin-dashboard .stat-val { font-size: 22px; }
  .admin-dashboard .toolbar-actions, .admin-dashboard .search-mini-wrap { width: 100%; }
  .admin-dashboard .toolbar-actions .form-input { width: 100%; }
  .admin-dashboard .maintenance-admin-actions .btn { flex: 1 1 145px; }
  .admin-dashboard .tg-header-card { flex-direction: column; align-items: stretch; }
  .admin-dashboard .tg-header-actions { flex-wrap: wrap; }
  .admin-dashboard .proxy-grid-inputs, .admin-dashboard .grid-2col { grid-template-columns: 1fr; }
  #apiKeyCreateForm { flex-direction: column; align-items: stretch; }
  #apiKeyCreateForm label { flex: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .admin-dashboard *, .admin-dashboard *::before, .admin-dashboard *::after { animation: none !important; transition: none !important; }
}
@media (max-width: 640px) {
  body.admin-view .nav-container { padding: 14px 16px; gap: 12px; }
  body.admin-view .nav-tabs { max-width: 100%; overflow-x: auto; }
  body.admin-view .nav-tab { flex-shrink: 0; padding: 8px 12px; font-size: 12px; }
}

/* Hide scrollbar chrome while retaining wheel, touch and keyboard scrolling. */
html, body, body * {
  scrollbar-width: none;
}
html::-webkit-scrollbar,
body::-webkit-scrollbar,
body *::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.session-account-preview { display: flex; align-items: center; gap: 14px; padding: 20px; border: 1px solid #34d39940; border-radius: 14px; background: #10b9810d; }
.session-account-preview.hidden { display: none; }
.session-account-icon { display: grid; place-items: center; flex: 0 0 36px; height: 36px; border-radius: 50%; background: #10b98126; color: #6ee7b7; font-size: 20px; }
.session-account-details { flex: 1; min-width: 0; }
.session-account-heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; font-size: 12px; color: #96bbaa; }
.session-account-details strong { display: block; color: #d1fae5; font-size: 16px; margin-top: 4px; overflow-wrap: anywhere; }
.session-account-details small { color: #a6b6b0; font-size: inherit; overflow-wrap: anywhere; }
.session-account-details small:empty { display: none; }
.session-account-preview .btn { flex-shrink: 0; }
.session-input-status { font-size: 12px; color: var(--text-muted); line-height: 1.7; margin-top: 10px; }
.session-input-status:empty { display: none; }
@media (max-width: 640px) {
  .session-account-preview { padding: 14px; gap: 10px; flex-wrap: wrap; }
  .session-account-details strong { font-size: 14px; }
}

/* Session instructions and submission layout */
#stage-submit .stage-header { margin-bottom: 24px; }
#sessionInputGroup { margin-bottom: 0; }
#sessionInputGroup > .text-muted { margin-top: 10px; color: #929bb0; font-size: 12px; line-height: 1.8; font-weight: 400; }
#inputSession { background: #0c0f19; border-color: #2b3041; border-radius: 12px; min-height: 120px; padding: 16px 18px; line-height: 1.8; font-size: 14px; resize: vertical; }
#inputSession::placeholder { color: #737d93; }
#stage-submit .action-footer-row { padding-top: 22px; border-top: 1px solid #ffffff0b; margin-top: 26px; }
.session-guide { margin: 24px 0 0; border: 1px solid #2b3040; border-radius: 14px; background: #171b26; overflow: hidden; }
.session-guide summary { display: flex; align-items: center; gap: 12px; list-style: none; padding: 18px 20px; color: #d5daea; font-size: 14px; font-weight: 600; cursor: pointer; }
.session-guide summary:hover { background: #ffffff02; }
.session-guide summary::-webkit-details-marker { display: none; }
.session-guide summary::marker { content: ''; }
.session-guide summary:focus-visible { outline: 2px solid #a78bfa; outline-offset: -3px; border-radius: 14px; }
.session-guide-question { display: grid; place-items: center; flex: 0 0 30px; height: 30px; background: #7952f51c; color: #b9a4fa; border: 1px solid #7952f52a; border-radius: 9px; font-size: 16px; font-weight: 700; }
.session-guide-title { flex: 1; }
.session-guide-title small { display: block; margin-top: 3px; font-size: 11px; color: #8590a6; font-weight: 400; }
.session-guide-chevron { margin-left: auto; margin-right: 3px; width: 8px; height: 8px; border-right: 2px solid #9ca3af; border-bottom: 2px solid #9ca3af; transform: rotate(45deg); flex-shrink: 0; }
.session-guide[open] .session-guide-chevron { transform: rotate(225deg); }
.session-guide[open] summary { border-bottom: 1px solid #ffffff0a; }
.session-guide-body { padding: 20px; }
.session-guide-steps { list-style: none; counter-reset: session-step; display: grid; gap: 18px; margin: 0; padding: 0; }
.session-guide-steps li { counter-increment: session-step; display: flex; gap: 12px; align-items: flex-start; color: #aeb7cb; font-size: 13px; line-height: 1.85; }
.session-guide-steps li::before { content: counter(session-step); display: grid; place-items: center; flex: 0 0 24px; height: 24px; border-radius: 50%; background: #7952f51f; color: #b49bff; font-weight: 650; font-size: 12px; }
.session-guide-steps li > span { min-width: 0; }
.session-guide a { color: #b6a1ff; text-decoration: none; border-bottom: 1px dashed #b6a1ff70; overflow-wrap: anywhere; }
.session-guide a:hover { color: #d3c4ff; border-bottom-style: solid; }
.session-guide-notice { display: flex; gap: 10px; margin-top: 20px; padding: 13px 14px; border: 1px solid #f59e0b1c; border-left: 3px solid #d99b38; border-radius: 8px; background: #f59e0b08; }
.session-guide-notice > span { color: #e6b361; font-size: 19px; line-height: 1.5; flex-shrink: 0; }
.session-guide-notice p { color: #bfc0c8; font-size: 12px; font-weight: 400; line-height: 1.85; }
.session-guide-notice strong { color: #ead2ae; font-weight: 600; }
@media (max-width: 640px) {
  .session-guide summary { padding: 16px; gap: 10px; }
  .session-guide-body { padding: 16px; }
  .session-guide-steps li { gap: 10px; font-size: 12px; }
  .session-guide-notice { padding: 11px 12px; gap: 8px; }
  #inputSession { padding: 14px; font-size: 13px; }
}

.order-browser-label { display: inline-block; padding: 2px 7px; margin: 0 0 6px; border: 1px solid #a78bfa30; border-radius: 5px; font: 10px var(--font-mono); color: #bca5fa; background: #7952f50d; }
.is-browser-log .order-audit-log-dot { background: #60a5fa; border-color: #162842; }
.is-browser-failure .order-audit-log-dot { background: #f59e0b; border-color: #3b2a19; }
.is-browser-failure .order-audit-log-message { color: #e5c79b; }
.order-browser-artifact { margin-top: 10px; }
.order-browser-artifact .btn { padding: 7px 12px; min-height: 32px; font-size: 12px; }
.order-browser-image { margin-top: 10px; }
.order-browser-image:empty { display: none; }
.order-browser-image a { display: block; }
.order-browser-image img { display: block; max-width: 100%; width: 520px; max-height: 360px; object-fit: contain; object-position: top left; border: 1px solid #333b50; border-radius: 9px; background: #0c101b; }

.proxy-pool-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap; margin-bottom:16px; }
.proxy-pool-toggle { display:flex; align-items:center; gap:8px; white-space:nowrap; }
.proxy-pool-add { display:grid; grid-template-columns:160px minmax(0,1fr) auto; gap:10px; margin:18px 0; }
.proxy-pool-import { margin-bottom:22px; }
.proxy-pool-import summary { cursor:pointer; margin-bottom:12px; color:#c4b5fd; }
.proxy-pool-import textarea { margin-bottom:10px; }
.proxy-pool-node { display:grid; grid-template-columns:110px minmax(0,1fr) 140px auto; gap:14px; align-items:center; padding:16px 0; border-top:1px solid #ffffff12; }
.proxy-pool-node code { overflow-wrap:anywhere; color:#bcc5d6; }
.proxy-pool-node-actions { display:flex; flex-wrap:wrap; gap:6px; }
@media(max-width:900px) { .proxy-pool-node { grid-template-columns:110px minmax(0,1fr); } .proxy-pool-add { grid-template-columns:1fr; } }

.chromium-proxy-card { padding:26px; }
.proxy-section-kicker { color:#a78bfa; font:10px var(--font-mono); letter-spacing:1.8px; }
.chromium-proxy-card h3 { margin:6px 0 8px; }
.chromium-proxy-card h4 { margin:0 0 6px; font-size:16px; }
.chromium-proxy-card .text-muted { font-size:12px; line-height:1.7; }
.proxy-enable-switch { display:flex; align-items:center; gap:10px; font-size:12px; cursor:pointer; }
.proxy-enable-switch input { position:absolute; opacity:0; width:1px; height:1px; }
.proxy-switch-track { width:36px; height:21px; border-radius:20px; background:#34384a; position:relative; transition:background .2s; }
.proxy-switch-track::after { content:''; width:15px; height:15px; position:absolute; left:3px; top:3px; background:#d9dce6; border-radius:50%; transition:transform .2s; }
.proxy-enable-switch input:checked + .proxy-switch-track { background:#7858ee; }
.proxy-enable-switch input:checked + .proxy-switch-track::after { transform:translateX(15px); background:white; }
.proxy-enable-switch input:focus-visible + .proxy-switch-track { outline:2px solid #c4b5fd; outline-offset:3px; }
.proxy-policy-panel { padding:20px; border:1px solid #8b5cf630; border-radius:14px; background:linear-gradient(110deg,#7c3aed0c,#111522); margin:22px 0 26px; }
.proxy-policy-fields { display:grid; grid-template-columns:220px minmax(0,1fr); gap:16px; }
.proxy-field-label { display:flex; flex-direction:column; gap:8px; font-size:12px; font-weight:600; color:#bfc4d2; min-width:0; }
.proxy-field-label.hidden { display:none; }
.proxy-policy-note { display:flex; align-items:flex-start; gap:9px; margin:14px 0 10px; color:#c4b5fd; font-size:12px; }
.proxy-policy-note p { margin:0; line-height:1.7; }
.proxy-policy-icon { font-size:17px; }
.proxy-policy-footnote { color:#818a9d; font-size:11px; line-height:1.7; margin:10px 0 0; }
.proxy-node-heading { margin-bottom:16px; }
.proxy-node-columns,.chromium-proxy-card .proxy-pool-node { display:grid; grid-template-columns:minmax(0,1fr) 130px 155px 175px; gap:16px; align-items:center; }
.proxy-node-columns { padding:12px 14px; font-size:11px; color:#929bb0; background:#ffffff04; border:1px solid #ffffff09; border-radius:10px 10px 0 0; }
.chromium-proxy-card .proxy-pool-node { padding:17px 14px; border:1px solid #ffffff09; border-top:0; }
.chromium-proxy-card .proxy-pool-node:last-child { border-radius:0 0 10px 10px; }
.proxy-node-identity { min-width:0; }
.proxy-node-identity > div { display:flex; align-items:center; gap:9px; margin-bottom:7px; }
.proxy-node-identity strong { font-size:13px; overflow-wrap:anywhere; }
.proxy-node-identity code { display:block; font-size:11px; line-height:1.6; }
.proxy-protocol-tag { border:1px solid #ffffff16; border-radius:4px; padding:2px 5px; color:#8894ac; font-size:9px; }
.proxy-connection-badge { display:inline-flex; align-items:center; gap:7px; justify-self:start; padding:5px 10px; border-radius:20px; font-size:11px; color:#8d97ad; background:#ffffff05; border:1px solid #ffffff0d; }
.proxy-connection-badge i { width:6px; height:6px; border-radius:50%; background:currentColor; }
.proxy-connection-badge.is-connected { color:#63d3a2; background:#10b9810c; border-color:#10b98130; }
.proxy-connection-badge.is-failed { color:#f38a90; background:#ef44440c; border-color:#ef444430; }
.proxy-node-eligibility { color:#b9c3d6; font-size:11px; }
.chromium-proxy-card input[type=checkbox] { accent-color:#8b5cf6; }
.proxy-pool-node-actions .btn { padding:6px 9px; font-size:11px; min-height:30px; }
.proxy-pool-node-actions .proxy-delete-btn { color:#d98b96; }
.proxy-node-editor { margin-top:20px; border:1px dashed #ffffff1c; border-radius:12px; padding:14px 16px; }
.proxy-node-editor > summary { display:flex; align-items:center; justify-content:space-between; gap:10px; cursor:pointer; font-size:12px; color:#c4b5fd; list-style:none; }
.proxy-node-editor > summary::-webkit-details-marker { display:none; }
.proxy-pool-add { align-items:end; }
.proxy-pool-status { font-size:12px; color:#a9b6d2; line-height:1.7; margin:12px 0 0; }
.proxy-pool-status:empty { display:none; }
.proxy-pool-empty { display:flex; flex-direction:column; align-items:center; padding:30px 16px; gap:8px; background:#ffffff02; border:1px solid #ffffff09; border-top:0; border-radius:0 0 10px 10px; }
.proxy-pool-empty > span { font-size:30px; color:#8173b1; }
.proxy-pool-empty strong { font-size:13px; color:#b9bfd0; }
.proxy-pool-empty p { margin:0; font-size:12px; color:#828da3; }
@media(max-width:1150px) { .proxy-node-columns { display:none; } .chromium-proxy-card .proxy-pool-node { grid-template-columns:minmax(0,1fr) 130px; border-top:1px solid #ffffff09; margin-top:10px; border-radius:10px; } .proxy-pool-node-actions { justify-content:flex-end; } }
@media(max-width:600px) { .chromium-proxy-card { padding:18px; } .proxy-policy-fields { grid-template-columns:1fr; } .proxy-policy-panel { padding:15px; } .chromium-proxy-card .proxy-pool-node { gap:14px 8px; grid-template-columns:minmax(0,1fr) auto; padding:14px 12px; } .proxy-node-editor > summary { flex-wrap:wrap; } }

.chromium-proxy-card .btn:not(.btn-primary) { background:#222637; border:1px solid #ffffff12; color:#c9d0e0; border-radius:8px; }
.chromium-proxy-card .btn:not(.btn-primary):hover { background:#30344a; border-color:#a78bfa40; }
.chromium-proxy-card .btn.proxy-delete-btn { color:#d98e9a; }

.order-audit-browser-actions { justify-content:space-between; gap:16px 24px; }
.order-audit-browser-controls { display:flex; align-items:center; flex-wrap:wrap; gap:10px 16px; flex:1; min-width:0; }
.order-audit-browser-controls .text-muted { flex-basis:100%; }
.order-audit-runtime-summary { display:flex; align-items:flex-end; flex-direction:column; gap:8px; max-width:45%; min-width:0; }
.order-audit-runtime-summary .order-audit-status { margin-top:0; }
.order-audit-proxy { color:#a7b4cd; font:11px var(--font-mono); line-height:1.6; overflow-wrap:anywhere; }
@media(max-width:600px) { .order-audit-runtime-summary { max-width:100%; width:100%; align-items:flex-start; flex-direction:row; flex-wrap:wrap; align-items:center; gap:10px; } }
.order-monitor-stats { grid-template-columns:repeat(5,minmax(0,1fr)); }
.order-attention-stat { text-align:left; cursor:pointer; color:inherit; font:inherit; border:1px solid #f59e0b30; background:#f59e0b08; }
.order-attention-stat:hover { border-color:#f59e0b70; }
.order-needs-attention { background:#f59e0b05; }
.order-needs-attention .order-info-column { box-shadow:inset 3px 0 #e9a844; }
.order-attention-reason { margin-top:6px; color:#d7b787; font-size:11px; line-height:1.6; overflow-wrap:anywhere; }
.order-next-action { margin-top:5px; font-size:11px; color:#bca9ef; line-height:1.6; }
.order-task-controls { display:inline-flex; display:contents; gap:6px; justify-content:flex-end; align-items:center; width:auto; flex-shrink:0; }
.order-live-step { margin-top:5px; color:#8fa0b9; font-size:11px; line-height:1.6; overflow-wrap:anywhere; }
@media(max-width:1150px) { .order-monitor-stats { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media(max-width:600px) { .order-monitor-stats { grid-template-columns:repeat(2,minmax(0,1fr)); } }

/* Mailbox administration */
.mailbox-list-heading,.mailbox-batch-toolbar,.mailbox-pagination,.mailbox-row-actions { display:flex;align-items:center;gap:10px;flex-wrap:wrap; }
.mailbox-list-heading { justify-content:space-between; }
.mailbox-list-toolbar { display:grid;grid-template-columns:minmax(220px,1fr) repeat(2,minmax(140px,190px));gap:12px;margin:20px 0 14px; }
.mailbox-batch-toolbar { margin-bottom:12px; }
.mailbox-batch-toolbar .text-muted:last-child { margin-left:auto; font-size:12px; }
.mailbox-table { table-layout:fixed;width:100%;min-width:0; }
.mailbox-table th:first-child { width:40px; }
.mailbox-table th:nth-child(2) { width:25%; }
.mailbox-table th:nth-child(3) { width:12%; }
.mailbox-table th:last-child { width:155px; }
.mailbox-table td { overflow-wrap:anywhere; }
.mailbox-table .text-muted { font-size:12px;line-height:1.5;margin-top:5px; }
.mailbox-row-actions { justify-content:flex-end;flex-wrap:nowrap; }
.mailbox-row-actions .btn { white-space:nowrap; }
.mailbox-state { display:inline-block;border-radius:20px;padding:5px 9px;background:#22263a;font-size:12px;white-space:nowrap; }
.mailbox-state.is-toClaim { color:#71d5a7;background:#17352c; }
.mailbox-state.is-failed { color:#f0bb71;background:#382c20; }
.mailbox-pagination { margin-top:18px;justify-content:flex-end; }
.mailbox-pagination > span { margin-right:auto; }
.mailbox-pagination label { display:flex;align-items:center;gap:8px; }
.mailbox-pagination select { width:78px;padding:8px; }
.mailbox-empty { text-align:center;padding:30px!important; }
@media(max-width:800px) { .mailbox-list-toolbar { grid-template-columns:1fr 1fr; } .mailbox-list-toolbar input { grid-column:1/-1; } .mailbox-table thead { display:none; } .mailbox-table tbody,.mailbox-table tr,.mailbox-table td { display:block;width:auto; } .mailbox-table tr { display:grid;grid-template-columns:30px 1fr;border-bottom:1px solid var(--border-color);padding:12px; } .mailbox-table td { border:0;padding:6px;grid-column:2; } .mailbox-table td:first-child { grid-column:1;grid-row:1; } .mailbox-row-actions { justify-content:flex-start; } .mailbox-batch-toolbar .text-muted:last-child { width:100%;margin-left:0; } }

/* =====================================================================
   BROWSER AUTOMATION & ANTI-DETECTION DASHBOARD (SUBPANE-BROWSER)
   ===================================================================== */

/* Shield Banner */
.browser-shield-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}
.shield-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(30, 27, 58, 0.7), rgba(17, 24, 39, 0.75));
  border: 1px solid rgba(139, 92, 246, 0.22);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.shield-badge:hover {
  transform: translateY(-2px);
  border-color: rgba(167, 139, 250, 0.45);
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.shield-icon {
  font-size: 20px;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(139, 92, 246, 0.14);
  border: 1px solid rgba(139, 92, 246, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.shield-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.shield-text strong {
  font-size: 13px;
  font-weight: 600;
  color: #f1f5f9;
  letter-spacing: 0.2px;
}
.shield-text span {
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.4;
  white-space: normal;
}

/* Section Cards */
.browser-section-card {
  padding: 24px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(23, 27, 44, 0.7), rgba(15, 18, 30, 0.85));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(16px);
  position: relative;
  overflow: hidden;
}
.browser-section-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.4), transparent);
}
.section-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.section-card-title {
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-icon {
  font-size: 20px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(124, 58, 237, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.section-card-title h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #f8fafc;
}
.section-card-title p {
  margin: 2px 0 0;
  font-size: 12px;
  color: #94a3b8;
}

/* Badge Tags & Actions */
.badge-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  font-size: 10px;
  font-weight: 600;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.badge-tag-req {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.25);
}
.badge-tag-info {
  background: rgba(124, 58, 237, 0.15);
  color: #c4b5fd;
  border-color: rgba(139, 92, 246, 0.3);
}
.label-with-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
}
.label-with-actions .form-label {
  margin-bottom: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.btn-text-action {
  background: none;
  border: none;
  padding: 0;
  font-size: 12px;
  color: #a78bfa;
  cursor: pointer;
  transition: color 0.15s ease;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.btn-text-action:hover {
  color: #c4b5fd;
}
.btn-text-action.text-danger {
  color: #f87171;
}
.btn-text-action.text-danger:hover {
  color: #fca5a5;
}

/* Inputs with inner icons */
.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}
.input-inner-icon {
  position: absolute;
  left: 12px;
  font-size: 14px;
  color: #64748b;
  pointer-events: none;
  z-index: 2;
}
.input-with-icon .form-input {
  padding-left: 36px;
  width: 100%;
}
.form-hint-text {
  font-size: 11px;
  color: #64748b;
  margin: 6px 0 0;
  line-height: 1.5;
}

/* Core Grid */
.browser-core-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* Concurrency Row */
.concurrency-config-row {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 24px;
  align-items: center;
  padding: 18px 20px;
  background: rgba(13, 17, 32, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
}
.concurrency-input-group {
  display: flex;
  align-items: center;
  gap: 10px;
}
.concurrency-input {
  width: 74px !important;
  text-align: center;
  font-weight: 700;
  font-size: 16px;
  padding: 9px 8px;
}
.concurrency-quick-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.concurrency-quick-pills .preset-pill {
  padding: 6px 11px;
  font-size: 12px;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.15s ease;
}
.concurrency-quick-pills .preset-pill:hover {
  background: rgba(139, 92, 246, 0.18);
  border-color: rgba(139, 92, 246, 0.4);
  color: #f1f5f9;
}
.concurrency-quick-pills .preset-pill.active {
  background: linear-gradient(135deg, #7c3aed, #6366f1);
  border-color: #a78bfa;
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 2px 10px rgba(124, 58, 237, 0.35);
}
.concurrency-meta-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-left: 20px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}
.meta-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
}
.meta-label {
  color: #94a3b8;
  font-weight: 500;
  min-width: 80px;
}
.meta-val {
  color: #e2e8f0;
  font-weight: 600;
}

/* Proxy Status Indicator in Header */
.proxy-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  transition: all 0.25s ease;
}
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #64748b;
  transition: background 0.25s ease, box-shadow 0.25s ease;
}
.proxy-status-pill.is-active {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
}
.proxy-status-pill.is-active .status-dot {
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}
.proxy-status-pill.is-pool {
  background: rgba(139, 92, 246, 0.12);
  border-color: rgba(139, 92, 246, 0.35);
  color: #c4b5fd;
}
.proxy-status-pill.is-pool .status-dot {
  background: #8b5cf6;
  box-shadow: 0 0 8px #8b5cf6;
}
.proxy-status-pill.is-direct {
  background: rgba(100, 116, 139, 0.1);
  border-color: rgba(100, 116, 139, 0.25);
  color: #94a3b8;
}

/* Smart Paste Box */
.proxy-smart-paste-box {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.06), rgba(30, 27, 75, 0.25));
  border: 1px dashed rgba(167, 139, 250, 0.35);
  border-radius: 12px;
  padding: 16px;
}
.smart-paste-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.smart-paste-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #e2e8f0;
}
.sparkle-icon {
  font-size: 14px;
}
.smart-paste-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
.proxy-url-input {
  font-family: var(--font-mono, monospace);
  font-size: 12px !important;
  color: #c4b5fd !important;
  background: rgba(13, 17, 32, 0.75) !important;
  border-color: rgba(139, 92, 246, 0.3) !important;
}
.proxy-url-input:focus {
  border-color: #a78bfa !important;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2) !important;
}
.proxy-format-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.format-tag {
  font-size: 10px;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.04);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.format-tag code {
  color: #c4b5fd;
  font-family: var(--font-mono, monospace);
}

/* Structured Proxy Grid */
.proxy-structured-grid {
  display: grid;
  grid-template-columns: 140px minmax(0, 1.4fr) 160px minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  align-items: flex-end;
}
.password-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
.password-input-wrapper .form-input {
  padding-right: 36px;
  width: 100%;
}
.btn-eye-toggle {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: color 0.15s ease;
}
.btn-eye-toggle:hover {
  color: #a78bfa;
}

/* Proxy Tip Box */
.browser-proxy-tip-box {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(59, 130, 246, 0.06);
  border: 1px solid rgba(59, 130, 246, 0.18);
  border-radius: 10px;
  font-size: 11px;
  color: #93c5fd;
  line-height: 1.6;
}
.tip-icon {
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}
.tip-content strong {
  color: #bfdbfe;
  font-weight: 600;
  display: block;
  margin-bottom: 2px;
}
.tip-content code {
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.15);
  padding: 1px 5px;
  border-radius: 4px;
  font-family: var(--font-mono, monospace);
}

/* Actions Bar & Status */
.browser-action-card {
  padding: 20px 24px;
  background: linear-gradient(180deg, rgba(23, 27, 44, 0.8), rgba(15, 18, 30, 0.9));
  border: 1px solid rgba(139, 92, 246, 0.25);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}
.browser-actions-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.action-btn-group {
  display: flex;
  align-items: center;
  gap: 12px;
}
.btn-action-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  font-size: 14px;
  font-weight: 600;
  background: linear-gradient(135deg, #7c3aed, #6366f1);
  border: 1px solid #a78bfa;
  border-radius: 10px;
  color: #ffffff;
  box-shadow: 0 4px 18px rgba(124, 58, 237, 0.35);
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-action-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(124, 58, 237, 0.5);
  background: linear-gradient(135deg, #8b5cf6, #4f46e5);
}
.btn-action-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  font-size: 13px;
  font-weight: 500;
  background: rgba(30, 35, 55, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-action-secondary:hover {
  background: rgba(45, 52, 80, 0.9);
  border-color: rgba(167, 139, 250, 0.4);
  color: #f8fafc;
}
.action-note-text {
  font-size: 12px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Status Box */
.browser-settings-status-box {
  display: none;
}
.browser-settings-status-box:not(:empty) {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.5;
  background: rgba(13, 17, 32, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  animation: slideInStatus 0.25s ease;
}
.browser-settings-status-box.is-success {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.35);
  color: #6ee7b7;
}
.browser-settings-status-box.is-error {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}
.browser-settings-status-box.is-info {
  background: rgba(124, 58, 237, 0.1);
  border-color: rgba(139, 92, 246, 0.35);
  color: #c4b5fd;
}
@keyframes slideInStatus {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive Overrides for Subpane Browser */
@media (max-width: 1100px) {
  .browser-shield-bar {
    grid-template-columns: repeat(2, 1fr);
  }
  .proxy-structured-grid {
    grid-template-columns: 130px 1fr 140px;
  }
  .proxy-structured-grid .field-user,
  .proxy-structured-grid .field-pass {
    grid-column: span 1;
  }
  .concurrency-config-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .concurrency-meta-box {
    padding-left: 0;
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 14px;
  }
}

@media (max-width: 768px) {
  .browser-shield-bar {
    grid-template-columns: 1fr;
  }
  .browser-core-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .proxy-structured-grid {
    grid-template-columns: 1fr;
  }
  .browser-actions-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .action-btn-group {
    flex-direction: column;
  }
  .btn-action-primary,
  .btn-action-secondary {
    width: 100%;
    justify-content: center;
  }
}

.order-stream-table .order-gpt-account { max-width: 100%; cursor: default; }

/* =====================================================================
   TELEGRAM REALTIME NOTIFICATIONS (SETTINGS SUBPANE)
   ===================================================================== */
.tg-notify-card {
  padding: 24px;
  background: linear-gradient(180deg, rgba(23, 27, 44, 0.75), rgba(15, 18, 30, 0.88));
  border: 1px solid rgba(139, 92, 246, 0.22);
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}
.tg-notify-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.4), rgba(139, 92, 246, 0.4), transparent);
}
.tg-notify-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 18px;
}
.tg-notify-proxy-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: flex-end;
}
.tg-notify-events-panel {
  padding: 16px;
  background: rgba(13, 17, 32, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
}
.notify-event-chips {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
}
.notify-event-chip {
  cursor: pointer;
  position: relative;
  display: block;
}
.notify-event-chip input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.event-chip-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  transition: all 0.2s ease;
}
.notify-event-chip:hover .event-chip-box {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.16);
}
.notify-event-chip input:checked + .event-chip-box {
  background: rgba(124, 58, 237, 0.12);
  border-color: rgba(167, 139, 250, 0.45);
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.15);
}
.notify-event-chip input:checked + .event-chip-box.highlight-warn {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(251, 191, 36, 0.5);
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.15);
}
.event-chip-icon {
  font-size: 16px;
  margin-bottom: 2px;
}
.event-chip-name {
  font-size: 13px;
  font-weight: 600;
  color: #f1f5f9;
}
.event-chip-desc {
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.4;
}
.tg-notify-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 10px;
}
.tg-notify-status-text {
  font-size: 12px;
  color: #94a3b8;
  transition: color 0.2s ease;
}
.tg-notify-status-text.is-success {
  color: #6ee7b7;
  font-weight: 500;
}
.tg-notify-status-text.is-error {
  color: #fca5a5;
  font-weight: 500;
}
@media (max-width: 860px) {
  .tg-notify-grid,
  .tg-notify-proxy-row {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .notify-event-chips {
    grid-template-columns: 1fr;
  }
}

