@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400;1,600&family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  color: #2c1806;
  background: #fdf8eb;
  color-scheme: light;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #2c1806;
  background:
    radial-gradient(ellipse at 15% 10%, rgba(251, 191, 36, 0.28) 0, transparent 48%),
    radial-gradient(ellipse at 85% 14%, rgba(245, 158, 11, 0.22) 0, transparent 48%),
    radial-gradient(ellipse at 50% 92%, rgba(217, 119, 6, 0.18) 0, transparent 54%),
    linear-gradient(180deg, #fffdf8 0%, #fbf2d8 52%, #f5e3b8 100%);
}
input, button, select, textarea, optgroup {
  font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: inherit;
  color: inherit;
}
.shell {
  max-width: 920px;
  margin: 0 auto;
  padding: 28px 20px 64px;
}
.lookup-only-shell {
  max-width: 780px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 32px 18px 40px;
}
.glass {
  background: linear-gradient(145deg, rgba(255, 254, 249, 0.96), rgba(253, 244, 218, 0.92));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1.5px solid rgba(217, 119, 6, 0.38);
  box-shadow:
    0 20px 55px rgba(146, 64, 14, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  border-radius: 20px;
}
.brand-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand-logo {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  object-fit: cover;
  border: 1.5px solid rgba(217, 119, 6, 0.55);
  box-shadow: 0 4px 12px rgba(180, 83, 9, 0.18);
}
.brand {
  font-weight: 900;
  letter-spacing: 0.1em;
  font-size: 15px;
  background: linear-gradient(90deg, #92400e, #d97706, #b45309);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.brand-sub {
  font-size: 12px;
  color: #78350f;
  margin-top: 3px;
}
.inline-link {
  color: #b45309;
  background: transparent;
  padding: 0;
  border-radius: 0;
  font-weight: 800;
  font-size: inherit;
  text-decoration: underline;
}
.avatar-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 6px;
  border-radius: 999px;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border: 1px solid rgba(217, 119, 6, 0.45);
  font-size: 13px;
  font-weight: 800;
  color: #78350f;
}
.avatar-img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #d97706;
}
a {
  color: #fffbeb;
  text-decoration: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #d97706, #b45309);
  padding: 11px 18px;
  font-weight: 800;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 6px 18px rgba(180, 83, 9, 0.24);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
a:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(180, 83, 9, 0.32);
}
.secondary {
  background: #fffbeb;
  color: #78350f;
  border: 1.5px solid rgba(217, 119, 6, 0.45);
  box-shadow: 0 4px 10px rgba(180, 83, 9, 0.08);
}
.panel {
  border-radius: 24px;
  padding: 28px;
  margin-bottom: 24px;
}
.panel-head {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
}
.panel-head h2 {
  margin: 0;
  font-size: 21px;
  color: #3b1d06;
}
.panel-head p {
  margin: 5px 0 0;
  color: #78350f;
  font-size: 14px;
}
.step {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  color: #fffbeb;
  font-weight: 900;
  box-shadow: 0 6px 16px rgba(180, 83, 9, 0.25);
}
.select-input {
  width: 100%;
  border-radius: 12px;
  border: 1.5px solid rgba(217, 119, 6, 0.42);
  background: #fffdf9;
  color: #2c1806;
  padding: 12px 14px;
  font: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.select-input:focus {
  border-color: #d97706;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.22);
}
.text-label {
  display: block;
  margin: 10px 0 6px;
  color: #5c2d0c;
  font-size: 13px;
  font-weight: 800;
}
.consent {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 16px 0;
  color: #5c2d0c;
  line-height: 1.55;
  font-size: 13px;
}
.consent input {
  margin-top: 4px;
  accent-color: #d97706;
  transform: scale(1.2);
}
button {
  width: 100%;
  border: 0;
  border-radius: 13px;
  background: linear-gradient(135deg, #f59e0b, #d97706, #b45309);
  color: #fffbeb;
  font-weight: 800;
  padding: 14px 16px;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(180, 83, 9, 0.24);
  transition: transform 0.15s ease, opacity 0.15s ease;
}
button:hover:not(:disabled) {
  transform: translateY(-1px);
}
button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}
footer, .lookup-minimal-footer {
  color: #78350f;
  font-size: 13px;
  text-align: center;
  padding-top: 20px;
  line-height: 1.6;
}
@media (max-width: 720px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }
  .admin-form-grid {
    grid-template-columns: 1fr;
  }
  .lookup-search-row {
    flex-direction: column;
  }
}

/* ====== Web Admin Styles (Luxury Gold) ====== */
.admin-top-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}
.admin-auth-panel {
  max-width: 520px;
  margin: 40px auto;
}
.admin-status {
  margin: 10px 0 0;
  font-size: 13px;
  font-weight: 700;
  color: #b45309;
  min-height: 18px;
  text-align: center;
}
.admin-muted {
  color: #78350f;
  font-size: 12px;
  margin-top: 4px;
}
.admin-flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.ai-nodes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.node-card {
  padding: 12px;
  border-radius: 14px;
  background: #fffdf7;
  border: 1.5px solid rgba(217, 119, 6, 0.32);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.node-card.busy {
  border-color: #d97706;
  background: #fef3c7;
}
.node-title {
  font-weight: 800;
  font-size: 13px;
  color: #3b1d06;
}
.node-meta {
  font-size: 11px;
  color: #78350f;
}
.admin-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 18px 0;
}
.tab-btn {
  width: auto;
  flex: 1;
  min-width: 140px;
  background: #fffbeb;
  color: #78350f;
  border: 1.5px solid rgba(217, 119, 6, 0.38);
  padding: 11px 14px;
  font-size: 13px;
  box-shadow: none;
}
.tab-btn.active {
  background: linear-gradient(135deg, #f59e0b, #b45309);
  color: #fffbeb;
  border-color: transparent;
  box-shadow: 0 6px 16px rgba(180, 83, 9, 0.25);
}
.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.admin-subhead {
  margin: 24px 0 12px;
  font-size: 15px;
  color: #451a03;
}
.frames-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
}
.frame-card {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 14px;
  background: #fffdf7;
  border: 1.5px solid rgba(217, 119, 6, 0.32);
}
.frame-thumb {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  object-fit: cover;
  background: #fef3c7;
  border: 1px solid rgba(217, 119, 6, 0.35);
  flex-shrink: 0;
}
.frame-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}
.frame-info strong {
  font-size: 13px;
  color: #3b1d06;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.frame-info code {
  font-size: 11px;
  color: #b45309;
  word-break: break-all;
}
.admin-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.list-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 14px;
  border-radius: 14px;
  background: #fffdf7;
  border: 1.5px solid rgba(217, 119, 6, 0.28);
}
.row-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.btn-mini {
  width: auto;
  padding: 7px 12px;
  font-size: 12px;
  border-radius: 10px;
  font-weight: 800;
}
.btn-danger {
  background: linear-gradient(135deg, #e11d48, #be123c);
  color: #fff;
}
.pill {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  width: fit-content;
}
.pill-ok {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #f59e0b;
}
.pill-warn {
  background: #ffedd5;
  color: #9a3412;
  border: 1px solid #fb923c;
}
.policy-box {
  padding: 16px;
  border-radius: 14px;
  background: #fef9e7;
  border: 1.5px solid rgba(217, 119, 6, 0.35);
}
[hidden] {
  display: none !important;
}

/* ====== Locket Account Lookup Card (24K Royal Gold Luxury Style) ====== */
.lookup-hero {
  border: 2px solid rgba(217, 119, 6, 0.55);
  border-radius: 26px;
  padding: 28px 24px;
  background:
    radial-gradient(circle at top center, rgba(253, 224, 71, 0.32), rgba(255, 253, 246, 0.96) 72%);
  box-shadow:
    0 24px 60px rgba(146, 64, 14, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}
.lookup-pill {
  display: block;
  width: fit-content;
  margin: 0 auto 12px;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.11em;
  color: #92400e;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border: 1.5px solid #f59e0b;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.18);
}
.lookup-heading {
  text-align: center;
  margin: 0 0 8px;
  font-size: clamp(24px, 4.5vw, 32px);
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #3b1d06;
}
.lookup-sub {
  text-align: center;
  margin: 0 0 20px;
  font-size: 14px;
  color: #78350f;
}
.lookup-search-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}
.lookup-input {
  flex: 1;
  min-width: 0;
  border-radius: 14px;
  border: 2px solid #d97706;
  background: #fffdf9;
  color: #2c1806;
  padding: 13px 16px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  outline: none;
  box-shadow: inset 0 2px 5px rgba(180, 83, 9, 0.06);
}
.lookup-input::placeholder {
  color: #a16207;
  opacity: 0.72;
}
.lookup-input:focus {
  border-color: #b45309;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.25);
}
.btn-lookup {
  width: auto;
  min-width: 132px;
  padding: 13px 20px;
  border-radius: 14px;
  background: linear-gradient(135deg, #f59e0b, #d97706, #92400e);
  border: 1px solid #78350f;
  color: #fffbeb;
  font-weight: 900;
  font-size: 14px;
  box-shadow: 0 8px 20px rgba(180, 83, 9, 0.28);
}
.lookup-guide-box {
  margin-top: 16px;
  padding: 15px 16px;
  border-radius: 16px;
  border: 1.5px dashed rgba(217, 119, 6, 0.55);
  background: rgba(254, 249, 231, 0.85);
}
.lookup-guide-title {
  font-size: 12.5px;
  font-weight: 800;
  color: #92400e;
  margin-bottom: 10px;
}
.lookup-guide-code {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 11px;
  background: #fffdf7;
  border: 1px solid rgba(217, 119, 6, 0.35);
  font-size: 13px;
  color: #451a03;
}
.gold-chip {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 8px;
  border: 1.5px solid #d97706;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #78350f;
  font-weight: 900;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.btn-sample {
  width: auto;
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 9px;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border: 1.5px solid #d97706;
  color: #78350f;
  font-weight: 800;
  margin-left: auto;
  box-shadow: none;
}
.lookup-guide-note {
  margin: 10px 0 0;
  font-size: 12.5px;
  color: #78350f;
  line-height: 1.55;
}
.lookup-guide-note code {
  color: #92400e;
  font-weight: 800;
  background: rgba(253, 230, 138, 0.5);
  padding: 1px 5px;
  border-radius: 5px;
}
.lookup-result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin: 18px 0 9px;
  font-size: 11.5px;
  font-weight: 900;
  letter-spacing: 0.05em;
  color: #5c2d0c;
}
.lookup-verified-tag {
  color: #b45309;
  background: #fef3c7;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid rgba(217, 119, 6, 0.45);
}
.lookup-result-card {
  border-radius: 18px;
  border: 2px solid #d97706;
  background: linear-gradient(135deg, #fffdf8 0%, #fef5d4 55%, #fde69e 100%);
  padding: 18px;
  box-shadow:
    0 14px 36px rgba(180, 83, 9, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
.lookup-result-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.lookup-user-left {
  display: flex;
  align-items: center;
  gap: 14px;
}
.lookup-avatar-wrap {
  position: relative;
  width: 62px;
  height: 62px;
  flex-shrink: 0;
}
.lookup-avatar {
  width: 62px;
  height: 62px;
  border-radius: 999px;
  object-fit: cover;
  border: 2.5px solid #d97706;
  background: #fef3c7;
  box-shadow: 0 4px 14px rgba(180, 83, 9, 0.25);
}
.lookup-badge-overlay {
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  object-fit: contain;
  background: #fffdf7;
  border: 1.5px solid #d97706;
  box-shadow: 0 2px 6px rgba(120, 53, 15, 0.3);
}
.lookup-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.lookup-inline-badge {
  width: 20px;
  height: 20px;
  object-fit: contain;
}
.lookup-name {
  font-size: 18px;
  font-weight: 900;
  color: #3b1d06;
}
.lookup-handle {
  font-size: 13px;
  font-weight: 700;
  color: #92400e;
  margin-top: 2px;
}
.lookup-user-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
}
.gold-status-pill {
  display: inline-block;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 900;
  color: #fffbeb;
  background: linear-gradient(135deg, #d97706, #92400e);
  border: 1.5px solid #fde047;
  box-shadow: 0 4px 12px rgba(180, 83, 9, 0.25);
}
.lookup-valid-sub {
  font-size: 12px;
  color: #15803d;
  font-weight: 800;
}
.lookup-result-bottom {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(217, 119, 6, 0.32);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.lookup-uid-line {
  font-size: 12.5px;
  font-weight: 700;
  color: #78350f;
}
.lookup-uid-line code {
  color: #3b1d06;
  background: rgba(255, 255, 255, 0.72);
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid rgba(217, 119, 6, 0.35);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  user-select: all;
}
.lookup-gold-activated {
  font-size: 13px;
  font-weight: 900;
  color: #92400e;
}
.lookup-grant-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.lookup-note-input {
  width: 190px;
  padding: 8px 10px;
  font-size: 12px;
}
.btn-grant-gold {
  width: auto;
  padding: 9px 14px;
  font-size: 12px;
  border-radius: 10px;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  color: #fffbeb;
  font-weight: 900;
}
.lookup-footer-bar {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(217, 119, 6, 0.26);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13.5px;
  font-weight: 700;
  color: #78350f;
}
.lookup-footer-bar strong {
  color: #b45309;
  font-size: 15px;
  font-weight: 900;
}
.user-row-left {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}
.user-row-avatar {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  object-fit: cover;
  border: 1.5px solid #d97706;
  background: #fef3c7;
  flex-shrink: 0;
}

/* ====== Inactive ("Chưa được kích hoạt") Account State ====== */
.lookup-result-card.inactive-card {
  border-color: #cbd5e1;
  background: linear-gradient(135deg, #fffdf9 0%, #f8fafc 55%, #f1f5f9 100%);
  box-shadow: 0 10px 28px rgba(100, 116, 139, 0.14);
}
.gold-status-pill.inactive {
  background: linear-gradient(135deg, #64748b, #475569);
  border-color: #cbd5e1;
  color: #f8fafc;
  box-shadow: 0 4px 10px rgba(71, 85, 105, 0.2);
}
.lookup-valid-sub.inactive-sub {
  color: #b45309;
}
.lookup-gold-activated.inactive-note {
  color: #b91c1c;
}

/* ====== Widget Frame Switcher Studio ====== */
.widget-frame-box {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 2px dashed rgba(217, 119, 6, 0.42);
}
.widget-frame-head {
  margin-bottom: 16px;
}
.widget-badge-tag {
  display: inline-block;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #92400e;
  background: #fef3c7;
  border: 1px solid #f59e0b;
  margin-bottom: 6px;
}
.widget-frame-title {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 900;
  color: #3b1d06;
}
.widget-frame-desc {
  margin: 0;
  font-size: 13px;
  color: #78350f;
  line-height: 1.5;
}
.widget-frame-studio {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 253, 246, 0.9);
  border: 1.5px solid rgba(217, 119, 6, 0.38);
  margin-bottom: 16px;
}
.widget-preview-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.widget-live-stage {
  position: relative;
  width: 204px;
  height: 204px;
  aspect-ratio: 1 / 1;
  border-radius: 28px;
  overflow: visible;
  background: #1c1917;
  box-shadow: 0 14px 30px rgba(28, 25, 23, 0.28);
}
.widget-stage-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 28px;
  z-index: 1;
  display: block;
}
.widget-stage-grid-4cut {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 6px;
  padding: 10px;
  box-sizing: border-box;
  border-radius: 28px;
  overflow: hidden;
  background: #fffbeb;
  z-index: 1;
}
.widget-stage-grid-4cut[hidden] {
  display: none !important;
}
.wf-grid-slot {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}
.widget-stage-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 28px;
  z-index: 3;
  pointer-events: none;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.14));
}
.widget-photo-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}
.btn-wf-secondary,
.btn-wf-export {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 800;
  border-radius: 12px;
  cursor: pointer;
  text-align: center;
  box-sizing: border-box;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-wf-secondary {
  background: #fffbeb;
  color: #78350f;
  border: 1.5px solid rgba(217, 119, 6, 0.45);
}
.btn-wf-secondary:hover {
  background: #fef3c7;
}
.btn-wf-export {
  background: linear-gradient(135deg, #f59e0b, #b45309);
  color: #fffbeb;
  border: none;
  box-shadow: 0 6px 14px rgba(180, 83, 9, 0.25);
}
.btn-wf-export:hover {
  transform: translateY(-1px);
}
.wf-rendered-result {
  margin-top: 10px;
  padding: 12px;
  border-radius: 14px;
  background: #fffbeb;
  border: 1.5px solid rgba(217, 119, 6, 0.4);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.wf-rendered-result[hidden] {
  display: none !important;
}
.wf-rendered-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: #3b1d06;
}
.btn-wf-download {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border-radius: 999px;
  background: #15803d;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}
.wf-rendered-output-img {
  width: 148px;
  height: 148px;
  object-fit: contain;
  border-radius: 20px;
  border: 1.5px solid rgba(217, 119, 6, 0.35);
  align-self: center;
  background: #1c1917;
}
.locket-utilities-box {
  margin-top: 16px;
  background: linear-gradient(145deg, rgba(254, 249, 195, 0.55), rgba(255, 251, 235, 0.9));
}
.utility-badge-tag {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #f0f9ff;
}
.locket-utilities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 10px;
}
.locket-utility-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  background: #fffdf9;
  border: 1.5px solid rgba(2, 132, 199, 0.28);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.08);
}
.locket-utility-thumb {
  width: 68px;
  height: 68px;
  border-radius: 14px;
  object-fit: contain;
  background: #f0f9ff;
  border: 1px solid rgba(2, 132, 199, 0.22);
  padding: 4px;
  flex-shrink: 0;
}
.locket-utility-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
}
.locket-utility-title {
  font-size: 13.5px;
  font-weight: 900;
  color: #0c4a6e;
}
.locket-utility-desc {
  font-size: 11.5px;
  color: #334155;
  line-height: 1.35;
}
.locket-utility-pill {
  display: inline-block;
  align-self: flex-start;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 800;
  background: #e0f2fe;
  color: #0369a1;
}
.widget-preview-caption {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}
.widget-preview-caption strong {
  font-size: 13px;
  color: #3b1d06;
}
.widget-input-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.widget-uid-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}
.widget-action-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.widget-action-row > * {
  flex: 1;
}
.wf-bindings-box {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #fffbeb;
  border: 1.5px solid rgba(217, 119, 6, 0.36);
}
.wf-bindings-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 12.5px;
  color: #3b1d06;
}
.wf-bindings-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 155px;
  overflow-y: auto;
}
.wf-binding-empty {
  font-size: 12px;
  color: #78350f;
  padding: 4px 0;
}
.wf-binding-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 10px;
  background: #fffdf8;
  border: 1px solid rgba(217, 119, 6, 0.25);
}
.wf-binding-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.wf-binding-thumb {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: contain;
  background: #fef3c7;
  border: 1px solid rgba(217, 119, 6, 0.25);
  flex-shrink: 0;
}
.wf-binding-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.wf-binding-uid {
  font-size: 11.5px;
  font-weight: 800;
  color: #3b1d06;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wf-binding-sub {
  font-size: 11px;
  color: #78350f;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wf-binding-actions {
  display: flex;
  gap: 5px;
  flex-shrink: 0;
}
.btn-wf-mini {
  width: auto;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 800;
  border-radius: 8px;
  background: #fef3c7;
  color: #78350f;
  border: 1px solid rgba(217, 119, 6, 0.4);
  cursor: pointer;
}
.btn-wf-mini:hover {
  background: #fde68a;
}
.btn-wf-mini-danger {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fecaca;
}
.btn-wf-mini-danger:hover {
  background: #fee2e2;
}
.wf-user-note {
  margin-top: 10px;
  padding: 10px 14px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(217, 119, 6, 0.35);
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.5;
  color: #78350f;
  font-weight: 600;
}
.admin-wf-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #fffdf8;
  border: 1.5px solid rgba(217, 119, 6, 0.28);
  box-shadow: 0 2px 8px rgba(180, 83, 9, 0.06);
}
.admin-wf-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}
.admin-wf-thumb {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  object-fit: contain;
  background: #fef3c7;
  border: 1.5px solid rgba(217, 119, 6, 0.35);
  flex-shrink: 0;
}
.admin-wf-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.admin-wf-user {
  font-size: 14px;
  font-weight: 800;
  color: #2c1806;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.admin-wf-uid {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  color: #78350f;
  word-break: break-all;
}
.admin-wf-framedesc {
  font-size: 12px;
  color: #92400e;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.admin-wf-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.widget-filter-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.wf-tab {
  width: auto;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 800;
  border-radius: 999px;
  background: #fffbeb;
  color: #78350f;
  border: 1.5px solid rgba(217, 119, 6, 0.35);
  box-shadow: none;
}
.wf-tab.active {
  background: linear-gradient(135deg, #f59e0b, #b45309);
  color: #fffbeb;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(180, 83, 9, 0.22);
}
.widget-presets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 10px;
  max-height: 390px;
  overflow-y: auto;
  padding: 4px 2px;
}
.wf-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 8px;
  border-radius: 15px;
  background: #fffdf8;
  color: #3b1d06;
  border: 1.5px solid rgba(217, 119, 6, 0.28);
  box-shadow: 0 4px 10px rgba(180, 83, 9, 0.06);
  text-align: center;
}
.wf-card.active {
  border: 2px solid #d97706;
  background: linear-gradient(145deg, #fffbeb, #fde68a);
  box-shadow: 0 8px 18px rgba(217, 119, 6, 0.24);
}
.wf-card-thumb-wrap {
  width: 82px;
  height: 82px;
  border-radius: 16px;
  background:
    radial-gradient(circle at center, #fffdf9 35%, #fef3c7 100%);
  border: 1px solid rgba(217, 119, 6, 0.25);
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 4px;
}
.wf-card-thumb {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.wf-card-title {
  font-size: 12px;
  font-weight: 800;
  color: #3b1d06;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.wf-card-tag {
  font-size: 10.5px;
  font-weight: 700;
  color: #92400e;
}
@media (max-width: 680px) {
  .widget-frame-studio {
    grid-template-columns: 1fr;
  }
  .widget-input-row {
    flex-direction: column;
  }
}

/* AI Bot Quota & Meter */
.quota-meter {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 6px 0;
  width: 100%;
}
.quota-bar-track {
  width: 100%;
  height: 8px;
  background: rgba(217, 119, 6, 0.14);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}
.quota-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.35s ease;
}
.quota-bar-fill.high {
  background: linear-gradient(90deg, #10b981, #059669);
}
.quota-bar-fill.medium {
  background: linear-gradient(90deg, #f59e0b, #d97706);
}
.quota-bar-fill.low {
  background: linear-gradient(90deg, #ef4444, #dc2626);
}
.quota-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 800;
  width: fit-content;
}
.quota-badge.high {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}
.quota-badge.medium {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}
.quota-badge.low {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}
.btn-action-small {
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 6px;
  border: 1px solid rgba(217, 119, 6, 0.35);
  background: #fffdf7;
  color: #92400e;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-action-small:hover {
  background: #fef3c7;
  border-color: #d97706;
}
.node-quota-box {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed rgba(217, 119, 6, 0.28);
  font-size: 11px;
  color: #92400e;
}
.node-quota-bar {
  width: 100%;
  height: 5px;
  background: rgba(217, 119, 6, 0.15);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 3px;
}
