/* Assignments — home (Figma 22316:145986), list (22316:144862) and detail (22316:143611 / 143744). Prefix ah-. */
.screen.ah { background: var(--goku); }
.ah-page { display: flex; flex-direction: column; gap: 24px; padding: calc(var(--sb-dash) + 24px) 20px 110px; }

/* Header */
.ah-head { display: flex; align-items: center; gap: 8px; height: 40px; }
.ah-head h1 { flex: 1; min-width: 0; }
.ah-back { flex: none; width: 31.69px; height: 31.69px; display: grid; place-items: center; border-radius: 6px; }
.ah-back img { transform: scaleX(-1); }
.ah-star { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 8px; }
.ah-search-btn { flex: none; padding: 4px; border-radius: 8px; display: grid; place-items: center; }
.ah-back:hover, .ah-star:hover, .ah-search-btn:hover, .ah-more:hover { background: var(--heles); }

/* Period chip (22316:146204) */
.ah-period { flex: none; display: flex; align-items: center; gap: 4px; height: 32px; padding: 4px 8px 4px 12px; border-radius: 4px; background: var(--goku); font: 400 14px/24px var(--font); color: var(--bulma); white-space: nowrap; }
.ah-period:hover { filter: brightness(0.97); }

/* Overview */
.ah-overview { display: flex; flex-direction: column; gap: 16px; padding: 16px; border-radius: 12px; background: var(--gohan); }
.ah-ov-head { display: flex; align-items: center; }
.ah-ov-head h2 { flex: 1; min-width: 0; font: 700 18px/28px var(--font); }
.ah-ov-line { height: 1px; background: var(--beerus); }
.ah-stats { display: flex; align-items: stretch; gap: 4px; }
.ah-stat { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 8px; border-radius: 8px; text-align: left; }
.ah-stat:hover { background: var(--heles); }
.ah-stat-l { display: flex; align-items: center; gap: 4px; font: 400 12px/16px var(--font); color: var(--trunks); }
.ah-stat-v { font: 700 24px/32px var(--font); color: var(--bulma); }
.ah-stat-div { flex: none; width: 1px; background: var(--beerus); }

/* Category tiles */
.ah-tiles { display: flex; gap: 16px; padding: 12px; border-radius: 8px; background: rgba(255, 255, 255, 0.6); }
.ah-tile { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.ah-tile-ic { width: 100%; aspect-ratio: 1; display: grid; place-items: center; border-radius: 16px; background: linear-gradient(var(--jiren), var(--jiren)), var(--gohan); }
.ah-tile:hover .ah-tile-ic { filter: brightness(0.96); }
.ah-tile-l { width: 100%; text-align: center; font: 500 12px/16px var(--font); color: var(--bulma); }

/* Boxes: Pending Approvals / Assignments Due */
.ah-box { border-radius: 8px; background: var(--gohan); overflow: hidden; }
.ah-box-h { padding: 12px; font: 700 16px/24px var(--font); }
.ah-box-in { padding: 8px 12px; }
.ah-due { display: flex; flex-direction: column; gap: 12px; padding-bottom: 12px; }
.ah-empty { padding: 12px 8px; font: 400 14px/20px var(--font); color: var(--trunks); text-align: center; }

.ah-table { display: flex; flex-direction: column; gap: 12px; padding-top: 8px; border: 1px solid var(--beerus); border-radius: 8px; background: var(--goku); overflow: hidden; }
.ah-tr { display: flex; align-items: flex-start; gap: 24px; width: 100%; padding: 12px 8px; text-align: left; font: 400 14px/24px var(--font); }
.ah-tr > :nth-child(1) { flex: none; width: 40px; }
.ah-tr > :nth-child(2) { flex: none; width: 56px; }
.ah-tr > :nth-child(3) { flex: 1; min-width: 0; }
.ah-tr > :nth-child(4) { flex: none; width: 60px; }
.ah-th { padding: 0 8px; align-items: center; color: var(--piccolo); }
.ah-tbody { background: var(--gohan); }
.ah-tbody .ah-tr { border-bottom: 1px solid var(--beerus); }
.ah-tbody .ah-tr:last-child { border-bottom: 0; }
.ah-tbody .ah-tr:hover { background: var(--goku); }
.ah-td-cls { display: flex; gap: 4px; color: var(--bulma); white-space: nowrap; }
.ah-td-subj, .ah-td-date { color: var(--trunks); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ah-td-name { display: flex; flex-direction: column; color: var(--bulma); }
.ah-td-name small { font: 400 12px/16px var(--font); color: var(--trunks); }

/* Assignment card */
.ah-card { width: 100%; display: flex; flex-direction: column; border-radius: 8px; background: var(--gohan); text-align: left; overflow: hidden; }
.ah-box .ah-card { background: var(--goku); }
.ah-card:hover { filter: brightness(0.985); }
.ah-card-top { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; }
.ah-card-subj { font: 700 12px/16px var(--font); color: var(--piccolo); }
.ah-card-body { display: flex; flex-direction: column; gap: 16px; padding: 8px 12px; }
.ah-card-main { display: flex; flex-direction: column; gap: 4px; }
.ah-card-title { font: 700 16px/24px var(--font); color: var(--bulma); }
.ah-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.ah-meta-i { display: flex; align-items: center; gap: 4px; height: 16px; font: 400 12px/16px var(--font); color: var(--trunks); white-space: nowrap; }
.ah-classes { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font: 400 12px/16px var(--font); color: var(--trunks); }
.ah-classes i { width: 1px; height: 16px; background: rgba(0, 0, 0, 0.25); }
.ah-status { display: flex; align-items: center; gap: 4px; font: 400 12px/16px var(--font); }
.ah-status.is-warn { color: var(--dodoria); }
.ah-status.is-ok { color: var(--roshi); }

/* FAB */
.ah-fab { white-space: nowrap; }

/* ---------- List ---------- */
.ah-top { position: sticky; top: 0; z-index: 4; display: flex; flex-direction: column; gap: 16px; padding: calc(var(--sb-dash) + 16px) 0 16px; background: var(--goku); }
.ah-top .ah-head { padding: 0 20px; }
.ah-search { margin: 0 20px; }
.ah-search[hidden] { display: none; }
.ah-search input { font-weight: 400; }
.ah-tabs { gap: 8px; padding: 0 20px; scroll-padding: 0 20px; scroll-snap-type: none; }
.ah-tab { height: 40px; padding: 0 12px; border-radius: 8px; font: 700 14px/24px var(--font); color: var(--trunks); white-space: nowrap; }
.ah-tab:hover { color: var(--bulma); }
.ah-tab.is-on { background: var(--gohan); color: var(--bulma); }
.ah-lpage { display: flex; flex-direction: column; gap: 40px; padding: 0 20px 110px; }
.ah-filters { display: flex; flex-direction: column; gap: 8px; }
.ah-count { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 8px; background: var(--gohan); }
.ah-count-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ah-count-t strong { font: 700 24px/32px var(--font); }
.ah-count-t span { font: 400 12px/16px var(--font); color: var(--trunks); }
.ah-chips { gap: 4px; margin: 0 -20px; padding: 0 20px; scroll-padding: 0 20px; scroll-snap-type: none; }
.ah-chip { display: flex; align-items: center; gap: 4px; height: 32px; padding: 4px 8px 4px 12px; border-radius: 4px; background: var(--gohan); font: 400 14px/24px var(--font); color: var(--bulma); white-space: nowrap; }
.ah-chip.is-toggle { padding-right: 12px; }
.ah-chip:hover { filter: brightness(0.97); }
.ah-chip.is-on { background: var(--piccolo); color: var(--gohan); }
.ah-chip.is-on:hover { filter: brightness(1.08); }
.ah-groups { display: flex; flex-direction: column; gap: 16px; }
.ah-group { display: flex; flex-direction: column; gap: 4px; }
.ah-label { padding: 0 8px 0 16px; font: 700 10px/16px var(--font); letter-spacing: 0.5px; text-transform: uppercase; color: var(--zeno); }
.ah-cards { display: flex; flex-direction: column; gap: 12px; }
.ah-range { display: flex; gap: 12px; margin-bottom: 24px; }
.ah-range-f { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; font: 400 12px/16px var(--font); color: var(--trunks); }
.ah-range-f input { height: 48px; padding: 0 12px; border: 1px solid var(--beerus); border-radius: 8px; background: var(--gohan); font: 400 16px/24px var(--font); color: var(--bulma); }
.ah-range-f input:focus { outline: 0; border-color: var(--piccolo); }

/* ---------- Detail ---------- */
.ah-dpage { display: flex; flex-direction: column; gap: 24px; padding: calc(var(--sb-dash) + 24px) 20px 120px; }
.ah-dhead { display: flex; align-items: center; justify-content: space-between; height: 40px; }
.ah-more { padding: 4px; border-radius: 8px; display: grid; place-items: center; }
.ah-dform { display: flex; flex-direction: column; gap: 32px; }
.ah-hero { display: flex; flex-direction: column; gap: 16px; margin: 0 -20px; }
.ah-subj { padding: 2px 16px; border-top: 1px solid rgba(0, 0, 0, 0.25); border-bottom: 1px solid rgba(0, 0, 0, 0.25); font: 700 14px/24px var(--font); text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ah-titles { display: flex; flex-direction: column; gap: 8px; }
.ah-dtitle { padding: 0 8px; font: 600 24px/32px var(--font); text-align: center; }
.ah-dcat { font: 400 16px/24px var(--font); color: var(--trunks); text-align: center; }
.ah-ctabs { border-top: 1px solid rgba(0, 0, 0, 0.25); border-bottom: 1px solid rgba(0, 0, 0, 0.25); padding: 8px 16px; display: flex; justify-content: center; }
.ah-ctabs-in { gap: 8px; align-items: stretch; scroll-snap-type: none; }
.ah-ctabs-in i { width: 1px; background: var(--beerus); }
.ah-ctab { padding: 4px 12px; border-radius: 16px; font: 400 16px/24px var(--font); color: var(--trunks); white-space: nowrap; }
.ah-ctab:hover { background: var(--heles); color: var(--bulma); }
.ah-dcol { display: flex; flex-direction: column; gap: 16px; }
.ah-dueline { display: flex; gap: 8px; font: 400 16px/24px var(--font); color: var(--dodoria); }
.ah-dueline span:first-child { flex: 1; min-width: 0; }
.ah-dueline span:last-child { white-space: nowrap; }
.ah-dcard { display: flex; flex-direction: column; gap: 16px; padding: 16px; border-radius: 8px; background: var(--gohan); overflow: hidden; }
.ah-dcard-h { font: 700 18px/28px var(--font); color: var(--bulma); }
.ah-desc { display: flex; flex-direction: column; gap: 12px; padding: 12px 16px; border-radius: 8px; background: var(--heles); }
.ah-desc-t { font: 400 16px/24px var(--font); color: var(--bulma); white-space: pre-line; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.ah-desc.is-open .ah-desc-t { display: block; -webkit-line-clamp: unset; }
.ah-readmore { align-self: flex-start; display: flex; align-items: center; gap: 6px; font: 700 12px/16px var(--font); color: var(--piccolo); }
.ah-readmore[hidden] { display: none; }
.ah-desc:not(.is-open) .ah-readmore img { transform: rotate(180deg); }
.ah-od { gap: 0; }
.ah-od-head { display: flex; align-items: center; justify-content: space-between; width: 100%; text-align: left; }
.ah-od:not(.is-open) .ah-od-head img { transform: rotate(180deg); }
.ah-od-body { display: none; flex-direction: column; gap: 12px; margin-top: 16px; padding: 12px 16px; border-radius: 8px; background: var(--heles); }
.ah-od.is-open .ah-od-body { display: flex; }
.ah-od-row { display: flex; gap: 2px; font: 400 12px/16px var(--font); }
.ah-od-row span { flex: 1 1 0; min-width: 0; color: var(--trunks); overflow-wrap: anywhere; }
.ah-od-row span:first-child { font-weight: 500; color: var(--bulma); }
.ah-subs { display: flex; flex-direction: column; gap: 16px; padding: 16px 12px; background: var(--gohan); }
.ah-sub { display: flex; flex-direction: column; gap: 16px; padding: 12px; border-radius: 8px; background: var(--goku); }
.ah-sub.is-flash { animation: ah-flash 1.2s ease-out; }
@keyframes ah-flash { 0%, 40% { box-shadow: 0 0 0 2px var(--piccolo); } 100% { box-shadow: 0 0 0 2px transparent; } }
.ah-sub-head { display: flex; align-items: center; gap: 8px; height: 24px; }
.ah-sub-head h3 { flex: 1; min-width: 0; font: 700 16px/24px var(--font); }
.ah-viewall { display: flex; align-items: center; font: 700 14px/20px var(--font); color: var(--piccolo); border-radius: 4px; }
.ah-viewall:hover { text-decoration: underline; }
.ah-sub-stats { display: flex; align-items: center; gap: 12px; width: 100%; height: 58px; padding: 4px 8px; border-radius: 8px; background: var(--gohan); text-align: left; }
.ah-sub-stats:hover { box-shadow: 0 0 0 1px var(--beerus); }
.ah-sub-stats span { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; padding: 4px 0; font: 400 14px/24px var(--font); color: var(--bulma); }
.ah-sub-stats small { font: 400 12px/16px var(--font); color: rgba(0, 0, 0, 0.25); }
.ah-sub-stats i { flex: none; width: 1px; height: 24px; background: var(--beerus); }
.ah-notes { display: block; width: 100%; min-height: 56px; padding: 15px; border: 1px solid var(--beerus); border-radius: 8px; background: var(--gohan);
  font: 400 16px/24px var(--font); color: var(--bulma); resize: vertical; outline: 0; }
.ah-notes::placeholder { color: var(--trunks); }
.ah-notes:focus { border-color: var(--piccolo); }

/* Bottom action bar */
.ah-actions { position: absolute; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--beerus); border-top: 1px solid var(--heles); }
.ah-actions-row { display: flex; height: 60px; filter: drop-shadow(0 0 0.5px rgba(20, 20, 20, 0.04)) drop-shadow(0 0 4px rgba(20, 20, 20, 0.08)); }
.ah-actions-row button { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font: 400 12px/16px var(--font); color: var(--bulma); }
.ah-actions-row button:hover { background: rgba(0, 0, 0, 0.03); }
.ah-hi { position: relative; height: 34px; }
.ah-hi i { position: absolute; left: 50%; bottom: 8px; width: 144px; height: 5px; margin-left: -72px; border-radius: 100px; background: var(--bulma); }

/* Delete dialog */
.ah-layer { z-index: 55; padding: 0; }
.ah-scrim { position: absolute; inset: 0; background: var(--zeno); animation: fade-in .2s ease-out both; }
.ah-dialog { position: relative; width: 312px; max-width: calc(100% - 40px); border-radius: 16px; background: var(--gohan); overflow: hidden; display: flex; flex-direction: column; animation: fade-in .18s ease-out both; }
.ah-dialog-text { display: flex; flex-direction: column; gap: 16px; padding: 24px 24px 20px; text-align: center; }
.ah-dialog-title { font: 400 24px/32px var(--font); color: #1D1B20; }
.ah-dialog-msg { font: 400 14px/20px var(--font); color: #49454F; }
.ah-dialog-btn { height: 56px; border-top: 1px solid var(--beerus); font: 700 16px/24px var(--font); color: var(--trunks); text-align: center; }
.ah-dialog-btn.danger { font-weight: 600; color: var(--dodoria); }
.ah-dialog-btn:hover { background: var(--goku); }
