/* public/admin/admin.css — minimal admin styling, no framework. */

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  color: #1f2328;
  background: #f6f7f9;
  line-height: 1.45;
}

a { color: #0969da; text-decoration: none; }
a:hover { text-decoration: underline; }

code, pre, textarea {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px;
}

input, select, textarea, button {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: #f6f8fa;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  padding: 6px 14px;
}
button:hover { background: #eef1f4; }
button:active { background: #e3e6ea; }

input[type=text], input[type=password], select, textarea {
  background: #fff;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  padding: 6px 10px;
  width: 100%;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: #0969da;
  box-shadow: 0 0 0 3px rgba(9, 105, 218, 0.15);
}

/* --- Topbar --- */
.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: #24292f;
  color: #fff;
  border-bottom: 1px solid #1f2328;
}
.topbar .brand { color: #fff; font-weight: 600; }
.topbar .spacer { flex: 1; }
.topbar .user { color: #c9d1d9; font-size: 13px; }
.topbar form.inline { margin: 0; }
.topbar form.inline button {
  background: transparent;
  color: #c9d1d9;
  border: 1px solid #444c56;
}
.topbar form.inline button:hover { background: #323942; color: #fff; }

/* --- Shell (sidebar + content) --- */
.shell {
  display: flex;
  min-height: calc(100vh - 49px);
}
.sidebar {
  width: 220px;
  background: #fff;
  border-right: 1px solid #d0d7de;
  padding: 12px 0;
  flex-shrink: 0;
}
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li a {
  display: block;
  padding: 8px 16px;
  color: #1f2328;
  border-left: 3px solid transparent;
}
.sidebar li a:hover { background: #f6f8fa; text-decoration: none; }
.sidebar li a.active {
  background: #f6f8fa;
  border-left-color: #0969da;
  font-weight: 600;
}
.sidebar .group {
  margin-top: 12px;
  padding: 6px 16px 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: #57606a;
  letter-spacing: 0.5px;
}

.content {
  flex: 1;
  padding: 24px 28px;
  max-width: 1100px;
  min-width: 0;
}
.content h1 { margin-top: 0; font-size: 22px; }
.content h2 { font-size: 17px; margin-top: 1.6em; }

/* --- Tiles (dashboard) --- */
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.tile {
  background: #fff;
  border: 1px solid #d0d7de;
  border-radius: 8px;
  padding: 14px 16px;
}
.tile h3 { margin: 0 0 6px; font-size: 11px; text-transform: uppercase; color: #57606a; letter-spacing: 0.5px; }
.tile p  { margin: 0; font-size: 17px; font-weight: 600; word-break: break-word; }

/* --- Tables --- */
table.grid {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  overflow: hidden;
}
table.grid th, table.grid td {
  padding: 8px 12px;
  border-bottom: 1px solid #eaeef2;
  text-align: left;
  vertical-align: top;
}
table.grid th { background: #f6f8fa; font-weight: 600; font-size: 12px; text-transform: uppercase; color: #57606a; }
table.grid tr:last-child td { border-bottom: none; }
table.grid tr:hover td { background: #f6f8fa; }

/* --- Notices --- */
.err, .warn, .hint {
  padding: 10px 14px;
  border-radius: 6px;
  margin: 12px 0;
  border: 1px solid;
}
.err  { background: #ffebe9; border-color: #ff8182; color: #82071e; }
.warn { background: #fff8c5; border-color: #d4a72c; color: #633c01; }
.hint { background: #ddf4ff; border-color: #54aeff; color: #0550ae; font-size: 13px; }

/* --- Login page --- */
.login {
  max-width: 360px;
  margin: 60px auto;
  background: #fff;
  padding: 28px;
  border: 1px solid #d0d7de;
  border-radius: 8px;
}
.login h1 { margin-top: 0; font-size: 20px; }
.login label { display: block; margin: 12px 0 4px; font-size: 13px; font-weight: 600; }
.login button[type=submit] {
  width: 100%;
  margin-top: 16px;
  background: #1a7f37;
  color: #fff;
  border-color: #1a7f37;
  padding: 8px;
}
.login button[type=submit]:hover { background: #1f883d; }

/* --- Form rows --- */
form .row { display: flex; gap: 8px; align-items: flex-end; }
form .row > * { flex: 1; }
form .row button { flex: 0 0 auto; }

@media (max-width: 720px) {
  .shell { flex-direction: column; }
  .sidebar { width: 100%; border-right: none; border-bottom: 1px solid #d0d7de; }
  .sidebar ul { display: flex; flex-wrap: wrap; }
  .sidebar li a { border-left: none; border-bottom: 3px solid transparent; padding: 8px 12px; }
  .sidebar li a.active { border-left-color: transparent; border-bottom-color: #0969da; }
  .sidebar .group { width: 100%; }
}
