:root {
  --primary:#3498db;
  --success:#2ecc71;
  --warning:#f39c12;
  --danger:#e74c3c;
  --dark:#2c3e50;
  --light:#ecf0f1;
  --muted:#95a5a6;
  --bg:#f7f9fb;
  --card:#ffffff;
}

* { box-sizing: border-box; }

body {
  margin:0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:var(--bg);
  color:var(--dark);
}

.login-body {
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
}

.login-card {
  width:100%;
  max-width:420px;
  background:var(--card);
  border-radius:24px;
  padding:28px;
  box-shadow:0 12px 40px rgba(44,62,80,.12);
}

.brand-mark {
  width:64px;
  height:64px;
  border-radius:18px;
  background:var(--primary);
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:800;
  margin-bottom:14px;
}

h1,h2,h3,p { margin-top:0; }

label {
  display:block;
  font-size:12px;
  margin:14px 0 6px;
  color:#53616f;
}

input, select, textarea {
  width:100%;
  min-height:48px;
  padding:12px;
  border:1px solid #d7e0ea;
  border-radius:14px;
  background:#fff;
  font-size:15px;
}

textarea { min-height:90px; }

button {
  min-height:48px;
  border:0;
  border-radius:14px;
  background:var(--primary);
  color:#fff;
  font-size:15px;
  font-weight:700;
  padding:12px 18px;
  cursor:pointer;
}

button:active { transform:scale(.98); }

.ghost-btn {
  background:#fff;
  color:var(--primary);
  border:1px solid rgba(255,255,255,.55);
}

.form-message {
  margin-top:12px;
  color:var(--danger);
  min-height:20px;
}

.app-header {
  position:sticky;
  top:0;
  z-index:10;
  background:var(--primary);
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 16px;
  box-shadow:0 8px 24px rgba(52,152,219,.22);
}

.app-header small {
  display:block;
  opacity:.9;
  font-size:12px;
}

.app-shell {
  padding:16px;
  padding-bottom:90px;
  max-width:1100px;
  margin:0 auto;
}

.view { display:none; }
.view.active { display:block; }

.card-grid {
  display:grid;
  grid-template-columns:repeat(2, minmax(0,1fr));
  gap:12px;
  margin:14px 0;
}

.metric-card {
  background:#fff;
  border-radius:20px;
  padding:16px;
  box-shadow:0 8px 24px rgba(44,62,80,.08);
  border:1px solid #edf1f5;
}

.metric-card strong {
  display:block;
  font-size:28px;
  line-height:1;
  margin-bottom:8px;
}

.metric-card span {
  color:#657587;
  font-size:13px;
}

.metric-card.warning { border-color:rgba(243,156,18,.35); box-shadow:0 0 0 4px rgba(243,156,18,.08); }
.metric-card.danger { border-color:rgba(231,76,60,.35); box-shadow:0 0 0 4px rgba(231,76,60,.08); }
.metric-card.success { border-color:rgba(46,204,113,.35); }

.panel {
  background:#fff;
  border-radius:22px;
  padding:16px;
  margin:16px 0;
  box-shadow:0 8px 24px rgba(44,62,80,.08);
}

.panel-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:12px;
}

.panel-head h3 { margin:0; }

.panel-head button {
  min-height:40px;
  padding:8px 12px;
  font-size:13px;
}

.grid-form {
  display:grid;
  grid-template-columns:1fr;
  gap:10px;
}

.mobile-list {
  display:grid;
  gap:10px;
}

.list-card {
  padding:14px;
  border:1px solid #edf1f5;
  border-radius:16px;
  background:#fbfdff;
}

.list-card strong { display:block; }
.list-card small { color:#657587; }

.activity-list {
  display:grid;
  gap:8px;
}

.activity-item {
  font-size:13px;
  padding:10px;
  border-radius:12px;
  background:#f7f9fb;
}

.bottom-nav {
  position:fixed;
  bottom:0;
  left:0;
  right:0;
  background:#fff;
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:8px;
  padding:10px;
  box-shadow:0 -8px 24px rgba(44,62,80,.12);
  z-index:20;
}

.bottom-nav button {
  background:#f1f5f9;
  color:#334155;
  border-radius:16px;
  font-size:13px;
}

.bottom-nav button.active {
  background:var(--primary);
  color:#fff;
}

@media (min-width:768px) {
  .card-grid { grid-template-columns:repeat(5, minmax(0,1fr)); }
  .grid-form { grid-template-columns:repeat(2, minmax(0,1fr)); }
  .grid-form textarea,
  .grid-form button { grid-column:1 / -1; }
}
