:root { --primary: #0057b8; --navy: #0b2d4d; --ink: #152b40; --muted: #526579; --line: #d8e2ed; --soft: #eaf2fc; --surface: #f4f7fb; color: var(--ink); background: var(--surface); font: 17px/1.6 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif; }
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: var(--primary); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #4a91e2; outline-offset: 4px; }
[hidden] { display: none !important; }
.portal-header { min-height: 90px; padding: 18px max(24px, calc((100vw - 1160px)/2)); display: flex; align-items: center; justify-content: space-between; gap: 20px; background: #fff; border-bottom: 1px solid var(--line); }
.portal-brand { display: inline-flex; align-items: center; gap: 14px; color: var(--navy); text-decoration: none; font-size: 22px; font-weight: 750; white-space: nowrap; }
.brand-mark { width: 43px; height: 43px; padding: 9px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; background: var(--primary); border-radius: 12px; }
.brand-mark i { background: white; border-radius: 2px; }.brand-mark i:last-child { opacity: .5; }
.header-actions { display: flex; align-items: center; gap: 14px; }.header-actions > span { color: var(--muted); }
.button { min-height: 48px; padding: 10px 18px; display: inline-flex; align-items: center; justify-content: center; gap: 12px; border: 1px solid var(--line); border-radius: 11px; text-decoration: none; font-size: 16px; font-weight: 650; line-height: 1.5; }
.button-light { color: var(--navy); background: #fff; }.button-light:hover { border-color: var(--primary); background: var(--soft); }
.button-primary { background: var(--primary); border-color: var(--primary); color: white; }.button-primary:hover { background: #004b9e; }
button:disabled { opacity: .6; cursor: wait; }
.portal-main { width: min(1160px, calc(100% - 48px)); margin: 0 auto; flex: 1; padding: 64px 0 40px; }
.section-kicker { color: var(--primary); font-size: 15px; font-weight: 700; letter-spacing: .05em; }
.welcome h1 { margin: 12px 0 10px; color: var(--navy); font-size: clamp(30px, 3.4vw, 42px); line-height: 1.35; letter-spacing: -.035em; }.welcome p { margin: 0; color: var(--muted); font-size: 18px; }
.app-directory { margin-top: 38px; }.directory-toolbar { margin-bottom: 24px; display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: space-between; }
.filter-tabs { display: flex; padding: 5px; border: 1px solid var(--line); border-radius: 13px; background: #eaf0f6; gap: 4px; }.filter-tabs button { min-height: 48px; padding: 8px 19px; border: none; border-radius: 9px; color: var(--muted); background: transparent; white-space: nowrap; font-weight: 650; font-size: 17px; }.filter-tabs button[aria-pressed="true"] { color: var(--primary); background: #fff; box-shadow: 0 2px 5px #102c4a0a; }
.app-search { display: flex; align-items: center; gap: 12px; width: 320px; min-height: 58px; padding: 0 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }.app-search svg { width: 22px; height: 22px; fill: none; stroke: var(--muted); stroke-width: 1.7; flex: 0 0 22px; }.app-search input { min-width: 0; width: 100%; padding: 12px 0; border: none; color: var(--ink); background: transparent; font-size: 17px; }.app-search input::placeholder { color: #63788b; }
.app-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }.app-card { min-width: 0; display: flex; flex-direction: column; padding: 26px; color: var(--ink); background: white; border: 1px solid var(--line); border-radius: 20px; text-decoration: none; box-shadow: 0 6px 22px #193c5c05; transition: border-color .15s, box-shadow .15s; }.app-card:hover { border-color: #6b9bce; box-shadow: 0 8px 26px #193c5c0d; }.app-card--quote { background: linear-gradient(145deg, #fff 35%, #f1f7ff); border-color: #bed2ec; }
.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }.app-icon { display: grid; place-items: center; width: 68px; height: 68px; border-radius: 17px; background: var(--soft); color: var(--primary); flex: 0 0 auto; }.app-card--quote .app-icon { background: var(--primary); color: #fff; }.app-icon svg { width: 33px; height: 33px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.audience-badge { margin-top: 2px; padding: 4px 10px; border-radius: 6px; background: #edf2f7; color: #485e73; font-size: 14px; font-weight: 650; white-space: nowrap; }.audience-badge--public { background: #e7f5ed; color: #226242; }
.app-card h2 { margin: 24px 0 8px; font-size: 23px; line-height: 1.4; letter-spacing: -.025em; overflow-wrap: anywhere; }.app-card p { margin: 0 0 24px; min-height: 54px; color: var(--muted); font-size: 17px; line-height: 1.6; overflow-wrap: anywhere; }.card-action { margin-top: auto; padding-top: 18px; display: flex; justify-content: space-between; align-items: center; gap: 12px; border-top: 1px solid var(--line); color: var(--primary); font-size: 17px; font-weight: 700; }.card-action b { font-size: 24px; line-height: 1; }
.directory-note { margin: 24px 0 0; font-size: 16px; color: var(--muted); }.empty-message { grid-column: 1/-1; padding: 42px 20px; margin: 0; text-align: center; border: 1px dashed #bdcddd; border-radius: 16px; color: var(--muted); background: #fff; }
.admin-shortcut { margin-top: 34px; padding: 22px 24px; display: flex; justify-content: space-between; align-items: center; gap: 20px; border: 1px dashed #b9cde2; border-radius: 16px; }.admin-shortcut strong { font-size: 18px; }.admin-shortcut p { margin: 3px 0 0; font-size: 16px; color: var(--muted); }.admin-shortcut button { flex: 0 0 auto; }
.portal-footer { margin: 10px 24px 0; padding: 24px 0 max(24px, env(safe-area-inset-bottom)); display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--muted); font-size: 14px; }.footer-dot { width: 6px; height: 6px; border-radius: 50%; background: #4275a2; }
.load-error { padding: 16px; display: flex; align-items: center; justify-content: space-between; gap: 15px; border: 1px solid #e4baba; border-radius: 12px; color: #902b2b; background: #fff5f5; }
dialog { width: min(760px, calc(100% - 32px)); max-height: calc(100dvh - 32px); padding: 28px; color: var(--ink); border: 1px solid var(--line); border-radius: 20px; overscroll-behavior: contain; box-shadow: 0 24px 80px #09263b33; }dialog::backdrop { background: #0b203c80; }.dialog-title { display: flex; justify-content: space-between; align-items: center; gap: 20px; }.dialog-title h2 { font-size: 27px; margin: 3px 0 0; }.close-button { flex: 0 0 48px; height: 48px; font-size: 30px; line-height: 1; border: 1px solid var(--line); border-radius: 11px; background: #fff; color: var(--muted); }.management-note { font-size: 16px; color: var(--muted); }.managed-apps { margin: 24px 0; display: grid; gap: 12px; }.managed-entry { padding: 16px; display: flex; gap: 18px; align-items: center; justify-content: space-between; border: 1px solid var(--line); border-radius: 12px; }.managed-entry > div { min-width: 0; }.managed-entry strong { font-size: 18px; overflow-wrap: anywhere; }.managed-entry small { display: block; color: var(--muted); font-size: 15px; }.managed-entry-actions { display: flex; gap: 8px; flex-shrink: 0; }.managed-entry-actions .button { padding: 8px 12px; }.danger-button { color: #9d2c2c; background: #fff; }
#app-entry-form { padding-top: 20px; border-top: 1px solid var(--line); display: grid; gap: 16px; }#app-entry-form h3 { margin: 0; font-size: 22px; }#app-entry-form label { min-width: 0; display: grid; gap: 8px; font-size: 17px; font-weight: 650; }#app-entry-form input:not([type="checkbox"]), #app-entry-form select { width: 100%; min-width: 0; min-height: 52px; padding: 11px 12px; border: 1px solid #a7b9cb; border-radius: 9px; color: var(--ink); background: white; font-size: 17px; }#app-entry-form small { font-size: 15px; color: var(--muted); }.form-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }#app-entry-form .checkbox-label { display: flex; align-items: center; min-height: 48px; gap: 10px; }input[type="checkbox"] { width: 22px; height: 22px; accent-color: var(--primary); }.form-actions { display: flex; flex-wrap: wrap; gap: 12px; }#entry-message { margin: 0; padding: 12px; background: #eef5fc; color: var(--navy); font-size: 17px; }#entry-message[data-error="true"] { background: #fff0f0; color: #902b2b; }
@media (max-width: 950px) { .app-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) {
  .portal-header { min-height: 80px; padding: 15px 18px; gap: 10px; flex-wrap: wrap; }.portal-brand { font-size: 20px; gap: 10px; }.brand-mark { width: 38px; height: 38px; padding: 8px; border-radius: 10px; }.header-actions { gap: 8px; }.header-actions > span { display: none; }.header-actions .button { padding: 9px 12px; font-size: 16px; }
  .portal-main { width: calc(100% - 36px); padding: 32px 0 24px; }.welcome h1 { font-size: 29px; margin-top: 10px; }.welcome p { font-size: 17px; }.app-directory { margin-top: 28px; }.directory-toolbar { gap: 16px; margin-bottom: 20px; }.filter-tabs { width: 100%; }.filter-tabs button { padding: 8px 10px; flex: 1; }.app-search { width: 100%; }.app-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }.app-card { padding: 22px; border-radius: 17px; }.app-card h2 { font-size: 23px; margin-top: 20px; }.app-card p { min-height: 0; margin-bottom: 20px; }.app-icon { width: 60px; height: 60px; border-radius: 14px; }.directory-note { line-height: 1.7; }
  .admin-shortcut { padding: 20px; align-items: flex-start; flex-direction: column; gap: 14px; }.admin-shortcut .button { width: 100%; }.portal-footer { font-size: 14px; margin-top: 0; text-align: center; }
  dialog { padding: 20px; width: calc(100% - 20px); max-height: calc(100dvh - 20px); border-radius: 16px; }.dialog-title h2 { font-size: 24px; }.managed-entry { align-items: flex-start; flex-direction: column; gap: 12px; }.managed-entry-actions { width: 100%; }.managed-entry-actions .button { flex: 1; }.form-columns { grid-template-columns: 1fr; }.form-actions > button { flex: 1 1 100%; }.load-error { flex-direction: column; align-items: stretch; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
