/* =========================================================
   IME Dashboard — base styles
   You can safely customize this file.
   ========================================================= */

/* =========================================================
   IME Dashboard — Global (Font + Variables)
   ========================================================= */

/* Font: Figtree (Google Fonts) */
@import url('https://fonts.googleapis.com/css2?family=Figtree:wght@400;500;600;700;800&display=swap');

:root{
  --ime-font: "Figtree", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;

  --ime-bg: #f6f7fb;
  --ime-card: #ffffff;
  --ime-border: rgba(0,0,0,0.08);
  --ime-text: #111827;
  --ime-muted: rgba(17,24,39,0.65);

  --ime-radius: 18px;
  --ime-shadow: 0 8px 30px rgba(0,0,0,0.06);
}

/* Keep it simple: apply the font globally */
body{
  font-family: var(--ime-font);
}

/* =========================================================
   IME Dashboard — Page Layout
   ========================================================= */

.ime-dash-page{
  background: var(--ime-bg);
}

.ime-dash-container{
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 18px 44px;
  color: var(--ime-text);
}

/* =========================================================
   IME Dashboard — Header (greeting + pills)
   ========================================================= */

.ime-dash-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.ime-dash-greeting{
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}

.ime-dash-pills{
  display:flex;
  gap: 10px;
  align-items:center;
}

.ime-pill{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--ime-card);
  border: 1px solid var(--ime-border);
  box-shadow: 0 10px 30px rgba(0,0,0,0.06);
  font-weight: 600;
  font-size: 14px;
  line-height: 1;
  white-space: nowrap;
}

/* =========================================================
   IME Dashboard — Progress Track (top bar)
   ========================================================= */

.ime-track{
  margin: 12px 0 18px;
  background: #4b5563; /* dark-ish track */
  border-radius: 999px;
  height: 20px;
  position: relative;
  overflow: hidden;
}

.ime-track__fill{
  position:absolute;
  left:0; top:0; bottom:0;
  width: 22%; /* TODO dynamic */
  background: #7ddc6f; /* green fill */
}

.ime-track__dots{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  gap: 16px;
  padding: 0 14px;
  opacity: 0.95;
}

.ime-track__dot{
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(255,255,255,0.55);
}

.ime-track__dot.is-active{
  background: #ffffff;
  transform: scale(1.15);
}

/* =========================================================
   IME Dashboard — Bento Grid
   ========================================================= */

.ime-bento{
  display:grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}

/* =========================================================
   IME Dashboard — Card Base (Bento boxes)
   ========================================================= */

.ime-card{
  background: var(--ime-card);
  border: 1px solid var(--ime-border);
  border-radius: var(--ime-radius);
  box-shadow: var(--ime-shadow);
  padding: 18px;
}

.ime-card__title{
  font-weight: 700;
  font-size: 16px;
  margin: 0 0 6px;
}

.ime-card__muted{
  color: var(--ime-muted);
  font-size: 14px;
}

/* =========================================================
   IME Dashboard — Card Sizes (bento spans)
   ========================================================= */

.ime-col-3{ grid-column: span 3; }
.ime-col-4{ grid-column: span 4; }
.ime-col-5{ grid-column: span 5; }
.ime-col-7{ grid-column: span 7; }
.ime-col-12{ grid-column: span 12; }

@media (max-width: 980px){
  .ime-col-3,
  .ime-col-4,
  .ime-col-5,
  .ime-col-7,
  .ime-col-12{
    grid-column: span 12;
  }
}

/* =========================================================
   IME Widgets — Base
   (shared styles for all widgets)
   ========================================================= */

.ime-widget {
  /* Widget container (if you use widgets WITHOUT wrapping them in .ime-card) */
  border: 1px solid var(--ime-border);
  border-radius: 14px;
  padding: 16px;
  background: var(--ime-card);
}

.ime-widget__header { margin-bottom: 12px; }
.ime-widget__title { font-size: 18px; font-weight: 700; line-height: 1.2; }
.ime-widget__subtitle { font-size: 13px; opacity: 0.75; margin-top: 4px; }

.ime-widget__body { padding: 8px 0; }

.ime-widget__footer {
  margin-top: 10px;
  font-size: 12px;
  opacity: 0.65;
  display: flex;
  justify-content: flex-end;
}

/* =========================================================
   IME Widget — Streak
   ========================================================= */

.ime-streak { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.ime-streak__value { font-size: 34px; font-weight: 800; line-height: 1; letter-spacing: -0.03em; }
.ime-streak__unit { font-size: 14px; font-weight: 700; margin-left: 6px; opacity: 0.7; color: var(--ime-muted); }

.ime-streak__meta { font-size: 13px; opacity: 0.85; }
.ime-streak__meta strong { font-weight: 700; }