/* =========================================================
   DevGames – app.css
   ========================================================= */

/* ---------- Reset / Base ---------- */
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: #fafafa;
  color: #111;
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }

.muted { color: #666; font-size: 13px; }

/* ---------- Layout ---------- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px;
}

.row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
/* ---------- Brand / Logo ---------- */
.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 18px;
}

.site-brand img {
  height: 28px;
  width: auto;
  display: block;
}

/* ---------- Card ---------- */
.card {
  background: #8a897e9c;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 16px;
}
.card-active {
  background: #424040db;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 16px;
}
.card-admin {
  background: #dfdf12db;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 16px;
}
/* ---------- Header / Nav ---------- */
.site-header {
  background: #fff;
  border-bottom: 1px solid #e8e8e8;
  padding: 1px 0;
}

/* Nav */
.nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav .row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.nav a {
  font-weight: 600;
  color: #1a4;
  text-decoration: none;
}

.nav a.active {
  text-decoration: underline;
}
/* ---------- Env badge ---------- */
.env-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  margin-left: 8px;
  border: 1px solid;
}

.env-dev {
  background: #fff3cd;
  color: #856404;
  border-color: #ffeeba;
}

.env-prod {
  background: #e6f4ea;
  color: #137333;
  border-color: #a8d5b5;
}


/* ---------- Breadcrumb ---------- 
.breadcrumb {
  font-size: 13px;
  color: #666;
*/

/* ---------- Buttons & Inputs ---------- */
button,
input,
select,
textarea {
  font-family: inherit;
  font-size: 14px;
}

button {
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid #ccc;
  background: #fff;
  cursor: pointer;
}

button:hover { background: #f5f5f5; }
button:disabled { opacity: .5; cursor: not-allowed; }

input,
select,
textarea {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #ccc;
}
.btn{
  display:inline-block;
  padding:8px 14px;
  border-radius:10px;
  border:1px solid #ccc;
  background:#fff;
  cursor:pointer;
  font-weight:600;
}
.btn:hover{ background:#f5f5f5; text-decoration:none; }


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

th, td {
  padding: 10px 8px;
  border-bottom: 1px solid #eee;
  font-size: 14px;
}

th {
  text-align: left;
  color: #555;
}
/* celle modificabili nel catalogo */
td.editable {
  cursor: pointer;
}
td.editable:hover {
  background: #f5f9ff;
}

/* stati di riga durante l'inline edit */
tr.row-editing {
  background: #fffaf0;
}
tr.row-saving {
  background: #fff4e5;
}
tr.row-saved {
  background: #f0fff4;
}
tr.row-error {
  background: #fff0f0;
}

/* input inline */
.inline-edit {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #bbb;
  padding: 2px 4px;
  font-size: 13px;
}
/* ---------- pre / code ---------- */
pre {
  background: #111;
  color: #eee;
  padding: 12px;
  border-radius: 10px;
  overflow: auto;
}

code {
  background: rgba(0,0,0,.06);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 0.95em;
}

/* ---------- Badges / Status ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid #ddd;
}

.badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

/* Difficulty */
.diff-easy    { border-color:#9ad29a; color:#2f7d2f; }
.diff-medium  { border-color:#f0c36d; color:#8a5b00; }
.diff-hard    { border-color:#f19999; color:#8b1e1e; }
.diff-expert  { border-color:#c58cf2; color:#4b1a6a; }

.diff-easy .dot   { background:#2f7d2f; }
.diff-medium .dot { background:#8a5b00; }
.diff-hard .dot   { background:#8b1e1e; }
.diff-expert .dot { background:#4b1a6a; }

/* Status */
.st-draft .dot     { background:#999; }
.st-review .dot    { background:#f0c36d; }
.st-published .dot { background:#5cb85c; }
.st-archived .dot  { background:#999; }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 40px;
  padding-top: 12px;
  border-top: 1px solid #e5e5e5;
  font-size: 13px;
  color: #666;
}

.site-footer a {
  color: inherit;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
/* Forza dimensioni celle anche contro app.css */
#boardWrap table.futo-board td {
  width: 42px !important;
  height: 42px !important;
  padding: 0 !important;
  border: 1px solid #ccc !important;
  text-align: center !important;
  vertical-align: middle !important;
  background: #fff;
}

#boardWrap table.futo-board td.futo-hrel,
#boardWrap table.futo-board td.futo-vrel,
#boardWrap table.futo-board td.futo-x {
  background: #fafafa !important;
  font-size: 18px !important;
  font-weight: 700 !important;
}

#boardWrap table.futo-board td.futo-cell input {
  width: 100% !important;
  height: 100% !important;
  border: none !important;
  outline: none !important;
  padding: 0 !important;
  margin: 0 !important;
  text-align: center !important;
  font-size: 20px !important;
  font-weight: 600 !important;
  background: transparent !important;
}

#boardWrap table.futo-board td.futo-cell.given {
  background: #f3f3f3 !important;
}
#boardWrap table.futo-board td.futo-cell.given input {
  pointer-events: none !important;
}
/* Menu Devgames */
.dg-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
  margin-bottom: 1rem;
}
.dg-menu {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
  margin-bottom: 1rem;
}

.dg-menu a {
  font-size: 14px;
  text-decoration: none;
  color: #333;
}

.dg-menu a.active {
  font-weight: 600;
  text-decoration: underline;
}


.dg-menu a.active {
  font-weight: 600;
  text-decoration: underline;
}

.dg-env-badge {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid #aaa;
}

.dg-env-badge.env-dev {
  background: #ffe8e8;
  border-color: #e55;
  color: #a00;
}

.dg-env-badge.env-stage {
  background: #fff7d6;
  border-color: #d9a500;
  color: #8a6d00;
}

/* Breadcrumb sotto il titolo */
.breadcrumb {
  margin-top: 0.25rem;
  margin-bottom: 1.5rem;
  font-size: 13px;
  color: #666;
}
.catalog-filters {
  position: sticky;
  top: 0;
  z-index: 10;
  background: white;
}

.filters-grid {
  display: grid;
  grid-template-columns: 160px 160px 1fr 160px 160px auto;
  gap: 10px;
  align-items: end;
}

.filters-grid .f select,
.filters-grid .f input {
  width: 100%;
}

.filters-grid .actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  white-space: nowrap;
}

.filters-subrow {
  margin-top: 10px;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.filters-subrow .right {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

@media (max-width: 980px) {
  .filters-grid {
    grid-template-columns: 1fr 1fr;
  }
  .filters-grid .actions {
    justify-content: flex-start;
  }
}
