:root{color:#1f2933;background:#f2f4f7;font-family:Arial,Helvetica,sans-serif;font-size:14px}*{box-sizing:border-box}body{margin:0}button,select,input{font:inherit}.app-shell{min-height:100vh}.site-header{border-bottom:1px solid #8b9bad;background:linear-gradient(180deg,#ffffffc7,#fff0 42%),linear-gradient(90deg,#d8dde3,#f9fafb 18%,#b9c1cb 48%,#eef1f4,#aeb8c4);box-shadow:inset 0 1px #fff,inset 0 -1px #ffffff94,0 2px 7px #1f293329}.brand{display:flex;align-items:center;gap:12px;max-width:1400px;min-height:68px;margin:0 auto;padding:10px 18px;background:linear-gradient(115deg,#fff9 0,#fff9 20%,#fff0 20%,#fff0)}.brand img{width:101px;height:41px;object-fit:contain;filter:drop-shadow(0 1px 0 rgba(255,255,255,.9)) drop-shadow(0 2px 3px rgba(31,41,51,.2))}.brand h1{margin:0;color:#1b2633;font-family:Tahoma,Verdana,Arial,Helvetica,sans-serif;font-size:28px;font-weight:700;text-shadow:0 1px 0 #ffffff,0 2px 3px rgba(31,41,51,.18)}.main-nav{display:flex;flex-wrap:wrap;gap:1px;max-width:1400px;margin:0 auto;padding:0 18px;background:#3b4f66}.main-nav button{min-height:34px;padding:7px 13px;border:0;color:#fff;background:#465f7c;cursor:pointer}.main-nav button.active,.main-nav button:hover{background:#243d58}.page-body{max-width:1400px;margin:0 auto;padding:16px 18px 28px}.add-modal-layer{position:fixed;top:0;right:0;bottom:0;left:0;z-index:40;display:flex;align-items:center;justify-content:center;padding:28px;background:#1f293347;-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px)}.add-modal{width:min(860px,calc(100vw - 40px));max-height:calc(100vh - 48px);overflow:hidden;border:1px solid #8da0b5;background:#fff;box-shadow:0 18px 48px #1f293359}.add-modal-header{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:42px;padding:8px 12px;border-bottom:1px solid #b8c5d2;background:#5d7b9d;color:#fff}.add-modal-header h2{margin:0;font-size:16px;font-weight:400}.add-modal-close{width:28px;height:28px;border:1px solid rgba(255,255,255,.65);background:transparent;color:#fff;cursor:pointer}.add-modal-close:hover{background:#ffffff29}.add-modal-body{max-height:calc(100vh - 92px);overflow:auto;padding:14px}.add-modal .entry-title{display:none}.confirm-modal-layer{position:fixed;top:0;right:0;bottom:0;left:0;z-index:60;display:flex;align-items:center;justify-content:center;padding:24px;background:#1f29332e}.confirm-modal{width:min(460px,calc(100vw - 40px));padding:16px;border:1px solid #8f1f2c;background:#fff;box-shadow:0 16px 36px #1f29334d;color:#172334}.confirm-modal h3{margin:0 0 8px;font-size:16px}.confirm-modal p{margin:0 0 12px;line-height:1.35}.confirm-modal-details{display:grid;grid-template-columns:76px minmax(0,1fr);gap:6px 10px;margin-bottom:14px;padding:10px;border:1px solid #d5dde7;background:#f7f6f3;font-size:13px}.confirm-modal-details span:nth-child(odd){color:#5f6b7a}.confirm-modal-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px}.confirm-modal-actions button{min-height:28px;border:1px solid #9aa9bb;background:linear-gradient(#fff,#e7ecf2);cursor:pointer}.confirm-modal-actions button:last-child{border-color:#8f1f2c;color:#8f1f2c;font-weight:700}.export-format-modal .confirm-modal-actions button:last-child{border-color:#9aa9bb;color:#172334;font-weight:400}.export-format-modal .confirm-modal-actions button:nth-child(n+2){min-width:96px}.table-action-button{min-height:28px;border:1px solid #9aa9bb;background:linear-gradient(#fff,#e7ecf2);color:#172334;cursor:pointer}.table-export-toolbar{display:flex;justify-content:flex-end;width:100%;margin:0 0 6px}.table-export-button{display:inline-flex;align-items:center;justify-content:center;width:34px;height:30px;padding:3px;border:1px solid #9aa9bb;background:linear-gradient(#fff,#e7ecf2);cursor:pointer}.table-export-button:hover{background:#dfe7ef}.table-export-button img{width:22px;height:22px;object-fit:contain}.table-link-button{padding:0;border:0;background:transparent;color:#000;cursor:pointer;text-align:left;text-decoration:underline}.table-link-button:hover{text-decoration-thickness:2px}.personnel-profile{position:relative;display:inline-block;outline:none}.personnel-profile-name{text-decoration:underline;text-decoration-style:dotted;text-underline-offset:3px;cursor:help}.personnel-profile-card{position:absolute;left:0;top:calc(100% + 6px);z-index:8;display:none;width:255px;padding:10px 12px;border:1px solid #8da0b5;background:#fff;box-shadow:0 8px 22px #1f29332e;color:#172334}.personnel-profile:hover .personnel-profile-card,.personnel-profile:focus .personnel-profile-card,.personnel-profile:focus-within .personnel-profile-card{display:grid;gap:7px}.personnel-profile-card strong{color:#172334;font-size:14px}.personnel-profile-field{display:grid;grid-template-columns:94px minmax(0,1fr);gap:8px;color:#172334;font-size:12px;line-height:1.25}.personnel-profile-field span:first-child{color:#5f6b7a}.substation-profile-card{width:310px}.substation-profile-field{grid-template-columns:86px minmax(0,1fr)}.home-content{min-width:0}.summary-strip{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:10px}.summary-strip span{border:1px solid #b8c5d2;background:#fff;padding:6px 10px}.main-column{min-width:0}.panel h2,.table-menu-header h2{margin:0;font-size:16px;font-weight:400}.panel{background:#fff}.table-menu-header{display:flex;flex-wrap:wrap;align-items:center;gap:18px;margin-bottom:4px}.table-menu-filters{display:flex;flex-wrap:wrap;align-items:center;gap:12px;font-size:13px}.table-menu-filters label{display:inline-flex;align-items:center;gap:5px}.table-menu-filters input[type=text],.table-menu-filters input:not([type]),.table-menu-filters select{min-height:24px}.table-menu-filters button{min-height:25px;border:1px solid #9aa9bb;background:linear-gradient(#fff,#e7ecf2);cursor:pointer}.blue-divider{height:12px;margin:12px 0;background:#69f}.activity-map-panel{margin-top:12px}.activity-map-field{position:relative;width:100%;height:360px;overflow:hidden;border:1px solid #9aa9bb;background:#dce8f4;cursor:grab;touch-action:none;-webkit-user-select:none;user-select:none}.activity-map-field:active{cursor:grabbing}.activity-map-svg{display:block;width:100%;height:100%}.activity-map-water{fill:#dce8f4}.activity-map-state{fill:#f7f6f3;stroke:#a9b8c9;stroke-linejoin:round;stroke-width:1.1;cursor:pointer}.activity-map-state:hover{fill:#eef2f6}.activity-map-state.selected{fill:#f9fafb;stroke:#7d91aa}.activity-map-point{cursor:pointer;outline:none}.activity-map-point circle:first-child{fill:#c01818;stroke:#fff;stroke-width:3}.activity-map-point circle:last-child{fill:#c0181826;stroke:#c0181859;stroke-width:1}.activity-map-point:hover circle:first-child,.activity-map-point:focus circle:first-child{fill:#8f1f2c}.activity-map-card{position:absolute;z-index:12;display:grid;gap:6px;width:min(320px,calc(100% - 24px));max-height:210px;overflow:auto;padding:10px 12px;border:1px solid #8da0b5;background:#fff;box-shadow:0 8px 22px #1f293333;color:#172334;pointer-events:none}.activity-map-card strong{color:#172334;font-size:14px}.activity-map-card span{color:#172334;font-size:12px;line-height:1.3}.activity-map-card-list{display:grid;gap:4px;padding-top:4px;border-top:1px solid #d5dde7}.incident-summary-controls{display:flex;flex-wrap:wrap;align-items:flex-start;gap:8px;padding:12px 0}.incident-summary-controls label{display:inline-flex;align-items:center;gap:5px}.incident-summary-controls button,.incident-summary-controls select,.incident-summary-controls input{min-height:26px}.incident-summary-controls button{min-width:64px;border:1px solid #9aa9bb;background:linear-gradient(#fff,#e7ecf2);cursor:pointer}.incident-section-divider{border-bottom:4px double #000000;margin-bottom:12px}.table-section-title{margin:14px 0 2px;font-size:14px;font-weight:400}.placeholder-panel{padding:18px}.table-scroll{width:100%;max-height:500px;overflow:auto}.data-grid{width:100%;min-width:760px;border-collapse:collapse;color:#333}.data-grid th,.data-grid td{padding:6px 7px;text-align:left;vertical-align:top;border:0}.data-grid th{position:sticky;top:0;z-index:2;background:#5d7b9d;color:#fff;font-weight:400}.data-grid th.sorted-column{background:#6b87a8}.sort-header{display:inline-flex;align-items:center;justify-content:flex-start;gap:6px;width:100%;min-height:20px;padding:0;border:0;background:transparent;color:inherit;text-align:left;cursor:pointer}.sort-header:hover span:first-child{text-decoration:underline}.sort-indicator{width:13px;height:13px;margin-left:auto;object-fit:contain;opacity:.9;filter:invert(1);flex:0 0 auto}.data-grid tbody tr:nth-child(odd){background:#f7f6f3}.data-grid tbody tr:nth-child(2n){background:#fff}.data-grid tbody td{color:#000}.data-grid tbody td.sorted-column{background:#5d7b9d1f;box-shadow:inset 1px 0 #5d7b9d2e,inset -1px 0 #5d7b9d2e}.data-grid tbody tr.overstayed-row td,.data-grid tbody tr.overstayed-row .table-link-button{color:#c01818}.data-grid tbody tr.overstayed-row .table-action-button{color:#172334}.data-grid tbody tr.critical-overstayed-row td,.data-grid tbody tr.critical-overstayed-row .table-link-button{font-weight:700}.data-grid tbody tr.critical-overstayed-row .table-action-button{font-weight:400}.data-grid tbody tr.overstayed-row .personnel-profile-card,.data-grid tbody tr.overstayed-row .personnel-profile-card span,.data-grid tbody tr.overstayed-row .personnel-profile-card strong{color:#172334;font-weight:400}.data-grid tbody tr.overstayed-row .personnel-profile-field span:first-child{color:#5f6b7a}.data-grid tbody tr.overstayed-row .personnel-profile-card strong{font-weight:700}.center-cell{text-align:center}.empty-cell{text-align:center;color:#5f6b7a}.status-message{padding:18px;border:1px solid #b8c5d2;background:#fff}.status-message.error{border-color:#c83e4d;color:#8f1f2c}.reports-panel{min-height:420px}.reports-layout{display:grid;grid-template-columns:170px minmax(0,1fr);gap:18px}.reports-menu{display:flex;flex-direction:column;gap:4px;padding-right:12px;border-right:1px solid #b8c5d2}.reports-menu button{min-height:32px;border:1px solid #9aa9bb;background:linear-gradient(#fff,#e7ecf2);color:#172334;text-align:left;cursor:pointer}.reports-menu button.active,.reports-menu button:hover{background:#5d7b9d;color:#fff}.reports-content{min-width:0}.report-date-filter{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-bottom:10px;padding-bottom:8px;border-bottom:1px solid #d5dde7;font-size:13px}.report-date-filter label{display:inline-flex;align-items:center;gap:6px}.report-date-filter input,.report-date-filter button{min-height:26px}.report-date-filter button{border:1px solid #9aa9bb;background:linear-gradient(#fff,#e7ecf2);color:#172334;cursor:pointer}.report-date-filter button.active{background:#5d7b9d;color:#fff}.report-column-filter{display:flex;flex-wrap:wrap;align-items:flex-start;gap:8px;margin-bottom:10px;font-size:13px}.report-column-filter-field,.report-query-label{display:inline-flex;align-items:center;gap:6px;min-height:30px}.report-column-filter select,.report-column-filter input,.report-column-filter button{min-height:26px}.report-column-filter select{border:1px solid #9aa9bb;background:#fff}.report-query-box{display:flex;flex:1 1 360px;flex-wrap:wrap;align-items:center;gap:5px;min-height:30px;min-width:260px;padding:3px 5px;border:1px solid #9aa9bb;background:#fff;box-shadow:inset 0 1px 2px #1f29331a}.report-query-token{display:inline-flex;align-items:center;gap:5px;max-width:100%;min-height:22px;padding:2px 4px 2px 7px;border:1px solid #8da0b5;background:linear-gradient(#f8fafc,#dfe7ef);color:#172334}.report-query-token span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.report-query-token button{width:18px;min-height:18px;padding:0;border:1px solid #a8b5c5;background:#fff;color:#172334;line-height:1;cursor:pointer}.report-query-input-wrap{position:relative;flex:1 1 160px;min-width:140px}.report-query-input-wrap input{width:100%;min-width:0;border:0;outline:0;background:transparent}.report-query-suggestions{position:absolute;z-index:20;top:calc(100% + 5px);left:0;width:min(360px,80vw);max-height:220px;overflow:auto;border:1px solid #8da0b5;background:#fff;box-shadow:0 8px 18px #1f293338}.report-query-suggestions button{display:block;width:100%;min-height:28px;padding:5px 8px;border:0;border-bottom:1px solid #e1e7ef;background:#fff;color:#172334;text-align:left;cursor:pointer}.report-query-suggestions button.active,.report-query-suggestions button:hover{background:#5d7b9d;color:#fff}.report-query-clear{border:1px solid #9aa9bb;background:linear-gradient(#fff,#e7ecf2);color:#172334;cursor:pointer}.entry-panel{background:#fff}.entry-form{width:100%;border-collapse:collapse}.entry-form th,.entry-form td{height:35px;padding:6px 8px;text-align:left;vertical-align:middle}.entry-form th{width:15%;min-width:150px;background:#9cf;font-weight:400}.entry-title{font-size:18px;padding:10px 8px}.entry-form select{min-width:310px;max-width:520px}.entry-form input[type=text],.entry-form input[type=tel]{width:306px;max-width:100%;height:25px}.entry-form textarea{width:439px;max-width:100%;height:106px;resize:vertical}.entry-form .crew-select{min-width:54px;width:54px}.field-note,.bes-note,.form-result{display:inline-block;margin-left:12px}.field-note{color:#4b5a69}.bes-note,.checkbox-field strong,.error-text{color:#b00020}.checkbox-field{display:inline-flex;align-items:center;gap:8px}.button-cell{text-align:center}.button-cell button{min-height:27px;min-width:68px;border:1px solid #9aa9bb;background:linear-gradient(#fff,#e7ecf2);cursor:pointer}.button-cell button:disabled{cursor:default;opacity:.65}.substation-form input[type=text],.substation-form input[type=tel]{width:196px}.table-menu-list{width:98%}.session-action-panel{margin-bottom:10px}.session-action-panel table{width:450px;max-width:100%;border-collapse:collapse;background:#fff}.session-action-panel th,.session-action-panel td{border:1px solid #333333;padding:4px;text-align:left;vertical-align:middle}.session-action-panel th{width:142px;background:#9cf;font-weight:400}.session-action-panel button{width:130px;min-height:26px;border:1px solid #9aa9bb;background:linear-gradient(#fff,#e7ecf2);cursor:pointer}.session-action-panel select{width:81px;height:25px}.session-action-panel input[type=text]{width:255px;max-width:100%}.session-title{border-bottom:1px solid #333333;font-weight:400}.database-tool-layer{position:fixed;top:0;right:0;bottom:0;left:0;z-index:80;padding:18px;background:#1f29335c}.database-tool{display:flex;flex-direction:column;width:min(1500px,calc(100vw - 36px));height:calc(100vh - 36px);margin:0 auto;border:1px solid #7d91aa;background:#eef2f6;box-shadow:0 18px 48px #1f293361}.database-tool-header{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:52px;padding:8px 12px;border-bottom:1px solid #8da0b5;background:linear-gradient(#f8fafc,#cbd4df)}.database-tool-header h2{margin:0;font-size:16px;font-weight:700}.database-tool-header span{display:block;margin-top:2px;color:#4b5a69;font-size:12px}.database-tool-actions{display:flex;gap:8px}.database-tool-actions button,.database-tool-toolbar button{min-height:28px;border:1px solid #8da0b5;background:linear-gradient(#fff,#dfe7ef);color:#172334;cursor:pointer}.database-tool-actions button:disabled{cursor:default;opacity:.65}.database-tool-actions button:first-child{min-width:96px;border-color:#45627f;font-weight:700}.database-tool-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:12px;padding:10px 12px;border-bottom:1px solid #c7d1dd;background:#fff;font-size:13px}.database-tool-toolbar label{display:inline-flex;align-items:center;gap:6px}.database-tool-toolbar select{min-width:260px;min-height:26px;border:1px solid #9aa9bb;background:#fff}.database-tool-grid-wrap{flex:1;min-height:0;overflow:auto;background:#fff}.database-tool-grid{width:max-content;min-width:100%;border-collapse:collapse;font-size:12px}.database-tool-grid th,.database-tool-grid td{border:1px solid #c7d1dd;padding:0;text-align:left;vertical-align:top}.database-tool-grid th{position:sticky;top:0;z-index:2;min-width:130px;padding:5px 6px;background:#5d7b9d;color:#fff;font-weight:400;white-space:nowrap}.database-tool-grid th span{color:#f7f6f3;font-size:10px}.database-tool-grid input{width:100%;min-width:130px;min-height:28px;padding:4px 6px;border:0;background:transparent;color:#111827}.database-tool-grid input:focus{outline:2px solid #45627f;outline-offset:-2px;background:#fff}.database-tool-grid input:disabled{background:#eef2f6;color:#4b5a69}.database-tool-grid td.dirty-cell{background:#fff4c2;box-shadow:inset 0 0 0 1px #d6a928}.database-tool-loading-more{padding:10px;border-top:1px solid #c7d1dd;background:#eef2f6;color:#4b5a69;text-align:center}@media(max-width:560px){.brand{align-items:flex-start;flex-direction:column}.brand h1{font-size:22px}.entry-form,.entry-form tbody,.entry-form tr,.entry-form th,.entry-form td{display:block;width:100%}.entry-form th{min-width:0}.entry-form select{min-width:0;width:100%}}
