/* =============================================================================
 * Ottesen Hellgren — Vista
 * Delade design-tokens och baslayout. Granska-specifika klasser läggs till
 * när Steg 8 (granskningsvyn) byggs — då flyttas det mockupen visar hit.
 * ========================================================================== */

:root {
    --oh-charcoal: #1A1D21;
    --oh-charcoal-light: #22262B;
    --oh-charcoal-lighter: #2A2F35;
    --oh-orange: #FF7A3D;
    --oh-orange-dim: #C85D2A;
    --oh-text: #E8E6E3;
    --oh-text-dim: #8B8680;
    --oh-text-faint: #5C5853;
    --oh-border: #2F343A;
    --oh-border-light: #3A4047;
    --oh-success: #5FB572;
    --oh-warning: #E6B85F;
    --oh-error: #D6695F;
}

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

html, body { height: 100%; }

body {
    font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--oh-charcoal);
    color: var(--oh-text);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.mono { font-family: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace; }

a { color: var(--oh-orange); text-decoration: none; }
a:hover { color: var(--oh-orange-dim); }

/* ============ NAVBAR ============ */
.navbar {
    border-bottom: 1px solid var(--oh-border);
    padding: 16px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--oh-charcoal);
    position: sticky;
    top: 0;
    z-index: 10;
}

.brand { display: flex; align-items: center; gap: 12px; font-size: 14px; }

.brand-mark {
    width: 28px; height: 28px;
    background: var(--oh-orange);
    border-radius: 4px;
    display: flex; align-items: center; justify-content: center;
    color: var(--oh-charcoal);
    font-family: 'Geist Mono', monospace;
    font-weight: 600;
    font-size: 13px;
}

.brand-name { font-weight: 500; }
.brand-divider { color: var(--oh-text-faint); margin: 0 4px; }
.brand-app { color: var(--oh-text-dim); font-family: 'Geist Mono', monospace; font-size: 12px; }

.brand-link {
    display: flex;
    align-items: center;
    gap: 12px;
    color: inherit;
    text-decoration: none;
}

.navbar-tabs {
    display: flex;
    gap: 4px;
    align-items: center;
}

.navbar-tab {
    color: var(--oh-text-dim);
    text-decoration: none;
    font-family: 'Geist', sans-serif;
    font-size: 13px;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: 4px;
    position: relative;
    transition: color 0.15s, background 0.15s;
}

.navbar-tab:hover {
    color: var(--oh-text);
    background: var(--oh-charcoal-light);
}

.navbar-tab-active {
    color: var(--oh-text);
}

.navbar-tab-active::after {
    content: '';
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: -17px;
    height: 2px;
    background: var(--oh-orange);
    border-radius: 1px;
}

@media (max-width: 760px) {
    .navbar { flex-wrap: wrap; row-gap: 12px; padding: 14px 20px; }
    .navbar-tabs { order: 3; width: 100%; justify-content: flex-start; gap: 0; }
    .navbar-tab { padding: 8px 12px; font-size: 12px; }
    .navbar-tab-active::after { left: 12px; right: 12px; bottom: -15px; }
}

.navbar-right {
    display: flex; align-items: center; gap: 16px;
    font-size: 13px;
    color: var(--oh-text-dim);
    font-family: 'Geist Mono', monospace;
}

.navbar-user {
    color: var(--oh-text);
    text-decoration: none;
    transition: color 120ms ease;
}

.navbar-user:hover { color: var(--oh-orange); }
.navbar-user-active { color: var(--oh-orange); }

.navbar-logout {
    background: none;
    border: 1px solid var(--oh-border);
    color: var(--oh-text-dim);
    font-family: 'Geist Mono', monospace;
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}
.navbar-logout:hover { border-color: var(--oh-border-light); color: var(--oh-text); }

/* ============ MAIN ============ */
.main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 32px 120px;
}

.page-header {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--oh-border);
}

.page-title {
    font-size: 30px;
    font-weight: 500;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.page-subtitle {
    color: var(--oh-text-dim);
    font-size: 14px;
    font-family: 'Geist Mono', monospace;
}

.empty-state {
    background: var(--oh-charcoal-light);
    border: 1px solid var(--oh-border);
    border-radius: 8px;
    padding: 32px;
    color: var(--oh-text-dim);
    font-size: 14px;
}

.empty-state strong { color: var(--oh-text); font-weight: 500; }

/* ============ LOGIN ============ */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.login-card {
    width: 100%;
    max-width: 380px;
    background: var(--oh-charcoal-light);
    border: 1px solid var(--oh-border);
    border-radius: 10px;
    padding: 36px 32px;
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
}

.login-brand .brand-mark { width: 32px; height: 32px; font-size: 14px; }
.login-brand-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.login-brand-name { font-weight: 500; font-size: 15px; }
.login-brand-app {
    color: var(--oh-text-dim);
    font-family: 'Geist Mono', monospace;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.login-title {
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 24px;
    letter-spacing: -0.01em;
}

/* ============ FORM ============ */
.field {
    margin-bottom: 18px;
}

.field-label {
    display: block;
    font-size: 11px;
    color: var(--oh-text-dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-family: 'Geist Mono', monospace;
    margin-bottom: 8px;
}

.field-input {
    width: 100%;
    background: var(--oh-charcoal);
    border: 1px solid var(--oh-border);
    border-radius: 6px;
    padding: 12px 14px;
    color: var(--oh-text);
    font-family: 'Geist', sans-serif;
    font-size: 15px;
    line-height: 1.4;
    transition: border-color 0.15s;
}

.field-input:focus {
    outline: none;
    border-color: var(--oh-orange);
}

/* ============ BUTTONS ============ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 18px;
    border-radius: 6px;
    border: 1px solid transparent;
    font-family: 'Geist', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    text-decoration: none;
}

.btn-primary {
    background: var(--oh-orange);
    color: var(--oh-charcoal);
}
.btn-primary:hover { background: var(--oh-orange-dim); color: var(--oh-charcoal); }

.btn-block { width: 100%; }

/* ============ ALERTS ============ */
.alert {
    border-radius: 6px;
    padding: 12px 14px;
    font-size: 13px;
    margin-bottom: 18px;
    border: 1px solid transparent;
}

.alert-error {
    background: rgba(214, 105, 95, 0.08);
    border-color: rgba(214, 105, 95, 0.3);
    color: var(--oh-error);
}

.alert-success {
    background: rgba(95, 181, 114, 0.08);
    border-color: rgba(95, 181, 114, 0.3);
    color: var(--oh-success);
}

.alert-info {
    background: rgba(255, 122, 61, 0.06);
    border-color: rgba(255, 122, 61, 0.25);
    color: var(--oh-text-dim);
}

/* ============ BUTTON VARIANTS ============ */
.btn-ghost {
    background: transparent;
    border-color: var(--oh-border);
    color: var(--oh-text-dim);
}
.btn-ghost:hover { border-color: var(--oh-border-light); color: var(--oh-text); background: var(--oh-charcoal-light); }

.btn-danger {
    background: transparent;
    border-color: rgba(214, 105, 95, 0.4);
    color: var(--oh-error);
}
.btn-danger:hover { background: rgba(214, 105, 95, 0.1); border-color: var(--oh-error); color: var(--oh-error); }

.btn-sm { padding: 6px 12px; font-size: 12px; font-family: 'Geist Mono', monospace; }

/* ============ TOOLBAR / PAGE HEADER ============ */
.toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--oh-border);
    gap: 16px;
}

.breadcrumb {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 12px;
    color: var(--oh-text-dim);
    margin-bottom: 10px;
}
.breadcrumb a { color: var(--oh-text-dim); text-decoration: none; }
.breadcrumb a:hover { color: var(--oh-text); }
.breadcrumb-separator { color: var(--oh-text-faint); }
.breadcrumb-current { color: var(--oh-text); }

/* ============ TABLE ============ */
.table-wrap {
    border: 1px solid var(--oh-border);
    border-radius: 8px;
    overflow: hidden;
    background: var(--oh-charcoal-light);
}

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

.table thead th {
    text-align: left;
    padding: 12px 16px;
    background: var(--oh-charcoal-lighter);
    color: var(--oh-text-dim);
    font-family: 'Geist Mono', monospace;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 500;
    border-bottom: 1px solid var(--oh-border);
}

.table tbody td {
    padding: 14px 16px;
    border-top: 1px solid var(--oh-border);
    vertical-align: middle;
}

.table tbody tr:first-child td { border-top: none; }
.table tbody tr:hover { background: var(--oh-charcoal-lighter); }

.table .row-inactive { opacity: 0.55; }

.table-link {
    color: var(--oh-text);
    font-weight: 500;
    text-decoration: none;
}
.table-link:hover { color: var(--oh-orange); }

.cell-muted { color: var(--oh-text-dim); }

.table-actions { text-align: right; white-space: nowrap; }

/* ============ BADGES ============ */
.badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 4px;
    font-family: 'Geist Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.04em;
    text-transform: lowercase;
    border: 1px solid transparent;
}

.badge-active { background: rgba(95, 181, 114, 0.1); color: var(--oh-success); border-color: rgba(95, 181, 114, 0.3); }
.badge-inactive { background: var(--oh-charcoal); color: var(--oh-text-faint); border-color: var(--oh-border); }

.dot {
    display: inline-block;
    width: 8px; height: 8px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: 1px;
}
.dot-success { background: var(--oh-success); }
.dot-warning { background: var(--oh-warning); }
.dot-faint { background: var(--oh-text-faint); }

/* ============ FORM LAYOUT ============ */
.form-grid {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.form-section {
    background: var(--oh-charcoal-light);
    border: 1px solid var(--oh-border);
    border-radius: 8px;
    padding: 24px;
}

.form-section-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--oh-text);
    margin-bottom: 6px;
}

.form-section-hint {
    font-size: 13px;
    color: var(--oh-text-dim);
    margin-bottom: 18px;
}

.form-section .field:last-child { margin-bottom: 0; }

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 640px) {
    .field-row { grid-template-columns: 1fr; }
}

.field-hint {
    font-size: 12px;
    color: var(--oh-text-faint);
    margin-top: 6px;
    font-family: 'Geist Mono', monospace;
}

.field-hint code,
.form-section-hint code {
    background: var(--oh-charcoal);
    padding: 1px 6px;
    border-radius: 3px;
    color: var(--oh-text);
}

.field-error {
    font-size: 12px;
    color: var(--oh-error);
    margin-top: 6px;
    font-family: 'Geist Mono', monospace;
}

.field-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: var(--oh-text);
}

.field-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--oh-orange);
    cursor: pointer;
}

.field-textarea {
    width: 100%;
    background: var(--oh-charcoal);
    border: 1px solid var(--oh-border);
    border-radius: 6px;
    padding: 12px 14px;
    color: var(--oh-text);
    font-family: 'Geist', sans-serif;
    font-size: 15px;
    line-height: 1.5;
    resize: vertical;
    min-height: 80px;
    transition: border-color 0.15s;
}
.field-textarea:focus { outline: none; border-color: var(--oh-orange); }

select.field-input {
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path fill='%238B8680' d='M2 4l4 4 4-4z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 8px;
}

/* ============ DANGER ZONE ============ */
.danger-zone {
    margin-top: 48px;
    padding: 24px;
    border: 1px solid rgba(214, 105, 95, 0.3);
    border-radius: 8px;
    background: rgba(214, 105, 95, 0.04);
}

.danger-zone .form-section-title { color: var(--oh-error); }

/* ============ DASHBOARD CARDS ============ */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.dashboard-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 22px 22px 18px;
    background: var(--oh-charcoal-light);
    border: 1px solid var(--oh-border);
    border-radius: 8px;
    color: var(--oh-text);
    text-decoration: none;
    transition: border-color 0.15s, background 0.15s;
}

a.dashboard-card:hover { border-color: var(--oh-border-light); background: var(--oh-charcoal-lighter); }

.dashboard-card-label {
    font-family: 'Geist Mono', monospace;
    font-size: 11px;
    color: var(--oh-text-dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.dashboard-card-value {
    font-size: 28px;
    font-weight: 500;
    letter-spacing: -0.02em;
    color: var(--oh-text);
}

.dashboard-card-suffix {
    margin-left: 8px;
    color: var(--oh-text-dim);
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0;
}

.dashboard-card-action {
    color: var(--oh-orange);
    font-size: 12px;
    margin-top: 4px;
}

.dashboard-card-disabled {
    opacity: 0.5;
    cursor: default;
}
.dashboard-card-disabled .dashboard-card-action { color: var(--oh-text-faint); }

/* ============ PROMPT GROUPS ============ */
.prompt-group {
    margin-bottom: 32px;
}

.prompt-group-title {
    font-size: 18px;
    font-weight: 500;
    color: var(--oh-orange);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px dashed var(--oh-border);
    letter-spacing: 0;
}

.prompt-notes-cell {
    font-size: 12px;
    max-width: 420px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cell-nowrap { white-space: nowrap; }

.connection-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    background: var(--oh-charcoal);
    border: 1px solid var(--oh-border);
    border-radius: 6px;
}

.connection-status {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
}

.btn[disabled] {
    opacity: 0.4;
    cursor: not-allowed;
}

.copy-ok { color: var(--oh-success) !important; border-color: rgba(95, 181, 114, 0.4) !important; }
.copy-err { color: var(--oh-error) !important; border-color: rgba(214, 105, 95, 0.4) !important; }

.field-with-action {
    display: flex;
    gap: 8px;
    align-items: stretch;
}
.field-with-action .field-input { flex: 1; }
.field-with-action .btn-sm {
    white-space: nowrap;
    padding-left: 14px;
    padding-right: 14px;
}

.verify-status {
    min-height: 18px;
    margin-top: 6px;
    line-height: 1.45;
}
.verify-status.verify-ok    { color: var(--oh-success); }
.verify-status.verify-error { color: var(--oh-error); }

/* ============ REPORT VIEW ============ */
.report-section {
    margin-bottom: 32px;
    padding: 24px;
    background: var(--oh-charcoal-light);
    border: 1px solid var(--oh-border);
    border-radius: 8px;
}

.report-one-liner {
    font-size: 17px;
    line-height: 1.55;
    color: var(--oh-text);
}

.report-closing-note {
    font-size: 15px;
    line-height: 1.55;
    color: var(--oh-text-dim);
    font-style: italic;
}

.wins-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.win-item {
    background: var(--oh-charcoal);
    border: 1px solid var(--oh-border);
    border-radius: 8px;
    padding: 16px;
}

.win-row {
    display: grid;
    grid-template-columns: 32px 1fr;
    gap: 12px;
    align-items: start;
}

.win-num {
    color: var(--oh-orange);
    font-size: 12px;
    padding-top: 2px;
}

.win-fields {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.win-title {
    font-size: 15px;
    font-weight: 500;
    color: var(--oh-text);
}

.win-desc {
    font-size: 13px;
    color: var(--oh-text-dim);
    line-height: 1.55;
}

/* Status badges */
.badge-status-pending   { background: var(--oh-charcoal); color: var(--oh-text-faint); border-color: var(--oh-border); }
.badge-status-generated { background: rgba(230, 184, 95, 0.1); color: var(--oh-warning); border-color: rgba(230, 184, 95, 0.3); }
.badge-status-in_review { background: rgba(255, 122, 61, 0.15); color: var(--oh-orange); border-color: rgba(255, 122, 61, 0.3); }
.badge-status-approved  { background: rgba(95, 181, 114, 0.1); color: var(--oh-success); border-color: rgba(95, 181, 114, 0.3); }
.badge-status-published { background: rgba(95, 181, 114, 0.15); color: var(--oh-success); border-color: rgba(95, 181, 114, 0.4); }
.badge-status-failed    { background: rgba(214, 105, 95, 0.1); color: var(--oh-error); border-color: rgba(214, 105, 95, 0.3); }

.badge-impact-hög    { background: rgba(214, 105, 95, 0.15); color: var(--oh-error); border-color: rgba(214, 105, 95, 0.3); display: inline-block; margin-top: 4px; }
.badge-impact-medel  { background: rgba(230, 184, 95, 0.1); color: var(--oh-warning); border-color: rgba(230, 184, 95, 0.3); display: inline-block; margin-top: 4px; }
.badge-impact-låg    { background: var(--oh-charcoal); color: var(--oh-text-dim); border-color: var(--oh-border); display: inline-block; margin-top: 4px; }

/* ============ METRICS GRID ============ */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.metric-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 18px 20px;
    background: var(--oh-charcoal-light);
    border: 1px solid var(--oh-border);
    border-radius: 8px;
}

.metric-label {
    font-family: 'Geist Mono', monospace;
    font-size: 11px;
    color: var(--oh-text-dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.metric-value {
    font-size: 28px;
    font-weight: 500;
    color: var(--oh-text);
    letter-spacing: -0.02em;
}

.metric-delta {
    font-family: 'Geist Mono', monospace;
    font-size: 12px;
    margin-top: 2px;
}
.metric-delta-up    { color: var(--oh-success); }
.metric-delta-down  { color: var(--oh-error); }
.metric-delta-flat  { color: var(--oh-text-dim); }
.metric-delta-none  { color: var(--oh-text-faint); font-style: italic; }

.metric-details {
    margin-bottom: 16px;
    background: var(--oh-charcoal-light);
    border: 1px solid var(--oh-border);
    border-radius: 6px;
    padding: 12px 16px;
}

.metric-details summary {
    cursor: pointer;
    font-family: 'Geist Mono', monospace;
    font-size: 12px;
    color: var(--oh-text-dim);
    user-select: none;
}
.metric-details summary:hover { color: var(--oh-text); }

.metric-details .table { margin-top: 12px; }

.table-compact thead th { padding: 8px 12px; }
.table-compact tbody td { padding: 8px 12px; font-size: 13px; }

.debug-details {
    margin-top: 16px;
    background: var(--oh-charcoal-light);
    border: 1px solid var(--oh-border);
    border-radius: 6px;
    padding: 12px 16px;
}

.debug-details summary {
    cursor: pointer;
    font-family: 'Geist Mono', monospace;
    font-size: 12px;
    color: var(--oh-text-dim);
    user-select: none;
}
.debug-details summary:hover { color: var(--oh-text); }

.debug-json {
    margin-top: 12px;
    padding: 12px;
    background: var(--oh-charcoal);
    border-radius: 4px;
    font-family: 'Geist Mono', monospace;
    font-size: 11px;
    color: var(--oh-text-dim);
    line-height: 1.5;
    max-height: 400px;
    overflow: auto;
}

.prompt-editor {
    min-height: 480px;
    font-size: 13px;
    line-height: 1.55;
    tab-size: 4;
}

.table-actions form { display: inline-block; }
.table-actions .btn-sm + .btn-sm,
.table-actions .btn-sm + form,
.table-actions form + .btn-sm { margin-left: 6px; }

input[readonly].field-input,
select[disabled].field-input {
    opacity: 0.7;
    cursor: not-allowed;
}

/* ============ GRANSKA-VYN ============ */

/* Status-bar under page-header */
.status-bar {
    display: flex;
    gap: 16px;
    align-items: center;
    padding: 14px 18px;
    background: var(--oh-charcoal-light);
    border: 1px solid var(--oh-border);
    border-radius: 8px;
    margin-top: 20px;
    font-size: 13px;
}

.status-icon {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--oh-warning);
    flex-shrink: 0;
}
.status-icon.status-icon-generated { background: var(--oh-warning); }
.status-icon.status-icon-in_review { background: var(--oh-orange); }
.status-icon.status-icon-approved  { background: var(--oh-success); }
.status-icon.status-icon-published { background: var(--oh-success); }
.status-icon.status-icon-failed    { background: var(--oh-error); }
.status-icon.status-icon-pending   { background: var(--oh-text-faint); }

.status-text { color: var(--oh-text); }
.status-text strong { font-weight: 500; }
.status-meta {
    color: var(--oh-text-dim);
    margin-left: auto;
    font-family: 'Geist Mono', monospace;
    font-size: 12px;
}

/* Score-widget (cirkel + meta) */
.score-widget {
    background: var(--oh-charcoal-light);
    border: 1px solid var(--oh-border);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.score-circle {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: conic-gradient(var(--oh-orange) 0deg var(--score-angle, 0deg), var(--oh-charcoal-lighter) var(--score-angle, 0deg) 360deg);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
}
.score-circle::after {
    content: '';
    position: absolute;
    inset: 7px;
    background: var(--oh-charcoal-light);
    border-radius: 50%;
}

.score-value {
    position: relative;
    z-index: 1;
    font-family: 'Geist Mono', monospace;
    font-size: 26px;
    font-weight: 600;
}

.score-meta { flex: 1; }
.score-title { font-size: 14px; color: var(--oh-text); font-weight: 500; margin-bottom: 4px; }
.score-delta { font-family: 'Geist Mono', monospace; font-size: 12px; color: var(--oh-text-dim); }
.score-delta.score-delta-up   { color: var(--oh-success); }
.score-delta.score-delta-down { color: var(--oh-error); }
.score-detail { font-size: 12px; color: var(--oh-text-dim); margin-top: 4px; }

/* Editerbara fält — overrida default-field-block för granska-kontext */
.granska-field { margin-bottom: 32px; }

.granska-field-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 10px;
    gap: 16px;
}

.granska-field-label {
    font-size: 11px;
    color: var(--oh-text-dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-family: 'Geist Mono', monospace;
}

.field-reset {
    font-size: 11px;
    color: var(--oh-text-faint);
    text-decoration: none;
    font-family: 'Geist Mono', monospace;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: color 0.15s;
}
.field-reset:hover { color: var(--oh-orange); }
.field-reset[disabled] { opacity: 0.4; cursor: not-allowed; }
.field-reset[disabled]:hover { color: var(--oh-text-faint); }

.field-textarea.large { min-height: 120px; }

/* Win-editor — inline-edit-look (transparent tills hover/focus) */
.win-editor {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.win-editor .win-item {
    background: var(--oh-charcoal-light);
    border: 1px solid var(--oh-border);
    border-radius: 8px;
    padding: 16px;
    position: relative;
}

.win-row-editable {
    display: grid;
    grid-template-columns: 32px 1fr auto;
    gap: 12px;
    align-items: start;
}

.win-row-editable .win-num {
    font-family: 'Geist Mono', monospace;
    color: var(--oh-orange);
    font-size: 12px;
    padding-top: 12px;
}

.win-title-input {
    width: 100%;
    background: transparent;
    border: 1px solid transparent;
    color: var(--oh-text);
    font-family: 'Geist', sans-serif;
    font-size: 15px;
    font-weight: 500;
    padding: 6px 10px;
    border-radius: 4px;
    transition: border-color 0.15s, background 0.15s;
}
.win-title-input:hover,
.win-title-input:focus {
    border-color: var(--oh-border-light);
    background: var(--oh-charcoal);
    outline: none;
}

.win-desc-input {
    width: 100%;
    background: transparent;
    border: 1px solid transparent;
    color: var(--oh-text-dim);
    font-family: 'Geist', sans-serif;
    font-size: 13px;
    padding: 6px 10px;
    border-radius: 4px;
    line-height: 1.5;
    resize: vertical;
    min-height: 40px;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.win-desc-input:hover,
.win-desc-input:focus {
    border-color: var(--oh-border-light);
    background: var(--oh-charcoal);
    color: var(--oh-text);
    outline: none;
}

.win-remove {
    background: transparent;
    border: 1px solid transparent;
    color: var(--oh-text-faint);
    font-family: 'Geist Mono', monospace;
    font-size: 11px;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 4px;
    transition: color 0.15s, border-color 0.15s;
    align-self: start;
}
.win-remove:hover { color: var(--oh-error); border-color: rgba(214, 105, 95, 0.3); }

.add-win-btn {
    margin-top: 12px;
    width: 100%;
    background: transparent;
    border: 1px dashed var(--oh-border-light);
    color: var(--oh-text-dim);
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Geist', sans-serif;
    font-size: 13px;
    transition: border-color 0.15s, color 0.15s, border-style 0.15s;
}
.add-win-btn:hover {
    border-color: var(--oh-orange);
    color: var(--oh-orange);
    border-style: solid;
}
.add-win-btn[disabled] { opacity: 0.4; cursor: not-allowed; }
.add-win-btn[disabled]:hover { border-color: var(--oh-border-light); color: var(--oh-text-dim); border-style: dashed; }

/* Quarterly suggestion-kandidater (read-only i Fas 1) */
.suggestion-list-readonly {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
}

.suggestion-readonly {
    background: var(--oh-charcoal-light);
    border: 1px solid var(--oh-border);
    border-radius: 8px;
    padding: 14px 18px;
    display: grid;
    grid-template-columns: 24px 1fr auto;
    gap: 14px;
    align-items: start;
}

.suggestion-readonly .suggestion-num {
    font-family: 'Geist Mono', monospace;
    color: var(--oh-orange);
    font-size: 12px;
    padding-top: 2px;
}

.suggestion-readonly .suggestion-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--oh-text);
    margin-bottom: 4px;
}

.suggestion-readonly .suggestion-desc {
    font-size: 13px;
    color: var(--oh-text-dim);
    line-height: 1.5;
}

.suggestion-impact {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    font-family: 'Geist Mono', monospace;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 500;
    flex-shrink: 0;
    border: 1px solid transparent;
    align-self: start;
}
.impact-hög    { background: rgba(255, 122, 61, 0.2); color: var(--oh-orange); border-color: rgba(255, 122, 61, 0.3); }
.impact-medel  { background: rgba(139, 134, 128, 0.15); color: var(--oh-text-dim); border-color: var(--oh-border); }
.impact-låg    { background: rgba(95, 88, 83, 0.15); color: var(--oh-text-faint); border-color: var(--oh-border); }

.suggestions-intro {
    background: var(--oh-charcoal-light);
    border-left: 3px solid var(--oh-orange);
    padding: 14px 18px;
    border-radius: 0 6px 6px 0;
    margin-bottom: 16px;
    font-size: 13px;
    color: var(--oh-text-dim);
}
.suggestions-intro strong { color: var(--oh-text); }

/* Action-bar fastsatt vid sidans nederkant */
.action-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--oh-charcoal-lighter);
    border-top: 1px solid var(--oh-border);
    padding: 16px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 50;
    backdrop-filter: blur(8px);
}

.action-status {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--oh-text-dim);
    font-family: 'Geist Mono', monospace;
}

.unsaved-indicator {
    width: 6px;
    height: 6px;
    background: var(--oh-warning);
    border-radius: 50%;
    flex-shrink: 0;
}
.unsaved-indicator.is-saved { background: var(--oh-success); }
.unsaved-indicator.is-pristine { background: var(--oh-text-faint); }

.action-buttons { display: flex; gap: 8px; }

.btn-secondary {
    background: transparent;
    color: var(--oh-text);
    border-color: var(--oh-border-light);
}
.btn-secondary:hover { background: var(--oh-charcoal); color: var(--oh-text); border-color: var(--oh-border-light); }

@media (max-width: 700px) {
    .action-bar { padding: 14px 20px; flex-direction: column; gap: 10px; align-items: stretch; }
    .action-buttons { justify-content: flex-end; }
    .win-row-editable { grid-template-columns: 28px 1fr; }
    .win-row-editable .win-remove { grid-column: 2; justify-self: end; }
    .suggestion-readonly { grid-template-columns: 24px 1fr; }
    .suggestion-readonly .suggestion-impact { grid-column: 2; justify-self: start; }
}

/* ============ SÄSONGSHANTERING (kund-CRUD) ============ */
.season-toggle {
    margin-bottom: 18px;
}

.season-fields {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding-top: 8px;
    margin-top: 4px;
    border-top: 1px dashed var(--oh-border);
}

.season-fields[hidden] { display: none; }

.season-months-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
}

@media (max-width: 700px) {
    .season-months-grid { grid-template-columns: repeat(3, 1fr); }
}

.season-month {
    background: var(--oh-charcoal);
    border: 1px solid var(--oh-border);
    border-radius: 6px;
    padding: 8px 10px;
    font-family: 'Geist Mono', monospace;
    font-size: 11px;
    text-align: center;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.season-month-name {
    display: block;
    font-size: 10px;
    color: var(--oh-text-dim);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 2px;
}

.season-month-state {
    display: block;
    font-size: 11px;
    color: var(--oh-text-faint);
}

.season-month[data-state="high"] {
    background: rgba(255, 122, 61, 0.12);
    border-color: rgba(255, 122, 61, 0.4);
    color: var(--oh-orange);
}
.season-month[data-state="high"] .season-month-state { color: var(--oh-orange); }
.season-month[data-state="high"] .season-month-name  { color: var(--oh-orange); }

.season-month[data-state="low"] {
    background: var(--oh-charcoal);
    border-color: var(--oh-border-light);
    color: var(--oh-text-dim);
}

.season-month-legend {
    font-size: 12px;
    color: var(--oh-text-faint);
    font-family: 'Geist Mono', monospace;
    margin-top: 6px;
}
