* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Prompt', system-ui, sans-serif;
  background: #f4f6fa;
  color: #181a1f;
  -webkit-font-smoothing: antialiased;
}
input, select, button, textarea { font-family: inherit; }
select { appearance: none; }

@keyframes smyfade {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

#app-shell {
  max-width: 840px;
  margin: 0 auto;
  min-height: 100vh;
  background: #ffffff;
  box-shadow: 0 0 60px rgba(70, 84, 120, .08);
}

.smy-view { animation: smyfade .35s ease; }

.card-hover { transition: transform .15s; }
.card-hover:hover { transform: translateY(-3px); }

#loading-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  font-size: 15px;
  color: #6b7280;
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #1f2430;
  color: #fff;
  padding: 12px 22px;
  border-radius: 14px;
  font-size: 14px;
  z-index: 80;
  box-shadow: 0 12px 30px -10px rgba(20, 26, 40, .5);
  white-space: nowrap;
}
.toast.error { background: #c0392b; }

/* ---------- layout helpers ---------- */

.smy-pad { padding: 28px 28px; }
.smy-view-pad { padding: 28px 28px 48px; }

.smy-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255,255,255,.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #eef0f5;
}
.smy-topbar-right { display: flex; align-items: center; gap: 8px; }

.smy-hero { text-align: center; padding: 40px 20px 24px; }
.smy-hero h1 { font-size: 32px; font-weight: 700; margin: 0 0 6px; }
.smy-hero p  { font-size: 15px; color: #6b7280; margin: 0; }

.smy-section { padding: 0 28px 40px; }
.smy-section-title { font-size: 13px; font-weight: 600; color: #6b7280; margin: 0 0 14px; letter-spacing: .4px; }

.smy-month-select {
  display: block;
  width: 100%;
  max-width: 320px;
  margin: 0 auto 32px;
  font-size: 16px;
  font-weight: 500;
  padding: 13px 18px;
  border: 1.5px solid #d7dce6;
  border-radius: 16px;
  background: #fff;
  cursor: pointer;
  text-align: center;
}

.smy-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.smy-card-grid-lg {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.smy-admin-tabs {
  display: flex;
  gap: 6px;
  padding: 16px 20px 0;
  border-bottom: 1px solid #eef0f5;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.smy-admin-tabs::-webkit-scrollbar { display: none; }

.smy-admin-body { padding: 24px 20px; }

.smy-modal-box {
  width: 100%;
  max-width: 420px;
  max-height: 90vh;
  overflow: auto;
  background: #fff;
  border-radius: 22px;
  padding: 22px;
  box-shadow: 0 30px 60px -20px rgba(20,26,40,.5);
}

/* ---------- mobile ---------- */

@media (max-width: 768px) {
  .smy-pad { padding: 16px; }
  .smy-view-pad { padding: 16px 16px 60px; }

  .smy-hero { padding: 28px 16px 16px; }
  .smy-hero h1 { font-size: 24px; }
  .smy-hero p  { font-size: 14px; }

  .smy-section { padding: 0 16px 32px; }

  .smy-month-select { font-size: 15px; padding: 12px 14px; }

  .smy-card-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .smy-card-grid-lg { grid-template-columns: repeat(4, 1fr); gap: 6px; }

  .smy-topbar { padding: 10px 14px; }
  .smy-topbar .smy-brand-name { display: none; }

  .smy-admin-tabs { padding: 12px 12px 0; }
  .smy-admin-body { padding: 16px 14px; }

  .smy-modal-box {
    border-radius: 18px 18px 0 0;
    max-height: 92vh;
    padding: 18px 16px;
  }

  .toast { font-size: 13px; padding: 10px 16px; max-width: 90vw; white-space: normal; text-align: center; }
}
