:root{
  --tp-primary:#1F2A44;
  --tp-secondary:#2D3748;
  --tp-accent:#2E7DFF;
  --tp-bg:#F4F6F9;
  --tp-text:#1A202C;
}
*{box-sizing:border-box}
body{margin:0;font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;background:var(--tp-bg);color:var(--tp-text)}

/* ---- Top bar (mobile) ---- */
.tp-topbar{display:none;align-items:center;gap:.75rem;background:var(--tp-primary);color:#fff;padding:.75rem 1rem;position:sticky;top:0;z-index:20}
.tp-hamburger{background:none;border:0;color:#fff;font-size:1.4rem;cursor:pointer}
.tp-brand-text{font-weight:700;letter-spacing:.02em}
.tp-logo{max-height:32px}

/* ---- Shell layout ---- */
.tp-shell{display:flex;min-height:100vh}
.tp-sidebar{width:240px;background:var(--tp-primary);color:#fff;flex-shrink:0}
.tp-sidebar ul{list-style:none;margin:0;padding:1rem 0}
.tp-sidebar a{display:block;padding:.75rem 1.25rem;color:#cbd5e1;text-decoration:none;font-size:.95rem}
.tp-sidebar a:hover{background:var(--tp-secondary);color:#fff}
.tp-content{flex:1;padding:2rem;min-width:0}

/* ---- Cards ---- */
.tp-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:1rem;margin:1.5rem 0}
.tp-card{background:#fff;border-radius:10px;padding:1.25rem;box-shadow:0 1px 4px rgba(0,0,0,.08);text-align:center}
.tp-card-num{display:block;font-size:2rem;font-weight:700;color:var(--tp-accent)}
.tp-card-label{display:block;margin-top:.4rem;color:#5a6474;font-size:.85rem}
.tp-charts-placeholder{background:#fff;border-radius:10px;padding:1.25rem;box-shadow:0 1px 4px rgba(0,0,0,.08);color:#5a6474}

/* ---- Alerts ---- */
.tp-alert{padding:.85rem 1rem;border-radius:8px;margin:1rem 0}
.tp-alert-ok{background:#e6f7ee;color:#0a6e3a}
.tp-alert-warn{background:#fff6e0;color:#8a5a00}
.tp-alert-error{background:#fde8e8;color:#a10000}

/* ---- Auth pages ---- */
.tp-auth-page{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:1rem}
.tp-auth-card{background:#fff;padding:2rem;border-radius:12px;box-shadow:0 2px 12px rgba(0,0,0,.1);width:100%;max-width:400px}
.tp-auth-card h1{margin-top:0;font-size:1.4rem;color:var(--tp-primary)}
.tp-auth-card label{display:block;font-weight:600;font-size:.85rem;margin-bottom:.25rem}
.tp-auth-card input,.tp-auth-card select{width:100%;padding:.6rem;margin-bottom:1rem;border:1px solid #d1d5db;border-radius:6px}
.tp-auth-card button{width:100%;background:var(--tp-accent);color:#fff;border:0;padding:.75rem;border-radius:6px;font-size:1rem;cursor:pointer}

/* ---- Responsive: tablet / mobile -> collapsible top navbar ---- */
@media (max-width: 900px){
  .tp-topbar{display:flex}
  .tp-shell{flex-direction:column}
  .tp-sidebar{width:100%;max-height:0;overflow:hidden;transition:max-height .25s ease}
  body.tp-nav-open .tp-sidebar{max-height:600px}
  .tp-content{padding:1.25rem}
}
