:root{font-family:Inter,system-ui,-apple-system,Segoe UI,sans-serif;color:#172033;background:#f4f6fa}*{box-sizing:border-box}body{margin:0}.hidden{display:none!important}header{height:68px;background:#172b4d;color:white;display:flex;align-items:center;justify-content:space-between;padding:0 22px;gap:16px}header strong{display:block;font-size:17px}header small{display:block;color:#c7d4e8;margin-top:3px}.header-actions{display:flex;gap:8px}.toolbar{display:flex;gap:10px;padding:12px 16px;background:white;border-bottom:1px solid #dfe5ee}.toolbar input:not([type=file]){flex:1;min-width:160px}.toolbar input,.toolbar select,.login-card input{border:1px solid #cbd5e1;border-radius:8px;padding:10px;font:inherit;background:white}button{border:0;border-radius:8px;background:#1769aa;color:white;padding:10px 14px;font:inherit;font-weight:600;cursor:pointer}button.secondary{background:#e8eef6;color:#24344d}button:hover{filter:brightness(.97)}#layout{height:calc(100vh - 160px);min-height:420px;display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:0}#map{min-height:420px;background:#e4eaf1}aside{overflow:auto;background:white;border-left:1px solid #dce3ed;padding:14px}aside h2{font-size:16px;margin:2px 0 12px}.office-card{padding:12px;border:1px solid #e0e6ef;border-radius:10px;margin-bottom:9px;cursor:pointer}.office-card:hover{border-color:#6b9ed3;background:#f8fbff}.office-card strong{display:block}.muted{font-size:12px;color:#64748b;margin-top:5px}.ticket-popup{max-width:320px;max-height:350px;overflow:auto;font:13px/1.4 Arial,sans-serif}.ticket-popup h3{margin:0 0 8px}.ticket{border-top:1px solid #ddd;padding-top:8px;margin-top:8px}.ticket b{color:#124c7a}.login-wrap{min-height:100vh;display:grid;place-items:center;padding:20px}.login-card{background:white;border:1px solid #e0e6ef;border-radius:16px;padding:28px;width:min(400px,100%);box-shadow:0 12px 40px #182d4b12}.login-card h1{font-size:22px;margin:0 0 6px}.login-card p{color:#64748b;margin:0 0 20px}.login-card label{display:block;font-size:13px;font-weight:600;margin:14px 0}.login-card input{display:block;width:100%;margin-top:6px}.login-card button{width:100%;margin-top:6px}.error{color:#b42318;font-size:13px;margin-top:10px}.notice{padding:9px 11px;color:#8a4b08;background:#fff6df;border-radius:8px;margin:8px 12px;font-size:13px}.notice:empty{display:none}footer{padding:8px 14px;color:#64748b;font-size:12px;background:#fff;border-top:1px solid #e5eaf0}@media(max-width:800px){#layout{grid-template-columns:1fr;height:auto}#map{height:55vh;min-height:340px}aside{border-left:0;border-top:1px solid #dce3ed;max-height:45vh}.toolbar{flex-wrap:wrap}header{padding:0 12px}.header-actions{gap:5px}button{padding:9px 10px}}


/* Postal ITSM mobile and typography refresh */
:root {font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;}
body {font-size:14px;line-height:1.5;}
button, input, select {font-family:inherit;}
button {transition:filter .16s ease, transform .16s ease;}
button:focus-visible, input:focus-visible, select:focus-visible, .route-links a:focus-visible {outline:3px solid #8cc8ff;outline-offset:2px;}
.office-card {box-shadow:0 2px 12px #17375c0a;transition:border-color .15s, box-shadow .15s;}
.office-card:hover {box-shadow:0 5px 16px #17375c15;}
.ticket-popup {max-width:390px;max-height:min(60vh,520px);overflow:auto;font:14px/1.55 "Inter","Segoe UI",system-ui,sans-serif;color:#172b4d;overflow-wrap:anywhere;padding-right:3px;}
.ticket-popup h3 {font-size:17px;margin:0 0 5px;}
.ticket-popup p {margin:7px 0;}
.ticket-popup .office-subtitle {color:#64748b;font-size:12px;}
.ticket {padding:13px 0 4px;margin-top:12px;border-top:1px solid #dce5f0;}
.ticket-id {display:flex;flex-wrap:wrap;align-items:center;gap:7px;margin:9px 0;}
.ticket-id b {font-size:14px;}
.ticket-status {background:#e7f1fc;color:#15558a;border-radius:100px;padding:3px 9px;font-size:11px;font-weight:700;}
.ticket-incoming {background:#eaf4ff;border:1px solid #c6e1fa;border-radius:12px;padding:10px 12px;}
.ticket-incoming span {display:block;color:#456987;font-size:11px;font-weight:650;letter-spacing:.04em;text-transform:uppercase;}
.ticket-incoming strong {display:block;font-size:18px;color:#105b9b;letter-spacing:.01em;margin-top:2px;word-break:break-word;}
.ticket-time {font-size:12px;color:#45566f;}
.ticket-count {font-weight:750;margin:13px 0 2px;}
.route-links {display:flex;flex-wrap:wrap;gap:8px;margin:12px 0 5px;}
.route-links a {background:#1769aa;color:white;text-decoration:none;font-size:13px;font-weight:700;border-radius:10px;padding:10px 12px;min-height:42px;display:inline-flex;align-items:center;justify-content:center;flex:1;white-space:nowrap;}
.route-links a + a {background:#e7edf6;color:#17436b;}
.route-note {font-size:11px;color:#64748b;}
.office-hours {font-size:12px;padding:8px 0;}
.office-hours summary {font-weight:650;cursor:pointer;}
@media(max-width:800px) {
  header {height:auto;min-height:76px;padding:10px 12px;align-items:flex-start;flex-wrap:wrap;}
  header .header-brand {flex:1 1 195px;}
  header .header-brand img {width:44px;height:44px;}
  header .header-actions {margin-left:auto;align-self:center;}
  header strong {font-size:14px;}
  header small {font-size:11px;line-height:1.3;}
  .toolbar {padding:10px 12px;gap:8px;}
  .toolbar input:not([type=file]) {flex:1 1 100%;width:100%;min-width:0;}
  .toolbar select {flex:1 1 170px;min-width:0;max-width:100%;}
  .toolbar button {flex:0 0 auto;}
  #layout {display:flex;flex-direction:column;height:auto;min-height:0;}
  #map {height:54vh;height:54dvh;min-height:320px;flex:none;}
  aside {max-height:none;overflow:visible;padding:12px;}
  .office-card {padding:14px;}
  .ticket-popup {max-width:min(82vw,390px);max-height:45vh;max-height:45dvh;font-size:13px;}
  .route-links a {font-size:12px;padding:9px 8px;}
  footer {font-size:11px;}
}
@media(max-width:390px) {
  header .header-actions {width:100%;justify-content:flex-end;}
  .header-brand-text strong {font-size:13px;}
  .route-links {flex-direction:column;}
}


/* One-button navigation and clearly separated incoming number */
.ticket-incoming-label {display:block;font-size:11px;font-weight:700;color:#456987;letter-spacing:.05em;text-transform:uppercase;}
.ticket-incoming-value {display:block;margin-top:7px;font-size:20px;line-height:1.25;font-weight:800;color:#105b9b;overflow-wrap:anywhere;}
.route-trigger {display:block;width:100%;min-height:46px;margin:13px 0 6px;padding:11px 14px;border-radius:11px;background:#1769aa;color:#fff;font-weight:750;font-size:14px;cursor:pointer;}
.route-dialog {border:0;border-radius:18px;box-shadow:0 18px 70px #11243b50;width:min(92vw,390px);max-width:390px;padding:0;color:#182c42;font-family:inherit;}
.route-dialog::backdrop {background:#071b34a8;}
.route-dialog-inner {padding:23px;}
.route-dialog h3 {font-size:19px;margin:0 0 10px;}
.route-dialog p {font-size:13px;color:#54657c;line-height:1.5;margin:0 0 17px;}
.route-option {display:block;padding:13px 14px;margin:9px 0;text-decoration:none;text-align:center;border-radius:11px;font-weight:700;font-size:14px;background:#e8f0f8;color:#16598e;}
.route-option.primary {background:#1769aa;color:#fff;}
.route-cancel {width:100%;background:transparent;color:#53657c;margin-top:7px;padding:10px;}


/* Postal ITSM desktop polish v1 — desktop only */
@media (min-width: 901px) {
  :root {
    --desk-ink: #183251;
    --desk-blue: #1769aa;
    --desk-border: #dde7f2;
    --desk-shadow: 0 12px 38px rgba(24, 51, 86, .09);
  }

  body {
    background: radial-gradient(circle at 12% 0%, #e7f3ff 0, transparent 35%),
                radial-gradient(circle at 94% 80%, #eaf4fd 0, transparent 30%),
                #f4f7fb;
    color: var(--desk-ink);
  }

  header {
    height: 84px;
    padding: 0 30px;
    gap: 20px;
    background: linear-gradient(110deg, #102844 0%, #183d69 60%, #12618b 100%);
    border-bottom: 3px solid #5dbbe9;
    box-shadow: 0 8px 24px rgba(12, 36, 65, .13);
  }
  header .header-brand { gap: 16px; }
  header .header-brand img {
    width: 70px;
    height: 70px;
    object-fit: contain;
    filter: drop-shadow(0 4px 11px rgba(4, 18, 39, .17));
  }
  header .header-brand-text strong {
    font-size: 20px;
    letter-spacing: -.02em;
    line-height: 1.2;
    font-weight: 750;
    color: #fff;
  }
  header small {
    font-size: 12px;
    line-height: 1.35;
    color: #d0e7f7;
  }
  .header-actions { gap: 10px; }
  .header-actions button {
    padding: 11px 16px;
    border-radius: 11px;
    background: rgba(255,255,255,.13);
    color: #fff;
    border: 1px solid rgba(255,255,255,.2);
    transition: background .18s ease, border-color .18s ease, transform .18s ease;
  }
  .header-actions button:hover {
    background: rgba(255,255,255,.22);
    border-color: rgba(255,255,255,.42);
    transform: translateY(-1px);
    filter: none;
  }

  .toolbar {
    min-height: 74px;
    padding: 14px 24px;
    gap: 12px;
    align-items: center;
    background: rgba(255,255,255,.94);
    border-bottom: 1px solid var(--desk-border);
    box-shadow: 0 3px 10px rgba(30, 59, 93, .045);
  }
  .toolbar input:not([type=file]), .toolbar select {
    min-height: 44px;
    border: 1px solid #d5e1ed;
    border-radius: 12px;
    padding: 10px 14px;
    color: #1d3857;
    background: #f9fbfe;
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
  }
  .toolbar input:not([type=file]):focus, .toolbar select:focus {
    background: #fff;
    border-color: #73ade0;
    box-shadow: 0 0 0 3px rgba(36, 125, 200, .12);
    outline: none;
  }
  .toolbar button {
    min-height: 44px;
    border-radius: 12px;
    padding: 10px 18px;
  }

  #layout {
    height: calc(100vh - 228px);
    min-height: 490px;
    margin: 16px 20px 12px;
    grid-template-columns: minmax(0, 1fr) 370px;
    background: #fff;
    overflow: hidden;
    border: 1px solid #dbe5f1;
    border-radius: 18px;
    box-shadow: var(--desk-shadow);
  }
  #map {
    min-width: 0;
    background: #e6f0f9;
  }
  aside {
    background: linear-gradient(180deg, #fff 0%, #fafcff 100%);
    border-left: 1px solid #e2eaf3;
    padding: 20px 17px;
    scrollbar-width: thin;
    scrollbar-color: #c3d8ed transparent;
  }
  aside h2 {
    font-size: 17px;
    font-weight: 750;
    letter-spacing: -.02em;
    margin: 1px 2px 16px;
    color: #183759;
  }
  .office-card {
    position: relative;
    border: 1px solid #e0eaf3;
    background: #fff;
    border-radius: 14px;
    padding: 15px 15px 15px 18px;
    margin-bottom: 11px;
    box-shadow: 0 3px 12px rgba(14, 56, 93, .045);
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
  }
  .office-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 16px;
    bottom: 16px;
    width: 3px;
    border-radius: 0 4px 4px 0;
    background: #55a8e2;
  }
  .office-card strong {
    font-size: 14px;
    color: #184a78;
    margin-bottom: 6px;
    line-height: 1.4;
  }
  .office-card:hover {
    transform: translateY(-2px);
    border-color: #9bc8ed;
    background: #fff;
    box-shadow: 0 9px 24px rgba(20, 75, 119, .11);
  }
  .office-card .muted { margin-top: 9px; line-height: 1.5; }

  .ticket-popup {
    font-size: 14px;
    line-height: 1.55;
    color: #203d5d;
  }
  .ticket-incoming { border-radius: 13px; }
  .ticket-incoming-value { letter-spacing: .02em; }
  .route-trigger {
    background: linear-gradient(110deg, #1769aa 0%, #1283bf 100%);
    border-radius: 12px;
    box-shadow: 0 5px 12px rgba(23, 105, 170, .15);
    transition: filter .16s ease, box-shadow .16s ease;
  }
  .route-trigger:hover {
    filter: brightness(1.06);
    box-shadow: 0 8px 19px rgba(23, 105, 170, .23);
  }

  footer {
    background: transparent;
    border-top: 0;
    color: #788da4;
    text-align: center;
    padding: 6px 20px 13px;
    font-size: 11px;
  }

  .login-wrap {
    background: radial-gradient(circle at 18% 24%, rgba(67,155,218,.13),transparent 34%),
                radial-gradient(circle at 86% 72%, rgba(76,181,214,.13),transparent 31%);
  }
  .login-card {
    border: 1px solid #e0e9f3;
    border-radius: 22px;
    padding: 34px;
    box-shadow: 0 24px 70px rgba(17, 52, 84, .13);
  }
  .login-card h1 { letter-spacing: -.035em; }
  .login-card button {
    min-height: 45px;
    border-radius: 11px;
    background: linear-gradient(110deg, #1769aa, #147eb7);
  }
}
@media (min-width: 901px) and (prefers-reduced-motion: reduce) {
  .office-card, .header-actions button, .route-trigger { transition: none; }
  .office-card:hover, .header-actions button:hover { transform: none; }
}



/* Подпись разработчика */
footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.footer-credit {
    white-space: nowrap;
    color: #64748b;
    font-size: 12px;
}

.footer-credit strong {
    color: #1769aa;
    font-weight: 700;
}

@media (max-width: 800px) {
    footer {
        flex-direction: column;
        text-align: center;
        gap: 8px;
        padding: 14px;
    }
}

/* Single scrollbar for ticket balloon */
#map .ticket-popup {
    height: auto;
    max-height: none;
    overflow: visible;
}
