:root {
  --bg: #0f172a;
  --bg-card: #1e293b;
  --bg-input: #0f172a;
  --border: #334155;
  --border-light: #475569;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --success: #22c55e;
  --success-bg: rgba(34, 197, 94, 0.1);
  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.1);
  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.1);
  --purple: #a855f7;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

code, .mono {
  font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 0.9em;
}

/* ==================== HEADER ==================== */
.header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 12px 24px;
  background: rgba(30, 41, 59, 0.95);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.brand__logo {
  font-size: 28px;
}

.brand__title {
  font-weight: 700;
  font-size: 16px;
}

.brand__sub {
  font-size: 11px;
  color: var(--text-muted);
}

.header__status {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.status-badge {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  background: var(--bg);
  border: 1px solid var(--border);
}

.status-badge.sandbox { border-color: var(--success); color: var(--success); }
.status-badge.live { border-color: var(--danger); color: var(--danger); }
.status-badge.ok { border-color: var(--success); color: var(--success); }
.status-badge.error { border-color: var(--danger); color: var(--danger); }

.tabs {
  display: flex;
  gap: 4px;
}

.tab {
  padding: 8px 14px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
}

.tab:hover {
  color: var(--text);
  background: rgba(255,255,255,0.05);
}

.tab.is-active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

/* ==================== CONTAINER ==================== */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

.panel { display: none; }
.panel.is-active { display: block; }

/* ==================== CARD ==================== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
}

.card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.card__header h2 {
  margin: 0;
  font-size: 20px;
}

/* ==================== INPUTS ==================== */
.input, .textarea, select {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.input:focus, .textarea:focus, select:focus {
  border-color: var(--accent);
}

.input--large {
  padding: 14px 18px;
  font-size: 16px;
}

.textarea {
  min-height: 120px;
  resize: vertical;
  font-family: inherit;
}

.textarea.mono {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
}

label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 500;
}

/* ==================== BUTTONS ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s;
}

.btn:hover {
  background: rgba(255,255,255,0.05);
  border-color: var(--border-light);
}

.btn--small {
  padding: 6px 12px;
  font-size: 12px;
}

.btn--large {
  padding: 14px 24px;
  font-size: 15px;
}

.btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.btn--primary:hover {
  background: var(--accent-hover);
}

.btn--success {
  background: var(--success);
  border-color: var(--success);
  color: white;
}

.btn--warning {
  background: var(--warning);
  border-color: var(--warning);
  color: #000;
}

.btn--danger {
  background: var(--danger);
  border-color: var(--danger);
  color: white;
}

.btn--ghost {
  background: transparent;
  border-color: transparent;
}

.btn--ghost:hover {
  background: rgba(255,255,255,0.05);
}

.btn-icon {
  padding: 4px 8px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
}

.btn-group {
  display: flex;
  gap: 8px;
}

/* ==================== FORM LAYOUT ==================== */
.form-row {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.form-group {
  flex: 1;
}

.form-group.flex-2 { flex: 2; }

/* ==================== PRODUCTS GRID ==================== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.product {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}

.product__title {
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 4px;
}

.product__desc {
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 12px;
}

.product .form-row {
  margin-bottom: 12px;
}

.product .btn-group {
  flex-wrap: wrap;
}

/* ==================== FLOW BOX ==================== */
.flowBox {
  background: var(--success-bg);
  border: 1px solid var(--success);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
}

.flowBox.hidden { display: none; }

.flowBox__header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.flowBox__icon { font-size: 20px; }
.flowBox__title { font-weight: 600; }

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

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

.kv {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  font-size: 13px;
}

.kv span:first-child { color: var(--text-muted); }

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

/* ==================== CONSOLE LAYOUT ==================== */
.console-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 20px;
}

@media (max-width: 1000px) {
  .console-layout { grid-template-columns: 1fr; }
}

.console-sidebar {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid var(--border);
  font-weight: 600;
}

.search-box {
  padding: 12px;
  border-bottom: 1px solid var(--border);
}

.search-box .input {
  background: var(--bg-card);
}

.method-list {
  max-height: 500px;
  overflow-y: auto;
}

.method-group {
  border-bottom: 1px solid var(--border);
}

.method-group__title {
  padding: 10px 16px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255,255,255,0.02);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.method-item {
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.2s;
}

.method-item:hover {
  background: rgba(59, 130, 246, 0.1);
}

.method-item__name {
  font-weight: 500;
  font-size: 13px;
}

.method-item__desc {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ==================== REQUEST/RESPONSE SECTIONS ==================== */
.console-main {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.section-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.request-section, .response-section {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}

.params-section {
  margin-top: 16px;
}

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

.params-table {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.param-row {
  display: grid;
  grid-template-columns: 1fr 2fr 40px;
  border-bottom: 1px solid var(--border);
}

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

.param-row input {
  border: none;
  border-radius: 0;
  background: transparent;
  border-right: 1px solid var(--border);
}

.param-row input:last-of-type { border-right: none; }

.param-row button {
  border: none;
  background: transparent;
  color: var(--danger);
  cursor: pointer;
  font-size: 16px;
}

.raw-nvp-section {
  margin-top: 16px;
}

.raw-nvp-section summary {
  cursor: pointer;
  color: var(--text-muted);
  font-size: 13px;
  padding: 8px 0;
}

.action-row {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.docs-link {
  display: inline-block;
  padding: 8px 0;
  font-size: 13px;
}

.method-desc {
  font-size: 13px;
  color: var(--text-muted);
  padding: 8px 0;
}

/* ==================== RESPONSE ==================== */
.response-meta {
  padding: 12px;
  background: var(--bg-card);
  border-radius: 8px;
  margin-bottom: 12px;
  font-size: 13px;
}

.response-meta.success { background: var(--success-bg); border: 1px solid var(--success); }
.response-meta.error { background: var(--danger-bg); border: 1px solid var(--danger); }

.response-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
}

.resp-tab {
  padding: 8px 16px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 13px;
  border-radius: 6px;
}

.resp-tab.is-active {
  background: var(--bg-card);
  color: var(--text);
}

.resp-content { display: none; }
.resp-content.is-active { display: block; }

.parsed-response {
  background: var(--bg-card);
  border-radius: 8px;
  padding: 12px;
  max-height: 400px;
  overflow: auto;
}

.parsed-item {
  display: flex;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.parsed-item:last-child { border-bottom: none; }

.parsed-key {
  color: var(--accent);
  min-width: 200px;
  font-family: monospace;
}

.parsed-value {
  color: var(--text);
  word-break: break-all;
  font-family: monospace;
}

/* ==================== TESTS ==================== */
.tests-warning {
  background: var(--warning-bg);
  border: 1px solid var(--warning);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 20px;
  font-size: 14px;
}

.tests-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 16px;
}

.test-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.test-card__header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid var(--border);
}

.test-card__icon {
  font-size: 24px;
}

.test-card__title {
  font-weight: 600;
  font-size: 14px;
}

.test-card__desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.test-card__body {
  padding: 16px;
}

.test-card__actions {
  margin-top: 12px;
}

.severity-badge {
  margin-left: auto;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

.severity--critical { background: var(--danger-bg); color: var(--danger); }
.severity--high { background: var(--warning-bg); color: var(--warning); }
.severity--medium { background: rgba(59, 130, 246, 0.1); color: var(--accent); }

.test-result {
  margin-top: 16px;
  padding: 12px;
  background: var(--bg-card);
  border-radius: 8px;
  font-size: 12px;
  font-family: monospace;
  white-space: pre-wrap;
  max-height: 300px;
  overflow: auto;
}

.test-result:empty { display: none; }

/* ==================== HISTORY ==================== */
.history-list {
  max-height: 600px;
  overflow-y: auto;
}

.history-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.history-item:hover {
  background: rgba(255,255,255,0.02);
}

.history-item__status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.history-item__status.success { background: var(--success); }
.history-item__status.failure { background: var(--danger); }

.history-item__method {
  font-weight: 600;
  min-width: 200px;
}

.history-item__time {
  color: var(--text-muted);
  font-size: 11px;
}

.history-item__elapsed {
  color: var(--text-muted);
  font-size: 11px;
  margin-left: auto;
}

/* ==================== SETTINGS ==================== */
.settings-warning {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 20px;
  font-size: 13px;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.settings-section {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}

.settings-section h3 {
  margin: 0 0 16px 0;
  font-size: 14px;
  color: var(--text-muted);
}

.toggle-group {
  display: flex;
  gap: 8px;
}

.toggle-btn {
  flex: 1;
  padding: 12px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
}

.toggle-btn.is-active {
  border-color: var(--accent);
  color: var(--text);
  background: rgba(59, 130, 246, 0.1);
}

.toggle-btn:hover:not(.is-active) {
  border-color: var(--border-light);
}

.settings-actions {
  display: flex;
  gap: 16px;
  margin-top: 24px;
}

.settings-status {
  margin-top: 16px;
  padding: 12px;
  border-radius: 8px;
  font-size: 13px;
}

.settings-status:empty { display: none; }
.settings-status.success { background: var(--success-bg); color: var(--success); }
.settings-status.error { background: var(--danger-bg); color: var(--danger); }

/* ==================== FOOTER ==================== */
.footer {
  padding: 20px;
  text-align: center;
  border-top: 1px solid var(--border);
  margin-top: 40px;
}

.footer__links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.footer__links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.2s;
}

.footer__links a:hover {
  color: var(--primary);
}

.footer__sep {
  color: var(--border);
  font-size: 12px;
}

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

/* ==================== SCROLLBAR ==================== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--border-light);
}

/* ==================== LOGIN ==================== */
/* ==================== LOGIN ==================== */
.login-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.login-overlay.hidden { display: none; }

.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.login-header {
  text-align: center;
  margin-bottom: 32px;
}

.login-logo {
  font-size: 48px;
  margin-bottom: 16px;
}

.login-header h1 {
  margin: 0 0 8px 0;
  font-size: 24px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.login-btn {
  margin-top: 8px;
  width: 100%;
  justify-content: center;
}

.login-error {
  color: var(--danger);
  font-size: 13px;
  text-align: center;
  min-height: 20px;
}

.login-footer {
  margin-top: 24px;
  text-align: center;
  font-size: 12px;
}

.main-app.hidden { display: none; }

/* ==================== USER BADGE ==================== */
.header__user {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: 16px;
  padding-left: 16px;
  border-left: 1px solid var(--border);
}

.user-badge {
  font-size: 12px;
  color: var(--text-muted);
}

/* ==================== STORE SELECTOR ==================== */
.store-selector {
  width: auto;
  min-width: 200px;
}

.store-selector-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-right: 8px;
}

.header__controls {
  display: flex;
  align-items: center;
}

/* ==================== STORE CARDS ==================== */
.stores-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.store-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  transition: border-color 0.2s;
}

.store-card.is-active {
  border-color: var(--success);
}

.store-card__header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.store-card__name {
  font-weight: 600;
  font-size: 15px;
}

.store-card__mode {
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

.store-card__mode.sandbox {
  background: var(--success-bg);
  color: var(--success);
}

.store-card__mode.live {
  background: var(--danger-bg);
  color: var(--danger);
}

.store-card__active {
  margin-left: auto;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  background: var(--success);
  color: #000;
}

.store-card__info {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.store-card__info > div {
  padding: 4px 0;
}

.store-card__actions {
  display: flex;
  gap: 8px;
}

/* ==================== STORE FORM ==================== */
.store-form {
  background: var(--bg);
  border: 1px solid var(--accent);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
}

.store-form.hidden { display: none; }

.store-form h3 {
  margin: 0 0 20px 0;
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.settings-divider {
  height: 1px;
  background: var(--border);
  margin: 32px 0;
}

.settings-info {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 20px;
  font-size: 13px;
}

/* ==================== SHOP STORE SELECTOR ==================== */
.store-selector-shop {
  max-width: 500px;
  margin: 0 auto;
  padding: 40px 20px;
  text-align: center;
}

.store-selector-shop h3 {
  margin-bottom: 16px;
}

.store-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

.store-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}

.store-option:hover {
  border-color: var(--accent);
  background: rgba(59, 130, 246, 0.05);
}

.store-option__name {
  font-weight: 600;
}

.store-option__mode {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

.store-option__mode.sandbox {
  background: var(--success-bg);
  color: var(--success);
}

.store-option__mode.live {
  background: var(--danger-bg);
  color: var(--danger);
}

/* ==================== PRODUCT CARDS (SHOP) ==================== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  padding: 20px 0;
}

.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 520px;
}

/* Product Type Badges */
.product-card__badge {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  z-index: 10;
}

.badge__icon {
  font-size: 14px;
}

.badge__label {
  flex: 1;
}

/* Badge Colors by Type */
.badge--express {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: white;
}

.badge--buynow {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
}

.badge--digital {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  color: white;
}

.badge--auth {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
}

.badge--subscription {
  background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
  color: white;
}

.badge--donation {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
}

.badge--default {
  background: linear-gradient(135deg, #64748b 0%, #475569 100%);
  color: white;
}

/* Hint text under product name */
.product-card__hint {
  font-size: 11px;
  color: var(--accent);
  margin-bottom: 8px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* API Version Selector */
.version-selector {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border: 1px solid #f59e0b;
  border-radius: 8px;
  margin-bottom: 16px;
}

.version-selector__row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.version-selector label {
  font-size: 12px;
  font-weight: 700;
  color: #f59e0b;
  white-space: nowrap;
}

.version-range {
  min-width: 140px;
  background: #0f172a;
  border-color: #475569;
  color: #94a3b8;
}

.version-select {
  min-width: 180px;
  background: #1e293b;
  border-color: #f59e0b;
  color: white;
}

.version-custom {
  width: 100px;
  background: #1e293b;
  border-color: #f59e0b;
  color: white;
  text-align: center;
}

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

.version-hint {
  font-size: 12px;
  color: #94a3b8;
}

.version-hint.danger {
  color: #ef4444;
  font-weight: 600;
}

.version-hint.warning {
  color: #f59e0b;
}

.version-status {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
}

.version-status.ok {
  background: #166534;
  color: #86efac;
}

.version-status.fail {
  background: #991b1b;
  color: #fca5a5;
}

.version-status.testing {
  background: #1e40af;
  color: #93c5fd;
}

.version-legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 8px;
  border-top: 1px solid #334155;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: #64748b;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.dot--red { background: #ef4444; }
.dot--yellow { background: #f59e0b; }
.dot--blue { background: #3b82f6; }
.dot--green { background: #22c55e; }
.dot--purple { background: #8b5cf6; }

.btn--sm {
  padding: 6px 10px;
  font-size: 12px;
}

.input--sm {
  padding: 6px 10px;
  font-size: 13px;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
  border-color: var(--accent);
}

.product-card__image {
  height: 160px;
  margin-top: 32px; /* Space for badge */
  background: linear-gradient(135deg, var(--bg) 0%, var(--surface) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-card__emoji {
  font-size: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-card__body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-card__name {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}

.product-card__desc {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 12px;
  line-height: 1.5;
  max-height: 60px;
  overflow: hidden;
  position: relative;
}

.product-card__desc.truncated::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 20px;
  background: linear-gradient(transparent, var(--surface));
}

.product-card__more {
  color: #60a5fa;
  font-size: 12px;
  cursor: pointer;
  margin-bottom: 12px;
  display: none;
}

.product-card__more:hover {
  text-decoration: underline;
}

.product-card__more.visible {
  display: block;
}

.product-card__spacer {
  flex: 1;
}

.product-card__footer {
  margin-top: auto;
}

.product-card__price {
  font-size: 24px;
  font-weight: 700;
  color: var(--success);
  margin-bottom: 16px;
}

.product-card__price .currency {
  font-size: 14px;
  font-weight: 500;
  opacity: 0.7;
  margin-right: 4px;
}

.product-card__price .period {
  font-size: 14px;
  font-weight: 400;
  opacity: 0.6;
}

.product-card__btn {
  width: 100%;
  padding: 14px;
  font-size: 16px;
  font-weight: 600;
}

.subscription-warning {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 1px solid #f59e0b;
  border-radius: 8px;
  padding: 10px 12px;
  margin: 12px 0;
  font-size: 11px;
  color: #92400e;
  line-height: 1.5;
}

.subscription-warning strong {
  color: #78350f;
}

.product-card__terms {
  margin: 12px 0;
  text-align: center;
}

.terms-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #94a3b8;
  cursor: pointer;
}

.terms-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #3b82f6;
  cursor: pointer;
}

.terms-checkbox a {
  color: #60a5fa;
  text-decoration: underline;
}

.product-card__msg {
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  min-height: 20px;
}

.empty-shop {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}

.empty-shop__icon {
  font-size: 64px;
  margin-bottom: 16px;
}

.empty-shop h3 {
  color: var(--text);
  margin-bottom: 8px;
}

/* ==================== PRODUCT MANAGEMENT ==================== */
.product-form {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}

.product-form h3 {
  margin-bottom: 20px;
  color: var(--accent);
}

.products-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.product-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: all 0.2s;
}

.product-item:hover {
  border-color: var(--accent);
}

.product-item__icon {
  font-size: 32px;
  width: 50px;
  text-align: center;
}

.product-item__info {
  flex: 1;
}

.product-item__name {
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 4px;
}

.product-item__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}

.product-item__meta .price {
  font-weight: 600;
  color: var(--success);
}

.product-item__actions {
  display: flex;
  gap: 8px;
}

.badge--express { background: var(--accent); color: white; }
.badge--authorization { background: #f59e0b; color: white; }
.badge--subscription { background: #8b5cf6; color: white; }
.badge--digital { background: #06b6d4; color: white; }
.badge--donation { background: #ec4899; color: white; }

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

.empty-state__icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.btn--danger {
  background: var(--danger);
  color: white;
}

.btn--danger:hover {
  background: #dc2626;
}

/* ==================== CHECKOUT RESULT ==================== */
.checkout-result {
  max-width: 600px;
  margin: 40px auto;
  padding: 40px;
  text-align: center;
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.1);
}

.checkout-result__icon {
  font-size: 64px;
  margin-bottom: 20px;
}

.checkout-result h2 {
  font-size: 28px;
  margin-bottom: 16px;
  color: #1a1a2e;
}

.checkout-result p {
  color: #666;
  margin-bottom: 8px;
}

.checkout-result--success {
  border-top: 4px solid #22c55e;
}

.checkout-result--success h2 {
  color: #16a34a;
}

.checkout-result--auth {
  border-top: 4px solid #8b5cf6;
}

.checkout-result--auth h2 {
  color: #7c3aed;
}

.checkout-result__auth-info {
  background: linear-gradient(135deg, #f3e8ff 0%, #ede9fe 100%);
  border-radius: 12px;
  padding: 20px;
  margin: 24px 0;
  text-align: left;
}

.checkout-result__auth-info h3 {
  color: #7c3aed;
  margin-bottom: 12px;
  font-size: 16px;
}

.checkout-result__auth-info ul {
  margin: 0 0 12px 20px;
}

.checkout-result__auth-info li {
  color: #6b7280;
  margin-bottom: 8px;
}

.checkout-result--cancelled {
  border-top: 4px solid #f59e0b;
}

.checkout-result--error {
  border-top: 4px solid #ef4444;
}

.checkout-result--error h2 {
  color: #dc2626;
}

.checkout-result--processing {
  border-top: 4px solid #3b82f6;
}

.checkout-result__spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #e5e7eb;
  border-top-color: #3b82f6;
  border-radius: 50%;
  margin: 0 auto 20px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.checkout-result__details {
  background: #f8fafc;
  border-radius: 8px;
  padding: 20px;
  margin: 24px 0;
  text-align: left;
}

.checkout-result__details p {
  margin: 8px 0;
  color: #374151;
}

.checkout-result__details code {
  background: #e5e7eb;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
}

.checkout-result__delivery {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border-radius: 12px;
  padding: 24px;
  margin: 24px 0;
}

.checkout-result__delivery-icon {
  font-size: 32px;
  margin-bottom: 12px;
}

.checkout-result__delivery h3 {
  color: #059669;
  margin-bottom: 12px;
}

.checkout-result__delivery--warning {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
}

.checkout-result__delivery--warning h3 {
  color: #d97706;
}

.checkout-result__actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 24px;
  flex-wrap: wrap;
}

.checkout-result__actions .btn {
  min-width: 160px;
}

/* ==================== TYPE OPTIONS (Product Settings) ==================== */
.type-options {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 20px;
  margin: 16px 0;
}

.options-header {
  font-size: 16px;
  font-weight: 600;
  color: #f1f5f9;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #334155;
}

.type-options .form-row {
  margin-bottom: 12px;
}

.type-options .form-group label .hint {
  font-weight: 400;
  color: #94a3b8;
  font-size: 11px;
}

.param-desc {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 16px;
  color: #94a3b8;
  font-size: 13px;
  line-height: 1.6;
  margin-top: 12px;
}

.param-desc strong {
  color: #f1f5f9;
}

.param-desc code {
  background: #1e293b;
  color: #60a5fa;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
}

.trial-section {
  background: #0f172a;
  border: 1px dashed #475569;
  border-radius: 8px;
  padding: 16px;
  margin-top: 12px;
}

.form-group.full-width {
  flex: 1 1 100%;
}

.form-group input[type="checkbox"] {
  width: auto;
  margin-right: 8px;
  accent-color: #3b82f6;
}

/* ==================== PRODUCT MODAL ==================== */
.product-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  padding: 20px;
}

.product-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.product-modal {
  background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
  border: 1px solid #334155;
  border-radius: 20px;
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s ease;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255,255,255,0.05);
  position: relative;
  display: flex;
  flex-direction: column;
}

.product-modal-overlay.active .product-modal {
  transform: scale(1) translateY(0);
}

.product-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid #475569;
  font-size: 20px;
  cursor: pointer;
  color: #94a3b8;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all 0.2s ease;
}

.product-modal__close:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #ef4444;
}

.product-modal__image {
  position: relative;
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-modal__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-modal__image-fallback {
  display: none;
  font-size: 80px;
  opacity: 0.7;
}

.product-modal__badge {
  position: absolute;
  bottom: 16px;
  left: 16px;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.product-modal__content {
  padding: 24px;
  flex: 1;
  overflow-y: auto;
}

.product-modal__title {
  font-size: 22px;
  font-weight: 700;
  color: #f8fafc;
  margin: 0 0 16px 0;
  line-height: 1.3;
}

.product-modal__price-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 20px;
}

.product-modal__price {
  font-size: 32px;
  font-weight: 800;
  color: #22c55e;
}

.product-modal__period {
  font-size: 16px;
  font-weight: 500;
  color: #64748b;
}

.product-modal__divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, #334155, transparent);
  margin: 20px 0;
}

.product-modal__desc-section {
  margin-bottom: 20px;
}

.product-modal__desc-title {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0 0 12px 0;
}

.product-modal__desc {
  font-size: 15px;
  line-height: 1.8;
  color: #cbd5e1;
  margin: 0;
  white-space: pre-wrap;
}

.product-modal__warning {
  display: flex;
  gap: 12px;
  padding: 16px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 12px;
  margin-top: 16px;
}

.product-modal__warning-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.product-modal__warning-text {
  font-size: 13px;
  line-height: 1.6;
  color: #fbbf24;
}

.product-modal__info {
  display: flex;
  gap: 12px;
  padding: 16px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 12px;
  margin-top: 16px;
}

.product-modal__info-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.product-modal__info-text {
  font-size: 13px;
  line-height: 1.6;
  color: #60a5fa;
}

.product-modal__footer {
  padding: 20px 24px;
  border-top: 1px solid #1e293b;
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  gap: 12px;
}

.product-modal__footer .btn {
  flex: 1;
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 600;
}

.product-modal__footer .btn--lg {
  padding: 16px 24px;
}

.product-modal__footer .btn-icon {
  margin-right: 8px;
}

.btn--secondary {
  background: transparent;
  border: 1px solid #475569;
  color: #94a3b8;
}

.btn--secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: #64748b;
  color: #f8fafc;
}

/* ==================== SHOP STORE SWITCHER ==================== */
.shop-store-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  padding-left: 16px;
}

.shop-store-switcher label {
  font-size: 13px;
  color: #94a3b8;
  white-space: nowrap;
}

.shop-store-switcher select {
  min-width: 200px;
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid #334155;
}

/* ==================== AMT MISMATCH TEST ==================== */
.danger-box {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.danger-box strong {
  color: #f87171;
}

/* Badge danger for AMT Mismatch */
.badge--danger {
  background: linear-gradient(135deg, #dc2626, #991b1b);
  animation: pulse-danger 2s ease-in-out infinite;
}

/* Attack result styling */
.checkout-result--attack {
  border: 2px solid #dc2626;
  background: linear-gradient(135deg, rgba(30, 20, 20, 0.95), rgba(40, 20, 20, 0.95));
}

.checkout-result__attack-details {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 12px;
  padding: 20px;
}

.attack-comparison {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 16px;
}

.attack-amount {
  text-align: center;
  padding: 12px 20px;
  border-radius: 8px;
}

.attack-amount .label {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
  opacity: 0.7;
}

.attack-amount .value {
  font-size: 24px;
  font-weight: 700;
  font-family: 'SF Mono', Monaco, monospace;
}

.attack-amount--display {
  background: rgba(134, 239, 172, 0.15);
  border: 1px solid rgba(134, 239, 172, 0.3);
}

.attack-amount--display .value {
  color: #86efac;
  text-decoration: line-through;
}

.attack-amount--charged {
  background: rgba(248, 113, 113, 0.2);
  border: 1px solid rgba(248, 113, 113, 0.4);
}

.attack-amount--charged .value {
  color: #f87171;
  font-size: 28px;
  animation: pulse-danger 2s ease-in-out infinite;
}

.attack-arrow {
  font-size: 32px;
  color: #fbbf24;
}

.attack-multiplier {
  text-align: center;
  font-size: 16px;
  color: #fbbf24;
  margin-bottom: 12px;
}

.attack-multiplier strong {
  font-size: 20px;
  color: #f87171;
}

.attack-warning {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.5);
  border-radius: 8px;
  padding: 12px 16px;
  margin-top: 12px;
  color: #fca5a5;
  text-align: center;
  animation: pulse-danger 3s ease-in-out infinite;
}

.multiplier-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(220, 38, 38, 0.3));
  border: 2px solid rgba(239, 68, 68, 0.5);
  border-radius: 12px;
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 18px;
}

.multiplier-preview .display-amt {
  color: #86efac;
  font-weight: 600;
  padding: 4px 12px;
  background: rgba(134, 239, 172, 0.1);
  border-radius: 6px;
}

.multiplier-preview .real-amt {
  color: #f87171;
  font-weight: 700;
  font-size: 22px;
  padding: 4px 12px;
  background: rgba(248, 113, 113, 0.2);
  border-radius: 6px;
  animation: pulse-danger 2s ease-in-out infinite;
}

.multiplier-preview .multiplier {
  color: #fbbf24;
  font-size: 14px;
  font-weight: 600;
  padding: 4px 8px;
  background: rgba(251, 191, 36, 0.2);
  border-radius: 6px;
}

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

small.danger {
  color: #f87171 !important;
  font-weight: 600;
}

/* AMT Mismatch Product Card */
.product-card--amt-mismatch {
  border: 2px solid rgba(239, 68, 68, 0.5);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 20, 20, 0.95));
  position: relative;
  overflow: hidden;
}

.product-card--amt-mismatch::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 10px,
    rgba(239, 68, 68, 0.03) 10px,
    rgba(239, 68, 68, 0.03) 20px
  );
  pointer-events: none;
}

.product-badge--danger {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  color: white;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  animation: pulse-danger 2s ease-in-out infinite;
}

.amt-comparison {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  font-size: 13px;
}

.amt-comparison__show {
  color: #86efac;
  text-decoration: line-through;
  opacity: 0.7;
}

.amt-comparison__real {
  color: #f87171;
  font-weight: 700;
  font-size: 16px;
}

.amt-comparison__arrow {
  color: #fbbf24;
}

/* AMT Mismatch Controls - Editable on card */
.amt-mismatch-controls {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 8px;
  padding: 12px;
  margin: 10px 0;
}

.amt-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.amt-row label {
  font-size: 12px;
  color: #94a3b8;
  min-width: 100px;
}

.amt-input {
  width: 80px;
  padding: 6px 8px;
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.3);
  color: #f8fafc;
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 14px;
}

.amt-input:focus {
  border-color: #f87171;
  outline: none;
  box-shadow: 0 0 0 2px rgba(248, 113, 113, 0.2);
}

.amt-currency-select {
  padding: 6px 8px;
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.3);
  color: #f8fafc;
  font-size: 12px;
  cursor: pointer;
}

.amt-currency-select:focus {
  border-color: #f87171;
  outline: none;
}

.amt-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid rgba(239, 68, 68, 0.2);
  margin-top: 8px;
}

.amt-preview__text {
  font-size: 13px;
  color: #94a3b8;
}

.amt-preview__text .preview-display {
  color: #86efac;
  text-decoration: line-through;
}

.amt-preview__text .preview-real {
  color: #f87171;
}

.amt-preview__multiplier {
  font-size: 14px;
  font-weight: 700;
  color: #fbbf24;
}

/* AMT Mismatch Confirmation Popup */
.amt-confirm-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(4px);
}

.amt-confirm-popup {
  background: linear-gradient(135deg, #1e1b2e, #2d1f3d);
  border: 2px solid #dc2626;
  border-radius: 16px;
  padding: 32px;
  max-width: 500px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(220, 38, 38, 0.3);
  animation: popup-enter 0.3s ease-out;
}

@keyframes popup-enter {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.amt-confirm-popup h2 {
  color: #f87171;
  font-size: 24px;
  margin-bottom: 8px;
}

.amt-confirm-popup .subtitle {
  color: #94a3b8;
  font-size: 14px;
  margin-bottom: 24px;
}

.amt-confirm-details {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
}

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

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

.amt-confirm-row .label {
  color: #94a3b8;
  font-size: 14px;
}

.amt-confirm-row .value {
  font-family: 'SF Mono', Monaco, monospace;
  font-weight: 600;
}

.amt-confirm-row .value.green {
  color: #86efac;
}

.amt-confirm-row .value.red {
  color: #f87171;
  font-size: 18px;
}

.amt-confirm-row .value.yellow {
  color: #fbbf24;
}

.amt-confirm-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.btn--send-attack {
  background: linear-gradient(135deg, #dc2626, #991b1b);
  color: white;
  padding: 14px 32px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn--send-attack:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 20px rgba(220, 38, 38, 0.4);
}

.btn--cancel-attack {
  background: transparent;
  border: 1px solid #475569;
  color: #94a3b8;
  padding: 14px 24px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn--cancel-attack:hover {
  border-color: #64748b;
  color: #f8fafc;
}

/* AMT Result Popup */
.amt-result-popup {
  background: linear-gradient(135deg, #1e1b2e, #2d1f3d);
  border: 2px solid #22c55e;
  border-radius: 16px;
  padding: 32px;
  max-width: 550px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(34, 197, 94, 0.2);
  animation: popup-enter 0.3s ease-out;
}

.amt-result-popup.error {
  border-color: #dc2626;
  box-shadow: 0 20px 60px rgba(220, 38, 38, 0.2);
}

.amt-result-popup h2.success {
  color: #22c55e;
}

.amt-result-popup h2.error {
  color: #f87171;
}

.amt-result-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 20px 0;
}

.amt-result-stat {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  padding: 16px;
}

.amt-result-stat .label {
  font-size: 12px;
  color: #94a3b8;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.amt-result-stat .value {
  font-size: 24px;
  font-weight: 700;
  font-family: 'SF Mono', Monaco, monospace;
}

.btn--retry {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin: 8px;
  transition: all 0.2s;
}

.btn--retry:hover {
  transform: scale(1.05);
}

.btn--close {
  background: transparent;
  border: 1px solid #475569;
  color: #94a3b8;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  margin: 8px;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
  .header {
    flex-wrap: wrap;
    gap: 12px;
  }
  
  .header__status {
    order: 3;
    width: 100%;
  }
  
  .header__user {
    order: 4;
    width: 100%;
    border-left: none;
    padding-left: 0;
    margin-left: 0;
    justify-content: space-between;
  }
  
  .tabs {
    flex-wrap: wrap;
  }
  
  .flowBox__grid {
    grid-template-columns: 1fr;
  }
  
  .tests-grid {
    grid-template-columns: 1fr;
  }
  
  .form-row {
    flex-direction: column;
  }
  
  .login-card {
    margin: 20px;
    padding: 24px;
  }
}
