/* ============================
   SERVIS PANEL PRO - STYLE v3 (Blue / Modern)
   ============================ */

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

body {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: #e5e7eb;
  color: #0f172a;
}

/* Topbar */
.topbar {
  background: #0b1120;
  color: #e5e7eb;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 10px rgba(15,23,42,0.6);
}
.topbar-logo {
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 13px;
}
.topbar-nav a {
  color: #e5e7eb;
  text-decoration: none;
  margin-left: 16px;
  font-size: 14px;
}
.topbar-nav a:hover,
.topbar-nav a.active {
  text-decoration: underline;
}

/* Wrapper centers everything */
.wrapper {
  max-width: 1140px;
  margin: 24px auto 40px auto;
  padding: 0 16px;
}

/* Footer */
.footer {
  text-align: center;
  font-size: 12px;
  color: #6b7280;
  margin: 8px auto 18px;
}

/* Card */
.card {
  background: #ffffff;
  padding: 20px 22px;
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(15,23,42,0.12);
  margin-bottom: 20px;
}

/* Headings */
.card h1 {
  font-size: 22px;
  margin-bottom: 4px;
}
.card h2 {
  font-size: 20px;
  margin-bottom: 10px;
}
.card h3 {
  font-size: 16px;
  margin: 10px 0 6px;
}

/* Buttons */
.btn,
.btn-small {
  display: inline-block;
  background: #2563eb;
  color: #ffffff;
  padding: 8px 14px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 14px;
  cursor: pointer;
  border: none;
}
.btn-small {
  padding: 6px 10px;
  font-size: 13px;
}
.btn:hover,
.btn-small:hover {
  background: #1d4ed8;
}
.btn-danger {
  background: #dc2626;
}
.btn-danger:hover {
  background: #b91c1c;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
}
th,
td {
  padding: 8px 10px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
  font-size: 14px;
}
th {
  background: #f9fafb;
  font-weight: 600;
  font-size: 12px;
}

/* Row hover */
tbody tr:hover td {
  background: #eef2ff;
}

/* Inputs */
input[type="text"],
input[type="tel"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 9px 11px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  font-size: 14px;
  background: #ffffff;
}
textarea {
  min-height: 110px;
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37,99,235,0.3);
}

/* Labels */
label {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
  font-weight: 600;
}

/* Grid helpers */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 16px;
}

/* Alerts */
.alert {
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 12px;
  font-size: 14px;
}
.alert.success {
  background: #dcfce7;
  border: 1px solid #4ade80;
  color: #166534;
}
.alert.error {
  background: #fee2e2;
  border: 1px solid #fca5a5;
  color: #991b1b;
}

/* Status badges & full-row colors */
.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.badge-AKTIV {
  background: #bbf7d0;
  color: #14532d;
}
.badge-NE_PUNE {
  background: #dbeafe;
  color: #1d4ed8;
}
.badge-NE_PRITJE {
  background: #fee2e2;
  color: #b91c1c;
}
.badge-MBYLLUR {
  background: #e5e7eb;
  color: #374151;
}

/* Full row background by status */
tr.status-AKTIV td {
  background: #e6ffe9 !important;
}
tr.status-NE_PUNE td {
  background: #e0f2fe !important;
}
tr.status-NE_PRITJE td {
  background: #ffe9d6 !important;
}
tr.status-MBYLLUR td {
  background: #f3f4f6 !important;
}
tr.status-AKTIV:hover td,
tr.status-NE_PUNE:hover td,
tr.status-NE_PRITJE:hover td,
tr.status-MBYLLUR:hover td {
  background: inherit !important;
}

/* Cases list table */
.cases-table th,
.cases-table td {
  font-size: 14px;
}

/* Case view layout & text */
.case-layout {
  margin-top: 8px;
}
.problem-text {
  font-size: 14px;
  line-height: 1.5;
}

/* Main attachment on case_view */
.case-photo {
  margin-top: 8px;
  background: #f9fafb;
  border-radius: 12px;
  padding: 10px;
  border: 1px solid #e5e7eb;
}
.case-photo img {
  display: block;
  max-width: 100%;
  max-height: 260px;
  margin: 0 auto;
  border-radius: 10px;
  object-fit: contain;
}

/* Gallery thumbnails on case_view */
.case-gallery {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.case-thumb {
  position: relative;
  width: 130px;
  height: 130px;
  border-radius: 12px;
  overflow: hidden;
  background: #e5e7eb;
}
.case-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.case-thumb .remove-photo {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: rgba(15,23,42,0.8);
  color: #ffffff;
  text-align: center;
  line-height: 20px;
  font-size: 14px;
  text-decoration: none;
}
.case-thumb .remove-photo:hover {
  background: rgba(185,28,28,0.95);
}

/* Login page */
.login-wrapper {
  max-width: 380px;
  margin: 60px auto;
  padding: 24px 22px;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(15,23,42,0.3);
}
.login-wrapper h1 {
  margin-bottom: 16px;
  font-size: 20px;
}

/* Small muted text */
.muted {
  color: #6b7280;
  font-size: 12px;
}

/* Links inside tables/forms */
a {
  color: #2563eb;
}
a:hover {
  color: #1d4ed8;
}


/* Topbar search */
.topbar-search {
  margin-left: 16px;
}
.topbar-search input {
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  border: 1px solid #4b5563;
  background: #020617;
  color: #e5e7eb;
  min-width: 180px;
}
.topbar-search input::placeholder {
  color: #9ca3af;
}
@media (max-width: 768px) {
  .topbar {
    flex-wrap: wrap;
    gap: 8px;
  }
  .topbar-nav {
    flex-wrap: wrap;
  }
  .topbar-search {
    width: 100%;
    margin-left: 0;
  }
  .topbar-search input {
    width: 100%;
  }
}

/* links in tables */
.link { color:#2563eb; text-decoration:none; }
.link:hover { text-decoration:underline; }
