@font-face {
  font-family: Montserrat;
  src: url("/fonts/montserrat-cyrillic.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: Montserrat;
  src: url("/fonts/montserrat-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root {
  color-scheme: light;
  --background: #f4f7fb;
  --surface: #fff;
  --border: #d9e0ea;
  --line: #ebeff4;
  --text: #1f1f1f;
  --muted: #626b77;
  --blue: #1677ff;
  --blue-dark: #0958d9;
  --blue-soft: #e6f4ff;
  --green: #389e0d;
  --green-soft: #f6ffed;
  font: 14px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--text); background: var(--background); min-height: 100vh; display: flex; flex-direction: column; }
button, input, select, textarea { font: inherit; }
button, select, summary { cursor: pointer; }
a { color: var(--blue-dark); text-decoration: none; }
a:hover { color: var(--blue); }
p { margin: 0 0 12px; }
h1, h2, h3 { margin: 0; font-weight: 600; line-height: 1.2; }
h1 { font-size: clamp(29px, 4vw, 40px); }
h2 { font-size: 22px; }
h3 { font-size: 17px; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.container { width: min(1200px, calc(100% - 48px)); margin-inline: auto; }
.site-header { border-bottom: 1px solid var(--border); background: #fff; }
.header-inner { max-width: 1250px; padding: 0 24px; margin: auto; display: flex; min-height: 64px; align-items: center; gap: 24px; }
.brand { color: var(--text); display: flex; align-items: center; gap: 9px; font-size: 18px; font-weight: 700; white-space: nowrap; }
.brand:hover { color: var(--text); }
.brand-accent { color: var(--blue-dark); }
.brand-mark { display: grid; grid-template-columns: repeat(2, 7px); grid-template-rows: repeat(2, 7px); gap: 3px; transform: rotate(-12deg); }
.brand-mark i { border-radius: 1.5px; background: #1890ff; }
.brand-mark i:nth-child(2) { background: #fa8c16; }
.brand-mark i:nth-child(3) { background: #722ed1; }
.brand-mark i:nth-child(4) { background: #52c41a; }
#navigation { display: flex; flex: 1; gap: 3px; justify-content: flex-start; }
#navigation a { display: grid; place-items: center; gap: 1px; color: var(--text); padding: 5px 14px; min-width: 76px; border-radius: 8px; white-space: nowrap; line-height: 1.25; }
#navigation a:hover { background: #f4f6f8; color: var(--blue-dark); }
#navigation a[aria-current="page"] { background: var(--blue-soft); color: var(--blue-dark); }
#account { margin-left: auto; }
#app { flex: 1; padding-top: 24px; padding-bottom: 44px; }
.surface { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; color: var(--text); background: #fff; border: 1px solid #d9d9d9; border-radius: 6px; padding: 6px 14px; min-height: 34px; line-height: 1.35; transition: background-color .15s, border-color .15s, color .15s; text-align: center; }
.btn:hover { border-color: var(--blue); color: var(--blue-dark); }
.btn.primary { background: var(--blue); color: #fff; border-color: var(--blue); }
.btn.primary:hover { background: var(--blue-dark); border-color: var(--blue-dark); }
.btn.link { color: var(--blue-dark); border-color: transparent; background: transparent; padding-inline: 5px; }
.btn.link:hover { background: var(--blue-soft); }
button:disabled { opacity: .55; cursor: wait; }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.intro { position: relative; display: grid; grid-template-columns: 1.12fr .88fr; min-height: 365px; box-shadow: 0 14px 34px rgb(15 23 42 / 6%); overflow: hidden; }
.intro-copy { padding: 49px 0 51px 49px; position: relative; z-index: 1; }
.intro h1 { font-family: Montserrat, "Segoe UI", sans-serif; font-weight: 500; font-size: clamp(36px, 5vw, 64px); letter-spacing: -.04em; margin-bottom: 17px; }
.intro p { font-family: Montserrat, "Segoe UI", sans-serif; font-size: clamp(15px, 1.45vw, 19px); max-width: 550px; }
.intro .actions { margin-top: 25px; }
.intro .btn { padding: 9px 16px; }
.campus-art { position: relative; width: min(100%, 410px); height: 265px; align-self: center; justify-self: center; margin: 15px 20px 0 0; }
.art-ground { position: absolute; bottom: 42px; left: 5%; width: 90%; height: 2px; border-radius: 2px; background: #c5d9ed; }
.art-building { position: absolute; bottom: 44px; border: 2px solid #85b9ec; border-radius: 5px 5px 0 0; }
.left-building { width: 27%; height: 109px; left: 15%; background: repeating-linear-gradient(0deg,#eaf5ff 0 15px,#bcd9f2 16px 17px,#eaf5ff 18px 28px); }
.right-building { width: 25%; height: 130px; right: 13%; background: repeating-linear-gradient(0deg,#eff8ff 0 15px,#bcd9f2 16px 17px,#eff8ff 18px 28px); }
.main-building { width: 37%; height: 180px; left: 34%; border-color: #74abde; background: #f1f8ff; }
.main-building::before { content: ""; position: absolute; inset: 20px 12px 31px; background: repeating-linear-gradient(0deg,#fff 0 7px,transparent 7px 19px,#fff 19px 24px), repeating-linear-gradient(90deg,#fff 0 6px,#9acbf5 6px 21px,#fff 21px 28px); border: 1px solid #c6def4; }
.main-building::after { content: ""; position: absolute; bottom: 0; left: 40%; width: 20%; height: 24px; border: 2px solid #8ebae2; border-bottom: 0; border-radius: 3px 3px 0 0; background: #e0eeff; }
.main-building span { position: absolute; width: 32%; height: 8px; left: 34%; top: -9px; border: 2px solid #74abde; border-radius: 3px 3px 0 0; background: #e6f4ff; }
.art-tree { position: absolute; width: 27px; height: 48px; bottom: 43px; z-index: 1; border-bottom: 19px solid #fff0; background: #cbecc2; border-radius: 45% 45% 38% 38%; background-clip: padding-box; }
.art-tree::after { content: ""; position: absolute; background: #86b87b; height: 24px; width: 2px; bottom: -18px; left: 48%; }
.tree-left { left: 10%; }
.tree-right { right: 7%; height: 58px; }
.feature-grid, .stat-grid { display: grid; gap: 16px; margin-top: 18px; }
.feature-grid { grid-template-columns: repeat(3, 1fr); }
.feature { padding: 23px; display: flex; align-items: flex-start; flex-direction: column; gap: 10px; }
.feature h2 { font-size: 19px; }
.feature p { color: var(--muted); }
.feature a { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; }
.glyph { display: inline-grid; place-items: center; flex: 0 0 auto; width: 42px; height: 42px; border-radius: 8px; background: var(--blue-soft); color: var(--blue-dark); }
.feature:nth-child(2) .glyph { background: var(--green-soft); color: var(--green); }
.feature:nth-child(3) .glyph { background: #f9f0ff; color: #722ed1; }
.project-note { display: flex; align-items: flex-start; gap: 12px; padding: 18px 22px; margin-top: 18px; }
.project-note svg { color: var(--blue-dark); flex: 0 0 auto; }
.project-note p { margin: 3px 0 0; color: var(--muted); }
.site-footer { background: #fff; border-top: 1px solid var(--border); }
.footer-inner { display: flex; gap: 20px; padding: 18px 0; color: var(--muted); }
.footer-inner span { margin-right: auto; }
.page-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.crumb, .muted, .meta { color: var(--muted); }
.crumb { margin-bottom: 8px; }
.campus-layout { display: grid; grid-template-columns: 245px minmax(0, 1fr); gap: 16px; align-items: start; }
.campus-sidebar { padding: 16px; }
.campus-sidebar h2 { font-size: 17px; margin-bottom: 9px; }
.campus-sidebar label { padding-top: 13px; border-top: 1px solid var(--line); margin-top: 11px; }
.dorm-list { display: grid; gap: 4px; }
.dorm-list .btn { justify-content: flex-start; border-color: transparent; padding-inline: 8px; }
.dorm-list .btn.current { background: var(--blue-soft); color: var(--blue-dark); }
.campus-heading { padding: 21px 22px 7px; }
label { display: grid; gap: 5px; }
label .muted { display: inline; }
input, select, textarea { color: var(--text); background: #fff; border: 1px solid #d9d9d9; border-radius: 6px; min-height: 36px; padding: 6px 10px; width: 100%; }
input:hover, select:hover, textarea:hover { border-color: var(--blue); }
textarea { resize: vertical; }
.tab-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; padding-inline: 20px; border-bottom: 1px solid var(--line); }
.tabs { display: flex; gap: 24px; }
.tabs .btn { border: 0; border-bottom: 2px solid transparent; border-radius: 0; padding: 12px 0; min-height: 46px; }
.tabs .btn.current { color: var(--blue-dark); border-bottom-color: var(--blue); font-weight: 600; }
.campus-body { padding: 22px; }
.section-head { margin-bottom: 16px; }
.section-head p { color: var(--muted); margin: 5px 0 0; }
.place-grid, .ticket-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.place-card { padding: 17px; border: 1px solid var(--border); border-radius: 8px; display: flex; flex-direction: column; gap: 14px; }
.place-card .actions { margin-top: auto; }
.place-title { display: flex; align-items: flex-start; gap: 11px; min-width: 0; }
.place-title h3 { overflow-wrap: anywhere; }
.place-title p { color: var(--muted); margin: 3px 0 0; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip, .tag { display: inline-block; border-radius: 4px; font-size: 12px; padding: 2px 7px; border: 1px solid #dfe5ed; background: #f4f7fb; color: #444d58; }
.tag { white-space: nowrap; align-self: flex-start; }
.tag.new, .tag.guest { background: #fffbe6; border-color: #ffe58f; color: #874d00; }
.tag.confirmed, .tag.assigned { background: #e6f4ff; border-color: #91caff; color: #0958d9; }
.tag.resolved, .tag.trusted { background: #d9f7be; border-color: #b7eb8f; color: #237804; }
.tag.normal { background: #fcffe6; border-color: #eaff8f; color: #536308; }
.tag.rejected, .tag.review { background: #fff0f6; border-color: #ffadd2; color: #a80754; }
.callout { padding: 10px 13px; background: var(--blue-soft); border: 1px solid #bae0ff; border-radius: 6px; }
.empty, .loading { text-align: center; padding: 36px 20px; }
.empty { grid-column: 1 / -1; }
.empty h2 { margin: 10px 0 6px; }
.empty p { color: var(--muted); }
.empty .actions { justify-content: center; }
.filter-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; color: var(--muted); }
.filter-row label { display: flex; align-items: center; }
.filter-row select { width: auto; }
.ticket { display: flex; flex-direction: column; gap: 10px; padding: 17px; overflow-wrap: anywhere; }
.ticket-head { display: flex; justify-content: space-between; gap: 10px; }
.ticket-description, .ticket .meta { margin: 0; white-space: pre-wrap; }
.meta { font-size: 12px; }
.author { display: flex; align-items: center; flex-wrap: wrap; gap: 5px 7px; border-top: 1px solid var(--line); padding-top: 8px; font-size: 13px; }
.ticket .actions { margin-top: auto; }
details { margin-block: 6px; color: var(--muted); }
summary { color: var(--blue-dark); }
.comments { margin: 6px 0; padding-left: 19px; }
.comments p { margin: 0; white-space: pre-wrap; }
.stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 18px; }
.stat-card, .stats-table { padding: 17px; }
.stat-card p { color: var(--muted); margin-bottom: 4px; }
.stat-card strong { font-size: 25px; }
.stats-table h2 { margin-bottom: 5px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 11px 7px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
th { background: var(--background); }
td small { display: block; color: var(--muted); }
.stat-issue { display: flex; gap: 7px; align-items: baseline; flex-wrap: wrap; margin-bottom: 3px; }
dialog { padding: 0; width: min(455px, calc(100vw - 24px)); max-height: calc(100dvh - 28px); border: 1px solid var(--border); border-radius: 9px; box-shadow: 0 10px 34px rgb(0 0 0 / 15%); color: var(--text); }
dialog::backdrop { background: rgb(0 0 0 / 42%); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 15px 20px; border-bottom: 1px solid var(--line); }
.dialog-head h2 { font-size: 19px; }
.close { display: grid; place-items: center; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 24px; height: 30px; width: 30px; line-height: 1; }
.close:hover { background: var(--background); }
.dialog-body { padding: 18px 20px; }
.dialog-body form { display: grid; gap: 12px; }
.dialog-body form .btn { justify-self: start; }
.dialog-body > .btn.link { margin-top: 6px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-error { color: #b42318; margin: 0; }
.form-error:not(:empty) { margin-top: 10px; }
.demo-roles { display: grid; gap: 7px; }
.demo-roles .btn { justify-content: space-between; }
.code { font: 600 19px/1.2 monospace; letter-spacing: .1em; }
#notice:not(:empty) { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 28px); z-index: 10; padding: 9px 15px; color: #15325b; border: 1px solid #91caff; background: #fff; border-radius: 7px; box-shadow: 0 5px 22px rgb(10 33 62 / 15%); }
@media (max-width: 850px) {
  .header-inner { gap: 12px; padding-inline: 16px; }
  #navigation a { padding-inline: 8px; min-width: auto; }
  .intro-copy { padding: 34px 0 34px 28px; }
  .campus-art { transform: scale(.9); }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .campus-layout { grid-template-columns: 175px minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .container { width: calc(100% - 24px); }
  .header-inner { flex-wrap: wrap; padding: 10px 12px 7px; gap: 8px; }
  #account { order: 1; }
  #account .btn { max-width: 165px; padding: 4px 8px; }
  #navigation { order: 2; flex-basis: 100%; justify-content: stretch; }
  #navigation a { flex: 1; font-size: 12px; padding: 5px 4px; }
  #app { padding-top: 14px; padding-bottom: 24px; }
  .intro { display: block; min-height: 0; }
  .intro-copy { padding: 24px 18px 0; }
  .intro h1 { font-size: clamp(30px, 9vw, 44px); }
  .intro p { font-size: 15px; }
  .campus-art { height: 208px; width: min(320px, 100%); margin: 0 auto -16px; transform: scale(.82); }
  .feature-grid, .place-grid, .ticket-grid { grid-template-columns: 1fr; gap: 10px; }
  .feature { padding: 17px; }
  .page-title { align-items: flex-start; flex-direction: column; gap: 10px; }
  .campus-layout { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .campus-sidebar { padding: 10px; }
  .dorm-list { display: flex; flex-wrap: wrap; }
  .dorm-list .btn { gap: 3px; padding: 5px; }
  .dorm-list svg { width: 14px; }
  .campus-heading { padding-inline: 14px; }
  .campus-body { padding: 14px; }
  .tab-bar { padding-inline: 14px; }
  .ticket-head { flex-wrap: wrap; }
  .footer-inner { font-size: 12px; gap: 12px; flex-wrap: wrap; }
}

.chip.pending { background: #fffbe6; border-color: #ffe7a1; color: #714a00; }
.btn.danger { color: #a61d24; }
.priority-ticket { border-left: 3px solid #eab756; }
.ticket-more { flex-basis: 100%; }
.ticket-more .actions { margin-top: 7px; }
.input-panel { padding: 22px; }
.input-panel > label, .input-panel form { max-width: 540px; }
.input-section { display: grid; gap: 12px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); justify-items: start; }
.input-section form { display: grid; width: 100%; gap: 10px; }
.input-section .btn { justify-self: start; }
.condition-group { margin: 0; border: 1px solid var(--line); border-radius: 7px; }
.conditions-groups { display: grid; gap: 8px; }
.condition-group > summary { padding: 10px 12px; color: var(--text); }
.condition-group > summary small { margin-left: 12px; }
.condition-places { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 8px; padding: 0 10px 10px; }
.condition-place { padding: 10px; background: var(--background); border-radius: 5px; }
.condition-place h3 small, .condition-group small, .person small { font-size: 12px; color: var(--muted); font-weight: 400; }
.condition-place dl { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 8px; margin-bottom: 0; }
.condition-place dd { margin: 0; }
.condition-place dd small, .person small { display: block; }
.condition-place meter { width: 72px; }
.person { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.person form { display: flex; align-items: center; gap: 6px; }
.ticket-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 0; }
.check-field { display: flex; align-items: center; gap: 7px; }
.check-field input { width: auto; min-height: auto; }
.auth-modes { margin-bottom: 12px; }
.auth-modes .current { background: var(--blue-soft); color: var(--blue-dark); border-color: #bae0ff; }
.account-exit { margin-top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
#account .btn span { max-width: 160px; overflow-wrap: anywhere; }
@media (max-width: 680px) {
  #navigation { overflow-x: auto; }
  #navigation a { min-width: max-content; }
  .person { flex-wrap: wrap; }
  .input-panel { padding: 14px; }
}
