/* Innovadata Portal — shares design tokens with the main site (css/style.css). */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --c-bg: #FFFFFF;
  --c-bg-elevated: #F8FAFC;
  --c-surface: #F1F5F9;
  --c-surface-hover: #E2E8F0;
  --c-text: #0F172A;
  --c-text-secondary: #475569;
  --c-text-muted: #94A3B8;
  --c-primary: #4F46E5;
  --c-primary-hover: #4338CA;
  --c-primary-light: rgba(79,70,229,0.07);
  --c-accent: #6366F1;
  --c-success: #059669;
  --c-success-light: rgba(5,150,105,0.1);
  --c-error: #DC2626;
  --c-error-light: rgba(220,38,38,0.1);
  --c-warning: #D97706;
  --c-border: rgba(15,23,42,0.08);
  --c-border-hover: rgba(79,70,229,0.15);
  --shadow-sm: 0 1px 3px rgba(15,23,42,0.06), 0 1px 2px rgba(15,23,42,0.04);
  --shadow: 0 4px 12px rgba(15,15,46,0.06);
  --shadow-lg: 0 8px 30px rgba(15,15,46,0.08);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-width: 1100px;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-pill: 999px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  color: var(--c-text);
  background: var(--c-bg-elevated);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}
a { color: var(--c-primary); text-decoration: none; }
a:hover { color: var(--c-primary-hover); }

/* ── Top bar ── */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px; background: var(--c-bg); border-bottom: 1px solid var(--c-border);
  position: sticky; top: 0; z-index: 10;
}
.nav .brand { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.nav .brand img { height: 28px; }
.nav .spacer { flex: 1; }
.nav .who { color: var(--c-text-secondary); font-size: 14px; margin-right: 12px; }

/* ── Layout ── */
.wrap { max-width: var(--max-width); margin: 0 auto; padding: 28px 24px; }
.center { min-height: calc(100vh - 0px); display: grid; place-items: center; padding: 24px; }

/* ── Auth card ── */
.card {
  background: var(--c-bg); border: 1px solid var(--c-border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  padding: 32px; width: 100%; max-width: 420px;
}
.card .logo { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.card .logo img { height: 30px; }
.card h1 { font-size: 22px; font-weight: 700; margin: 16px 0 4px; }
.card .sub { color: var(--c-text-secondary); font-size: 14px; margin-bottom: 22px; }

.tabs { display: flex; gap: 4px; background: var(--c-surface); padding: 4px;
  border-radius: var(--radius-pill); margin-bottom: 22px; }
.tabs button {
  flex: 1; border: 0; background: transparent; padding: 9px 12px; cursor: pointer;
  border-radius: var(--radius-pill); font-weight: 600; font-size: 14px; color: var(--c-text-secondary);
  font-family: var(--font);
}
.tabs button.active { background: var(--c-bg); color: var(--c-primary); box-shadow: var(--shadow-sm); }

label { display: block; font-size: 13px; font-weight: 600; color: var(--c-text-secondary);
  margin: 14px 0 6px; }
input, select {
  width: 100%; padding: 11px 13px; border: 1px solid var(--c-border); border-radius: var(--radius);
  font-family: var(--font); font-size: 14px; background: var(--c-bg); color: var(--c-text);
}
input:focus, select:focus { outline: none; border-color: var(--c-primary);
  box-shadow: 0 0 0 3px var(--c-primary-light); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; margin-top: 20px; padding: 12px 16px; border: 0; border-radius: var(--radius);
  background: var(--c-primary); color: #fff; font-weight: 600; font-size: 15px; cursor: pointer;
  font-family: var(--font); transition: background .15s;
}
.btn:hover { background: var(--c-primary-hover); }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn.secondary { background: var(--c-surface); color: var(--c-text); }
.btn.danger { background: var(--c-error); }
.btn.sm { width: auto; margin: 0; padding: 7px 12px; font-size: 13px; border-radius: var(--radius-sm); }

.social { display: grid; gap: 8px; margin-top: 8px; }
.social button {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
  padding: 11px; border: 1px solid var(--c-border); border-radius: var(--radius);
  background: var(--c-bg); font-weight: 600; font-size: 14px; cursor: pointer; font-family: var(--font);
}
.social button:hover { background: var(--c-surface); }
.divider { display: flex; align-items: center; gap: 10px; color: var(--c-text-muted);
  font-size: 12px; margin: 18px 0; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--c-border); }

.msg { margin-top: 16px; padding: 11px 13px; border-radius: var(--radius); font-size: 14px; display: none; }
.msg.show { display: block; }
.msg.ok { background: var(--c-success-light); color: var(--c-success); }
.msg.err { background: var(--c-error-light); color: var(--c-error); }
.muted { color: var(--c-text-muted); font-size: 13px; }
.link-btn { background: none; border: 0; color: var(--c-primary); cursor: pointer;
  font-family: var(--font); font-size: 13px; padding: 0; }

/* ── Dashboard / admin ── */
.grid { display: grid; gap: 16px; }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 760px) { .cols-3, .cols-4 { grid-template-columns: 1fr 1fr; } }
.panel { background: var(--c-bg); border: 1px solid var(--c-border); border-radius: var(--radius-lg);
  padding: 20px; box-shadow: var(--shadow-sm); }
.panel h2 { font-size: 15px; font-weight: 700; margin-bottom: 14px; }
.stat .n { font-size: 28px; font-weight: 800; color: var(--c-primary); }
.stat .l { font-size: 13px; color: var(--c-text-secondary); margin-top: 2px; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .03em;
  color: var(--c-text-muted); padding: 10px 12px; border-bottom: 1px solid var(--c-border); }
td { padding: 11px 12px; border-bottom: 1px solid var(--c-border); }
tr:last-child td { border-bottom: 0; }

.badge { display: inline-block; padding: 3px 9px; border-radius: var(--radius-pill);
  font-size: 12px; font-weight: 600; }
.badge.active { background: var(--c-success-light); color: var(--c-success); }
.badge.pending { background: rgba(217,119,6,0.12); color: var(--c-warning); }
.badge.disabled { background: var(--c-error-light); color: var(--c-error); }
.badge.role { background: var(--c-primary-light); color: var(--c-primary); }

.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar input, .toolbar select { width: auto; }
.section-title { font-size: 18px; font-weight: 700; margin: 26px 0 12px; }
code.key { background: var(--c-surface); padding: 4px 8px; border-radius: var(--radius-sm);
  font-family: ui-monospace, monospace; font-size: 13px; word-break: break-all; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
