/* Obelisk Admin-UI — Clean Minimal */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  font-family: Helvetica, Arial, sans-serif;
  color: #0a0a0a;
  background: #fafafa;
  font-size: 14px;
  line-height: 1.5;
}
a { color: #0a0a0a; text-decoration: none; border-bottom: 1px solid #ccc; }
a:hover { border-bottom-color: #0a0a0a; }

/* Layout */
.app { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
aside {
  background: #fff; border-right: 1px solid #e5e5e5;
  padding: 24px 0; display: flex; flex-direction: column;
}
.brand { padding: 0 24px 24px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid #f0f0f0; }
.brand img { width: 28px; height: 28px; }
.brand .name { font-size: 14px; font-weight: 300; letter-spacing: 4px; }
.brand .version { font-size: 10px; color: #999; letter-spacing: 1px; }
nav { padding: 16px 12px; flex: 1; display: flex; flex-direction: column; gap: 2px; }
nav a { padding: 8px 12px; border-radius: 4px; border: none; font-size: 13px; color: #333; display: block; }
nav a:hover { background: #f5f5f5; }
nav a.active { background: #0a0a0a; color: #fff; }
.nav-sep { height: 1px; background: #f0f0f0; margin: 12px 4px; }
aside .foot { padding: 12px 24px; font-size: 11px; color: #999; border-top: 1px solid #f0f0f0; }
aside .foot a { color: #666; font-size: 11px; }

main { padding: 32px 40px; max-width: 1200px; }
h1 { font-size: 22px; font-weight: 400; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 24px; }
h2 { font-size: 15px; font-weight: 500; margin: 24px 0 12px; color: #333; }
h3 { font-size: 13px; font-weight: 500; color: #666; text-transform: uppercase; letter-spacing: 1px; margin: 16px 0 8px; }

/* Cards + Grid */
.card {
  background: #fff; border: 1px solid #e5e5e5; border-radius: 4px;
  padding: 20px 24px; margin-bottom: 16px;
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat { padding: 16px 20px; border: 1px solid #e5e5e5; background: #fff; border-radius: 4px; }
.stat .label { font-size: 10px; color: #999; letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 4px; }
.stat .value { font-size: 26px; font-weight: 300; }
.stat .value.ok { color: #059669; }
.stat .value.bad { color: #dc2626; }
.stat .sub { font-size: 11px; color: #999; margin-top: 4px; }

/* Table */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; padding: 10px 12px; font-weight: 500; font-size: 11px; color: #999; text-transform: uppercase; letter-spacing: 1px; border-bottom: 2px solid #0a0a0a; background: #fafafa; }
td { padding: 10px 12px; border-bottom: 1px solid #f0f0f0; vertical-align: top; }
tr:hover td { background: #fafafa; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.mono { font-family: Consolas, monospace; font-size: 11px; color: #666; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 10px; letter-spacing: .5px; }
.pill.ok { background: #d1fae5; color: #065f46; }
.pill.bad { background: #fee2e2; color: #991b1b; }
.pill.warn { background: #fef3c7; color: #92400e; }
.pill.neutral { background: #e5e7eb; color: #374151; }

/* Buttons */
button, .btn {
  background: #0a0a0a; color: #fff; border: none; padding: 9px 16px;
  font-size: 12px; letter-spacing: 1px; cursor: pointer;
  text-transform: uppercase; border-radius: 2px;
}
button:hover, .btn:hover { background: #333; }
button.sec, .btn.sec { background: #fff; color: #0a0a0a; border: 1px solid #0a0a0a; }
button.sec:hover { background: #f5f5f5; }
button.danger { background: #dc2626; }
button.small { padding: 4px 10px; font-size: 10px; }

/* Forms */
input, textarea, select {
  width: 100%; padding: 9px 12px; font-size: 13px; font-family: inherit;
  border: 1px solid #ccc; border-radius: 3px; background: #fff;
}
input:focus, textarea:focus { outline: none; border-color: #0a0a0a; }
label { display: block; font-size: 11px; color: #666; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 4px; }
.field { margin-bottom: 16px; }

/* Login */
.login-wrap { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; }
.login-card { width: 100%; max-width: 380px; background: #fff; border: 1px solid #e5e5e5; padding: 40px; }
.login-card h1 { text-align: center; margin-bottom: 24px; font-size: 18px; letter-spacing: 6px; }
.login-card .brand-logo { display: flex; justify-content: center; margin-bottom: 16px; }
.login-card img { width: 64px; height: 64px; }

/* Markdown content (changelog) */
.md h1 { font-size: 20px; margin: 16px 0 12px; letter-spacing: 0; text-transform: none; }
.md h2 { font-size: 16px; border-bottom: 1px solid #e5e5e5; padding-bottom: 4px; }
.md h3 { font-size: 13px; color: #333; text-transform: none; letter-spacing: 0; font-weight: 600; }
.md ul { margin: 8px 0 12px 24px; }
.md li { margin-bottom: 4px; }
.md code { background: #f5f5f5; padding: 1px 5px; border-radius: 2px; font-size: 12px; }
.md p { margin-bottom: 10px; }

/* Preview */
.pdf-preview iframe { width: 100%; height: 900px; border: 1px solid #e5e5e5; }
.xml-view { font-family: Consolas, monospace; font-size: 11px; background: #1e293b; color: #e2e8f0; padding: 16px; border-radius: 4px; overflow: auto; max-height: 500px; white-space: pre; }
.toast { position: fixed; bottom: 24px; right: 24px; padding: 12px 20px; background: #0a0a0a; color: #fff; border-radius: 3px; font-size: 13px; opacity: 0; transition: opacity .2s; }
.toast.show { opacity: 1; }
.toast.error { background: #dc2626; }

.breadcrumb { font-size: 12px; color: #999; margin-bottom: 8px; }
.breadcrumb a { color: #666; }
.empty { color: #999; font-size: 13px; padding: 40px; text-align: center; }

/* Tooltips */
.tip { position: relative; display: inline-block; margin-left: 6px; cursor: help; }
.tip::before {
  content: '?'; display: inline-flex; align-items: center; justify-content: center;
  width: 14px; height: 14px; border-radius: 50%; background: #e5e5e5; color: #666;
  font-size: 10px; font-weight: bold; border: none;
}
.tip:hover::before { background: #0a0a0a; color: #fff; }
.tip::after {
  content: attr(data-tip);
  position: absolute; left: 20px; top: -4px;
  background: #0a0a0a; color: #fff;
  padding: 6px 10px; border-radius: 3px;
  font-size: 11px; font-weight: normal; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity .15s;
  z-index: 100;
}
.tip[data-tip*=" "]::after { white-space: normal; width: 260px; line-height: 1.4; }
.tip:hover::after { opacity: 1; }
.tip.below::after { top: 20px; left: -120px; }

nav a .nav-tip {
  display: inline-block; float: right; margin-top: 2px;
  width: 14px; height: 14px; border-radius: 50%; background: #e5e5e5; color: #666;
  font-size: 9px; font-weight: bold; text-align: center; line-height: 14px;
  cursor: help;
}
nav a:hover .nav-tip { background: #fafafa; color: #999; }
nav a.active .nav-tip { background: #333; color: #fff; }
nav a .nav-tip:hover { background: #0a0a0a; color: #fff; }
