/*!*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[2].use[1]!./node_modules/next/dist/build/webpack/loaders/next-font-loader/index.js??ruleSet[1].rules[14].oneOf[2].use[2]!./node_modules/next/font/google/target.css?{"path":"src/app/layout.tsx","import":"Inter","arguments":[{"subsets":["latin"],"weight":["400","500","600","700"],"variable":"--font-body","display":"swap"}],"variableName":"inter"} ***!
  \*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/* cyrillic-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/_next/static/media/ba9851c3c22cd980-s.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/_next/static/media/21350d82a1f187e9-s.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/_next/static/media/c5fe6dc8356a8c31-s.woff2) format('woff2');
  unicode-range: U+1F00-1FFF;
}
/* greek */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/_next/static/media/19cfc7226ec3afaa-s.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/_next/static/media/df0a9ae256c0569c-s.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/_next/static/media/8e9860b6e62d6359-s.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/_next/static/media/e4af272ccee01ff0-s.p.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/_next/static/media/ba9851c3c22cd980-s.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/_next/static/media/21350d82a1f187e9-s.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/_next/static/media/c5fe6dc8356a8c31-s.woff2) format('woff2');
  unicode-range: U+1F00-1FFF;
}
/* greek */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/_next/static/media/19cfc7226ec3afaa-s.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/_next/static/media/df0a9ae256c0569c-s.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/_next/static/media/8e9860b6e62d6359-s.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/_next/static/media/e4af272ccee01ff0-s.p.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/_next/static/media/ba9851c3c22cd980-s.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/_next/static/media/21350d82a1f187e9-s.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/_next/static/media/c5fe6dc8356a8c31-s.woff2) format('woff2');
  unicode-range: U+1F00-1FFF;
}
/* greek */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/_next/static/media/19cfc7226ec3afaa-s.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/_next/static/media/df0a9ae256c0569c-s.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/_next/static/media/8e9860b6e62d6359-s.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/_next/static/media/e4af272ccee01ff0-s.p.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/_next/static/media/ba9851c3c22cd980-s.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/_next/static/media/21350d82a1f187e9-s.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/_next/static/media/c5fe6dc8356a8c31-s.woff2) format('woff2');
  unicode-range: U+1F00-1FFF;
}
/* greek */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/_next/static/media/19cfc7226ec3afaa-s.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/_next/static/media/df0a9ae256c0569c-s.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/_next/static/media/8e9860b6e62d6359-s.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/_next/static/media/e4af272ccee01ff0-s.p.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}@font-face {font-family: 'Inter Fallback';src: local("Arial");ascent-override: 90.44%;descent-override: 22.52%;line-gap-override: 0.00%;size-adjust: 107.12%
}.__className_8b3a0b {font-family: 'Inter', 'Inter Fallback';font-style: normal
}.__variable_8b3a0b {--font-body: 'Inter', 'Inter Fallback'
}

/*!*****************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[3]!./src/app/globals.css ***!
  \*****************************************************************************************************************************************************************************************************************************************************************/
:root {
  --font-body: Inter, Arial, sans-serif;
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-muted: #f0f2f5;
  --border: #dfe3e8;
  --text: #0d1b33;
  --text-muted: #6b6b6b;
  --accent: #0d1b33;
  --accent-soft: #e9edf3;
  --purple: #6a3ba5;
  --purple-hover: #573087;
  --purple-soft: #f1eafa;
  --success: #1f845a;
  --warning: #b54708;
  --warning-soft: #fff4e5;
  --danger: #c9372c;
  --danger-soft: #fde8e6;
  --radius-sm: 6px;
  --radius-md: 10px;
  --shadow-card: 0 1px 2px rgba(23, 43, 77, 0.08), 0 2px 8px rgba(23, 43, 77, 0.06);
  --shadow-card-hover: 0 6px 16px rgba(23, 43, 77, 0.14), 0 2px 6px rgba(23, 43, 77, 0.08);
  --transition-fast: 150ms ease;
  --transition-base: 220ms cubic-bezier(0.4, 0, 0.2, 1);
  /* Compatibility aliases for existing inline styles in panels outside this task. */
  --font-display: var(--font-body);
  --font-mono: var(--font-body);
  --color-navy: var(--accent);
  --color-brass: var(--purple);
  --color-text-muted: var(--text-muted);
}

* { box-sizing: border-box; }
html, body { padding: 0; margin: 0; }
body { background: var(--bg); color: var(--text); font-family: var(--font-body), Inter, Arial, sans-serif; font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0; color: var(--text); font-family: var(--font-body); font-weight: 600; }
a { color: var(--purple); }
a:hover { color: var(--purple-hover); }
:focus-visible { outline: 2px solid var(--purple); outline-offset: 2px; }
.muted { color: var(--text-muted); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .65rem 1rem; border: 1px solid transparent; border-radius: var(--radius-sm); font: 600 .9rem/1 var(--font-body); text-decoration: none; cursor: pointer; transition: background-color var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast); }
.btn:disabled { cursor: not-allowed; opacity: .6; }
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover:not(:disabled) { background: #162d52; box-shadow: var(--shadow-card-hover); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-muted); }

.app-header { position: relative; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 64px; padding: .65rem 1.5rem; background: var(--accent); border-bottom: 3px solid var(--purple); box-shadow: 0 2px 8px rgba(13, 27, 51, .18); }
.header-brand-nav, .header-actions, .header-nav { display: flex; align-items: center; }
.header-brand-nav { gap: 2rem; min-width: 0; }
.header-nav { gap: 1.25rem; }
.header-nav a { color: #ffffff; font-weight: 500; text-decoration: none; }
.header-nav a:hover, .header-nav a:active, .header-nav a:focus-visible, .header-nav a[aria-current="page"] { color: #c9a9ed; }
.header-actions { gap: .65rem; flex: none; }
.wordmark { display: inline-flex; align-items: center; flex: none; padding: .28rem .55rem; border-radius: var(--radius-sm); background: #ffffff; line-height: 0; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.wordmark img { display: block; width: auto; height: 30px; }
.app-header .btn-primary { background: #ffffff; color: var(--accent); }
.app-header .btn-primary:hover:not(:disabled) { background: var(--purple-soft); }
.app-header .btn-ghost { border-color: rgba(255, 255, 255, .45); color: #ffffff; }
.app-header .btn-ghost:hover:not(:disabled) { border-color: #c9a9ed; background: rgba(106, 59, 165, .42); }
.auth-logo { display: block; width: min(280px, 80%); height: auto; margin: 0 auto 1rem; }

.tour-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(13, 27, 51, .68); }
.tour-backdrop.has-spotlight { background: transparent; }
.tour-spotlight { position: fixed; z-index: 101; border: 2px solid var(--purple); border-radius: var(--radius-md); box-shadow: 0 0 0 9999px rgba(13, 27, 51, .55); pointer-events: none; transition: top var(--transition-fast), left var(--transition-fast), width var(--transition-fast), height var(--transition-fast); }
.tour-card { position: fixed; z-index: 102; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(520px, calc(100% - 2rem)); max-height: calc(100vh - 2rem); overflow-y: auto; padding: 2rem; }
.tour-card.is-anchored { transform: none; overflow: visible; }
.tour-card.is-anchored::before { content: ""; position: absolute; top: -9px; left: var(--tour-caret-x); width: 16px; height: 16px; transform: translateX(-50%) rotate(45deg); border-left: 1px solid var(--border); border-top: 1px solid var(--border); background: var(--surface); }
.tour-card.is-anchored.is-above::before { top: auto; bottom: -9px; transform: translateX(-50%) rotate(225deg); }
.tour-card h2 { padding-right: 2rem; font-size: 1.45rem; }
.tour-card > p { margin: .8rem 0; color: var(--text-muted); }
.tour-close { position: absolute; top: .8rem; right: .8rem; display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--text-muted); font: 400 1.5rem/1 var(--font-body); cursor: pointer; }
.tour-close:hover { background: var(--surface-muted); color: var(--text); }
.tour-steps { display: flex; align-items: center; gap: .75rem; margin-bottom: 1rem; color: var(--purple); font-size: .78rem; font-weight: 700; }
.tour-progress { display: flex; flex: 1 1; gap: .3rem; }
.tour-progress i { flex: 1 1; height: 3px; border-radius: 999px; background: var(--border); }
.tour-progress i.is-active { background: var(--purple); }
.tour-link { display: inline-block; margin-top: .25rem; font-weight: 600; text-decoration: none; }
.tour-actions { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.75rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.tour-action-buttons { display: flex; gap: .6rem; }
/* The tour renders inside .app-header, whose white-on-navy button rules
   would otherwise win on the white card: Back turned white-on-white and
   Next lost its fill. Restore the page-level button colors inside the card. */
.app-header .tour-card .btn-primary { background: var(--accent); color: #ffffff; }
.app-header .tour-card .btn-primary:hover:not(:disabled) { background: #162d52; }
.app-header .tour-card .btn-ghost { border-color: var(--accent); color: var(--accent); background: transparent; }
.app-header .tour-card .btn-ghost:hover:not(:disabled) { border-color: var(--accent); background: var(--surface-muted); }
.tour-skip { padding: .35rem 0; border: 0; background: transparent; color: var(--text-muted); font: 500 .85rem var(--font-body); text-decoration: underline; cursor: pointer; }
.tour-skip:hover { color: var(--purple); }

.field { display: flex; flex-direction: column; gap: .4rem; margin: 0; }
.field label, .field > span { color: var(--text-muted); font-size: .78rem; font-weight: 600; }
.field input, .field select, input.checklist-due { min-height: 40px; padding: .6rem .75rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font: .95rem var(--font-body); transition: border-color var(--transition-fast), box-shadow var(--transition-fast); }
.field input:focus, .field select:focus, input.checklist-due:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 3px var(--purple-soft); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-card); }
.login-form { display: flex; flex-direction: column; gap: 1rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-gap: 1rem 1.25rem; gap: 1rem 1.25rem; padding: 1.5rem; }
.form-grid .banner-error, .form-grid .btn { grid-column: 1 / -1; }
.form-actions { display: flex; gap: .75rem; }
.form-actions .btn { flex: 1 1; }
.detail-heading-actions { display: flex; align-items: center; gap: .75rem; }
.form-stack { display: flex; flex-direction: column; gap: 1.25rem; padding: 1.5rem; }
.form-stack .form-grid { padding: 0; }
.form-group { border: 1px solid var(--border); border-radius: var(--radius-md); padding: 1rem 1.25rem 1.25rem; margin: 0; min-width: 0; display: flex; flex-direction: column; gap: 1rem; }
.form-group legend { font-weight: 600; color: var(--text); padding: 0 .4rem; }
.field-span-2 { grid-column: 1 / -1; }
.checkbox-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); grid-gap: .5rem 1rem; gap: .5rem 1rem; }
.checkbox-option { display: flex; align-items: center; gap: .5rem; font-size: .95rem; cursor: pointer; }
.checkbox-option input { width: 1rem; height: 1rem; accent-color: var(--purple); }
.banner-error { margin: 0; padding: .65rem .9rem; border: 1px solid color-mix(in srgb, var(--danger) 25%, transparent); border-radius: var(--radius-sm); background: var(--danger-soft); color: var(--danger); font-size: .85rem; font-weight: 500; }

.stamp { display: inline-flex; align-items: center; padding: .3rem .7rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface-muted); color: var(--text); font-size: .7rem; font-weight: 600; white-space: nowrap; }
.stamp-accent { border-color: color-mix(in srgb, var(--purple) 30%, var(--border)); background: var(--purple-soft); color: var(--purple); }
.stamp-warning { border-color: color-mix(in srgb, var(--warning) 30%, var(--border)); background: var(--warning-soft); color: var(--warning); }
.stamp-success { border-color: var(--success); background: var(--success); color: white; }

.board { min-height: calc(100vh - 64px); padding: 1.5rem; overflow: hidden; }
.board-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.board-heading h1 { font-size: 1.5rem; }
.board-filters { display: flex; align-items: end; gap: 1rem; margin-bottom: 1rem; padding: 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); }
.board-filters .field { width: 220px; }
.board-filters .board-search { width: min(420px, 100%); }
.lane-tabs { display: none; }
.board-scroll { max-height: calc(100vh - 220px); overflow: auto; overscroll-behavior: contain; padding-bottom: .75rem; }
.board-header-row, .board-grid { display: grid; grid-template-columns: repeat(var(--board-cols), 264px); grid-gap: 0 12px; gap: 0 12px; min-width: max-content; }
.board-header-row { position: -webkit-sticky; position: sticky; top: 0; z-index: 3; }
.board-column-header { display: flex; align-items: center; justify-content: space-between; gap: .5rem; min-height: 58px; padding: .75rem; border: 1px solid var(--border); border-bottom: 3px solid var(--accent); border-radius: var(--radius-md) var(--radius-md) 0 0; background: var(--surface); color: var(--accent); font-size: .78rem; font-weight: 600; }
.board-column-count { display: inline-flex; align-items: center; justify-content: center; min-width: 1.5rem; height: 1.5rem; padding: 0 .35rem; border-radius: 999px; background: var(--surface-muted); color: var(--text); font-size: .72rem; }
.board-lane-row { display: contents; }
.board-lane-label { grid-column: 1 / -1; margin-top: .75rem; padding: .65rem .75rem .45rem; border-left: 3px solid var(--purple); color: var(--accent); font-size: .9rem; }
.board-lane-cells { display: contents; }
.board-cell { min-height: 180px; max-height: 340px; overflow-y: auto; overscroll-behavior: contain; padding: .65rem; border: 1px solid var(--border); background: var(--surface-muted); transition: background-color var(--transition-fast), box-shadow var(--transition-fast); }
.board-cell.is-dragging-over { background: var(--purple-soft); box-shadow: inset 0 0 0 2px var(--purple); }
.board-cell.is-disabled { background-color: #f7f8f9; background-image: repeating-linear-gradient(135deg, transparent, transparent 7px, rgba(94, 108, 132, .06) 7px, rgba(94, 108, 132, .06) 9px); }
.board-column-empty { margin: .25rem; color: var(--text-muted); opacity: .6; font-size: .78rem; }
.board-card { display: block; margin-bottom: .55rem; padding: .75rem; border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: var(--radius-sm); background: var(--surface); box-shadow: var(--shadow-card); color: var(--text); text-decoration: none; touch-action: manipulation; transition: box-shadow var(--transition-base), transform var(--transition-base); }
.board-card-buyer { border-left-color: var(--success); }
.board-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-card-hover); }
.board-card-address { display: block; font-size: .9rem; font-weight: 500; }
.board-card-agent { display: inline-flex; margin-top: .55rem; padding: .15rem .45rem; border-radius: 999px; background: var(--purple-soft); color: var(--purple); font-size: .68rem; font-weight: 600; }
.tour-sample-card { margin: .25rem 0 1rem; max-width: 280px; pointer-events: none; }
.tour-sample-facts { display:block; margin-top:.35rem; font-size:.78rem; color: var(--text-muted); }
.board-toast { position: fixed; top: 1rem; right: 1rem; z-index: 30; display: flex; align-items: center; gap: .75rem; max-width: 340px; }
.board-toast-dismiss { flex: none; padding: .2rem; border: 0; background: transparent; color: currentColor; font: 700 1.1rem/1 var(--font-body); cursor: pointer; }

.detail-page { max-width: 1200px; margin: 0 auto; padding: 2rem 1.5rem 4rem; }
.account-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-gap: 1.5rem; gap: 1.5rem; align-items: start; }
@media (max-width: 900px) { .account-grid { grid-template-columns: 1fr; } }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; grid-gap: 1.5rem; gap: 1.5rem; align-items: start; }
.detail-main { min-width: 0; }
.detail-side { position: -webkit-sticky; position: sticky; top: 1rem; }
.detail-back { display: inline-block; margin-bottom: 1.25rem; color: var(--text-muted); font-size: .85rem; text-decoration: none; }
.detail-back:hover { color: var(--purple); }
.detail-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.detail-heading h1 { font-size: 1.75rem; }
/* Deal Details: three fixed columns of short facts (Type, Agent, Financing),
   then full-width rows for the long ones (parties, pricing, key dates). Every
   cell may shrink (min-width: 0) and wrap, so nothing spills into a neighbor. */
.deal-details h2 { margin-bottom: 1.1rem; }
.detail-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-gap: 1.25rem 1.5rem; gap: 1.25rem 1.5rem; margin: 0; }
.detail-field { min-width: 0; }
.detail-field dt { margin-bottom: .3rem; color: var(--text-muted); font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.detail-field dd { margin: 0; color: var(--text); font-size: .9rem; line-height: 1.45; overflow-wrap: anywhere; }
.detail-field dd > div + div { margin-top: .3rem; }
.detail-field.is-wide { grid-column: 1 / -1; padding-top: 1rem; border-top: 1px solid var(--border); }
.fact-rows { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); grid-gap: .4rem 1.5rem; gap: .4rem 1.5rem; }
.fact-row { display: grid; grid-template-columns: minmax(7rem, 9rem) minmax(0, 1fr); grid-gap: .75rem; gap: .75rem; align-items: baseline; min-width: 0; }
.fact-label { color: var(--text-muted); font-size: .8rem; }
.fact-value { font-weight: 500; overflow-wrap: anywhere; }
@media (max-width: 640px) { .detail-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .detail-fields { grid-template-columns: minmax(0, 1fr); } .fact-rows { grid-template-columns: minmax(0, 1fr); } }
.detail-section { margin-bottom: 1.5rem; padding: 1.5rem; }
.detail-section h2 { margin-bottom: 1rem; font-size: 1.1rem; }
.detail-cards { display: flex; flex-direction: column; gap: .75rem; margin-bottom: 1.5rem; }
.detail-card { border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-card); overflow: hidden; }
.detail-card.is-pending { border-left: 4px solid var(--accent); }
.detail-card summary { display: flex; align-items: center; gap: .75rem; padding: .9rem 1rem; cursor: pointer; list-style: none; font-weight: 600; }
.detail-card summary::-webkit-details-marker { display: none; }
.detail-card summary::before { content: ""; width: .5rem; height: .5rem; margin-right: .25rem; border-right: 2px solid var(--text-muted); border-bottom: 2px solid var(--text-muted); transform: rotate(-45deg); transition: transform var(--transition-fast); flex: none; }
.detail-card[open] summary::before { transform: rotate(45deg); }
.detail-card-name { flex: 1 1; }
.detail-card-meta, .detail-card-actions { display: flex; align-items: center; gap: .5rem; }
.detail-card-meta .btn, .detail-card-actions .btn { padding: .5rem .7rem; font-size: .78rem; }
.detail-card-body, .detail-card-fields { border-top: 1px solid var(--border); }
.detail-card-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); grid-gap: 1rem; gap: 1rem; margin: 0; padding: 1rem; }
.detail-card-body { padding: 1rem; }
.detail-card-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-gap: 1rem; gap: 1rem; }
.detail-card-form textarea { width: 100%; min-height: 88px; padding: .6rem .75rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font: .95rem var(--font-body); resize: vertical; }
.detail-card-form textarea:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 3px var(--purple-soft); }
.detail-card-body .banner-error { margin-top: 1rem; }
.detail-card-actions { justify-content: flex-end; margin-top: 1rem; }
.detail-secret-toggle { margin-left: .6rem; padding: 0; border: 0; background: transparent; color: var(--purple); font: 500 .78rem var(--font-body); text-decoration: underline; cursor: pointer; }
.checklist-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.checklist-heading .checklist-count { font-size: .85rem; }
.checklist-heading-actions { display: flex; align-items: center; justify-content: flex-end; gap: .5rem; flex-wrap: wrap; }
.checklist-heading-actions .btn { padding: .55rem .7rem; font-size: .8rem; }
.drive-control { position: relative; }
.drive-control-actions { display: flex; align-items: center; gap: .45rem; }
.drive-link-toggle, .activity-edit-link { padding: .2rem; border: 0; background: transparent; color: var(--purple); font: 500 .78rem var(--font-body); text-decoration: underline; cursor: pointer; }
.drive-link-form { position: absolute; top: calc(100% + .5rem); right: 0; z-index: 5; display: grid; grid-template-columns: minmax(220px, 1fr) auto; grid-gap: .5rem; gap: .5rem; width: 390px; padding: .75rem; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-card-hover); }
.drive-link-form input, .activity-panel textarea { width: 100%; min-height: 40px; padding: .6rem .75rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font: .9rem var(--font-body); resize: vertical; }
.drive-link-form input:focus, .activity-panel textarea:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 3px var(--purple-soft); }
.drive-link-form .banner-error { grid-column: 1 / -1; }
.activity-panel { padding: 1.25rem; }
.activity-panel h2 { margin-bottom: 1rem; font-size: 1.1rem; }
.activity-composer { display: flex; flex-direction: column; align-items: flex-end; gap: .6rem; }
.activity-composer textarea { min-height: 88px; }
.activity-panel > .banner-error { margin-top: .75rem; }
.activity-list { display: flex; flex-direction: column; margin-top: 1.25rem; }
.activity-row { display: grid; grid-template-columns: 34px minmax(0, 1fr); grid-gap: .7rem; gap: .7rem; padding: .9rem 0; border-top: 1px solid var(--border); }
.activity-row.is-event { color: var(--text-muted); }
.activity-avatar { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: var(--purple-soft); color: var(--purple); font-size: .8rem; font-weight: 700; }
.activity-row.is-event .activity-avatar { background: var(--surface-muted); color: var(--text-muted); }
.activity-content { min-width: 0; }
.activity-meta { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; color: var(--text-muted); font-size: .72rem; }
.activity-email { overflow: hidden; color: var(--text); font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.activity-row.is-event .activity-email { color: var(--text-muted); }
.activity-content p { margin: .3rem 0 0; overflow-wrap: anywhere; font-size: .88rem; white-space: pre-wrap; }
.activity-tags { display: flex; gap: .5rem; min-height: 1rem; margin-top: .2rem; font-size: .72rem; }
.activity-edit { display: flex; flex-direction: column; gap: .5rem; margin-top: .5rem; }
.activity-edit textarea { min-height: 72px; }
.activity-edit-actions { display: flex; gap: .5rem; }
.activity-edit-actions .btn { padding: .5rem .7rem; font-size: .78rem; }
.activity-empty { margin: 0; padding: .5rem 0; font-size: .88rem; }
.checklist-sections { display: flex; flex-direction: column; gap: .6rem; }
.checklist-section { border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); }
.checklist-section summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem .9rem; cursor: pointer; list-style: none; font-weight: 600; }
.checklist-section summary::-webkit-details-marker { display: none; }
.checklist-section summary::before { content: ""; width: .5rem; height: .5rem; margin-right: .6rem; border-right: 2px solid var(--text-muted); border-bottom: 2px solid var(--text-muted); transform: rotate(-45deg); transition: transform var(--transition-fast); flex: none; }
.checklist-section[open] summary::before { transform: rotate(45deg); }
.checklist-section-name { flex: 1 1; }
.checklist-section-meta { display: flex; align-items: center; gap: .6rem; font-size: .82rem; font-weight: 500; color: var(--text-muted); }
.checklist-section-flag { padding: .1rem .5rem; border-radius: 999px; background: var(--danger-soft); color: var(--danger); font-size: .75rem; font-weight: 600; }
.checklist-section.is-complete summary { color: var(--text-muted); }
.checklist-section .checklist { padding: .25rem .5rem .6rem; }
.checklist { display: flex; flex-direction: column; gap: .4rem; margin: 0; padding: 0; list-style: none; }
.checklist-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; grid-gap: .75rem; gap: .75rem; padding: .55rem .7rem; border-radius: var(--radius-sm); }
.checklist-item:hover { background: var(--surface-muted); }
.checklist-item label { display: flex; align-items: center; gap: .75rem; min-width: 0; cursor: pointer; font-size: .92rem; }
.checklist-item.is-done label { color: var(--text-muted); text-decoration: line-through; }
.checklist-due { width: 145px; text-align: right; }
.checklist-item.is-overdue .checklist-due { background: var(--danger-soft); color: var(--danger); }
.checkbox-native { position: absolute; width: 1px; height: 1px; opacity: 0; }
.checkbox-box { position: relative; display: block; flex: none; width: 1.25rem; height: 1.25rem; border: 1.5px solid var(--border); border-radius: 4px; background: var(--surface); }
.checkbox-native:focus-visible ~ .checkbox-box { outline: 2px solid var(--purple); outline-offset: 2px; }
.checkbox-native:checked ~ .checkbox-box { border-color: var(--success); background: var(--success); }
.checkbox-box::after { content: ""; position: absolute; inset: 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' d='M3.5 8.5l3 3 6-7'/%3E%3C/svg%3E") center / 65% no-repeat; opacity: 0; }
.checkbox-native:checked ~ .checkbox-box::after { opacity: 1; }
.archive-list { margin: 1.5rem 0 0; padding: 0; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); list-style: none; overflow: hidden; }
.archive-row { display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(100px, 1fr)); grid-gap: 1rem; gap: 1rem; padding: .85rem 1rem; border-bottom: 1px solid var(--border); }
.archive-row:last-child { border-bottom: 0; }
.archive-row a { color: var(--purple); font-weight: 500; }

@media (max-width: 720px) {
  .tour-card.is-anchored { top: auto !important; right: .75rem; bottom: .75rem; left: .75rem !important; width: auto !important; max-height: min(55vh, 440px); overflow-y: auto; padding: 1.5rem; }
  .tour-card.is-anchored::before { display: none; }
  .app-header { align-items: flex-start; gap: .75rem; padding: .75rem 1rem; }
  .header-brand-nav { align-items: flex-start; flex: 1 1; flex-direction: column; gap: .55rem; min-width: 0; }
  .wordmark { max-width: 100%; font-size: .78rem; }
  .header-nav { gap: 1rem; font-size: .85rem; }
  .header-actions { align-items: stretch; flex-direction: column; }
  .header-actions .btn { min-height: 34px; padding: .5rem .7rem; font-size: .78rem; }
  .board { padding: 1rem 0 1.5rem; }
  .board-heading, .board-filters, .lane-tabs { margin-left: 1rem; margin-right: 1rem; }
  .board-filters { align-items: stretch; flex-direction: column; }
  .board-filters .field, .board-filters .board-search { width: 100%; }
  .lane-tabs { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: .75rem; padding: 3px; border-radius: var(--radius-sm); background: var(--surface-muted); }
  .lane-tabs button { padding: .55rem; border: 0; border-radius: 4px; background: transparent; color: var(--text-muted); font: 600 .85rem var(--font-body); }
  .lane-tabs button.is-active { background: var(--purple); color: #ffffff; box-shadow: var(--shadow-card); }
  .board-scroll { max-height: calc(100vh - 300px); padding-left: 1rem; scroll-padding-left: 1rem; scroll-snap-type: x mandatory; }
  .board-header-row, .board-grid { grid-template-columns: repeat(var(--board-cols), 78vw); }
  .board-column-header { scroll-snap-align: start; }
  .board-lane-row { display: none; }
  .board-lane-row.is-mobile-active { display: contents; }
  .board-lane-label { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .board-cell { min-height: 280px; }
  .form-grid { grid-template-columns: 1fr; }
  .field-span-2 { grid-column: auto; }
  .archive-row { grid-template-columns: 1fr; gap: .25rem; }
  .checklist-item { grid-template-columns: 1fr; }
  .checklist-due { margin-left: 2rem; text-align: left; }
}

@media (max-width: 900px) {
  .detail-layout { grid-template-columns: 1fr; }
  .detail-side { position: static; }
}

@media (max-width: 520px) {
  .tour-card { width: calc(100% - 1.5rem); max-height: calc(100vh - 1.5rem); padding: 1.5rem; }
  .tour-actions { align-items: stretch; flex-direction: column-reverse; }
  .tour-action-buttons { display: grid; grid-template-columns: 1fr 1fr; }
  .tour-skip { align-self: center; }
  .detail-page { padding: 1.25rem 1rem 3rem; }
  .detail-heading-actions { align-items: stretch; width: 100%; flex-direction: column; }
  .detail-heading-actions .stage-select { justify-content: space-between; }
  .detail-heading-actions .drive-control, .detail-heading-actions .btn { width: 100%; }
  .drive-control-actions .btn { flex: 1 1; }
  .drive-link-form { position: static; grid-template-columns: 1fr; width: 100%; margin-top: .5rem; }
  .drive-link-form .banner-error { grid-column: auto; }
  .checklist-heading-actions { justify-content: flex-start; }
  .detail-card-form { grid-template-columns: 1fr; }
  .detail-card summary { align-items: flex-start; }
  .detail-card-meta { align-items: flex-end; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) { * { animation-duration: .001ms !important; transition-duration: .001ms !important; } }

/* Deal card facts */
.board-card-photo { display: block; width: calc(100% + 1.8rem); margin: -.75rem 0 .5rem -.9rem; height: 96px; object-fit: cover; border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
.board-card-facts { display: flex; flex-direction: column; gap: .15rem; margin: .4rem 0 .2rem; font-size: .8rem; }
.board-card-facts div { display: flex; justify-content: space-between; gap: .6rem; }
.board-card-facts dt { color: var(--text-muted); }
.board-card-facts dd { margin: 0; font-weight: 500; text-align: right; }
.board-card-overdue { display: inline-block; width: .55rem; height: .55rem; margin-right: .4rem; border-radius: 50%; background: var(--danger); vertical-align: middle; }
.board-card-submitted { display: inline-block; align-self: flex-start; font-size: .65rem; font-weight: 600; letter-spacing: .02em; color: var(--purple); background: var(--purple-soft); border: 1px solid #d9c6f0; border-radius: 4px; padding: 0 .35rem; margin: .15rem .3rem .15rem 0; }
.board-card-stalled { display: inline-block; align-self: flex-start; font-size: .65rem; font-weight: 600; letter-spacing: .02em; color: #8a6d00; background: #fff3cd; border: 1px solid #ffe08a; border-radius: 4px; padding: 0 .35rem; margin: .15rem 0; }
.photo-panel { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.photo-panel-img { width: 160px; height: 110px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.photo-panel-empty { width: 160px; height: 110px; display: flex; align-items: center; justify-content: center; border: 1px dashed var(--border); border-radius: var(--radius-sm); color: var(--text-muted); font-size: .85rem; }
.photo-panel-actions { display: flex; gap: .5rem; }
.stage-select { display: flex; align-items: center; gap: .5rem; }
.stage-select select { min-height: 36px; padding: .35rem .6rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font: .9rem var(--font-body); }
.form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 720px) { .form-grid-3 { grid-template-columns: 1fr; } .board-cell { max-height: 420px; } }

