:root {
  color-scheme: light;
  --paper: #f5f3ed;
  --white: #fffefa;
  --ink: #242720;
  --muted: #898a7f;
  --line: #e9e7df;
  --green: #416a4b;
  --green-dark: #31543a;
  --green-pale: #e9efe5;
  --orange: #d47f4c;
  --purple: #82729a;
  --shadow: 0 16px 40px rgba(39, 41, 32, .07);
  --scrollbar-thumb: rgba(137, 138, 127, 0.38);
  --scrollbar-thumb-hover: rgba(137, 138, 127, 0.65);
  --scrollbar-track: transparent;
  font-family: "Segoe UI", sans-serif;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

/* Custom sleek scrollbars across all browsers and dialogs */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
}
::-webkit-scrollbar-thumb {
  background-color: var(--scrollbar-thumb);
  border-radius: 9999px;
  border: 1.5px solid transparent;
  background-clip: content-box;
  transition: background-color 0.2s ease;
}
::-webkit-scrollbar-thumb:hover {
  background-color: var(--scrollbar-thumb-hover);
}
::-webkit-scrollbar-corner {
  background: transparent;
}

body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--paper); color: var(--ink); font-size: 14px; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid #9ab48c; outline-offset: 2px; }
.app-shell { min-height: 100vh; }
.sidebar { width: 244px; height: 100vh; position: fixed; inset: 0 auto 0 0; z-index: 2; padding: 29px 18px 16px; background: #fbfaf6; border-right: 1px solid #eeece5; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 11px; margin: 2px 0 49px 10px; color: var(--ink); text-decoration: none; font: 800 19px "Segoe UI", sans-serif; letter-spacing: -1.15px; }
.brand-period { color: var(--orange); }
.brand-mark { width: 25px; height: 25px; padding: 4px; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; transform: rotate(-8deg); }
.brand-mark span { background: var(--green); border-radius: 2px 5px 2px 5px; }
.brand-mark span:nth-child(2), .brand-mark span:nth-child(3) { opacity: .55; }
.sidebar-label { margin: 0 0 12px 12px; color: #a0a095; font-size: 9px; letter-spacing: 1.45px; font-weight: 700; }
.main-nav { display: grid; gap: 5px; }
.nav-link { border: 0; background: transparent; width: 100%; height: 43px; display: flex; align-items: center; text-align: left; gap: 12px; padding: 0 12px; color: #73756c; border-radius: 7px; font-weight: 500; cursor: pointer; transition: .18s ease; }
.nav-link:hover { background: #f2f1ea; color: var(--ink); }
.nav-link.active { color: var(--green-dark); background: #eaf0e7; font-weight: 700; }
.nav-icon { width: 19px; text-align: center; font-size: 17px; line-height: 1; }
.nav-count { margin-left: auto; color: #96968c; font-size: 11px; font-weight: 600; }
.sidebar-bottom { margin-top: auto; }
.sidebar-note { margin: 0 3px 21px; padding: 15px 14px 12px; background: #f3f1e9; border-radius: 8px; }
.note-spark { color: var(--orange); font-size: 16px; }
.sidebar-note p { margin: 6px 0 0; color: #797a70; font-size: 11px; line-height: 1.55; }
.profile { display: flex; align-items: center; gap: 10px; padding: 14px 4px 0; border-top: 1px solid var(--line); }
.profile-avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #eee5d4; color: #a06d45; font-size: 17px; }
.profile strong, .profile span { display: block; }
.profile strong { font-size: 11px; font-weight: 700; }
.profile div:nth-child(2) span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.profile-menu { margin-left: auto; color: #99998f; font-size: 20px; letter-spacing: 1px; }
.main-content { margin-left: 244px; min-height: 100vh; display: flex; flex-direction: column; }
.topbar { height: 72px; position: sticky; top: 0; z-index: 1; padding: 0 5.15%; display: flex; align-items: center; justify-content: space-between; background: rgba(245, 243, 237, .93); border-bottom: 1px solid #eae8e0; backdrop-filter: blur(12px); }
.breadcrumbs { display: flex; align-items: center; gap: 11px; color: #929288; font-size: 11px; }
.breadcrumbs strong { color: #484a42; font-weight: 600; }
.crumb-divider { color: #c4c2b9; }
.topbar-actions { display: flex; align-items: center; gap: 18px; }
.local-indicator { display: flex; align-items: center; gap: 7px; color: #81837a; font-size: 10px; }
.local-indicator span { width: 6px; height: 6px; border-radius: 50%; background: #77a477; }
.page-wrap { max-width: 1220px; padding: 42px 5.15% 72px; margin: 0 auto; width: 100%; flex: 1; }
.view-section { display: none; animation: appear .22s ease-out; }
.view-section.active { display: block; }
@keyframes appear { from { opacity: .5; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.welcome-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; margin-bottom: 32px; }
.eyebrow { color: #898c7e; font-size: 9px; font-weight: 700; letter-spacing: 1.65px; }
.eyebrow-line { display: inline-block; vertical-align: 3px; width: 17px; height: 1px; margin-right: 7px; background: #a4a58f; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: "Segoe UI", sans-serif; }
.welcome-row h1 { margin: 11px 0 8px; font-size: clamp(29px, 3.3vw, 42px); letter-spacing: -2.1px; line-height: 1.16; font-weight: 700; }
.welcome-row h1 span { color: var(--green); }
.welcome-copy { max-width: 490px; margin: 0; color: #818278; font-size: 12px; line-height: 1.7; }
.button { border: 1px solid transparent; border-radius: 6px; min-height: 40px; padding: 0 15px; display: inline-flex; justify-content: center; align-items: center; gap: 8px; font-size: 11px; font-weight: 600; cursor: pointer; transition: .18s ease; white-space: nowrap; }
.button-primary { background: var(--green); color: white; box-shadow: 0 3px 7px rgba(47, 79, 55, .12); }
.button-primary:hover { background: var(--green-dark); transform: translateY(-1px); }
.button-outline { color: #44493f; background: transparent; border-color: #d9d9cf; }
.button-outline:hover { background: #fffefa; border-color: #b9c3b3; }
.button-small { min-height: 34px; padding: 0 13px; font-size: 10px; }
.button-quiet { color: #73756a; background: transparent; }
.button-quiet:hover { background: #f1f0e9; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat-card { min-height: 112px; padding: 17px 18px; background: var(--white); border: 1px solid #eeece5; border-radius: 8px; position: relative; overflow: hidden; }
.stat-card > * { position: relative; z-index: 1; }
.stat-card::after { content: ""; position: absolute; width: 62px; height: 62px; right: -15px; bottom: -23px; border: 1px solid #eff0e8; border-radius: 50%; box-shadow: 0 0 0 8px #faf9f4, 0 0 0 9px #eff0e8; z-index: 0; pointer-events: none; }
.stat-label { color: #85867c; font-size: 10px; font-weight: 500; }
.stat-number { margin-top: 7px; font: 700 27px "Segoe UI", sans-serif; letter-spacing: -1.2px; }
.stat-foot { margin-top: 3px; color: #a0a095; font-size: 9px; }
.stat-symbol { position: absolute; top: 14px; right: 17px; color: #a0b096; font-size: 17px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(260px, .95fr); gap: 16px; }
.panel { padding: 21px 21px 17px; background: var(--white); border: 1px solid #eeece5; border-radius: 8px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 19px; }
.panel-heading h2 { margin: 5px 0 0; font-size: 17px; letter-spacing: -.55px; }
.text-button, .panel-footer-link { border: 0; padding: 5px 0; background: transparent; color: var(--green); font-size: 10px; font-weight: 600; cursor: pointer; }
.text-button span, .panel-footer-link span { margin-left: 5px; }
.text-button:hover, .panel-footer-link:hover { color: var(--green-dark); }
.icon-button { width: 29px; height: 29px; border: 1px solid #e9e9df; border-radius: 6px; background: white; color: var(--green); font-size: 18px; cursor: pointer; }
.icon-button:hover { background: var(--green-pale); }
.project-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid #f0efe9; cursor: pointer; }
.project-row:first-child { border-top: 0; padding-top: 0; }
.project-swatch { width: 37px; height: 37px; flex: 0 0 37px; display: grid; place-items: center; border-radius: 7px; color: #55734e; background: #edf1e6; font-size: 17px; }
.project-swatch.color-1 { color: #a26a4b; background: #f5ede4; }
.project-swatch.color-2 { color: #76688d; background: #efebf3; }
.project-swatch.color-3 { color: #648385; background: #e7efed; }
.project-row-info { min-width: 0; flex: 1; }
.project-row-info strong { display: block; overflow: hidden; font-size: 11px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.project-row-info span { display: block; margin-top: 4px; overflow: hidden; color: #96978d; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.status-pill { flex-shrink: 0; display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 20px; background: #f1f0ea; color: #74766c; font-size: 9px; font-weight: 600; white-space: nowrap; }
.status-pill::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #9a9b91; }
.status-in-progress { background: #edf2e9; color: #54734d; }.status-in-progress::before { background: #7c9c70; }
.status-planned { background: #f4eee6; color: #a5754f; }.status-planned::before { background: #c99969; }
.status-completed { background: #e9efea; color: #597c61; }.status-completed::before { background: #76a17c; }
.status-postponed { background: #f1edf4; color: #847092; }.status-postponed::before { background: #a190b1; }
.status-on-hold { background: #efefec; color: #77796e; }.status-on-hold::before { background: #a1a297; }
.skill-overview-item { margin: 0 0 16px; }
.skill-overview-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 7px; }
.skill-overview-name { font-size: 10px; font-weight: 600; }
.skill-level { color: #8a8b81; font-size: 9px; }
.progress-track { height: 5px; border-radius: 5px; overflow: hidden; background: #efeee8; }
.progress-bar { height: 100%; border-radius: inherit; background: #76936d; transition: width .3s; }
.skill-overview-foot { display: flex; justify-content: space-between; margin-top: 5px; color: #999a90; font-size: 9px; }
.panel-footer-link { padding-top: 3px; }
.hidden { display: none !important; }
.sync-panel, .backup-panel { margin-bottom: 15px; }
.sync-panel { max-width: 800px; }
.backup-panel { max-width: 800px; }
.sync-explainer { max-width: 680px; margin: -7px 0 18px; color: #818278; font-size: 10px; line-height: 1.7; }
.sync-badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border-radius: 20px; background: #f1f0ea; color: #77796f; font-size: 9px; white-space: nowrap; }
.sync-badge span { width: 6px; height: 6px; border-radius: 50%; background: #a0a095; }
.sync-badge.connected { background: #edf2e9; color: #54734d; }.sync-badge.connected span { background: #7c9c70; }
.sync-badge.syncing { background: #f4eee6; color: #98704d; }.sync-badge.syncing span { background: #c99969; }
.sync-badge.error, .sync-badge.conflict { background: #f5eae6; color: #a36054; }.sync-badge.error span, .sync-badge.conflict span { background: #bd7767; }
.cloud-config, .cloud-auth-form { display: grid; gap: 13px; max-width: 470px; margin-bottom: 16px; }
.sync-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.cloud-auth-form { padding-top: 15px; border-top: 1px solid #eeece5; }
.github-sign-in { width: 100%; min-height: 40px; }
.cloud-account-line { display: flex; justify-content: space-between; gap: 10px; margin: 3px 0 14px; color: #707267; font-size: 10px; }
.cloud-account-line span:last-child { color: #999a90; }
.cloud-conflict { display: grid; gap: 8px; margin-bottom: 15px; padding: 13px; border: 1px solid #ead8c9; border-radius: 6px; background: #faf4eb; color: #6e5948; font-size: 10px; }
.cloud-conflict span { color: #897766; }
.sync-message { margin-top: 15px; padding: 10px 12px; border-radius: 5px; background: #f5f4ee; color: #75776d; font-size: 10px; line-height: 1.5; overflow-wrap: anywhere; }
.sync-message[data-status="connected"] { background: #edf2e9; color: #55734e; }
.sync-message[data-status="error"], .sync-message[data-status="conflict"] { background: #f5eae6; color: #96584c; }
.activity-panel { margin-top: 16px; }
.project-card-labels { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.priority-pill { display: inline-flex; align-items: center; padding: 4px 7px; border-radius: 20px; background: #f1f0ea; color: #74766c; font-size: 8px; font-weight: 600; white-space: nowrap; }
.priority-high { background: #f7e9e3; color: #a45d4e; }
.priority-low { background: #edf1e9; color: #61775a; }
.planner-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; margin-bottom: 16px; }
.planner-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.planner-panel { min-width: 0; }
.planner-count { min-width: 25px; height: 25px; display: grid; place-items: center; border-radius: 20px; background: #f1f0ea; color: #73756b; font-size: 9px; font-weight: 600; }
#overdue-count:not(:empty) { background: #f7e9e3; color: #a45d4e; }
.planner-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid #f0efe9; cursor: pointer; }
.planner-row:first-child { border-top: 0; padding-top: 0; }
.planner-row-info { min-width: 0; flex: 1; }
.planner-row-info strong { display: block; overflow: hidden; color: #41433a; font-size: 10px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.planner-row-info span { display: block; margin-top: 5px; color: #96978d; font-size: 9px; }
.planner-row:hover .planner-row-info strong { color: var(--green); }
.unscheduled-panel { margin-top: 15px; }
.unscheduled-panel .planner-row { max-width: 540px; }
.activity-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.activity-item { display: flex; gap: 9px; padding: 12px 11px; border-radius: 6px; background: #faf9f5; }
.activity-icon { flex: 0 0 25px; height: 25px; display: grid; place-items: center; border-radius: 6px; background: #edf1e8; color: var(--green); font-size: 12px; }
.activity-item p { margin: 1px 0 0; color: #62645b; font-size: 9px; line-height: 1.5; }
.activity-item time { display: block; margin-top: 4px; color: #a0a095; font-size: 8px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 27px; }
.section-heading h1 { margin: 9px 0 5px; font-size: 37px; line-height: 1.15; letter-spacing: -1.8px; }
.heading-period { color: var(--orange); }
.section-heading p { margin: 0; color: #818278; font-size: 11px; }
.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 17px; }
.search-box { min-width: 200px; max-width: 325px; height: 38px; padding: 0 11px; display: flex; align-items: center; gap: 8px; flex: 1; border: 1px solid #e6e4dc; border-radius: 6px; background: var(--white); color: #97988e; }
.search-box > span { font-size: 19px; transform: rotate(-15deg); }
.search-box input { width: 100%; border: 0; outline: none; background: transparent; color: var(--ink); font-size: 10px; }
.search-box input::placeholder { color: #a7a79d; }
.select-wrap select, .field-label select { appearance: none; background: var(--white); }
.select-wrap { position: relative; }
.select-wrap::after { content: "⌄"; position: absolute; right: 10px; top: 8px; color: #8e8f84; pointer-events: none; font-size: 12px; }
.select-wrap select { height: 38px; min-width: 140px; padding: 0 29px 0 11px; border: 1px solid #e6e4dc; border-radius: 6px; color: #686a61; font-size: 10px; cursor: pointer; }
.result-count { margin-left: auto; color: #999a90; font-size: 10px; }
.project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.project-card { min-height: 204px; padding: 17px 17px 14px; display: flex; flex-direction: column; background: var(--white); border: 1px solid #eeece5; border-radius: 8px; cursor: pointer; transition: .2s ease; }
.project-card:hover { transform: translateY(-2px); border-color: #d8ddcf; box-shadow: 0 9px 22px rgba(39, 41, 32, .055); }
.project-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.project-card-mark { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 8px; background: #edf1e6; color: #65805d; font-size: 18px; }
.project-card:nth-child(4n+2) .project-card-mark { background: #f5ede4; color: #aa7652; }
.project-card:nth-child(4n+3) .project-card-mark { background: #efebf3; color: #84749b; }
.project-card:nth-child(4n) .project-card-mark { background: #e7efed; color: #638487; }
.project-card h3 { margin: 15px 0 5px; font-size: 14px; letter-spacing: -.35px; }
.project-card-description { min-height: 32px; margin: 0; color: #88897f; font-size: 10px; line-height: 1.55; display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.project-card-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 13px; }
.project-card-meta { color: #96978d; font-size: 9px; }
.project-card-skills { display: flex; align-items: center; margin-top: 12px; gap: 4px; overflow: hidden; }
.mini-tag { padding: 4px 6px; border-radius: 4px; background: #f4f3ed; color: #77796f; font-size: 8px; white-space: nowrap; }
.card-task-progress { display: flex; align-items: center; gap: 8px; margin-top: 10px; color: #929389; font-size: 8px; }
.card-task-progress .progress-track { flex: 1; }
.empty-state { grid-column: 1 / -1; padding: 54px 20px; text-align: center; border: 1px dashed #deddd4; border-radius: 8px; color: #87887f; }
.empty-state-mark { margin-bottom: 12px; color: #a7b49d; font-size: 25px; }
.empty-state h3 { margin: 0 0 6px; color: #41443b; font-size: 15px; }
.empty-state p { margin: 0 auto 17px; max-width: 330px; font-size: 10px; line-height: 1.6; }
.skills-intro { margin-bottom: 17px; padding: 14px 17px; display: flex; align-items: center; gap: 11px; border: 1px solid #e7e9dd; border-radius: 7px; background: #eff2e9; color: #66725d; font-size: 10px; }
.skills-intro strong { color: #3f5f3f; }
.skill-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.skill-card { padding: 17px; background: var(--white); border: 1px solid #eeece5; border-radius: 8px; }
.skill-card-header { display: flex; align-items: flex-start; gap: 11px; }
.skill-icon { width: 38px; height: 38px; display: grid; place-items: center; flex-shrink: 0; border-radius: 8px; background: #edf1e6; color: #68805c; font-size: 17px; }
.skill-card:nth-child(4n+2) .skill-icon { background: #f5ede4; color: #a87653; }
.skill-card:nth-child(4n+3) .skill-icon { background: #efebf3; color: #83739a; }
.skill-card:nth-child(4n) .skill-icon { background: #e7efed; color: #628386; }
.skill-card-heading { min-width: 0; flex: 1; }
.skill-card-heading h3 { margin: 2px 0 4px; overflow-wrap: anywhere; font-size: 13px; letter-spacing: -.2px; }
.skill-card-heading span { color: #98998f; font-size: 9px; }
.skill-level-badge { color: #55734e; background: #edf2e9; border-radius: 20px; padding: 5px 8px; font-size: 9px; font-weight: 600; white-space: nowrap; }
.skill-card-progress { margin: 17px 0 6px; }
.skill-xp-line { display: flex; align-items: center; justify-content: space-between; margin-top: 7px; color: #96978d; font-size: 9px; }
.skill-practice-meta { display: flex; justify-content: space-between; gap: 8px; margin-top: 12px; color: #96978d; font-size: 9px; }
.skill-card-bottom { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-top: 14px; padding-top: 12px; border-top: 1px solid #f0efe9; }
.skill-card-bottom span { color: #9a9b91; font-size: 9px; }
.skill-card-actions { display: flex; gap: 5px; }
.small-action { padding: 6px 8px; border: 1px solid #e7e7df; border-radius: 5px; background: var(--white); color: #73766c; font-size: 9px; cursor: pointer; }
.small-action:hover { background: #f4f5ef; color: var(--green); }
.gallery-project { margin-bottom: 28px; }
.gallery-project-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 13px; padding-bottom: 10px; border-bottom: 1px solid #e5e3dc; }
.gallery-project-heading h2 { margin: 0; font-size: 15px; letter-spacing: -.35px; }
.gallery-project-heading span { color: #98998f; font-size: 9px; }
.gallery-folder { margin: 13px 0 18px; }
.gallery-folder-title { margin-bottom: 9px; color: #77796f; font-size: 10px; font-weight: 600; }
.photo-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 9px; }
.photo-tile { aspect-ratio: 1; position: relative; overflow: hidden; border-radius: 6px; background: #eeece4; }
.photo-tile img { width: 100%; height: 100%; object-fit: cover; }
.photo-caption { position: absolute; inset: auto 0 0; padding: 15px 8px 7px; color: #fff; font-size: 9px; background: linear-gradient(transparent, rgba(0,0,0,.56)); opacity: 0; transition: .18s ease; }
.photo-tile:hover .photo-caption { opacity: 1; }
.gallery-empty { padding: 50px 20px; text-align: center; border: 1px dashed #deddd4; border-radius: 8px; }
.gallery-empty h3 { margin-bottom: 7px; font-size: 16px; }
.gallery-empty p { max-width: 360px; margin: 0 auto 16px; color: #85867c; font-size: 10px; line-height: 1.6; }
.practice-panel { margin-top: 17px; }
.practice-panel .select-wrap select { min-width: 130px; }
.practice-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.practice-entry { display: flex; align-items: flex-start; gap: 9px; min-width: 0; padding: 11px; border-radius: 6px; background: #faf9f5; }
.practice-entry-copy { min-width: 0; }
.practice-entry-copy p { margin: 1px 0 0; color: #62645b; font-size: 9px; line-height: 1.5; overflow-wrap: anywhere; }
.practice-entry-copy time { display: block; margin-top: 5px; color: #a0a095; font-size: 8px; }
.app-dialog { width: min(540px, calc(100% - 28px)); max-height: min(90vh, 760px); padding: 25px; overflow-y: auto; scrollbar-gutter: stable; border: 1px solid #e8e6de; border-radius: 11px; background: #fffefa; color: var(--ink); box-shadow: 0 24px 80px rgba(36, 39, 32, .2); }
.app-dialog::backdrop { background: rgba(36, 39, 32, .39); backdrop-filter: blur(2px); }
.app-dialog form { display: grid; gap: 15px; }
.compact-dialog { width: min(430px, calc(100% - 28px)); }
.dialog-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 2px; }
.dialog-heading h2 { margin: 6px 0 0; font-size: 21px; letter-spacing: -.7px; }
.dialog-close { width: 29px; height: 29px; border: 1px solid #ebe9e2; border-radius: 6px; background: transparent; color: #77796f; font-size: 19px; cursor: pointer; }
.dialog-close:hover { background: #f4f3ed; }
.field-label { display: grid; gap: 7px; color: #595b52; font-size: 10px; font-weight: 600; }
.field-label input, .field-label textarea, .field-label select { width: 100%; min-height: 38px; padding: 9px 10px; border: 1px solid #e7e5dd; border-radius: 5px; background: white; color: #35372f; font-size: 11px; font-weight: 400; outline: none; }
.field-label textarea { min-height: 75px; resize: vertical; line-height: 1.5; }
.field-label input::placeholder, .field-label textarea::placeholder { color: #aeaea5; }
.field-label input:focus, .field-label textarea:focus, .field-label select:focus { border-color: #a9b9a1; }
.optional { color: #a0a095; font-size: 9px; font-weight: 400; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.skill-picker { margin: 0; padding: 0; border: 0; }
.skill-picker legend { margin-bottom: 8px; color: #595b52; font-size: 10px; font-weight: 600; }
.skill-checklist { max-height: 115px; overflow: auto; display: flex; flex-wrap: wrap; gap: 6px; }
.skill-option { position: relative; }
.skill-option input { position: absolute; opacity: 0; }
.skill-option span { display: block; padding: 7px 9px; border: 1px solid #e6e5dc; border-radius: 20px; color: #77796f; font-size: 9px; cursor: pointer; }
.skill-option input:checked + span { border-color: #c8d6c1; background: #edf2e9; color: #4f6c48; }
.skill-option input:focus-visible + span { outline: 3px solid #9ab48c; outline-offset: 2px; }
.form-hint { margin: -5px 0 0; color: #929389; font-size: 9px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 7px; margin-top: 3px; }
.detail-dialog { width: min(700px, calc(100% - 28px)); padding: 0; }
.detail-content { padding: 25px; }
.detail-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 15px; }
.detail-title { display: flex; align-items: center; gap: 12px; }
.detail-title h2 { margin: 0 0 6px; font-size: 23px; letter-spacing: -.75px; overflow-wrap: anywhere; }
.detail-subtitle { color: #98998f; font-size: 9px; }
.detail-description { margin: 19px 0 14px; color: #73756b; font-size: 11px; line-height: 1.7; white-space: pre-wrap; }
.detail-skills { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 20px; }
.detail-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 15px 0 11px; border-top: 1px solid #eeece5; }
.detail-section-heading h3 { margin: 0; font-size: 13px; }
.subtle-count { margin-left: 6px; color: #999a90; font: 400 9px "Segoe UI", sans-serif; letter-spacing: 0; }
.detail-task-progress { display: flex; align-items: center; gap: 9px; margin: 2px 0 12px; color: #8b8d82; font-size: 9px; }
.detail-task-progress .progress-track { flex: 1; }
.inline-add-form { display: flex; align-items: center; gap: 7px; }
.inline-add-form input, .journal-add-form textarea { min-width: 0; flex: 1; padding: 9px 10px; border: 1px solid #e7e5dd; border-radius: 5px; color: #35372f; background: white; font-size: 10px; }
.inline-add-form input::placeholder, .journal-add-form textarea::placeholder { color: #a5a69c; }
.inline-add-form .button { min-height: 34px; padding: 0 10px; font-size: 9px; }
.task-list { display: grid; gap: 2px; margin: 9px 0 4px; padding: 0; list-style: none; }
.task-item { min-height: 34px; display: flex; align-items: center; gap: 8px; padding: 4px 7px; border-radius: 5px; }
.task-item:hover { background: #f8f7f2; }
.task-item label { min-width: 0; display: flex; align-items: center; flex: 1; gap: 8px; color: #55574e; font-size: 10px; cursor: pointer; }
.task-item input { accent-color: var(--green); }
.task-item label span { overflow-wrap: anywhere; }
.task-item.is-done label span { color: #a0a095; text-decoration: line-through; }
.task-remove { width: 23px; height: 23px; flex: 0 0 23px; border: 0; border-radius: 4px; background: transparent; color: #a09f94; font-size: 15px; cursor: pointer; }
.task-remove:hover { background: #f4ebe7; color: #a36054; }
.journal-add-form { display: grid; gap: 7px; }
.journal-add-form textarea { width: 100%; min-height: 60px; resize: vertical; line-height: 1.5; }
.journal-add-form > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.journal-add-form .button { min-height: 33px; padding: 0 10px; font-size: 9px; }
.journal-list { display: grid; gap: 8px; margin-top: 11px; }
.journal-entry { position: relative; padding: 10px 34px 10px 11px; border-radius: 5px; background: #faf9f5; }
.journal-date { margin-bottom: 5px; color: #929389; font-size: 8px; }
.journal-entry p { margin: 0; color: #62645b; font-size: 10px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.journal-entry .task-remove { position: absolute; top: 7px; right: 7px; }
.folder-block { margin: 7px 0 14px; }
.folder-heading { display: flex; justify-content: space-between; align-items: center; margin: 0 0 8px; color: #6c6e64; font-size: 10px; font-weight: 600; }
.folder-heading span { color: #a0a095; font-size: 9px; font-weight: 400; }
.detail-photo-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.detail-photo { aspect-ratio: 1; position: relative; overflow: hidden; border-radius: 5px; background: #f0eee7; }
.detail-photo img { width: 100%; height: 100%; object-fit: cover; }
.remove-photo { position: absolute; top: 5px; right: 5px; width: 22px; height: 22px; border: 0; border-radius: 50%; background: rgba(38, 40, 33, .68); color: white; font-size: 14px; cursor: pointer; }
.folder-empty { padding: 12px; border: 1px dashed #e4e2d9; border-radius: 5px; color: #999a90; font-size: 9px; }
.detail-footer { display: flex; justify-content: space-between; gap: 10px; margin-top: 20px; padding-top: 14px; border-top: 1px solid #eeece5; }
.danger-button { border: 0; padding: 7px 0; background: transparent; color: #a36054; font-size: 10px; cursor: pointer; }
.danger-button:hover { text-decoration: underline; }
.toast { position: fixed; z-index: 5; right: 24px; bottom: 22px; max-width: min(380px, calc(100vw - 40px)); padding: 11px 15px; transform: translateY(15px); opacity: 0; pointer-events: none; border-radius: 7px; background: #30372e; color: white; box-shadow: var(--shadow); font-size: 11px; transition: .2s ease; }
.toast.visible { opacity: 1; transform: translateY(0); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (max-width: 1080px) {
  .sidebar { width: 210px; }.main-content { margin-left: 210px; }
  .project-grid, .skill-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .photo-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .sidebar { width: 54px; padding: 14px 6px 10px; align-items: center; }
  .brand { margin: 0 0 24px; }
  .brand > span:last-child, .sidebar-label { display: none; }
  .main-nav { width: 100%; gap: 6px; }
  .nav-link { width: 40px; height: 38px; justify-content: center; padding: 0; font-size: 0; }
  .nav-link.active { display: flex; }
  .nav-icon { font-size: 16px; }
  .nav-count, .sidebar-note, .profile > div:nth-child(2), .profile-menu { display: none; }
  .profile { justify-content: center; width: 100%; padding-top: 10px; }
  .main-content { margin-left: 54px; }
  .topbar { min-height: 54px; height: auto; padding: 6px 12px; gap: 8px; flex-wrap: wrap; }
  .topbar-actions { gap: 6px; flex-wrap: wrap; }
  .local-indicator { display: none; }
  .page-wrap { padding: 18px 12px 40px; }
  .welcome-row { align-items: flex-start; flex-direction: column; margin-bottom: 16px; }
  .welcome-row h1 { max-width: 100%; font-size: 24px; letter-spacing: -0.5px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .activity-list { grid-template-columns: 1fr; }
  .practice-list { grid-template-columns: 1fr; }
  .activity-item { min-height: 44px; }
  .section-heading { align-items: flex-start; }
  .planner-columns { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
}
@media (max-width: 520px) {
  .sidebar { width: 48px; padding: 10px 4px; }
  .main-content { margin-left: 48px; }
  .topbar { padding: 6px 8px; gap: 4px; }
  .breadcrumbs { display: none; }
  .topbar-action-btn, #topbar-units-btn { padding: 3px 6px; font-size: 10px; }
  .button-small { min-height: 30px; padding: 0 8px; font-size: 10px; }
  .page-wrap { padding: 12px 8px 30px; }
  .welcome-row h1 { font-size: 20px; letter-spacing: -0.5px; margin-bottom: 4px; }
  .welcome-sub { font-size: 12px; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 6px; }
  .stat-card { min-height: 75px; padding: 10px; }
  .stat-number { font-size: 20px; margin-top: 3px; }
  .stat-label { font-size: 9px; }
  .stat-foot { font-size: 8.5px; }
  .panel { padding: 12px 10px; }
  .project-grid, .skill-grid { grid-template-columns: 1fr; }
  .planner-stats { grid-template-columns: 1fr; }
  .section-heading { flex-direction: column; margin-bottom: 14px; gap: 6px; }
  .section-heading h1 { font-size: 22px; }
  .toolbar { flex-wrap: wrap; gap: 6px; }
  .search-box { min-width: 100%; }
  .select-wrap select { min-width: 100%; }
  .result-count { width: 100%; text-align: left; }
  .photo-grid, .detail-photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inline-add-form { align-items: stretch; flex-direction: column; }
  .inline-add-form .button { white-space: normal; }
  .form-row { grid-template-columns: 1fr; }
  .app-dialog { padding: 14px; max-width: 95vw !important; width: 95vw !important; margin: 16px auto !important; }
  .detail-dialog { padding: 0; max-width: 96vw !important; width: 96vw !important; }
  .detail-content { padding: 14px 10px; }
  .calendar-grid { gap: 2px; }
  .calendar-cell { min-height: 60px; padding: 3px; }
  .calendar-badge { font-size: 8.5px; padding: 2px 3px; }
  .calendar-topbar { flex-direction: column; align-items: flex-start; gap: 6px; }
  .collab-member-actions { width: 100%; justify-content: flex-start; }
}

/* --- Theme Toggle & Custom Controls --- */
.theme-toggle-btn {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid #dcdad2;
  border-radius: 6px;
  background: var(--white);
  color: var(--ink);
  font-size: 15px;
  cursor: pointer;
  transition: .18s ease;
}
.theme-toggle-btn:hover {
  background: var(--green-pale);
  color: var(--green);
}

/* Lightbox Dialog */
.lightbox-dialog {
  padding: 0;
  background: transparent;
  border: 0;
  max-width: 92vw;
  max-height: 92vh;
  box-shadow: none;
  overflow: visible;
}
.lightbox-dialog::backdrop {
  background: rgba(18, 20, 16, .88);
  backdrop-filter: blur(8px);
}
.lightbox-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.lightbox-close {
  position: absolute;
  top: -38px;
  right: 0;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .2);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  transition: .15s ease;
}
.lightbox-close:hover {
  background: rgba(255, 255, 255, .4);
}
#lightbox-img {
  max-width: 88vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .6);
}
.lightbox-caption {
  margin-top: 10px;
  color: #e5e4dc;
  font-size: 12px;
  text-align: center;
  max-width: 85vw;
}

/* Task & Journal item buttons */
.task-item-actions {
  display: flex;
  align-items: center;
  gap: 3px;
  opacity: .5;
  transition: opacity .15s ease;
}
.task-item:hover .task-item-actions {
  opacity: 1;
}
.task-action-btn, .journal-action-btn {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
}
.task-action-btn:hover, .journal-action-btn:hover {
  background: var(--green-pale);
  color: var(--green);
}
.journal-actions {
  position: absolute;
  top: 7px;
  right: 7px;
  display: flex;
  align-items: center;
  gap: 3px;
}
.journal-entry .task-remove {
  position: static;
}

/* Folder Header actions */
.folder-title-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
}
.icon-link-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
  padding: 2px 5px;
  border-radius: 3px;
}
.icon-link-btn:hover {
  color: var(--green);
  background: var(--green-pale);
}
.icon-link-btn.danger-hover:hover {
  color: #a36054;
  background: #f4ebe7;
}

/* Clickable tags */
.mini-tag.clickable {
  cursor: pointer;
  transition: .15s ease;
}
.mini-tag.clickable:hover {
  background: var(--green-pale);
  color: var(--green-dark);
}

/* Photo tile pointer cursor */
.photo-tile, .detail-photo {
  cursor: pointer;
}

/* --- Dark Theme Support --- */
[data-theme="dark"] {
  color-scheme: dark;
  --paper: #161814;
  --white: #20231d;
  --ink: #e5e4dc;
  --muted: #95968b;
  --line: #2e3228;
  --green: #6ca577;
  --green-dark: #82ba8d;
  --green-pale: #283627;
  --orange: #e09467;
  --purple: #aa98c2;
  --shadow: 0 16px 40px rgba(0, 0, 0, .45);
  --scrollbar-thumb: rgba(255, 255, 255, 0.22);
  --scrollbar-thumb-hover: rgba(255, 255, 255, 0.45);
  --scrollbar-track: transparent;
}

[data-theme="dark"] .sidebar {
  background: #1a1d17;
  border-right-color: var(--line);
}
[data-theme="dark"] .topbar {
  background: rgba(22, 24, 20, .93);
  border-bottom-color: var(--line);
}
[data-theme="dark"] .breadcrumbs strong {
  color: #c8c9be;
}
[data-theme="dark"] .nav-link {
  color: #9ea094;
}
[data-theme="dark"] .nav-link:hover {
  background: #252920;
  color: var(--ink);
}
[data-theme="dark"] .nav-link.active {
  background: #273626;
  color: var(--green-dark);
}
[data-theme="dark"] .sidebar-note {
  background: #23271f;
}
[data-theme="dark"] .sidebar-note p {
  color: #a3a499;
}
[data-theme="dark"] .panel,
[data-theme="dark"] .stat-card,
[data-theme="dark"] .project-card,
[data-theme="dark"] .skill-card,
[data-theme="dark"] .app-dialog {
  background: var(--white);
  border-color: var(--line);
  color: var(--ink);
}
[data-theme="dark"] .stat-card::after {
  border-color: #2c3125;
  box-shadow: 0 0 0 8px #20231d, 0 0 0 9px #2c3125;
}
[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
  background: #282c23;
  border-color: #383e32;
  color: var(--ink);
}
[data-theme="dark"] .search-box {
  background: #282c23;
  border-color: #383e32;
}
[data-theme="dark"] .search-box input {
  color: var(--ink);
}
[data-theme="dark"] .button-outline {
  color: #c9cbc0;
  border-color: #3e4437;
}
[data-theme="dark"] .button-outline:hover {
  background: #2a2f25;
  border-color: #555e4b;
}
[data-theme="dark"] .button-quiet {
  color: #9fa195;
}
[data-theme="dark"] .button-quiet:hover {
  background: #272b22;
}
[data-theme="dark"] .theme-toggle-btn {
  background: #282c23;
  border-color: #383e32;
  color: var(--ink);
}
[data-theme="dark"] .activity-item,
[data-theme="dark"] .practice-entry,
[data-theme="dark"] .journal-entry {
  background: #272b22;
}
[data-theme="dark"] .activity-item p,
[data-theme="dark"] .practice-entry-copy p,
[data-theme="dark"] .journal-entry p {
  color: #b5b7ab;
}
[data-theme="dark"] .task-item:hover {
  background: #262b21;
}
[data-theme="dark"] .task-item label {
  color: #c4c6b9;
}
[data-theme="dark"] .mini-tag {
  background: #2b3026;
  color: #b5b7ab;
}
[data-theme="dark"] .status-pill {
  background: #292d24;
  color: #a4a79a;
}
[data-theme="dark"] .status-in-progress {
  background: #263625;
  color: #8bb785;
}
[data-theme="dark"] .status-planned {
  background: #392f23;
  color: #d6a176;
}
[data-theme="dark"] .status-completed {
  background: #23362a;
  color: #80b58e;
}
[data-theme="dark"] .status-postponed {
  background: #322b3a;
  color: #b7a1cb;
}
[data-theme="dark"] .status-on-hold {
  background: #2b2c28;
  color: #abaea0;
}
[data-theme="dark"] .priority-pill {
  background: #292d24;
  color: #a4a79a;
}
[data-theme="dark"] .priority-high {
  background: #3c2a26;
  color: #de8878;
}
[data-theme="dark"] .priority-low {
  background: #263526;
  color: #8bb785;
}
[data-theme="dark"] .skills-intro {
  background: #253324;
  border-color: #354933;
  color: #9cb897;
}
[data-theme="dark"] .skills-intro strong {
  color: #c3e0bd;
}
[data-theme="dark"] .skill-level-badge {
  background: #283926;
  color: #8bbe84;
}
[data-theme="dark"] .progress-track {
  background: #2c3127;
}
[data-theme="dark"] .project-card-description {
  color: #9ea094;
}
[data-theme="dark"] .empty-state,
[data-theme="dark"] .gallery-empty,
[data-theme="dark"] .folder-empty {
  border-color: #383d31;
  color: #989a8e;
}
[data-theme="dark"] .sync-message {
  background: #272b22;
  color: #b0b2a5;
}
[data-theme="dark"] .cloud-conflict {
  background: #352b22;
  border-color: #4d3d2e;
  color: #dec8b6;
}
[data-theme="dark"] .project-row,
[data-theme="dark"] .planner-row {
  border-top-color: #2c3026;
}
[data-theme="dark"] .planner-row-info strong {
  color: #c8c9be;
}
[data-theme="dark"] .detail-section-heading,
[data-theme="dark"] .detail-footer {
  border-top-color: var(--line);
}
[data-theme="dark"] .dialog-close {
  border-color: #373c30;
  color: #9ea094;
}
[data-theme="dark"] .dialog-close:hover {
  background: #2a2f25;
}
[data-theme="dark"] .field-label {
  color: #b5b7ab;
}
[data-theme="dark"] .skill-option span {
  border-color: #3a4033;
  color: #9ea094;
}
[data-theme="dark"] .skill-option input:checked + span {
  border-color: #55794d;
  background: #273825;
  color: #9bc894;
}
[data-theme="dark"] .small-action {
  background: #272b22;
  border-color: #393f32;
  color: #abada0;
}
[data-theme="dark"] .small-action:hover {
  background: #2f3629;
}
[data-theme="dark"] .photo-tile,
[data-theme="dark"] .detail-photo {
  background: #272b22;
}

/* Multi-Skill Filter Bar */
.skill-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: -6px 0 18px;
}
.skill-pill {
  border: 1px solid #e2e0d6;
  background: var(--white);
  color: #63655c;
  font-size: 10px;
  font-weight: 500;
  padding: 5px 11px;
  border-radius: 20px;
  cursor: pointer;
  transition: .15s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.skill-pill:hover {
  border-color: #abbfa6;
  background: var(--green-pale);
  color: var(--green-dark);
}
.skill-pill.active {
  background: var(--green);
  color: #ffffff;
  border-color: var(--green);
  font-weight: 600;
  box-shadow: 0 2px 7px rgba(47, 79, 55, .2);
}
[data-theme="dark"] .skill-pill, body.theme-dark .skill-pill {
  background: #242820;
  border-color: #383e30;
  color: #b5b7aa;
}
[data-theme="dark"] .skill-pill:hover, body.theme-dark .skill-pill:hover {
  background: #293827;
  border-color: var(--green);
  color: #a1cca5;
}
[data-theme="dark"] .skill-pill.active, body.theme-dark .skill-pill.active {
  background: var(--green);
  color: #11140e;
  border-color: var(--green);
  font-weight: 700;
}

/* Timeline / Activity & Journal View */
.timeline-toolbar {
  margin-bottom: 20px;
}
.timeline-container {
  display: grid;
  gap: 12px;
}
.timeline-card {
  padding: 16px 18px;
  background: var(--white);
  border: 1px solid #eeece5;
  border-radius: 8px;
  display: grid;
  gap: 8px;
  transition: border-color .15s ease;
}
.timeline-card:hover {
  border-color: #d6ddcb;
}
.timeline-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.timeline-card-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.timeline-badge {
  padding: 3px 7px;
  border-radius: 4px;
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.timeline-badge.badge-note { background: #edf2e9; color: #4f6c48; }
.timeline-badge.badge-task { background: #f4eee6; color: #9c6c44; }
.timeline-badge.badge-xp { background: #edf1e6; color: #55734e; }
.timeline-badge.badge-project { background: #f5ede4; color: #a56a47; }
.timeline-badge.badge-photo { background: #efebf3; color: #76688d; }
.timeline-time {
  color: #8c8d83;
  font-size: 10px;
}
.timeline-text {
  font-size: 11px;
  line-height: 1.6;
  color: var(--ink);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.timeline-card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}
[data-theme="dark"] .timeline-card, body.theme-dark .timeline-card {
  background: var(--white);
  border-color: var(--line);
}
[data-theme="dark"] .timeline-badge.badge-note, body.theme-dark .timeline-badge.badge-note { background: #263625; color: #8bb785; }
[data-theme="dark"] .timeline-badge.badge-task, body.theme-dark .timeline-badge.badge-task { background: #392f23; color: #d6a176; }
[data-theme="dark"] .timeline-badge.badge-xp, body.theme-dark .timeline-badge.badge-xp { background: #263826; color: #8ec387; }
[data-theme="dark"] .timeline-badge.badge-project, body.theme-dark .timeline-badge.badge-project { background: #382c23; color: #dba277; }
[data-theme="dark"] .timeline-badge.badge-photo, body.theme-dark .timeline-badge.badge-photo { background: #322b3a; color: #b7a1cb; }

/* Practice Timer */
.timer-body {
  display: grid;
  gap: 15px;
}
.timer-display {
  font: 700 48px "Segoe UI", sans-serif;
  letter-spacing: -2px;
  text-align: center;
  margin: 10px 0;
  color: var(--green);
}
.timer-presets {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
}
.timer-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 5px;
}

/* Prominent Delete Actions */
.small-action.danger-button,
.danger-button {
  color: #a36054 !important;
}
.small-action.danger-button:hover,
.danger-button:hover {
  background: #f8ebe7 !important;
  color: #8c3b2e !important;
}
[data-theme="dark"] .small-action.danger-button:hover,
body.theme-dark .small-action.danger-button:hover {
  background: #3c2a26 !important;
  color: #de8878 !important;
}

/* Ensure theme classes work across root/body */
html[data-theme="dark"],
body[data-theme="dark"],
body.theme-dark {
  background: #161814 !important;
  color: #e5e4dc !important;
}

/* Pinned Project Highlights & Pin Buttons */
.project-card.is-pinned {
  border-color: #d1b87a;
  box-shadow: 0 3px 12px rgba(184, 150, 68, 0.12);
}
[data-theme="dark"] .project-card.is-pinned,
body.theme-dark .project-card.is-pinned {
  border-color: #6d5b32;
  box-shadow: 0 3px 12px rgba(220, 180, 80, 0.08);
}
.pin-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #fdf6e2;
  color: #946f1e;
  border: 1px solid #ebd9a2;
  font-size: 8px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
[data-theme="dark"] .pin-badge,
body.theme-dark .pin-badge {
  background: #362e1c;
  color: #f1cb68;
  border-color: #574828;
}
.pin-toggle-btn {
  background: none;
  border: none;
  font-size: 16px;
  color: #b5b6ad;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: .15s ease;
  line-height: 1;
}
.pin-toggle-btn:hover {
  color: #d19a2e;
  background: rgba(209, 154, 46, 0.1);
}
.pin-toggle-btn.active {
  color: #d19a2e;
}

/* Materials & Supplies Tracker */
.materials-summary-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 14px;
  background: var(--green-pale);
  border: 1px solid #dbe5d7;
  border-radius: 6px;
  margin: 12px 0;
  font-size: 11px;
}
[data-theme="dark"] .materials-summary-bar,
body.theme-dark .materials-summary-bar {
  background: #232d21;
  border-color: #354732;
  color: #d4e2d1;
}
.materials-cost-total {
  font-weight: 700;
  color: var(--green-dark);
}
[data-theme="dark"] .materials-cost-total,
body.theme-dark .materials-cost-total {
  color: #a0d49b;
}
.materials-add-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 14px;
  background: rgba(0, 0, 0, 0.02);
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
}
[data-theme="dark"] .materials-add-form,
body.theme-dark .materials-add-form {
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.08);
}
.materials-add-form input,
.materials-add-form select {
  min-height: 36px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  color: var(--ink);
  font-size: 11px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
[data-theme="dark"] .materials-add-form input,
[data-theme="dark"] .materials-add-form select,
body.theme-dark .materials-add-form input,
body.theme-dark .materials-add-form select {
  background: #1e241c;
  border-color: #353e30;
  color: #e3e0d6;
}
.materials-add-form input:focus,
.materials-add-form select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 2px rgba(65, 106, 75, 0.2);
}
.materials-add-form input[name="materialName"] {
  flex: 2 1 180px;
}
.materials-add-form input[name="materialQty"] {
  flex: 1 1 90px;
  max-width: 130px;
}
.materials-add-form input[name="materialCost"] {
  flex: 1 1 90px;
  max-width: 120px;
}
.materials-add-form select[name="materialStatus"] {
  flex: 1.2 1 120px;
  cursor: pointer;
}
.materials-add-form button {
  min-height: 36px;
  padding: 0 14px;
  white-space: nowrap;
}
.materials-table-wrap {
  overflow-x: auto;
  margin-bottom: 16px;
}
.materials-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}
.materials-table th {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  color: #8c8d83;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.materials-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line-subtle);
  vertical-align: middle;
}
.materials-status-tag {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: opacity .15s ease;
}
.materials-status-tag:hover {
  opacity: 0.85;
}
.materials-status-tag.status-need {
  background: #fdf0ea;
  color: #b3592c;
  border: 1px solid #f2ceba;
}
.materials-status-tag.status-ordered {
  background: #edf3fb;
  color: #3b6ea6;
  border: 1px solid #c9dcf4;
}
.materials-status-tag.status-have {
  background: #eef5ec;
  color: #3a7536;
  border: 1px solid #c8e4c3;
}
[data-theme="dark"] .materials-status-tag.status-need,
body.theme-dark .materials-status-tag.status-need {
  background: #3c261e;
  color: #e8956c;
  border-color: #5a382c;
}
[data-theme="dark"] .materials-status-tag.status-ordered,
body.theme-dark .materials-status-tag.status-ordered {
  background: #1c2b3d;
  color: #89bbf3;
  border-color: #2e4562;
}
[data-theme="dark"] .materials-status-tag.status-have,
body.theme-dark .materials-status-tag.status-have {
  background: #1e331b;
  color: #92d48c;
  border-color: #30542c;
}

/* Practice Consistency & Streak Widget */
.streak-widget {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--white);
  border: 1px solid #eeece5;
  border-radius: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}
[data-theme="dark"] .streak-widget,
body.theme-dark .streak-widget {
  background: #1c2018;
  border-color: #2e3427;
}
.streak-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.streak-flame {
  font-size: 26px;
  line-height: 1;
}
.streak-heading {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}
.streak-caption {
  font-size: 10px;
  color: #8c8d83;
}
.streak-week-dots {
  display: flex;
  gap: 6px;
  align-items: center;
}
.streak-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.streak-day-label {
  font-size: 8px;
  color: #8c8d83;
  font-weight: 600;
  text-transform: uppercase;
}
.streak-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #e8e6dd;
  border: 1px solid #d4d1c4;
  transition: all .2s ease;
}
.streak-dot.active {
  background: var(--green);
  border-color: var(--green);
  box-shadow: 0 0 6px rgba(47, 79, 55, 0.35);
}
.streak-dot.today {
  outline: 2px solid #5a8a54;
  outline-offset: 1px;
}
[data-theme="dark"] .streak-dot,
body.theme-dark .streak-dot {
  background: #2b3026;
  border-color: #3e4737;
}
[data-theme="dark"] .streak-dot.active,
body.theme-dark .streak-dot.active {
  background: var(--green);
  border-color: var(--green);
}

/* Print Styles for Workshop Sheets */
@media print {
  @page {
    margin: 14mm 16mm;
    size: auto;
  }
  body {
    background: #ffffff !important;
    color: #000000 !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 13px !important;
  }
  .app-sidebar,
  .sidebar,
  .topbar,
  .dialog-close,
  .dialog-actions,
  .task-add-form,
  .journal-add-form,
  .materials-add-form,
  .task-item-actions,
  .journal-actions,
  .task-remove,
  .toast,
  .sync-actions,
  .detail-photo-grid,
  .detail-footer,
  .notification-btn,
  button:not(.print-keep),
  .view-section {
    display: none !important;
  }
  #detail-dialog {
    display: block !important;
    position: static !important;
    width: 100% !important;
    max-width: 100% !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 4px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    overflow: visible !important;
  }
  .detail-content {
    padding: 0 !important;
    max-width: 100% !important;
    overflow: visible !important;
  }
  .detail-top,
  .detail-description,
  .detail-section-heading,
  .task-list,
  .materials-table-wrap,
  .journal-list,
  .completion-banner,
  .materials-table,
  .folder-empty {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  .detail-section-heading {
    border-bottom: 1px solid #ddd !important;
    padding-bottom: 6px !important;
    margin-top: 16px !important;
  }
  .task-item input[type="checkbox"] {
    -webkit-appearance: checkbox !important;
    appearance: checkbox !important;
  }
  .materials-table th, .materials-table td {
    border-color: #cccccc !important;
    padding: 6px 8px !important;
  }
  .folder-empty {
    border: 1px dashed #bbb !important;
    background: #fafafa !important;
  }
}

/* Completion celebration banner */
.completion-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f0f7ec;
  border: 1px solid #cce3c4;
  border-radius: 8px;
  padding: 12px 16px;
  margin: 12px 0 16px;
}
[data-theme="dark"] .completion-banner,
body.theme-dark .completion-banner {
  background: #172619;
  border-color: #2b452e;
}
.completion-banner-icon {
  font-size: 24px;
  line-height: 1;
}
.completion-banner-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.completion-banner-text strong {
  font-size: 13px;
  color: var(--green);
}
.completion-banner-text span {
  font-size: 11px;
  color: #687262;
}
[data-theme="dark"] .completion-banner-text span,
body.theme-dark .completion-banner-text span {
  color: #9cb195;
}

/* Workshop Reference & Tools */
.tools-tab-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
  border-bottom: 1px solid #eeece5;
  padding-bottom: 8px;
  overflow-x: auto;
}
[data-theme="dark"] .tools-tab-bar,
body.theme-dark .tools-tab-bar {
  border-color: #2e3427;
}
.tool-tab-btn {
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: #72746a;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all .15s ease;
}
.tool-tab-btn:hover {
  background: #f2f0e9;
  color: var(--ink);
}
.tool-tab-btn.active {
  background: var(--green);
  color: white;
  border-color: var(--green);
}
[data-theme="dark"] .tool-tab-btn {
  color: #a4a59c;
}
[data-theme="dark"] .tool-tab-btn:hover {
  background: #252b21;
  color: #f0eee6;
}
[data-theme="dark"] .tool-tab-btn.active {
  background: var(--green);
  color: white;
}
.tool-calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.tool-result-box {
  padding: 12px 14px;
  background: #f7f6f0;
  border: 1px solid #e7e5dc;
  border-radius: 6px;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.6;
  margin-bottom: 14px;
}
[data-theme="dark"] .tool-result-box,
body.theme-dark .tool-result-box {
  background: #191c16;
  border-color: #2b3024;
  color: #dedcd4;
}
.tools-quick-chart {
  margin-top: 14px;
  border-top: 1px solid #eeece5;
  padding-top: 10px;
}
[data-theme="dark"] .tools-quick-chart,
body.theme-dark .tools-quick-chart {
  border-color: #2e3427;
}
.tools-chart-title {
  font-size: 11px;
  font-weight: 700;
  color: #72746a;
  margin-bottom: 8px;
}
.tools-chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
  gap: 6px;
  max-height: 180px;
  overflow-y: auto;
}
.tools-chart-cell {
  padding: 6px 8px;
  background: #fcfbf8;
  border: 1px solid #e8e6dc;
  border-radius: 4px;
  font-size: 10px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all .15s ease;
}
.tools-chart-cell:hover {
  border-color: var(--green);
  background: #f0f5ec;
}
[data-theme="dark"] .tools-chart-cell {
  background: #1a1e17;
  border-color: #2c3226;
  color: #cccabf;
}
[data-theme="dark"] .tools-chart-cell:hover {
  background: #202b1e;
  border-color: var(--green);
}

/* Tag filter pills bar */
.tag-filter-bar {
  margin-top: -6px;
  margin-bottom: 14px;
}
.pill-count {
  display: inline-block;
  padding: 1px 5px;
  margin-left: 4px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.08);
  font-size: 8px;
  font-weight: 700;
}
[data-theme="dark"] .pill-count,
body.theme-dark .pill-count {
  background: rgba(255, 255, 255, 0.12);
}

/* View mode toggle (Grid / Kanban) */
.section-actions-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.view-mode-toggle {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  padding: 2px;
}
.view-mode-btn {
  border: none;
  background: transparent;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s ease;
}
.view-mode-btn.active {
  background: var(--green);
  color: #fff;
}

/* Kanban Board */
.kanban-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 18px;
  align-items: start;
}
@media (max-width: 900px) {
  .kanban-board {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}
.kanban-column {
  background: #fbfaf7;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  min-height: 320px;
  transition: background 0.15s ease, border-color 0.15s ease;
}
[data-theme="dark"] .kanban-column,
body.theme-dark .kanban-column {
  background: #171b15;
  border-color: #2b3226;
}
.kanban-column.drag-over,
.kanban-dropzone.drag-over {
  background: rgba(65, 106, 75, 0.1) !important;
  border-color: var(--green) !important;
}
.kanban-col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
[data-theme="dark"] .kanban-col-head,
body.theme-dark .kanban-col-head {
  border-bottom-color: #2b3226;
}
.kanban-col-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.kanban-count {
  background: rgba(0, 0, 0, 0.06);
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}
[data-theme="dark"] .kanban-count,
body.theme-dark .kanban-count {
  background: rgba(255, 255, 255, 0.08);
  color: #a0a095;
}
.kanban-dropzone {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 240px;
  padding: 4px;
  border-radius: 8px;
  transition: all 0.2s ease;
}
.kanban-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  cursor: grab;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  user-select: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  position: relative;
}
[data-theme="dark"] .kanban-card,
body.theme-dark .kanban-card {
  background: #21261d;
  border-color: #343c2d;
  color: #e3e0d6;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}
.kanban-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
  border-color: var(--green);
}
[data-theme="dark"] .kanban-card:hover,
body.theme-dark .kanban-card:hover {
  border-color: #5c8f69;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
}
.kanban-card.is-dragging {
  opacity: 0.35;
  transform: scale(0.96);
  cursor: grabbing;
}
.kanban-card.is-pinned {
  border-left: 3px solid #d4973b;
}
.kanban-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.kanban-card-title {
  font-size: 13px;
  font-weight: 700;
  margin: 0 0 4px;
  line-height: 1.35;
  color: var(--ink);
}
[data-theme="dark"] .kanban-card-title,
body.theme-dark .kanban-card-title {
  color: #edebe4;
}
.kanban-card-desc {
  font-size: 11px;
  color: var(--muted);
  margin: 0 0 8px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.kanban-shift-select {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--muted);
  cursor: pointer;
  outline: none;
  transition: all 0.15s ease;
}
[data-theme="dark"] .kanban-shift-select,
body.theme-dark .kanban-shift-select {
  background: #171b15;
  border-color: #31382a;
  color: #a4a395;
}
.kanban-shift-select:hover {
  border-color: var(--green);
  color: var(--ink);
}
.kanban-card-meta {
  font-size: 10px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid var(--line-subtle, rgba(0, 0, 0, 0.05));
}
[data-theme="dark"] .kanban-card-meta,
body.theme-dark .kanban-card-meta {
  border-top-color: rgba(255, 255, 255, 0.05);
}
.kanban-empty-drop {
  border: 1px dashed var(--line);
  border-radius: 6px;
  padding: 24px 10px;
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.015);
}
[data-theme="dark"] .kanban-empty-drop,
body.theme-dark .kanban-empty-drop {
  border-color: #2b3226;
  background: rgba(255, 255, 255, 0.01);
}

/* Collapsible Panels & Window Minimization */
.panel-collapse-btn {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s ease;
}
.panel-collapse-btn:hover {
  color: var(--ink);
  border-color: var(--green);
  background: var(--green-pale);
}
[data-theme="dark"] .panel-collapse-btn,
body.theme-dark .panel-collapse-btn {
  border-color: #31382a;
  color: #a4a395;
}
[data-theme="dark"] .panel-collapse-btn:hover,
body.theme-dark .panel-collapse-btn:hover {
  background: #233525;
  color: #c9e0c5;
}
.panel.is-collapsed .achievements-grid,
.panel.is-collapsed .panel-collapsible-body {
  display: none !important;
}

/* Notification Center */
.notification-btn {
  position: relative;
  background: transparent;
  border: 1px solid #e6e4dc;
  border-radius: 6px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ink);
  transition: all 0.2s ease;
}
[data-theme="dark"] .notification-btn,
body.theme-dark .notification-btn {
  border-color: #383e32;
  color: #edebe4;
}
.notification-btn:hover {
  background: var(--green-pale);
  border-color: var(--green);
}
[data-theme="dark"] .notification-btn:hover,
body.theme-dark .notification-btn:hover {
  background: #273828;
  border-color: #4b6f4e;
}
.notification-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #e04f44;
  color: #ffffff;
  font-size: 9px;
  font-weight: 800;
  min-width: 17px;
  height: 17px;
  line-height: 17px;
  border-radius: 999px;
  padding: 0 4px;
  text-align: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  pointer-events: none;
}
.notification-dialog {
  max-width: 480px !important;
  width: 90% !important;
}
.notification-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 380px;
  overflow-y: auto;
  margin: 12px 0;
  padding-right: 4px;
}
.notification-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--paper);
  border: 1px solid var(--line);
  position: relative;
  transition: all 0.15s ease;
}
[data-theme="dark"] .notification-item,
body.theme-dark .notification-item {
  background: #1e241c;
  border-color: #31382a;
}
.notification-item.unread {
  background: rgba(65, 106, 75, 0.08);
  border-color: rgba(65, 106, 75, 0.3);
}
[data-theme="dark"] .notification-item.unread,
body.theme-dark .notification-item.unread {
  background: rgba(65, 106, 75, 0.18);
  border-color: rgba(92, 143, 105, 0.4);
}
.notification-item-icon {
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}
.notification-item-body {
  flex: 1;
  min-width: 0;
}
.notification-item-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.notification-item-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}
[data-theme="dark"] .notification-item-title,
body.theme-dark .notification-item-title {
  color: #f1efe8;
}
.notification-item-time {
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
}
.notification-item-msg {
  font-size: 11px;
  color: var(--muted);
  margin: 4px 0 0;
  line-height: 1.4;
}
[data-theme="dark"] .notification-item-msg,
body.theme-dark .notification-item-msg {
  color: #bbb9af;
}
.notification-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #416a4b;
  flex-shrink: 0;
  margin-top: 6px;
}
[data-theme="dark"] .notification-dot,
body.theme-dark .notification-dot {
  background: #6ea377;
}
.notification-empty {
  text-align: center;
  padding: 30px 16px;
  color: var(--muted);
}
.notification-empty .empty-icon {
  font-size: 32px;
  margin-bottom: 8px;
  opacity: 0.6;
}
.notification-empty h4 {
  margin: 0 0 6px;
  font-size: 14px;
  color: var(--ink);
}
[data-theme="dark"] .notification-empty h4,
body.theme-dark .notification-empty h4 {
  color: #edebe4;
}
.notification-empty p {
  margin: 0;
  font-size: 11px;
}

/* Shopping List Mode */
.shopping-summary-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}
.shopping-stat-pill {
  font-size: 13px;
  font-weight: 600;
}
.shopping-stat-pill strong {
  color: var(--green);
  font-size: 15px;
}
.shopping-list-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.shopping-item-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  gap: 14px;
  transition: all 0.15s ease;
}
.shopping-item-card.is-purchased {
  opacity: 0.6;
  background: rgba(0, 0, 0, 0.02);
}
.shopping-item-main {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
}
.shopping-checkbox-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  color: transparent;
  flex-shrink: 0;
  transition: all 0.15s ease;
}
.shopping-checkbox-btn.checked {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}
.shopping-item-text strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 3px;
}
.shopping-item-text span {
  font-size: 11px;
  color: var(--muted);
}
.shopping-item-side {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.shopping-cost-badge {
  font-size: 13px;
  font-weight: 700;
  color: var(--green);
  background: #eef5e9;
  padding: 4px 10px;
  border-radius: 999px;
}

/* Inventory View */
.inventory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  margin-top: 14px;
}
.inventory-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}
.inventory-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.inventory-card-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
}
.inventory-card-cat {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-top: 2px;
}
.inventory-location-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  background: rgba(0, 0, 0, 0.05);
  padding: 2px 7px;
  border-radius: 4px;
  color: var(--muted);
}
.inventory-qty-control {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
}
.inventory-bump-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg);
  cursor: pointer;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.15s ease;
}
.inventory-bump-btn:hover {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}
.inventory-qty-display {
  font-size: 16px;
  font-weight: 700;
  min-width: 48px;
  text-align: center;
}

/* Before & After Comparison */
.compare-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}
.compare-viewport {
  position: relative;
  width: 100%;
  height: 380px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #000;
  cursor: ew-resize;
  user-select: none;
  touch-action: none;
}
.compare-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.compare-layer img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.compare-layer-before {
  overflow: hidden;
  width: 50%;
  border-right: 2px solid #fff;
}
.compare-layer-before img {
  width: calc(100% * (100 / 50));
  max-width: none;
}
.compare-badge {
  position: absolute;
  bottom: 12px;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #fff;
  background: rgba(0, 0, 0, 0.6);
}
.compare-badge-before { left: 12px; }
.compare-badge-after { right: 12px; }
.compare-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: #fff;
  transform: translateX(-50%);
  pointer-events: none;
}
.compare-handle-knob {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #fff;
  color: #242720;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.compare-slider-wrap {
  margin-top: 14px;
}
.compare-slider-wrap input[type="range"] {
  width: 100%;
}

/* Photo Annotation Studio */
.annotate-dialog {
  max-width: 900px;
  width: 95vw;
}
.annotate-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
}
.annotate-tools-group,
.annotate-color-group,
.annotate-size-group,
.annotate-actions-group {
  display: flex;
  align-items: center;
  gap: 6px;
}
.tool-btn, .size-btn {
  border: 1px solid var(--border);
  background: var(--bg);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
.tool-btn.active, .size-btn.active {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}
.color-swatch {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease;
}
.color-swatch.active {
  transform: scale(1.2);
  border-color: #242720;
}
.annotate-canvas-wrap {
  width: 100%;
  height: 480px;
  max-height: 60vh;
  background: #111;
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  touch-action: none;
}
#annotate-canvas {
  max-width: 100%;
  max-height: 100%;
  display: block;
  cursor: crosshair;
}

/* QR Label */
.qr-dialog-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 8px 0;
  width: 100%;
  box-sizing: border-box;
}
.qr-bin-label {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 16px;
  border: 2px dashed #9ca3af;
  border-radius: 10px;
  padding: 16px 18px;
  background: #ffffff !important;
  color: #111827 !important;
  max-width: 480px;
  width: 100%;
  box-sizing: border-box;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  margin: 0 auto;
}
.qr-label-qr-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-right: 14px;
  border-right: 1px dashed #d1d5db;
  flex-shrink: 0;
  width: 130px;
}
.qr-label-code-wrap svg {
  display: block;
  width: 120px;
  height: 120px;
  margin: 0 auto;
}
.qr-label-scan-tip {
  font-size: 9px;
  font-weight: 700;
  color: #6b7280;
  letter-spacing: 0.5px;
  margin-top: 6px;
  text-transform: uppercase;
  text-align: center;
}
.qr-label-info-side {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.qr-label-eyebrow {
  font-size: 9px;
  font-weight: 700;
  color: #9ca3af;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: 3px;
}
.qr-label-title {
  font-size: 16px;
  font-weight: 800;
  color: #111827;
  line-height: 1.25;
  margin: 0 0 6px 0;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.qr-label-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.qr-label-url {
  font-size: 9px;
  color: #6b7280;
  word-break: break-all;
  line-height: 1.35;
  background: #f3f4f6;
  padding: 5px 8px;
  border-radius: 4px;
  margin-top: 6px;
  font-family: monospace;
}

/* Cut List Optimizer */
.cutlist-result-wrap {
  margin-top: 12px;
}
.cutlist-board-block {
  margin-bottom: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px;
}
.cutlist-board-head {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 8px;
}
.cutlist-bar-container {
  display: flex;
  height: 34px;
  width: 100%;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.cut-part-box {
  background: #416a4b;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-right: 2px solid #e53e3e;
}
.cut-part-box.alt-color {
  background: #2b4f34;
}
.cut-scrap-box {
  background: repeating-linear-gradient(45deg, #e2e8f0, #e2e8f0 6px, #edf2f7 6px, #edf2f7 12px);
  color: #718096;
  font-size: 10px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px 4px;
  overflow: hidden;
}
.cutlist-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.cutlist-metric {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 12px;
}
.cutlist-metric-title {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
.cutlist-metric-val {
  font-size: 16px;
  font-weight: 800;
  color: var(--green);
}

/* Achievements & Milestones */
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.achievement-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  transition: all 0.15s ease;
}
.achievement-card.unlocked {
  border-color: #d4973b;
  background: linear-gradient(135deg, var(--surface) 80%, rgba(212, 151, 59, 0.1));
}
.achievement-card.locked {
  opacity: 0.55;
  filter: grayscale(1);
}
.achievement-icon {
  font-size: 24px;
  flex-shrink: 0;
}
.achievement-info strong {
  display: block;
  font-size: 12px;
  font-weight: 700;
}
.achievement-info p {
  font-size: 10px;
  color: var(--muted);
  margin-top: 2px;
}

/* Weekly Practice Goal */
.weekly-goal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}
.weekly-goal-left {
  flex: 1;
  min-width: 220px;
}
.weekly-goal-bar-wrap {
  height: 10px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 8px;
}
.weekly-goal-bar-fill {
  height: 100%;
  background: var(--green);
  border-radius: 999px;
  transition: width 0.3s ease;
}

/* Voice Dictation Mic Button */
.mic-btn.is-recording {
  background: #e53e3e !important;
  color: #fff !important;
  border-color: #e53e3e !important;
  animation: mic-pulse 1s infinite alternate;
}
@keyframes mic-pulse {
  from { transform: scale(1); opacity: 1; }
  to { transform: scale(1.06); opacity: 0.85; }
}

/* Project Dossier Dialog */
.dossier-dialog {
  max-width: 900px;
  width: 95vw;
}
.dossier-topbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 16px;
}
.dossier-sheet {
  background: #fff;
  color: #171a16;
  padding: 24px;
  border-radius: 8px;
  border: 1px solid var(--border);
}
.dossier-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  border-bottom: 2px solid #242720;
  padding-bottom: 16px;
  margin-bottom: 20px;
}
.dossier-title-col h1 {
  font-size: 26px;
  font-weight: 800;
  margin: 0 0 6px 0;
}
.dossier-section {
  margin-bottom: 22px;
}
.dossier-section h2 {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #416a4b;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 6px;
  margin-bottom: 10px;
}

/* Print CSS */
@media print {
  body {
    background: #fff !important;
    color: #000 !important;
  }
  .app-shell, .sidebar, .topbar, .no-print, .dialog-close, .dialog-actions, .toast, .showcase-markdown-section {
    display: none !important;
  }
  .dossier-dialog[open] {
    position: static !important;
    max-width: 100% !important;
    width: 100% !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  .dossier-sheet {
    display: block !important;
    border: none !important;
    padding: 0 !important;
  }
  .showcase-dialog[open], #showcase-dialog[open] {
    position: static !important;
    max-width: 100% !important;
    width: 100% !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  .showcase-dialog[open] .dialog-heading, #showcase-dialog[open] .dialog-heading {
    display: none !important;
  }
  .qr-dialog[open], #qr-dialog[open] {
    position: static !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 30px auto !important;
    display: flex !important;
    justify-content: center !important;
    background: transparent !important;
  }
  .qr-dialog[open] .dialog-heading, #qr-dialog[open] .dialog-heading {
    display: none !important;
  }
  .qr-bin-label, #printable-qr-label {
    border: 2px dashed #000 !important;
    box-shadow: none !important;
    page-break-inside: avoid;
    background: #fff !important;
    color: #000 !important;
    width: 440px !important;
    max-width: 100% !important;
  }
}

/* Dark mode theme overrides for new elements */
[data-theme="dark"] .kanban-column,
body.theme-dark .kanban-column {
  background: #171b15;
  border-color: #2b3226;
}
[data-theme="dark"] .kanban-card,
body.theme-dark .kanban-card {
  background: #21261d;
  border-color: #384232;
  color: #e3e0d6;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}
[data-theme="dark"] .shopping-summary-bar,
body.theme-dark .shopping-summary-bar,
[data-theme="dark"] .shopping-item-card,
body.theme-dark .shopping-item-card,
[data-theme="dark"] .inventory-card,
body.theme-dark .inventory-card,
[data-theme="dark"] .achievement-card,
body.theme-dark .achievement-card,
[data-theme="dark"] .weekly-goal-card,
body.theme-dark .weekly-goal-card {
  background: #1a1e17;
  border-color: #2c3226;
  color: #e3e0d6;
}
[data-theme="dark"] .shopping-cost-badge,
body.theme-dark .shopping-cost-badge {
  background: #253322;
  color: #8ec387;
}
[data-theme="dark"] .view-mode-toggle,
body.theme-dark .view-mode-toggle {
  background: #171b15;
  border-color: #2c3226;
}
[data-theme="dark"] .cutlist-board-block,
body.theme-dark .cutlist-board-block,
[data-theme="dark"] .cutlist-metric,
body.theme-dark .cutlist-metric {
  background: #1a1e17;
  border-color: #2c3226;
}
[data-theme="dark"] .cut-scrap-box,
body.theme-dark .cut-scrap-box {
  background: repeating-linear-gradient(45deg, #2d3748, #2d3748 6px, #1a202c 6px, #1a202c 12px);
  color: #a0aec0;
}
[data-theme="dark"] .dossier-sheet,
body.theme-dark .dossier-sheet {
  background: #1e231b;
  color: #e3e0d6;
  border-color: #2e3529;
}
[data-theme="dark"] .dossier-header-row,
body.theme-dark .dossier-header-row {
  border-color: #3d4536;
}
[data-theme="dark"] .dossier-section h2,
body.theme-dark .dossier-section h2 {
  border-color: #2e3529;
}
[data-theme="dark"] .qr-bin-label,
body.theme-dark .qr-bin-label {
  background: #ffffff;
  color: #000000;
}

/* --- Multi-User Cloud & Admin Console Styles --- */
.admin-inspect-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  background: #fff8e6;
  border-bottom: 2px solid #ecc94b;
  color: #744210;
  font-size: 13px;
  animation: slideDown .2s ease;
}
.admin-inspect-info {
  display: flex;
  align-items: center;
  gap: 8px;
}
.inspect-icon {
  font-size: 18px;
}
[data-theme="dark"] .admin-inspect-banner,
body.theme-dark .admin-inspect-banner {
  background: #2a220e;
  border-bottom-color: #b7791f;
  color: #fbd38d;
}

.admin-nav-link {
  color: #d69e2e !important;
}
.admin-nav-link.active {
  background: #fefcbf !important;
  color: #744210 !important;
}
[data-theme="dark"] .admin-nav-link.active,
body.theme-dark .admin-nav-link.active {
  background: #3b2f15 !important;
  color: #fbd38d !important;
}

.admin-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.admin-metric-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.admin-metric-icon {
  font-size: 26px;
  line-height: 1;
}
.admin-metric-body {
  display: flex;
  flex-direction: column;
}
.admin-metric-body strong {
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.1;
}
.admin-metric-body span {
  font-size: 11px;
  color: var(--muted);
}

.admin-users-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}
.admin-user-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform .15s ease, box-shadow .15s ease;
}
.admin-user-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,.06);
}
.admin-user-top {
  display: flex;
  align-items: center;
  gap: 10px;
}
.admin-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--green);
  color: white;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 16px;
  flex: 0 0 40px;
}
.admin-user-meta {
  flex: 1;
  min-width: 0;
}
.admin-user-meta strong {
  display: block;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--ink);
}
.admin-user-meta span {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}
.role-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: .4px;
}
.role-pill.role-admin {
  background: #fef3c7;
  color: #92400e;
}
.role-pill.role-maker {
  background: #e0f2fe;
  color: #0369a1;
}
[data-theme="dark"] .role-pill.role-admin,
body.theme-dark .role-pill.role-admin {
  background: #451a03;
  color: #fde68a;
}
[data-theme="dark"] .role-pill.role-maker,
body.theme-dark .role-pill.role-maker {
  background: #082f49;
  color: #bae6fd;
}

.admin-user-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  background: #f7f6f0;
  border-radius: 6px;
  padding: 8px;
  text-align: center;
}
[data-theme="dark"] .admin-user-stats,
body.theme-dark .admin-user-stats {
  background: #171b14;
}
.admin-user-stats-item strong {
  display: block;
  font-size: 13px;
  color: var(--ink);
}
.admin-user-stats-item span {
  font-size: 10px;
  color: var(--muted);
}
.admin-user-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.sql-code-block {
  background: #1e1e1e;
  color: #d4d4d4;
  padding: 12px;
  border-radius: 6px;
  font-family: Consolas, monospace;
  font-size: 11px;
  overflow-x: auto;
  line-height: 1.45;
  max-height: 160px;
}

/* Auth Dialog */
.auth-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}
.auth-tab-btn {
  padding: 6px 14px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s ease;
}
.auth-tab-btn.active {
  background: var(--green);
  color: white;
}
.auth-alert {
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 12px;
  margin-bottom: 14px;
  line-height: 1.4;
}
.auth-alert.error {
  background: #fed7d7;
  color: #9b2c2c;
  border: 1px solid #feb2b2;
}
.auth-alert.success {
  background: #c6f6d5;
  color: #22543d;
  border: 1px solid #9ae6b4;
}
[data-theme="dark"] .auth-alert.error,
body.theme-dark .auth-alert.error {
  background: #4a1d1d;
  color: #feb2b2;
  border-color: #742a2a;
}
[data-theme="dark"] .auth-alert.success,
body.theme-dark .auth-alert.success {
  background: #1c3d27;
  color: #9ae6b4;
  border-color: #276749;
}

.auth-row-links {
  display: flex;
  justify-content: flex-end;
  margin: 6px 0 14px;
}
.auth-alt-wrap {
  margin-top: 14px;
  text-align: center;
}
.auth-divider {
  position: relative;
  margin: 12px 0;
  text-align: center;
}
.auth-divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--line);
}
.auth-divider span {
  position: relative;
  background: var(--white);
  padding: 0 10px;
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 1px;
}
.button-block {
  width: 100%;
  justify-content: center;
}

.user-top-btn {
  font-weight: 600;
}
.user-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.user-menu-item:last-child {
  border-bottom: none;
}

/* Guest Auth Lock Screen / Gate */
body.auth-locked .app {
  filter: blur(6px);
  pointer-events: none;
  user-select: none;
  transition: filter 0.3s ease;
}

body.auth-locked #auth-dialog {
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6), 0 0 0 1px var(--line);
}

body.auth-locked #auth-dialog::backdrop {
  background: rgba(10, 16, 22, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

body.auth-locked #auth-dialog .dialog-close,
body.auth-locked #auth-dialog [data-action="close-dialog"] {
  display: none !important;
}

.auth-locked-banner {
  display: none;
  padding: 8px 12px;
  background: rgba(43, 108, 176, 0.12);
  border: 1px solid rgba(43, 108, 176, 0.3);
  border-radius: 6px;
  font-size: 12px;
  color: var(--blue, #2b6cb0);
  margin-bottom: 12px;
  text-align: center;
}
[data-theme="dark"] .auth-locked-banner,
body.theme-dark .auth-locked-banner {
  background: rgba(99, 179, 237, 0.15);
  border-color: rgba(99, 179, 237, 0.35);
  color: #90cdf4;
}
body.auth-locked .auth-locked-banner {
  display: block;
}

/* User Profile & Account Settings Dialog */
.profile-settings-dialog {
  width: min(520px, calc(100% - 28px));
  max-height: min(88vh, 720px);
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.profile-tabs-nav {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
  margin: 12px 0 16px;
}

.profile-tab-btn {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.profile-tab-btn:hover {
  background: var(--line);
  color: var(--ink);
}

.profile-tab-btn.active {
  background: var(--paper-warm, #f3f1e9);
  color: var(--ink);
  border-color: var(--line);
}

[data-theme="dark"] .profile-tab-btn.active,
body.theme-dark .profile-tab-btn.active {
  background: #252b21;
  color: #f7f6f0;
}

.profile-section-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

[data-theme="dark"] .profile-section-card,
body.theme-dark .profile-section-card {
  background: #171b14;
}

/* 🏷️ Professional Site Footer */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
  background: var(--paper-warm, #f8f7f2);
  padding: 48px 5.15% 24px;
  color: var(--ink);
  transition: background 0.2s ease, border-color 0.2s ease;
  width: 100%;
}

[data-theme="dark"] .site-footer,
body.theme-dark .site-footer {
  background: #141812;
  border-color: #272f22;
}

.site-footer-inner {
  max-width: 1220px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 2fr;
  gap: 48px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--line);
}

[data-theme="dark"] .site-footer-inner,
body.theme-dark .site-footer-inner {
  border-color: #272f22;
}

.footer-brand-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.footer-brand .brand-period {
  color: var(--green);
}

.footer-tagline {
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 320px;
  margin: 0;
}

.footer-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
  background: var(--paper, #fff);
  border: 1px solid var(--line);
  width: fit-content;
  color: var(--muted);
}

[data-theme="dark"] .footer-status-pill,
body.theme-dark .footer-status-pill {
  background: #1d2319;
  border-color: #313a29;
}

.footer-status-pill .status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #999;
}

.footer-status-pill.connected .status-dot {
  background: #48bb78;
  box-shadow: 0 0 6px rgba(72, 187, 120, 0.5);
}

.footer-status-pill.pending .status-dot {
  background: #ecc94b;
}

.footer-status-pill.offline .status-dot {
  background: #a0aec0;
}

.footer-links-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.footer-col h4 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 14px;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-link-btn {
  background: none;
  border: none;
  padding: 0;
  color: var(--ink);
  font-size: 12px;
  text-align: left;
  cursor: pointer;
  transition: color 0.15s ease, transform 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.footer-link-btn:hover {
  color: var(--green);
  text-decoration: underline;
  transform: translateX(2px);
}

[data-theme="dark"] .footer-link-btn,
body.theme-dark .footer-link-btn {
  color: #c9cbbf;
}

[data-theme="dark"] .footer-link-btn:hover,
body.theme-dark .footer-link-btn:hover {
  color: #88c79b;
}

.footer-bottom-row {
  max-width: 1220px;
  margin: 0 auto;
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 11px;
  color: var(--muted);
}

.footer-sep {
  margin: 0 6px;
  opacity: 0.5;
}

.footer-meta-links {
  display: flex;
  align-items: center;
  gap: 14px;
}

.version-tag {
  font-family: monospace;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--line);
  color: var(--ink);
  font-size: 10px;
}

[data-theme="dark"] .version-tag,
body.theme-dark .version-tag {
  background: #2b3324;
  color: #b7b9ae;
}

.footer-mini-btn {
  background: none;
  border: none;
  padding: 0;
  font-size: 11px;
  color: var(--muted);
  cursor: pointer;
}

.footer-mini-btn:hover {
  color: var(--ink);
  text-decoration: underline;
}

@media (max-width: 860px) {
  .site-footer-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .footer-links-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .footer-links-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }
}

/* ==========================================================================
   FEATURE SUITE: 5 Advanced Maker Modules
   ========================================================================== */

/* 1. Pomodoro Focus Timer & Circular Progress Ring */
.timer-ring-container {
  position: relative;
  width: 220px;
  height: 220px;
  margin: 16px auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.timer-ring-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.timer-ring-bg {
  fill: none;
  stroke: var(--line);
  stroke-width: 8;
}
.timer-ring-progress {
  fill: none;
  stroke: var(--accent);
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.4s ease, stroke 0.3s ease;
}
.timer-ring-center {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.timer-ring-time {
  font-size: 42px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -1px;
  color: var(--ink);
  line-height: 1;
}
.timer-ring-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 6px;
}
.pomodoro-modes {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.pomodoro-cycle-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 10px 0 16px;
  font-size: 12px;
  color: var(--muted);
}
.pomodoro-dots-strip {
  display: flex;
  gap: 6px;
}
.pomodoro-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line);
  transition: background 0.2s, transform 0.2s;
}
.pomodoro-dot.filled {
  background: #e11d48;
  transform: scale(1.15);
}
.pomodoro-dot.current {
  background: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-bg, rgba(59,130,246,0.3));
}
.timer-sound-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
}
.timer-sound-pill.active {
  color: var(--ink);
  border-color: var(--accent);
  background: var(--surface-hover);
}
@keyframes pulseFocusGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(225, 29, 72, 0.4); }
  50% { box-shadow: 0 0 0 6px rgba(225, 29, 72, 0); }
}
.topbar-focus-running {
  background: #ffe4e6 !important;
  color: #9f1239 !important;
  border-color: #f43f5e !important;
  animation: pulseFocusGlow 2s infinite ease-in-out;
}
[data-theme="dark"] .topbar-focus-running {
  background: #4c0519 !important;
  color: #fecdd3 !important;
  border-color: #be123c !important;
}

/* 2. Project Cost & Budget Tracker */
.project-budget-card {
  margin: 16px 0;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.budget-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}
.budget-stat-item {
  display: flex;
  flex-direction: column;
}
.budget-stat-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.budget-stat-val {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}
.budget-stat-val.under { color: #16a34a; }
.budget-stat-val.over { color: #dc2626; }
.budget-meter-track {
  height: 8px;
  background: var(--line);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
}
.budget-meter-fill {
  height: 100%;
  background: var(--accent);
  transition: width 0.3s ease;
}
.budget-meter-fill.over-budget {
  background: #dc2626;
}
.shopping-cart-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--surface-hover);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}

/* 3. Interactive Calendar & Visual Timeline */
.planner-view-toggles {
  display: flex;
  gap: 6px;
}
.calendar-container {
  margin-top: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}
.calendar-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 10px;
}
.calendar-month-heading {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
}
.calendar-nav-buttons {
  display: flex;
  gap: 6px;
  align-items: center;
}
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
}
.calendar-day-label {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  padding: 6px 0;
  letter-spacing: 0.5px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.calendar-cell {
  min-width: 0;
  min-height: 105px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  overflow: hidden;
  transition: background 0.15s, border-color 0.15s;
}
.calendar-cell:hover {
  background: var(--surface-hover);
}
.calendar-cell.is-today {
  border-color: var(--accent);
  background: var(--accent-bg, rgba(59,130,246,0.06));
}
.calendar-cell.is-other-month {
  opacity: 0.45;
}
.calendar-cell-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.calendar-cell-num {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
}
.calendar-cell.is-today .calendar-cell-num {
  color: var(--accent);
}
.calendar-events-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow-y: auto;
  overflow-x: hidden;
  max-height: 105px;
  scrollbar-width: thin;
  min-width: 0;
}
.calendar-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 3px 6px;
  border-radius: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  line-height: 1.25;
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  transition: filter 0.15s, box-shadow 0.15s;
}
.calendar-badge:hover {
  filter: brightness(1.15);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.calendar-badge-project {
  background: var(--surface-hover);
  border: 1px solid var(--line);
  color: var(--ink);
}
.calendar-badge-practice {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}
[data-theme="dark"] .calendar-badge-practice {
  background: #78350f;
  color: #fef3c7;
  border-color: #92400e;
}
.calendar-badge-overdue {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}
[data-theme="dark"] .calendar-badge-overdue {
  background: #7f1d1d;
  color: #fee2e2;
  border-color: #991b1b;
}
.calendar-badge-activity {
  background: #ede9fe;
  color: #5b21b6;
  border: 1px solid #ddd6fe;
}
[data-theme="dark"] .calendar-badge-activity {
  background: #4c1d95;
  color: #ede9fe;
  border-color: #6d28d9;
}
.calendar-badge-task {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}
[data-theme="dark"] .calendar-badge-task {
  background: #14532d;
  color: #dcfce7;
  border-color: #166534;
}
.calendar-badge-summary {
  background: var(--surface-hover);
  color: var(--muted);
  border: 1px dashed var(--line);
  font-size: 9.5px;
  font-weight: 600;
}
.calendar-badge-more {
  background: transparent;
  color: var(--muted);
  border: none;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 4px;
  cursor: pointer;
  text-align: left;
}
.calendar-badge-more:hover {
  color: var(--accent);
  text-decoration: underline;
}
.day-summary-card {
  background: var(--surface-hover);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.day-summary-card.clickable {
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.day-summary-card.clickable:hover {
  background: var(--surface);
  border-color: var(--accent);
}

/* 4. Shareable Project Showcase & Before/After Comparison */
.showcase-dialog {
  max-width: 760px;
  width: 95vw;
}
.showcase-sheet {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.showcase-hero {
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
}
.showcase-metrics-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  padding: 12px 16px;
  background: var(--surface-hover);
  border-radius: 8px;
  border: 1px solid var(--line);
}
.showcase-metric-box {
  display: flex;
  flex-direction: column;
}
.showcase-metric-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  font-weight: 600;
}
.showcase-metric-val {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  margin-top: 2px;
}
.showcase-markdown-preview {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  font-family: monospace;
  font-size: 12px;
  max-height: 180px;
  overflow-y: auto;
  white-space: pre-wrap;
  color: var(--ink);
}

/* 5. Maker Goals & Visual Milestone Roadmaps */
.goals-section-container {
  margin: 24px 0;
}
.goals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
  margin-top: 14px;
}
.goal-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.goal-card:hover {
  border-color: var(--accent);
}
.goal-card.completed {
  border-color: #10b981;
  background: var(--surface);
}
.goal-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.goal-card-title {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 4px;
  color: var(--ink);
}
.goal-card-meta {
  font-size: 12px;
  color: var(--muted);
}
.roadmap-container {
  position: relative;
  padding: 16px 6px 28px;
}
.roadmap-line-track {
  position: absolute;
  top: 28px;
  left: 20px;
  right: 20px;
  height: 4px;
  background: var(--line);
  border-radius: 2px;
  z-index: 1;
}
.roadmap-line-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.4s ease;
}
.goal-card.completed .roadmap-line-fill {
  background: #10b981;
}
.roadmap-nodes-row {
  position: relative;
  display: flex;
  justify-content: space-between;
  z-index: 2;
}
.roadmap-node-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  cursor: pointer;
}
.roadmap-node-circle {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  transition: all 0.2s;
}
.roadmap-node-wrap.done .roadmap-node-circle {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: scale(1.1);
}
.goal-card.completed .roadmap-node-wrap.done .roadmap-node-circle {
  background: #10b981;
  border-color: #10b981;
}
.roadmap-node-text {
  position: absolute;
  top: 32px;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  font-weight: 500;
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}
.roadmap-node-wrap.done .roadmap-node-text {
  color: var(--ink);
  font-weight: 600;
}
@media (max-width: 640px) {
  .calendar-cell { min-height: 70px; }
  .calendar-badge { font-size: 9px; }
  .goals-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   FEATURE SUITE 2.0: 5 Power Tools
   ========================================================================== */

/* 1. Labor & Selling Price Calculator */
.pricing-summary-card {
  margin: 16px 0;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.pricing-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.pricing-stat-box {
  display: flex;
  flex-direction: column;
}
.pricing-stat-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.pricing-stat-val {
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}
.pricing-stat-val.retail {
  color: #16a34a;
}
[data-theme="dark"] .pricing-stat-val.retail {
  color: #4ade80;
}
.pricing-slider-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 14px;
  background: var(--surface-hover);
  border-radius: 6px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.pricing-preset-pills {
  display: flex;
  gap: 6px;
}

/* 2. Linear Cut List & Stock Optimizer */
.cut-optimizer-container {
  padding: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.cut-inputs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}
.cut-rows-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 13px;
}
.cut-rows-table th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  color: var(--muted);
  padding: 8px;
  border-bottom: 1px solid var(--line);
}
.cut-rows-table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
}
.cut-results-card {
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.cut-board-visual {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cut-board-head {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}
.cut-board-bar {
  height: 38px;
  background: var(--line);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  align-items: stretch;
  position: relative;
  border: 1px solid var(--line);
}
.cut-segment {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  padding: 0 4px;
  transition: opacity 0.15s;
  border-right: 2px solid rgba(0, 0, 0, 0.4);
}
.cut-segment:hover {
  opacity: 0.9;
}
.cut-scrap-segment {
  background: repeating-linear-gradient(
    45deg,
    rgba(156, 163, 175, 0.15),
    rgba(156, 163, 175, 0.15) 6px,
    rgba(156, 163, 175, 0.3) 6px,
    rgba(156, 163, 175, 0.3) 12px
  );
  color: var(--muted);
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

/* 3. Workshop Tool Maintenance & Safety Tracker */
.maintenance-container {
  margin-top: 18px;
}
.maintenance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin-top: 12px;
}
.maintenance-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.15s;
}
.maintenance-card:hover {
  border-color: var(--accent);
}
.maintenance-card.status-overdue {
  border-color: #ef4444;
  background: var(--surface);
}
.maintenance-badge-good {
  background: #dcfce7;
  color: #15803d;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 12px;
}
[data-theme="dark"] .maintenance-badge-good {
  background: #14532d;
  color: #86efac;
}
.maintenance-badge-soon {
  background: #fef3c7;
  color: #b45309;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 12px;
}
[data-theme="dark"] .maintenance-badge-soon {
  background: #78350f;
  color: #fde68a;
}
.maintenance-badge-overdue {
  background: #fee2e2;
  color: #b91c1c;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 12px;
}
[data-theme="dark"] .maintenance-badge-overdue {
  background: #7f1d1d;
  color: #fca5a5;
}

/* 4. Ambient Workshop Soundscapes */
.soundscape-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 14px;
  background: var(--surface-hover);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 12px 0;
}
.soundscape-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
  transition: all 0.15s;
}
.soundscape-btn:hover {
  background: var(--surface-hover);
  border-color: var(--accent);
}
.soundscape-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.soundscape-vol-slider {
  width: 80px;
  margin-left: auto;
  cursor: pointer;
}

/* 5. 2D Blueprint & Dimensioned Sketchpad */
.blueprint-dialog {
  max-width: 920px;
  width: 95vw;
}
.blueprint-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.blueprint-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 12px;
  background: var(--surface-hover);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.blueprint-tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
  transition: all 0.15s;
}
.blueprint-tool-btn:hover {
  border-color: var(--accent);
}
.blueprint-tool-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.blueprint-canvas-wrap {
  position: relative;
  width: 100%;
  height: 480px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.05);
  cursor: crosshair;
}
[data-theme="dark"] .blueprint-canvas-wrap {
  background: #0f172a;
}
.blueprint-canvas {
  width: 100%;
  height: 100%;
  display: block;
}
.blueprint-color-circle {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s;
}
.blueprint-color-circle.active {
  border-color: var(--ink);
  transform: scale(1.15);
}

/* 👥 Collaborative Projects & Team Badges */
.collab-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 12px;
  background: #ede9fe;
  color: #6d28d9;
  border: 1px solid #c4b5fd;
  white-space: nowrap;
}
[data-theme="dark"] .collab-badge {
  background: #2e1065;
  color: #c4b5fd;
  border-color: #5b21b6;
}
.collab-creator-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 12px;
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fcd34d;
}
[data-theme="dark"] .collab-creator-badge {
  background: #78350f;
  color: #fde68a;
  border-color: #b45309;
}
.collab-member-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  flex-wrap: wrap;
}
.collab-member-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}
.collab-member-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.collab-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}
.collab-member-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  flex-wrap: wrap;
  margin-left: auto;
}
.activity-author-tag {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
  margin-left: 4px;
}
.add-collab-box {
  background: var(--surface-subtle);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.add-collab-input {
  flex: 2;
  min-width: 180px;
  height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  outline: none;
}
.add-collab-input:focus {
  border-color: var(--accent);
}
.add-collab-select {
  flex: 1;
  min-width: 110px;
  height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
}
.add-collab-btn {
  height: 38px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}
.collab-team-banner {
  background: var(--surface-subtle);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 14px;
  margin-top: 10px;
  transition: background 0.15s, border-color 0.15s;
}
.collab-team-banner:hover {
  background: var(--surface-hover);
  border-color: var(--accent);
}
.prominent-team-btn {
  font-weight: 700 !important;
  letter-spacing: 0.2px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
}
.masked-key-input {
  -webkit-text-security: disc !important;
  text-security: disc !important;
  font-family: monospace !important;
  letter-spacing: 2px !important;
}
.formatted-markdown-doc {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Georgia, serif;
  line-height: 1.6;
  color: #111827;
  padding: 24px;
  background: #fff;
}
.formatted-markdown-doc h1 {
  font-size: 24px;
  border-bottom: 2px solid #e5e7eb;
  padding-bottom: 8px;
  margin-bottom: 16px;
}
.formatted-markdown-doc h2 {
  font-size: 18px;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 6px;
  margin-top: 20px;
  margin-bottom: 12px;
}
.formatted-markdown-doc h3 {
  font-size: 15px;
  margin-top: 14px;
  margin-bottom: 8px;
}
.formatted-markdown-doc blockquote {
  border-left: 3px solid #6366f1;
  margin: 12px 0;
  padding: 6px 14px;
  background: #f8fafc;
  color: #4b5563;
}
.formatted-markdown-doc ul {
  padding-left: 20px;
  margin: 10px 0;
}
.formatted-markdown-doc li {
  margin-bottom: 4px;
}



