/**
 * Norixa — global readability polish
 * Typography, spacing, tables, cards. Same app, easier to read.
 */

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-size: 1rem;
    line-height: 1.55;
    color: #212121;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography scale */
.text-xs { font-size: 0.8125rem !important; line-height: 1.45 !important; }
.text-sm { font-size: 0.9375rem !important; line-height: 1.5 !important; }
.text-base { font-size: 1rem !important; line-height: 1.55 !important; }
.text-lg { font-size: 1.125rem !important; line-height: 1.4 !important; }
.text-xl { font-size: 1.25rem !important; line-height: 1.35 !important; }
.text-2xl { font-size: 1.625rem !important; line-height: 1.25 !important; }
.text-3xl { font-size: 1.875rem !important; line-height: 1.2 !important; }

/* Higher contrast on muted text */
.text-sekundartekst { color: #4a4a4a !important; }
.text-gray-400 { color: #525252 !important; }
.text-gray-500 { color: #404040 !important; }
.text-gray-600 { color: #374151 !important; }

/* Section headings */
main h1,
.page-title {
    font-size: 1.25rem !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
}

main h2 {
    font-size: 1.125rem !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
}

main h3 {
    font-size: 1rem !important;
    font-weight: 600 !important;
    line-height: 1.45 !important;
}

/* Sidebar nav */
.nav-item {
    font-size: 0.9375rem !important;
    line-height: 1.4 !important;
}

/* Tables */
body table,
.deliv-table,
.kampanje-fremdrift-detalj table,
.kampanje-mottaker-panel table {
    font-size: 0.9375rem !important;
}

body table th,
.deliv-table th,
.kampanje-fremdrift-detalj th,
.kampanje-mottaker-panel th {
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    color: #404040 !important;
    padding: 0.5625rem 0.6875rem !important;
}

body table td,
.deliv-table td,
.kampanje-fremdrift-detalj td,
.kampanje-mottaker-panel td {
    padding: 0.5625rem 0.6875rem !important;
}

/* Stat numbers */
.stat-card .text-2xl,
#stat-sendt,
#stat-apning,
#stat-klikk,
#stat-avmeldt,
#stat-total,
#stat-active,
#stat-unsub,
#stat-bounced,
.deliv-decision-stat p:first-child,
.deliv-card > .text-2xl,
.deliv-card .text-2xl.font-bold {
    font-size: 1.75rem !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
}

/* Stat / card labels */
.stat-card .text-sm,
.bg-white.rounded-xl.p-4 > .text-xs,
.bg-white.rounded-xl.p-5 > .text-xs {
    font-size: 0.9375rem !important;
}

/* Cards */
.deliv-card {
    padding: 1rem 1.125rem !important;
}

.deliv-section {
    margin-top: 1.25rem !important;
    margin-bottom: 1.25rem !important;
}

.bg-white.rounded-xl.p-4 { padding: 0.875rem 1rem !important; }
.bg-white.rounded-xl.p-5 { padding: 1rem 1.125rem !important; }
.bg-white.rounded-xl.p-6 { padding: 1.125rem 1.25rem !important; }

.bg-white.rounded-xl .border-b .font-semibold,
.bg-white.rounded-xl .border-b h2 {
    font-size: 1.0625rem !important;
}

/* Page spacing — compact but breathable */
main .container.py-8 { padding-top: 1.25rem !important; padding-bottom: 1.25rem !important; }
main .container.py-6 { padding-top: 1rem !important; padding-bottom: 1rem !important; }
main .container > .mb-8 { margin-bottom: 1.25rem !important; }
main .container > .mb-6 { margin-bottom: 1rem !important; }
main .container > .grid.gap-6 { gap: 1.125rem !important; }
main .container > .grid.gap-4 { gap: 0.875rem !important; }

/* Badges, pills, small controls */
.ds-badge,
.deliv-pill,
.tag {
    font-size: 0.8125rem !important;
}

.btn-mottaker-rapport,
.btn-mottaker-csv {
    font-size: 0.875rem !important;
}

/* Modals / logs */
#leveranse-modal .modal-body { font-size: 0.9375rem !important; }
.lev-event pre { font-size: 0.8125rem !important; }

/* Kampanje editor */
.field-label { font-size: 0.9375rem !important; }
.field-input { font-size: 1rem !important; padding: 0.6875rem 0.8125rem !important; }
.helper-text { font-size: 0.875rem !important; line-height: 1.55 !important; }
.step-label { font-size: 0.875rem !important; }
.btn-p, .btn-s, .btn-g, .btn-o { font-size: 0.9375rem !important; }
.tag-btn { font-size: 0.875rem !important; }

/* Deliverability extras */
.deliv-hist-row { font-size: 0.8125rem !important; }
.deliv-reason-row { font-size: 0.9375rem !important; }
.deliv-reason-code { font-size: 0.8125rem !important; }

/* Leads app */
.tree-label-text { font-size: 0.875rem !important; }
.tree-label-code { font-size: 0.8125rem !important; }
.tree-toggle { font-size: 0.8125rem !important; }

/* Standalone pages without main wrapper */
body > .container.py-8,
body > .container.py-6 {
    padding-top: 1.25rem !important;
    padding-bottom: 1.25rem !important;
}

/* Form controls inherit readable size */
input, select, textarea, button {
    font-family: inherit;
}

body input.text-sm,
body select.text-sm,
body textarea.text-sm {
    font-size: 0.9375rem !important;
}

/* Bump common inline font sizes (kampanje editor m.m.) */
body [style*="font-size:11px"] { font-size: 0.8125rem !important; }
body [style*="font-size:12px"] { font-size: 0.875rem !important; }
body [style*="font-size:13px"] { font-size: 0.9375rem !important; }
body [style*="font-size:14px"] { font-size: 0.9375rem !important; }
