/* library - styles of the old RPO page, limited to .pg-library (generated by port.py, then reviewed) */
.pg-library *{margin:0;padding:0;}
.pg-library,.pg-library{height:100%;}
.pg-library iframe{width:100%;height:100%;border:none;}
.pg-library *{margin:0;padding:0;box-sizing:border-box;}
:root{--doh-dark:#003882;--doh-blue:#1252a3;--doh-light:#dce8f8;--doh-bg:#eaf1fb;--doh-gold:#f5c842;--doh-text:#1a2b4a;--doh-muted:#5a6e8a;--doh-border:#c8d9ef;--shadow:0 4px 24px rgba(0,56,130,.10);}
.pg-library{background:var(--doh-bg);font-family:'Segoe UI',sans-serif;color:var(--doh-text);margin:0;padding:0;min-height:100vh;}
@keyframes hLine{0%{left:-30%}100%{left:130%}}
.pg-library .pst-clock{display:inline-flex;align-items:center;gap:7px;padding:7px 13px;background:rgba(255,255,255,.14);border:1.5px solid rgba(255,255,255,.28);color:#fff;border-radius:8px;font-size:12.5px;font-weight:700;white-space:nowrap;letter-spacing:.02em;font-variant-numeric:tabular-nums;flex-shrink:0;}
.pg-library .pst-clock i{color:#f5c842;font-size:12px;}
.pg-library .pst-clock .pst-clock-tz{opacity:.75;font-weight:600;}
.pg-library .pst-clock .pst-clock-date{opacity:.85;padding-right:7px;border-right:1px solid rgba(255,255,255,.3);}
@keyframes fLine{0%{right:-30%}100%{right:130%}}
@media(max-width:768px){.pg-library .pst-clock{padding:6px 9px;font-size:11px;gap:5px;}}
@media(max-width:480px){.pg-library .pst-clock{padding:5px 7px;font-size:10px;gap:4px;}
.pg-library .pst-clock i{font-size:10px;}
.pg-library .pst-clock .pst-clock-tz{display:none;}
.pg-library .pst-clock .pst-clock-date{display:none;}}
body.dark-mode .pg-library{background:#0f1117!important;color:#e2e8f0!important;}
body.dark-mode .pg-library .page-title{color:#e2e8f0!important;}
body.dark-mode .pg-library .page-sub{color:#94a3b8!important;}
body.dark-mode .pg-library .card{background:#1a1d27!important;border-color:#2d3148!important;}
body.dark-mode .pg-library .card-hd{background:#14161f!important;border-bottom-color:#2d3148!important;}
body.dark-mode .pg-library .card-hd h3{color:#e2e8f0!important;}
body.dark-mode .pg-library .form-f label{color:#60a5fa!important;}
body.dark-mode .pg-library .form-f input{background:#0f1117!important;border-color:#2d3148!important;color:#e2e8f0!important;}
body.dark-mode .pg-library .rtable thead th{background:linear-gradient(90deg,#14213d,#0f1117)!important;color:#f5c842!important;border-bottom-color:#2d3148!important;}
body.dark-mode .pg-library .rtable td{border-bottom-color:#2d3148!important;color:#e2e8f0!important;}
body.dark-mode .pg-library .rtable tbody tr:nth-child(even){background:#181b26!important;}
body.dark-mode .pg-library .rtable tbody tr:hover{background:#20232f!important;}
body.dark-mode .pg-library .badge-rpo{background:linear-gradient(135deg,#1a1d27,#20232f)!important;border-color:#2d3148!important;color:#60a5fa!important;}
body.dark-mode .pg-library .title-cell{color:#e2e8f0!important;}
body.dark-mode .pg-library .empty-note{color:#94a3b8!important;}
body.dark-mode .pg-library .pager a{border-color:#2d3148!important;color:#60a5fa!important;}
body.dark-mode .pg-library .pager-bar{border-top-color:#2d3148!important;}
body.dark-mode .pg-library .perpage-picker select{background:#1a1d27!important;border-color:#2d3148!important;color:#e2e8f0!important;}
body.dark-mode .pg-library .btn-secondary{background:#1a1d27!important;border-color:#2d3148!important;color:#94a3b8!important;}
body.dark-mode .pg-library .btn-icon{background:#1a1d27!important;border-color:#2d3148!important;color:#94a3b8!important;}
body.dark-mode .pg-library .adv-toggle{color:#60a5fa!important;}
.pg-library .page{max-width:1200px;margin:0 auto;padding:88px 20px 72px;}
.pg-library .page-title{display:flex;align-items:center;gap:10px;font-size:20px;font-weight:800;color:var(--doh-text);margin-bottom:4px;}
.pg-library .page-sub{font-size:13px;color:var(--doh-muted);margin-bottom:20px;}
.pg-library .banner{padding:12px 18px;border-radius:10px;font-size:12.5px;font-weight:600;display:flex;align-items:flex-start;gap:10px;margin-bottom:18px;}
.pg-library .banner-warn{background:#fff3cd;border:1px solid #ffe08a;color:#7a5b00;}
.pg-library .card{background:#fff;border-radius:14px;border:1px solid var(--doh-border);border-top:4px solid var(--doh-blue);box-shadow:var(--shadow);overflow:hidden;margin-bottom:22px;}
.pg-library .card-hd{display:flex;align-items:center;gap:10px;padding:14px 20px;background:linear-gradient(90deg,#f0f6ff,#f8fbff);border-bottom:1px solid var(--doh-light);flex-wrap:wrap;}
.pg-library .card-hd h3{font-size:15px;font-weight:700;flex:1;}
.pg-library .card-bd{padding:18px 20px;}
.pg-library .search-row{display:flex;align-items:flex-end;gap:10px;margin-bottom:10px;}
.pg-library .search-row-input{flex:1;}
.pg-library .search-row .btn{flex-shrink:0;}
.pg-library .adv-toggle{display:inline-flex;align-items:center;gap:7px;background:none;border:none;color:var(--doh-blue);font-size:12px;font-weight:700;font-family:inherit;cursor:pointer;padding:4px 0 10px;}
.pg-library .adv-toggle:hover{text-decoration:underline;}
.pg-library .adv-toggle #advChevron{transition:transform .2s;font-size:10px;}
.pg-library .search-grid2{display:grid;grid-template-columns:1fr 1fr 1fr 1fr 1fr;gap:14px;margin-bottom:6px;padding-top:4px;border-top:1px solid var(--doh-light);}
@media(max-width:900px){.pg-library .search-grid2{grid-template-columns:1fr 1fr;}}
@media(max-width:640px){.pg-library .search-row{flex-wrap:wrap;}
.pg-library .search-row-input{flex-basis:100%;}}
.pg-library .form-f label{display:block;font-size:11.5px;font-weight:700;color:var(--doh-blue);margin-bottom:5px;text-transform:uppercase;letter-spacing:.03em;}
.pg-library .form-f input{width:100%;padding:9px 12px;border:1.5px solid var(--doh-border);border-radius:8px;font-size:13px;font-family:inherit;}
.pg-library .form-f input:focus{outline:none;border-color:var(--doh-blue);}
.pg-library .btn{display:inline-flex;align-items:center;gap:7px;padding:10px 20px;border:none;border-radius:8px;font-size:13px;font-weight:700;cursor:pointer;font-family:inherit;text-decoration:none;}
.pg-library .btn-primary{background:linear-gradient(135deg,var(--doh-blue),var(--doh-dark));color:#fff;box-shadow:0 4px 14px rgba(18,82,163,.25);}
.pg-library .btn-secondary{background:#fff;border:1.5px solid var(--doh-border);color:var(--doh-muted);}
.pg-library .btn-small{padding:6px 12px;font-size:11px;}
.pg-library .btn-icon{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:6px;border:1.5px solid var(--doh-border);background:#fff;color:var(--doh-muted);font-size:12.5px;cursor:pointer;text-decoration:none;margin-right:3px;transition:all .15s;}
.pg-library .btn-icon:hover{background:var(--doh-blue);border-color:var(--doh-blue);color:#fff;}
.pg-library .rtable{width:100%;border-collapse:separate;border-spacing:0;font-size:13px;}
.pg-library .rtable thead th{padding:12px 14px;text-align:center;font-size:10.5px;text-transform:uppercase;letter-spacing:.06em;color:#fff;background:linear-gradient(90deg,var(--doh-blue),var(--doh-dark));border-bottom:2px solid var(--doh-gold);position:sticky;top:0;z-index:5;}
.pg-library .rtable thead th:first-child{border-top-left-radius:8px;}
.pg-library .rtable thead th:last-child{border-top-right-radius:8px;}
.pg-library .rtable td{padding:12px 14px;border-bottom:1px solid #eef2f8;vertical-align:middle;}
.pg-library .rtable tbody tr{transition:background .12s;}
.pg-library .rtable tbody tr:nth-child(even){background:#fafcff;}
.pg-library .rtable tbody tr:hover{background:#eef5ff;}
.pg-library .rtable tbody tr:last-child td{border-bottom:none;}
.pg-library .badge-rpo{display:inline-block;padding:4px 10px;border-radius:20px;background:linear-gradient(135deg,#eef5ff,#dce8f8);border:1px solid var(--doh-border);color:var(--doh-dark);font-weight:800;font-size:12px;letter-spacing:.02em;white-space:nowrap;}
.pg-library td[data-label="RPO Number"]{white-space:nowrap;}
.pg-library .title-cell{font-weight:600;color:var(--doh-text);}
.pg-library .scroll-body{max-height:560px;overflow-y:auto;overflow-x:auto;border-radius:0 0 10px 10px;}
.pg-library .mono{font-family:'Courier New',monospace;}
.pg-library .snippet{font-size:11.5px;color:var(--doh-muted);font-style:italic;margin-top:4px;}
.pg-library .snippet mark{background:#fff3a0;padding:0 2px;border-radius:2px;font-style:normal;}
.pg-library .empty-note{padding:34px;text-align:center;color:var(--doh-muted);font-size:13px;}
.pg-library .pager-bar{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 20px;flex-wrap:wrap;border-top:1px solid var(--doh-light);}
.pg-library .pager{display:flex;align-items:center;gap:6px;flex-wrap:wrap;}
.pg-library .pager a{padding:7px 12px;border-radius:6px;font-size:12px;font-weight:700;text-decoration:none;color:var(--doh-blue);border:1.5px solid var(--doh-border);min-width:16px;text-align:center;}
.pg-library .pager a:hover{border-color:var(--doh-blue);background:#f0f6ff;}
.pg-library .pager .current{background:var(--doh-blue);color:#fff;border-color:var(--doh-blue);}
.pg-library .pager-ellipsis{padding:7px 4px;font-size:12px;color:var(--doh-muted);}
.pg-library .perpage-picker{display:flex;align-items:center;gap:8px;font-size:12.5px;color:var(--doh-muted);margin-left:auto;}
.pg-library .perpage-picker select{padding:6px 10px;border:1.5px solid var(--doh-border);border-radius:6px;font-size:12.5px;font-family:inherit;color:var(--doh-text);background:#fff;cursor:pointer;}
.pg-library .pager-total{white-space:nowrap;}
@media(max-width:640px){.pg-library .pager-bar{justify-content:center;}
.pg-library .perpage-picker{margin-left:0;justify-content:center;width:100%;}}
.pg-library .cap-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:8px;font-size:11.5px;}
.pg-library .cap-ok{color:#166534;}
.pg-library .cap-bad{color:#991b1b;}
.pg-library .progress-wrap{background:#eef3fb;border-radius:8px;height:10px;overflow:hidden;margin:8px 0;}
.pg-library .progress-bar{background:linear-gradient(90deg,var(--doh-blue),var(--doh-dark));height:100%;transition:width .3s;}
@media(max-width:768px){.pg-library .page{padding:78px 12px 84px;}
.pg-library .card-bd{padding:14px 14px;}
.pg-library .card-hd{padding:12px 14px;}}
@media(max-width:480px){.pg-library .search-grid2{grid-template-columns:1fr;}
.pg-library .page-title{font-size:17px;}
.pg-library .page-sub{font-size:12px;}}
@media(max-width:700px){.pg-library .scroll-body{max-height:none;overflow:visible;}
.pg-library .rtable,.pg-library .rtable tbody{display:block;width:100%;}
.pg-library .rtable thead{display:none;}
.pg-library .rtable tbody tr{display:flex;flex-wrap:wrap;align-items:center;background:#fff;border:1px solid var(--doh-border);border-radius:12px;margin:0 0 12px;box-shadow:0 2px 10px rgba(0,56,130,.07);padding:14px 16px;gap:7px 10px;}
.pg-library .rtable tbody tr:nth-child(even){background:#fff;}
.pg-library .rtable td{display:block;padding:0;border:none;text-align:left;font-size:12.5px;line-height:1.4;}
.pg-library .rtable td[data-label="Title"]{order:1;flex:0 0 100%;font-size:14.5px;font-weight:700;color:var(--doh-text);}
.pg-library .rtable td[data-label="Title"] .snippet{font-size:11px;font-weight:400;}
.pg-library .rtable td[data-label="RPO Number"]{order:2;flex:0 0 auto;}
.pg-library .rtable td[data-label="Actions"]{order:2;flex:0 0 auto;margin-left:auto;}
.pg-library .rtable td[data-label="Personnel"]{order:3;flex:0 0 100%;color:var(--doh-muted);}
.pg-library .rtable td[data-label="Destination"]{order:4;flex:0 0 100%;color:var(--doh-muted);}
.pg-library .rtable td[data-label="Personnel"]::before,.pg-library .rtable td[data-label="Destination"]::before{font-family:"Font Awesome 6 Free";font-weight:900;margin-right:6px;color:var(--doh-blue);font-size:11px;}
.pg-library .rtable td[data-label="Personnel"]::before{content:"\f007";}
.pg-library .rtable td[data-label="Destination"]::before{content:"\f3c5";}
.pg-library .rtable td[data-label="Date"]{order:5;flex:0 0 auto;color:var(--doh-muted);font-size:11.5px;}
.pg-library .rtable td[data-label="Uploaded"]{order:5;flex:0 0 auto;margin-left:auto;color:var(--doh-muted);font-size:11px;}
.pg-library .rtable td[data-label="Date"]::before{content:"\f133";font-family:"Font Awesome 6 Free";font-weight:400;margin-right:5px;color:var(--doh-blue);font-size:11px;}
body.dark-mode .pg-library .rtable tbody tr{background:#1a1d27!important;border-color:#2d3148!important;}
body.dark-mode .pg-library .rtable td[data-label="Title"]{color:#e2e8f0!important;}}
.pg-library .file-modal-overlay{display:none;position:fixed;inset:0;background:rgba(0,20,50,.55);z-index:1000000;align-items:center;justify-content:center;padding:30px;}
.pg-library .file-modal-overlay.open{display:flex;}
.pg-library .file-modal-box{background:#fff;border-radius:12px;max-width:900px;width:100%;max-height:90vh;display:flex;flex-direction:column;overflow:hidden;box-shadow:0 20px 60px rgba(0,0,0,.35);}
.pg-library .file-modal-hd{display:flex;align-items:center;gap:8px;padding:12px 18px;border-bottom:1px solid var(--doh-border);flex-shrink:0;}
.pg-library .file-modal-body{flex:1;overflow:auto;background:#f4f6f9;display:flex;align-items:center;justify-content:center;min-height:500px;}
.pg-library .file-modal-body iframe{width:100%;height:100%;border:none;}
body.dark-mode .pg-library .file-modal-box{background:#1a1d27;}
body.dark-mode .pg-library .file-modal-hd{border-bottom-color:#2d3148;}
body.dark-mode .pg-library .file-modal-body{background:#0f1117;}
@media(max-width:700px){.pg-library .file-modal-overlay{padding:0;}
.pg-library .file-modal-box{max-width:100%;width:100%;height:100%;max-height:100%;border-radius:0;}
.pg-library .file-modal-body{min-height:0;}}
/* v2: inside the standard layout / public header */
.pg-library .page{padding-top:0!important;margin-top:0!important}
.pg-library .lib-topbar{display:flex;align-items:center;justify-content:flex-end;gap:10px;margin-bottom:10px;flex-wrap:wrap}
.pg-library .lib-topbar .pst-clock{background:var(--doh-blue);color:#fff;border-radius:9px;padding:7px 12px;font-size:12.5px;font-weight:700}
.pg-library .lib-topbar .dark-mode-toggle{background:var(--doh-blue);color:#fff;border:0;width:36px;height:36px;border-radius:9px;cursor:pointer}
.pg-library .lib-topbar .lib-portal-btn{background:var(--doh-dark);color:#fff;border-radius:9px;padding:8px 14px;text-decoration:none;font-weight:700;font-size:13px}
body.public .public-main{padding:16px 18px 70px}
