:root{--blue:#0b63ce;--dark:#123;--bg:#eef3f9;--panel:#fff;--muted:#667;--danger:#b00020}*{box-sizing:border-box}body{margin:0;font-family:Segoe UI,Arial,sans-serif;background:var(--bg);color:#17212b}.hidden{display:none!important}.login-screen{min-height:100vh;display:grid;place-items:center;background:linear-gradient(135deg,#003b7a,#0b63ce)}.login-card{width:min(430px,92vw);background:#fff;border-radius:18px;padding:24px;box-shadow:0 22px 70px #001b3b55}.brand{display:flex;gap:14px;align-items:center;margin-bottom:18px}.brand h1{margin:0;font-size:28px}.brand p{margin:2px 0;color:#667}.shield,.avatar{width:62px;height:62px;border-radius:50%;display:grid;place-items:center;background:#e7f1ff;color:#0b63ce;font-size:28px;font-weight:700}.login-card label,.dialog-form label,.panel label{display:block;margin-top:12px;font-weight:600}input,select,textarea{width:100%;padding:9px 10px;border:1px solid #cbd5e1;border-radius:8px;font:inherit;background:#fff}.password-row{display:flex;gap:6px}.password-row input{flex:1}.password-row button{width:48px}button{border:1px solid #cbd5e1;background:#fff;padding:9px 13px;border-radius:8px;cursor:pointer;font:inherit}button:hover{filter:brightness(.97)}button.primary{background:#0b63ce;color:#fff;border-color:#0b63ce}button.danger,.nav.danger{color:#b00020}.error{margin-top:12px;color:#b00020;white-space:pre-wrap}.about-small{margin-top:16px;color:#667;font-size:12px}.app{display:flex;min-height:100vh}.sidebar{width:280px;background:#083e7d;color:#fff;padding:18px;display:flex;flex-direction:column;gap:8px}.profile{display:flex;gap:12px;align-items:center;border-bottom:1px solid #ffffff33;padding-bottom:18px;margin-bottom:8px}.profile span{display:block;color:#cfe3ff;margin-top:3px}.profile .avatar{background:#fff;color:#0b63ce;overflow:hidden}.avatar img{width:100%;height:100%;object-fit:cover}.nav{text-align:left;background:transparent;color:#fff;border:0;border-radius:10px;padding:12px}.nav.active,.nav:hover{background:#ffffff22}main{flex:1;padding:22px;overflow:auto}header{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px}header h2{margin:0}.server-status{font-size:13px;padding:7px 12px;border-radius:999px;background:#dff7e8;color:#0b6b2b}.server-status.offline{background:#ffe1e1;color:#9b111e}.toolbar{display:flex;gap:10px;align-items:center;margin-bottom:12px;flex-wrap:wrap}.cards{display:grid;gap:12px}.incident-card{padding:14px;border-radius:14px;background:#fff;box-shadow:0 2px 8px #0001;border-left:8px solid #cbd5e1}.incident-card.overdue{background:#D50000;color:#fff;border-left-color:#720000}.incident-card.green{background:#C8E6C9}.incident-card.yellow{background:#FFE082}.incident-card.urgent,.incident-card.red,.incident-card.orange,.incident-card.blue{background:#FFE082}.card-title{font-weight:800;font-size:17px}.meta{display:flex;gap:14px;flex-wrap:wrap;margin-top:8px}.note-line{margin-top:8px;font-weight:800}.actions{margin-top:10px;display:flex;gap:8px;flex-wrap:wrap}.users-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:12px}.user-card{background:#fff;border-radius:14px;padding:14px;display:flex;gap:12px;box-shadow:0 2px 8px #0001}.user-card img{width:64px;height:64px;border-radius:12px;object-fit:cover;background:#e5e7eb}.muted{color:#667}.panel,.table-wrap{background:#fff;border-radius:14px;padding:16px;box-shadow:0 2px 8px #0001}.table-wrap{overflow:auto}table{border-collapse:collapse;width:100%;background:#fff}th,td{border-bottom:1px solid #e5e7eb;padding:9px;text-align:left;vertical-align:top}dialog{border:0;border-radius:16px;padding:0;box-shadow:0 20px 70px #0005;width:min(640px,94vw)}.dialog-form{padding:20px}.dialog-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:16px}.photo-preview{max-width:100px;max-height:100px;border-radius:12px;margin-top:8px;display:none}.filters input,.filters select{width:auto;min-width:150px}@media(max-width:760px){.app{display:block}.sidebar{width:auto}.profile{align-items:flex-start}main{padding:14px}.toolbar{align-items:stretch}.toolbar>*{width:100%}}

.page-brand{display:flex;align-items:center;justify-content:center;gap:12px;margin:0 0 18px 0;padding:12px 16px;background:#fff;border-radius:16px;box-shadow:0 2px 8px #0001;text-align:center}.page-brand-logo{width:26px;height:26px;object-fit:contain}.page-brand-title{font-size:28px;line-height:1.1;font-weight:800;letter-spacing:.5px;color:#083e7d}.page-brand-subtitle{font-size:13px;color:#667;margin-top:3px}.tab{display:none}.tab.active{display:block}

header h2#pageTitle{font-size:24px;font-weight:800;color:#17212b}

main > section.tab{display:none!important} main > section.tab.active{display:block!important}

.last-activity{font-size:12px;color:#0b63ce;margin-top:4px}
@media(prefers-color-scheme:dark){.last-activity{color:#ffd54f}}

/* AIMS 15D web alignment */
.login-logo{width:62px;height:62px;border-radius:16px;object-fit:contain;background:#e7f1ff;padding:6px}.remember-row{display:flex!important;align-items:center;gap:8px;font-weight:500!important}.remember-row input{width:auto}.page-brand-logo{width:52px!important;height:52px!important}.report-filters{align-items:flex-end}.report-filters label{font-weight:600}.report-actions{white-space:nowrap}.report-actions button{margin:2px}#reportTable th[data-sort]{cursor:pointer;color:#083e7d}.detail-dialog{width:min(980px,96vw)}.detail-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:8px 14px}.attachments-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:12px}.attachment-item{border:1px solid #e5e7eb;border-radius:12px;padding:8px;background:#f8fafc}.thumb{max-width:100%;max-height:220px;border-radius:10px;object-fit:contain;background:#e5e7eb}audio{width:100%}


/* AIMS web incident card/report UX fixes 2026-04-23 */
.list-count{font-weight:800;margin:4px 0 12px 0;color:#17212b;background:#fff;border-radius:12px;padding:10px 14px;box-shadow:0 2px 8px #0001;display:inline-block}
.incident-card.archived{background:#e9ecef;color:#17212b;border-left-color:#9aa4b2}
.incident-card.red{background:#D50000;color:#fff;border-left-color:#720000}
.report-row.green td{background:#C8E6C9}.report-row.yellow td{background:#FFE082}.report-row.red td{background:#D50000;color:#fff}.report-row.archived td{background:#e9ecef;color:#17212b}.report-row.red .muted{color:#fff}.report-row.archived .muted{color:#667}.report-row td:first-child{border-left:8px solid #cbd5e1}.report-row.green td:first-child{border-left-color:#2e7d32}.report-row.yellow td:first-child{border-left-color:#b98900}.report-row.red td:first-child{border-left-color:#720000}.report-row.archived td:first-child{border-left-color:#9aa4b2}
#webIncidentDetailDialog{width:min(1280px,98vw);max-width:98vw;max-height:94vh;border-radius:18px;overflow:hidden}
#webIncidentDetailDialog::backdrop{background:rgba(0,0,0,.45)}
#webIncidentDetailDialog .detail-dialog{width:100%;max-height:94vh;overflow-y:auto;overflow-x:hidden;margin:0;border-radius:18px;background:#fff;scrollbar-gutter:stable;padding:20px 22px;overscroll-behavior:contain}
#webIncidentDetailDialog.green .detail-dialog{background:#C8E6C9}#webIncidentDetailDialog.yellow .detail-dialog{background:#FFE082}#webIncidentDetailDialog.red .detail-dialog{background:#D50000;color:#fff}#webIncidentDetailDialog.archived .detail-dialog{background:#e9ecef;color:#17212b}
.detail-dialog-header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}.detail-dialog-header h3{margin:0}.dialog-close-top{white-space:nowrap}.detail-grid{grid-template-columns:repeat(auto-fit,minmax(300px,1fr));overflow-wrap:anywhere}.detail-table-wrap{max-width:100%;overflow-x:hidden;background:rgba(255,255,255,.72)}#webIncidentDetailDialog .table-wrap table{min-width:0;table-layout:fixed}#webIncidentDetailDialog .table-wrap th,#webIncidentDetailDialog .table-wrap td{overflow-wrap:anywhere;word-break:break-word}#webIncidentDetailDialog .attachments-grid{max-width:100%;overflow:hidden}#webIncidentDetailDialog .attachment-item{overflow:hidden}#webIncidentDetailDialog.red .attachment-item,#webIncidentDetailDialog.red .table-wrap{color:#17212b}#webIncidentDetailDialog.red button{color:#17212b}
@media(max-width:760px){#webIncidentDetailDialog{width:98vw;max-height:96vh}#webIncidentDetailDialog .detail-dialog{max-height:96vh;padding:16px}.detail-dialog-header{align-items:flex-start}.detail-dialog-header h3{font-size:18px}.dialog-close-top{padding:8px 10px}.detail-grid{grid-template-columns:1fr}}

/* AIMS 15I / 2026-04-23-18 additional UX fixes */
header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
}
header h2#pageTitle {
  justify-self: center;
  text-align: center;
  font-size: 48px;
  line-height: 1.05;
  margin: 0;
}
header .server-status {
  justify-self: end;
}
.page-brand {
  gap: 22px;
  padding: 18px 24px;
}
.page-brand-logo {
  width: 104px !important;
  height: 104px !important;
}
.page-brand-title {
  font-size: 56px;
}
.page-brand-subtitle {
  font-size: 26px;
}
.export-menu {
  position: relative;
  display: inline-block;
}
.export-menu summary {
  list-style: none;
  border: 1px solid #cbd5e1;
  background: #fff;
  padding: 9px 13px;
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
}
.export-menu summary::-webkit-details-marker {
  display: none;
}
.export-menu[open] summary {
  box-shadow: 0 2px 8px #0001;
}
.export-menu-list {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 160px;
  background: #fff;
  border: 1px solid #dbe1ea;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .14);
  padding: 8px;
  display: grid;
  gap: 6px;
  z-index: 20;
}
.export-menu-list button {
  width: 100%;
  text-align: left;
}
.report-attachments {
  margin-top: 14px;
  display: grid;
  gap: 8px;
}
.protocol-dialog-form {
  width: min(980px, 96vw);
}
.export-actions-block {
  margin: 14px 0 6px;
}
.report-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
#reportTable td.report-actions {
  white-space: normal;
}
@media (max-width: 900px) {
  header h2#pageTitle {
    font-size: 34px;
  }
  .page-brand-logo {
    width: 72px !important;
    height: 72px !important;
  }
  .page-brand-title {
    font-size: 38px;
  }
  .page-brand-subtitle {
    font-size: 20px;
  }
}
@media (max-width: 760px) {
  header {
    grid-template-columns: 1fr;
  }
  header h2#pageTitle,
  header .server-status {
    justify-self: center;
  }
  header h2#pageTitle {
    font-size: 28px;
  }
  .page-brand {
    gap: 14px;
  }
  .page-brand-logo {
    width: 56px !important;
    height: 56px !important;
  }
  .page-brand-title {
    font-size: 28px;
  }
  .page-brand-subtitle {
    font-size: 16px;
  }
  .export-menu-list {
    right: auto;
    left: 0;
  }
}

/* AIMS 15J / 2026-04-23-20-30 */
.settings-grid{display:grid;gap:16px}.settings-block{padding:4px 0}.backup-list{display:grid;gap:10px;margin-top:12px}.backup-item{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px;border:1px solid #dbe1ea;border-radius:12px;background:#f8fafc}.attachment-preview-slot{display:grid;place-items:center;min-height:120px;background:#f8fafc;border:1px dashed #cbd5e1;border-radius:10px;padding:10px;text-align:center}.protocol-dialog-form .dialog-actions{margin-top:12px}.settings-block .remember-row{margin-top:8px}.settings-block .remember-row input{width:auto}.rework-help{font-size:12px;color:#667}
.mobile-audio{display:grid;gap:10px;padding:12px;border:1px dashed #cbd5e1;border-radius:12px;background:#f8fafc}.mobile-audio-title{font-weight:700}.mobile-audio-controls{display:flex;gap:8px;flex-wrap:wrap}.mobile-audio-status{font-size:13px}.mobile-audio audio{width:100%}

:root[data-theme="dark"]{--bg:#0B1118;--panel:#131C26;--text:#EAF2F8;--muted:#B7C7D8;--border:#526679;--soft:#1B2733;--input:#1B2733;--header:#101923;--accent:#80CBC4;--accent-contrast:#05201E;--error:#FF8A80}
:root[data-theme="dark"] body{background:var(--bg);color:var(--text)}
:root[data-theme="dark"] .sidebar{background:var(--header);color:var(--text)}
:root[data-theme="dark"] .profile{border-bottom-color:#314254}
:root[data-theme="dark"] .profile span{color:var(--muted)}
:root[data-theme="dark"] .nav{color:var(--text)}
:root[data-theme="dark"] .nav.active,:root[data-theme="dark"] .nav:hover{background:#1B2733}
:root[data-theme="dark"] .shield,:root[data-theme="dark"] .avatar{background:#1B2733;color:var(--accent)}
:root[data-theme="dark"] .profile .avatar{background:#1B2733}
:root[data-theme="dark"] .login-card,
:root[data-theme="dark"] .page-brand,
:root[data-theme="dark"] .panel,
:root[data-theme="dark"] .table-wrap,
:root[data-theme="dark"] .user-card,
:root[data-theme="dark"] .list-count,
:root[data-theme="dark"] .backup-item,
:root[data-theme="dark"] .attachment-item,
:root[data-theme="dark"] .attachment-preview-slot,
:root[data-theme="dark"] .mobile-audio,
:root[data-theme="dark"] #webIncidentDetailDialog .detail-dialog,
:root[data-theme="dark"] #webIncidentDetailDialog.archived .detail-dialog{background:var(--panel)!important;color:var(--text)}
:root[data-theme="dark"] input,
:root[data-theme="dark"] select,
:root[data-theme="dark"] textarea,
:root[data-theme="dark"] button,
:root[data-theme="dark"] .export-menu summary{background:var(--input);color:var(--text);border-color:var(--border)}
:root[data-theme="dark"] input::placeholder,:root[data-theme="dark"] textarea::placeholder{color:#91A4B7}
:root[data-theme="dark"] button.primary{background:var(--accent);color:var(--accent-contrast);border-color:var(--accent)}
:root[data-theme="dark"] button.danger,:root[data-theme="dark"] .nav.danger{color:var(--error)}
:root[data-theme="dark"] .muted,
:root[data-theme="dark"] .about-small,
:root[data-theme="dark"] .brand p,
:root[data-theme="dark"] .page-brand-subtitle,
:root[data-theme="dark"] .last-activity,
:root[data-theme="dark"] .rework-help{color:var(--muted)!important}
:root[data-theme="dark"] .page-brand-title,
:root[data-theme="dark"] header h2#pageTitle,
:root[data-theme="dark"] .card-title{color:var(--text)}
:root[data-theme="dark"] th,
:root[data-theme="dark"] td{border-bottom-color:var(--border)}
:root[data-theme="dark"] table{background:transparent}
:root[data-theme="dark"] .backup-item,
:root[data-theme="dark"] .attachment-preview-slot,
:root[data-theme="dark"] .attachment-item,
:root[data-theme="dark"] .export-menu-list{border-color:var(--border);background:var(--soft)}
:root[data-theme="dark"] .export-menu-list button{background:var(--input)}
:root[data-theme="dark"] #reportTable th[data-sort]{color:var(--accent)}
:root[data-theme="dark"] .server-status{background:#223140;color:var(--text)}
:root[data-theme="dark"] .server-status.offline{background:#5A2328;color:#fff}
:root[data-theme="dark"] .report-row.archived td{background:#1F2937;color:var(--text)}
:root[data-theme="dark"] .incident-card.archived{background:#1F2937;color:var(--text);border-left-color:#6B7F91}
:root[data-theme="dark"] #webIncidentDetailDialog.yellow .detail-dialog{background:#5b4a16!important;color:#fff}
:root[data-theme="dark"] #webIncidentDetailDialog.green .detail-dialog{background:#183b25!important;color:#fff}
:root[data-theme="dark"] #webIncidentDetailDialog.red .detail-dialog{background:#7f1d1d!important;color:#fff}
:root[data-theme="dark"] #webIncidentDetailDialog.red button,
:root[data-theme="dark"] #webIncidentDetailDialog.yellow button,
:root[data-theme="dark"] #webIncidentDetailDialog.green button{color:#17212b}
.incident-card.red button,.incident-card.red .export-menu summary,.report-row.red button,.report-row.red .export-menu summary{color:#17212b}



/* AIMS 15M / 2026-04-24 share + urgent + reports layout */
.detail-dialog-header-actions{display:flex;align-items:center;gap:10px}.share-inline-btn{width:22px;height:22px;padding:0;display:grid;place-items:center;border:none!important;background:transparent!important;box-shadow:none!important;color:inherit;font-size:inherit;line-height:1}.share-inline-btn:hover{filter:brightness(1.03);transform:translateY(-1px)}.share-inline-icon{display:block;width:100%;height:100%;object-fit:contain;pointer-events:none}.detail-layout{position:relative;padding-bottom:10px}.detail-layout-urgent{padding-bottom:86px}.detail-urgent-badge,.card-urgent-badge{position:absolute;right:10px;bottom:10px;display:flex;flex-direction:column;align-items:center;gap:2px;font-weight:800;z-index:2}.detail-urgent-mark,.card-urgent-mark{width:42px;height:42px;display:grid;place-items:center;border-radius:999px;border:2px solid currentColor;background:rgba(255,255,255,.18);font-size:30px;line-height:1;box-shadow:0 4px 14px rgba(0,0,0,.15)}.detail-urgent-text,.card-urgent-text{font-size:11px;letter-spacing:.3px;text-transform:lowercase}.report-actions-row{display:flex;align-items:center;gap:8px;flex-wrap:nowrap}.report-desc-cell{width:28%;max-width:260px;overflow-wrap:anywhere}#reportTable td.report-actions{white-space:nowrap;width:1%}.incident-card.red button,.incident-card.red .export-menu summary,.report-row.red button,.report-row.red .export-menu summary,#webIncidentDetailDialog.red button:not(.share-inline-btn),#webIncidentDetailDialog.red .export-menu summary,#webIncidentDetailDialog.yellow button:not(.share-inline-btn),#webIncidentDetailDialog.yellow .export-menu summary,#webIncidentDetailDialog.green button:not(.share-inline-btn),#webIncidentDetailDialog.green .export-menu summary{background:#fff;color:#17212b!important;border-color:#fff;font-weight:600}#webIncidentDetailDialog.red .detail-urgent-mark{background:rgba(255,255,255,.12)}#webIncidentDetailDialog.green .detail-urgent-mark,#webIncidentDetailDialog.yellow .detail-urgent-mark,#webIncidentDetailDialog.archived .detail-urgent-mark{background:rgba(255,255,255,.74)}.incident-card-list{position:relative;padding-top:16px;padding-right:46px}.card-title-with-share{padding-right:8px}.card-share-btn{position:absolute;top:12px;right:12px;z-index:3}.incident-card-has-urgent{padding-bottom:82px}.incident-card-list.red .card-urgent-mark{background:rgba(255,255,255,.12)}.incident-card-list.yellow .card-urgent-mark,.incident-card-list.green .card-urgent-mark,.incident-card-list.archived .card-urgent-mark{background:rgba(255,255,255,.78)}
@media(max-width:900px){.report-actions-row{flex-wrap:wrap}#reportTable td.report-actions{white-space:normal}.report-desc-cell{max-width:220px}}
:root[data-theme="dark"] .share-inline-btn{background:transparent!important;color:inherit;border:none!important}:root[data-theme="dark"] #webIncidentDetailDialog.red .share-inline-btn,:root[data-theme="dark"] #webIncidentDetailDialog.yellow .share-inline-btn,:root[data-theme="dark"] #webIncidentDetailDialog.green .share-inline-btn{background:transparent!important;color:inherit;border:none!important}

/* AIMS 15O / 2026-04-24 regular tasks */
.regular-task-card{position:relative;padding:14px;border-radius:14px;background:#dff3ff;box-shadow:0 2px 8px #0001;border-left:8px solid #82cfff}.regular-task-card.inactive{opacity:.82;background:#eef7fc;border-left-color:#b7d9ef}.regular-task-card .card-title{padding-right:6px}.regular-task-card .actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}.regular-task-chip{display:inline-block;padding:2px 8px;border-radius:999px;background:#fff;border:1px solid #b7d9ef;font-size:12px;font-weight:700}.regular-task-meta{display:flex;gap:12px;flex-wrap:wrap;margin-top:8px}.regular-task-toolbar{justify-content:flex-start}.regular-task-help{font-size:12px;color:#667}.cards .regular-task-card .share-inline-btn{display:none}.task-status-active{color:#0b6b2b;font-weight:700}.task-status-inactive{color:#9b111e;font-weight:700}
:root[data-theme="dark"] .regular-task-card{background:#153246;border-left-color:#4ea7d8;color:var(--text)}
:root[data-theme="dark"] .regular-task-card.inactive{background:#182635;border-left-color:#466173;color:var(--text)}
:root[data-theme="dark"] .regular-task-chip{background:#203345;border-color:var(--border);color:var(--text)}
