:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  --blue: #2688ed;
  --header-blue: #dceafa;
  --page-gray: #f0f2f6;
  --text: #111317;
  --muted: #a0a3aa;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: #e8edf3; }
body { display: grid; place-items: center; color: var(--text); }
button, input { font: inherit; }
button { color: inherit; border: 0; padding: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible { outline: 2px solid #1677ff; outline-offset: 2px; }
button:active { opacity: .58; }
img { display: block; max-width: 100%; }
svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.svg-sprite { position: fixed; width: 0; height: 0; overflow: hidden; }
[hidden] { display: none !important; }

.phone {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(100%, 402px);
  height: 100dvh;
  overflow: hidden;
  background: #fff;
  isolation: isolate;
}
.app-header { flex: 0 0 auto; padding-top: env(safe-area-inset-top); background: var(--header-blue); }
.app-header.plain { background: #fff; }
.navbar { position: relative; display: flex; align-items: center; justify-content: center; height: 56px; padding: 0 14px; }
.navbar h1 { margin: 0; max-width: 80%; font-size: 20px; font-weight: 500; letter-spacing: .2px; text-align: center; }
.nav-action { position: absolute; display: grid; place-items: center; width: 42px; height: 42px; top: 7px; }
.nav-action.right { right: 11px; }
.nav-action.left { left: 8px; }
.nav-action svg { width: 28px; height: 28px; stroke-width: 1.55; }
.nav-action .avatar-mini { width: 30px; height: 30px; border-radius: 8px; }
.search-wrap { height: 57px; padding: 5px 8px 10px; }
.search-bar { display: flex; align-items: center; justify-content: center; gap: 5px; height: 42px; border-radius: 6px; background: rgba(255,255,255,.76); color: #9da0a7; }
.search-bar svg { width: 20px; height: 20px; stroke-width: 1.5; }
.search-bar input { width: 48px; padding: 0; border: 0; outline: 0; background: transparent; color: #333; font-size: 16px; }
.search-bar input::placeholder { color: #9da0a7; opacity: 1; }
.search-bar:focus-within { justify-content: flex-start; padding: 0 13px; }
.search-bar:focus-within input { width: 100%; }
.screen { flex: 1 1 auto; min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; background: #fff; scrollbar-width: thin; scrollbar-color: #c3c5ca transparent; }
.screen::-webkit-scrollbar { width: 3px; }
.screen::-webkit-scrollbar-thumb { background: #c3c5ca; border-radius: 4px; }

.tabbar {
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  flex: 0 0 calc(70px + env(safe-area-inset-bottom));
  padding: 9px 0 env(safe-area-inset-bottom);
  border-top: 1px solid #edf0f3;
  background: rgba(255,255,255,.98);
}
.tabbar[hidden] { display: none; }
.tab-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #555; font-size: 12px; }
.tab-icon { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 4px; }
.tab-icon svg { width: 26px; height: 26px; stroke-width: 1.65; }
.tab-item.active { color: var(--blue); }
.tab-item.active[data-route="mail"] .tab-icon, .tab-item.active[data-route="docs"] .tab-icon { color: #fff; background: var(--blue); }
.tab-item.active[data-route="mail"] svg { width: 23px; height: 23px; }
.tab-item.active[data-route="workbench"] svg { stroke-width: 2.4; }

.mail-list { padding-top: 8px; }
.mail-row { position: relative; display: grid; grid-template-columns: 42px 1fr auto; column-gap: 10px; width: 100%; min-height: 70px; padding: 10px 12px 10px 13px; text-align: left; }
.mail-row::after { content: ""; position: absolute; left: 66px; right: 12px; bottom: 0; height: 1px; background: #edf0f2; }
.mail-avatar { grid-row: 1 / 4; display: grid; place-items: center; align-self: start; width: 40px; height: 40px; margin-top: 2px; border-radius: 50%; color: #fff; background: #389df2; }
.mail-avatar.topic { background: #39aceb; font-size: 31px; font-weight: 500; line-height: 1; }
.mail-avatar svg { width: 27px; height: 27px; stroke-width: 1.4; }
.mail-title { align-self: end; overflow: hidden; font-size: 16px; font-weight: 500; white-space: nowrap; text-overflow: ellipsis; }
.unread-dot { display: inline-block; width: 8px; height: 8px; margin: 0 5px 1px 0; border-radius: 50%; background: #2188f2; }
.mail-date { align-self: end; color: #b4b6ba; font-size: 12px; font-weight: 400; }
.mail-subtitle, .mail-preview { grid-column: 2 / 4; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mail-subtitle { margin-top: 1px; font-size: 14px; }
.mail-preview { margin-top: 2px; color: #a5a7ac; font-size: 13px; }

.doc-tools { display: grid; grid-template-columns: 1.15fr 1fr 1fr; height: 42px; border-bottom: 1px solid #eceef1; color: #666; }
.doc-tools button { display: flex; align-items: center; justify-content: center; gap: 5px; font-size: 14px; white-space: nowrap; }
.doc-tools button + button { border-left: 1px solid #e5e7ea; }
.doc-tools svg { width: 20px; height: 20px; }
.doc-tools .chevron { width: 13px; height: 13px; transform: rotate(90deg); }
.doc-list { padding: 0 12px; }
.doc-row { position: relative; display: grid; grid-template-columns: 38px 1fr auto; grid-template-rows: 28px 23px; column-gap: 12px; width: 100%; padding: 13px 0 11px; text-align: left; }
.doc-row::after { content: ""; position: absolute; right: 0; bottom: 0; left: 50px; height: 1px; background: #edf0f2; }
.doc-icon { grid-row: 1 / 3; display: grid; place-items: center; align-self: start; width: 34px; height: 34px; border-radius: 5px; color: white; background: #54b5e8; }
.doc-icon svg { width: 25px; height: 25px; }
.doc-title { overflow: hidden; font-size: 17px; white-space: nowrap; text-overflow: ellipsis; }
.doc-date { align-self: start; color: #b5b7bb; font-size: 12px; }
.doc-owner { grid-column: 2 / 4; color: #a6a8ad; font-size: 14px; }

.workbench { min-height: 100%; padding: 0 8px 18px; background: var(--page-gray); }
.app-section { margin: 0 0 10px; padding: 11px 4px 13px; border-radius: 10px; background: #fff; }
.workbench > .app-section:first-child { margin-top: 0; }
.section-title { margin: 0 8px 9px; color: #92959c; font-size: 14px; font-weight: 400; line-height: 22px; }
.app-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 11px; }
.app-button { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; min-width: 0; min-height: 91px; border-radius: 8px; text-align: center; }
.app-button:hover { background: #f7f9fb; }
.app-icon { width: 60px; height: 60px; object-fit: contain; }
.app-label { display: block; max-width: 100%; margin-top: 1px; padding: 0 2px; font-size: 14px; line-height: 19px; overflow-wrap: anywhere; }
.app-section.compact { padding-bottom: 22px; }
.app-section.compact .app-button { min-height: 89px; }
.account-placeholder { min-height: 52px; }
.mini-program-card { padding-bottom: 26px; text-align: center; }
.mini-program-card .section-title { text-align: left; }
.mini-programs { width: 154px; height: 42px; margin: 18px auto 0; object-fit: cover; object-position: top; }
.mini-program-link { display: flex; align-items: center; justify-content: center; gap: 3px; width: 100%; color: #a3a5aa; font-size: 14px; }
.mini-program-link svg { width: 16px; height: 16px; }
.no-results { padding: 56px 0; color: #a0a3aa; text-align: center; font-size: 14px; }

.contacts { min-height: 100%; background: #fff; }
.contact-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 57px; padding: 9px 13px; text-align: left; }
.contact-row + .contact-row { position: relative; }
.contact-row + .contact-row::before { content: ""; position: absolute; top: 0; right: 13px; left: 62px; height: 1px; background: #edf0f2; }
.contact-icon { display: grid; place-items: center; flex: 0 0 38px; height: 38px; border-radius: 6px; color: #fff; background: #4097ef; }
.contact-icon.green { background: #28c76a; }
.contact-icon svg { width: 27px; height: 27px; }
.contact-name { flex: 1; font-size: 17px; }
.contact-extra { color: #aaa; font-size: 13px; }
.contact-section-title { margin: 8px 13px 4px; color: #777b82; font-size: 14px; line-height: 28px; }
.permission-message { margin-top: 267px; color: #c0c2c6; font-size: 14px; text-align: center; }

.message-page { min-height: 100%; padding: 14px 12px; background: #fff; }
.message-welcome { display: flex; align-items: center; gap: 12px; padding: 15px 5px 24px; border-bottom: 1px solid #edf0f2; }
.message-welcome img { width: 44px; height: 44px; border-radius: 9px; }
.message-welcome strong { display: block; margin-bottom: 5px; font-size: 17px; }
.message-welcome span { color: #999da4; font-size: 13px; }
.drawer-hint { margin-top: 90px; color: #b0b3b9; font-size: 14px; text-align: center; }

.campus-page { min-height: 100%; padding-bottom: 24px; background: #f8f8fb; }
.campus-hero-wrap { position: relative; }
.campus-hero { width: 100%; height: auto; aspect-ratio: 1206 / 580; object-fit: cover; }
.campus-identity { position: absolute; top: 26px; left: 13px; min-width: 176px; padding: 2px 5px; color: #121e62; font-size: 16px; line-height: 1.9; }
.campus-identity strong { font-weight: 400; }
.campus-apps-heading { display: flex; align-items: center; justify-content: space-between; height: 48px; padding: 0 13px; border-bottom: 1px solid #ececf0; background: #fff; }
.campus-apps-heading::before { content: ""; align-self: center; width: 3px; height: 22px; margin-right: 9px; background: #434396; }
.campus-apps-heading h2 { flex: 1; margin: 0; font-size: 16px; font-weight: 500; }
.campus-apps-heading button { display: flex; align-items: center; gap: 5px; color: #777; font-size: 14px; }
.campus-apps-heading svg { width: 17px; height: 17px; }
.campus-app-grid { display: grid; grid-template-columns: repeat(4, 1fr); row-gap: 9px; padding: 13px 6px 20px; background: #fff; }
.campus-app { display: flex; flex-direction: column; align-items: center; gap: 7px; min-height: 64px; font-size: 13px; }
.campus-app svg { width: 31px; height: 31px; stroke-width: 1.45; color: #38a1ac; }
.campus-app:nth-child(1) svg, .campus-app:nth-child(6) svg { color: #d99827; }
.campus-app:nth-child(2) svg, .campus-app:nth-child(4) svg { color: #428fc3; }
.campus-notice { display: flex; gap: 9px; margin: 48px 24px 0; padding: 13px 11px; border: 1px solid #ececf0; border-radius: 7px; background: #fff; box-shadow: 0 2px 7px rgba(30,40,60,.04); color: #cf7489; font-size: 12px; line-height: 20px; }
.campus-notice svg { flex: 0 0 22px; width: 22px; height: 22px; margin-top: 2px; color: #999; }

.drawer-root { position: absolute; z-index: 30; inset: 0; display: flex; }
.drawer { position: relative; width: 88%; height: 100%; overflow: hidden; color: #c5d5e9; background: linear-gradient(145deg, #08244c 0%, #06264f 58%, #073669 100%); box-shadow: 10px 0 30px rgba(0,0,0,.18); animation: drawer-in .18s ease-out; }
.drawer button { color: inherit; }
.profile { display: flex; align-items: center; gap: 12px; margin: 32px 18px 27px; padding-top: env(safe-area-inset-top); }
.profile > img { flex: 0 0 51px; width: 51px; height: 51px; border-radius: 10px; }
.profile-copy { min-width: 0; }
.profile-name { display: block; margin-bottom: 5px; color: #fff; font-size: 18px; white-space: nowrap; }
.profile-name span { margin-left: 3px; }
.profile-copy > span { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.verified { display: inline-grid; place-items: center; width: 15px; height: 17px; color: #fff; border-radius: 5px 5px 8px 8px; background: #05b97c; font-size: 10px; }
.assistant { display: flex; align-items: center; gap: 7px; margin-left: auto; padding: 9px 11px; border: 1px solid rgba(255,255,255,.16); border-radius: 25px; background: rgba(255,255,255,.09); white-space: nowrap; font-size: 14px; }
.assistant span { width: 16px; height: 16px; border: 5px solid #43c2ee; border-radius: 50%; }
.drawer-actions { display: grid; grid-template-columns: 1fr 1px 1fr; align-items: center; margin: 0 18px; padding: 0 0 23px; border-top: 1px solid rgba(255,255,255,.08); border-bottom: 1px solid rgba(255,255,255,.08); }
.drawer-actions > span { width: 1px; height: 23px; background: rgba(255,255,255,.1); }
.drawer-actions button { display: flex; align-items: center; justify-content: center; gap: 10px; padding-top: 21px; font-size: 15px; }
.drawer-actions svg { width: 21px; height: 21px; }
.company { display: flex; align-items: center; gap: 13px; width: 100%; margin-top: 13px; padding: 13px 18px; background: rgba(255,255,255,.1); text-align: left; }
.company-logo { display: grid; place-items: center; flex: 0 0 33px; height: 33px; border-radius: 7px; color: #2688ed; background: #fff; }
.company-logo svg { width: 22px; height: 22px; stroke-width: 2.5; }
.company strong { flex: 1; color: #fff; font-size: 17px; font-weight: 500; white-space: nowrap; }
.company-check { width: 23px; height: 23px; color: #fff; }
.drawer-bottom { position: absolute; right: 18px; bottom: 30px; left: 18px; }
.drawer-bottom button { display: flex; align-items: center; gap: 15px; width: 100%; padding: 14px 0; font-size: 16px; text-align: left; }
.drawer-bottom button + button { border-top: 1px solid rgba(255,255,255,.08); }
.drawer-bottom svg { width: 21px; height: 21px; }
.drawer-scrim { flex: 1; height: 100%; cursor: default; }
.toast { position: absolute; z-index: 50; left: 50%; bottom: 92px; max-width: 82%; padding: 9px 15px; border-radius: 7px; color: #fff; background: rgba(0,0,0,.72); font-size: 13px; line-height: 18px; text-align: center; pointer-events: none; opacity: 0; transform: translate(-50%, 8px); transition: opacity .16s, transform .16s; }
.toast.visible { opacity: 1; transform: translate(-50%, 0); }
@keyframes drawer-in { from { transform: translateX(-25px); opacity: .6; } to { transform: translateX(0); opacity: 1; } }

.profile-editor { width: min(340px, calc(100% - 32px)); padding: 0; border: 0; border-radius: 14px; color: #222; background: #fff; box-shadow: 0 18px 60px rgba(0,0,0,.22); }
.profile-editor::backdrop { background: rgba(4,18,38,.48); backdrop-filter: blur(2px); }
.editor-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 8px; }
.editor-header h2 { margin: 0; font-size: 19px; font-weight: 500; }
.editor-header button { width: 32px; height: 32px; color: #777; font-size: 27px; font-weight: 300; }
.avatar-picker { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 8px 0 18px; color: var(--blue); font-size: 13px; cursor: pointer; }
.avatar-picker img { width: 76px; height: 76px; border-radius: 14px; object-fit: cover; }
.form-field { display: grid; grid-template-columns: 52px 1fr; align-items: center; gap: 8px; margin: 0 18px; padding: 10px 0; border-top: 1px solid #edf0f2; font-size: 14px; }
.form-field input { min-width: 0; padding: 7px 9px; border: 1px solid #e2e5e9; border-radius: 6px; background: #f8f9fb; font-size: 15px; }
.profile-error { min-height: 18px; margin: 4px 18px 8px; color: #d34848; font-size: 12px; }
.editor-actions { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; align-items: center; padding: 12px 18px 16px; }
.editor-actions button { min-height: 35px; color: #666; font-size: 14px; }
.editor-actions > span { width: 1px; height: 20px; background: #e5e7ea; }
.editor-actions .save-profile { border-radius: 6px; color: #fff; background: var(--blue); }

@media (min-width: 500px) and (min-height: 700px) {
  .phone { height: min(874px, calc(100dvh - 28px)); border-radius: 20px; box-shadow: 0 20px 60px rgba(33,50,72,.2); }
}
@media (max-width: 360px) {
  .app-label { font-size: 12px; }
  .app-icon { width: 52px; height: 52px; }
  .profile { gap: 8px; margin-inline: 13px; }
  .assistant { padding-inline: 8px; font-size: 12px; }
  .company strong { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
