/* === Design System === */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg: #f5f6f8;
    --surface: #ffffff;
    --border: #e1e4e8;
    --border-subtle: #eef0f3;
    --text: #1a1a2e;
    --text-secondary: #5f6577;
    --text-muted: #9298a5;
    --accent: #0072BC;
    --accent-hover: #005a96;
    --accent-subtle: rgba(0, 114, 188, 0.07);
    --accent-light: #e8f4fc;
    --success: #0d9f5f;
    --success-bg: #edf9f3;
    --warning: #c07d15;
    --warning-bg: #fdf6e9;
    --danger: #d4362c;
    --danger-bg: #fdf0ef;
    --radius: 8px;
    --radius-sm: 6px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
    --shadow: 0 1px 3px rgba(0,0,0,0.06);
    --transition: 150ms ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 14px;
}

.container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 32px;
}

/* === Header === */
header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

header nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
}

.nav-left {
    display: flex;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
    font-size: 15px;
    letter-spacing: -0.01em;
}

.logo-mark {
    flex-shrink: 0;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-license-info {
    font-size: 13px;
    color: var(--text-secondary);
}

/* === Welcome / Upload === */
.app-welcome {
    padding: 80px 0 48px;
}

.welcome-content {
    max-width: 520px;
    margin: 0 auto;
    text-align: center;
}

.welcome-content h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
    letter-spacing: -0.02em;
}

.welcome-sub {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.upload-zone {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 48px 32px;
    background: var(--surface);
    cursor: pointer;
    transition: border-color var(--transition), background var(--transition);
}

.upload-zone:hover {
    border-color: var(--accent);
    background: var(--accent-subtle);
}

.upload-zone.dragover {
    border-color: var(--accent);
    background: var(--accent-light);
}

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.upload-icon {
    color: var(--text-muted);
    margin-bottom: 8px;
}

.upload-zone:hover .upload-icon {
    color: var(--accent);
}

.upload-text {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
}

.upload-subtext {
    font-size: 13px;
    color: var(--text-secondary);
}

.upload-link {
    color: var(--accent);
    cursor: pointer;
    font-weight: 500;
}

.upload-link:hover {
    text-decoration: underline;
}

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

/* === File Info === */
.file-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    padding: 10px 14px;
    background: var(--accent-light);
    border: 1px solid var(--accent);
    border-radius: var(--radius-sm);
}

.file-info-left {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--accent);
}

.file-name {
    font-weight: 600;
    font-size: 13px;
    color: var(--text);
}

.file-rows {
    font-size: 12px;
    color: var(--text-secondary);
}

.btn-icon {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--text-muted);
    padding: 2px 6px;
    border-radius: 4px;
    transition: all var(--transition);
    line-height: 1;
}

.btn-icon:hover {
    color: var(--danger);
    background: var(--danger-bg);
}

/* === Sections === */
.section {
    padding: 40px 0;
}

.section-header {
    margin-bottom: 24px;
}

.section-header h2 {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 4px;
}

.section-sub {
    color: var(--text-secondary);
    font-size: 14px;
}

.hidden {
    display: none !important;
}

/* === Buttons === */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    line-height: 1.4;
}

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

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

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border-color: var(--border);
}

.btn-ghost:hover {
    background: var(--bg);
    color: var(--text);
    border-color: var(--text-muted);
}

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

/* === Mapping === */
.mapping-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.mapping-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px;
}

.mapping-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 6px;
}

.mapping-label .required {
    color: var(--danger);
}

.mapping-select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 13px;
    background: var(--bg);
    color: var(--text);
    cursor: pointer;
    transition: border-color var(--transition);
}

.mapping-select:focus {
    outline: none;
    border-color: var(--accent);
}

.mapping-preview {
    margin-top: 6px;
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mapping-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding-top: 8px;
}

.mapping-error {
    background: var(--danger-bg);
    color: var(--danger);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    font-size: 13px;
    font-weight: 500;
}

/* === Loading === */
.center {
    text-align: center;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin: 0 auto 12px;
}

.spinner-sm {
    width: 16px;
    height: 16px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

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

.loading-text {
    color: var(--text-secondary);
    font-size: 14px;
}

/* === Results === */
.results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.results-header h2 {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

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

/* Summary Cards */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 36px;
}

.summary-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
}

.summary-card .card-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

.summary-card .card-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.summary-card .card-sub {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.summary-card.highlight {
    border-color: var(--accent);
    background: var(--accent-light);
}

.summary-card.highlight .card-value {
    color: var(--accent);
}

/* Result Blocks */
.result-block {
    margin-bottom: 40px;
    padding-top: 28px;
    border-top: 1px solid var(--border-subtle);
}

.result-block h3 {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 2px;
}

.block-sub {
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 20px;
}

/* Charts */
.chart-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.chart-container {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    position: relative;
}

.chart-container.single {
    max-width: 640px;
}

.chart-container canvas {
    width: 100% !important;
    max-height: 300px;
}

/* LTV Cards */
.ltv-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.ltv-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
}

.ltv-card .card-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

.ltv-card .card-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ltv-card .card-detail {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* Tables */
.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.data-table th,
.data-table td {
    padding: 9px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border-subtle);
}

.data-table th {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: var(--bg);
    position: sticky;
    top: 0;
}

.data-table td {
    color: var(--text);
}

.data-table tbody tr:hover td {
    background: var(--accent-subtle);
}

.data-table .num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* Segment badges */
.segment-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 600;
}

.segment-badge.champions { background: var(--success-bg); color: var(--success); }
.segment-badge.loyal { background: var(--accent-light); color: var(--accent); }
.segment-badge.potential { background: #eef0ff; color: #4338ca; }
.segment-badge.new { background: #f3f0ff; color: #6d28d9; }
.segment-badge.at-risk { background: var(--warning-bg); color: var(--warning); }
.segment-badge.needs-attention { background: #fff3eb; color: #c2410c; }
.segment-badge.dormant { background: var(--danger-bg); color: var(--danger); }
.segment-badge.lost { background: var(--bg); color: var(--text-muted); }

/* === Profile Match Banner === */
.profile-match-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 16px;
    background: var(--accent-light);
    border: 1px solid var(--accent);
    border-radius: var(--radius);
}

.profile-match-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-match-icon {
    color: var(--accent);
    flex-shrink: 0;
}

.profile-match-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.profile-match-text strong {
    font-size: 13px;
    color: var(--text);
}

.profile-match-text span {
    font-size: 12px;
    color: var(--text-secondary);
}

.profile-match-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

/* === Saved Profiles Bar === */
.saved-profiles-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.profiles-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1;
}

.profiles-actions {
    flex-shrink: 0;
}

.profile-chip {
    display: inline-flex;
    align-items: center;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 100px;
    overflow: hidden;
    transition: all var(--transition);
}

.profile-chip:hover {
    border-color: var(--accent);
}

.profile-chip-apply {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 4px 10px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.profile-chip-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
}

.profile-chip-meta {
    font-size: 10px;
    color: var(--text-muted);
}

.profile-chip-export,
.profile-chip-delete {
    padding: 4px 6px;
    background: none;
    border: none;
    border-left: 1px solid var(--border);
    cursor: pointer;
    font-size: 12px;
    color: var(--text-muted);
    transition: all var(--transition);
}

.profile-chip-export:hover {
    background: var(--accent-subtle);
    color: var(--accent);
}

.profile-chip-delete:hover {
    background: var(--danger-bg);
    color: var(--danger);
}

/* === Drag & Drop Mapper === */
.mapper-source-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
}

.mapper-panel-title {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 2px;
}

.mapper-panel-desc {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 14px;
}

.mapper-source-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 44px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg);
    transition: all var(--transition);
}

.mapper-source-grid.drop-hover {
    border-color: var(--accent);
    background: var(--accent-subtle);
}

.mapper-source-grid:empty::after {
    content: 'Alle kolommen zijn toegewezen';
    color: var(--text-muted);
    font-size: 12px;
    display: flex;
    align-items: center;
    width: 100%;
    justify-content: center;
    padding: 6px;
}

.mapper-source-card {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: grab;
    user-select: none;
    transition: all var(--transition);
    position: relative;
    max-width: 200px;
    font-size: 12px;
}

.mapper-source-card:hover {
    border-color: var(--accent);
}

.mapper-source-card.dragging {
    opacity: 0.4;
    transform: scale(0.97);
}

.mapper-source-card.in-slot {
    background: var(--accent-light);
    border-color: var(--accent);
    max-width: none;
    width: 100%;
}

.mapper-source-card.in-slot .mapper-card-remove {
    display: flex;
}

.mapper-card-handle {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1;
    flex-shrink: 0;
    cursor: grab;
}

.mapper-card-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mapper-card-preview {
    font-size: 10px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100px;
}

.mapper-card-remove {
    display: none;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-muted);
    margin-left: auto;
    flex-shrink: 0;
    transition: all var(--transition);
}

.mapper-card-remove:hover {
    color: var(--danger);
    background: var(--danger-bg);
}

.mapper-target-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
}

.mapper-target-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 10px;
}

.mapper-target-slot {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    min-height: 56px;
    transition: all var(--transition);
    background: var(--bg);
}

.mapper-target-slot.drop-hover {
    border-color: var(--accent);
    background: var(--accent-subtle);
}

.mapper-target-slot.required {
    border-left: 3px solid var(--accent);
}

.mapper-slot-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 6px;
}

.mapper-slot-label .required-mark {
    color: var(--danger);
}

/* === Cleanup === */
.cleanup-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.cleanup-stat {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    text-align: center;
}

.cleanup-stat .stat-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.cleanup-stat .stat-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 2px;
}

.cleanup-stat.warning { border-color: var(--warning); }
.cleanup-stat.warning .stat-value { color: var(--warning); }
.cleanup-stat.danger { border-color: var(--danger); }
.cleanup-stat.danger .stat-value { color: var(--danger); }
.cleanup-stat.clean .stat-value { color: var(--success); }

.cleanup-issues {
    margin-bottom: 20px;
}

.cleanup-issue {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-subtle);
}

.issue-severity {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 5px;
    flex-shrink: 0;
}

.issue-severity.high { background: var(--danger); }
.issue-severity.medium { background: var(--warning); }
.issue-severity.low { background: var(--text-muted); }

.issue-content {
    flex: 1;
}

.issue-message {
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
}

.issue-details {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 1px;
}

.issue-count {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

.cleanup-fixes-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 10px;
}

.cleanup-fixes {
    margin-bottom: 20px;
}

.cleanup-fix {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 6px;
    cursor: pointer;
    transition: all var(--transition);
    font-size: 13px;
}

.cleanup-fix:hover {
    border-color: var(--accent);
}

.cleanup-fix.selected {
    background: var(--accent-subtle);
    border-color: var(--accent);
}

.cleanup-fix input {
    accent-color: var(--accent);
}

.cleanup-fix-text {
    flex: 1;
    color: var(--text);
}

.recommended-badge {
    font-size: 10px;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.cleanup-fix-count {
    font-size: 11px;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

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

.cleanup-skip {
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
    padding: 8px 16px;
}

.cleanup-skip:hover {
    color: var(--text);
}

/* Duplicate groups */
.duplicate-groups {
    padding: 14px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
}

.duplicate-groups h4 {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.duplicate-group {
    padding: 6px 0;
    border-bottom: 1px solid var(--border-subtle);
}

.duplicate-group:last-child {
    border-bottom: none;
}

.duplicate-group-items {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.duplicate-item {
    font-size: 12px;
    padding: 2px 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 100px;
    color: var(--text-secondary);
}

.duplicate-item.canonical {
    background: var(--accent-light);
    border-color: var(--accent);
    color: var(--accent);
    font-weight: 500;
}

.duplicate-item small {
    color: var(--text-muted);
    margin-left: 2px;
}

/* === License Modal === */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(2px);
}

.modal {
    background: var(--surface);
    border-radius: var(--radius);
    width: 100%;
    max-width: 400px;
    position: relative;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}

.modal-header {
    padding: 28px 28px 0;
}

.modal-header h2 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
}

.modal-header p {
    font-size: 14px;
    color: var(--text-secondary);
}

.modal-body {
    padding: 24px 28px 28px;
}

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

.btn-oauth {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    transition: all var(--transition);
}

.btn-oauth:hover {
    border-color: var(--text-muted);
    background: var(--bg);
}

.oauth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: var(--text-muted);
    font-size: 12px;
}

.oauth-divider::before,
.oauth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.license-input-group {
    display: flex;
    gap: 6px;
}

.license-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: 'Inter', monospace;
    font-size: 14px;
    color: var(--text);
    background: var(--surface);
    letter-spacing: 0.05em;
    transition: border-color var(--transition);
}

.license-input:focus {
    outline: none;
    border-color: var(--accent);
}

.license-input::placeholder {
    color: var(--text-muted);
    letter-spacing: 0.02em;
}

.license-error {
    margin-top: 8px;
    padding: 8px 12px;
    background: var(--danger-bg);
    border-radius: var(--radius-sm);
    color: var(--danger);
    font-size: 13px;
}

.license-loading {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    color: var(--text-secondary);
    font-size: 13px;
}

.modal-contact {
    margin-top: 20px;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
}

.modal-contact a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

.modal-contact a:hover {
    text-decoration: underline;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    line-height: 1;
    transition: all var(--transition);
}

.modal-close:hover {
    color: var(--text);
    background: var(--bg);
}

/* === Print === */
@media print {
    header { display: none; }
    .app-welcome { display: none; }
    .results-actions { display: none; }
    .section { padding: 16px 0; }
    body { background: white; font-size: 11px; }
    .chart-row { break-inside: avoid; }
    .result-block { break-inside: avoid; }
}

/* === Responsive === */
@media (max-width: 768px) {
    .container { padding: 0 16px; }
    .chart-row { grid-template-columns: 1fr; }
    .summary-cards { grid-template-columns: repeat(2, 1fr); }
    .profile-match-bar { flex-direction: column; align-items: flex-start; }
    .mapping-actions { flex-direction: column; }
    .results-header { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
    .summary-cards { grid-template-columns: 1fr; }
    .welcome-content h1 { font-size: 20px; }
    .app-welcome { padding: 48px 0 32px; }
}
