* {
  box-sizing: border-box;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

body {
  margin: 0;
  background: #f4f6f8;
  color: #1f2937;
}

/* Layout */
.container {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
}

.card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  padding: 20px;
  margin-bottom: 20px;
}

/* Header / Topbar */
.header,
.topbar {
  background: #1f2937;
  color: #fff;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header a,
.topbar a {
  color: #93c5fd;
  margin-left: 15px;
}

/* Headings */
h1 { font-size: 26px; margin-top: 0; }
h2 {
  font-size: 22px;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 6px;
}
h3 { font-size: 18px; }

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
}

th {
  background: #f1f5f9;
  padding: 10px;
  font-size: 14px;
  text-align: left;
}

td {
  padding: 10px;
  border-bottom: 1px solid #e5e7eb;
  vertical-align: top;
}

tr:hover {
  background: #f9fafb;
}

td.work-desc {
  color: #374151;
  max-width: 450px;
  line-height: 1.4;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 6px;
  background: #2563eb;
  color: #fff;
  font-size: 14px;
  text-decoration: none;
}

.btn:hover {
  background: #1e40af;
}

.btn.small {
  padding: 4px 8px;
}

/* Filters */
.filters {
  background: #fff;
  padding: 20px;
  margin: 20px;
  border-radius: 8px;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.filter-actions {
  margin-top: 12px;
  display: flex;
  gap: 12px;
}

/* Inputs */
input,
select {
  padding: 8px;
  border-radius: 4px;
  border: 1px solid #ccc;
}

/* Pagination */
.pagination {
  text-align: center;
  padding: 20px;
}

.pagination a {
  margin: 0 10px;
  font-weight: bold;
  text-decoration: none;
}




.clickable-row {
  cursor: pointer;
}

.clickable-row:hover {
  background: #e0f2fe;
}

/* ===================================
   ENJ LOGIN – Järnvägstema
=================================== */

.login-page {
    margin: 0;
}

.login-bg {
    min-height: 100vh;
    position: relative;

    /* Bakgrundsbild */
    background-image: url("img/karrgruvan.jpg");
    background-size: cover;
    background-position: center;
}

/* Mörk toning över bilden */
.login-bg::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        rgba(10,15,25,0.55),
        rgba(10,15,25,0.75)
    );
}

/* Centrering */
.login-center {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Själva rutan */
.login-box-modern {
    width: 380px;
    background: rgba(255,255,255,0.95);
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    text-align: center;
}

/* Header */
.login-header h1 {
    margin: 10px 0 5px;
    font-size: 24px;
    color: #1f2937;
}

.login-org {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 20px;
}

.login-logo {
    width: 120px;
    margin-bottom: 5px;
}

/* Inputs */
.login-box-modern label {
    display: block;
    text-align: left;
    font-size: 13px;
    margin-top: 12px;
    color: #374151;
}

.login-box-modern input {
    width: 100%;
    padding: 10px;
    margin-top: 4px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
}

/* ENJ-knapp (guld/orange inspirerad av rälsbuss) */
.login-button {
    width: 100%;
    margin-top: 18px;
    padding: 12px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;

    background: linear-gradient(#facc15, #f59e0b);
    color: #111827;
}

.login-button:hover {
    filter: brightness(1.05);
}

/* Alternativ knapp (t.ex. Microsoft) */
.login-button-secondary {
    display: inline-block;
    width: 100%;
    margin-top: 10px;
    padding: 12px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    text-decoration: none;

    background: #111827;
    color: #ffffff;
}

.login-button-secondary:hover {
    filter: brightness(1.08);
}

/* Felruta */
.login-error {
    background: #fee2e2;
    color: #b91c1c;
    padding: 8px;
    border-radius: 6px;
    margin-bottom: 10px;
}

/* Footer */
.login-footer {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    text-align: center;
    color: rgba(255,255,255,0.8);
    font-size: 12px;
}

/* =========================
   DASHBOARD THEME (ENJ)
   ========================= */

.dashboard-page {
  min-height: 100vh;
  background: #0b1220;
}

.dashboard-hero {
  min-height: calc(100vh - 56px);
  background-image: url("img/angelsberg.JPG");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
}

.dashboard-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(1200px 650px at 20% 10%, rgba(245, 203, 70, 0.14), transparent 55%),
    linear-gradient(180deg, rgba(11,18,32,0.55), rgba(11,18,32,0.88));
}

.dashboard-wrap {
  position: relative;
  padding: 28px 0 48px;
}

.dashboard-shell {
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.18);
  backdrop-filter: blur(10px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
  border-radius: 16px;
  padding: 22px;
}

.dashboard-shell h1,
.dashboard-shell p {
  color: #374151;
}

.dashboard-shell p {
  color: rgba(255,255,255,0.85);
}

/* lite “järnvägsskylt”-känsla på rubrik */
.dashboard-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 8px 0;
}

.dashboard-title .badge-rail {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(245, 203, 70, 0.18);
  border: 1px solid rgba(245, 203, 70, 0.35);
  color: rgba(255,255,255,0.95);
  font-size: 12px;
  font-weight: 700;
}

/* cards */
.dashboard-item {
  background: rgba(255,255,255,0.90);
  border: 1px solid rgba(255,255,255,0.85);
  border-radius: 12px;
  padding: 18px;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.dashboard-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(0,0,0,0.18);
}

.dashboard-item .icon {
  font-size: 40px;
  line-height: 1;
  margin-bottom: 8px;
}

.dashboard-item h3 {
  margin: 8px 0 6px;
}

.dashboard-item p {
  margin: 0 0 12px;
  color: #374151;
}

/* disabled cards */
.dashboard-item.disabled {
  background: rgba(255,255,255,0.65);
  opacity: 0.75;
}

.dashboard-item.disabled:hover {
  transform: none;
  box-shadow: none;
}

.dashboard-section {
  margin-top: 16px;
}

.dashboard-section h2 {
  color: rgba(255,255,255,0.95);
  border-bottom: 1px solid rgba(255,255,255,0.25);
}

/* ===== Gemensam header ===== */

.eps-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #1f2937;
    color: #fff;
    padding: 10px 15px;
}

.eps-left,
.eps-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.eps-btn {
    background: #374151;
    color: #fff;
    padding: 6px 10px;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
}

.eps-btn:hover {
    background: #4b5563;
}

.eps-logout {
    background: #dc2626;
}

.eps-user-chip {
    background: #374151;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 13px;
}

.eps-content {
    padding: 15px;
}

/* ===== Footer ===== */

.eps-footer {
    text-align: center;
    padding: 10px;
    margin-top: 30px;
    color: #666;
    font-size: 12px;
}

.user-chip {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  margin-left: 16px;
}
.user-chip .who { font-weight: 700; font-size: 13px; line-height: 1.1; }
.user-chip .role { font-size: 12px; opacity: 0.9; }
.user-chip .perms { font-size: 11px; opacity: 0.75; }

/* ===== Wizard-lik layout (scopat) ===== */
/* ===== Wizard-lik layout (endast inne i .wizard-like) ===== */
.wizard-like .wizard-steps { display:flex; gap:8px; flex-wrap:wrap; margin: 10px 0 18px; }
.wizard-like .wizard-step { padding:6px 10px; border-radius:999px; border:1px solid #ddd; background:#fff; font-size: 13px; }
.wizard-like .wizard-step.active { border-color:#111827; font-weight:600; }

.wizard-like .grid-2 { display:grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.wizard-like .card { 
  background:#fff; 
  border:1px solid #e5e7eb; 
  border-radius: 12px; 
  padding: 14px; 
  margin-bottom: 14px; 
  box-shadow: none; /* viktigt: annars får du din globala shadow från .card */
}
.wizard-like .card h2, 
.wizard-like .card h3 { margin-top:0; }

.wizard-like label { display:block; font-weight:600; margin: 10px 0 4px; }
.wizard-like input, 
.wizard-like select, 
.wizard-like textarea { width:100%; }
.wizard-like textarea { min-height: 90px; }

.wizard-like .actions { display:flex; justify-content:space-between; gap:10px; margin-top: 16px; }
.wizard-like .error { background:#fff5f5; border:1px solid #fecaca; padding:10px; border-radius: 10px; margin-bottom: 14px; }
.wizard-like .muted { color:#666; font-size: 13px; }

/* ==================================================
   DASHBOARD (flyttad från dashboard.php)
   ================================================== */

/* ===== ENJ / museijärnväg – startsida ===== */
:root{
  --enj-orange:#e6761c;
  --enj-orange-dark:#c85f12;
  --enj-cream:#f4e7cf;
  --enj-ink:#111827;
  --enj-slate:#374151;
  --enj-surface: rgba(255,255,255,0.94);
}

/* Bakgrund (behåll) */
.dashboard-bg {
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(17,24,39,0.52), rgba(17,24,39,0.72)),
    url("img/angelsberg.JPG");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.dashboard-surface { padding: 26px 0 56px; }

.dashboard-shell {
  background: var(--enj-surface);
  border: 1px solid rgba(255,255,255,0.88);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.18);
  padding: 18px 18px 20px;
}

/* Hård färgsäkring (för att undvika vit text mot ljus bakgrund från global CSS) */
.dashboard-shell, .dashboard-shell * { color: var(--enj-ink) !important; }
.dashboard-shell p { color: var(--enj-slate) !important; }

/* Brand/topp */
.brandbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding: 10px 12px;
  border-radius: 14px;
  background:
    linear-gradient(90deg, rgba(230,118,28,0.10), rgba(244,231,207,0.35));
  border: 1px solid rgba(17,24,39,0.10);
  margin-bottom: 14px;
}
.brand-left{ display:flex; align-items:center; gap:12px; min-width: 0; }
.brand-logo{
  width: 64px;
  height: 40px;
  object-fit: contain;
  border-radius: 10px;
  background: #f6e36f; /* loggans gula ton */
  border: 1px solid rgba(17,24,39,0.12);
  padding: 6px;
  box-shadow: 0 8px 18px rgba(0,0,0,0.08);
}
.brand-title{ min-width: 0; }
.brand-title h1{
  margin:0;
  font-size: 20px;
  letter-spacing: .2px;
  line-height: 1.15;
}
.brand-title .tagline{
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--enj-slate) !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Sektioner */
.dashboard-sections { margin-top: 6px; }
.dashboard-section { margin-top: 14px; }
.dashboard-section h2 {
  margin: 14px 0 10px;
  font-size: 16px;
  letter-spacing: 0.3px;
  text-transform: none;
}
.dashboard-divider {
  height: 1px;
  background: rgba(17,24,39,0.10);
  margin: 12px 0 4px;
}

/* Grid: 3 på rad, hoppar ner responsivt */
.dashboard-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
}
@media (min-width: 680px) {
  .dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .dashboard-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Val-kort (lite mindre + proffsig “wow”) */
.dashboard-item{
  position: relative;
  overflow: hidden;
  background: rgba(255,255,255,0.98);
  border: 1px solid rgba(17,24,39,0.12);
  border-radius: 16px;
  padding: 12px 12px 10px;
  box-shadow: 0 8px 22px rgba(0,0,0,0.08);
  text-align: center;

  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content: space-between;

  aspect-ratio: 6 / 5;
  min-height: 140px; /* mindre än tidigare */
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.dashboard-item::before{
  content:"";
  position:absolute;
  top:0; left:0; right:0;
  height: 6px;
  background: linear-gradient(90deg, var(--enj-orange), var(--enj-cream));
  opacity: 0.95;
}
.dashboard-item:hover{
  transform: translateY(-3px);
  box-shadow: 0 14px 34px rgba(0,0,0,0.14);
  border-color: rgba(17,24,39,0.22);
}
.dashboard-item h3{
  margin: 8px 0 6px;
  font-size: 15px;
  letter-spacing: 0.1px;
}
.dashboard-item p{
  margin: 0 0 8px;
  font-size: 12.5px;
  line-height: 1.35;
}

/* Ikoner */
.icon-wrap{
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display:grid;
  place-items:center;
  background: rgba(230,118,28,0.08);
  border: 1px solid rgba(230,118,28,0.22);
}
.dashboard-icon{
  width: 40px;
  height: 40px;
  color: var(--enj-ink);
}

/* Knappar: tydlig kontrast och ENJ-accent */
.dashboard-shell .btn.primary{
  background: var(--enj-orange) !important;
  border: 1px solid var(--enj-orange-dark) !important;
  color: #ffffff !important;
  border-radius: 12px;
  padding: 10px 14px;
  display: inline-block;
  text-decoration: none;
  font-weight: 700;
}
.dashboard-shell .btn.primary:hover{
  background: var(--enj-orange-dark) !important;
  border-color: #a94e0c !important;
}

/* Disabled-kort */
.dashboard-item.disabled{
  opacity: 0.78;
  filter: grayscale(0.10);
}
.dashboard-item.disabled:hover{
  transform:none;
  box-shadow: 0 8px 22px rgba(0,0,0,0.08);
  border-color: rgba(17,24,39,0.12);
}
.badge{
  display:inline-block;
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(17,24,39,0.08);
  border: 1px solid rgba(17,24,39,0.12);
  color: var(--enj-ink) !important;
}

/* Tajt knapprad */
.dashboard-actions{ margin-top: auto; }
.dashboard-actions .btn{ margin-top: 4px; }

/* hidden svg sprite (migrerad från inline-style) */
.svg-sprite-hidden{position:absolute;width:0;height:0;overflow:hidden}
