/* ============================================================
   InternTrack — tema "Soft Blush"
   Diinspirasikan daripada rujukan UI: latar pink lembut, kad putih
   beradius besar, aksen pastel, butang indigo, dock navigasi bawah.
   ============================================================ */

:root {
  --ink:        #262a41;
  --ink-soft:   #5b6178;
  --muted:      #8a90a6;

  --bg:         #fdf1f0;
  --card:       #ffffff;
  --line:       #f0f1f7;
  --field:      #f7f8fc;

  --indigo:     #333d73;
  --indigo-600: #3f4a86;
  --indigo-100: #e7e9f8;

  --lav:        #e9ecfa;
  --lav-deep:   #8b96dd;
  --sky:        #d8f0fb;
  --sky-deep:   #6bb6d8;
  --butter:     #fff2cf;
  --butter-deep:#e0a93b;
  --coral:      #ffdcd8;
  --coral-deep: #d9756c;
  --mint:       #d9f4ea;
  --mint-deep:  #45a68a;

  --radius-xl:  26px;
  --radius:     18px;
  --radius-sm:  14px;

  --shadow:     0 12px 34px rgba(51, 61, 115, .08), 0 2px 6px rgba(51, 61, 115, .05);
  --shadow-sm:  0 4px 14px rgba(51, 61, 115, .07);
  --font:       "Nunito", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  line-height: 1.55;
  background:
    radial-gradient(720px 420px at 8% -8%, #ffe3e3 0%, transparent 62%),
    radial-gradient(680px 400px at 100% 4%, #ffeaea 0%, transparent 58%),
    var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--indigo); }

/* ============ Shell ============ */
.app-shell {
  max-width: 1040px;
  margin: 0 auto;
  padding: 22px 20px 132px;
}

/* ============ Topbar ============ */
.topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.avatar {
  width: 46px; height: 46px;
  flex: 0 0 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, #5a63a8, var(--indigo));
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: .02em;
  box-shadow: 0 6px 16px rgba(51, 61, 115, .28);
  border: 3px solid #fff;
}

.topbar-title { flex: 1; text-align: center; }
.topbar-title h1 {
  margin: 0;
  font-size: 1.22rem;
  font-weight: 800;
  letter-spacing: -.3px;
  color: var(--ink);
}
.topbar-title small {
  display: block;
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}

.bell {
  position: relative;
  width: 46px; height: 46px;
  flex: 0 0 46px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.bell:hover { color: var(--indigo); }
.bell .dot {
  position: absolute;
  top: 11px; right: 12px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #ef6a5f;
  border: 2px solid #fff;
}

/* ============ Page intro ============ */
.page-intro { margin: 0 4px 18px; }
.page-intro h2 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -.4px;
}
.page-intro p { margin: 4px 0 0; color: var(--muted); font-size: .88rem; }

/* ============ Cards ============ */
.card {
  background: var(--card);
  border: 0;
  border-radius: var(--radius-xl);
  padding: 22px;
  box-shadow: var(--shadow);
  margin-bottom: 18px;
}

.card h2 {
  margin: 0 0 4px;
  font-size: 1rem;
  letter-spacing: -.2px;
  text-transform: none;
  color: var(--ink);
  font-weight: 800;
}

.card-sub { margin: 0 0 16px; font-size: .85rem; color: var(--muted); }
.card-body { margin-top: 14px; }

/* ============ Statistik ============ */
.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.stat {
  border-radius: var(--radius);
  padding: 15px 16px;
  background: var(--lav);
  box-shadow: var(--shadow-sm);
}

.stat .l {
  font-size: .72rem;
  font-weight: 700;
  color: #5f6680;
  margin-bottom: 3px;
}

.stat .n {
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -.6px;
  line-height: 1.15;
  color: var(--ink);
}

.stat.total     { background: var(--lav); }
.stat.applied   { background: var(--sky); }
.stat.review    { background: var(--butter); }
.stat.interview { background: var(--indigo-100); }
.stat.accepted  { background: var(--mint); }
.stat.rejected  { background: var(--coral); }

/* ============ Bar chart ============ */
.bars { display: grid; gap: 14px; margin-top: 16px; }

.bar-row {
  display: grid;
  grid-template-columns: 104px 1fr 40px;
  align-items: center;
  gap: 12px;
}

.bar-row .k { font-size: .82rem; color: var(--ink-soft); font-weight: 700; }

.bar-track {
  background: #f4f5fa;
  border-radius: 999px;
  height: 9px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--lav-deep);
  min-width: 4px;
  transition: width .45s ease;
}

.bar-row:nth-child(1) .bar-fill { background: var(--lav-deep); }
.bar-row:nth-child(2) .bar-fill { background: var(--butter-deep); }
.bar-row:nth-child(3) .bar-fill { background: var(--sky-deep); }
.bar-row:nth-child(4) .bar-fill { background: var(--mint-deep); }
.bar-row:nth-child(5) .bar-fill { background: var(--coral-deep); }

.bar-row .v {
  font-size: .82rem;
  font-weight: 800;
  text-align: right;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

/* ============ Jadual ============ */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  background: #fbfbfe;
  padding: 4px;
}

table.data {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: .87rem;
  min-width: 600px;
}

table.data th {
  text-align: left;
  font-size: .66rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 800;
  padding: 12px 14px;
  white-space: nowrap;
}

table.data td {
  padding: 13px 14px;
  background: #fff;
  border-top: 1px solid var(--line);
  vertical-align: middle;
}

table.data tbody tr:first-child td { border-top: 0; }
table.data tbody tr:first-child td:first-child { border-top-left-radius: 12px; }
table.data tbody tr:first-child td:last-child { border-top-right-radius: 12px; }
table.data tbody tr:last-child td:first-child { border-bottom-left-radius: 12px; }
table.data tbody tr:last-child td:last-child { border-bottom-right-radius: 12px; }
table.data tbody tr:hover td { background: #f8f9ff; }
table.data .muted { color: var(--muted); }

table.data select {
  width: auto;
  min-width: 136px;
  padding: 7px 30px 7px 12px;
  font-size: .8rem;
  border-radius: 10px;
}

/* Bekas senarai dalam papan pemuka: benarkan skrol mendatar pada skrin kecil */
#interviews, #followups, #recent { overflow-x: auto; }

/* ============ Chip ============ */
.chip {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: .74rem;
  font-weight: 800;
  white-space: nowrap;
}

.chip-plain     { background: #f1f2f8; color: #5b6178; }
.chip-applied   { background: var(--sky); color: #2f7c9e; }
.chip-review    { background: var(--butter); color: #9a6c11; }
.chip-interview { background: var(--lav); color: #4b5498; }
.chip-accepted  { background: var(--mint); color: #2f7a63; }
.chip-rejected  { background: var(--coral); color: #a85048; }

.prio-high   { color: #c0554c; font-weight: 800; }
.prio-normal { color: #4b5498; font-weight: 800; }
.prio-low    { color: #2f7a63; font-weight: 800; }

/* ============ Toolbar ============ */
.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 16px;
}

.toolbar input[type="search"],
.toolbar select {
  padding: 11px 14px;
  border: 0;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: .87rem;
  background: var(--field);
  color: var(--ink);
  width: auto;
}

.toolbar input[type="search"] { flex: 1 1 230px; max-width: 320px; }
.toolbar .count { font-size: .8rem; color: var(--muted); font-weight: 700; margin-left: auto; }

/* ============ Form ============ */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; margin-bottom: 16px; }
.grid-2 .field { margin-bottom: 0; }

label {
  font-size: .78rem;
  font-weight: 800;
  color: #4a5070;
  margin-bottom: 7px;
}

.opt { font-weight: 600; color: var(--muted); }

input, textarea, select {
  font: inherit;
  font-size: .92rem;
  color: var(--ink);
  background: var(--field);
  border: 1.5px solid transparent;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  width: 100%;
  transition: border-color .15s, box-shadow .15s, background .15s;
}

select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--indigo) 50%),
                    linear-gradient(135deg, var(--indigo) 50%, transparent 50%);
  background-position: calc(100% - 19px) 50%, calc(100% - 14px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 36px;
}

textarea { resize: vertical; min-height: 104px; line-height: 1.6; }
input::placeholder, textarea::placeholder { color: #a7abbf; }

input:focus, textarea:focus, select:focus {
  outline: none;
  background: #fff;
  border-color: var(--lav-deep);
  box-shadow: 0 0 0 4px rgba(139, 150, 221, .16);
}

input.invalid, textarea.invalid, select.invalid {
  border-color: #e0897f;
  background: #fff8f7;
}

.field-foot { display: flex; justify-content: space-between; gap: 12px; margin-top: 6px; }
.error { color: #c0554c; font-size: .76rem; min-height: 1em; font-weight: 600; }
.counter { color: var(--muted); font-size: .76rem; white-space: nowrap; }

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 22px;
  font: inherit;
  font-size: .9rem;
  font-weight: 800;
  color: #fff;
  background: var(--indigo);
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(51, 61, 115, .22);
  transition: transform .08s, filter .15s, box-shadow .15s;
}

.btn:hover:not(:disabled) { filter: brightness(1.08); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid var(--indigo-100); outline-offset: 2px; }
.btn:disabled { opacity: .7; cursor: progress; box-shadow: none; }

.btn-full { width: 100%; margin-top: 6px; }

.btn-ghost {
  background: #fff;
  color: var(--indigo);
  border: 1.5px solid var(--line);
  box-shadow: none;
}

.btn-ghost:hover { background: #fafaff; }

.spinner {
  display: none;
  width: 15px; height: 15px;
  border: 2px solid rgba(255, 255, 255, .45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

.btn.loading .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ Status teks ============ */
.status { margin: 12px 0 0; font-size: .86rem; min-height: 1.2em; font-weight: 600; }
.status.is-error { color: #c0554c; }
.status.is-ok { color: #2f7a63; }
.status.is-info { color: var(--muted); }

/* ============ Metrik / hasil ============ */
.metric {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--field);
}

.metric-label {
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-weight: 800;
  color: var(--muted);
}

.metric .badge {
  align-self: flex-start;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: .88rem;
  font-weight: 800;
  background: var(--lav);
  color: #4b5498;
}

.metric p { margin: 0; font-size: .9rem; }

.badge-high   { background: var(--coral); color: #a85048; }
.badge-normal { background: var(--indigo-100); color: #4b5498; }
.badge-low    { background: var(--mint); color: #2f7a63; }
.badge-neutral{ background: #f1f2f8; color: #5b6178; }
.badge-st-applied   { background: var(--sky); color: #2f7c9e; }
.badge-st-review    { background: var(--butter); color: #9a6c11; }
.badge-st-interview { background: var(--lav); color: #4b5498; }
.badge-st-accepted  { background: var(--mint); color: #2f7a63; }
.badge-st-rejected  { background: var(--coral); color: #a85048; }

.result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.metric-wide { margin-top: 14px; }

.improvement {
  margin: 0;
  padding: 14px 16px;
  background: #fff;
  border-left: 4px solid var(--lav-deep);
  border-radius: 12px;
  font-size: .92rem;
}

.meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.meta dt {
  font-size: .66rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
  font-weight: 800;
}

.meta dd { margin: 3px 0 0; font-size: .86rem; word-break: break-word; font-weight: 600; }

/* ============ Kalendar ============ */
.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.cal-title { font-weight: 800; color: var(--ink); font-size: 1rem; }
.cal-nav { display: flex; gap: 8px; }

.icon-btn {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border: 0;
  border-radius: 12px;
  background: var(--field);
  color: var(--indigo);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  font-weight: 800;
}

.icon-btn:hover { background: var(--indigo-100); }

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  background: #fbfbfe;
  padding: 8px;
  border-radius: 18px;
}

.cal-dow {
  font-size: .64rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  font-weight: 800;
  text-align: center;
  padding: 4px 0;
}

.cal-day {
  min-height: 76px;
  border-radius: 12px;
  padding: 7px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(51, 61, 115, .05);
  font-size: .74rem;
}

.cal-day.out { background: transparent; box-shadow: none; color: #c6cad9; }
.cal-day.today { background: var(--lav); box-shadow: inset 0 0 0 2px var(--lav-deep); }
.cal-day .d { font-weight: 800; color: var(--ink-soft); }

.cal-event {
  margin-top: 4px;
  background: #fff;
  color: #4b5498;
  border-radius: 7px;
  padding: 2px 6px;
  font-size: .66rem;
  font-weight: 700;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(51, 61, 115, .08);
}

/* ============ Dock ============ */
.dock {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px;
  background: #fff;
  border-radius: 999px;
  box-shadow: 0 16px 40px rgba(51, 61, 115, .16), 0 2px 8px rgba(51, 61, 115, .08);
  z-index: 40;
}

.dock-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 66px;
  padding: 8px 10px;
  border-radius: 16px;
  text-decoration: none;
  color: var(--muted);
  font-size: .68rem;
  font-weight: 800;
  transition: background .15s, color .15s;
}

.dock-item svg { width: 20px; height: 20px; }
.dock-item:hover { color: var(--indigo); background: #fafaff; }
.dock-item.active { color: var(--indigo); background: var(--indigo-100); }

.dock-fab {
  width: 54px; height: 54px;
  margin: 0 6px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--indigo);
  color: #fff;
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 10px 22px rgba(51, 61, 115, .35);
  transform: translateY(-10px);
}

.dock-fab:hover { filter: brightness(1.08); }

/* ============ Toast ============ */
.toast {
  position: fixed;
  left: 50%;
  bottom: 96px;
  transform: translate(-50%, 16px);
  background: var(--indigo);
  color: #fff;
  padding: 12px 20px;
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 50;
  max-width: 90vw;
  box-shadow: 0 12px 30px rgba(51, 61, 115, .3);
}

.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.toast-error { background: #c0554c; }
.toast.toast-ok { background: #2f7a63; }

/* ============ Empty state ============ */
.empty {
  text-align: center;
  padding: 26px 16px;
  color: var(--muted);
  font-size: .87rem;
  border-radius: var(--radius);
  background: #fafbfe;
  font-weight: 600;
}

/* ============ Login ============ */
.auth-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 18px;
  background:
    radial-gradient(760px 460px at 12% -10%, #ffe0e0 0%, transparent 60%),
    radial-gradient(700px 420px at 100% 0%, #ffeaea 0%, transparent 56%),
    var(--bg);
}

.auth-card {
  width: 100%;
  max-width: 430px;
  background: var(--card);
  border-radius: var(--radius-xl);
  padding: 30px;
  box-shadow: var(--shadow);
}

.auth-brand { display: flex; justify-content: center; margin-bottom: 10px; }

.auth-brand .brand-mark {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  border-radius: 16px;
  background: linear-gradient(140deg, #5a63a8, var(--indigo));
  color: #fff;
  box-shadow: 0 10px 22px rgba(51, 61, 115, .28);
}

.auth-title { text-align: center; margin: 0; font-size: 1.5rem; font-weight: 800; letter-spacing: -.5px; }
.auth-sub { text-align: center; margin: 6px 0 22px; color: var(--muted); font-size: .86rem; font-weight: 600; }

.tabs {
  display: flex;
  background: var(--field);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 20px;
}

.tabs button {
  flex: 1;
  padding: 10px;
  border: 0;
  background: transparent;
  border-radius: 11px;
  font: inherit;
  font-size: .88rem;
  font-weight: 800;
  color: var(--ink-soft);
  cursor: pointer;
}

.tabs button.active {
  background: #fff;
  color: var(--indigo);
  box-shadow: 0 2px 8px rgba(51, 61, 115, .12);
}

.auth-hint { text-align: center; font-size: .76rem; color: var(--muted); margin-top: 16px; font-weight: 600; }

.foot { margin: 22px 4px 0; font-size: .74rem; color: var(--muted); font-weight: 600; }

/* ============ v6: sentuhan visual ============ */
body::before, body::after {
  content: "";
  position: fixed;
  border-radius: 50%;
  filter: blur(70px);
  z-index: -1;
  pointer-events: none;
}

body::before {
  width: 420px; height: 420px;
  left: -130px; top: -150px;
  background: radial-gradient(circle, rgba(255, 194, 194, .8), transparent 70%);
}

body::after {
  width: 520px; height: 520px;
  right: -170px; top: 140px;
  background: radial-gradient(circle, rgba(188, 203, 255, .7), transparent 70%);
}

/* Kepala halaman jadi sepanduk bergradien */
.page-intro {
  background: linear-gradient(135deg, #3b4680 0%, #5a63a8 55%, #7b6fb8 100%);
  color: #fff;
  border-radius: 26px;
  padding: 26px 26px 24px;
  margin: 0 0 18px;
  box-shadow: 0 18px 44px rgba(59, 70, 128, .28);
  position: relative;
  overflow: hidden;
}

.page-intro::after {
  content: "";
  position: absolute;
  right: -46px; top: -70px;
  width: 190px; height: 190px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .13);
}

.page-intro h2 { color: #fff; font-size: 1.5rem; letter-spacing: -.6px; }
.page-intro p { color: #dfe2f7; margin-top: 6px; font-weight: 600; }

/* Kad: angkat sedikit bila hover */
.card { position: relative; transition: transform .18s ease, box-shadow .18s ease; }
.card:hover { transform: translateY(-2px); box-shadow: 0 18px 44px rgba(51, 61, 115, .12), 0 2px 8px rgba(51, 61, 115, .06); }

/* Penanda warna kecil di hadapan tajuk kad */
.card h2 { display: flex; align-items: center; gap: 9px; }

.card h2::before {
  content: "";
  width: 9px; height: 9px;
  border-radius: 3px;
  background: var(--lav-deep);
  box-shadow: 0 0 0 3px rgba(139, 150, 221, .18);
  flex: 0 0 9px;
}

.card:nth-of-type(2n) h2::before { background: var(--butter-deep); box-shadow: 0 0 0 3px rgba(224, 169, 59, .18); }
.card:nth-of-type(3n) h2::before { background: var(--sky-deep); box-shadow: 0 0 0 3px rgba(107, 182, 216, .18); }
.card:nth-of-type(4n) h2::before { background: var(--mint-deep); box-shadow: 0 0 0 3px rgba(69, 166, 138, .18); }
.card:nth-of-type(5n) h2::before { background: var(--coral-deep); box-shadow: 0 0 0 3px rgba(217, 117, 108, .18); }

/* Kad statistik: kilau lembut + angka lebih besar */
.stat { position: relative; overflow: hidden; transition: transform .16s ease, box-shadow .16s ease; }
.stat:hover { transform: translateY(-2px); box-shadow: 0 14px 28px rgba(51, 61, 115, .12); }

.stat::after {
  content: "";
  position: absolute;
  right: -34px; bottom: -46px;
  width: 104px; height: 104px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .55);
}

.stat .l, .stat .n { position: relative; z-index: 1; }
.stat .n { font-size: 1.9rem; letter-spacing: -1px; }

/* Butang bergradien */
.btn { background: linear-gradient(135deg, #3b4680 0%, #5a63a8 60%, #6f67b0 100%); }
.btn-ghost { background: #fff; }

/* Dock berkaca */
.dock {
  background: rgba(255, 255, 255, .78);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
}

.dock-item.active { box-shadow: 0 6px 16px rgba(51, 61, 115, .14); }
.dock-fab { background: linear-gradient(135deg, #3b4680, #6f67b0); }

/* Jadual & medan */
table.data tbody tr { transition: background .15s ease; }
table.data th { letter-spacing: .12em; }

input:focus, textarea:focus, select:focus {
  border-color: #8b96dd;
  box-shadow: 0 0 0 4px rgba(139, 150, 221, .18), 0 6px 16px rgba(51, 61, 115, .06);
}

/* Ruang untuk dock terapung */
.app-shell { padding-bottom: 118px; }

/* Bar skrol halus */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: #daddee;
  border-radius: 999px;
  border: 3px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: #b9bedd; background-clip: content-box; }

/* ============ v7: palet lebih tegas + susun atur papan pemuka ============ */
:root {
  --bg: #eceefa;
  --line: #e6e9f5;
  --field: #f5f6fc;
  --shadow: 0 16px 40px rgba(40, 48, 96, .10), 0 2px 8px rgba(40, 48, 96, .05);
}

body { background: var(--bg); }

/* Kad: putih bersih, sudut lebih kemas, jalur warna di atas */
.card {
  border-radius: 20px;
  padding: 22px 22px 24px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, .9);
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 4px;
  background: linear-gradient(90deg, #5b6bd6, #8f7bf0 55%, #3aa8d8);
}

.card:nth-of-type(2n)::before { background: linear-gradient(90deg, #3aa8d8, #5cc9a6); }
.card:nth-of-type(3n)::before { background: linear-gradient(90deg, #e8a63a, #f0928b); }

.card h2 { font-size: 1.02rem; letter-spacing: -.2px; margin-bottom: 2px; }

/* Tiles statistik: gradien pejal, teks putih */
.stat {
  border-radius: 18px;
  padding: 18px 18px 20px;
  color: #fff;
  box-shadow: 0 10px 24px rgba(40, 48, 96, .16);
}

.stat .l {
  color: rgba(255, 255, 255, .88);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .68rem;
  font-weight: 800;
}

.stat .n {
  color: #fff;
  font-size: 2.3rem;
  font-weight: 800;
  letter-spacing: -1.4px;
  text-shadow: 0 2px 8px rgba(20, 25, 60, .18);
}

.stat::after {
  width: 120px; height: 120px;
  right: -40px; bottom: -54px;
  border: 10px solid rgba(255, 255, 255, .16);
  background: transparent;
}

.stat.total     { background: linear-gradient(135deg, #5560cd, #8189f0); }
.stat.applied    { background: linear-gradient(135deg, #2f9dcd, #67c8ea); }
.stat.review     { background: linear-gradient(135deg, #e0a02f, #f6c86a); }
.stat.interview  { background: linear-gradient(135deg, #6a5bd6, #9a8bf2); }
.stat.accepted   { background: linear-gradient(135deg, #2b9678, #5cc9a6); }
.stat.rejected   { background: linear-gradient(135deg, #d1625a, #f2948c); }

/* Jadual lebih bersih */
table.data thead th {
  background: #f3f5fd;
  color: #5b6178;
  font-size: .68rem;
  letter-spacing: .09em;
  text-transform: uppercase;
  padding: 12px 14px;
}

table.data tbody tr:nth-child(even) { background: #fbfcff; }
table.data tbody td { color: #4e5470; }

/* Dock lebih tegas */
.dock { box-shadow: 0 18px 40px rgba(40, 48, 96, .20), 0 2px 8px rgba(40, 48, 96, .08); }
.dock-item.active { color: #2b3364; background: #e9ecfb; }

/* ============ Responsive ============ */
@media (max-width: 760px) {
  .app-shell { padding: 18px 14px 122px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2 { grid-template-columns: 1fr; gap: 0; }
  .grid-2 .field { margin-bottom: 16px; }
  .meta { grid-template-columns: 1fr; }
  .result-grid { grid-template-columns: 1fr; }
  .card { padding: 18px; border-radius: 22px; }
  .bar-row { grid-template-columns: 88px 1fr 34px; }
  table.data { min-width: 440px; }
  .topbar-title h1 { font-size: 1.08rem; }
  .cal-day { min-height: 58px; }
  .cal-event { display: none; }
  .cal-day.has { background: var(--lav); }
  .dock { width: calc(100% - 24px); justify-content: space-between; bottom: 12px; }
  .dock-item { min-width: 0; flex: 1; padding: 8px 4px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
