/* Webghost Classic Cockpit – Pure CSS, Zero-JS */
:root {
  --bg: #f6f4f0;
  --surface: #ffffff;
  --surface-alt: #efece6;
  --text: #1c1e21;
  --muted: #565d66;
  --accent: #7a4b1f;
  --accent-hover: #5e3815;
  --accent-text: #ffffff;
  --border: #d9d3c9;
  --ok-bg: #e7f4ea;
  --ok-text: #14532d;
  --warn-bg: #fef3c7;
  --warn-text: #78350f;
  --err-bg: #fde8e8;
  --err-text: #991b1b;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}

a { color: var(--accent); }
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: var(--surface-alt);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.9em;
}

.topbar {
  background: #1c1e21;
  color: #f6f4f0;
  padding: 0.9rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.topbar-brand { font-weight: 700; font-size: 1.05rem; letter-spacing: 0.01em; }
.topbar-brand span { color: #d9a46c; font-weight: 500; font-size: 0.85rem; margin-left: 0.5rem; }
.topbar-nav { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.topbar-nav a, .topbar-nav button {
  color: #e8eaed;
  text-decoration: none;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  font-size: 0.9rem;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  font: inherit;
}
.topbar-nav a:hover, .topbar-nav button:hover { background: #2d3138; }
.topbar-nav a.active { background: var(--accent); color: var(--accent-text); }

.wrap { max-width: 1120px; margin: 1.75rem auto; padding: 0 1.25rem 3rem; }
.login-wrap { max-width: 440px; margin: 4.5rem auto; padding: 0 1.25rem; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.35rem 1.5rem;
  margin-bottom: 1.35rem;
}
.card h1, .card h2, .card h3 { margin-top: 0; }
.card h2 { font-size: 1.2rem; margin-bottom: 0.85rem; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 820px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.flash {
  padding: 0.85rem 1.1rem;
  border-radius: 8px;
  margin-bottom: 1.25rem;
  font-weight: 500;
  border: 1px solid transparent;
}
.flash-ok { background: var(--ok-bg); color: var(--ok-text); border-color: #b7e1c1; }
.flash-warn { background: var(--warn-bg); color: var(--warn-text); border-color: #f5d485; }
.flash-err { background: var(--err-bg); color: var(--err-text); border-color: #f5bcbc; }

.badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}
.badge-ok { background: var(--ok-bg); color: var(--ok-text); }
.badge-err { background: var(--err-bg); color: var(--err-text); }

label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 0.3rem; }
input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font: inherit;
  background: #fff;
  color: var(--text);
  margin-bottom: 0.9rem;
}
textarea { min-height: 110px; resize: vertical; }
.field-hint { font-size: 0.82rem; color: var(--muted); margin: -0.65rem 0 0.9rem; }

.btn {
  display: inline-block;
  padding: 0.55rem 1.05rem;
  border-radius: 6px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--accent-text);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: var(--accent-hover); }
.btn-secondary {
  background: var(--surface-alt);
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover { background: #e3ded5; }
.btn-danger {
  background: #fff;
  color: var(--err-text);
  border-color: #e6a8a8;
}
.btn-danger:hover { background: var(--err-bg); }
.btn-sm { padding: 0.3rem 0.65rem; font-size: 0.84rem; }

.table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.table th, .table td {
  text-align: left;
  padding: 0.55rem 0.6rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.table th { color: var(--muted); font-weight: 600; font-size: 0.84rem; text-transform: uppercase; letter-spacing: 0.03em; }

.swatch-row { display: flex; gap: 0.35rem; align-items: center; margin-top: 0.35rem; }
.swatch { width: 1.25rem; height: 1.25rem; border-radius: 4px; border: 1px solid rgba(0,0,0,0.2); display: inline-block; }

.project-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.85rem 1.2rem;
  margin-bottom: 1.35rem;
}
.project-bar form { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin: 0; }
.project-bar select { width: auto; margin: 0; }
.muted { color: var(--muted); }
.inline-form { display: inline; margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: center; }
