/* ============================================================
   SEA DEAL by TARAGONA — Tools (gemeinsame Bausteine)
   Nutzt die Variablen aus app.css (nach app.css laden).
   ============================================================ */

/* ---------- Tool-Hub ---------- */
.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
  margin: 8px 0 40px;
}
.hub-card {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--card-solid, #17171b);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 20px;
  text-decoration: none; color: inherit;
  transition: border-color .2s, transform .15s, box-shadow .2s;
}
.hub-card:hover { border-color: var(--cyan); transform: translateY(-2px); box-shadow: 0 10px 30px -14px rgba(0,0,0,.6); }
.hub-card h3 { font-family: 'Space Grotesk', sans-serif; font-size: 1.12rem; margin: 0 0 6px; color: var(--text); }
.hub-card p { color: var(--muted); font-size: .9rem; line-height: 1.5; margin: 0; flex: 1; }
.hub-card .hub-foot { margin-top: 14px; display: flex; align-items: center; gap: 8px; }
.hub-badge {
  display: inline-block; font-size: .68rem; letter-spacing: 1px; text-transform: uppercase;
  font-weight: 700; padding: 3px 9px; border-radius: 20px;
}
.hub-badge.free { background: rgba(52,211,153,.14); color: #6ee7b7; }
.hub-badge.pro  { background: var(--grad); color: #1a1305; }
.hub-badge.soon { background: rgba(188,183,171,.16); color: var(--muted); }
.hub-badge.td   { background: rgba(232,194,90,.16); color: var(--cyan); border: 1px solid rgba(232,194,90,.45); }
/* Trade-Desk-Sektion im Hub: klar von den SEA-DEAL-Kategorien abgesetzt */
.hub-td-head h2 { color: var(--cyan); }
.hub-td-head { border-top: 2px solid rgba(232,194,90,.45); padding-top: 18px; }
.hub-td-sub { color: var(--muted); font-size: .82rem; margin: 4px 0 0; }
.hub-td-grid .hub-card { border-color: rgba(232,194,90,.4); }
.hub-card.disabled { opacity: .55; pointer-events: none; }

/* ---------- Tool-Formulare ---------- */
.tool-card {
  background: var(--card-solid, #17171b);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
  margin-bottom: 22px;
}
.tool-card h3 { font-family: 'Space Grotesk', sans-serif; font-size: 1.05rem; margin: 0 0 16px; color: var(--cyan); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: .76rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--border); background: rgba(255,255,255,.04);
  color: var(--text); font-family: inherit; font-size: .92rem;
  color-scheme: dark;
}
.field textarea { resize: vertical; min-height: 70px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--cyan); }
.field input::placeholder, .field textarea::placeholder { color: #7e7a70; }
.field.full { grid-column: 1 / -1; }
/* Auswahl-Menü plattformübergreifend dunkel + eigener Pfeil (Windows-Lesbarkeit) */
.field select {
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%23bcb7ab' stroke-width='1.6' d='M1 1.5L6 6.5 11 1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.field select option, .field select optgroup {
  background: #1c1c20; color: #f4f1ea;
}
.form-actions { margin-top: 16px; display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Tool-Tabelle ---------- */
.tool-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; min-width: 0; }
.tool-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tool-table th {
  text-align: left; padding: 11px 12px; font-size: .72rem; text-transform: uppercase;
  letter-spacing: .6px; color: var(--muted); border-bottom: 1px solid var(--border); white-space: nowrap;
}
.tool-table td { padding: 12px; border-bottom: 1px solid rgba(255,255,255,.05); vertical-align: middle; }
.tool-table tr:hover td { background: rgba(255,255,255,.02); }
.tool-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }
.icon-btn {
  border: 1px solid var(--border); background: transparent; color: var(--muted);
  border-radius: 8px; padding: 5px 10px; font-size: .8rem; cursor: pointer; transition: .15s;
}
.icon-btn:hover { color: var(--text); border-color: var(--cyan); }
.icon-btn.danger:hover { color: #fca5a5; border-color: #f87171; }

/* ---------- Status-Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .76rem; font-weight: 600; padding: 4px 11px; border-radius: 20px; white-space: nowrap;
}
.badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.ok    { background: rgba(52,211,153,.13); color: #6ee7b7; }
.badge.warn  { background: rgba(232,194,90,.15); color: var(--cyan); }
.badge.bad   { background: rgba(248,113,113,.13); color: #fca5a5; }
.badge.muted { background: rgba(188,183,171,.14); color: var(--muted); }
.badge.info  { background: rgba(124,150,200,.16); color: #a9bce6; }

/* ---------- Leerzustand ---------- */
.empty-state { text-align: center; color: var(--muted); padding: 40px 20px; font-size: .95rem; }

/* ---------- Mini-Statistik ---------- */
.stat-row { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.stat-chip {
  flex: 1; min-width: 130px; background: var(--card-solid, #17171b);
  border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px;
}
.stat-chip .v { font-family: 'Space Grotesk', sans-serif; font-size: 1.5rem; font-weight: 700; }
.stat-chip .l { color: var(--muted); font-size: .78rem; margin-top: 2px; }

/* ---------- Checklisten ---------- */
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li {
  display: flex; align-items: flex-start; gap: 12px; padding: 12px 4px;
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.checklist li:last-child { border-bottom: none; }
.checklist input[type="checkbox"] { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--cyan); flex: 0 0 auto; }
.checklist .ci-text { flex: 1; }
.checklist .ci-text b { display: block; font-weight: 600; color: var(--text); }
.checklist .ci-text span { color: var(--muted); font-size: .85rem; }
.checklist li.done .ci-text b { text-decoration: line-through; color: var(--muted); }
.cl-section { font-family: 'Space Grotesk', sans-serif; font-weight: 700; color: var(--cyan); margin: 22px 0 6px; font-size: .95rem; }
.progress-bar { height: 8px; background: rgba(255,255,255,.07); border-radius: 8px; overflow: hidden; margin: 4px 0 18px; }
.progress-bar > span { display: block; height: 100%; background: var(--grad); transition: width .3s; }

/* ============================================================
   Pro-Paywall
   ============================================================ */
#sd-pro {
  position: fixed; inset: 0; z-index: 1000;
  height: 100vh; height: 100dvh;
  background: rgba(8,8,10,.82); backdrop-filter: blur(7px);
  display: flex; align-items: center; justify-content: center;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: max(20px, env(safe-area-inset-top)) 20px
           max(28px, calc(env(safe-area-inset-bottom) + 24px));
}
.sd-pro-card {
  max-width: 440px; width: 100%; margin: auto; background: var(--bg2, #141417);
  border: 1px solid var(--border); border-radius: 18px; padding: 24px 26px;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.8); text-align: center;
}
.sd-pro-eyebrow { font-size: .7rem; letter-spacing: 2px; text-transform: uppercase; color: var(--cyan); font-weight: 700; }
.sd-pro-title { font-family: 'Space Grotesk', sans-serif; font-size: 1.35rem; font-weight: 700; margin: 5px 0 4px; line-height: 1.2; }
.sd-pro-sub { color: var(--muted); font-size: .86rem; line-height: 1.45; margin-bottom: 10px; }
.sd-pro-price { font-family: 'Space Grotesk', sans-serif; margin: 8px 0 2px; }
.sd-pro-price b { font-size: 1.8rem; }
.sd-pro-price span { color: var(--muted); font-size: .88rem; }
.sd-pro-feat { list-style: none; margin: 12px 0 14px; padding: 0; text-align: left; }
.sd-pro-feat li { display: flex; gap: 9px; padding: 3px 0; font-size: .86rem; color: var(--text); line-height: 1.35; }
.sd-pro-feat li::before { content: '✓'; color: #6ee7b7; font-weight: 800; flex: 0 0 auto; }
.sd-pro-feat-hl { color: #e8c25a; border-top: 1px solid rgba(232,194,90,.2); margin-top: 5px; padding-top: 8px !important; }
.sd-pro-btn {
  width: 100%; border: none; border-radius: 11px; padding: 13px; cursor: pointer;
  background: var(--grad); color: #1a1305; font-weight: 700; font-size: .98rem;
  font-family: 'Space Grotesk', sans-serif; transition: transform .15s, box-shadow .2s;
}
.sd-pro-btn:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -12px var(--cyan); }
.sd-pro-btn:disabled { opacity: .6; cursor: default; transform: none; }
.sd-pro-alt { margin-top: 12px; font-size: .82rem; color: var(--muted); line-height: 1.4; }
.sd-pro-alt a { color: var(--cyan); cursor: pointer; }
.sd-pro-msg { font-size: .85rem; margin-top: 10px; min-height: 1em; }
.sd-pro-msg.warn { color: #fca5a5; }
.sd-pro-msg.ok { color: #6ee7b7; }
.sd-pro-back { display: inline-block; margin-top: 16px; color: var(--muted); font-size: .85rem; }
.sd-pro-back-row {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px;
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border);
}
.sd-pro-back-row a {
  color: var(--cyan); font-size: .88rem; font-weight: 600; cursor: pointer;
  text-decoration: none;
}
.sd-pro-back-row a:hover { text-decoration: underline; }

@media (max-width: 560px) {
  .sd-pro-card { padding: 22px 18px 26px; }
  .sd-pro-back { margin-top: 24px; margin-bottom: 16px; }
  .form-actions, .action-bar { flex-direction: column; }
  .form-actions .btn, .action-bar .btn { width: 100%; }
}

/* ---------- Incoterm-Auswahl (gemeinsam, SD.incotermChips) ---------- */
.inco-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; }
.inco-chip {
  background: var(--bg2); border: 1px solid var(--border); color: var(--muted);
  font-family: 'Space Grotesk', sans-serif; font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.5px; padding: 6px 13px; border-radius: 999px; cursor: pointer;
  transition: all 0.18s;
}
.inco-chip:hover { border-color: var(--cyan); color: var(--text); }
.inco-chip.active { background: var(--grad); color: #1a1305; border-color: transparent; }
.inco-detail {
  background: var(--bg2); border: 1px solid var(--border); border-radius: 12px;
  padding: 13px 16px; font-size: 0.84rem; line-height: 1.55;
}
.inco-detail h4 { font-family: 'Space Grotesk', sans-serif; font-size: 0.92rem; margin: 0 0 8px; color: var(--cyan); }
.inco-detail .it-row { display: flex; gap: 8px; margin: 4px 0; }
.inco-detail .it-row .lab { color: var(--muted); min-width: 110px; flex-shrink: 0; }
.inco-detail .it-row .val { color: var(--text); }
.inco-detail .it-hint { margin-top: 9px; padding-top: 9px; border-top: 1px solid var(--border); color: var(--gold); font-size: 0.8rem; }
