/* ===== Base ===== */
:root{
  --bg: #f5f7fb;
  --panel: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: rgba(15, 23, 42, 0.10);
  --shadow: 0 10px 30px rgba(2, 6, 23, 0.08);
  --shadow-soft: 0 8px 24px rgba(2, 6, 23, 0.06);
  --primary: #2563eb;
  --primary-600: #1d4ed8;
  --chip: #eef2ff;
  --radius: 18px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body{
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 50% 0%, #e9efff 0%, rgba(233,239,255,0) 60%),
    radial-gradient(900px 500px at 80% 20%, #eefbf5 0%, rgba(238,251,245,0) 60%),
    var(--bg);
}

/* ===== Layout ===== */
.app-shell{
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.topbar{
  height: 68px;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  background: rgba(245,247,251,0.65);
  backdrop-filter: blur(10px);
}

.main{
  width: min(1100px, calc(100% - 48px));
  margin: 0 auto;
  padding: 34px 0 28px;
}

/* ===== Brand ===== */
.brand{
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark{
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(37,99,235,0.12), rgba(16,185,129,0.10));
  border: 1px solid rgba(37,99,235,0.18);
  color: #1f6feb;
  display: grid;
  place-items: center;
}

.brand-title{
  font-weight: 700;
  letter-spacing: -0.3px;
  font-size: 18px;
}

/* ===== Actions ===== */
.topbar-actions{
  display: flex;
  align-items: center;
  gap: 14px;
}

.status-pill{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(16,185,129,0.08);
  border: 1px solid rgba(16,185,129,0.18);
  box-shadow: 0 6px 18px rgba(2,6,23,0.05);
}

.status-dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34,197,94,0.18);
}

.status-text{
  font-size: 13px;
  color: #0f766e;
  font-weight: 600;
}

.settings-link{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.65);
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 13px;
}

.settings-link:hover{
  background: rgba(255,255,255,0.9);
  box-shadow: 0 8px 22px rgba(2,6,23,0.06);
}

.settings-icon{
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: rgba(2,6,23,0.04);
}

/* ===== Hero ===== */
.hero{
  text-align: center;
  padding: 22px 0 26px;
}

.hero-title{
  margin: 0;
  font-size: 44px;
  line-height: 1.05;
  letter-spacing: -1px;
}

.hero-subtitle{
  margin: 10px auto 0;
  max-width: 640px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

/* ===== Modules ===== */
.module-grid{
  margin-top: 22px;
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.module-card{
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 20px 18px 18px;
  display: flex;
  flex-direction: column;
  min-height: 310px;
}

.module-icon{
  display: flex;
  justify-content: center;
  margin-top: 8px;
}

.icon-chip{
  width: 74px;
  height: 74px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(37,99,235,0.12), rgba(59,130,246,0.06));
  border: 1px solid rgba(37,99,235,0.16);
  display: grid;
  place-items: center;
  color: #2563eb;
}

.module-title{
  margin: 18px 0 8px;
  font-size: 26px;
  letter-spacing: -0.5px;
  text-align: center;
}

.module-desc{
  margin: 0 auto;
  text-align: center;
  color: var(--muted);
  line-height: 1.55;
  max-width: 320px;
  min-height: 56px;
}

.module-actions{
  margin-top: auto;
  display: flex;
  justify-content: center;
  padding-top: 18px;
}

/* ===== Buttons ===== */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  min-width: 160px;
  padding: 0 18px;
  border-radius: 12px;
  font-weight: 700;
  border: 1px solid transparent;
  text-decoration: none;
  user-select: none;
}

.btn-primary{
  background: var(--primary);
  color: white;
  box-shadow: 0 10px 20px rgba(37,99,235,0.18);
}

.btn-primary:hover{
  background: var(--primary-600);
}

/* ===== Footer ===== */
.footer{
  padding: 22px 0 0;
}

.footer-inner{
  display: flex;
  justify-content: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.footer-inner .dot{ opacity: .7; }

/* ===== Responsive ===== */
@media (max-width: 980px){
  .module-grid{
    grid-template-columns: 1fr;
  }
  .module-card{
    min-height: 280px;
  }
  .hero-title{
    font-size: 38px;
  }
}

@media (max-width: 520px){
  .topbar{
    padding: 0 14px;
    height: auto;
    gap: 12px;
    flex-wrap: wrap;
    padding-top: 12px;
    padding-bottom: 12px;
  }
  .status-pill{
    padding: 8px 12px;
  }
  .hero-title{
    font-size: 32px;
  }
}
