/* App shell: grouped sidebar, header (search, approvals bell, create), command palette, first-run checklist.
   Loaded after brand.css so these rules win over older feature styles. */
.icon { display: block; flex: none; }

/* Sidebar: nav scrolls on short screens; workspace and account stay at the bottom. */
.sidebar { display: flex; flex-direction: column; padding: 22px 14px 16px; overflow: hidden; }
.sidebar .side-top { flex: none; }
.sidebar .logo { padding-bottom: 18px; }
.side-nav { flex: 1; min-height: 0; overflow-y: auto; margin: 0 -6px 12px; padding: 0 6px; display: block; scrollbar-width: thin; }
.sidebar nav.side-nav { display: block; margin-bottom: 12px; }
.nav-group + .nav-group { margin-top: 14px; }
.sidebar .nav-label { margin: 0 0 4px; padding: 0 12px; font-size: 10.5px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: #8a93a8; }
.sidebar nav.side-nav button { min-height: 40px; height: 40px; padding: 0 12px; margin: 1px 0; gap: 11px; font-size: 14.5px; font-weight: 500; color: #4b5470; border-radius: 10px; }
.sidebar nav.side-nav button .nav-symbol { width: 20px; height: 20px; display: grid; place-items: center; color: #7a839b; }
.sidebar nav.side-nav button:hover { background: #f1f2f8; color: var(--ink); }
.sidebar nav.side-nav button:hover .nav-symbol { color: var(--ink); }
.sidebar nav.side-nav button.active { background: var(--primary-soft); color: var(--primary-ink); font-weight: 700; box-shadow: inset 3px 0 var(--primary); }
.sidebar nav.side-nav button.active .nav-symbol { color: var(--primary); }
.sidebar nav.side-nav button b { margin-left: auto; min-width: 22px; height: 20px; padding: 0 7px; display: grid; place-items: center; border-radius: 999px; background: var(--primary); color: #fff; font-size: 11px; font-weight: 700; }
.sidebar .workspace-card, .sidebar .user-row { flex: none; }
.mobile-close { display: none; border: 0; background: transparent; color: var(--muted); width: 36px; height: 36px; border-radius: 10px; place-items: center; }

/* Header */
main > header { gap: 12px; }
.search-trigger { width: min(440px, 42vw); height: 42px; display: flex; align-items: center; gap: 10px; padding: 0 12px; border: 1px solid var(--border); border-radius: 11px; background: #f6f7fb; color: #7a839b; font: inherit; font-size: 14px; text-transform: none; letter-spacing: 0; cursor: pointer; }
.search-trigger:hover { border-color: #cfd4e3; background: #fff; }
.search-trigger span { flex: 1; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-trigger kbd, .palette kbd { font: 600 11px/1 'DM Sans', sans-serif; padding: 4px 6px; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 6px; background: #fff; color: #6b7389; }
.bell-button { color: #4b5470; }
.bell-button i { width: auto; height: 18px; min-width: 18px; padding: 0 5px; right: -6px; top: -6px; border: 2px solid #fff; border-radius: 999px; background: var(--coral); color: #fff; font: 700 10px/14px 'DM Sans', sans-serif; font-style: normal; display: grid; place-items: center; }
.header-create { display: inline-flex; align-items: center; gap: 8px; }
.menu-button { color: var(--ink); place-items: center; }

/* Command palette */
.palette { width: min(620px, calc(100vw - 24px)); max-height: min(560px, calc(100dvh - 80px)); margin: 12vh auto auto; padding: 0; border: 1px solid var(--border); border-radius: 18px; background: #fff; color: var(--ink); box-shadow: 0 30px 80px #141a3340; overflow: hidden; }
.palette[open] { display: flex; flex-direction: column; }
.palette::backdrop { background: #141a3366; backdrop-filter: blur(2px); }
.palette-search { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); color: #7a839b; }
.palette-search input { flex: 1; border: 0; outline: 0; font: inherit; font-size: 16px; color: var(--ink); background: transparent; min-width: 0; }
.palette-list { list-style: none; margin: 0; padding: 6px; overflow-y: auto; flex: 1; }
.palette-group { padding: 10px 10px 4px; font-size: 11px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: #8a93a8; }
.palette-item { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 10px; cursor: pointer; }
.palette-item.active { background: var(--primary-soft); }
.palette-icon { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 9px; background: #f1f2f8; color: #4b5470; }
.palette-item.active .palette-icon { background: #fff; color: var(--primary); }
.palette-text { display: grid; min-width: 0; }
.palette-text strong { font-size: 14.5px; font-weight: 600; }
.palette-text small { font-size: 12px; color: var(--muted); }
.palette-empty { margin: 0; padding: 28px 16px; text-align: center; color: var(--muted); }
.palette-foot { display: flex; gap: 16px; margin: 0; padding: 10px 16px; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted); }
.palette-foot kbd { margin-right: 3px; }

/* First-run checklist */
.onboarding { padding: 22px 24px; margin-bottom: 20px; border-color: #ddd6ff; background: linear-gradient(135deg, #fbfaff, #fff 60%); }
.onboarding-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.onboarding-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: var(--primary-ink); }
.onboarding-head h3 { margin: 4px 0 2px; font-size: 19px; }
.onboarding-head p { margin: 0; color: var(--muted); font-size: 13.5px; }
.onboarding-bar { height: 6px; margin: 14px 0 6px; border-radius: 6px; background: #ece9fb; overflow: hidden; }
.onboarding-bar i { display: block; height: 100%; border-radius: 6px; background: var(--primary); }
.onboarding-steps { list-style: none; margin: 0; padding: 0; display: grid; }
.onboarding-steps li { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid #eef0f6; }
.onboarding-steps li:last-child { border-bottom: 0; }
.onboarding-check { width: 24px; height: 24px; flex: none; display: grid; place-items: center; border-radius: 50%; border: 2px solid #cfd4e3; color: #fff; }
.onboarding-steps li.done .onboarding-check { border-color: var(--success); background: var(--success); }
.onboarding-steps li > div { flex: 1; display: grid; gap: 2px; min-width: 0; }
.onboarding-steps strong { font-size: 14.5px; }
.onboarding-steps li.done strong { color: var(--muted); text-decoration: line-through; text-decoration-color: #b9bfce; }
.onboarding-steps small { font-size: 12.5px; color: var(--muted); }
.onboarding-steps em { font-style: normal; font-size: 12.5px; font-weight: 600; color: var(--success); }
.onboarding-steps .ghost { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-weight: 700; color: var(--primary-ink); }

/* Kelulusan */
.approvals-banner { width: 100%; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 16px; padding: 16px 20px; margin-bottom: 18px; border: 1px solid #ffd9cf; background: #fff6f3; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.approvals-banner:hover { border-color: var(--coral); }
.approvals-banner span { color: var(--coral-ink); font-weight: 700; font-size: 14px; }
.approvals-empty { display: grid; justify-items: center; gap: 8px; padding: 48px 20px; text-align: center; }
.approvals-empty-mark { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; background: var(--success-soft); color: var(--success); font-size: 24px; font-weight: 800; }
.approvals-empty p { max-width: 460px; margin: 0; color: var(--muted); }

@media (max-width: 1100px) {
  .mobile-close { display: grid; }
  .search-trigger { width: auto; flex: 1; }
  .search-trigger kbd { display: none; }
}
@media (max-width: 640px) {
  .header-create span { display: none; }
  .header-create { padding: 10px 12px; }
  .search-trigger span { font-size: 13px; }
  .onboarding { padding: 18px 16px; }
  .onboarding-steps li { flex-wrap: wrap; }
  .onboarding-steps .ghost { margin-left: 38px; }
}

/* Compact sidebar so every item fits on a laptop screen; the workspace card switches workspace on click. */
.sidebar nav.side-nav button { min-height: 37px; height: 37px; }
.nav-group + .nav-group { margin-top: 10px; }
.sidebar .workspace-card { position: relative; flex-wrap: nowrap; padding: 8px 10px; gap: 10px; border-radius: 12px; background: #fff; cursor: pointer; }
.sidebar .workspace-card:hover { border-color: #cfd4e3; }
.sidebar .workspace-card .workspace-icon { width: 30px; height: 30px; font-size: 12px; }
.sidebar .workspace-card > div:nth-child(2) { flex: 1; }
.sidebar .workspace-card strong { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; }
.sidebar .workspace-card span { font-size: 11.5px; }
.workspace-chevron { color: #8a93a8; }
.sidebar .workspace-card .workspace-switch { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.sidebar .workspace-card:focus-within { outline: 2px solid var(--primary); outline-offset: 2px; }
.sidebar .user-row { padding-top: 12px; }
.onboarding { margin-top: 4px; }

/* Pasukan */
.team-invite, .team-members, .team-pending { padding: 20px 22px; margin-bottom: 16px; }
.team-invite-form { display: grid; grid-template-columns: 180px minmax(0, 1fr) auto; gap: 12px; align-items: end; }
.team-invite-form label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; }
.team-invite-form select, .team-invite-form input { height: 42px; padding: 0 12px; border: 1px solid var(--border); border-radius: 10px; font: inherit; background: #fff; }
.team-invite-form .primary { height: 42px; }
.team-role-help { display: grid; gap: 4px; margin: 12px 0 0; font-size: 12.5px; color: var(--muted); }
.team-link { display: grid; gap: 10px; margin-top: 16px; padding: 16px; border: 1px solid #cfe9df; border-radius: 14px; background: #f3fbf7; }
.team-link-row { display: flex; gap: 8px; }
.team-link-row input { flex: 1; min-width: 0; height: 40px; padding: 0 12px; border: 1px solid var(--border); border-radius: 10px; font: 13px ui-monospace, Consolas, monospace; background: #fff; }
.team-share { display: flex; flex-wrap: wrap; gap: 8px; }
.team-share a { display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border: 1px solid var(--border); border-radius: 10px; background: #fff; color: var(--ink); font-weight: 600; font-size: 13.5px; text-decoration: none; }
.team-link small { color: var(--muted); }
.team-members h3, .team-pending h3 { margin: 0 0 8px; font-size: 17px; }
.team-members ul, .team-pending ul { list-style: none; margin: 0; padding: 0; }
.team-member { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid #eef0f6; }
.team-member:first-child { border-top: 0; }
.team-member .avatar { flex: none; }
.team-member-text { flex: 1; min-width: 0; display: grid; }
.team-member-text strong { font-size: 14.5px; }
.team-member-text em { font-style: normal; font-weight: 500; color: var(--muted); }
.team-member-text small { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-member select { height: 36px; padding: 0 10px; border: 1px solid var(--border); border-radius: 9px; font: inherit; background: #fff; }
.team-role-pill { padding: 4px 10px; border-radius: 999px; background: #f1f2f8; color: #4b5470; font-size: 12px; font-weight: 700; }
.team-role-pill.owner { background: var(--primary-soft); color: var(--primary-ink); }
.team-pending li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid #eef0f6; }
.team-pending li:first-child { border-top: 0; }
.team-pending li div { display: grid; }
.team-pending small { color: var(--muted); font-size: 12.5px; }
.invite-banner { background: var(--primary-soft); color: var(--primary-ink); }
@media (max-width: 760px) {
  .team-invite-form { grid-template-columns: minmax(0, 1fr); }
  .team-member { flex-wrap: wrap; }
  .team-member-text { flex-basis: calc(100% - 50px); }
}
/* 14 menu items still fit a 900px-tall laptop screen. */
.sidebar nav.side-nav button { min-height: 35px; height: 35px; }
.nav-group + .nav-group { margin-top: 8px; }
.sidebar .nav-label { margin-bottom: 2px; }

/* Meta app review pending: the Facebook step waits without blocking the checklist. */
.onboarding-steps li.waiting { opacity: .75; }
.onboarding-soon { font-style: normal; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: #fff4dc; color: #8a5a00; white-space: nowrap; }
.connect-now { margin: 4px 0 14px; padding-left: 18px; display: grid; gap: 6px; font-size: 14px; color: var(--ink, #1d2939); }
