/* app_admin_theme.css – zentrales Layout für Dashboard, Accounts, Lizenzen */

:root {
  --bg:#0b1020;
  --card:#111936;
  --muted:#96a0c2;
  --btn:#1e293b;
  --bad:#ef4444;
}

* {
  box-sizing:border-box;
}

body {
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color:#e6ecff;
  overflow-x:hidden;
}

/* Header / Navigation */

header {
  border-bottom: 1px solid #223;
}

header.wrap {}

header h1 {
  margin:0 0 6px;
}

nav a {
  color:#8ab4ff;
  margin-right: 16px;
  text-decoration: none;
  font-size:14px;
}
nav a:hover {
  text-decoration: underline;
}

.muted {
  color: var(--muted);
  font-size:13px;
}

/* Allgemeines Layout */

.wrap {
  width:100%;
  margin:0 auto;
  padding:24px clamp(24px,5vw,72px);
}

/* Karten / Container */

.card {
  background: var(--card);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 6px 24px rgba(0,0,0,.35);
}

.row {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 8px;
  flex-wrap:wrap;
}

.toolbar {
  display:flex;
  gap:8px;
}

/* Buttons */

.btn {
  background: var(--btn);
  border:1px solid #26324a;
  color:#e6ecff;
  border-radius:10px;
  padding:8px 12px;
  cursor:pointer;
  font-size:14px;
}
.btn.small {
  padding:6px 10px;
  font-size:13px;
}

/* KPI-Karten */

.kpi-card-title {
  margin:0 0 6px;
  font-size:13px;
  color:var(--muted);
}
.kpi-value {
  font-size:28px;
  font-weight:700;
}

/* Tabellen */

.table-wrap {
  border:1px solid #203;
  border-radius:12px;
  overflow:hidden;
  margin-top:10px;
}

table {
  width: 100%;
  border-collapse: collapse;
  table-layout:auto;
  min-width:0;
}

th, td {
  padding: 10px 12px;
  text-align:left;
  border-bottom: 1px solid rgba(255,255,255,.06);
  font-size:14px;
}

thead th {
  background:#0d1531;
  color:#9fb0d9;
  font-weight:600;
  position:sticky;
  top:0;
  z-index:1;
}

tbody tr:nth-child(odd) {
  background:rgba(255,255,255,.02);
}

tbody tr:hover {
  background:rgba(138,180,255,.08);
}

/* Overlay / Modal */

.overlay {
  position:fixed;
  inset:0;
  display:none;
  align-items:center;
  justify-content:center;
  background:rgba(0,0,0,.5);
  z-index: 99999 !important;
}
.overlay.show {
  display:flex;
}

.modal {
  width:520px;
  max-width:96vw;
  background:#0f172a;
  border-radius:16px;
  padding:18px;
  box-shadow:0 10px 40px rgba(0,0,0,.6);
}
.modal h3 {
  margin:0 0 10px;
}

label {
  display:block;
  font-size:12px;
  color:var(--muted);
  margin:10px 0 6px;
}

input,
select,
textarea {
  width:100%;
  padding:10px 12px;
  border-radius:10px;
  border:1px solid #26324a;
  background:#111936;
  color:#e6ecff;
  outline:none;
}

.right {
  text-align:right;
  margin-top:12px;
}

.error {
  color:#ef4444;
  font-size:13px;
  min-height:1.2em;
}

/* STATUS Farben */

.status-active {
  color: #4ade80 !important;
  font-weight: 600;
}
.status-inactive {
  color: #ef4444 !important;
  font-weight: 600;
}

/* BUTTON Farben */

.btn-status-active {
  background-color: #ef4444 !important;
  border-color: #ef4444 !important;
  color: #ffffff !important;
}

.btn-status-inactive {
  background-color: #22c55e !important;
  border-color: #22c55e !important;
  color: #ffffff !important;
}

.btn-delete {
  background-color: #000 !important;
  border-color: #000 !important;
  color: #ffffff !important;
}

.btn-unl-disabled {
  background-color: #555 !important;
  border-color: #444 !important;
  color: #999 !important;
  cursor: not-allowed !important;
  opacity: 0.6;
}

/* Unendlich */

.infinity-yes {
  color: #facc15 !important;
  font-weight: 700 !important;
}
.infinity-no {
  color: #ffffff !important;
}

/* ⭐ NEU — BREITES POPUP FÜR LIZENZVERWALTUNG */

#modal-lic-mgmt .modal {
  max-width: 1200px !important;  /* größere Breite */
  width: 95% !important;          /* passt sich kleineren Screens an */
}

/* Tabelle im Popup */
#lic-mgmt-table {
  width:100%;
  table-layout:auto;
  min-width:950px !important;     /* zwingt layout wie der Hauptseite */
}

/* MOBILE OPTIMIERUNG */

@media (max-width: 900px) {
  .table-wrap {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }
  #lic-table { min-width: 780px; }
  #lic-mgmt-table { min-width: 780px !important; }
}

@media (max-width: 600px) {
  #lic-table th, #lic-table td,
  #lic-mgmt-table th, #lic-mgmt-table td {
    font-size:12px;
    padding:6px 8px;
  }

  .btn.small {
    padding:4px 8px;
    font-size:11px;
  }

  #lic-table .col-owner,
  #lic-table .col-notes {
    max-width:120px;
  }

  #lic-table td.col-key,
  #lic-mgmt-table td.col-key {
    flex-direction:column;
    gap:2px;
    align-items:flex-start;
  }

  #lic-table td.actions,
  #lic-mgmt-table td.col-actions {
    gap:3px;
  }
}

@media (max-width:420px) {

  #lic-table th, #lic-table td,
  #lic-mgmt-table th, #lic-mgmt-table td {
    font-size:11px;
    padding:4px 6px;
  }

  .btn.small {
    font-size:10px;
    padding:3px 6px;
  }

  .card {
    padding:12px;
  }
}
