/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* greenhouse — minimal, svartvitt i släkt med gronare, plus växthusgrön accent */
:root { --ink: #1a1a1a; --muted: #737373; --line: #e5e5e5; --soft: #fafafa; --accent: #2e7d4f; --warn: #b45309; --crit: #b91c1c; }
body { font-family: ui-sans-serif, system-ui, sans-serif; color: var(--ink); margin: 0; border-top: 3px solid var(--accent); }
.topnav { display: flex; gap: 1.5rem; align-items: baseline; padding: 1rem 2rem; border-bottom: 1px solid #e5e5e5; }
.topnav a { color: #1a1a1a; text-decoration: none; }
.topnav-right { margin-left: auto; display: flex; gap: 1.5rem; align-items: baseline; }
.topnav-right form { display: inline; }
.linklike { background: none; border: 0; padding: 0; color: #737373; cursor: pointer; font: inherit; }
.flash { padding: 0.6rem 2rem; font-size: 0.9rem; }
.flash-notice { background: #f0f7f0; color: #1a4d1a; }
.flash-alert { background: #fdf0f0; color: #7a1a1a; }
.qr svg { max-width: 220px; height: auto; }
body.auth { display: grid; place-items: center; min-height: 100vh; background: #fafafa; }
.auth-card { max-width: 22rem; width: 100%; background: #fff; border: 1px solid #e5e5e5; padding: 2.5rem; }
.auth-brand { display: block; margin-bottom: 1.5rem; }
.auth-card input[type="email"], .auth-card input[type="password"], .auth-card input[type="text"] { width: 100%; box-sizing: border-box; padding: 0.5rem; margin: 0.25rem 0 0.75rem; border: 1px solid #d4d4d4; font: inherit; }
main { padding: 2rem; max-width: 70rem; }
.page-head { display: flex; justify-content: space-between; align-items: baseline; }
h1, h2 { font-weight: 600; text-transform: lowercase; }
table { border-collapse: collapse; width: 100%; margin-top: 1rem; }
th { text-align: left; font-size: 0.7rem; letter-spacing: 0.15em; text-transform: uppercase; color: #737373; }
th, td { padding: 0.6rem 0.75rem 0.6rem 0; border-bottom: 1px solid #e5e5e5; }
.mono { font-family: ui-monospace, monospace; font-size: 0.85em; }
.muted { color: #737373; }
.btn { background: #0a0a0a; color: #fff; border: 0; padding: 0.5rem 1rem; cursor: pointer; }
.timeline { list-style: none; padding: 0; }
.timeline li { padding: 0.5rem 0; border-bottom: 1px solid #eee; display: flex; gap: 1rem; }
.timeline .kind { font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: #737373; align-self: center; }

/* dashboard */
.head-note { font-size: 0.85rem; display: flex; gap: 0.4rem; align-items: baseline; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); margin: 1.5rem 0 2rem; }
.kpi { background: #fff; padding: 1.1rem 1.25rem; text-decoration: none; display: block; }
.kpi:hover { background: var(--soft); }
.kpi .n { font-size: 1.9rem; font-weight: 300; font-variant-numeric: tabular-nums; line-height: 1.1; }
.kpi .n small { font-size: 1rem; color: var(--muted); font-weight: 400; }
.kpi .l { font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-top: 0.3rem; }
.kpi.attn .n { color: var(--warn); }
.num { font-variant-numeric: tabular-nums; }
.cols { display: grid; grid-template-columns: 3fr 2fr; gap: 2.5rem; align-items: start; }
@media (max-width: 56rem) { .cols { grid-template-columns: 1fr; } }
.tablewrap { overflow-x: auto; }
.mt { margin-top: 1rem; }

/* statuschips */
.chip { display: inline-block; font-size: 0.72rem; padding: 0.15rem 0.55rem; border-radius: 2px; white-space: nowrap; }
.chip.ok { background: #eef6f0; color: var(--accent); }
.chip.warn { background: #fbf3e8; color: var(--warn); }
.chip.crit { background: #fdf0f0; color: var(--crit); }
.chip.still { background: #f1f5f9; color: #475569; }

/* händelseflöde */
.feed { list-style: none; padding: 0; margin: 0; }
.feed li { display: grid; grid-template-columns: 6.5rem 1fr auto; gap: 0.9rem; padding: 0.55rem 0; border-bottom: 1px solid #f0f0f0; font-size: 0.9rem; align-items: baseline; }
.feed .kind { font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.feed .kind::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #d4d4d4; margin-right: 0.45rem; position: relative; top: -1px; }
.feed .kind.k-form::before, .feed .kind.k-pay::before { background: var(--accent); }
.feed .kind.k-invoice::before { background: #64748b; }
.feed .kind.k-deploy::before { background: #0ea5e9; }
.feed .kind.k-mail::before { background: #a855f7; }
.feed time { color: var(--muted); font-size: 0.78rem; font-variant-numeric: tabular-nums; }

/* kundvy */
.cust-head { display: flex; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.cust-meta { font-size: 0.88rem; margin-top: -0.5rem; }
.panel { border: 1px solid var(--line); padding: 1.1rem 1.25rem; margin-bottom: 1.25rem; }
.panel h2 { margin-top: 0; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 0.3rem 1.25rem; font-size: 0.9rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.sitecard { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: 0.5rem 0; border-bottom: 1px solid #f0f0f0; font-size: 0.9rem; }
.sitecard:last-child { border-bottom: 0; }

/* sajtadmin + formulär */
.section-gap { margin-top: 2.5rem; }
.h2-note { font-weight: 400; font-size: 0.85em; }
.btn.ghost { background: none; color: var(--ink); border: 1px solid var(--line); }
.btn.small { font-size: 0.78rem; padding: 0.3rem 0.7rem; }
.head-note .btn { text-decoration: none; display: inline-block; }
.narrow { max-width: 24rem; display: flex; flex-direction: column; gap: 0.25rem; }
.narrow label { font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-top: 0.8rem; }
.narrow input[type="text"], .narrow input[type="email"], .narrow input[type="tel"], .narrow input[type="date"], .narrow input[type="number"], .narrow select, .narrow textarea { padding: 0.5rem; border: 1px solid #d4d4d4; font: inherit; }
.head-actions { margin-left: auto; display: flex; gap: 0.5rem; }
.head-actions .btn { text-decoration: none; }
.row-dim td { color: var(--muted); }
.unread-dot { color: var(--accent); }
blockquote.message { border-left: 3px solid var(--line); margin: 1.25rem 0; padding-left: 1rem; font-size: 0.95rem; }
.checklist { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.9rem; }
.checklist .check { all: unset; cursor: pointer; }
.panel-action { font-size: 0.75rem; font-weight: 400; text-transform: none; margin-left: 0.6rem; }
.inline-add { display: flex; gap: 0.5rem; margin-top: 0.8rem; }
.inline-add input[type="email"] { flex: 1; padding: 0.4rem; border: 1px solid #d4d4d4; font: inherit; font-size: 0.85rem; }
.kv .linklike, .kv form { display: inline; }
.narrow .btn { margin-top: 1.2rem; align-self: flex-start; }
.small-note { font-size: 0.8rem; }
