/* ==========================================================================
   AFS-QRCODE ProGenerator
   Stylesheet im AFS-Tools-Design (analog AFS-JSON Tools)
   ========================================================================== */

:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f7;
    --bg-tertiary: #e8e8ed;
    --bg-input: #ffffff;
    --text-primary: #1d1d1f;
    --text-secondary: #6e6e73;
    --text-tertiary: #86868b;
    --border: #d2d2d7;
    --border-focus: #0071e3;
    --accent: #0071e3;
    --accent-hover: #0077ed;
    --accent-active: #006edb;
    --success: #34c759;
    --success-bg: #f0faf3;
    --error: #ff3b30;
    --error-bg: #fef2f1;
    --warning: #ff9500;
    --warning-bg: #fff8f0;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', 'Cascadia Code', Consolas, monospace;
    --transition: 0.2s ease;
    --checker-a: #ffffff;
    --checker-b: #ececf0;
}

[data-theme="dark"] {
    --bg-primary: #1c1c1e;
    --bg-secondary: #2c2c2e;
    --bg-tertiary: #3a3a3c;
    --bg-input: #2c2c2e;
    --text-primary: #f5f5f7;
    --text-secondary: #a1a1a6;
    --text-tertiary: #86868b;
    --border: #48484a;
    --border-focus: #0a84ff;
    --accent: #0a84ff;
    --accent-hover: #409cff;
    --accent-active: #0077ed;
    --success: #30d158;
    --success-bg: #1a2e1f;
    --error: #ff453a;
    --error-bg: #2e1a19;
    --warning: #ff9f0a;
    --warning-bg: #2e2519;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.2);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.3);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.4);
    --checker-a: #3a3a3c;
    --checker-b: #2c2c2e;
}

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

[hidden] { display: none !important; }

body {
    font-family: var(--font);
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: background var(--transition), color var(--transition);
    min-height: 100vh;
    line-height: 1.5;
}

/* ---------- Header ---------- */
header {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 18px;
    font-weight: 500;
    letter-spacing: -0.3px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    overflow: hidden;
}

.logo strong { font-weight: 700; }
.logo-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.logo-icon {
    width: 28px;
    height: 28px;
    background: var(--accent);
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.header-tools {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.lang-select {
    width: auto;
    padding: 7px 30px 7px 10px;
    font-size: 13px;
    background-position: right 9px center;
}

.theme-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-tertiary);
    border-radius: 20px;
    padding: 4px;
    border: none;
}

.theme-option {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all var(--transition);
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--text-secondary);
}

.theme-option.active {
    background: var(--bg-primary);
    box-shadow: var(--shadow-sm);
    color: var(--text-primary);
}

/* ---------- Main / Tabs ---------- */
main {
    max-width: 1280px;
    margin: 0 auto;
    padding: 28px 24px;
}

.tabs {
    display: flex;
    gap: 2px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    padding: 3px;
    margin-bottom: 20px;
}

.tab {
    flex: 1;
    padding: 8px 16px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    font-family: var(--font);
    cursor: pointer;
    border-radius: 6px;
    transition: all var(--transition);
    text-align: center;
}

.tab.active {
    background: var(--bg-primary);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

.tab:hover:not(.active) { color: var(--text-primary); }

.tab-badge {
    display: inline-block;
    min-width: 18px;
    padding: 0 5px;
    margin-left: 4px;
    border-radius: 9px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 11px;
    line-height: 18px;
    vertical-align: 1px;
}

.tab.active .tab-badge { background: var(--accent); color: #fff; }

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

/* ---------- Layout ---------- */
.layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 400px;
    gap: 24px;
    align-items: start;
}

.col-main { min-width: 0; }
.col-side { position: sticky; top: 80px; }

/* ---------- Card ---------- */
.card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    padding: 24px;
    margin-bottom: 24px;
    transition: background var(--transition), border-color var(--transition);
}

.card-title {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 16px;
    letter-spacing: -0.2px;
}

.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.card-head .card-title { margin-bottom: 0; }

.head-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

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

/* ---------- Typ-Auswahl ---------- */
.type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}

.type-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 14px 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    color: var(--text-secondary);
    font-family: var(--font);
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    text-align: center;
    line-height: 1.25;
}

.type-tile .ico { font-size: 22px; line-height: 1; }

.type-tile:hover {
    border-color: var(--accent);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.type-tile.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    box-shadow: var(--shadow-md);
}

/* ---------- Formular ---------- */
#dataForm {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field.wide { grid-column: 1 / -1; }

.field label,
.opt > label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.req { color: var(--error); }

.hint { font-size: 11px; color: var(--text-tertiary); }

.input {
    width: 100%;
    padding: 10px 12px;
    font-family: var(--font);
    font-size: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    color: var(--text-primary);
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.input:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.15);
}

textarea.input {
    min-height: 110px;
    resize: vertical;
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.6;
}

select.input {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='%2386868b' d='M1 1.5 6 6.5 11 1.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 11px;
    padding-right: 32px;
    cursor: pointer;
}

.input-search { min-width: 200px; padding: 7px 12px; font-size: 13px; }

.check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-primary);
    cursor: pointer;
    user-select: none;
}

.check input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }

input[type="range"] {
    width: 100%;
    accent-color: var(--accent);
    cursor: pointer;
}

.val { color: var(--text-primary); font-variant-numeric: tabular-nums; font-weight: 600; }

/* ---------- Design-Optionen ---------- */
.opt-section { margin-bottom: 18px; }
.opt-section-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.preset-row { display: flex; flex-wrap: wrap; gap: 8px; }

.preset {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    border: 1px solid var(--border);
    cursor: pointer;
    padding: 0;
    transition: transform var(--transition), box-shadow var(--transition);
}

.preset:hover { transform: scale(1.1); box-shadow: var(--shadow-md); }

.opt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 14px;
}

.opt { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.opt-check { justify-content: flex-end; padding-bottom: 9px; }

.color-field { display: flex; gap: 8px; align-items: center; }

input[type="color"] {
    width: 42px;
    height: 38px;
    padding: 2px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    cursor: pointer;
    flex-shrink: 0;
}

.input-hex { font-family: var(--font-mono); font-size: 12.5px; text-transform: uppercase; }

/* ---------- Logo-Upload ---------- */
.logo-drop {
    border: 2px dashed var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    margin-bottom: 16px;
}

.logo-drop:hover, .logo-drop.dragover {
    border-color: var(--accent);
    background: var(--bg-secondary);
}

.logo-drop-inner { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.logo-drop-icon { font-size: 26px; }

.logo-preview { display: flex; align-items: center; gap: 16px; text-align: left; }

.logo-preview img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 6px;
    flex-shrink: 0;
}

.logo-meta { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; min-width: 0; }
.logo-name { font-size: 13px; font-weight: 500; word-break: break-all; }

/* ---------- Vorschau ---------- */
.card-preview { padding: 20px; }

.preview-stage { display: flex; justify-content: center; margin-bottom: 14px; }

.preview-box {
    width: 100%;
    max-width: 320px;
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 8px;
}

.checker {
    background-image:
        linear-gradient(45deg, var(--checker-b) 25%, transparent 25%),
        linear-gradient(-45deg, var(--checker-b) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, var(--checker-b) 75%),
        linear-gradient(-45deg, transparent 75%, var(--checker-b) 75%);
    background-size: 16px 16px;
    background-position: 0 0, 0 8px, 8px -8px, -8px 0;
    background-color: var(--checker-a);
}

.preview-box svg { width: 100%; height: 100%; display: block; }

.preview-empty {
    color: var(--text-tertiary);
    font-size: 13px;
    text-align: center;
    padding: 20px;
}

.qr-info {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin-bottom: 16px;
    min-height: 22px;
}

.chip {
    font-size: 11px;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}

.chip.warn { background: var(--warning-bg); color: var(--warning); }

/* ---------- Lesbarkeitspruefung ---------- */
.scan-check {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    margin-bottom: 16px;
    font-size: 12.5px;
    animation: fadeIn 0.25s ease;
}

.scan-check.ok { border-color: var(--success); background: var(--success-bg); }
.scan-check.warn { border-color: var(--warning); background: var(--warning-bg); }
.scan-check.fail { border-color: var(--error); background: var(--error-bg); }

.sc-head { display: flex; align-items: center; gap: 8px; font-weight: 600; }

.sc-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--text-tertiary);
    flex-shrink: 0;
}

.scan-check.ok .sc-dot { background: var(--success); }
.scan-check.warn .sc-dot { background: var(--warning); }
.scan-check.fail .sc-dot { background: var(--error); }
.scan-check.checking .sc-dot { animation: pulse 1s ease-in-out infinite; }

.scan-check.ok .sc-title { color: var(--success); }
.scan-check.warn .sc-title { color: var(--warning); }
.scan-check.fail .sc-title { color: var(--error); }
.scan-check.checking .sc-title { color: var(--text-secondary); }

.sc-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.sc-list:empty { display: none; }

.sc-list li {
    display: flex;
    gap: 7px;
    align-items: flex-start;
    color: var(--text-secondary);
    line-height: 1.4;
}

.sc-list li::before { content: '\2022'; color: var(--text-tertiary); flex-shrink: 0; }
.sc-list li.bad::before { content: '\2717'; color: var(--error); }
.sc-list li.warn::before { content: '\26A0'; color: var(--warning); }
.sc-list li.good::before { content: '\2713'; color: var(--success); }

.sc-fix { margin-top: 10px; }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

.dl-section { border-top: 1px solid var(--border); padding-top: 16px; }

.dl-fallback {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
    padding: 10px 12px;
    border: 1px solid var(--warning);
    background: var(--warning-bg);
    border-radius: var(--radius-sm);
}

.dl-fallback .muted { color: var(--warning); flex: 1; min-width: 120px; }
.dl-fallback a { text-decoration: none; }

.dl-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 14px;
}

.dl-grid .btn { padding: 10px 8px; font-size: 13px; justify-content: center; }

.dl-note { margin-top: 10px; line-height: 1.4; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 980px;
    font-size: 14px;
    font-weight: 500;
    font-family: var(--font);
    cursor: pointer;
    border: none;
    transition: all var(--transition);
    white-space: nowrap;
    letter-spacing: -0.1px;
}

.btn-sm { padding: 6px 14px; font-size: 12.5px; }

.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: var(--accent-hover); transform: scale(1.02); }
.btn-primary:active { background: var(--accent-active); transform: scale(0.98); }

.btn-secondary { background: var(--bg-tertiary); color: var(--text-primary); }
.btn-secondary:hover { background: var(--border); }

.btn-danger { background: var(--error); color: white; }
.btn-danger:hover { opacity: 0.9; }

.btn-ghost { background: transparent; color: var(--text-secondary); border: 1px solid var(--border); }
.btn-ghost:hover { color: var(--text-primary); border-color: var(--accent); }

.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

.btn-icon { font-size: 14px; }

.toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }

/* ---------- Status ---------- */
.status {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    font-weight: 500;
    margin-top: 16px;
    animation: fadeIn 0.3s ease;
}

.status.visible { display: flex; }
.status.success { background: var(--success-bg); color: var(--success); }
.status.error { background: var(--error-bg); color: var(--error); }
.status.warning { background: var(--warning-bg); color: var(--warning); }

.status-icon { font-size: 17px; flex-shrink: 0; }
.status-text { flex: 1; word-break: break-word; }

/* ---------- Verlauf ---------- */
.history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 14px;
    margin-top: 16px;
}

.hist-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--bg-primary);
    transition: all var(--transition);
}

.hist-card:hover { border-color: var(--accent); box-shadow: var(--shadow-md); }

.hist-top { display: flex; gap: 12px; align-items: flex-start; }

.hist-thumb {
    width: 68px;
    height: 68px;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    padding: 4px;
    background: var(--checker-a);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hist-thumb svg { width: 100%; height: 100%; display: block; }

.hist-info { min-width: 0; flex: 1; }
.hist-type { font-size: 12px; font-weight: 600; color: var(--accent); display: flex; align-items: center; gap: 5px; }
.hist-text {
    font-size: 12.5px;
    color: var(--text-primary);
    margin-top: 3px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    word-break: break-word;
}
.hist-date { font-size: 11px; color: var(--text-tertiary); margin-top: 4px; font-variant-numeric: tabular-nums; }
.hist-actions { display: flex; gap: 6px; flex-wrap: wrap; }

.empty { text-align: center; padding: 40px 20px; color: var(--text-secondary); font-size: 14px; display: none; }
.empty.visible { display: block; }
.empty-icon { font-size: 40px; margin-bottom: 8px; }

/* ---------- Hilfe ---------- */
.help-list { margin-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.help-list li { line-height: 1.55; }

.help-types { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.help-type {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    font-size: 13px;
    display: flex;
    gap: 8px;
    align-items: flex-start;
}
.help-type .ico { font-size: 17px; line-height: 1.3; }
.help-type .ht-desc { color: var(--text-tertiary); font-size: 11.5px; }

/* ---------- Werbe-Overlay ---------- */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

.modal {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    width: 100%;
    max-width: 560px;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
}

.modal-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.modal-x {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    transition: all var(--transition);
    flex-shrink: 0;
}

.modal-x:hover { background: var(--border); color: var(--text-primary); }

.modal-body {
    padding: 12px 18px;
    overflow-y: auto;
    min-height: 220px;
}

.modal-body iframe { width: 100%; border: 0; display: block; background: transparent; }

.modal-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 18px;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}

.modal-foot .muted { flex: 1; min-width: 150px; line-height: 1.35; }

/* ---------- Toast ---------- */
.toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    transform: translate(-50%, 20px);
    background: var(--text-primary);
    color: var(--bg-primary);
    padding: 11px 20px;
    border-radius: 980px;
    font-size: 13.5px;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    pointer-events: none;
    transition: all var(--transition);
    z-index: 999;
    max-width: 90vw;
    text-align: center;
}

.toast.visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Ad Banner ---------- */
.ad-banner {
    max-width: 1280px;
    margin: 0 auto 0;
    padding: 0 24px;
}

.ad-frame { width: 100%; }

.ad-frame iframe { width: 100%; height: 100%; border: none; display: block; }

/* ---------- Footer ---------- */
footer {
    text-align: center;
    padding: 24px 24px 32px;
    color: var(--text-tertiary);
    font-size: 12px;
}

.footer-links { display: flex; justify-content: center; gap: 24px; margin-top: 10px; }

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 12px;
    transition: color var(--transition);
}

.footer-links a:hover { color: var(--accent); }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
    .layout { grid-template-columns: 1fr; }
    .col-side { position: static; }
    .preview-box { max-width: 360px; }
}

@media (max-width: 768px) {
    main { padding: 16px 12px; }
    .header-inner { padding: 0 14px; gap: 8px; }
    .logo { font-size: 15px; }
    .logo-text { font-size: 14px; }
    .header-tools { gap: 6px; }
    .lang-select { padding: 6px 24px 6px 7px; font-size: 12px; max-width: 96px; }
    .theme-option { width: 28px; height: 28px; font-size: 14px; }
    .modal-foot { justify-content: center; }
    .modal-foot .btn { width: 100%; justify-content: center; }
    .card { padding: 16px; border-radius: var(--radius-md); }
    #dataForm { grid-template-columns: 1fr; }
    .field.wide { grid-column: auto; }
    .type-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
    .dl-grid { grid-template-columns: repeat(2, 1fr); }
    .tabs { font-size: 13px; }
    .tab { padding: 8px 6px; font-size: 13px; }
    .footer-links { gap: 16px; flex-wrap: wrap; }
    .ad-banner { padding: 0 12px; }
    .head-actions { width: 100%; }
    .input-search { flex: 1; min-width: 140px; }
}

@media print {
    header, .tabs, .ad-banner, footer, .col-main, .dl-section, .toast, .qr-info,
    .modal-backdrop { display: none !important; }
    .card { border: none; box-shadow: none; }
}
