/* Navigation and module landing pages; operational screens keep app.css. */
.home-welcome{display:flex;align-items:center;justify-content:space-between;gap:28px;margin:0 0 28px;padding:26px 30px;background:#fff;border:1px solid var(--line);border-radius:13px}
.home-welcome h1{font-size:32px;margin-bottom:10px}
.home-welcome p{margin:0;color:var(--muted);font-size:14px}
.home-logo{width:210px;height:auto;max-width:30%;object-fit:contain}
.module-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px}
.module-card{display:flex;flex-direction:column;min-width:0;min-height:212px;padding:21px;border:1px solid #d3dfd5;border-radius:12px;background:#fff;box-shadow:0 2px 5px #223b2508;color:var(--ink);transition:border-color .15s,box-shadow .15s,transform .15s}
.module-card:hover{border-color:#8aaa94;box-shadow:0 5px 16px #223b2514;transform:translateY(-2px);text-decoration:none}
.module-card:focus-visible,.module-shortcut:focus-visible,.sidebar-modules a:focus-visible,.mobile-nav-toggle:focus-visible{outline:3px solid #739780;outline-offset:3px}
.module-card-top{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:20px}
.module-symbol{width:39px;height:39px;display:grid;place-items:center;flex:0 0 39px;border-radius:10px;background:#eaf2e9;color:var(--green)}
.module-symbol svg{width:23px;height:23px}
.module-status{font-size:10px;color:#4f7254;white-space:nowrap}
.module-card h2{font-size:18px;line-height:1.35;margin:0 0 7px;letter-spacing:-.3px;overflow-wrap:anywhere}
.module-card p{margin:0 0 18px;font-size:12px;line-height:1.6;color:var(--muted)}
.module-card-action{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:auto;font-size:12px;color:var(--green);font-weight:600}
.module-card-action>span{font-size:19px;font-weight:400}
.module-heading{margin-bottom:30px}
.module-heading-icon{display:grid;place-items:center;width:62px;height:62px;flex:0 0 62px;color:var(--green);border-radius:16px;background:#e7efe4}
.module-heading-icon svg{width:32px;height:32px}
.module-shortcuts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}
.module-shortcut{min-width:0;min-height:110px;padding:24px;display:flex;justify-content:space-between;align-items:center;gap:16px;background:#fff;border:1px solid #d3dfd5;border-radius:12px;font-size:19px;font-weight:600}
.module-shortcut:hover{background:#edf3e9;border-color:#94af9a;text-decoration:none}
.module-shortcut>span:first-child{overflow-wrap:anywhere}
.module-shortcut>span:last-child{font-size:24px;font-weight:400}
.sidebar{padding:26px 14px 14px;overflow:hidden}
.sidebar .brand{font-size:17px;line-height:1.3;gap:10px;margin:0 5px;white-space:normal;flex-shrink:0}
.sidebar .brand small{font-size:10px;line-height:1.5;margin-top:4px}
.sidebar .brand-mark{width:38px;height:42px;flex:0 0 38px;font-size:16px}
.sidebar-menu{flex:1;min-height:0;overflow-y:auto;margin:24px -6px 0;padding:0 6px}
.sidebar-modules{margin:0}
.sidebar-modules a{margin:2px 0;padding:12px 10px;gap:10px;font-size:13px;line-height:1.35;border-radius:7px;font-weight:500;min-height:44px}
.sidebar-modules a:hover,.sidebar-modules a.active{font-weight:500;background:#eaf0e8}
.sidebar-symbol{display:flex;width:18px;flex:0 0 18px}
.sidebar-symbol svg{width:18px;height:18px}
.sidebar-divider{border-top:1px solid var(--line);margin:12px 8px}
.sidebar-module>span:nth-child(2){flex:1}
.sidebar-chevron{font-size:17px;line-height:1;color:#7e9384}
.sidebar-children{margin:3px 0 9px 18px;padding-left:10px;border-left:1px solid #d6e0d3}
.sidebar-children[hidden]{display:none}
.sidebar-children a{font-size:12px;padding:10px}
.sidebar-children a.active{color:var(--green);font-weight:600}
.sidebar .sidebar-bottom{flex-shrink:0;margin-top:14px;padding:12px 8px 3px}
.mobile-nav-toggle{display:none}
.mobile-nav-toggle svg{width:18px;height:18px}
@media(max-width:1279px){.module-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:1000px){.module-shortcuts{grid-template-columns:repeat(2,minmax(0,1fr))}.home-welcome{padding:24px}.home-logo{width:155px}.home-welcome h1{font-size:28px}}
@media(max-width:700px){
  .sidebar{padding:16px;display:flex;flex-direction:row;align-items:center;flex-wrap:wrap;justify-content:space-between;gap:0}
  .sidebar .brand{margin:0}
  .sidebar-menu{flex:0 0 100%;margin:16px 0 0;padding:0;max-height:65vh}
  .sidebar nav{display:block}
  .sidebar[data-menu-ready] .sidebar-menu{display:none}
  .sidebar[data-menu-open] .sidebar-menu{display:block}
  .sidebar .sidebar-bottom{display:block;flex-basis:100%;margin-top:10px;padding:4px 0 0;font-size:10px}
  .sidebar .sidebar-bottom small{display:inline;margin-left:6px;font-size:10px}
  .mobile-nav-toggle:not([hidden]){display:flex;align-items:center;gap:10px;min-height:44px;padding:8px 12px;border:1px solid var(--line);border-radius:7px;background:white;color:var(--green);cursor:pointer}
  .sidebar-modules a{font-size:14px;min-height:44px}
  .sidebar-children a{font-size:13px}
  .home-welcome{padding:22px;gap:16px;align-items:flex-start}
  .home-welcome h1{font-size:27px}
  .home-welcome .eyebrow{font-size:9px;letter-spacing:1px}
  .home-welcome p{font-size:13px}
  .home-logo{width:110px;max-width:30%;margin-top:6px}
  .module-grid{gap:12px}
  .module-card{padding:18px;min-height:203px}
  .module-card-top{flex-wrap:wrap;align-items:flex-start;margin-bottom:14px}
  .module-card h2{font-size:18px}
  .module-shortcuts{grid-template-columns:1fr}
  .module-heading{flex-direction:row;align-items:center}
  .module-heading h1{font-size:28px}
}
@media(max-width:479px){.module-grid{grid-template-columns:1fr}.module-card{min-height:192px}.home-welcome{padding:20px 18px}.home-welcome h1{font-size:26px}.home-logo{width:85px;max-width:28%}}
@media(prefers-reduced-motion:reduce){.module-card{transition:none}.module-card:hover{transform:none}}

/* Personal menu order keeps navigation links usable without JavaScript. */
.home-order-tools{margin:-7px 0 20px}
.home-order-tools p{font-size:12px;line-height:1.6;margin:4px 0;color:var(--muted)}
#home-order-status{min-height:20px;color:var(--green);font-weight:600}
#home-order-status.order-error{color:#a23c30}
.module-tile{position:relative;display:flex;min-width:0}
.module-tile .module-card{flex:1;min-width:0}
.module-grid[data-order-ready] .module-card-top{padding-right:30px}
.module-drag-handle:not([hidden]){position:absolute;top:11px;right:6px;width:44px;min-height:44px;display:grid;place-items:center;padding:7px;background:transparent;color:#72866f;border:0;border-radius:7px;cursor:grab;touch-action:none;user-select:none;-webkit-user-select:none}
.module-drag-handle svg{width:20px;height:24px;pointer-events:none}
.module-drag-handle:hover,.module-drag-handle:focus-visible{background:#eaf0e8;color:var(--green)}
.module-drag-handle:focus-visible{outline:3px solid #739780;outline-offset:2px}
.module-drag-handle:active{cursor:grabbing}
.module-grid.is-reordering{user-select:none;-webkit-user-select:none}
.module-grid.is-reordering .module-card{transform:none}
.module-tile.is-dragging .module-card,.module-tile.is-keyboard-moving .module-card{outline:2px solid #6a9272;outline-offset:2px;background:#edf4e9;box-shadow:0 6px 18px #254f3b26}
.module-tile.is-dragging{opacity:.65}
.module-grid.is-saving .module-drag-handle{cursor:wait;opacity:.45}
@media(max-width:700px){.module-drag-handle:not([hidden]){right:3px;top:9px}.module-grid[data-order-ready] .module-card-top{padding-right:28px}}

/* A consistent return control follows the application's page hierarchy. */
.page-back-bar{display:flex;margin:0 0 22px}
.page-back-button{display:inline-flex;align-items:center;justify-content:flex-start;min-height:54px;max-width:100%;gap:10px;padding:14px 20px;border:1px solid var(--green);border-radius:9px;background:var(--green);color:#fff;font-size:16px;font-weight:600;line-height:1.45;white-space:normal;text-align:left;box-shadow:0 3px 8px #254f3b1a}
.page-back-button:hover{background:var(--green-dark);color:#fff;text-decoration:none}
.page-back-button svg{width:24px;height:24px;flex:0 0 24px}
.page-back-button span{min-width:0;overflow-wrap:anywhere}
.page-back-button:focus-visible{outline:3px solid #739780;outline-offset:4px}
@media(max-width:700px){.page-back-button{width:100%;justify-content:center;min-height:56px;padding:14px 18px}}

/* Single-module roles use the available width on every device. */
.main.without-sidebar{margin-left:0}

.main.without-sidebar .topbar{justify-content:flex-end}

.module-shortcut-planned:disabled{opacity:.58;cursor:not-allowed;text-align:left;box-shadow:none}.module-shortcut-planned small{display:block;font-size:.85rem;font-weight:400;margin-top:.4rem;line-height:1.4}

.planned-module-group>.module-shortcut{width:100%;height:auto}.planned-module-children{display:grid;gap:.5rem;margin:.5rem 0 0 1rem;padding-left:.6rem;border-left:2px solid #d5ded7}.planned-module-children .module-shortcut{padding:.8rem;min-height:60px;width:100%}


.module-shortcut-rows{display:grid;gap:20px}
