/* main.css — Global variables + base. Dark theme matching MKI aesthetic. */

:root {
  --bg-primary: #0f1115;
  --bg-secondary: #181b22;
  --bg-card: #1e222b;
  --accent: #4f8cff;
  --accent-hover: #6b9fff;
  --text-primary: #e8eaed;
  --text-muted: #9aa0ac;
  --border: #2a2f3a;

  --green: #2ecc71;
  --yellow: #f1c40f;
  --red: #e74c3c;
  --grey: #7f8c8d;

  --radius: 10px;
  --gap: 16px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.5;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
.muted { color: var(--text-muted); }
h1, h2, h3 { font-weight: 600; }

/* Layout: sidebar + main */
.layout { display: flex; min-height: 100vh; }
#nav {
  width: 220px;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 20px 12px;
}
.nav-brand { font-weight: 700; font-size: 16px; padding: 0 8px 16px; }
.nav-links { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-link {
  padding: 9px 12px; border-radius: 8px; color: var(--text-muted);
}
.nav-link:hover { background: var(--bg-card); color: var(--text-primary); }
.nav-link.active { background: var(--accent); color: #fff; }
.nav-logout {
  background: transparent; border: 1px solid var(--border); color: var(--text-muted);
  padding: 8px; border-radius: 8px; cursor: pointer; margin-top: 12px;
}
.nav-logout:hover { color: var(--text-primary); border-color: var(--text-muted); }

main { flex: 1; padding: 28px 32px; max-width: 1200px; }

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: var(--gap);
}
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--gap); }

/* Forms */
label { display: block; margin: 12px 0 4px; color: var(--text-muted); font-size: 13px; }
input, select, textarea {
  width: 100%; padding: 9px 11px; background: var(--bg-primary);
  border: 1px solid var(--border); border-radius: 8px; color: var(--text-primary);
  font-size: 14px;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }

/* Buttons */
.btn {
  display: inline-block; background: var(--accent); color: #fff; border: none;
  padding: 9px 16px; border-radius: 8px; cursor: pointer; font-size: 14px; font-weight: 500;
}
.btn:hover { background: var(--accent-hover); color: #fff; }
.btn-secondary { background: transparent; border: 1px solid var(--border); color: var(--text-primary); }
.btn-secondary:hover { border-color: var(--accent); }

/* Tables */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); }
th { color: var(--text-muted); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }
tr:hover td { background: var(--bg-secondary); }
.highlight-green { color: var(--green); font-weight: 600; }

/* Badges */
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 500; }
.badge-green { background: rgba(46,204,113,.15); color: var(--green); }
.badge-yellow { background: rgba(241,196,15,.15); color: var(--yellow); }
.badge-red { background: rgba(231,76,60,.15); color: var(--red); }
.badge-grey { background: rgba(127,140,141,.15); color: var(--grey); }

/* Pills (editable taxonomy) */
.pill { display: inline-flex; align-items: center; gap: 6px; background: var(--bg-secondary);
  border: 1px solid var(--border); padding: 4px 10px; border-radius: 999px; margin: 3px; }

/* Login centered */
.auth-wrap { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.auth-card { width: 340px; }

/* Tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.tab { padding: 9px 16px; cursor: pointer; color: var(--text-muted); border-bottom: 2px solid transparent; }
.tab.active { color: var(--text-primary); border-bottom-color: var(--accent); }

.metric { font-size: 32px; font-weight: 700; }
.metric-label { color: var(--text-muted); font-size: 13px; }
.build-tag { position: fixed; bottom: 6px; right: 10px; font-size: 11px; color: var(--text-muted); opacity: .5; }
