:root {
  --brand: #0072ce;
  --brand-dark: #00549b;
  --bg: #f5f7fa;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e5e7eb;
  --danger: #dc2626;
  --success: #059669;
  --tile-erp: #2563eb;
  --tile-hcm: #059669;
  --tile-portal: #d97706;
  --tile-support: #7c3aed;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
  color: var(--text); background: var(--bg);
  min-height: 100vh; display: flex; flex-direction: column;
}
.hidden { display: none !important; }

.hero { background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%); color: #fff; padding: 24px 32px 48px; }
.hero-inner { display: flex; justify-content: space-between; align-items: center; max-width: 1200px; margin: 0 auto 32px; gap: 16px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; font-size: 22px; font-weight: 600; }
.logo { background: rgba(255,255,255,0.18); width: 36px; height: 36px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-size: 20px; }
.tenant-chip { background: rgba(255,255,255,0.22); padding: 4px 12px; border-radius: 12px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.hero-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.hero-copy { max-width: 1200px; margin: 0 auto; }
.hero-copy h1 { font-size: 32px; margin: 0 0 8px; font-weight: 700; }
.hero-copy p { font-size: 16px; margin: 0; opacity: 0.92; }

main { flex: 1; max-width: 1200px; margin: -32px auto 0; padding: 0 32px 48px; width: 100%; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-bottom: 40px; }
.tile {
  background: var(--card); border-radius: 14px; padding: 24px;
  text-decoration: none; color: var(--text);
  box-shadow: 0 4px 14px rgba(0,0,0,0.06); border: 1px solid var(--border);
  transition: transform 0.16s, box-shadow 0.16s, border-color 0.16s;
  display: flex; flex-direction: column; gap: 14px;
  position: relative; overflow: hidden; min-height: 200px;
}
.tile:hover { transform: translateY(-3px); box-shadow: 0 12px 24px rgba(0,0,0,0.10); border-color: var(--tile-color, var(--brand)); }
.tile-icon { width: 56px; height: 56px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 28px; color: #fff; background: var(--tile-color, var(--brand)); }
.tile-title { font-size: 18px; font-weight: 600; margin: 0; }
.tile-desc { font-size: 13px; color: var(--muted); flex: 1; margin: 0; }
.tile-cta { font-size: 13px; color: var(--tile-color, var(--brand)); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.tile.disabled { pointer-events: none; opacity: 0.5; }
.tile-badge { position: absolute; top: 14px; right: 14px; background: var(--tile-color, var(--brand)); color: #fff; font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 8px; text-transform: uppercase; letter-spacing: 0.4px; }
.tile[data-color="erp"]     { --tile-color: var(--tile-erp); }
.tile[data-color="hcm"]     { --tile-color: var(--tile-hcm); }
.tile[data-color="portal"]  { --tile-color: var(--tile-portal); }
.tile[data-color="support"] { --tile-color: var(--tile-support); }

.info { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.info-card { background: var(--card); border-radius: 10px; border: 1px solid var(--border); padding: 16px 20px; display: flex; gap: 14px; align-items: flex-start; }
.info-card i { font-size: 20px; color: var(--brand); margin-top: 2px; }
.info-card strong { display: block; margin-bottom: 2px; font-size: 13px; }
.info-card span, .info-card a, .info-card code { font-size: 13px; color: var(--muted); }
.info-card code { font-family: "SF Mono", Monaco, monospace; background: var(--bg); padding: 2px 6px; border-radius: 4px; }
.info-card a { color: var(--brand); text-decoration: none; }
.info-card a:hover { text-decoration: underline; }

footer { text-align: center; padding: 20px; color: var(--muted); font-size: 12px; border-top: 1px solid var(--border); background: var(--card); }
footer .dot { margin: 0 6px; }

.btn-ghost {
  border: 1px solid rgba(255,255,255,0.4); background: rgba(255,255,255,0.1); color: #fff;
  padding: 8px 14px; border-radius: 8px; font-size: 13px; font-weight: 500; cursor: pointer;
  text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
  transition: background 0.15s;
}
.btn-ghost:hover { background: rgba(255,255,255,0.2); color: #fff; }
.btn-ghost-light { border: 1px solid var(--border); background: #fff; color: var(--text); padding: 8px 14px; border-radius: 8px; font-size: 13px; cursor: pointer; }
.btn-ghost-light:hover { background: var(--bg); }
.btn-danger { background: var(--danger); border: 1px solid var(--danger); color: #fff; padding: 8px 14px; border-radius: 8px; font-size: 13px; font-weight: 500; cursor: pointer; }
.btn-danger:hover { background: #b91c1c; }

.modal { position: fixed; inset: 0; background: rgba(15,23,42,0.5); display: flex; align-items: center; justify-content: center; z-index: 100; }
.modal-card { background: #fff; padding: 28px; border-radius: 14px; max-width: 460px; width: calc(100% - 32px); box-shadow: 0 20px 50px rgba(0,0,0,0.25); }
.modal-card h3 { margin: 0 0 12px; color: var(--danger); }
.modal-card p { margin: 0 0 12px; color: var(--text); font-size: 14px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.reset-status { margin-top: 12px; font-size: 13px; color: var(--muted); }
.reset-status.error { color: var(--danger); }
.reset-status.success { color: var(--success); }

@media (max-width: 640px) {
  .hero { padding: 20px 16px 40px; }
  .hero-copy h1 { font-size: 24px; }
  main { padding: 0 16px 32px; }
  .tile { min-height: 170px; padding: 18px; }
}
