/* ============================================================
   STYLE.CSS — Canon TM-200 Plotter Administration
   ============================================================ */

:root {
  --canon-red:   #CC0000;
  --canon-dark:  #1a1a2e;
  --sidebar-w:   230px;
  --topbar-h:    58px;
}

/* ---- Body ---- */
body {
  background: #f0f2f6;
  font-family: 'Segoe UI', system-ui, sans-serif;
  font-size: .92rem;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
#sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--canon-dark);
  position: fixed;
  top: 0; left: 0;
  display: flex;
  flex-direction: column;
  z-index: 200;
  box-shadow: 2px 0 12px rgba(0,0,0,.18);
}

#sidebar .brand {
  background: var(--canon-red);
  padding: 16px 20px 14px;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: .4px;
  user-select: none;
}

#sidebar .brand small {
  display: block;
  font-weight: 400;
  font-size: .73rem;
  opacity: .85;
  margin-top: 3px;
  letter-spacing: .2px;
}

#sidebar nav {
  flex: 1;
  padding: 10px 0;
}

#sidebar nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #a8b4cc;
  text-decoration: none;
  padding: 10px 20px;
  font-size: .88rem;
  border-left: 3px solid transparent;
  transition: background .13s, color .13s, border-color .13s;
}

#sidebar nav a i {
  font-size: 1.05rem;
  width: 20px;
  text-align: center;
}

#sidebar nav a:hover {
  background: rgba(255,255,255,.06);
  color: #e8ecf4;
  border-left-color: rgba(204,0,0,.5);
}

#sidebar nav a.active {
  background: rgba(255,255,255,.09);
  color: #fff;
  border-left-color: var(--canon-red);
  font-weight: 600;
}

#sidebar .sidebar-footer {
  padding: 12px 20px;
  color: #4a5568;
  font-size: .73rem;
  border-top: 1px solid rgba(255,255,255,.06);
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
#main {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
}

.topbar {
  background: #fff;
  border-bottom: 1px solid #e2e6ea;
  padding: 0 28px;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

.topbar h4 {
  margin: 0;
  font-weight: 600;
  color: #2d3748;
  font-size: 1.05rem;
}

.topbar-time {
  font-size: .8rem;
  color: #8898aa;
}

.page-body {
  padding: 24px 28px;
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  border: none !important;
  border-radius: 12px !important;
  box-shadow: 0 2px 8px rgba(0,0,0,.07) !important;
}

.card-header {
  background: #fff !important;
  border-bottom: 1px solid #eef0f4 !important;
  border-radius: 12px 12px 0 0 !important;
  padding: 14px 20px !important;
}

.card-header h6 {
  margin: 0;
  font-weight: 600;
  font-size: .9rem;
  color: #2d3748;
}

/* Stat cards */
.stat-card .card-body {
  padding: 18px 20px;
}

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

/* ============================================================
   INK PROGRESS BARS
   Bruger inline style="background:#hex" på .progress-bar
   for at undgå Bootstrap specificity-konflikter
   ============================================================ */
.ink-progress {
  height: 13px;
  border-radius: 8px;
  background: #e9ecef;
}

.ink-progress .progress-bar {
  border-radius: 8px;
  transition: width .6s ease;
}

/* ============================================================
   TABLES
   ============================================================ */
.table thead th {
  background: #f7f9fc;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: #6c757d;
  border-bottom: 2px solid #e9ecef;
  white-space: nowrap;
  padding: 10px 12px;
}

.table tbody td {
  padding: 9px 12px;
  vertical-align: middle;
}

.table tbody tr:hover {
  background: #f0f4ff;
}

.table tfoot td {
  padding: 10px 12px;
  border-top: 2px solid #dee2e6;
}

/* ============================================================
   BADGES
   ============================================================ */
.badge-acc {
  font-size: .78rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  letter-spacing: .3px;
}

/* ============================================================
   ALERTS / INFO BOXES
   ============================================================ */
.info-note {
  background: #eef4ff;
  border-left: 3px solid #4a7eff;
  border-radius: 0 8px 8px 0;
  padding: 10px 14px;
  font-size: .82rem;
  color: #2d4a8a;
}

.warn-note {
  background: #fff8e1;
  border-left: 3px solid #f59e0b;
  border-radius: 0 8px 8px 0;
  padding: 10px 14px;
  font-size: .82rem;
  color: #78500a;
}

/* ============================================================
   FORMS / SQL
   ============================================================ */
.form-control, .form-select {
  font-size: .88rem;
}

textarea.font-monospace {
  font-size: .83rem;
  line-height: 1.6;
}

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination .page-link {
  font-size: .82rem;
  padding: 4px 10px;
  color: #495057;
}

.pagination .page-item.active .page-link {
  background: var(--canon-red);
  border-color: var(--canon-red);
}

/* ============================================================
   CUSTOMER CARDS (perkunde)
   ============================================================ */
.kunde-card {
  border-radius: 12px;
  overflow: hidden;
}

.kunde-card .kunde-header {
  padding: 14px 18px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kunde-card .kunde-body {
  padding: 0 18px 16px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  #sidebar {
    width: 100%;
    min-height: auto;
    position: relative;
  }
  #main {
    margin-left: 0;
  }
  .page-body {
    padding: 16px;
  }
}

/* ---- Logout-link i sidebar nav ---- */
#sidebar nav a.logout-link {
  margin-top: 6px;
  border-top: 1px solid rgba(255,255,255,.06);
  color: #c0789a;
}

#sidebar nav a.logout-link:hover {
  background: rgba(204,0,0,.12);
  color: #ff9999;
  border-left-color: rgba(204,0,0,.6);
}
