﻿
/* ==========================================================
   SWESUND EKONOMI
   WORKSPACE DESIGN FOUNDATION v9.7.1

   Shared visual language for:
   Bokföring
   Avstämning
   Bokslut
   Årsredovisning
   Skatt
   Rapporter
   ========================================================== */


/* ----------------------------------------------------------
   PAGE
   ---------------------------------------------------------- */

.se-page{
  display:grid;
  gap:16px;
  width:100%;
}

.se-page-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:18px;
}

.se-page-title{
  min-width:0;
}

.se-kicker{
  margin:0 0 5px;
  font-size:10px;
  font-weight:900;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:#b77a05;
}

.se-page h1{
  margin:0;
  color:#073657;
  font-size:30px;
  line-height:1.1;
  letter-spacing:-.02em;
}

.se-page-subtitle{
  margin:7px 0 0;
  max-width:760px;
  color:#66809a;
  font-size:12px;
  line-height:1.55;
}

.se-page-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
}


/* ----------------------------------------------------------
   PERIOD / META
   ---------------------------------------------------------- */

.se-period-meta{
  display:flex;
  align-items:center;
  gap:10px;
  min-height:22px;
  color:#71879b;
  font-size:10px;
}

.se-period-meta strong{
  color:#0b3859;
  font-weight:800;
}


/* ----------------------------------------------------------
   KPI
   ---------------------------------------------------------- */

.se-kpi-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
}

.se-kpi-card{
  min-height:104px;
  padding:16px 18px;
  background:#fff;
  border:1px solid #d8e3ec;
  border-top:3px solid #24a46d;
  border-radius:14px;
}

.se-kpi-card.warning{
  border-top-color:#cf9516;
}

.se-kpi-card.danger{
  border-top-color:#cf6649;
}

.se-kpi-card.neutral{
  border-top-color:#b9c7d3;
}

.se-kpi-card small{
  display:block;
  color:#70869a;
  font-size:9px;
  font-weight:900;
  letter-spacing:.07em;
  text-transform:uppercase;
}

.se-kpi-card strong{
  display:block;
  margin-top:7px;
  color:#073555;
  font-size:25px;
  line-height:1.05;
}

.se-kpi-card span{
  display:block;
  margin-top:5px;
  color:#8093a4;
  font-size:9px;
}


/* ----------------------------------------------------------
   PANELS
   ---------------------------------------------------------- */

.se-panel{
  overflow:hidden;
  background:#fff;
  border:1px solid #d8e3ec;
  border-radius:14px;
}

.se-panel-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  min-height:72px;
  padding:15px 18px;
  border-bottom:1px solid #e2eaf0;
}

.se-panel-head h2{
  margin:0;
  color:#0b3656;
  font-size:15px;
}

.se-panel-head p{
  margin:4px 0 0;
  color:#71869a;
  font-size:10px;
}

.se-panel-tools{
  display:flex;
  align-items:center;
  gap:12px;
}


/* ----------------------------------------------------------
   INPUTS
   ---------------------------------------------------------- */

.se-search,
.se-input,
.se-select,
.se-textarea{
  border:1px solid #ccd9e4;
  border-radius:9px;
  background:#fff;
  color:#173b57;
  outline:none;
  transition:border-color .15s ease, box-shadow .15s ease;
}

.se-search,
.se-input,
.se-select{
  height:38px;
  padding:0 11px;
}

.se-textarea{
  padding:10px 11px;
  resize:vertical;
}

.se-search:focus,
.se-input:focus,
.se-select:focus,
.se-textarea:focus{
  border-color:#9eb6c8;
  box-shadow:0 0 0 3px rgba(12,65,100,.06);
}


/* ----------------------------------------------------------
   TABLE
   ---------------------------------------------------------- */

.se-table-wrap{
  width:100%;
  overflow:auto;
}

.se-table{
  width:100%;
  border-collapse:collapse;
}

.se-table th,
.se-table td{
  padding:12px 14px;
  border-bottom:1px solid #edf2f6;
  text-align:left;
  vertical-align:middle;
}

.se-table th{
  background:#f8fafc;
  color:#708498;
  font-size:9px;
  font-weight:900;
  letter-spacing:.05em;
  text-transform:uppercase;
}

.se-table td{
  color:#173b58;
  font-size:10px;
}

.se-table td strong{
  color:#0c3857;
}

.se-table td small{
  display:block;
  margin-top:3px;
  color:#8497a8;
  font-size:9px;
}

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

.se-table tbody tr:hover{
  background:#fbfcfd;
}


/* ----------------------------------------------------------
   STATUS
   ---------------------------------------------------------- */

.se-status{
  display:inline-flex;
  align-items:center;
  min-height:24px;
  padding:4px 9px;
  border-radius:999px;
  font-size:9px;
  font-weight:900;
  white-space:nowrap;
}

.se-status.neutral{
  background:#edf2f5;
  color:#657e91;
}

.se-status.progress{
  background:#fff0c9;
  color:#886200;
}

.se-status.good{
  background:#e1f3e9;
  color:#147147;
}

.se-status.warning{
  background:#fde9df;
  color:#a34b34;
}

.se-status.reviewed{
  background:#dcefe7;
  color:#10683f;
}


/* ----------------------------------------------------------
   EMPTY STATE
   ---------------------------------------------------------- */

.se-empty-state{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  min-height:180px;
  padding:32px;
  text-align:center;
}

.se-empty-icon{
  display:flex;
  align-items:center;
  justify-content:center;
  width:42px;
  height:42px;
  margin-bottom:12px;
  border-radius:12px;
  background:#f0f5f8;
  color:#0c466d;
  font-size:18px;
}

.se-empty-state strong{
  color:#123b59;
  font-size:13px;
}

.se-empty-state p{
  max-width:520px;
  margin:6px 0 0;
  color:#768b9d;
  font-size:10px;
  line-height:1.55;
}


/* ----------------------------------------------------------
   DRAWER
   ---------------------------------------------------------- */

.se-drawer{
  position:fixed;
  inset:0;
  z-index:5000;
}

.se-drawer-overlay{
  position:absolute;
  inset:0;
  background:rgba(4,30,49,.25);
}

.se-drawer-panel{
  position:absolute;
  top:0;
  right:0;
  bottom:0;
  width:min(760px,92vw);
  padding:22px;
  overflow:auto;
  background:#fff;
  box-shadow:-18px 0 45px rgba(11,39,60,.15);
}


/* ----------------------------------------------------------
   RESPONSIVE
   ---------------------------------------------------------- */

@media(max-width:1100px){
  .se-kpi-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media(max-width:720px){
  .se-page-head,
  .se-panel-head{
    flex-direction:column;
    align-items:stretch;
  }

  .se-kpi-grid{
    grid-template-columns:1fr;
  }

  .se-panel-tools{
    flex-wrap:wrap;
  }
}

