@import url('https://fonts.googleapis.com/css2?family=Encode+Sans+Expanded:wght@100;200;300;400;500;600;700;800;900&family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');

:root {
  --background: #fff;
  --text: #1c1c1c;
  --secondary: #7A7A7A;
  --panel: #f4f4f4;
  --border: #dde1e4;
  --contrast: #0079a5;
}

body {
  font-family: "Inter",sans-serif;
  font-size: 1.25rem;
  margin: 0;
  background: var(--background);
  color: var(--text);
}

/* ── Sidebar ── */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 250px;
  height: 100vh;
  overflow-y: auto;
  background: var(--panel);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.sidebar-brand {
  font-family: "Encode Sans Expanded", sans-serif;
  padding: 18px 16px 14px;
  font-weight: 700;
  font-size: 2rem;
  letter-spacing: .01em;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

/* ── Main content area ── */
.wrap {
  margin-left: 250px;
  padding: 24px;
  min-height: 100vh;
  box-sizing: border-box;
}

.card label a {
  color: var(--contrast);
  text-decoration: none;
}

/* ── Nav (vertical sidebar list) ── */

.nav a {
  display: flex;
  align-items: center;
  gap: 8px;
}

.material-symbols-outlined {
  font-size: 20px;
  flex-shrink: 0;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 8px;
  margin: 0;
}

.nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text);
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 8px;
  border: none;
  background: transparent;
}

.nav a:hover { background: var(--border); }

.nav a.active {
  background: var(--contrast);
  color: #fff;
  outline: none;
}

.nav a.active .badge { background: #fff; color: var(--contrast); }

.nav-support {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding: 12px 18px;
  color: var(--text);
  text-decoration: none;
  border-top: 1px solid var(--border);
  font-size: .875rem;
}
.nav-support:hover { background: var(--border); }

table a { color: var(--contrast); }

/* ── Card ── */
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  margin: 12px 0
}

/* ── Form elements ── */
input,select,textarea {
  font-family: system-ui,sans-serif;
  font-size: 1.25rem;
  width: 95%;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--background);
  color: var(--text);
  margin-bottom: 0.5rem;
  resize: none;
}

label { font-weight: bold; }

/* ── Buttons ── */
button,.btn {
  display: inline-block;
  background: var(--contrast);
  color: #fff;
  border: 0;
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none
}

.btn-secondary {
  background: var(--secondary);
  color: #fff;
}

.btn-sm {
  padding: 4px 12px;
  font-size: .85rem;
  border-radius: 6px;
}

.btn-danger {
  background: #c00;
  color: #fff;
}

/* ── Table ── */
table { width: 100%; border-collapse: collapse }

th,td {
  border-bottom: 1px solid var(--border);
  padding: 10px;
  text-align: left;
  font-size: 1.25rem;
}

/* ── Utilities ── */
.small {
  color: var(--secondary);
  font-size: .9rem
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(240px,1fr));
  gap: 12px
}
.grid input { width: 80%; }

/* ── Badge (unread / pending count pill) ── */
.badge {
  background: #c00;
  color: #fff;
  border-radius: 10px;
  padding: 1px 7px;
  font-size: .75rem;
  vertical-align: middle;
}

/* ── Section dividers and subheadings (settings) ── */
.section-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 24px 0;
}

.section-heading {
  font-size: 1.05rem;
  margin: 0 0 4px;
}

/* ── Checkbox row label ── */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
  font-weight: normal;
  cursor: pointer;
}
.checkbox-label input[type=checkbox] {
  width: auto;
  margin: 0;
}

/* ── Small-width input (e.g. port) ── */
.input-sm { width: 120px; }

/* ── Logo preview ── */
#logo-preview {
  max-height: 60px;
  margin-top: 8px;
  border-radius: 6px;
}

/* ── Item cards (messages + comments) ── */
.item-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 14px;
  background: var(--panel);
}

.item-card--pending { border-left: 3px solid var(--contrast); }

.item-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.item-card-meta a { color: var(--contrast); }

.item-card-actions { display: flex; gap: 6px; flex-shrink: 0; }

.item-card-body { margin: 10px 0 0; white-space: pre-wrap; line-height: 1.6; font-family: "Inter", sans-serif;}

/* ── Filter tabs (comments page) ── */
.filter-tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }

.filter-tab {
  padding: 5px 14px;
  border-radius: 8px;
  text-decoration: none;
  font-size: .9rem;
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--text);
}

.filter-tab--active {
  background: var(--contrast);
  border-color: var(--contrast);
  color: #fff;
}

/* ── Trumbowyg ── */
.trumbowyg-editor { color: var(--text); background: #fff }

/* ── Mobile hamburger toggle ── */
.nav-toggle {
  display: none;
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 300;
  background: var(--contrast);
  color: #fff;
  border: none;
  border-radius: 10px;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}

.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 199;
}

/* ── Responsive admin ── */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }

  .sidebar {
    transform: translateX(-100%);
    transition: transform .25s ease;
    z-index: 200;
  }

  body.sidebar-open .sidebar    { transform: translateX(0); }
  body.sidebar-open .nav-overlay { display: block; }

  .wrap {
    margin-left: 0;
    padding: 60px 14px 24px; /* top padding clears the hamburger button */
  }

  /* Tables: scroll horizontally rather than overflow */
  .card, .grid > .card { overflow-x: auto; }
  table { min-width: 480px; }

  /* Full-width form inputs */
  input, select, textarea { width: 100%; box-sizing: border-box; }
  .input-sm { width: 120px; }
  .grid input { width: 100%; }

  /* Stack grid columns */
  .grid { grid-template-columns: 1fr; }

  /* Button rows: wrap nicely */
  div[style*="display:flex"] { flex-wrap: wrap; }
}
