:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #25332f;
  background: #f4f6f5;
  font-synthesis: none;
  --accent: #24624e;
  --accent-hover: #194e3d;
  --muted: #718079;
  --line: #dfe6e2;
  --focus: #639981;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 320px; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .44; cursor: default; }
button, input, textarea { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, textarea:focus-visible, tr:focus-visible {
  outline: 3px solid #63998166;
  outline-offset: 2px;
}
.app-shell { width: min(1380px, 100%); margin: 0 auto; padding: 30px 36px 36px; }
.toolbar { display: flex; align-items: center; gap: 28px; min-height: 50px; margin-bottom: 30px; }
.brand { display: flex; gap: 11px; align-items: center; flex-shrink: 0; }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: var(--accent); background: #e2ece6; }
.brand-mark svg { width: 24px; height: 24px; }
h1 { display: flex; align-items: baseline; gap: 9px; margin: 0; font-size: 26px; font-weight: 650; letter-spacing: -.8px; }
.version { color: var(--muted); font-size: 12px; font-weight: 500; letter-spacing: 0; }
.toolbar-actions { display: flex; gap: 10px; }
.button { min-height: 39px; border: 1px solid #d5dfd9; padding: 9px 16px; border-radius: 8px; background: #fff; color: #3f5048; font-size: 13px; line-height: 1.3; font-weight: 600; transition: background .12s, border-color .12s; }
.button:hover:not(:disabled) { background: #eef3f0; border-color: #b7c9bd; }
.button-primary { color: #fff; background: var(--accent); border-color: var(--accent); }
.button-primary:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); }
.record-count { margin-left: auto; color: var(--muted); font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.search-bar { display: flex; align-items: center; gap: 24px; margin-bottom: 22px; }
.search-bar > label { font-size: 13px; font-weight: 600; white-space: nowrap; }
.search-control { position: relative; flex: 1; }
.search-control svg { position: absolute; left: 13px; top: 12px; width: 19px; height: 19px; color: #8a9790; pointer-events: none; }
input, textarea { border: 1px solid #d9e2dc; background: #fff; border-radius: 7px; min-width: 0; color: #293b32; }
input:not([type="checkbox"]) { width: 100%; padding: 10px 12px; min-height: 41px; font-size: 14px; }
input::placeholder { color: #98a39d; }
#search { padding-left: 41px; background: #fff; }
input[readonly], textarea[readonly] { background: #fbfcfb; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: 22px; min-height: 540px; height: calc(100dvh - 211px); max-height: 960px; }
.panel { overflow: hidden; min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 2px 5px #233f2e03; }
.panel-heading { padding: 20px 22px 18px; }
.panel-heading h2 { margin: 0; font-size: 15px; font-weight: 650; letter-spacing: -.15px; }
.list-panel { display: flex; flex-direction: column; }
.table-scroll { overflow: auto; flex: 1; position: relative; border-top: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 13px; }
thead { position: sticky; top: 0; z-index: 1; background: #f8faf8; }
th { padding: 0; text-align: left; font-weight: 600; border-bottom: 1px solid var(--line); }
th:first-child { width: 54%; }
th button { border: 0; background: transparent; width: 100%; color: #6a7b70; padding: 13px 22px; font-size: 12px; text-align: left; }
th button:hover { color: var(--accent); background: #eff4f0; }
.sort-indicator { display: inline-block; width: 12px; margin-left: 5px; }
td { padding: 15px 22px; border-bottom: 1px solid #eff2ef; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
td:first-child { color: #2f4438; font-weight: 500; }
td:last-child { color: #748177; }
tbody tr { cursor: pointer; }
tbody tr:hover { background: #f6f9f6; }
tbody tr[aria-selected="true"] { background: #eaf3ed; box-shadow: inset 3px 0 0 var(--accent); }
tbody tr[aria-selected="true"] td:first-child { color: #20583f; }
.empty-state { min-height: 230px; height: calc(100% - 43px); display: grid; place-items: center; color: #8c9990; font-size: 13px; text-align: center; padding: 30px; }
.details-panel { display: flex; flex-direction: column; }
.details-body { padding: 0 22px 22px; flex: 1; display: flex; flex-direction: column; gap: 17px; min-height: 0; overflow-y: auto; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field > label, .field-label { font-size: 12px; font-weight: 600; color: #6b7a71; }
.password-line { display: flex; align-items: center; gap: 14px; }
.password-line > input { flex: 1; }
.check-label { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #6d7c72; white-space: nowrap; user-select: none; }
input[type="checkbox"] { accent-color: var(--accent); width: 15px; height: 15px; margin: 0; }
.memo-field { flex: 1; min-height: 130px; }
textarea { width: 100%; min-height: 100px; height: 100%; padding: 11px 12px; resize: none; line-height: 1.6; font-size: 13px; }
.attachment-field { border-top: 1px solid #e9eeea; padding-top: 15px; }
.attachment-field p { margin: 7px 0 0; font-size: 12px; color: #77867b; overflow-wrap: anywhere; line-height: 1.5; }
.notice { margin: 0 0 20px; padding: 12px 16px; border-radius: 8px; color: #87433b; background: #fbefed; border: 1px solid #efd9d4; font-size: 13px; line-height: 1.5; }
.locked-panel { min-height: 66vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 45px 20px; }
.locked-symbol { display: grid; place-items: center; width: 72px; height: 72px; background: #e5eee8; color: var(--accent); border-radius: 22px; margin-bottom: 22px; }
.locked-symbol svg { width: 35px; height: 35px; }
.locked-panel h2 { font-size: 22px; margin: 0 0 12px; letter-spacing: -.4px; }
.locked-panel p { color: var(--muted); font-size: 14px; line-height: 1.6; margin: 0 0 24px; }
.private-cover { display: grid; place-items: center; min-height: 66vh; color: var(--muted); font-size: 13px; text-align: center; }
.key-dialog { width: min(440px, calc(100% - 32px)); max-height: calc(100dvh - 32px); padding: 30px; border: 1px solid #dfe7e1; border-radius: 15px; background: #fff; color: #293b32; box-shadow: 0 22px 80px #142b2440; }
.key-dialog::backdrop { background: #182d245c; backdrop-filter: blur(4px); }
.dialog-heading { margin-bottom: 12px; }
.eyebrow { font-size: 10px; letter-spacing: 2px; color: var(--accent); font-weight: 700; }
.dialog-heading h2 { font-size: 23px; letter-spacing: -.5px; font-weight: 650; margin: 10px 0 0; }
#key-description { color: var(--muted); font-size: 13px; line-height: 1.7; margin: 0 0 24px; }
.key-error { font-size: 12px; line-height: 1.5; color: #a34b40; margin: 9px 0 0; min-height: 18px; }
.key-progress { color: var(--accent); font-size: 12px; margin: 10px 0 0; }
.dialog-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 23px; }
@media (max-width: 850px) {
  .app-shell { padding: 22px; }
  .toolbar { gap: 18px; flex-wrap: wrap; margin-bottom: 25px; }
  .record-count { margin-left: auto; }
  .content-grid { gap: 16px; }
  .panel-heading { padding: 18px; }
  .details-body { padding: 0 18px 18px; }
  td, th button { padding-left: 18px; padding-right: 18px; }
}
@media (max-width: 650px) {
  .app-shell { padding: 20px 16px 28px; }
  .toolbar { gap: 18px 12px; }
  .brand { order: 0; }
  .record-count { order: 1; }
  .toolbar-actions { order: 2; width: 100%; }
  .search-bar { display: block; margin-bottom: 18px; }
  .search-bar > label { display: block; margin-bottom: 9px; font-size: 12px; }
  .content-grid { grid-template-columns: 1fr; height: auto; max-height: none; }
  .list-panel { height: 310px; }
  .details-panel { min-height: 570px; }
  .key-dialog { padding: 25px; }
  .button { min-height: 42px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
