:root {
  font-family: Inter, "Segoe UI", sans-serif;
  color: #202326;
  background: #f2f4f5;
  letter-spacing: 0;
}
* { box-sizing: border-box; }
body { margin: 0; }
header {
  height: 88px; padding: 18px 28px; background: #181b1d; color: white;
  display: flex; align-items: center; justify-content: space-between;
}
h1 { margin: 2px 0 0; font-size: 25px; font-weight: 650; }
.eyebrow { margin: 0; color: #b7c0c5; font-size: 12px; }
.mode { border: 1px solid #75d6a0; color: #8ee9b5; padding: 7px 11px; border-radius: 6px; font-size: 13px; }
main { display: grid; grid-template-columns: 278px 1fr; min-height: calc(100vh - 88px); }
aside { padding: 18px; background: white; border-right: 1px solid #dde1e3; }
aside section { padding: 0 0 20px; margin-bottom: 20px; border-bottom: 1px solid #e7eaeb; }
h2 { font-size: 14px; margin: 0 0 14px; }
label { display: block; margin-bottom: 12px; color: #697178; font-size: 12px; }
input { width: 100%; padding: 9px; border: 1px solid #d9dfe1; margin-top: 5px; }
button { padding: 9px 13px; border: 1px solid #cbd1d4; background: white; cursor: pointer; border-radius: 5px; }
button:disabled { opacity: .45; cursor: default; }
button.primary { color: white; border-color: #7554d8; background: #7554d8; }
.actions { display: grid; gap: 8px; }
#selected, .safety p { color: #687078; font-size: 12px; line-height: 1.5; }
.content { padding: 20px; min-width: 0; }
.statusbar { display: grid; grid-template-columns: repeat(4, 1fr); background: white; border: 1px solid #dde2e4; }
.statusbar div { padding: 14px; border-right: 1px solid #e3e6e8; }
.statusbar div:last-child { border: 0; }
.statusbar span { display: block; color: #737b81; font-size: 11px; margin-bottom: 4px; }
.statusbar strong { font-size: 13px; }
.current-photo {
  display: grid; grid-template-columns: 116px 1fr; gap: 16px; align-items: center;
  margin-top: 12px; padding: 14px; background: white; border: 2px solid #7554d8;
}
.current-photo img { width: 116px; height: 154px; object-fit: cover; background: #edf0f1; }
.current-photo span { display: block; color: #7554d8; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.current-photo strong { display: block; margin-top: 4px; font-size: 20px; }
.current-photo p { margin: 6px 0 12px; color: #687078; font-size: 12px; }
.current-photo small { color: #687078; font-size: 11px; }
.progress { height: 8px; margin-bottom: 5px; overflow: hidden; background: #eceff0; border-radius: 4px; }
.progress div { height: 100%; background: #7554d8; transition: width .25s ease; }
tr.is-current td { background: #f2effd; border-bottom-color: #c9bdf1; }
tr.is-current td:first-child { box-shadow: inset 4px 0 #7554d8; font-weight: 700; }
nav { margin-top: 20px; border-bottom: 1px solid #d7dcde; }
.tab { border: 0; background: transparent; border-radius: 0; }
.tab.active { border-bottom: 2px solid #7554d8; color: #5a3bb8; }
.panel { display: none; margin-top: 12px; background: white; border: 1px solid #dde2e4; overflow: auto; }
.panel.active { display: block; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th { text-align: left; color: #677078; font-weight: 600; background: #f7f8f8; }
th, td { padding: 11px 10px; border-bottom: 1px solid #e5e8e9; white-space: nowrap; }
.photo-cell { position: relative; width: 64px; min-width: 64px; }
.thumb { width: 44px; height: 58px; object-fit: cover; background: #edf0f1; }
.photo-view {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid #bfc7cc;
  border-radius: 50%;
  background: #ffffff;
  color: #202326;
  font-size: 17px;
  line-height: 24px;
  box-shadow: 0 2px 8px rgba(20, 23, 26, .18);
}
.photo-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 18, 20, .72);
}
.photo-modal[hidden] { display: none; }
.photo-modal-card {
  max-width: min(92vw, 840px);
  max-height: 92vh;
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 18px 60px rgba(0, 0, 0, .35);
}
.photo-modal-card img {
  display: block;
  width: 100%;
  max-height: 82vh;
  object-fit: contain;
  background: #111416;
}
.photo-modal-caption {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
}
.photo-modal-caption span { color: #687078; font-size: 12px; }
.photo-modal-close {
  position: fixed;
  top: 18px;
  right: 18px;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #ffffff;
  font-size: 26px;
  line-height: 36px;
}
.empty { text-align: center; color: #858d92; padding: 42px; }
.danger { color: #a43c3c; border-color: #dfb8b8; padding: 5px 8px; }
.restore { color: #176b42; border-color: #9fd1b8; background: #f0faf5; padding: 5px 8px; }
@media (max-width: 1050px) {
  main { grid-template-columns: 240px 1fr; }
  .statusbar { grid-template-columns: repeat(2, 1fr); }
}
.lock-banner { margin: 12px 20px 0; padding: 10px 14px; border: 1px solid #e0a3a3; border-radius: 6px; color: #8a2b2b; background: #fdeeee; font-size: 14px; }
.lock-banner[hidden] { display: none; }
.header-right { display: flex; align-items: center; gap: 12px; }
.user-name { color: #b7c0c5; font-size: 13px; }
.logout { padding: 6px 10px; color: white; background: transparent; border-color: #5b6266; }
.propose { padding: 6px 12px; color: white; background: #7554d8; border-color: #7554d8; font-weight: 600; }
textarea { width: 100%; padding: 9px; border: 1px solid #d9dfe1; margin-top: 5px; font: inherit; color: #202326; }
.requests { padding: 16px; }
.request-result { color: #687078; font-size: 12px; }
.requests-list { list-style: none; margin: 16px 0 0; padding: 0; }
.requests-list li { padding: 12px 0; border-top: 1px solid #e5e8e9; font-size: 13px; }
.requests-list p { margin: 6px 0 0; white-space: pre-wrap; }
.request-head { color: #687078; font-size: 12px; }
.request-status { font-weight: 600; }
.request-done { color: #176b42; }
.request-declined { color: #a43c3c; }
.request-answer { padding: 8px 10px; background: #f2effd; border-left: 3px solid #7554d8; }
.auth-page { display: grid; place-items: center; min-height: 100vh; padding: 16px; }
.auth-card { width: min(380px, 100%); padding: 26px; background: white; border: 1px solid #dde1e3; border-radius: 8px; }
.auth-card .eyebrow { color: #737b81; }
.auth-card h1 { margin-bottom: 14px; }
.auth-card button { width: 100%; margin-top: 6px; }
.auth-intro, .auth-hint { color: #687078; font-size: 13px; line-height: 1.5; }
.auth-error { color: #a43c3c; font-size: 13px; }
label[hidden] { display: none; }
@media (max-width: 700px) {
  header { height: auto; flex-wrap: wrap; gap: 10px; padding: 14px 16px; }
  main { grid-template-columns: 1fr; }
  aside { border-right: 0; border-bottom: 1px solid #dde1e3; }
  .statusbar { grid-template-columns: repeat(2, 1fr); }
  .content { padding: 12px; }
}
