/* Минимальные стили GraphikBot */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: #f5f6fa;
  color: #1f2330;
  line-height: 1.45;
}

a { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: underline; }

.muted { color: #6b7280; }
.error { background:#fee2e2; color:#991b1b; padding:.6rem .8rem; border-radius:6px; margin-top:.8rem; font-size:.95rem; }

/* Auth screen */
.auth-bg {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg,#1e3a8a,#2563eb);
}
.auth-bg .card { width: 360px; }

.card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0,0,0,.08);
  padding: 1.6rem 1.6rem 1.4rem;
  margin-bottom: 1.2rem;
}
.card h1 { margin: 0 0 .25rem; font-size: 1.6rem; }
.card h2 { margin: 0 0 .25rem; font-size: 1.3rem; }
.card h3 { margin: 0 0 .6rem; font-size: 1.1rem; }

form label {
  display: block;
  margin-top: 1rem;
  font-size: .9rem;
  color: #374151;
}
form input {
  margin-top: .25rem;
  width: 100%;
  padding: .55rem .7rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 1rem;
}
form input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}
form button[type="submit"] {
  margin-top: 1.2rem;
  width: 100%;
  padding: .6rem;
  background: #2563eb;
  color: #fff;
  border: 0;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
}
form button[type="submit"]:hover { background: #1d4ed8; }
form button[disabled] { opacity:.6; cursor: progress; }

/* Topbar */
.topbar {
  background:#fff;
  border-bottom:1px solid #e5e7eb;
  position: sticky; top:0; z-index: 10;
}
.topbar-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: .8rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 1.2rem;
}
.topbar nav { display: flex; gap: 1rem; }
.topbar nav a { color:#374151; }
.topbar nav a.nav-active { color:#2563eb; font-weight:600; }
.topbar-right { margin-left: auto; display:flex; align-items:center; gap:.8rem; }

.btn-link {
  background: transparent;
  border: 0;
  color:#2563eb;
  cursor: pointer;
  font-size:.95rem;
  padding: 0;
}
.btn-link:hover { text-decoration: underline; }

.container {
  max-width: 1100px;
  margin: 1.2rem auto;
  padding: 0 1.2rem;
}

.table {
  width: 100%;
  border-collapse: collapse;
  margin-top: .6rem;
}
.table th, .table td {
  text-align: left;
  padding: .55rem .7rem;
  border-bottom: 1px solid #eef0f4;
  font-size: .95rem;
}
.table th { color:#374151; font-weight:600; background:#f9fafb; }

.row-between {
  display:flex; align-items:center; justify-content:space-between;
  margin-bottom:.4rem;
}

.btn-primary {
  background:#2563eb; color:#fff; border:0;
  padding:.45rem .9rem; border-radius:6px;
  cursor:pointer; font-size:.95rem;
}
.btn-primary:hover { background:#1d4ed8; }
.btn-primary:disabled { opacity:.6; cursor:not-allowed; }

.form-grid {
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap:.6rem;
  margin: .6rem 0 1rem;
  padding: .8rem;
  background:#f9fafb;
  border:1px solid #e5e7eb;
  border-radius:8px;
}
.form-grid input {
  padding:.5rem .65rem; border:1px solid #d1d5db; border-radius:6px;
  font-size:.95rem;
}
.form-grid input:focus {
  outline:none; border-color:#2563eb;
  box-shadow:0 0 0 3px rgba(37,99,235,.15);
}
.form-actions {
  grid-column: 1 / -1;
  display:flex; gap:.8rem; align-items:center;
}
.emp-del { color:#b91c1c; }
.emp-del:hover { color:#7f1d1d; }

.code-pill {
  background:#eef2ff; color:#1e3a8a;
  padding:.15rem .45rem; border-radius:5px;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size:.9rem; letter-spacing:.05em;
}
.tag-ok {
  background:#dcfce7; color:#166534;
  padding:.1rem .45rem; border-radius:5px;
  font-size:.8rem;
}
.emp-regen {
  font-size:1rem; padding:.05rem .35rem; line-height:1;
}
