/* Project Hub — Minera Consulting. Brand references: static/branding/SOURCES.md */
:root {
  --brand: #11425d;
  --brand-strong: #002233;
  --ink: #002233;
  --muted: #62717a;
  --line: #d8dfe3;
  --canvas: #fff;
  --ivory: #f6f2e8;
  --slate: #3e5660;
  --blue-light: #c0d6ea;
  --bs-body-color: #002233;
  --bs-body-bg: #fff;
  --bs-primary: #11425d;
  --bs-link-color: #11425d;
  --bs-border-color: #d8dfe3;
  --bs-font-sans-serif: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-family: var(--bs-font-sans-serif); font-size: 14px; line-height: 1.5; min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-strong); text-decoration: underline; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea, summary { touch-action: manipulation; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.skip-link { position: fixed; left: 16px; top: -50px; z-index: 100; padding: 8px 15px; background: #fff; }
.skip-link:focus { top: 8px; }
.corporate-header { min-height: 72px; display: flex; align-items: center; gap: 26px; padding: 14px 28px; background: var(--brand-strong); color: var(--ivory); }
.corporate-brand { display: block; flex: 0 0 auto; line-height: 1; }
.corporate-brand img { display: block; width: 188px; height: auto; }
.product-name { border-left: 1px solid #49606b; padding-left: 25px; font-size: 18px; font-weight: 400; white-space: nowrap; letter-spacing: .2px; }
.account-tools { margin-left: auto; display: flex; align-items: center; gap: 22px; }
.account-name { text-align: right; font-size: 12px; line-height: 1.4; }
.account-name strong { display: block; font-weight: 500; }
.account-name span { color: #b9c6cc; font-size: 11px; }
.signout-button { border: 1px solid #5d7481; background: transparent; color: var(--ivory); padding: 5px 10px; border-radius: 2px; font-size: 12px; }
.signout-button:hover { background: var(--brand); }
.corporate-header a:focus-visible, .corporate-header button:focus-visible { outline-color: var(--blue-light); }
.header-label { margin-left: auto; color: #b9c6cc; font-size: 12px; }
.main-nav { display: flex; align-items: stretch; gap: 2px; min-height: 46px; padding: 0 28px; border-bottom: 1px solid var(--line); background: #f7f8f9; overflow-x: auto; }
.main-nav a { display: flex; align-items: center; justify-content: center; flex: 0 0 auto; padding: 12px 21px 10px; font-size: 13px; color: #4a5b65; border-bottom: 3px solid transparent; white-space: nowrap; }
.main-nav a:hover { background: #eef2f5; text-decoration: none; color: var(--brand); }
.main-nav a.active { border-bottom-color: var(--brand); color: var(--brand-strong); font-weight: 600; background: #fff; }
.local-indicator { margin-left: auto; align-self: center; color: var(--muted); border: 1px solid #cbd3d8; border-radius: 2px; padding: 1px 7px; font-size: 10px; line-height: 1.6; }
.main-content { flex: 1; width: 100%; max-width: 1720px; margin: 0 auto; padding: 24px 28px 40px; }
.page-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.page-header h1 { font-size: 23px; font-weight: 500; line-height: 1.25; letter-spacing: -.35px; margin: 0; }
.page-subtitle { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.page-subtitle:empty { display: none; }
.header-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.header-actions:empty { display: none; }
h2 { font-size: 15px; font-weight: 600; margin: 0; }
h3 { font-size: 14px; font-weight: 600; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 34px; padding: 6px 12px; border: 1px solid transparent; border-radius: 2px; font-size: 12px; font-weight: 500; line-height: 1.6; white-space: nowrap; box-shadow: none !important; }
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover, .btn-primary:focus, .btn-primary:active { background: var(--brand-strong) !important; border-color: var(--brand-strong) !important; color: #fff !important; }
.btn-secondary, .btn-outline-secondary { background: #fff; color: var(--brand); border-color: #b8c5cd; }
.btn-secondary:hover, .btn-secondary:focus, .btn-outline-secondary:hover { background: #eef3f6; color: var(--brand-strong); border-color: #839ba9; }
.btn-ghost, .btn-light { color: var(--brand); background: transparent; }
.btn-ghost:hover, .btn-light:hover { background: #edf2f5; color: var(--brand-strong); }
.btn-danger { background: #a73831; color: #fff; }
.btn-sm, .btn-small { min-height: 27px; padding: 3px 8px; font-size: 12px; }
.btn:disabled { opacity: .55; }
.text-link { font-size: 12px; }
.muted, .text-muted { color: var(--muted) !important; }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }
.text-right, .number-cell { text-align: right !important; font-variant-numeric: tabular-nums; }
.icon { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.card, .panel { border: 0; border-radius: 0; background: #fff; box-shadow: none; min-width: 0; }
.work-section { margin-bottom: 28px; min-width: 0; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 0 0 10px; }
.section-heading h2 { font-size: 14px; font-weight: 600; }
.section-heading .muted { font-size: 12px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); }
.data-table { border-collapse: collapse; width: 100%; font-size: 13px; line-height: 1.45; }
.data-table th { padding: 9px 12px; background: #eef1f3; color: #415560; font-size: 12px; font-weight: 500; text-align: left; white-space: nowrap; border-bottom: 1px solid #cbd5dc; }
.data-table td { padding: 10px 12px; color: #273d49; border-bottom: 1px solid #e3e8eb; vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #f5f8fa; }
.data-table tbody strong { font-weight: 500; }
.data-table tfoot th, .data-table tfoot td { background: #edf2f5; font-weight: 600; color: var(--ink); border-top: 1px solid #cbd5dc; border-bottom: 0; padding: 9px 12px; }
.data-table .muted { font-size: 11px; }
.data-table .row-actions { text-align: right; white-space: nowrap; font-size: 12px; }
.code-cell { width: 110px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.project-name-link { font-weight: 500; }
.project-code { font-size: 12px; color: var(--muted); margin-right: 7px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.project-link { display: flex; align-items: baseline; gap: 8px; }
.project-link strong { font-weight: 500; }
.type-label { margin-left: 9px; color: #7b8a8e; font-size: 11px; font-weight: 400; }
.status-label, .badge { display: inline-block; padding: 1px 0; background: transparent; color: var(--slate); font-size: 12px; font-weight: 400; border: 0; border-radius: 0; vertical-align: baseline; line-height: 1.5; white-space: nowrap; }
.status-in_progress, .badge-success { color: #11425d; }
.status-on_hold, .badge-warning { color: #8a642f; }
.status-cancelled, .badge-danger { color: #9e443c; }
.status-delivered, .badge-neutral { color: #62717a; }
.status-business_development, .badge-info { color: #526f82; }
.register-footer, .inline-summary { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 23px; margin: 0; padding: 10px 0; font-size: 12px; color: var(--muted); }
.register-footer { justify-content: space-between; border-bottom: 1px solid var(--line); }
.inline-summary strong, .register-footer strong { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.footer-divider { display: inline-block; padding: 0 9px; color: #abb8c0; }
.report-shortcuts { display: flex; gap: 18px; flex-wrap: wrap; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 14px; }
.content-grid, .report-breakdowns { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; margin: 22px 0; }
.report-breakdowns { grid-template-columns: 1.35fr 1fr; margin-top: 17px; }
.report-periods { max-width: 100%; margin-top: 25px; }
.report-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--line); margin-bottom: 0; overflow-x: auto; }
.report-tabs a { display: block; padding: 10px 18px; border: 1px solid transparent; border-bottom: 0; color: var(--muted); font-size: 13px; white-space: nowrap; }
.report-tabs a:hover { color: var(--brand); text-decoration: none; background: #f5f8fa; }
.report-tabs a.active { color: var(--brand-strong); font-weight: 600; border-color: var(--line); background: #eef2f5; }
.report-filters { background: #f7f9fa; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.report-filters .filter-bar { padding: 14px 16px; border-bottom: 0; }
.filter-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; padding: 0 0 14px; }
.filter-bar .form-field { flex: 1 1 145px; max-width: 300px; margin: 0; gap: 4px; }
.filter-bar .form-field:first-child { flex: 1.5 1 210px; max-width: 410px; }
.report-filters .form-field { flex: 1 1 130px; max-width: 230px; }
.report-filters .form-field:first-child { flex: 1.4 1 190px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 24px; }
.form-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; margin-bottom: 0; }
.form-field label, .form-label, form p > label { font-size: 12px; color: var(--slate); font-weight: 500; margin: 0; display: block; }
input:not([type=checkbox]):not([type=radio]):not([type=hidden]), select, textarea, .form-control, .form-select { min-height: 34px; padding: 6px 9px; max-width: 100%; border: 1px solid #bcc9d1; border-radius: 2px; background-color: #fff; color: var(--ink); font-size: 13px; line-height: 1.5; box-shadow: none; }
input:focus, select:focus, textarea:focus, .form-control:focus, .form-select:focus { outline: 2px solid var(--brand); outline-offset: -1px; border-color: var(--brand); box-shadow: none; }
.form-field input, .form-field select { width: 100%; }
input[type=checkbox] { accent-color: var(--brand); width: 15px; height: 15px; vertical-align: middle; }
.form-field input[type=checkbox] { width: 15px; margin: 4px 0; }
input[disabled], select[disabled], textarea[disabled] { background-color: #f1f4f6 !important; color: var(--muted) !important; }
textarea { width: 100%; min-height: 80px; }
.helptext, .form-text, .form-field .muted { color: var(--muted); font-size: 11px; line-height: 1.5; display: block; }
.form-card { max-width: 800px; padding: 22px 0; border-top: 1px solid var(--line); }
.form-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.full-width { grid-column: 1 / -1; }
.errorlist, .form-errors { color: #a2332b; font-size: 12px; margin: 4px 0 0; padding: 0; list-style: none; }
.form-errors { padding: 12px 16px; }
.form-errors p { margin: 5px 0; }
.details-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 20px; margin: 0 0 24px; padding: 15px 0 18px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.details-grid dt { color: var(--muted); font-weight: 400; font-size: 12px; margin: 0 0 6px; }
.details-grid dd { margin: 0; font-size: 13px; }
.assignment-list { border-top: 1px solid var(--line); margin: 16px 0; }
.assignment-list label { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid #e5eaee; }
.assignment-list input { width: 15px; }
.empty-state { color: var(--muted); padding: 28px 16px !important; text-align: left; font-size: 13px; }
.empty-state h2, .empty-state h3 { color: var(--ink); margin: 0 0 8px; font-size: 14px; }
.empty-state p { margin: 5px 0; }
.alert { border-radius: 2px; padding: 10px 13px; margin-bottom: 15px; font-size: 12px; border: 1px solid; }
.alert-success { color: var(--brand); border-color: #c2d5e1; background: #f0f6fa; }
.alert-warning { color: #7d5f2c; border-color: #e7d7b9; background: #fffaf0; }
.alert-error, .alert-danger { color: #a2332b; border-color: #e9c6c2; background: #fff4f2; }
.alert-info { color: var(--brand); border-color: #ccdce6; background: #f2f7fa; }
.app-footer { display: flex; justify-content: space-between; gap: 15px; margin-top: auto; padding: 13px 28px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.auth-layout { width: 100%; max-width: 520px; flex: 1; margin: 0 auto; padding: 58px 24px 64px; }
.auth-layout h1 { font-size: 24px; font-weight: 500; letter-spacing: -.3px; margin-bottom: 12px; }
.login-intro { color: var(--muted); font-size: 14px; margin-bottom: 23px; }
.notice { background: #f4f7f9; border-left: 3px solid #b8cad7; padding: 12px 14px; color: var(--slate); font-size: 12px; margin: 20px 0 30px; }
.microsoft-button { width: 100%; justify-content: center; min-height: 40px; margin-bottom: 25px; }
.dev-login { border-top: 1px solid var(--line); padding-top: 24px; margin-top: 8px; }
.dev-login h2 { font-size: 15px; margin: 0 0 6px; }
.dev-login > .muted { font-size: 12px; margin: 0 0 18px; }
.dev-users { border-top: 1px solid var(--line); }
.dev-user-button { display: flex; align-items: center; width: 100%; min-height: 49px; gap: 12px; padding: 12px 9px; background: transparent; color: var(--ink); border: 0; border-bottom: 1px solid var(--line); border-radius: 0; text-align: left; }
.dev-user-button:hover { background: #edf3f7; }
.dev-user-button strong { font-size: 13px; font-weight: 500; }
.dev-user-button > span:nth-child(2) { margin-left: auto; color: var(--muted); font-size: 12px; }
.dev-user-button > span:last-child { color: var(--brand); margin-left: 8px; }
.login-footnote { margin: 26px 0 0; font-size: 11px; color: var(--muted); }
.auth-layout .card { padding: 20px 0; }
code { color: var(--brand); background: #f0f4f7; padding: 2px 4px; border-radius: 2px; font-size: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 1050px) {
  .corporate-header { padding-left: 22px; padding-right: 22px; }
  .main-nav { padding-left: 22px; padding-right: 22px; }
  .main-content { padding: 22px; }
  .data-table th, .data-table td { padding-left: 10px; padding-right: 10px; }
  .work-register { min-width: 880px; }
  .content-grid, .report-breakdowns { gap: 20px; }
}
@media (max-width: 720px) {
  .corporate-header { min-height: 66px; padding: 13px 16px; gap: 15px; flex-wrap: wrap; }
  .corporate-brand img { width: 148px; }
  .product-name { font-size: 15px; padding-left: 14px; }
  .account-tools { gap: 12px; margin-left: auto; }
  .account-name { display: none; }
  .signout-button { font-size: 11px; padding: 5px 8px; }
  .header-label { display: none; }
  .main-nav { padding: 0 10px; min-height: 44px; }
  .main-nav a { padding: 12px 13px 9px; font-size: 12px; }
  .local-indicator { display: none; }
  .main-content { padding: 20px 14px 30px; }
  .page-header { align-items: flex-start; margin-bottom: 18px; gap: 14px; }
  .page-header h1 { font-size: 21px; }
  .page-subtitle { font-size: 11px; }
  .header-actions { gap: 6px; justify-content: flex-end; }
  .header-actions .btn { font-size: 11px; padding: 6px 9px; }
  .data-table { font-size: 12px; }
  .data-table th { font-size: 11px; }
  .section-heading h2 { font-size: 13px; }
  .content-grid, .report-breakdowns { grid-template-columns: 1fr; gap: 25px; }
  .details-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; padding: 15px 0; }
  .filter-bar { gap: 9px; }
  .filter-bar .form-field, .filter-bar .form-field:first-child { flex: 1 1 135px; max-width: none; }
  .report-filters .filter-bar { padding: 12px; }
  .report-tabs a { padding: 9px 13px; font-size: 12px; }
  .inline-summary { gap: 6px 15px; font-size: 11px; }
  .register-footer { align-items: flex-start; flex-direction: column; font-size: 11px; }
  .report-shortcuts { font-size: 11px; gap: 10px 15px; }
  .form-grid { grid-template-columns: 1fr; gap: 18px; }
  .form-card { padding-top: 18px; }
  .full-width { grid-column: auto; }
  .table-card .data-table { min-width: 480px; }
  .report-breakdowns .data-table, .report-periods .data-table, .content-grid .data-table { min-width: 0; }
  .app-footer { padding: 12px 16px; font-size: 10px; }
  .auth-layout { padding: 35px 21px; max-width: 490px; }
  .auth-layout h1 { font-size: 23px; }
  .dev-user-button > span:nth-child(2) { font-size: 11px; }
}
@media (max-width: 390px) {
  .corporate-brand img { width: 133px; }
  .corporate-header { gap: 11px; }
  .product-name { font-size: 13px; padding-left: 10px; }
  .signout-button { border: 0; padding: 3px 0; font-size: 10px; }
  .header-actions { width: 100%; justify-content: flex-start; }
  .page-header { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

#project-dialog { width:min(780px, calc(100vw - 32px)); max-height:88vh; overflow:auto; border:1px solid var(--line); padding:24px; color:var(--ink); }
#project-dialog::backdrop { background:rgb(0 34 51 / .45); }
#id_team { max-height:180px; overflow:auto; border:1px solid var(--line); padding:8px; }
#id_team label { display:flex; gap:8px; align-items:center; padding:4px; }
#id_team input { width:auto; }
.weekly-chart-section { margin:28px 0 36px; }
.weekly-chart { display:flex; gap:18px; overflow-x:auto; padding:16px 4px 8px; border-bottom:1px solid var(--line); }
.week-column { flex:1; min-width:44px; text-align:center; font-size:12px; }
.week-value { display:block; font-variant-numeric:tabular-nums; margin-bottom:8px; }
.week-track { height:160px; display:flex; align-items:flex-end; justify-content:center; border-bottom:1px solid var(--line); background:repeating-linear-gradient(to top,transparent 0,transparent 39px,#eef1f3 39px,#eef1f3 40px); }
.week-bar { width:65%; max-width:54px; background:var(--brand); }
.week-label { display:block; margin-top:9px; white-space:nowrap; color:var(--muted); }

/* Project meeting chat */
.project-granola{margin-top:48px;padding-top:28px;border-top:1px solid #dce3e7;scroll-margin-top:24px}
.granola-brand{display:flex;align-items:center;gap:10px;margin-bottom:20px;font-size:21px;font-weight:600;letter-spacing:-.6px;color:#20352c}
.granola-brand img{object-fit:contain}
.granola-composer{display:flex;align-items:flex-end;gap:12px;padding:12px 14px 12px 22px;border:1px solid #cbd5d9;border-radius:28px;background:#fff;box-shadow:0 2px 8px #00223306;transition:border-color .15s,box-shadow .15s}
.granola-composer:focus-within{border-color:#527b8d;box-shadow:0 0 0 3px #11425d0c}
.granola-composer textarea{flex:1;min-width:0;min-height:38px;max-height:160px;padding:8px 0;margin:0;border:0!important;outline:none;background:transparent;box-shadow:none!important;resize:none;font:inherit;line-height:22px;border-radius:0}
.granola-composer textarea::placeholder{color:#819097}
.granola-send{flex-shrink:0;display:grid;place-items:center;width:38px;height:38px;border:0;border-radius:50%;background:#11425d;color:#fff;cursor:pointer}
.granola-send:hover{background:#002233}.granola-send:disabled{opacity:.5;cursor:wait}.granola-send:focus-visible{outline:2px solid #11425d;outline-offset:3px}
.granola-chat-status{font-size:13px;color:#657680;margin:8px 20px;min-height:0}
.granola-chat-status:empty{display:none}
.granola-chat-answer{margin:0 0 20px;padding:0 4px;line-height:1.75;overflow-wrap:anywhere;max-width:960px}
.granola-connect-prompt{display:flex;align-items:center;justify-content:space-between;gap:20px;flex-wrap:wrap;padding:4px 0 12px}
.granola-connect-prompt p{margin:0;color:#657680}.granola-connect-prompt .btn{border-radius:22px;padding:10px 20px}
.granola-options{margin-top:14px;color:#657680;font-size:13px}.granola-options summary{cursor:pointer;width:fit-content;padding:4px 0}.granola-options-body{padding-top:16px;max-width:850px}
.granola-folder-list{padding:0;list-style:none}.granola-folder-list li{display:flex;align-items:center;justify-content:space-between;gap:16px;border-bottom:1px solid #e5eaed;padding:6px 0}
.granola-folder-form{display:flex;gap:14px;align-items:flex-end;flex-wrap:wrap}.granola-folder-form p{flex:1;min-width:180px;margin:0}.granola-folder-form label{display:block;margin-bottom:6px}.granola-folder-form input{width:100%;padding:9px 12px;border:1px solid #cbd5d9;border-radius:8px}
.granola-secondary-actions{display:flex;gap:16px;flex-wrap:wrap;margin:20px 0 12px}.granola-meeting-result{overflow-wrap:anywhere}
@media(max-width:600px){.project-granola{margin-top:32px}.granola-composer{padding-left:16px;gap:8px}.granola-composer textarea{font-size:16px}.granola-connect-prompt{align-items:flex-start;flex-direction:column}.granola-folder-form{align-items:stretch;flex-direction:column}}
