/* B-Line Platform Core — shared stylesheet.
   Used by every B-Line app. App-specific styles go in the app's own dir. */

:root {
  --bg: #0b1220;
  --bg-2: #0f1a30;
  --panel: #111c33;
  --line: #1f2c4a;
  --text: #e6ecf7;
  --muted: #93a3c2;
  --brand: #1e6cff;
  --brand-2: #4f8cff;
  --danger: #ff5a5a;
  --ok: #2ecc71;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: radial-gradient(1200px 800px at 20% -10%, #173066 0%, transparent 60%),
              radial-gradient(900px 700px at 110% 10%, #0a4a8a 0%, transparent 55%),
              linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

/* === Auth pages (login / denied) === */
body.auth { align-items: center; justify-content: center; padding: 24px; }
.card {
  width: 100%;
  max-width: 420px;
  background: rgba(17, 28, 51, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 36px 28px 28px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.45);
  text-align: center;
}
.brand .logo {
  width: 64px; height: 64px; margin: 0 auto 14px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  color: white; font-weight: 800; font-size: 26px;
  display: flex; align-items: center; justify-content: center;
  letter-spacing: 1px;
  box-shadow: 0 8px 24px rgba(30,108,255,0.45);
}
.brand .logo span { opacity: 0.6; margin: 0 2px; }
.brand h1 { margin: 6px 0 2px; font-size: 22px; }
.brand .tag { color: var(--muted); margin: 0 0 22px; font-size: 14px; }

.gbtn {
  display: inline-flex; align-items: center; gap: 10px;
  background: white; color: #1f2937;
  padding: 12px 18px; border-radius: 10px;
  text-decoration: none; font-weight: 600;
  border: 1px solid #dadce0;
  transition: transform 0.05s ease, box-shadow 0.2s ease;
}
.gbtn:hover { box-shadow: 0 6px 18px rgba(0,0,0,0.25); }
.gbtn:active { transform: translateY(1px); }
.gbtn.ghost { background: transparent; color: var(--text); border-color: var(--line); margin-top: 10px; }

.note { margin-top: 22px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.note strong { color: var(--text); }

.denied .logo {
  background: linear-gradient(135deg, #b32424 0%, var(--danger) 100%);
  box-shadow: 0 8px 24px rgba(255,90,90,0.35);
}

/* === App shell === */
body.app { display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 22px; border-bottom: 1px solid var(--line);
  background: rgba(11, 18, 32, 0.6); backdrop-filter: blur(8px);
  flex-wrap: wrap; gap: 8px;
}
.brand-row { display: flex; align-items: center; gap: 10px; }
.logo.small {
  width: 32px; height: 32px; border-radius: 8px; font-size: 14px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  display: flex; align-items: center; justify-content: center; color: white; font-weight: 800;
}
.logo.small span { opacity: 0.6; margin: 0 1px; }
.user { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 14px; flex-wrap: wrap; }
.user .role {
  background: var(--panel); border: 1px solid var(--line);
  padding: 2px 8px; border-radius: 999px; font-size: 12px; text-transform: uppercase;
  color: var(--brand-2);
}
.logout { color: var(--brand-2); text-decoration: none; font-weight: 600; }
.logout:hover { text-decoration: underline; }

.wrap { flex: 1; max-width: 960px; margin: 0 auto; padding: 36px 22px; width: 100%; }
.hero h1 { margin: 0 0 6px; font-size: 28px; }
.hero p  { color: var(--muted); margin: 0 0 28px; }

.grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.tile {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; padding: 18px;
}
.tile h3 { margin: 0 0 6px; font-size: 14px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.tile p  { margin: 0; font-size: 16px; }

.foot { text-align: center; color: var(--muted); padding: 18px; font-size: 12px; }

/* === Responsive === */
@media (max-width: 600px) {
  .wrap { padding: 24px 16px; }
  .hero h1 { font-size: 22px; }
  .topbar { padding: 12px 14px; }
}
