/* Site version: 0.3.0 | Updated: 2026-03-11 */
/* /assets/site.css */
:root {
  --bg: #0b0f14;
  --panel: rgba(255,255,255,0.92);
  --text: #111827;
  --muted: #4b5563;
  --border: rgba(17,24,39,0.15);

  --maxw: 1060px;
  --pad: 16px;
  --radius: 14px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}

/* Watermark background logo */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: var(--bg-logo, none);
  background-repeat: no-repeat;
  background-position: center;
  background-size: min(680px, 75vw);
  opacity: 0.07;       /* adjust for strength. 0.05 to 0.10 */
  pointer-events: none;
  z-index: 0;
}

/* Soft dark gradient underlay */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(1200px 700px at 40% 20%, rgba(255,255,255,0.10), transparent 60%),
              radial-gradient(900px 600px at 70% 80%, rgba(255,255,255,0.06), transparent 55%);
  pointer-events: none;
  z-index: 0;
}

.wrap {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 18px var(--pad) 56px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 12px 36px rgba(0,0,0,0.18);
  padding: 18px;
}

.header {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
}

.brand-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

a {
  color: #1d4ed8;
  text-decoration: none;
}
a:hover { text-decoration: underline; }

.btn, button, input[type="submit"] {
  appearance: none;
  border: 1px solid var(--border);
  background: #111827;
  color: white;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
}
.btn.secondary, button.secondary {
  background: white;
  color: #111827;
}

button.secondary {
  background: white;
  color: #111827;
}

.btn.danger, button.danger {
  background: #991b1b;
}

form label { display:block; font-weight: 600; margin-top: 10px; }
input, select, textarea {
  width: 100%;
  max-width: 720px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: white;
  font-size: 14px;
}
textarea { max-width: 900px; }

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  max-width: 900px;
}
@media (max-width: 760px) {
  .row { grid-template-columns: 1fr; }
  .nav { justify-content: flex-start; }
}

.hr { height: 1px; background: var(--border); margin: 16px 0; }

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

.table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--border);
}
.table th, .table td {
  padding: 10px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.table th { background: rgba(17,24,39,0.04); text-align: left; }
.table tr:last-child td { border-bottom: 0; }

.notice {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(17,24,39,0.04);
}
.notice.ok { background: rgba(16,185,129,0.12); }
.notice.err { background: rgba(239,68,68,0.12); }

.coat {
  max-height: 120px;
  width: auto;
  display: block;
}

/* --- Stabilisation overrides --- */
.row { flex-wrap: wrap !important; }
.row > * { min-width: 220px; max-width: 100%; }

.nav { flex-wrap: wrap !important; }

/* Keep tables as actual tables; wrap specific tables in a scroll container instead */
.table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--border);
}

/* Scroll wrapper for wide admin tables */
.table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Users admin table layout fixes */
.users-table {
  min-width: 1250px;
  table-layout: auto;
}

.users-table th,
.users-table td {
  white-space: normal;
  word-break: normal;
  overflow-wrap: normal;
  vertical-align: top;
}

.users-table th:nth-child(1),
.users-table td:nth-child(1) {
  min-width: 140px; /* Name */
}

.users-table th:nth-child(2),
.users-table td:nth-child(2) {
  min-width: 240px; /* Email */
  white-space: nowrap;
}

.users-table th:nth-child(3),
.users-table td:nth-child(3) {
  min-width: 240px; /* Roles */
}

.users-table th:nth-child(4),
.users-table td:nth-child(4) {
  min-width: 90px; /* Active */
  white-space: nowrap;
}

.users-table th:nth-child(5),
.users-table td:nth-child(5) {
  min-width: 360px; /* Role management */
}

.users-table th:nth-child(6),
.users-table td:nth-child(6) {
  min-width: 320px; /* Other */
}

/* Utility wrappers for action controls inside admin cells */
.inline-tools {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: flex-start;
}

.inline-tools form {
  margin: 0;
}

.inline-tools select,
.inline-tools input[type="text"],
.inline-tools input[type="password"] {
  min-width: 180px;
  max-width: 220px;
}

select, input, textarea { max-width: 100%; }
.notice, .card { overflow-wrap: anywhere; }


/* Small utility classes for admin tables */
.nowrap { white-space: nowrap; }
