.portal-dashboard {
  --portal-blue: #2563eb;
  --portal-blue-dark: #1d4ed8;
  --portal-ink: #17253d;
  --portal-muted: #65758b;
  --portal-border: #e5ebf3;
  color: var(--portal-ink);
  padding: 8px 0 24px;
  line-height: 1.6;
}
.portal-dashboard *, .portal-dashboard *::before, .portal-dashboard *::after { box-sizing: border-box; }
.portal-dashboard h1, .portal-dashboard h2, .portal-dashboard h3, .portal-dashboard p { margin: 0; }
.portal-dashboard a { text-decoration: none; }
.portal-dashboard a:focus-visible { outline: 3px solid #93c5fd; outline-offset: 4px; }
.portal-dashboard .material-symbols-outlined { font-size: 20px; line-height: 1; flex-shrink: 0; }
.portal-hero { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 32px; border: 1px solid #dbe7fa; border-radius: 14px; background: linear-gradient(110deg, #f1f6ff 0%, #f8fbff 72%, #edf5ff 100%); }
.portal-eyebrow { color: #44699e; font-size: 12px; font-weight: 600; letter-spacing: 1px; }
.portal-hero h1 { margin-top: 7px; font-size: 27px; line-height: 1.4; font-weight: 700; letter-spacing: -.5px; }
.portal-hero-description { margin-top: 10px !important; color: #526881; font-size: 14px; }
.portal-hero-actions { display: flex; flex-direction: column; gap: 10px; flex-shrink: 0; }
.portal-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 10px 17px; border-radius: 8px; border: 1px solid transparent; font-size: 13px; font-weight: 600; line-height: 1.4; white-space: nowrap; transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease; }
.portal-button .material-symbols-outlined { font-size: 20px; line-height: 1; }
.portal-button-primary { background: var(--portal-blue, #2563eb); color: #fff !important; box-shadow: 0 3px 8px #2563eb1f; }
.portal-button-primary:hover { background: var(--portal-blue-dark, #1d4ed8); }
.portal-button-secondary { color: #355376 !important; border-color: #d4e1f3; background: #ffffffb8; }
.portal-button-secondary:hover { background: #fff; border-color: #adc6eb; }
.portal-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-top: 22px; }
.portal-stat-card { border: 1px solid var(--portal-border); border-radius: 12px; background: #fff; padding: 20px 22px; }
.portal-stat-label { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: #5c6e86; font-size: 13px; font-weight: 500; }
.portal-stat-label .material-symbols-outlined { color: #7e9ac0; }
.portal-stat-value { margin-top: 9px !important; color: #192b46; font-size: 31px; font-weight: 700; letter-spacing: -.6px; line-height: 1.4; font-variant-numeric: tabular-nums; }
.portal-stat-hint { margin-top: 5px !important; color: var(--portal-muted); font-size: 12px; }
.portal-section { margin-top: 30px; }
.portal-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.portal-section-heading h2 { font-size: 17px; font-weight: 700; line-height: 1.5; }
.portal-section-heading p { margin-top: 3px; color: var(--portal-muted); font-size: 12px; }
.portal-shortcuts { display: grid; grid-template-columns: repeat(auto-fit, minmax(235px, 1fr)); gap: 16px; }
.portal-shortcut { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 13px; padding: 22px; background: #fff; border: 1px solid var(--portal-border); border-radius: 12px; color: var(--portal-ink) !important; transition: border-color .15s ease, box-shadow .15s ease; }
.portal-shortcut:hover { border-color: #a8c4f2; box-shadow: 0 5px 16px #1f426b0a; }
.portal-shortcut-icon { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 10px; background: #edf4ff; color: var(--portal-blue); font-size: 23px !important; }
.portal-shortcut-copy { flex: 1; min-width: 130px; }
.portal-shortcut h3 { font-size: 14px; font-weight: 600; }
.portal-shortcut p { margin-top: 5px; color: var(--portal-muted); font-size: 12px; line-height: 1.7; }
.portal-shortcut-action { display: inline-flex; align-items: center; justify-content: space-between; width: 100%; margin-top: 6px; padding-top: 13px; border-top: 1px solid #edf1f7; color: var(--portal-blue); font-size: 12px; font-weight: 600; }
.portal-shortcut-action .material-symbols-outlined { font-size: 18px; }
.portal-text-link { display: inline-flex; align-items: center; gap: 5px; color: var(--portal-blue, #2563eb) !important; font-size: 12px; font-weight: 500; white-space: nowrap; }
.portal-text-link:hover { color: var(--portal-blue-dark, #1d4ed8) !important; text-decoration: underline; }
.portal-text-link .material-symbols-outlined { font-size: 16px; }
.portal-table-wrap { width: 100%; overflow-x: auto; background: #fff; border: 1px solid var(--portal-border); border-radius: 12px; }
.portal-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.portal-table th { padding: 13px 18px; background: #f8fafc; border-bottom: 1px solid var(--portal-border); color: #728198; font-size: 11px; font-weight: 600; text-align: left; }
.portal-table th:first-child { width: 42%; }
.portal-table th:nth-child(2) { width: 13%; }
.portal-table th:nth-child(3) { width: 16%; }
.portal-table th:nth-child(4) { width: 18%; }
.portal-table th:last-child { width: 11%; }
.portal-table td { padding: 16px 18px; border-bottom: 1px solid #edf1f6; vertical-align: middle; font-size: 12px; }
.portal-table tbody tr:last-child td { border-bottom: 0; }
.portal-table tbody tr:hover { background: #fafcff; }
.portal-drawing-title { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: #253c5b !important; font-size: 13px; font-weight: 500; }
.portal-drawing-title:hover { color: var(--portal-blue) !important; }
.portal-drawing-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-top: 5px; color: #8290a4; font-size: 11px; overflow-wrap: anywhere; }
.portal-area-tag { display: inline-block; padding: 3px 8px; border: 1px solid #dce7f5; border-radius: 5px; color: #466891; background: #f5f8fe; font-size: 11px; white-space: nowrap; }
.portal-discipline-cell span { display: block; }
.portal-cell-secondary { margin-top: 3px; color: #8290a4; font-size: 11px; }
.portal-date-cell { color: #718098; white-space: nowrap; font-variant-numeric: tabular-nums; }
.portal-table .portal-table-actions { text-align: right; }
.portal-empty-state { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; border: 1px solid var(--portal-border); border-radius: 12px; padding: 42px 24px; background: #fafcff; }
.portal-empty-state > .material-symbols-outlined { display: flex; align-items: center; justify-content: center; width: 54px; height: 54px; margin-bottom: 4px; border-radius: 14px; color: #7296c4; background: #edf4fc; font-size: 29px; }
.portal-empty-state h2, .portal-empty-state h3 { font-size: 15px; font-weight: 600; }
.portal-empty-state p { max-width: 480px; color: var(--portal-muted); font-size: 13px; }
.portal-empty-state .portal-button { margin-top: 8px; }
.portal-no-access { margin-top: 24px; }
@media (max-width: 1100px) {
  .portal-hero { padding: 26px; }
  .portal-hero h1 { font-size: 24px; }
  .portal-hero-description { max-width: 380px; }
  .portal-stat-card { padding: 18px; }
  .portal-table { min-width: 680px; }
}
@media (max-width: 700px) {
  .portal-hero { flex-direction: column; align-items: flex-start; gap: 20px; padding: 24px; }
  .portal-hero-actions { flex-direction: row; flex-wrap: wrap; width: 100%; }
  .portal-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .portal-stat-card { padding: 16px; }
  .portal-stat-value { font-size: 27px; }
  .portal-shortcuts { grid-template-columns: 1fr; gap: 12px; }
  .portal-shortcut { padding: 19px; }
  .portal-section { margin-top: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  .portal-dashboard a { transition: none; }
}
.portal-button { cursor: pointer; }
.portal-logout-form { margin: 0; }
.portal-login-brand { margin-bottom: 28px; text-align: center; }
.portal-login-brand img { width: 160px; height: auto; margin: 0 auto 16px; }
.portal-login-brand h1 { font-size: 24px; font-weight: 700; color: #17253d; }
.portal-login-brand p, .portal-login-note { margin-top: 10px; color: #65758b; font-size: 13px; line-height: 1.7; }
.portal-login-note { margin-top: 20px; text-align: center; }
.portal-preview-link { color: #2563eb; font-weight: 500; white-space: nowrap; }
.portal-preview-link:hover { text-decoration: underline; }
#result_list .field-title { min-width: 180px; max-width: 360px; white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .portal-logout-label { display: none; }
  .portal-logout-form .portal-button { min-height: 36px; padding: 7px; }
}
