:root { --navy:#12303a; --navy2:#1f4452; --amber:#f2a900; --bg:#f3f6f8; --line:#d3dce4; --ink:#1b2430; --muted:#5d6b7a; }
* { box-sizing:border-box; }
body { margin:0; font-family:"Segoe UI",system-ui,Arial,sans-serif; background:var(--bg); color:var(--ink); font-size:16px; line-height:1.45; }
a { color:var(--navy2); }
header.top { background:var(--navy); color:#fff; display:flex; align-items:center; gap:14px; padding:12px 22px; flex-wrap:wrap; }
header.top .brand { font-weight:700; font-size:21px; }
header.top { background:linear-gradient(135deg,#0d2530 0%,#12303a 55%,#1b4656 100%); box-shadow:0 3px 14px rgba(8,25,32,.35); }
header.top { row-gap:12px; }
header.top .who { order:2; margin-left:auto; }
header.top nav { order:3; flex:0 0 100%; display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
header.top nav a { display:inline-flex; align-items:center; gap:8px; color:#dbe6ee; text-decoration:none; font-size:17px; font-weight:600; letter-spacing:.2px; padding:10px 18px; border-radius:999px; border:1px solid rgba(255,255,255,.12); background:rgba(255,255,255,.05); transition:background .15s, transform .15s, box-shadow .15s, color .15s; }
header.top nav a svg { width:19px; height:19px; flex:none; stroke:currentColor; fill:none; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; opacity:.9; }
header.top nav a:hover { background:rgba(255,255,255,.16); color:#fff; transform:translateY(-1px); box-shadow:0 4px 10px rgba(0,0,0,.25); }
header.top nav a.on { background:linear-gradient(180deg,#ffc83d,#f2a900); color:#16242c; border-color:#f2a900; box-shadow:0 4px 14px rgba(242,169,0,.45); }
header.top nav a.on svg { opacity:1; }
header.top nav a:focus-visible { outline:3px solid #fff; outline-offset:2px; }
header.top .who { font-size:14px; color:#cfd9e4; display:flex; gap:10px; align-items:center; }
header.top .who button { background:transparent; border:1px solid #5b7a89; color:#fff; border-radius:8px; padding:6px 12px; cursor:pointer; }
main { max-width:1100px; margin:0 auto; padding:24px 20px 60px; }
h1 { margin:0 0 4px; font-size:27px; } .sub { color:var(--muted); margin:0 0 18px; }
.card { background:#fff; border:1px solid var(--line); border-radius:12px; padding:18px 20px; margin-bottom:18px; }
.btn { display:inline-block; background:#fff; border:1px solid #aab8c4; border-radius:8px; padding:8px 16px; font-size:15px; cursor:pointer; text-decoration:none; color:var(--ink); }
.btn.primary { background:var(--amber); border:0; font-weight:700; color:#2b2100; } .btn.danger { border-color:#c0392b; color:#a52a1f; }
label { display:block; font-weight:600; margin:12px 0 5px; }
input[type=text], input[type=password], input[type=number], input[type=datetime-local], select, textarea { width:100%; padding:9px 11px; border:1px solid #aab8c4; border-radius:7px; font-size:16px; font-family:inherit; background:#fff; }
table.list { width:100%; border-collapse:collapse; background:#fff; border:1px solid var(--line); border-radius:10px; overflow:hidden; }
table.list th, table.list td { text-align:left; padding:10px 12px; border-bottom:1px solid #e6ecf1; vertical-align:middle; }
table.list th { background:#e9eff4; font-size:13px; text-transform:uppercase; letter-spacing:.4px; color:var(--muted); }
.chip { display:inline-block; padding:3px 12px; border-radius:99px; font-weight:700; font-size:14px; }
.chip.requested { background:#dbeafe; color:#1e3a8a; } .chip.approved { background:#dcfce7; color:#14532d; } .chip.active { background:#fef3c7; color:#78350f; }
.chip.expired { background:#fee2e2; color:#991b1b; } .chip.closed { background:#e5e7eb; color:#374151; } .chip.signed_off { background:#ede9fe; color:#4c1d95; } .chip.submitted { background:#dbeafe; color:#1e3a8a; } .chip.missing { background:#fee2e2; color:#991b1b; } .chip.not_required { background:#ececec; color:#4b5563; } .chip.superseded { background:#ececec; color:#4b5563; } .chip.rejected { background:#f5e1e1; color:#7f1d1d; } .chip.cancelled { background:#ececec; color:#4b5563; }
.flash { padding:11px 15px; border-radius:9px; margin-bottom:14px; } .flash.success { background:#dcfce7; color:#14532d; } .flash.danger { background:#fbe7e5; color:#8c1d16; }
.cards { display:flex; gap:12px; margin-bottom:16px; flex-wrap:wrap; } .cards .card { margin:0; min-width:170px; } .cards .n { font-size:30px; font-weight:700; }
.filters { display:flex; gap:10px; margin-bottom:12px; flex-wrap:wrap; } .filters > * { width:auto; flex:1; min-width:150px; }
.check { display:flex; gap:10px; align-items:center; padding:7px 0; border-bottom:1px solid #eef2f5; } .check .t { flex:1; } .check label { display:inline; margin:0 0 0 4px; font-weight:400; }
.warning { background:#fff4dd; color:#8a5200; border:1px solid #f1d6a8; border-radius:8px; padding:9px 13px; margin-bottom:12px; }
.actions { display:flex; gap:10px; flex-wrap:wrap; margin:14px 0; align-items:flex-start; } .actions details { background:#fff; border:1px solid var(--line); border-radius:10px; padding:8px 14px; }
.actions summary { cursor:pointer; font-weight:700; } .row2 { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.permit-body { background:#fff; border:1px solid var(--line); border-radius:10px; padding:16px 20px; }
.login { max-width:400px; margin:70px auto; }
@media print { header.top, .actions, .noprint { display:none; } main { padding:0; } }
table.list td:first-child, .chip { white-space: nowrap; }
header.top nav .navbtn { background:transparent; border:1px solid #8a5a5a; color:#f3c7c7; padding:6px 12px; border-radius:8px; cursor:pointer; font:inherit; }
header.top nav .navbtn:hover { background:#6b2c2c; color:#fff; }
header.top .brand { display:flex; align-items:center; gap:12px; line-height:1.15; }
header.top .brand small { display:block; font-weight:400; font-size:13px; color:#cfd9e4; }
header.top .brand .logo { height:54px; width:auto; background:#fff; border-radius:8px; padding:3px 8px; }
.login .login-logo { display:block; max-width:240px; width:70%; height:auto; margin:0 auto 10px; }
.card.stat { border-left-width:6px; }
.card.stat.requested { background:#eff6ff; border-color:#93b4ea; color:#1e3a8a; } .card.stat.requested .n { color:#1e3a8a; }
.card.stat.signed_off { background:#f5f3ff; border-color:#b7a6ea; color:#4c1d95; } .card.stat.signed_off .n { color:#4c1d95; }
.card.stat.active { background:#fffbeb; border-color:#e6c25a; color:#78350f; } .card.stat.active .n { color:#78350f; }
.card.stat.expired { background:#fef2f2; border-color:#e99a9a; color:#991b1b; } .card.stat.expired .n { color:#991b1b; }
.card.stat.mine { background:#fff; border:2px dashed #d6b9a0; color:#7c2d12; margin-right:18px; position:relative; }
.card.stat.mine .n { color:#7c2d12; }
.card.stat.mine.has { background:#ea580c; border:2px solid #9a3412; color:#fff; box-shadow:0 4px 14px rgba(234,88,12,.45); }
.card.stat.mine.has .n { color:#fff; font-size:38px; }
.card.stat.mine.has::after { content:"Act now"; position:absolute; top:8px; right:10px; font-size:11px; font-weight:700; letter-spacing:.6px; text-transform:uppercase; background:#fff; color:#9a3412; border-radius:99px; padding:1px 8px; }
.todo { margin-top:4px; font-size:13px; font-weight:700; color:#9a3412; white-space:normal; }
.req { color:#c0392b; font-weight:700; }
.hint { font-weight:400; color:#5d6b7a; font-size:13px; }
input:user-invalid, textarea:user-invalid, select:user-invalid { border-color:#c0392b; box-shadow:0 0 0 2px rgba(192,57,43,.15); }
.timemsg { color:#b42318; font-weight:600; margin:8px 0 0; min-height:0; }
.timemsg:empty { display:none; }
/* the "When" section of the new-permit form */
.when { border:1px solid var(--line); border-radius:14px; background:#f8fbfd; padding:6px 20px 18px; margin:20px 0 6px; }
.when h2 { font-size:19px; margin:14px 0 4px; }
.whenrow { display:flex; gap:28px; flex-wrap:wrap; align-items:flex-start; }
.whencol { margin-top:12px; }
.when .lbl, .when label { font-weight:600; display:block; margin:0 0 7px; }
.when .chips { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.when .chip { display:inline-flex; align-items:center; margin:0; padding:9px 17px; border:1.5px solid #b8c7d3; border-radius:999px; background:#fff; color:var(--navy2); font:inherit; font-weight:600; cursor:pointer; position:relative; transition:background .15s, border-color .15s, box-shadow .15s; }
.when .chip:hover { border-color:var(--navy2); box-shadow:0 2px 8px rgba(18,48,58,.15); }
.when .chip.on { background:var(--navy); border-color:var(--navy); color:#fff; box-shadow:0 3px 10px rgba(18,48,58,.3); }
.when .durchip input { position:absolute; opacity:0; width:100%; height:100%; left:0; top:0; margin:0; cursor:pointer; }
.when .durchip:focus-within, .when .chip:focus-visible { outline:3px solid #7fb0cf; outline-offset:2px; }
.when .chipdate, .when .timesel, .when .otherbox input { font:inherit; width:auto; margin:0; padding:8px 12px; border:1.5px solid #b8c7d3; border-radius:10px; background:#fff; }
.when .timesel { min-width:150px; font-weight:600; font-size:17px; }
.when .otherbox { font-weight:600; display:inline-flex; gap:8px; align-items:center; }
.when .otherbox[hidden] { display:none; }
.when .otherbox input { width:90px; }
.whensum { margin-top:16px; padding:13px 16px; border-radius:10px; background:#eaf0f4; color:var(--muted); font-size:17px; }
.whensum.ready { background:linear-gradient(135deg,#12303a,#1f4452); color:#fff; font-weight:600; }
/* the permit's buttons stay in view while scrolling */
.actions { position:sticky; top:0; z-index:20; margin:0 -20px 14px; padding:10px 20px; background:#f3f6f8; border-bottom:1px solid var(--line); box-shadow:0 4px 10px rgba(18,48,58,.08); max-height:80vh; overflow-y:auto; }
