/* Django integration: preserve the approved prototype shell while binding real controls. */
.nav-link { width:100%; display:flex; align-items:center; gap:10px; border:0; color:var(--navtext); text-align:left; padding:11px 10px; border-radius:8px; text-decoration:none; font-size:14px; }
.nav-link:hover,.nav-link.active { background:#3a2e26; color:#fff; }
.nav-link.active { box-shadow:inset 2px 0 var(--brand); }
.nav button:disabled { cursor:default; opacity:.52; }
.sidebar .brand a { display:block; line-height:0; }
.sidebar .brand img { display:block; height:auto; }
.brand-context { color:#dbc8b8; font-size:10px; font-weight:500; letter-spacing:.055em; }
.top-actions form { margin:0; }
.top-actions form .btn { color:var(--ink); }
.messages { list-style:none; margin:0 0 14px; padding:0; }
.messages li { border-radius:8px; padding:9px 12px; background:#eaf3e9; margin-bottom:6px; }
.messages li.error { background:#fff0ec; color:#8b3024; }
.order-inbox { overflow:hidden; }
.order-table th { text-align:left; }
.order-table td small { display:block; color:var(--muted); font-size:11px; margin-top:2px; }
.order-table td .row-ref { font-size:12px; }
.order-table td { overflow-wrap:anywhere; }
.login-wrap { min-height:min(70vh,720px); display:grid; place-items:center; }
.login-card { width:min(440px,100%); padding:25px; }
.login-card h1 { font-size:27px; margin:4px 0; }
.login-intro { color:var(--muted); font-size:13px; margin-bottom:20px; }
.login-field { margin-top:13px; }
.login-field label { display:block; font-size:12px; font-weight:650; margin-bottom:5px; }
.login-field input,.booking-field input,.booking-field textarea,.booking-field select { width:100%; min-width:0; border:1px solid #d5dfd7; border-radius:8px; padding:8px 10px; background:white; color:var(--ink); }
.login-field input:focus,.booking-field :is(input,textarea,select):focus { outline:2px solid var(--accent-focus); outline-offset:2px; }
.login-actions { display:flex; justify-content:flex-end; margin-top:18px; }
.login-error { margin:10px 0; padding:8px 10px; border-radius:8px; color:#8b3024; background:#fff0ec; font-size:12px; }
.order-screen .order-head h1 { overflow-wrap:anywhere; }
.order-screen .order-ref,.order-screen .order-sub,.document,.document * { overflow-wrap:anywhere; }
.order-screen .order-body { min-width:0; }
.order-screen .work,.order-screen .sources { min-width:0; }
.order-screen .sources .pdf-preview { min-width:0; }
.order-screen .sources .pdf-sheet { margin:0; cursor:zoom-in; }
.order-screen .sources .pdf-sheet img { max-height:min(74vh,820px); object-fit:contain; }
.order-screen .sources .pdf-status { min-height:1.5em; }
.pdf-dialog .dialog-body { display:block; padding-top:8px; }
.pdf-dialog .pdf-sheet-expanded { cursor:default; }
.pdf-dialog .pdf-sheet-expanded img { max-height:78vh; object-fit:contain; }
.order-screen .booking-form { min-width:0; }
.order-screen .steps.steps-intake { grid-template-columns:repeat(4,minmax(0,1fr)); }
.order-screen .booking-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px 12px; }
.order-screen .booking-field { min-width:0; }
.order-screen .booking-field.wide { grid-column:1/-1; }
.order-screen .booking-field label { display:block; margin-bottom:4px; color:var(--muted); font-size:10px; }
.order-screen .booking-field textarea { min-height:72px; resize:vertical; }
.order-screen .booking-field .errorlist { margin:3px 0; padding-left:17px; color:#9a3026; font-size:11px; }
.order-screen [role="tab"] { font-size:11px; font-weight:650; background:white; border:1px solid var(--line); border-radius:7px; padding:5px 8px; color:var(--ink); }
.order-screen [role="tab"][aria-selected="true"],.order-screen [role="tab"].active { background:var(--soft); border-color:#cfb49b; color:var(--green-dark); }
.order-screen .document pre { max-width:100%; white-space:pre-wrap; overflow-wrap:anywhere; word-break:break-word; }
.user-name { max-width:160px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:12px; }
.signout { min-height:32px; padding:5px 9px; }
@media(max-width:905px) {
  .order-screen .sources .pdf-sheet img { max-height:68vh; }
}
@media(max-width:620px) {
  .nav-link { width:auto; justify-content:center; padding:7px; }
  .nav-link span,.nav button span { display:none; }
  .sidebar .nav { flex:1 1 0; min-width:0; overflow-x:auto; overflow-y:hidden; scrollbar-width:none; }
  .sidebar .nav::-webkit-scrollbar { display:none; }
  .sidebar .nav button,.sidebar .nav-link { width:auto; flex:0 0 auto; }
  .sidebar .brand img { width:40px; }
  .nav-caption { display:none; }
  .order-screen .booking-fields { grid-template-columns:1fr; }
  .order-screen .booking-field.wide { grid-column:auto; }
  .order-screen .sources .pdf-sheet img { max-height:68vh; }
  .order-screen [role="tab"] { min-height:44px; padding:9px 10px; }
  .user-name { display:none; }
  .login-card { padding:19px; }
}
