.jm-page,.jm-dialog { color:var(--ink,#292e27); font-family:var(--sans,Inter,system-ui,sans-serif); }
.jm-page *,.jm-dialog * { box-sizing:border-box; }
.jm-page { padding:clamp(1.2rem,3.8vw,3.35rem); margin:auto; max-width:92rem; min-width:0; }
.jm-header,.jm-tools,.jm-row,.jm-dialog-head,.jm-dialog-foot,.jm-actions,.jm-row-actions { display:flex;align-items:center; }
.jm-header,.jm-tools,.jm-dialog-head,.jm-dialog-foot { justify-content:space-between; gap:1rem; }
.jm-page h1,.jm-page h2,.jm-page h3,.jm-dialog h2,.jm-stat-value { font-family:var(--serif,Georgia,serif); font-weight:500; letter-spacing:-.035em; margin:0; }
.jm-room { font-size:.77rem; letter-spacing:.12em; text-transform:uppercase; color:var(--muted,#666e60); font-weight:650; }
.jm-page .jm-heading { font-size:clamp(2.2rem,4vw,3.6rem);line-height:1.12;margin:.4rem 0 0; }
.jm-page button,.jm-page input,.jm-page select,.jm-dialog button,.jm-dialog select,.jm-dialog input,.jm-dialog textarea { font-family:inherit;font-size:inherit; }
.jm-btn,.jm-iconbtn,.jm-danger,.jm-title-button { border:0; cursor:pointer; line-height:1.2; transition:background .15s,color .15s,border-color .15s; }
.jm-btn,.jm-iconbtn { display:inline-flex; align-items:center; justify-content:center; gap:.55rem; }
.jm-page .jm-btn,.jm-dialog .jm-btn { min-height:2.65rem; padding:.7rem 1rem; border:1px solid var(--line,#d7dccf); border-radius:.68rem; background:#fff; color:var(--ink,#292e27); font-size:.91rem; text-decoration:none; font-weight:600; }
.jm-btn:hover,.jm-iconbtn:hover { background:#f0f2ea; }
.jm-page .jm-primary,.jm-dialog .jm-primary { background:var(--olive,#46543e); border-color:transparent; color:#fff; }
.jm-primary:hover { filter:brightness(.93); }
.jm-page .jm-small { min-height:2.25rem; padding:.5rem .78rem; font-size:.84rem; }
.jm-page .jm-iconbtn,.jm-dialog .jm-iconbtn { padding:.6rem; width:2.4rem; height:2.4rem; border-radius:.65rem; background:transparent; color:var(--muted,#626b5f); }
.jm-page .jm-iconbtn:hover,.jm-dialog .jm-iconbtn:hover {background:#f0f2ea;}
.jm-icon,.jm-icon svg { display:block; width:1.15rem; height:1.15rem; flex:none; }
.jm-btn:disabled,.jm-iconbtn:disabled { opacity:.5; cursor:default; }
.jm-page :focus-visible,.jm-dialog :focus-visible { outline:2px solid var(--olive,#435b40);outline-offset:2px; }
.jm-stats { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));margin:clamp(1.4rem,3vw,2.5rem) 0 1.25rem;gap:.8rem; }
.jm-stat { background:#fff; border:1px solid var(--line,#d7dccf); border-radius:1rem; min-width:0; padding:clamp(.9rem,2.4vw,1.65rem); }
.jm-stat:first-child { background:#edf0e5; border-color:#d6ddca; }
.jm-stat-label,.jm-help,.jm-item-meta { color:var(--muted,#61695c); }
.jm-stat-label { font-size:.87rem; display:block;margin-bottom:.5rem; }
.jm-stat-value { display:block; font-size:clamp(1.4rem,2.8vw,2.6rem);line-height:1.05;overflow-wrap:anywhere; }
.jm-panel {background:#fff;border:1px solid var(--line,#d7dccf);border-radius:1.1rem;overflow:hidden;}
.jm-tools {padding:1.25rem 1.45rem;flex-wrap:wrap;}
.jm-page .jm-list-title {font-size:1.55rem;}
.jm-actions,.jm-row-actions {gap:.5rem;flex-wrap:wrap;}
.jm-search {display:flex;align-items:center;gap:.35rem;border:1px solid var(--line,#d7dccf);border-radius:.6rem; padding:0 .65rem;color:var(--muted,#626b5e);}
.jm-search input {width:9.5rem;border:0;background:transparent;color:var(--ink,#292e27);height:2.4rem;min-width:0;}
.jm-search:focus-within {outline:2px solid var(--olive,#46543e);outline-offset:1px;}
.jm-search input:focus-visible {outline:0;}
.jm-page .jm-select,.jm-dialog select.jm-control {appearance:none;background-color:#fff;background-image:linear-gradient(45deg,transparent 50%,currentColor 50%),linear-gradient(135deg,currentColor 50%,transparent 50%);background-position:calc(100% - 1.05rem) 52%,calc(100% - .8rem) 52%;background-size:.25rem .25rem;background-repeat:no-repeat;padding-right:2rem;}
.jm-page .jm-select {height:2.5rem;border:1px solid var(--line,#d7dccf);border-radius:.6rem;color:var(--ink,#292e27);padding-left:.65rem;font-size:.88rem;max-width:100%;}
.jm-list {list-style:none;padding:0;margin:0;}
.jm-row {border-top:1px solid var(--line,#d7dccf);gap:.9rem;padding:1rem 1.45rem;}
.jm-marker,.jm-empty-icon {display:grid;place-items:center;width:2.9rem;height:2.9rem;background:#e9eee3;color:#506349;border-radius:.85rem;flex:none;}
.jm-marker-wine {background:#f5e9e8;color:#884e55;}
.jm-marker-finance {background:#eaf0e4;color:#566a4c;}
.jm-marker-docs {background:#e9edf2;color:#536275;}
.jm-row-text {flex:1;min-width:0;}
.jm-page .jm-title-button {background:none;padding:.2rem 0;color:var(--ink,#292e27);font-weight:650;text-align:left;overflow-wrap:anywhere;}
.jm-title-button:hover {text-decoration:underline;}
.jm-item-meta {margin:.18rem 0 0;font-size:.85rem;line-height:1.45;overflow-wrap:anywhere;}
.jm-row-actions {margin-left:auto;justify-content:flex-end;}
.jm-value {font-size:.94rem;font-weight:650;white-space:nowrap;margin-right:.38rem;}
.jm-empty {min-height:13.5rem;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:.9rem;padding:1.5rem;border-top:1px solid var(--line,#d7dccf);text-align:center;}
.jm-empty[hidden] {display:none;}
.jm-empty-icon {background:#f0f1e9;border-radius:50%;width:3.3rem;height:3.3rem;}
.jm-page .jm-empty h3 {font-size:1.45rem;}
.jm-dialog {width:min(32rem,calc(100% - 1.6rem));max-height:86dvh;padding:1.4rem;border:1px solid var(--line,#d7dccf);border-radius:1.2rem;background:#fff;box-shadow:0 18px 70px #20251f33;overscroll-behavior:contain;}
.jm-dialog::backdrop {background:#18221666;}
.jm-dialog-head {margin:0 0 1.2rem;}.jm-dialog h2 {font-size:1.65rem;}
.jm-fields {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.9rem;}
.jm-field {display:flex;flex-direction:column;align-items:stretch;gap:.35rem;color:var(--ink,#292e27);font-size:.9rem;font-weight:600;min-width:0;}
.jm-full {grid-column:1/-1;}
.jm-control {width:100%;padding:.62rem .7rem;border:1px solid var(--line,#cbd1c5);border-radius:.52rem;color:var(--ink,#292e27);background:#fff;min-height:2.6rem;line-height:1.35;}
.jm-dialog textarea {resize:vertical;min-height:4rem;}
.jm-help {font-size:.8rem;font-weight:400;overflow-wrap:anywhere;line-height:1.5;}
.jm-dialog-foot {margin-top:1.2rem;flex-wrap:wrap;}.jm-dialog-foot>.jm-actions {margin-left:auto;}
.jm-danger {padding:.5rem 0;background:transparent;color:#a04436;}
.jm-dialog .jm-delete {background:#9a4639;color:white;border-color:transparent;}
.jm-error {color:#95372f;line-height:1.45;}.jm-error:empty {display:none;}
.jm-dialog-copy {line-height:1.5;overflow-wrap:anywhere;}
@media(max-width:700px) {
  .jm-page {padding:1.05rem;}
  .jm-tools {padding:1rem;}
  .jm-row {padding:.85rem 1rem;gap:.65rem;flex-wrap:wrap;}
  .jm-row-actions {width:100%;justify-content:flex-start;margin-left:3.55rem;}
  .jm-search input {width:7.8rem;}
  .jm-stats {gap:.45rem;}
  .jm-stat {padding:.8rem .65rem;}
  .jm-stat-label {font-size:.79rem;}
  .jm-stat-value {font-size:1.55rem;}
}
@media(max-width:430px) {
  .jm-header {align-items:flex-start;flex-wrap:wrap;}
  .jm-tools .jm-actions {width:100%;}
  .jm-tools .jm-search {flex:1 1 8rem;min-width:0;}
  .jm-search input {width:100%;}
  .jm-select {flex:1 1 9rem;}
  .jm-stats {grid-template-columns:repeat(2,minmax(0,1fr));}
  .jm-stat:first-child {grid-column:1/-1;}
  .jm-fields {grid-template-columns:1fr;}
  .jm-room {font-size:.8rem;}
}

.jm-history {grid-column:1/-1;border-top:1px solid var(--line,#d7dccf);padding-top:.8rem;font-size:.9rem;}
.jm-history summary {cursor:pointer;color:var(--muted,#61695c);}
.jm-history ol {max-height:8rem;overflow:auto;padding-left:1.3rem;}
.jm-history li {margin-top:.45rem;}
