/* ==========================================================================
   Live demo — mirrors the Hoistbay desktop app (lib/theme + lib/widgets)
   ========================================================================== */
@font-face { font-family: 'DemoIcons'; src: url('assets/fonts/material-icons.woff2') format('woff2'); font-display: block; }
@font-face { font-family: 'DemoIconsOutlined'; src: url('assets/fonts/material-icons-outlined.woff2') format('woff2'); font-display: block; }

.dm-wrap { overflow-x: auto; padding: 8px 4px 24px; -webkit-overflow-scrolling: touch; }
.dm {
  --dm-primary: #007AFF; --dm-text: #1D1D1F; --dm-text2: #86868B; --dm-text3: #AEAEB2;
  --dm-border: #E5E5EA; --dm-sidebar: #F5F5F7; --dm-sel: #E6F0FF; --dm-active: #E5E5EA; --dm-hover: #EAEAED;
  --dm-success: #34C759; --dm-error: #FF3B30; --dm-warning: #FF9500;
  min-width: 920px; max-width: 1180px; height: 640px; margin: 0 auto;
  background: #fff; border-radius: 12px; overflow: hidden; position: relative;
  box-shadow: 0 24px 60px rgba(0,0,0,.14), 0 0 0 .5px rgba(0,0,0,.18);
  display: flex; flex-direction: column; text-align: left;
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', sans-serif; color: var(--dm-text);
  -webkit-font-smoothing: antialiased; user-select: none;
}
.dm *, .dm *::before, .dm *::after { box-sizing: border-box; }
.dm-i, .dm-o { font-weight: normal; font-style: normal; line-height: 1; display: inline-block; letter-spacing: normal;
  text-transform: none; white-space: nowrap; direction: ltr; font-feature-settings: 'liga'; -webkit-font-smoothing: antialiased; }
.dm-i { font-family: 'DemoIcons'; } .dm-o { font-family: 'DemoIconsOutlined'; }

/* Title bar */
.dm-titlebar { height: 28px; flex: none; background: #ececec; border-bottom: 1px solid #d6d6d6; display: flex; align-items: center; position: relative; }
.dm-dots { display: flex; gap: 8px; padding-left: 12px; z-index: 1; }
.dm-dots span { width: 12px; height: 12px; border-radius: 50%; }
.dm-title { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; color: #4d4d4d; }

.dm-body { flex: 1; display: flex; min-height: 0; }

/* Sidebar */
.dm-side { width: 240px; flex: none; background: var(--dm-sidebar); border-right: 1px solid var(--dm-border); display: flex; flex-direction: column; min-height: 0; }
.dm-prof { padding: 16px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--dm-border); }
.dm-av { width: 36px; height: 36px; border-radius: 10px; background: rgba(0,122,255,.12); color: var(--dm-primary); font-weight: 600; font-size: 15px; display: flex; align-items: center; justify-content: center; }
.dm-pn { font-size: 14px; font-weight: 500; }
.dm-pr { font-size: 11px; color: var(--dm-text3); margin-top: 2px; }
.dm-scroll { flex: 1; overflow-y: auto; min-height: 0; }
.dm-sec { padding: 12px 16px 4px; font-size: 11px; font-weight: 500; color: var(--dm-text3); letter-spacing: .5px; text-transform: uppercase; }
.dm-tile { margin: 1px 8px; border-radius: 6px; height: 36px; display: flex; align-items: center; padding: 0 12px; gap: 12px;
  font-size: 14px; font-weight: 500; cursor: pointer; transition: background .15s; white-space: nowrap; overflow: hidden; }
.dm-tile:hover { background: var(--dm-hover); }
.dm-tile .dm-ic { font-size: 18px; color: var(--dm-text2); width: 18px; flex: none; }
.dm-tile span.dm-label { overflow: hidden; text-overflow: ellipsis; }
.dm-tile.sel { background: var(--dm-sel); color: var(--dm-primary); font-weight: 600; }
.dm-tile.sel .dm-ic { color: var(--dm-primary); }
.dm-tile.act { background: var(--dm-active); }
.dm-badge { margin-left: auto; background: var(--dm-primary); color: #fff; font-size: 11px; font-weight: 500; border-radius: 10px; padding: 1px 6px; }
.dm-card { margin: 8px; padding: 6px 0; background: #fff; border: 1px solid var(--dm-border); border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,.1); }

/* Main */
.dm-main { flex: 1; display: flex; flex-direction: column; min-width: 0; position: relative; }
.dm-bar { padding: 10px 16px; border-bottom: 1px solid var(--dm-border); display: flex; align-items: center; gap: 8px; min-height: 52px; background: #fff; }
.dm-bar.selbar { background: var(--dm-sel); }
.dm-ib { padding: 7px; border-radius: 6px; color: var(--dm-text2); display: inline-flex; cursor: pointer; border: 0; background: none; }
.dm-ib:hover { background: var(--dm-hover); }
.dm-ib .dm-i, .dm-ib .dm-o { font-size: 20px; }
.dm-ib.blue { color: var(--dm-primary); } .dm-ib.red { color: var(--dm-error); }
.dm-crumbs { display: flex; align-items: center; overflow: hidden; }
.dm-crumb { display: flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 6px; font-size: 13px; color: var(--dm-text2); cursor: pointer; white-space: nowrap; }
.dm-crumb:hover { background: var(--dm-hover); }
.dm-crumb .dm-i, .dm-crumb .dm-o { font-size: 14px; }
.dm-crumb.on { background: var(--dm-sel); color: var(--dm-primary); font-weight: 600; cursor: default; }
.dm-chev { font-size: 16px; color: var(--dm-text3); margin: 0 2px; }
.dm-search { flex: 1; height: 40px; background: #FAFAFA; border-radius: 8px; display: flex; align-items: center; border: 1px solid transparent; }
.dm-search:focus-within { border-color: var(--dm-primary); }
.dm-search .dm-i { font-size: 18px; color: var(--dm-text2); width: 44px; text-align: center; }
.dm-search input { flex: 1; border: 0; background: transparent; outline: none; font: inherit; font-size: 14px; color: var(--dm-text); }
.dm-search input::placeholder { color: var(--dm-text2); font-size: 13px; }
.dm-btn { background: var(--dm-primary); color: #fff; border: 0; border-radius: 6px; padding: 0 14px; height: 36px; display: inline-flex; align-items: center; gap: 8px;
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.dm-btn:hover { background: #0062CC; }
.dm-btn .dm-i, .dm-btn .dm-o { font-size: 16px; }
.dm-btn.text { background: none; color: var(--dm-primary); padding: 0 10px; }
.dm-btn.text:hover { background: rgba(0,122,255,.08); }
.dm-btn.text:disabled { color: var(--dm-text3); cursor: default; background: none; }
.dm-btn.danger { background: var(--dm-error); }
.dm-btn.outline { background: #fff; color: var(--dm-text); border: 1px solid #D1D1D6; }
.dm-seltext { font-size: 14px; font-weight: 500; color: var(--dm-primary); margin-right: 8px; }

.dm-content { flex: 1; overflow-y: auto; min-height: 0; position: relative; }
.dm-content.drag { outline: 2px solid var(--dm-primary); outline-offset: -2px; background: var(--dm-sel); }
.dm-row { display: flex; align-items: center; padding: 10px 16px; border-bottom: 1px solid rgba(229,229,234,.5); gap: 12px; cursor: default; }
.dm-row:hover { background: var(--dm-hover); }
.dm-row.sel { background: var(--dm-sel); }
.dm-row.sel .dm-nm { font-weight: 600; }
.dm-fi { width: 32px; height: 32px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 18px; flex: none; }
.dm-fi.d { background: rgba(255,149,0,.12); color: var(--dm-warning); }
.dm-fi.f { background: rgba(0,122,255,.08); color: var(--dm-primary); }
.dm-grow { flex: 1; min-width: 0; }
.dm-nm { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm-meta { font-size: 12px; color: var(--dm-text2); margin-top: 2px; }
.dm-hint { padding: 10px 16px; font-size: 12px; color: var(--dm-text3); text-align: center; }
.dm-empty { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--dm-text2); gap: 6px; padding: 24px; text-align: center; }
.dm-empty .dm-i, .dm-empty .dm-o { font-size: 44px; color: var(--dm-text3); margin-bottom: 6px; }
.dm-empty b { color: var(--dm-text); font-weight: 600; font-size: 15px; }
.dm-empty small { font-size: 13px; }

/* Details pane */
.dm-details { height: 210px; flex: none; border-top: 1px solid var(--dm-border); display: flex; flex-direction: column; background: #fff; }
.dm-tabs { display: flex; gap: 4px; padding: 0 12px; border-bottom: 1px solid var(--dm-border); }
.dm-tab { padding: 10px 10px; font-size: 13px; font-weight: 500; color: var(--dm-text2); cursor: pointer; border-bottom: 2px solid transparent; }
.dm-tab.on { color: var(--dm-primary); border-color: var(--dm-primary); }
.dm-tabbody { padding: 12px 16px; overflow-y: auto; font-size: 13px; }
.dm-kv { display: grid; grid-template-columns: 170px 1fr; gap: 6px 12px; }
.dm-kv dt { color: var(--dm-text2); } .dm-kv dd { margin: 0; font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 12px; word-break: break-all; }

/* Headings inside views */
.dm-head { padding: 16px; border-bottom: 1px solid var(--dm-border); }
.dm-head-row { display: flex; align-items: center; gap: 12px; }
.dm-h { font-size: 17px; font-weight: 600; letter-spacing: -.2px; }
.dm-sub { font-size: 13px; color: var(--dm-text2); margin-top: 4px; }
.dm-chips { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.dm-chip { border: 1px solid #D1D1D6; border-radius: 8px; padding: 5px 12px; font-size: 13px; cursor: pointer; background: #fff; color: var(--dm-text); }
.dm-chip.on { background: var(--dm-sel); border-color: var(--dm-sel); color: var(--dm-primary); font-weight: 600; }
.dm-status { display: inline-flex; align-items: center; font-size: 11px; font-weight: 600; border-radius: 6px; padding: 2px 8px; }

/* Activity */
.dm-list { padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.dm-task { display: flex; gap: 12px; padding: 12px; border: 1px solid var(--dm-border); border-radius: 6px; background: #fff; }
.dm-task.dm-new { animation: dmIn .25s ease; }
@keyframes dmIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.dm-task-ic { width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 18px; flex: none; }
.dm-task-top { display: flex; align-items: center; gap: 8px; }
.dm-task-type { font-size: 14px; font-weight: 500; }
.dm-time { margin-left: auto; font-size: 11px; color: var(--dm-text3); white-space: nowrap; }
.dm-task-target { font-size: 13px; color: var(--dm-text2); margin-top: 2px; word-break: break-all; }
.dm-prog { height: 4px; background: var(--dm-border); border-radius: 2px; margin-top: 8px; overflow: hidden; }
.dm-prog div { height: 100%; background: var(--dm-primary); border-radius: 2px; transition: width .25s linear; }
.dm-prog.indet div { width: 35% !important; animation: dmIndet 1.2s ease-in-out infinite; }
@keyframes dmIndet { from { transform: translateX(-100%); } to { transform: translateX(300%); } }
.dm-count { font-size: 11px; color: var(--dm-text3); margin-top: 2px; }
.dm-task-det { font-size: 11px; color: var(--dm-text2); margin-top: 4px; }

/* CloudFront */
.dm-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.dm-table th { text-align: left; font-weight: 500; color: var(--dm-text2); font-size: 12px; padding: 10px 16px; border-bottom: 1px solid var(--dm-border); background: #FAFAFA; }
.dm-table td { padding: 12px 16px; border-bottom: 1px solid rgba(229,229,234,.6); vertical-align: middle; }
.dm-table td.mono { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 12px; }
.dm-table .dm-btn { height: 30px; font-size: 13px; padding: 0 10px; }

/* Dialog + snackbar */
.dm-overlay { position: absolute; inset: 28px 0 0 0; background: rgba(0,0,0,.25); display: flex; align-items: center; justify-content: center; z-index: 5; animation: dmFade .15s; }
@keyframes dmFade { from { opacity: 0; } to { opacity: 1; } }
.dm-dialog { width: 400px; background: #fff; border-radius: 16px; padding: 22px; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.dm-dialog h4 { font-size: 17px; font-weight: 600; margin: 0 0 8px; }
.dm-dialog p { font-size: 13px; color: var(--dm-text2); margin: 0 0 12px; line-height: 1.5; }
.dm-dialog label { font-size: 12px; color: var(--dm-text2); display: block; margin-bottom: 6px; }
.dm-dialog input, .dm-dialog textarea { width: 100%; border: 1px solid var(--dm-border); background: #FAFAFA; border-radius: 8px; padding: 10px 12px; font: inherit; font-size: 14px; outline: none; resize: none; }
.dm-dialog input:focus, .dm-dialog textarea:focus { border-color: var(--dm-primary); }
.dm-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.dm-snack { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); background: var(--dm-success); color: #fff; border-radius: 6px; padding: 10px 14px;
  font-size: 13px; display: flex; gap: 16px; align-items: center; box-shadow: 0 6px 20px rgba(0,0,0,.2); z-index: 6; animation: dmIn .2s; white-space: nowrap; }
.dm-snack button { background: none; border: 0; color: #fff; font: inherit; font-weight: 600; cursor: pointer; text-decoration: underline; }

.dm-note { text-align: center; font-size: .85rem; color: var(--text-muted, #86868B); margin-top: .75rem; }

/* Inline code in marketing copy */
.bento-card code, .sec-card code, .dm-note code {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: .85em;
  background: rgba(0,122,255,.07); color: #0062CC; padding: 1px 5px; border-radius: 4px;
}

.dm-bar.dm-actionbar { height: 60px; flex: none; }
