/* ============================================================
   jadualcuti.my — Tema "Ceria"
   Satu fail sahaja. Muat dalam layouts/app.blade.php
   ============================================================ */

:root {
  --coral:   #ff5a4d;
  --orange:  #ff8a3d;
  --teal:    #12b5a5;
  --indigo:  #4b4ded;
  --violet:  #7c4dff;
  --pink:    #ff5aa0;
  --green:   #0e9f6e;
  --sunny:   #ffb020;

  --ink:     #201a2e;
  --ink-2:   #4a4458;
  --muted:   #8a83a0;
  --line:    #f0e7de;

  --cream:   #fffdfb;
  --paper:   #ffffff;
  --wash:    #fff7f2;

  --grad:    linear-gradient(135deg, #ff5a4d, #ff8a3d);
  --radius:  18px;
  --radius-lg: 28px;
  --shadow:  0 30px 60px -40px rgba(32, 26, 46, .45);
  --shadow-sm: 0 10px 24px -16px rgba(32, 26, 46, .4);
  --font: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

html { overflow-x: hidden; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--wash);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.section { padding: 40px 0; }
.section__head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px; gap: 16px; flex-wrap: wrap;
}
.section__title { margin: 0; font-size: 22px; font-weight: 800; color: var(--ink); }
.link-more { color: var(--coral); font-size: 14px; font-weight: 700; }
.eyebrow {
  display: inline-block; background: #ffe3dd; color: #e0392c;
  font-size: 12px; font-weight: 700; letter-spacing: .06em;
  padding: 7px 14px; border-radius: 999px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font); font-weight: 700; font-size: 14px;
  padding: 12px 22px; border-radius: 14px; border: none; cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--grad   { background: var(--grad); color: #fff; box-shadow: 0 14px 28px -14px rgba(255,90,77,.6); }
.btn--violet { background: #f3f0ff; color: var(--indigo); }
.btn--teal   { background: #e8fbf6; color: var(--green); }
.btn--ghost  { background: #fff; border: 2px solid #ffd9d2; color: var(--coral); }

/* ---------- Badges ---------- */
.badge {
  display: inline-block; font-size: 11px; font-weight: 800;
  padding: 4px 10px; border-radius: 999px; white-space: nowrap;
}
.badge--past   { background: #eeebf2; color: var(--muted); }
.badge--soon   { background: var(--green); color: #fff; }
.badge--indigo { background: var(--indigo); color: #fff; }
.badge--soft   { background: #e8e6ff; color: var(--indigo); }

/* ---------- Navbar ---------- */
.site-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 0;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; }
.brand__logo {
  width: 34px; height: 34px; border-radius: 10px; background: var(--grad);
  display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.brand__dot { color: var(--coral); }
.nav-links { display: flex; align-items: center; gap: 26px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.nav-links a.is-active { color: var(--coral); }
.nav-year { background: var(--grad); color: #fff; padding: 8px 16px; border-radius: 999px; font-weight: 700; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, var(--wash) 0%, var(--cream) 100%);
  border-radius: var(--radius-lg); padding: 46px 44px;
  display: flex; align-items: center; gap: 40px;
}
.hero__blob { position: absolute; border-radius: 50%; z-index: 0; }
.hero__blob--1 { top: -30px; right: 60px; width: 120px; height: 120px; background: #ffe08a; opacity: .5; }
.hero__blob--2 { bottom: 10px; right: 220px; width: 60px; height: 60px; background: #a5e8dd; opacity: .6; }
.hero__body { flex: 1; position: relative; z-index: 1; }
.hero__title { margin: 18px 0 0; font-size: 48px; line-height: 1.05; font-weight: 800; color: var(--ink); }
.hero__lede { margin: 18px 0 0; max-width: 420px; color: var(--ink-2); font-size: 16px; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.countdown-card {
  position: relative; z-index: 1;
  width: 280px; flex: none; background: var(--grad); border-radius: 24px;
  padding: 28px; color: #fff; box-shadow: 0 26px 50px -20px rgba(255,90,77,.6);
}
.countdown-card__label { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .1em; opacity: .9; }
.countdown-card__name  { margin: 8px 0 0; font-size: 24px; font-weight: 800; line-height: 1.15; }
.countdown-card__date  { margin: 8px 0 18px; font-size: 13px; opacity: .9; }
.countdown-card__box   { background: rgba(255,255,255,.2); border-radius: 16px; padding: 14px; text-align: center; }
.countdown-card__num   { font-size: 48px; font-weight: 800; line-height: 1; }
.countdown-card__unit  { font-size: 12px; font-weight: 700; letter-spacing: .12em; }

/* ---------- Holiday cards (cuti terdekat) ---------- */
.holiday-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.holiday-grid--4 { grid-template-columns: repeat(4, 1fr); }
.holiday-card {
  background: var(--tint, #fff0ee); border-top: 4px solid var(--hue, var(--coral));
  border-radius: var(--radius); padding: 16px 15px;
  display: flex; flex-direction: column; gap: 9px; min-height: 150px; color: var(--ink);
}
.holiday-card__day { font-weight: 800; font-size: 22px; line-height: 1; }
.holiday-card__day small { font-size: 12px; font-weight: 600; opacity: .8; }
.holiday-card__name { font-weight: 700; font-size: 13.5px; line-height: 1.25; flex: 1; }
.holiday-card__dow  { font-size: 11.5px; font-weight: 600; opacity: .75; }
.holiday-card__states { font-size: 11px; font-weight: 600; color: var(--muted); line-height: 1.35; }
.holiday-card__badge {
  align-self: flex-start; background: var(--hue, var(--coral)); color: #fff;
  font-size: 11px; font-weight: 800; padding: 4px 9px; border-radius: 999px;
}

/* ---------- Panels (cuti sekolah / negeri di home) ---------- */
.panel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.panel { border-radius: 20px; padding: 26px; }
.panel--violet { background: #f3f0ff; }
.panel--teal   { background: #e8fbf6; }
.panel__title  { margin: 0 0 4px; font-weight: 800; font-size: 20px; }
.panel__sub    { margin: 0 0 16px; font-size: 13px; color: var(--muted); }
.school-row {
  display: flex; align-items: center; justify-content: space-between;
  background: #fff; border-radius: 14px; padding: 12px 15px; margin-bottom: 10px;
}
.school-row__name { font-weight: 700; font-size: 13.5px; color: #2a2438; }
.school-row__date { font-size: 12px; color: var(--muted); }

/* ---------- State chips ---------- */
.state-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  background: var(--chip-bg, #ffe3dd); color: var(--chip-fg, #d94a3d);
  font-size: 12.5px; font-weight: 700; padding: 8px 14px; border-radius: 999px;
  transition: transform .1s ease;
}
.chip:hover { transform: translateY(-1px); }
.chip--grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.chip--grid .chip { text-align: center; }

/* ---------- Calendar (paparan bulan) ---------- */
.calendar { background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 32px; box-shadow: var(--shadow); }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; flex-wrap: wrap; gap: 12px; }
.cal-title { margin: 0; font-weight: 800; font-size: 30px; }
.cal-title span { color: var(--coral); }
.cal-nav { display: flex; align-items: center; gap: 12px; }
.cal-nav__btn { width: 40px; height: 40px; border-radius: 12px; background: #fff0ec; color: var(--coral); display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 800; border: none; cursor: pointer; }
.cal-legend { display: flex; align-items: center; gap: 16px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.cal-legend span { display: flex; align-items: center; gap: 7px; }
.cal-legend i { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.cal-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin-bottom: 8px; }
.cal-weekdays div { text-align: center; font-size: 12px; font-weight: 800; color: #b0a8be; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.cal-cell {
  min-height: 76px; border-radius: 14px; padding: 9px 10px; border: 1px solid var(--line);
  background: #fff; display: flex; flex-direction: column; align-items: flex-start;
}
.cal-cell__num { font-weight: 700; font-size: 15px; }
.cal-cell__label { font-size: 10.5px; font-weight: 700; line-height: 1.15; margin-top: auto; }
.cal-cell--empty { border: none; background: transparent; }
.cal-cell--weekend { color: var(--coral); background: #fff6f5; }
.cal-cell--holiday { background: var(--grad); color: #fff; border: none; box-shadow: 0 12px 22px -10px rgba(255,90,77,.6); }

/* ---------- List / table (senarai cuti) ---------- */
.list-toolbar { display: flex; align-items: center; gap: 10px; }
.select {
  display: inline-flex; align-items: center; gap: 10px; background: #fff;
  border: 2px solid #ffd9d2; border-radius: 14px; padding: 10px 16px;
  font-size: 14px; font-weight: 700; color: var(--coral); font-family: var(--font);
}
.cuti-list { display: flex; flex-direction: column; gap: 8px; }
.cuti-row {
  display: flex; align-items: center; gap: 14px;
  background: #faf9fc; border: 1px solid #f0edf4; border-radius: 14px; padding: 12px 16px;
}
.cuti-row--soon { background: #f4fbf8; border-color: #cdeede; }
.cuti-row__date { font-weight: 800; font-size: 13.5px; width: 96px; color: #7a7290; }
.cuti-row--soon .cuti-row__date { color: var(--green); }
.cuti-row__main { flex: 1; display: flex; align-items: center; gap: 10px; }
.cuti-row__name { font-weight: 700; font-size: 14px; color: #2a2438; }
.cuti-row__states { width: 300px; font-size: 12.5px; color: var(--muted); line-height: 1.4; }

/* ---------- Detail ---------- */
.detail-hero {
  position: relative; overflow: hidden; border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: linear-gradient(135deg, #4b4ded 0%, #7c4dff 55%, #ff5a4d 130%);
  padding: 44px; color: #fff;
}
.detail-hero__blob { position: absolute; border-radius: 50%; background: rgba(255,255,255,.12); }
.detail-hero__eyebrow { display: inline-block; background: rgba(255,255,255,.2); font-weight: 700; font-size: 12px; letter-spacing: .1em; padding: 7px 14px; border-radius: 999px; position: relative; }
.detail-hero__title { margin: 16px 0 0; font-weight: 800; font-size: 44px; line-height: 1.05; position: relative; }
.detail-hero__meta { display: flex; gap: 12px; margin-top: 20px; flex-wrap: wrap; position: relative; }
.detail-hero__meta span { background: rgba(255,255,255,.2); font-size: 13.5px; font-weight: 600; padding: 9px 16px; border-radius: 999px; }
.detail-hero__meta .is-count { background: #fff; color: var(--indigo); font-weight: 800; }
.detail-wrap { background: var(--cream); border: 1px solid var(--line); border-top: none; border-radius: 0 0 var(--radius-lg) var(--radius-lg); box-shadow: var(--shadow); }
.detail-body { padding: 36px 44px; display: grid; grid-template-columns: 1fr 290px; gap: 34px; }
.detail-body p { margin: 0; color: var(--ink-2); font-size: 16px; line-height: 1.75; }
.callout {
  margin-top: 24px; background: linear-gradient(135deg, #fff4e6, #ffe8d6);
  border-radius: 18px; padding: 20px 22px; display: flex; align-items: center; gap: 16px;
}
.callout__icon { font-size: 32px; }
.callout__title { font-weight: 800; color: #e0392c; font-size: 15px; }
.callout__text { color: #7a5540; font-size: 13.5px; margin-top: 2px; }
.detail-actions { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.aside { background: #faf8ff; border-radius: 18px; padding: 24px; }
.aside__title { margin: 0 0 14px; font-size: 12px; font-weight: 800; letter-spacing: .06em; color: #b0a8be; }
.aside__item { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.aside__item i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.aside__name { font-weight: 700; color: #2a2438; font-size: 14px; }
.aside__when { color: var(--muted); font-size: 12.5px; }

/* ---------- Page heading ---------- */
.page-head { text-align: left; margin-bottom: 22px; }
.page-head h1 { margin: 0; font-weight: 800; font-size: 30px; }
.page-head p { margin: 6px 0 0; color: var(--muted); font-size: 13.5px; }
.card {
  background: var(--cream); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 34px 42px; box-shadow: var(--shadow);
}

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #cfc9dc; margin-top: 60px; padding: 40px 0; }
.site-footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.site-footer a { color: #cfc9dc; }
.site-footer a:hover { color: #fff; }
.site-footer__links { display: flex; gap: 22px; font-size: 14px; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .site-nav { flex-wrap: wrap; row-gap: 10px; }
  .nav-links { width: 100%; flex-wrap: wrap; gap: 12px 18px; }
  .hero { flex-direction: column; align-items: stretch; padding: 32px 24px; }
  .countdown-card { width: 100%; }
  .hero__title { font-size: 36px; }
  .holiday-grid { grid-template-columns: repeat(2, 1fr); }
  .panel-grid { grid-template-columns: 1fr; }
  .detail-body { grid-template-columns: 1fr; }
  .cuti-row { flex-wrap: wrap; }
  .cuti-row__states { width: 100%; }
  .chip--grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .hero { padding: 24px 18px; }
  .hero__title { font-size: 28px; }
  .holiday-grid { grid-template-columns: 1fr; }
  .cal-grid, .cal-weekdays { gap: 4px; }
  .cal-cell { min-height: 56px; padding: 6px; }
  .card { padding: 24px 18px; }
  .detail-hero { padding: 28px 20px; }
  .detail-hero__title { font-size: 30px; }
  .detail-body { padding: 24px 18px; }
}
