/* portal.css — LAWET inloggade portaler (Fortnox-lik dashboard).
   Fas 1: statiskt skal. Blir frontend för Laravel-appen (Fas 2+). */

:root {
  --pf-bg:        #0d1117;
  --pf-sidebar:   #0a0d12;
  --pf-card:      #161b22;
  --pf-card-2:    #1c2230;
  --pf-border:    #262d38;
  --pf-text:      #e6edf3;
  --pf-muted:     #8b95a3;
  --pf-faint:     #5a6675;
  --pf-accent:    #E97F34;
  --pf-green:     #3fb950;
}

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

body.portal {
  font-family: 'Inter', -apple-system, Arial, sans-serif;
  background: var(--pf-bg);
  color: var(--pf-text);
  display: flex;
  min-height: 100vh;
  font-size: 14px;
}

/* ---------- Sidebar ---------- */
.pf-sidebar {
  width: 200px;
  min-width: 200px;
  background: var(--pf-sidebar);
  border-right: 1px solid var(--pf-border);
  display: flex;
  flex-direction: column;
  padding: 22px 0 18px;
}
.pf-logo {
  font-family: 'Jura', sans-serif;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 1px;
  padding: 0 22px 18px;
  color: #fff;
}
.pf-logo .dot { color: var(--pf-accent); }
.pf-portal-label {
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--pf-accent);
  padding: 0 22px 14px;
}
.pf-nav { display: flex; flex-direction: column; }
.pf-nav a {
  padding: 11px 22px;
  color: var(--pf-muted);
  text-decoration: none;
  border-left: 3px solid transparent;
  font-size: 14px;
}
.pf-nav a:hover { color: var(--pf-text); background: rgba(255,255,255,.03); }
.pf-nav a.active {
  color: #fff;
  background: rgba(233,127,52,.08);
  border-left-color: var(--pf-accent);
}
.pf-sidebar-foot {
  margin-top: auto;
  padding: 16px 22px 0;
  border-top: 1px solid var(--pf-border);
  font-size: 12px;
  color: var(--pf-faint);
}
.pf-sidebar-foot .org { color: var(--pf-text); font-weight: 600; margin: 4px 0 10px; }
.pf-sidebar-foot a { color: var(--pf-muted); text-decoration: none; }
.pf-sidebar-foot a:hover { color: var(--pf-accent); }

/* ---------- Main ---------- */
.pf-main { flex: 1; padding: 26px 34px; overflow-y: auto; }
.pf-header {
  display: flex; align-items: baseline; justify-content: space-between;
  border-bottom: 1px solid var(--pf-border);
  padding-bottom: 18px; margin-bottom: 24px;
}
.pf-header h1 { font-family: 'Jura', sans-serif; font-size: 24px; font-weight: 700; }
.pf-date { color: var(--pf-muted); font-size: 13px; }

/* KPI cards */
.pf-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 30px; }
.pf-kpi {
  background: var(--pf-card);
  border: 1px solid var(--pf-border);
  border-top: 3px solid var(--pf-border);
  border-radius: 8px;
  padding: 18px 20px;
}
.pf-kpi.active { border-top-color: var(--pf-accent); }
.pf-kpi .num { font-family: 'Jura', sans-serif; font-size: 34px; font-weight: 700; line-height: 1; }
.pf-kpi .lbl { color: var(--pf-muted); font-size: 12px; margin-top: 8px; }

/* Sections */
.pf-section { margin-bottom: 30px; }
.pf-section > h2 { font-family: 'Jura', sans-serif; font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.pf-section .sub { color: var(--pf-muted); font-size: 12px; margin-bottom: 14px; }

/* Tables */
.pf-table { width: 100%; border-collapse: collapse; }
.pf-table th {
  text-align: left; font-size: 11px; letter-spacing: .5px; text-transform: uppercase;
  color: var(--pf-accent); font-weight: 700; padding: 0 12px 10px;
}
.pf-table td { padding: 15px 12px; border-top: 1px solid var(--pf-border); font-size: 14px; }
.pf-table tr:first-child td { border-top: none; }
.pf-mono { font-variant-numeric: tabular-nums; color: var(--pf-text); }

/* Status chips / links */
.pf-status { font-size: 13px; font-weight: 600; }
.pf-status.green { color: var(--pf-green); }
.pf-status.open  { color: var(--pf-accent); }
.pf-status.muted { color: var(--pf-muted); }
.pf-link { color: var(--pf-accent); text-decoration: none; font-weight: 600; }
.pf-link:hover { text-decoration: underline; }

/* Rows (non-table lists) */
.pf-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 4px; border-top: 1px solid var(--pf-border);
}
.pf-row:first-of-type { border-top: none; }
.pf-row .rid { font-size: 11px; color: var(--pf-faint); letter-spacing: .5px; }
.pf-row .rtitle { font-weight: 600; margin-top: 2px; }
.pf-row .rmeta { color: var(--pf-muted); font-size: 13px; }

/* Time-report card */
.pf-timecard {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--pf-card); border: 1px solid var(--pf-border);
  border-radius: 8px; padding: 16px 20px;
}
.pf-timecard .prog { color: var(--pf-muted); font-size: 12px; margin-top: 4px; }

/* Buttons */
.pf-btn {
  display: inline-block; background: var(--pf-accent); color: #12161c;
  border: none; border-radius: 7px; padding: 10px 18px; font-weight: 700;
  font-size: 13px; cursor: pointer; text-decoration: none;
}
.pf-btn:hover { filter: brightness(1.06); }
.pf-btn.ghost { background: transparent; color: var(--pf-accent); border: 1px solid var(--pf-accent); }

/* Prototyp-banner */
.pf-proto {
  background: rgba(233,127,52,.12); border: 1px solid rgba(233,127,52,.4);
  color: var(--pf-accent); font-size: 12px; border-radius: 7px;
  padding: 9px 14px; margin-bottom: 22px;
}

/* ── Innehållsskydd (avskräckande hinder – ej vattentätt) ── */
body { -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; }
input, textarea, select, [contenteditable="true"], .selectable, .selectable * {
  -webkit-user-select: text; -moz-user-select: text; -ms-user-select: text; user-select: text;
}
img { -webkit-user-drag: none; -khtml-user-drag: none; -moz-user-drag: none; -o-user-drag: none; user-drag: none; -webkit-touch-callout: none; }
