/* ════════════════════════════════════════════════════════
   ASCII Tabelle — Styles
   Akzentfarbe: #004D40 (Dark Teal)
════════════════════════════════════════════════════════ */

:root {
  --asc-accent:   #004D40;
  --asc-accent-m: #00695C;
  --asc-accent-l: #E0F2F1;
  --asc-text:     #1E293B;
  --asc-muted:    #64748B;
  --asc-border:   #E2E8F0;
  --asc-bg:       #F8FAFC;
  --asc-radius:   10px;

  /* Kategorie-Farben */
  --ctrl-bg:    #FFF8E1;
  --ctrl-color: #E65100;
  --print-bg:   #E8F5E9;
  --print-color:#2E7D32;
  --ext-bg:     #EDE7F6;
  --ext-color:  #6A1B9A;
}

/* ── Layout ──────────────────────────────────────────── */
.asc-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  max-width: 1400px;
  margin: 0 auto;
}

/* ── Header ──────────────────────────────────────────── */
.asc-header {
  display: flex;
  align-items: center;
  gap: 16px;
}
.asc-header-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--asc-accent-l);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--asc-accent);
  flex-shrink: 0;
}
.asc-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--asc-text);
  margin: 0;
}
.asc-subtitle {
  font-size: 13px;
  color: var(--asc-muted);
  margin: 2px 0 0;
}

/* ── Toolbar ─────────────────────────────────────────── */
.asc-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

/* Suchfeld */
.asc-search-wrap {
  position: relative;
  flex: 0 0 320px;
}
.asc-search-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--asc-muted);
  font-size: 13px;
  pointer-events: none;
}
.asc-search {
  width: 100%;
  padding: 8px 32px 8px 32px;
  border: 1.5px solid var(--asc-border);
  border-radius: 8px;
  font-size: 13px;
  color: var(--asc-text);
  background: white;
  outline: none;
  transition: border-color .15s;
}
.asc-search:focus { border-color: var(--asc-accent); }
.asc-search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--asc-muted);
  cursor: pointer;
  padding: 2px 4px;
  font-size: 12px;
  display: none;
}
.asc-search-clear.visible { display: block; }

/* Filter */
.asc-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.asc-filter {
  padding: 6px 14px;
  border: 1.5px solid var(--asc-border);
  border-radius: 20px;
  background: white;
  font-size: 12px;
  font-weight: 500;
  color: var(--asc-muted);
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}
.asc-filter:hover { border-color: var(--asc-accent); color: var(--asc-accent); }
.asc-filter.active {
  border-color: var(--asc-accent);
  background: var(--asc-accent-l);
  color: var(--asc-accent);
  font-weight: 600;
}

/* Hex-Format */
.asc-fmt-group {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
}
.asc-fmt-label {
  font-size: 12px;
  color: var(--asc-muted);
  white-space: nowrap;
}
.asc-fmt {
  padding: 5px 10px;
  border: 1.5px solid var(--asc-border);
  border-radius: 6px;
  background: white;
  font-size: 12px;
  font-weight: 600;
  font-family: monospace;
  color: var(--asc-muted);
  cursor: pointer;
  transition: all .15s;
}
.asc-fmt:hover { border-color: var(--asc-accent); color: var(--asc-accent); }
.asc-fmt.active {
  border-color: var(--asc-accent);
  background: var(--asc-accent-l);
  color: var(--asc-accent);
}

/* ── Info-Leiste ─────────────────────────────────────── */
.asc-info-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--asc-muted);
}
.asc-info-sep { opacity: .4; }
.asc-info-hint { display: flex; align-items: center; gap: 5px; }

/* ── Tabellen-Wrapper ────────────────────────────────── */
.asc-table-wrap {
  background: white;
  border: 1px solid var(--asc-border);
  border-radius: var(--asc-radius);
  overflow-x: auto;
}
.asc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.asc-table thead tr {
  background: var(--asc-bg);
  border-bottom: 2px solid var(--asc-border);
}
.asc-table th {
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--asc-muted);
  text-align: left;
  white-space: nowrap;
}
.asc-table td {
  padding: 7px 14px;
  border-bottom: 1px solid var(--asc-border);
  color: var(--asc-text);
  vertical-align: middle;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 12px;
}
.asc-table tr:last-child td { border-bottom: none; }
.asc-table tbody tr {
  cursor: pointer;
  transition: background .1s;
}
.asc-table tbody tr:hover { filter: brightness(0.97); }

/* Kategorie-Zeilen-Farben */
.asc-row-ctrl  { background: var(--ctrl-bg); }
.asc-row-print { background: var(--print-bg); }
.asc-row-ext   { background: var(--ext-bg); }

/* Spaltenbreiten */
.col-dez  { width: 55px;  }
.col-hex  { width: 65px;  }
.col-oct  { width: 60px;  }
.col-bin  { width: 100px; }
.col-char { width: 70px; text-align: center; }
.col-s7   { width: 130px; }
.col-desc { font-family: system-ui, sans-serif; font-size: 12px; }

/* Zeichen-Anzeige */
.asc-char-display {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  min-height: 24px;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 600;
}
.asc-char-ctrl  { background: #FFE0B2; color: var(--ctrl-color); font-size: 10px; font-family: system-ui; }
.asc-char-print { background: #C8E6C9; color: var(--print-color); }
.asc-char-ext   { background: #D1C4E9; color: var(--ext-color); }

/* S7-Notation */
.asc-s7 {
  color: #1565C0;
  font-size: 12px;
}

/* ── Leer ────────────────────────────────────────────── */
.asc-empty {
  padding: 32px;
  text-align: center;
  color: var(--asc-muted);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* ── Notiz-Karten ────────────────────────────────────── */
.asc-notes { }
.asc-note-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
@media (max-width: 900px) {
  .asc-note-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .asc-note-grid { grid-template-columns: 1fr; }
}
.asc-note-card {
  background: white;
  border: 1px solid var(--asc-border);
  border-radius: var(--asc-radius);
  padding: 14px 16px;
  font-size: 12px;
  color: var(--asc-muted);
  line-height: 1.7;
}
.asc-note-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--asc-accent);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.asc-note-card code {
  background: var(--asc-accent-l);
  color: var(--asc-accent);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 11px;
  font-family: monospace;
}
.asc-muted { color: var(--asc-muted); font-size: 11px; }

/* ── Toast ───────────────────────────────────────────── */
.asc-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1E293B;
  color: white;
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 9999;
}
.asc-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

mark {
  background: #FFF59D;
  color: inherit;
  border-radius: 2px;
  padding: 0 1px;
}
