/* Interaktiv LOGS-knapp (neutral gradient, samma känsla som delete) */
.log-btn {
  display: inline-block;
  padding: 6px 10px;       /* mindre än innan */
  font-size: 13px;         /* lite mindre text */
  border-radius: 5px;
  border: 1px solid #ccc;
  background: linear-gradient(135deg, #f2f2f2, #e1e1e1);
  text-decoration: none;
  color: #333;
  font-weight: bold;
  transition: all 0.2s ease-in-out;
}

.log-btn:hover {
  background: linear-gradient(135deg, #e9e9e9, #d6d6d6);
  transform: translateY(-1px) scale(1.05);
  box-shadow: 0 3px 6px rgba(0,0,0,0.15);
}

.log-btn:active {
  transform: translateY(1px);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* FONT IMPORT */
@font-face {
  font-family: 'NeoSansStd-Bold';
  src: url('NeoSansStd-Bold.otf') format('opentype');
  font-weight: bold;
  font-style: normal;
}

body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
}

/* LOGIN */
body.login-body {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding-top: 60px;
  min-height: 100vh;
  background: linear-gradient(135deg, #003DA5 0%, #ffffff 100%);
  margin: 0;
}

/* DASHBOARD */
body.dashboard-body {
  padding: 20px;
  min-height: 100vh;
  background: linear-gradient(135deg, rgba(0,61,165,0.97) 0%, rgba(255,255,255,0.97) 100%);
  position: relative;
  overflow: auto; /* istället för hidden */
}

/* Oversize watermark-logga */
body.dashboard-body::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url('logga.png') no-repeat;
  background-size: 160%;          /* gör loggan jättestor */
  background-position: -200px -100px; /* skjuter uppåt/vänster */
  opacity: 0.05;                  /* diskret */
  z-index: 0;
  pointer-events: none;
  mix-blend-mode: overlay;        /* smälter in i bakgrunden */
}

/* Se till att innehåll alltid ligger ovanpå */
.dashboard {
  position: relative;
  z-index: 1;
}

/* BOXAR */
.login-box,
.public-box {
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  width: 530px;
  margin: 20px auto;
  text-align: center;
}

.dashboard {
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  width: 800px;
  margin: 20px auto;
  text-align: left;
}

/* RUBRIKER */
h1 {
  text-transform: uppercase;
  font-family: 'NeoSansStd-Bold', Arial, sans-serif;
  font-size: 2em;
  color: #000;
  margin-bottom: 10px;
}

h2 {
  font-family: 'NeoSansStd-Bold', Arial, sans-serif;
  font-size: 1.4em;
  color: #000;
  margin-top: 20px;
  margin-bottom: 10px;
}

h3 {
  font-family: Arial, sans-serif;
  font-size: 1.1em;
  font-weight: normal;
  color: #000;
  margin-top: 15px;
}

/* LOGGA */
.site-logo {
  position: absolute;
  top: 20px;
  right: 20px;
  height: 90px;
  width: auto;
  display: block;
}

/* FORMULÄR */
input[type="text"],
input[type="password"] {
  width: 80%;
  padding: 10px;
  margin: 8px 0;
  border: 1px solid #ccc;
  border-radius: 5px;
}

input[type="file"] {
  display: inline-block;
  width: auto;
  margin-right: 10px;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 5px;
  background: #fff;
  font-family: inherit;
  font-size: 14px;
}

button.primary {
  display: inline-block;
  padding: 10px 12px;
  background: #003DA5;
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

button.primary:hover {
  background: #002B73;
}

/* === DELETE-KNAPP MED GRADIENT === */
button.danger {
  padding: 6px 10px;
  background: linear-gradient(135deg, #d9534f, #c9302c);
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.2s ease;
}

button.danger:hover {
  background: linear-gradient(135deg, #c9302c, #a32724);
  transform: translateY(-1px) scale(1.05);
  box-shadow: 0 3px 6px rgba(0,0,0,0.15);
}

button.danger:active {
  transform: translateY(1px);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* LISTOR */
.download-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Raden får "knappkänsla" */
.download-item {
  display: grid;
  grid-template-columns: 50px 1fr 120px; /* thumb | info | actions */
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  background: #fafafa;
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #e0e0e0;
  transition: background-color 0.2s, box-shadow 0.2s;
}

.download-item:hover {
  background: #f0f8ff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* --- Transparent bakgrund för thumbnails (checkerboard) --- */
.thumb-wrapper {
  flex-shrink: 0;
  width: 40px;
  height: 27px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;

  background-color: #eee;
  background-image: linear-gradient(45deg, #ccc 25%, transparent 25%),
                    linear-gradient(-45deg, #ccc 25%, transparent 25%),
                    linear-gradient(45deg, transparent 75%, #ccc 75%),
                    linear-gradient(-45deg, transparent 75%, #ccc 75%);
  background-size: 10px 10px;
  background-position: 0 0, 0 5px, 5px -5px, -5px 0px;
}

.file-info {
  text-align: left;
  overflow: hidden;
}

.file-actions {
  text-align: right;
  white-space: nowrap;
}

/* MINIATYRER */
.thumb {
  max-width: 40px;
  max-height: 27px;
  object-fit: contain;
  border: 1px solid #ccc;
  padding: 2px;
  border-radius: 4px;
  transition: transform 0.2s ease-in-out, box-shadow 0.2s, z-index 0.2s;
  cursor: zoom-in;
}

.thumb:hover {
  transform: scale(5);
  z-index: 1000;
  position: relative;
  box-shadow: 0 8px 16px rgba(0,0,0,0.3);
}

.thumb-static {
  max-width: 40px;
  max-height: 27px;
  object-fit: contain;
  border: 1px solid #ccc;
  background: #fff;
  padding: 2px;
  border-radius: 4px;
}

/* DOWNLOAD-LÄNK */
.download-btn {
  background: none;
  border: none;
  color: #003DA5; /* Blå länk lite ljusare */
  padding: 0;
  text-decoration: none; /* 🚫 ingen understrykning */
  cursor: pointer;
  display: inline-block; /* 👈 behövs för scale */
  transition: color 0.2s, transform 0.2s;
}

.download-btn:hover {
  color: #002a73; /* lite mörkare blå */
  transform: scale(1.05); /* 🔹 växer tydligare */
  position: relative;
  z-index: 2;
}

.file-size {
  color: #666;
  margin-left: 5px;
  font-size: 0.9em;
}

.file-meta {
  color: #888;
  margin-left: 5px;
  font-size: 0.85em;
}

/* ÖVRIGT */
.public-desc {
  text-align: center;
  font-style: italic;
  color: #333;
  margin-top: 10px;
}

.alert {
  padding: 10px 15px;
  margin: 10px auto 20px auto;
  border-radius: 5px;
  font-weight: bold;
  text-align: center;
  width: 800px;
  box-sizing: border-box;
}

.alert.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.alert.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

/* === TABS === */
.tabs {
  margin: 20px 0;
  border-bottom: 2px solid #ccc;
}

.tablink {
  background: #f9f9f9;
  border: none;
  padding: 10px 20px;
  cursor: pointer;
  font-weight: bold;
  color: #333;
  border-radius: 5px 5px 0 0;
  margin-right: 5px;
}

.tablink.active {
  background: #fff;
  border: 1px solid #ccc;
  border-bottom: none; /* tar bort den konstiga blå linjen */
}

.tabcontent {
  display: none;
}

.tabcontent.active {
  display: block;
}

/* 🔹 Lägg till-knappen med gradient + hover-effekt */
#addBtn {
  background: linear-gradient(135deg, #003DA5, #0055cc);
  color: white;
}

#addBtn:hover {
  background: linear-gradient(135deg, #002a73, #0040a0);
  transform: translateY(-1px) scale(1.05);
}

/* === UPLOAD-KNAPP MED GRADIENT === */
input[type="submit"].primary,
button.primary {
  padding: 10px 12px;
  background: linear-gradient(135deg, #003DA5, #0055cc); /* blå gradient */
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.2s ease;
}

input[type="submit"].primary:hover,
button.primary:hover {
  background: linear-gradient(135deg, #002a73, #0040a0); /* mörkare blå gradient */
  transform: translateY(-1px);
  box-shadow: 0 3px 6px rgba(0,0,0,0.15);
}

input[type="submit"].primary:active,
button.primary:active {
  transform: translateY(1px);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}