:root {
    --gk-bg: #f4f1ea;
    --gk-ink: #1b1b1f;
    --gk-muted: #7b7b86;
    --gk-lime: #d9f99d;
    --gk-lilac: #c4b5fd;
    --gk-peach: #fdba74;
    --gk-sky: #7dd3fc;
    --gk-white: #ffffff;
    --gk-radius: 24px;
    --gk-font: "Bricolage Grotesque", system-ui, sans-serif;
    --gk-bottom-inset: calc(4.75rem + env(safe-area-inset-bottom, 0px));
}

html {
    height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
    touch-action: manipulation;
}

body {
    height: 100%;
    margin: 0;
    overflow: hidden;
    background: var(--gk-bg);
    color: var(--gk-ink);
    font-family: var(--gk-font);
    touch-action: manipulation;
}

.gk-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
}

.gk-shell {
    flex: 1;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 480px;
    width: 100%;
    margin: 0 auto;
    padding: calc(1rem + env(safe-area-inset-top, 0px)) 1rem var(--gk-bottom-inset);
    box-sizing: border-box;
}

.mud-input input,
.mud-input textarea,
.mud-input-slot input,
input,
textarea,
select {
    font-size: 16px !important;
}

@media (min-width: 900px) {
    .gk-shell-wide .gk-bento {
        grid-template-columns: repeat(4, 1fr);
    }
}

.gk-title {
    font-weight: 800;
    letter-spacing: -0.05em;
    line-height: 0.92;
    font-size: 2.25rem;
    margin-bottom: 1rem;
}

/* Blazor FocusOnNavigate fokuserer h1 — skjul browser-outline */
.gk-title:focus,
.gk-title:focus-visible {
    outline: none;
}

.gk-title-dot { color: var(--gk-muted); }

.gk-bento {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.gk-tile {
    border-radius: var(--gk-radius);
    padding: 1rem 1.1rem;
    min-height: 56px;
    border: none;
    text-align: left;
    color: var(--gk-ink);
}

.gk-tile--hero {
    grid-column: span 2;
    background: var(--gk-lime);
    padding: 1.25rem 1.5rem 1.5rem;
}

.gk-hero-heading {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.gk-tile--hero .gk-hero-num {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.06em;
}

.gk-tile--hero .gk-hero-unit {
    font-size: 1.1rem;
    font-weight: 800;
    opacity: 0.85;
}

.gk-muted-text {
    color: var(--gk-muted);
    margin-bottom: 1rem;
}

.gk-version-quiet {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--gk-muted);
    margin: 0 0 1.25rem;
}

.gk-receipt-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    text-align: left;
    gap: 0.35rem;
    cursor: pointer;
}

.gk-receipt-card .gk-tile-chip {
    align-self: flex-start;
    margin-bottom: 0.25rem;
}

.gk-receipt-card__thumb {
    width: 100%;
    height: 72px;
    object-fit: cover;
    border-radius: 12px;
    background: rgba(27, 27, 31, 0.06);
}

.gk-receipt-card__thumb--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--gk-muted);
}

.gk-receipt-card__merchant {
    font-weight: 800;
    font-size: 1rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gk-receipt-card__amount {
    font-size: 0.85rem;
    opacity: 0.9;
}

.gk-timeline {
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.gk-timeline__item {
    display: flex;
    justify-content: space-between;
    padding: 0.65rem 0.85rem;
    border-radius: 16px;
    background: var(--gk-white);
}

.gk-timeline__item--urgent {
    outline: 2px solid var(--gk-peach);
}

.gk-timeline__kind {
    font-weight: 800;
}

.gk-timeline__date {
    color: var(--gk-muted);
    font-weight: 600;
}

.gk-tile--stat {
    background: var(--gk-white);
}

.gk-tile--lilac { background: var(--gk-lilac); }
.gk-tile--peach { background: var(--gk-peach); }
.gk-tile--sky { background: var(--gk-sky); }

.gk-tile-chip {
    display: inline-block;
    background: rgba(255, 255, 255, 0.75);
    font-size: 10px;
    font-weight: 800;
    padding: 4px 8px;
    border-radius: 999px;
}

.gk-progress {
    height: 10px;
    background: var(--gk-ink);
    border-radius: 999px;
    overflow: hidden;
    margin-top: 0.75rem;
}

.gk-progress > span {
    display: block;
    height: 100%;
    background: var(--gk-lime);
}

body .pwa-updater[b-pwa-updater] {
    --pwa-updater-bar-z-index: 1400;
    --pwa-updater-bar-backcolor: var(--gk-accent, #1a5f4a);
}

.gk-version-footer {
    position: fixed;
    left: 0;
    right: 0;
    z-index: 90;
    text-align: center;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--gk-muted);
    padding: 0.2rem 0.5rem;
    pointer-events: none;
    user-select: text;
}

.gk-version-footer--above-nav {
    bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px));
}

.gk-version-footer--solo {
    bottom: env(safe-area-inset-bottom, 0px);
}

.gk-version-footer--stale {
    pointer-events: auto;
}

.gk-version-footer-btn {
    border: none;
    background: var(--gk-ink);
    color: var(--gk-lime);
    font: inherit;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    cursor: pointer;
}

.gk-bottomnav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 76px;
    background: var(--gk-bg);
    border-top: 1px solid rgba(27, 27, 31, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-around;
    max-width: 480px;
    margin: 0 auto;
    z-index: 100;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.gk-bottomnav a {
    color: var(--gk-ink);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.8rem;
    min-width: 64px;
    text-align: center;
}

.gk-bottomnav a.gk-scan-fab,
.gk-bottomnav label.gk-scan-fab {
    width: 62px;
    height: 62px;
    min-width: 62px;
    border-radius: 50%;
    background: var(--gk-ink) !important;
    color: var(--gk-lime) !important;
    border: 5px solid var(--gk-bg);
    margin-top: -32px;
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(27, 27, 31, 0.35);
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
}

.gk-bottomnav a.gk-scan-fab:active,
.gk-bottomnav label.gk-scan-fab:active {
    transform: scale(0.96);
}

.gk-lead {
    color: var(--gk-muted);
    font-size: 1rem;
    line-height: 1.45;
    margin-bottom: 1.25rem;
}

.gk-lead strong { color: var(--gk-ink); font-weight: 700; }
.gk-lead--compact { margin-bottom: 0.5rem; font-size: 0.9rem; }

.gk-preview-wrap {
    margin: 0 0 1.25rem;
    border-radius: 28px;
    overflow: hidden;
    border: 3px solid var(--gk-ink);
    box-shadow: 0 16px 40px rgba(27, 27, 31, 0.12);
    background: #ebe7dd;
}

.gk-preview-wrap--compact { max-height: 220px; }

.gk-preview-img {
    display: block;
    width: 100%;
    height: auto;
}

.gk-preview-caption {
    font-size: 0.75rem;
    color: var(--gk-muted);
    padding: 0.5rem 0.75rem 0.75rem;
    margin: 0;
    background: var(--gk-bg);
}

.gk-landing-grid { margin-bottom: 1rem; }
.gk-tile--span2 { grid-column: span 2; }
.gk-tile--lime { background: var(--gk-lime); }

.gk-tile-link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.gk-tile-link:active { transform: scale(0.98); }

.gk-tile-heading {
    font-size: 1.05rem;
    font-weight: 800;
    margin: 0.35rem 0 0;
    letter-spacing: -0.02em;
}

.gk-tile-text {
    font-size: 0.8rem;
    font-weight: 600;
    margin: 0.35rem 0 0;
    opacity: 0.85;
    line-height: 1.35;
}

.gk-steps {
    margin: 0.5rem 0 0;
    padding-left: 1.1rem;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.5;
}

.gk-btn-primary,
.gk-landing-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 56px;
    border-radius: 999px;
    background: var(--gk-ink);
    color: var(--gk-lime);
    font-weight: 800;
    text-decoration: none;
    font-size: 1rem;
    text-transform: none;
    border: none;
    box-sizing: border-box;
}

.gk-btn-primary.mud-button-root {
    background: var(--gk-ink) !important;
    color: var(--gk-lime) !important;
    font-weight: 800 !important;
    border-radius: 999px !important;
    height: 56px !important;
    text-transform: none !important;
}

.gk-login-logo {
    display: block;
    line-height: 0;
}

.gk-login-submit.mud-button-root {
    text-transform: none !important;
    background: var(--gk-ink) !important;
    color: var(--gk-lime) !important;
    font-weight: 800 !important;
}

.gk-footnote {
    font-size: 0.7rem;
    color: var(--gk-muted);
    text-align: center;
    margin-top: 1rem;
    line-height: 1.4;
}

.gk-cta-pill {
    position: fixed;
    bottom: 88px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 2rem);
    max-width: 448px;
    height: 56px;
    border-radius: 999px;
    background: var(--gk-ink);
    color: var(--gk-lime);
    font-weight: 800;
    border: none;
    z-index: 99;
}

.gk-field-tile {
    background: var(--gk-white);
    border-radius: var(--gk-radius);
    padding: 0.75rem 1rem;
    margin-bottom: 8px;
}

.gk-field-tile--doubt {
    background: var(--gk-peach);
    box-shadow: 0 0 0 2.5px var(--gk-peach);
}

.gk-field-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gk-muted);
    font-weight: 700;
}

.gk-scan-grid .gk-scan-dark {
    grid-column: span 2;
}

.gk-scan-dark {
    background: var(--gk-ink);
    color: var(--gk-lime);
    min-height: 220px;
    border-radius: var(--gk-radius);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    border: none;
    padding: 0;
    font: inherit;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.gk-scan-dark:disabled {
    opacity: 0.85;
    cursor: wait;
}

.gk-pick-input-host {
    position: fixed;
    left: -10000px;
    top: 0;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    z-index: -1;
}

.gk-pick-input-host input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
}

.gk-scan-frame {
    position: absolute;
    inset: 16px;
    border: 2px solid var(--gk-lime);
    border-radius: 12px;
    opacity: 0.85;
    pointer-events: none;
    z-index: 2;
}

.gk-scan-preview {
    position: absolute;
    inset: 16px;
    width: calc(100% - 32px);
    height: calc(100% - 32px);
    max-width: calc(100% - 32px);
    max-height: calc(100% - 32px);
    object-fit: contain;
    border-radius: 10px;
    z-index: 3;
    pointer-events: none;
}

.gk-scan-pdf-badge {
    position: relative;
    z-index: 1;
    margin: 0;
    font-weight: 800;
    font-size: 0.9rem;
    text-align: center;
    padding: 1rem;
}

.gk-scan-hint {
    position: relative;
    z-index: 1;
    font-size: 0.85rem;
    font-weight: 700;
    text-align: center;
    margin: 0;
    padding: 1rem;
    opacity: 0.9;
}

.gk-scan-actions {
    grid-column: span 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.gk-file-btn {
    border: none;
    border-radius: var(--gk-radius);
    font-family: inherit;
    font-weight: 800;
    font-size: 0.95rem;
    min-height: 56px;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: transform 0.12s ease, opacity 0.12s ease;
}

.gk-file-btn:active:not(:disabled) {
    transform: scale(0.98);
}

.gk-file-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.gk-file-btn--primary {
    background: var(--gk-lime);
    color: var(--gk-ink);
}

.gk-file-btn--secondary {
    background: var(--gk-white);
    color: var(--gk-ink);
    border: 2px solid rgba(27, 27, 31, 0.12);
}

.gk-channel-tile--on {
    background: var(--gk-lime) !important;
}

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
}