body{
  margin:0;
  font-family:Arial, sans-serif;
  background:#f4f6f9;
  color:#222;
}

header{
  background:#1f2937;
  color:#fff;
  padding:15px;
  font-weight:bold;
  font-size:20px;
}

.container{
  display:flex;
  min-height:100vh;
}

.sidebar{
  width:220px;
  background:#fff;
  padding:15px;
  box-shadow:0 2px 8px rgba(0,0,0,.08);
}

.sidebar a{
  display:block;
  margin-bottom:10px;
  text-decoration:none;
  color:#111;
  padding:10px 12px;
  border-radius:10px;
}

.sidebar a:hover{
  background:#eef2f7;
}

.main{
  flex:1;
  padding:20px;
}

.card{
  background:#fff;
  padding:15px;
  margin-bottom:15px;
  border-radius:12px;
  box-shadow:0 2px 10px rgba(0,0,0,.06);
}

input,
select,
textarea{
  display:block;
  width:100%;
  margin-bottom:10px;
  padding:12px;
  border:1px solid #d1d5db;
  border-radius:10px;
  font-size:16px;
  box-sizing:border-box;
}

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

th, td{
  padding:8px;
  text-align:left;
  vertical-align:top;
}

button,
.primary{
  background:#2ea3ff;
  color:#fff;
  padding:12px 14px;
  border:none;
  border-radius:10px;
  text-decoration:none;
  cursor:pointer;
  font-size:16px;
}

button:hover,
.primary:hover{
  opacity:.95;
}

.summary{
  font-size:16px;
  line-height:1.7;
}

/* Mobil */
@media (max-width: 900px){
  .container{
    flex-direction:column;
  }

  .sidebar{
    width:auto;
    display:flex;
    gap:10px;
    overflow-x:auto;
    white-space:nowrap;
    padding:12px;
  }

  .sidebar a{
    margin-bottom:0;
    flex:0 0 auto;
  }

  .main{
    padding:12px;
  }
}

@media (max-width: 700px){
  header{
    font-size:18px;
    padding:12px;
  }

  .card{
    padding:12px;
    border-radius:10px;
  }

  h2, h3{
    margin-top:0;
  }

  table, thead, tbody, th, td, tr{
    display:block;
    width:100%;
  }

  thead{
    display:none;
  }

  #items tr{
    background:#f9fafb;
    border:1px solid #e5e7eb;
    border-radius:10px;
    padding:10px;
    margin-bottom:10px;
  }

  #items td{
    padding:4px 0;
  }

  #items td::before{
    display:block;
    font-size:12px;
    color:#666;
    margin-bottom:4px;
  }

  #items tr td:nth-child(1)::before{ content:"Tjänst"; }
  #items tr td:nth-child(2)::before{ content:"Antal"; }
  #items tr td:nth-child(3)::before{ content:"Pris"; }
  #items tr td:nth-child(4)::before{ content:"Åtgärd"; }

  button,
  .primary{
    width:100%;
    text-align:center;
  }
}

/* Fakturatabell ska inte spränga layouten */
#items{
  width:100%;
  table-layout:fixed;
  border-collapse:collapse;
}

#items th,
#items td{
  word-wrap:break-word;
  overflow-wrap:anywhere;
}

#items input,
#items select,
#items button{
  width:100%;
  max-width:100%;
  box-sizing:border-box;
}

/* Gör pris/moms bättre på mindre skärmar */
@media (max-width: 700px){
  #items{
    display:block;
    width:100%;
  }

  #items tr{
    display:block;
    width:100%;
    margin-bottom:10px;
  }

  #items td{
    display:block;
    width:100%;
  }

  #items input,
  #items select,
  #items button{
    width:100%;
    min-width:0;
  }
}

.topbar {
  display:flex;
  justify-content:space-between;
  align-items:center;
  background:#1f2a3a;
  padding:0 20px;
  height:80px;
}

.logo {
  height:76px;
  width:auto;
  display:block;
}

.nav a {
  color:#fff;
  text-decoration:none;
  margin-left:10px;
  padding:8px 12px;
  border-radius:10px;
  background:rgba(255,255,255,.12);
  font-size:14px;
}

.content {
  padding:20px;
}


/* Theme variables */
body.theme-dark, body.theme-blue {
  --bg: #0b1220;
  --card: #111a2b;
  --text: #ffffff;
  --muted: #8ea2c0;
  --accent: #2ea3ff;
}

body.theme-green {
  --bg: #0b1220;
  --card: #102018;
  --text: #ffffff;
  --muted: #9bc7aa;
  --accent: #22c55e;
}

body.theme-yellow {
  --bg: #050505;
  --card: #111111;
  --text: #facc15;
  --muted: #b5a85a;
  --accent: #facc15;
}

body.theme-light {
  --bg: #f4f6f9;
  --card: #ffffff;
  --text: #111827;
  --muted: #4b5563;
  --accent: #2563eb;
}

body.theme-light input,
body.theme-light select,
body.theme-light textarea {
  background:#ffffff;
  color:#111827;
  border:1px solid #cbd5e1;
}

body.theme-light .card,
body.theme-light .panel,
body.theme-light .stat-card,
body.theme-light .action-btn {
  background:var(--card) !important;
  color:var(--text) !important;
  border-color:#d1d5db !important;
}

body.theme-light h1,
body.theme-light h2,
body.theme-light h3,
body.theme-light p,
body.theme-light label,
body.theme-light td,
body.theme-light th {
  color:var(--text);
}

body.theme-light .topbar {
  background:#ffffff !important;
  border-bottom:1px solid #d1d5db !important;
}

body.theme-light .nav a {
  background:#eef2ff !important;
  color:#111827 !important;
}

/* Theme polish override */
body.theme-dark {
  --bg: #0b1220;
  --card: rgba(17,26,43,.82);
  --text: #ffffff;
  --muted: #8ea2c0;
  --accent: #2ea3ff;
}

body.theme-blue {
  --bg: #061a35;
  --card: rgba(12,38,78,.86);
  --text: #ffffff;
  --muted: #a8c7ff;
  --accent: #3b82f6;
}

body.theme-green {
  --bg: #061f16;
  --card: rgba(10,48,34,.86);
  --text: #ffffff;
  --muted: #a7f3d0;
  --accent: #22c55e;
}

body.theme-yellow {
  --bg: #15120a;
  --card: rgba(31,27,16,.88);
  --text: #fff7cc;
  --muted: #d6c77a;
  --accent: #facc15;
}

body.theme-light {
  --bg: #f4f6f9;
  --card: #ffffff;
  --text: #111827;
  --muted: #4b5563;
  --accent: #2563eb;
}

body.theme-dark,
body.theme-blue,
body.theme-green,
body.theme-yellow,
body.theme-light{
  background:var(--bg) !important;
  color:var(--text) !important;
}

body.theme-dark .card,
body.theme-blue .card,
body.theme-green .card,
body.theme-yellow .card,
body.theme-dark .panel,
body.theme-blue .panel,
body.theme-green .panel,
body.theme-yellow .panel,
body.theme-dark .stat-card,
body.theme-blue .stat-card,
body.theme-green .stat-card,
body.theme-yellow .stat-card,
body.theme-dark .action-btn,
body.theme-blue .action-btn,
body.theme-green .action-btn,
body.theme-yellow .action-btn {
  background:var(--card) !important;
  color:var(--text) !important;
}

body.theme-blue .topbar,
body.theme-green .topbar,
body.theme-yellow .topbar {
  background:rgba(10,14,24,.72) !important;
}

body.theme-blue .action-btn:hover,
body.theme-green .action-btn:hover,
body.theme-yellow .action-btn:hover {
  border-color:var(--accent) !important;
  box-shadow:0 18px 40px rgba(0,0,0,.3),0 0 22px color-mix(in srgb, var(--accent) 35%, transparent) !important;
}

body.theme-blue a,
body.theme-green a,
body.theme-yellow a {
  color:var(--accent);
}

body.theme-yellow .info-grid,
body.theme-yellow .actions,
body.theme-yellow .stats {
  background:transparent !important;
}

.projsa-price-info{
  max-width:720px;
  margin:14px auto 24px auto;
  padding:12px 14px;
  border-radius:14px;
  background:rgba(255,255,255,0.07);
  border:1px solid rgba(255,255,255,0.12);
  color:#e5e7eb;
  font-size:14px;
  line-height:1.5;
}
.projsa-price-info b{
  color:#fff;
}

.logo{
height:42px;
width:auto;
background:#fff;
padding:4px 8px;
border-radius:10px;
}

