/* ============================================================
   UTSERVIO CERTIFICATE STUDIO — Core Styles
   ============================================================ */

:root {
  --bg1: #0A0A0A;
  --bg2: #111111;
  --bg3: #1A1A1A;
  --bg4: #222222;
  --text1: #FFFFFF;
  --text2: #E0E0E0;
  --text3: #888888;
  --text4: #555555;
  --gold: #F5A623;
  --gold-light: #FFB84D;
  --gold-dark: #C4841A;
  --border: #222222;
  --border2: #333333;
  --danger: #EF4444;
  --success: #10B981;
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 14px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --transition: 0.2s cubic-bezier(.4, 0, .2, 1);
}

[data-theme="light"] {
  --bg1: #FFFFFF;
  --bg2: #F5F5F5;
  --bg3: #ECECEC;
  --bg4: #E0E0E0;
  --text1: #111111;
  --text2: #333333;
  --text3: #777777;
  --text4: #AAAAAA;
  --border: #E0E0E0;
  --border2: #CCCCCC;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

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

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

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg1);
  color: var(--text2);
  -webkit-font-smoothing: antialiased;
}

/* ---- TOPBAR ---- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  padding: 0 24px;
  background: rgba(17, 17, 17, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  z-index: 100;
  position: relative;
  transition: background var(--transition), border-color var(--transition);
}

[data-theme="light"] .topbar {
  background: rgba(255, 255, 255, 0.85);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

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

.logo img {
  height: 28px;
}

.logo-product {
  font-size: 13px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.96);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text2);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

[data-theme="light"] .btn-ghost {
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text1);
  border-color: rgba(255, 255, 255, 0.15);
}

[data-theme="light"] .btn-ghost:hover {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.15);
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: #0A0A0A;
  box-shadow: 0 4px 14px rgba(245, 166, 35, 0.25);
}

.btn-gold:hover {
  box-shadow: 0 6px 20px rgba(245, 166, 35, 0.45);
  transform: translateY(-1px);
}

.cert-indicator {
  font-size: 11px;
  color: var(--gold);
  background: rgba(245, 166, 35, 0.1);
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid rgba(245, 166, 35, 0.2);
  font-weight: 600;
}

/* User Menu */
.user-menu-wrap {
  position: relative;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: #0A0A0A;
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.avatar:hover {
  transform: scale(1.06);
  box-shadow: 0 0 12px rgba(245, 166, 35, 0.4);
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 220px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all var(--transition);
  z-index: 200;
}

.user-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-dropdown-header {
  padding: 12px 14px;
}

.user-dropdown-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text1);
}

.user-dropdown-email {
  font-size: 11px;
  color: var(--text3);
  margin-top: 2px;
}

.user-dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 0 10px;
}

.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  font-size: 12px;
  color: var(--text2);
  text-decoration: none;
  transition: background var(--transition);
}

.user-dropdown-item:hover {
  background: var(--bg3);
}

.user-dropdown-item.danger {
  color: var(--danger);
}

/* ---- MAIN LAYOUT ---- */
.main-layout {
  display: flex;
  height: calc(100vh - 56px);
  overflow: hidden;
  position: relative;
}

/* Glowing background orbs for immersive design studio */
.main-layout::before {
  content: "";
  position: absolute;
  top: -10%;
  right: -10%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, rgba(245, 166, 35, 0.04) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.main-layout::after {
  content: "";
  position: absolute;
  bottom: -10%;
  left: -10%;
  width: 40vw;
  height: 40vw;
  background: radial-gradient(circle, rgba(245, 166, 35, 0.02) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.left-panel {
  width: 350px;
  min-width: 350px;
  background: rgba(17, 17, 17, 0.7);
  backdrop-filter: blur(16px);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  z-index: 10;
  transition: background var(--transition), border-color var(--transition);
}

[data-theme="light"] .left-panel {
  background: rgba(245, 245, 245, 0.8);
  border-right: 1px solid rgba(0, 0, 0, 0.08);
}

.panel-section {
  padding: 20px;
}

.panel-section-form {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-top: 1px solid var(--border);
}

.panel-section-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.clear-btn {
  font-size: 9px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.15);
  cursor: pointer;
  font-family: inherit;
  transition: all var(--transition);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.clear-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.3);
}

.field-form-scroll {
  flex: 1;
  overflow-y: auto;
  padding-right: 4px;
}

.field-form-scroll::-webkit-scrollbar {
  width: 4px;
}

.field-form-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.field-form-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
}

[data-theme="light"] .field-form-scroll::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.08);
}

/* Template Cards Grid */
.tpl-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.tpl-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 18px 12px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

[data-theme="light"] .tpl-card {
  background: rgba(0, 0, 0, 0.01);
  border-color: rgba(0, 0, 0, 0.06);
}

.tpl-card-icon-wrap {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text3);
  transition: all var(--transition);
}

[data-theme="light"] .tpl-card-icon-wrap {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.04);
}

.tpl-svg-icon {
  transition: transform var(--transition);
}

/* Hover State */
.tpl-card:hover {
  border-color: rgba(245, 166, 35, 0.35);
  background: rgba(245, 166, 35, 0.02);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245, 166, 35, 0.06);
}

.tpl-card:hover .tpl-card-icon-wrap {
  border-color: rgba(245, 166, 35, 0.4);
  background: rgba(245, 166, 35, 0.06);
  color: var(--gold);
}

.tpl-card:hover .tpl-svg-icon {
  transform: scale(1.1) rotate(2deg);
}

/* Active State */
.tpl-card.active {
  border-color: var(--gold);
  background: rgba(245, 166, 35, 0.08);
  box-shadow: 0 0 20px rgba(245, 166, 35, 0.12);
}

.tpl-card.active .tpl-card-icon-wrap {
  background: var(--gold);
  border-color: var(--gold);
  color: #141414;
  box-shadow: 0 0 10px rgba(245, 166, 35, 0.3);
}

.tpl-card-name {
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text2);
  transition: color var(--transition);
}

.tpl-card.active .tpl-card-name {
  color: var(--gold);
}

/* Form Fields */
.field-group {
  margin-bottom: 14px;
}

.field-group label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text3);
  margin-bottom: 6px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.field-group input,
.field-group textarea {
  width: 100%;
  padding: 10px 12px;
  font-size: 13px;
  background: rgba(0, 0, 0, 0.2);
  color: var(--text1);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  font-family: inherit;
  transition: all var(--transition);
  outline: none;
}

[data-theme="light"] .field-group input,
[data-theme="light"] .field-group textarea {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: var(--text1);
}

.field-group input:focus,
.field-group textarea:focus {
  border-color: var(--gold);
  background: rgba(0, 0, 0, 0.4);
  box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.12);
}

[data-theme="light"] .field-group input:focus,
[data-theme="light"] .field-group textarea:focus {
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.08);
}

.field-group textarea {
  resize: vertical;
  min-height: 70px;
  line-height: 1.5;
}

.field-group input::placeholder,
.field-group textarea::placeholder {
  color: var(--text4);
}

/* ---- CANVAS AREA ---- */
.canvas-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg1);
  position: relative;
  z-index: 5;
}

.canvas-toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  background: rgba(17, 17, 17, 0.5);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

[data-theme="light"] .canvas-toolbar {
  background: rgba(255, 255, 255, 0.5);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.canvas-zoom {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(0, 0, 0, 0.2);
  padding: 3px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .canvas-zoom {
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.zoom-btn {
  width: 26px;
  height: 26px;
  border-radius: 4px;
  background: transparent;
  border: none;
  color: var(--text2);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  font-family: inherit;
}

.zoom-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text1);
}

[data-theme="light"] .zoom-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

#zoomLabel {
  font-size: 11px;
  font-weight: 700;
  color: var(--text2);
  min-width: 48px;
  text-align: center;
}

.canvas-scroll {
  flex: 1;
  overflow: auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 36px;
}

.canvas-bg {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.cert-frame {
  transform-origin: top center;
  transition: transform 0.15s ease;
}

/* ---- CERTIFICATE CANVAS ---- */
.certificate-canvas {
  width: 1122px;
  height: 794px;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

/* ---- PROFESSIONAL CERTIFICATE STYLES ---- */
.cert-shell {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  font-family: 'DM Sans', sans-serif;
  /* Complex Guilloche-style secure background pattern */
  background-color: #FDFBF5;
  background-image:
    radial-gradient(circle at 50% 50%, transparent 20%, rgba(201, 168, 76, 0.03) 21%, transparent 22%),
    radial-gradient(circle at 50% 50%, transparent 40%, rgba(201, 168, 76, 0.03) 41%, transparent 42%),
    radial-gradient(circle at 50% 50%, transparent 60%, rgba(201, 168, 76, 0.03) 61%, transparent 62%),
    radial-gradient(circle at 50% 50%, transparent 80%, rgba(201, 168, 76, 0.03) 81%, transparent 82%),
    repeating-linear-gradient(45deg, rgba(201, 168, 76, 0.02) 0px, rgba(201, 168, 76, 0.02) 2px, transparent 2px, transparent 10px),
    repeating-linear-gradient(-45deg, rgba(201, 168, 76, 0.02) 0px, rgba(201, 168, 76, 0.02) 2px, transparent 2px, transparent 10px);
  background-size: 100% 100%, 100% 100%, 100% 100%, 100% 100%, 20px 20px, 20px 20px;
}

.cert-shell-intern {
  background-color: #FDFBF5;
}

.cert-shell-employee {
  background-color: #FDFBF0;
}

.cert-shell-student {
  background-color: #F8FBFD;
}

.cert-shell-custom {
  background-color: #FDFBF5;
}

/* Triple ornamental border with depth */
.cert-border-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* Side ornaments */
.cert-side-orn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 160px;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, #C9A84C 10%, #E8CC6E 50%, #C9A84C 90%, transparent);
  opacity: 0.5;
  border-radius: 4px;
}

.cert-side-orn-l {
  left: 16px;
}

.cert-side-orn-r {
  right: 16px;
}

/* SVG corner flourishes */
/* ---- MODERN MNC CERTIFICATE LAYOUT ---- */
.cert-shell {
  position: relative;
  width: 1122px;
  height: 794px;
  background: #ffffff;
  color: #111;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.cert-modern-sidebar {
  position: absolute;
  top: 0;
  left: 0;
  width: 20px;
  height: 100%;
  background: #1A73E8;
  z-index: 5;
}

.cert-modern-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.cert-content {
  position: relative;
  z-index: 3;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 70px 90px 60px 90px;
  box-sizing: border-box;
}

/* TOP BAR */
.cert-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  width: 100%;
  margin-bottom: 60px;
}

.cert-logo {
  height: 52px;
  object-fit: contain;
}

.cert-id-tag {
  text-align: right;
  font-family: 'Inter', sans-serif;
  color: rgba(255, 255, 255, 0.65);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  position: relative;
  z-index: 10;
}

.cert-id-tag strong {
  display: block;
  color: #E69500;
  font-size: 15px;
  font-weight: 700;
  margin-top: 4px;
  letter-spacing: 1px;
}

/* BODY */
.cert-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 800px;
  text-align: left;
}

.cert-category {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 800;
  color: #E69500;
  letter-spacing: 5px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.cert-title {
  font-family: 'Outfit', sans-serif;
  font-size: 52px;
  font-weight: 900;
  color: #141414;
  line-height: 1.1;
  margin-bottom: 35px;
  letter-spacing: -1.5px;
}

.cert-presented {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: #888888;
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 4px; /* Tightened gap under tagline */
}

.cert-recipient {
  font-family: 'Alex Brush', cursive;
  font-size: 58px;
  font-weight: 500;
  color: #141414;
  margin-bottom: 24px;
}

.cert-desc {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: #5f6368;
  line-height: 2.0;
  max-width: 680px;
}

.cert-sub-note {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: #888888;
  margin-top: 8px;
}

/* FOOTER */
.cert-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  width: 100%;
  padding-top: 40px;
  border-top: 3.5px solid #E69500; /* Thicker premium divider */
}

/* Verification Block */
.cert-verify-block {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  width: 300px;
  font-family: 'Inter', sans-serif;
}

.cert-verify-qr {
  flex-shrink: 0;
}

.cert-qr-img {
  width: 70px;
  height: 70px;
  border-radius: 0;
  border: 1px solid #e8eaed;
}

.cert-verify-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
  justify-content: center;
  height: 70px;
}

.cert-verify-label {
  font-size: 10px;
  font-weight: 800;
  color: #E69500;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.cert-verify-url {
  font-size: 11px;
  color: #3c4043;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.cert-verify-meta {
  font-size: 10px;
  color: #80868b;
}

/* Modern Badge */
.cert-modern-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform: translateY(-20px);
}

.cert-badge-text {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 800;
  color: #E69500;
  letter-spacing: 2px;
  margin-top: 8px;
}

/* Signatures */
.cert-signatures {
  display: flex;
  gap: 40px;
  justify-content: flex-end;
}

.cert-sig-block {
  text-align: left;
  min-width: 180px;
  position: relative; /* Setup absolute anchor for dynamic signature overlays */
}

.cert-sig-img-wrap {
  position: absolute;
  bottom: 38px; /* Perfectly floats directly above the signature line */
  left: 0;
  width: 100%;
  height: 60px;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  pointer-events: none;
  z-index: 10;
}

.cert-sig-img {
  max-width: 140px;
  max-height: 52px;
  object-fit: contain;
  opacity: 0.95;
  mix-blend-mode: multiply; 
}

.cert-sig-text-fallback {
  position: absolute;
  bottom: 28px;
  left: 8px;
  font-family: 'Great Vibes', cursive;
  font-size: 32px;
  color: #1a1408;
  transform: rotate(-3deg);
  white-space: nowrap;
  pointer-events: none;
  z-index: 10;
  user-select: none;
  opacity: 0.85;
}

.cert-sig-line {
  width: 100%;
  height: 2px;
  background: #141414;
  margin-bottom: 5px; /* Tightened gap below signature line */
}

.cert-sig-name {
  font-family: 'Inter', sans-serif;
  font-size: 14px; /* Perfectly scaled name */
  font-weight: 700;
  color: #202124;
  line-height: 1.2;
}

.cert-sig-title {
  font-family: 'Inter', sans-serif;
  font-size: 10px; /* Highly precise corporate labels */
  color: #5f6368;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  line-height: 1.2;
  margin-top: 2px; /* Pulls slightly higher to prevent low-hanging look */
}

/* ---- MODALS ---- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(12px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.modal-backdrop.open {
  display: flex;
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text3);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text1);
  border-color: rgba(255, 255, 255, 0.15);
}

.export-modal,
.certs-modal {
  background: rgba(17, 17, 17, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 480px;
  box-shadow: var(--shadow);
  animation: modalIn 0.3s cubic-bezier(.34, 1.56, .64, 1);
  backdrop-filter: blur(20px);
}

[data-theme="light"] .export-modal,
[data-theme="light"] .certs-modal {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(0, 0, 0, 0.08);
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(15px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.export-modal-header,
.certs-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 24px 24px 18px;
}

.export-modal-title,
.certs-modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text1);
}

.export-modal-sub,
.certs-modal-sub {
  font-size: 12px;
  color: var(--text3);
  margin-top: 4px;
}

.export-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 0 24px 24px;
}

.export-option-card {
  padding: 24px 16px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
  text-align: center;
  font-family: inherit;
  transition: all var(--transition);
  color: var(--text2);
}

[data-theme="light"] .export-option-card {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.06);
}

.export-option-card:hover {
  border-color: var(--gold);
  background: rgba(245, 166, 35, 0.06);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(245, 166, 35, 0.12);
}

.export-option-icon {
  font-size: 36px;
  margin-bottom: 12px;
  transition: transform var(--transition);
}

.export-option-card:hover .export-option-icon {
  transform: scale(1.1);
}

.export-option-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text1);
}

.export-option-desc {
  font-size: 11px;
  color: var(--text3);
  margin-top: 6px;
  line-height: 1.4;
}

.certs-modal {
  max-width: 580px;
}

.certs-list {
  max-height: 400px;
  overflow-y: auto;
  padding: 0 24px 24px;
}

.certs-empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--text3);
}

.certs-empty-title {
  font-size: 14px;
  font-weight: 700;
  margin-top: 12px;
  color: var(--text2);
}

.certs-empty-sub {
  font-size: 12px;
  margin-top: 6px;
}

.cert-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 10px;
  transition: all var(--transition);
}

[data-theme="light"] .cert-card {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.06);
}

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

[data-theme="light"] .cert-card:hover {
  border-color: rgba(0, 0, 0, 0.15);
  background: rgba(0, 0, 0, 0.04);
}

.cert-card.active {
  border-color: var(--gold);
  background: rgba(245, 166, 35, 0.08);
  box-shadow: 0 0 12px rgba(245, 166, 35, 0.1);
}

.cert-card-main {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.cert-card-icon {
  font-size: 22px;
}

.cert-card-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text1);
}

.cert-card-meta {
  font-size: 11px;
  color: var(--text3);
  margin-top: 4px;
}

.cert-active-badge {
  font-size: 9px;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(245, 166, 35, 0.15);
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.cert-card-actions {
  display: flex;
  gap: 6px;
}

.cert-action-btn {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text3);
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

[data-theme="light"] .cert-action-btn {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.06);
}

.cert-action-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text1);
  border-color: rgba(255, 255, 255, 0.15);
}

[data-theme="light"] .cert-action-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text1);
  border-color: rgba(0, 0, 0, 0.15);
}

.cert-action-btn.danger:hover {
  color: var(--danger) !important;
  border-color: rgba(239, 68, 68, 0.4) !important;
  background: rgba(239, 68, 68, 0.1) !important;
}

/* ---- TOAST ---- */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  padding: 12px 28px;
  border-radius: 30px;
  background: rgba(26, 26, 26, 0.85);
  color: var(--text1);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13px;
  font-weight: 600;
  z-index: 9999;
  opacity: 0;
  transition: all 0.4s cubic-bezier(.175, .885, .32, 1.275);
  pointer-events: none;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

[data-theme="light"] .toast {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(0, 0, 0, 0.08);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast.toast-gold {
  border-color: var(--gold);
  color: var(--gold);
  box-shadow: 0 4px 20px rgba(245, 166, 35, 0.15);
}

/* ---- AUTH SCREEN ---- */
.auth-screen {
  position: fixed;
  inset: 0;
  z-index: 5000;
  background: var(--bg1);
  display: none;
  align-items: center;
  justify-content: center;
  background-image: radial-gradient(circle at center, rgba(245, 166, 35, 0.05) 0%, var(--bg1) 80%);
}

.auth-screen.open {
  display: flex;
}

.auth-card {
  width: 400px;
  padding: 48px 36px;
  background: rgba(17, 17, 17, 0.7);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  text-align: center;
}

[data-theme="light"] .auth-card {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(0, 0, 0, 0.08);
}

.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 28px;
}

.auth-logo-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--gold);
  padding: 3px 12px;
  border-radius: 20px;
  background: rgba(245, 166, 35, 0.1);
  border: 1px solid rgba(245, 166, 35, 0.2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.auth-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--text1);
  margin-bottom: 6px;
  letter-spacing: -0.5px;
}

.auth-subtitle {
  font-size: 13px;
  color: var(--text3);
  margin-bottom: 28px;
}

.auth-error {
  padding: 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: var(--danger);
  font-size: 12px;
  font-weight: 500;
}

.auth-field {
  margin-bottom: 18px;
  text-align: left;
}

.auth-field label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text3);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.auth-field input {
  width: 100%;
  padding: 11px 14px;
  font-size: 13px;
  background: rgba(0, 0, 0, 0.2);
  color: var(--text1);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  font-family: inherit;
  outline: none;
  transition: all var(--transition);
}

[data-theme="light"] .auth-field input {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(0, 0, 0, 0.10);
  color: var(--text1);
}

.auth-field input:focus {
  border-color: var(--gold);
  background: rgba(0, 0, 0, 0.4);
  box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.12);
}

[data-theme="light"] .auth-field input:focus {
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.08);
}

.auth-submit {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: #0A0A0A;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  margin-top: 12px;
  transition: all var(--transition);
  box-shadow: 0 4px 14px rgba(245, 166, 35, 0.25);
}

.auth-submit:hover {
  box-shadow: 0 6px 20px rgba(245, 166, 35, 0.45);
  transform: translateY(-1px);
}

.auth-submit:active {
  transform: scale(0.98);
}

.auth-toggle {
  margin-top: 20px;
  font-size: 12px;
  color: var(--text3);
}

.auth-toggle a {
  color: var(--gold);
  text-decoration: none;
  font-weight: 600;
}

/* ---- SIGNATURE UPLOAD ZONE ---- */
.signature-upload-group {
  margin-top: 14px;
}
.sig-upload-zone {
  position: relative;
  width: 100%;
  min-height: 90px;
  border: 2.5px dashed rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  transition: all var(--transition);
}
[data-theme="light"] .sig-upload-zone {
  border-color: rgba(0, 0, 0, 0.10);
  background: rgba(0, 0, 0, 0.02);
}
.sig-upload-zone:hover {
  border-color: var(--gold);
  background: rgba(245, 166, 35, 0.04);
}
.sig-file-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 5;
}
.sig-upload-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 12px;
  color: var(--text3);
  pointer-events: none;
}
.sig-upload-prompt svg {
  margin-bottom: 6px;
  color: var(--text3);
  transition: color var(--transition);
}
.sig-upload-zone:hover .sig-upload-prompt svg {
  color: var(--gold);
}
.sig-upload-prompt span {
  font-size: 12px;
  font-weight: 700;
  color: var(--text2);
}
.sig-upload-prompt .subtext {
  font-size: 10px;
  color: var(--text4);
  margin-top: 2px;
}

/* ---- SIGNATURE PREVIEW CARD ---- */
.sig-preview-card {
  width: 100%;
  padding: 16px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  position: relative;
}

[data-theme="light"] .sig-preview-card {
  background: rgba(0, 0, 0, 0.01);
  border-color: rgba(0, 0, 0, 0.08);
}

.sig-preview-thumb-wrap {
  width: 100%;
  height: 60px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .sig-preview-thumb-wrap {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(0, 0, 0, 0.05);
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
}

.sig-preview-thumb {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
}

.sig-scale-control {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  z-index: 15; /* Absolute priority over drop zones */
}

.sig-scale-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.scale-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.scale-value {
  font-size: 11px;
  font-weight: 700;
  color: var(--gold);
}

.sig-scale-slider {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

[data-theme="light"] .sig-scale-slider {
  background: rgba(0, 0, 0, 0.1);
}

.sig-scale-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gold);
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  transition: transform var(--transition);
}

.sig-scale-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.sig-preview-card .sig-remove-btn {
  margin-top: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 8px 12px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 77, 77, 0.15);
  background: rgba(255, 77, 77, 0.05);
  color: #ff4d4d;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all var(--transition);
}

.sig-preview-card .sig-remove-btn svg {
  transition: transform var(--transition);
}

.sig-preview-card .sig-remove-btn:hover {
  background: rgba(255, 77, 77, 0.12);
  border-color: #ff4d4d;
  color: #ff4d4d;
}

.sig-preview-card .sig-remove-btn:hover svg {
  transform: scale(1.1) rotate(5deg);
}

/* ---- RESPONSIVE ---- */
@media (max-width: 900px) {
  .left-panel {
    width: 300px;
    min-width: 300px;
  }

  .tpl-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 680px) {
  .main-layout {
    flex-direction: column;
  }

  .left-panel {
    width: 100%;
    min-width: 100%;
    max-height: 45vh;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .canvas-area {
    min-height: 55vh;
  }

  .topbar-right .btn span,
  .topbar-right .btn:not(.btn-gold) svg+span {
    display: none;
  }

  .auth-card {
    width: 92%;
    padding: 36px 24px;
  }
}

/* ============================================================
   REVOCATION / STATUS MANAGEMENT SYSTEM
   ============================================================ */

.cert-deactivated-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(10, 10, 10, 0.45);
  backdrop-filter: blur(2.5px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 20;
  border-radius: 4px;
  animation: fadeInVoid 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

@keyframes fadeInVoid {
  from { opacity: 0; backdrop-filter: blur(0px); }
  to { opacity: 1; backdrop-filter: blur(2.5px); }
}

.cert-deactivated-stamp {
  font-family: 'Outfit', sans-serif;
  font-size: 58px;
  font-weight: 900;
  letter-spacing: 0.15em;
  color: #FF3B30;
  border: 5px solid #FF3B30;
  padding: 12px 36px;
  border-radius: 12px;
  text-transform: uppercase;
  transform: rotate(-12deg);
  box-shadow: 0 0 40px rgba(255, 59, 48, 0.25), inset 0 0 20px rgba(255, 59, 48, 0.15);
  text-shadow: 0 0 10px rgba(255, 59, 48, 0.4);
  background: rgba(10, 10, 10, 0.95);
  margin-bottom: 24px;
}

.cert-deactivated-sub {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: #EBEBF5;
  background: rgba(0, 0, 0, 0.85);
  padding: 8px 18px;
  border-radius: 8px;
  border: 1px solid rgba(255, 59, 48, 0.2);
  text-shadow: 0 1px 2px rgba(0,0,0,0.8);
  text-align: center;
  max-width: 500px;
  transform: rotate(-12deg);
}

/* ---- Status Toggle Switch Styles ---- */
.status-toggle-wrap {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.status-toggle-checkbox {
  display: none;
}

.status-toggle-slider {
  position: relative;
  width: 44px;
  height: 22px;
  background-color: var(--bg4);
  border-radius: 20px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

[data-theme="light"] .status-toggle-slider {
  background-color: var(--border);
  border-color: rgba(0, 0, 0, 0.05);
}

.status-toggle-slider::before {
  content: "";
  position: absolute;
  height: 16px;
  width: 16px;
  left: 2px;
  bottom: 2px;
  background-color: var(--text3);
  border-radius: 50%;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.status-toggle-checkbox:checked + .status-toggle-slider {
  background-color: #30D158;
  border-color: #30D158;
}

.status-toggle-checkbox:checked + .status-toggle-slider::before {
  transform: translateX(22px);
  background-color: #FFF;
}

.status-toggle-label {
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.status-toggle-label.active {
  color: #30D158;
  background: rgba(48, 209, 88, 0.1);
}

.status-toggle-label.inactive {
  color: #FF453A;
  background: rgba(255, 69, 58, 0.1);
}

/* Form Panel Toggle Card */
.status-control-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  padding: 16px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

[data-theme="light"] .status-control-card {
  background: #FFF;
}

.status-card-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.status-card-title {
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--text1);
}

.status-card-subtitle {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  color: var(--text3);
}

/* ============================================================
   VERIFICATION ENGINE & SWITCHER STYLES
   ============================================================ */

/* ---- Auth Switcher Tabs ---- */
.auth-tabs {
  display: flex;
  width: 100%;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}

[data-theme="light"] .auth-tabs {
  border-color: var(--border);
}

.auth-tab-btn {
  flex: 1;
  background: none;
  border: none;
  color: var(--text3);
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 600;
  padding: 12px 0;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
}

.auth-tab-btn::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transition: transform var(--transition);
}

.auth-tab-btn.active {
  color: var(--text1);
}

.auth-tab-btn.active::after {
  transform: scaleX(1);
}

/* ---- Verification Modals & Box ---- */
.verify-modal {
  background: var(--bg3);
  border: 1px solid var(--border);
  padding: 30px;
  border-radius: var(--radius-lg);
  width: 480px;
  max-width: 90%;
  box-shadow: var(--shadow-lg);
  animation: modalSlideUp var(--transition);
}

[data-theme="light"] .verify-modal {
  background: #FFF;
}

.verify-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
}

.verify-modal-title {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--text1);
}

.verify-modal-sub {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: var(--text3);
  margin-top: 4px;
}

/* ---- Verification Result Container ---- */
.verify-result-box {
  margin-top: 24px;
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.01);
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: fadeIn 0.3s ease;
}

[data-theme="light"] .verify-result-box {
  border-color: rgba(0, 0, 0, 0.06);
  background: rgba(0, 0, 0, 0.01);
}

.verify-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 6px 12px;
  border-radius: 4px;
  align-self: flex-start;
  text-transform: uppercase;
}

.verify-status-badge.verified {
  background: rgba(48, 209, 88, 0.1);
  color: #30D158;
  border: 1px solid rgba(48, 209, 88, 0.2);
}

.verify-status-badge.revoked {
  background: rgba(255, 69, 58, 0.1);
  color: #FF453A;
  border: 1px solid rgba(255, 69, 58, 0.2);
}

.verify-status-badge.missing {
  background: rgba(255, 159, 10, 0.1);
  color: #FF9F0A;
  border: 1px solid rgba(255, 159, 10, 0.2);
}

.verify-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 8px;
}

[data-theme="light"] .verify-detail-row {
  border-color: rgba(0, 0, 0, 0.05);
}

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

.verify-detail-label {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.verify-detail-value {
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--text1);
}

.verify-revocation-msg {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: #FF453A;
  line-height: 1.5;
  background: rgba(255, 69, 58, 0.06);
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid rgba(255, 69, 58, 0.15);
}

/* ---- Interactive Signature Scale Controls ---- */
.sig-scale-interactive-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px;
  width: 100%;
  margin-top: 6px;
}

[data-theme="light"] .sig-scale-interactive-wrap {
  background: rgba(0, 0, 0, 0.02);
}

.sig-scale-btn {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text1);
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
}

[data-theme="light"] .sig-scale-btn {
  background: #FFF;
}

.sig-scale-btn:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: #141414;
}

.sig-scale-value-display {
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--gold);
}

/* Presets pill row */
.sig-scale-presets {
  display: flex;
  gap: 8px;
  width: 100%;
  margin-top: 8px;
}

.sig-scale-preset {
  flex: 1;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  color: var(--text3);
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  font-weight: 600;
  padding: 6px 0;
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}

[data-theme="light"] .sig-scale-preset {
  background: rgba(0, 0, 0, 0.02);
}

.sig-scale-preset:hover {
  border-color: var(--gold);
  color: var(--text1);
}

.sig-scale-preset.active {
  background: var(--gold);
  border-color: var(--gold);
  color: #141414;
  font-weight: 700;
}