/* ============================================================
   MILO — Month In the Life Of
   Weekly time-mapping tool · NGG leadership workshop
   Styling grounded in the design-system tokens.
   ============================================================ */

:root {
  /* Brand blues */
  --blue-primary: #1F75B4;
  --blue-deep: #09578A;
  --blue-navy: #24337A;
  --blue-ink: #002060;
  /* Accents */
  --teal: #25938C;
  --green: #52C99F;
  --green-deep: #1F5C3D;
  --red: #E5222C;
  --amber: #C98A0B;
  /* Neutrals */
  --paper: #F6F6F4;
  --white: #FFFFFF;
  --wash-blue: #E9F0F6;
  --wash-blue-strong: #DCE8F2;
  --ink: #10151F;
  --gray: #5F5F5F;
  --gray-soft: #90A2B6;
  --gray-faint: #B4BCC6;
  --gray-line: #D8DEE6;
  --panel-blue: #EAF2FA;
  --panel-green: #E4F1EF;

  /* Category colours (from spec: א' שוטף = blue, ב' פיתוח = teal) */
  --cat-ops: var(--blue-primary);
  --cat-dev: var(--teal);

  /* Radii & shadows */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --shadow-card: 0 8px 24px rgba(31, 117, 180, 0.14);
  --shadow-soft: 0 8px 24px rgba(31, 117, 180, 0.10);
  --shadow-block: 0 2px 8px rgba(16, 33, 60, 0.12);
  --shadow-lg: 0 16px 40px rgba(16, 33, 60, 0.16);

  --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: 'Assistant', 'Segoe UI', Arial, 'Helvetica Neue', sans-serif;
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

button, input, textarea { font-family: inherit; }
button { cursor: pointer; }
::selection { background: var(--wash-blue-strong); }

#app { min-height: 100vh; display: flex; flex-direction: column; }

/* ---- animations ---- */
@keyframes miloFadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes miloPop { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
.milo-fade { animation: miloFadeUp .42s var(--ease-out) both; }

/* ============================================================
   WELCOME
   ============================================================ */
.welcome-wrap {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 28px 20px;
  background: linear-gradient(160deg, #EAF2FA 0%, #F6F6F4 62%);
}
.welcome-inner { width: 100%; max-width: 560px; }
.brand-title {
  font-weight: 800; font-size: 46px; letter-spacing: .01em;
  color: var(--blue-primary); direction: ltr; line-height: 1; text-align: center;
}
.brand-sub { text-align: center; color: var(--gray); font-size: 14px; direction: ltr; margin: 6px 0 2px; }
.brand-sub-he { text-align: center; direction: rtl; color: var(--blue-deep); font-size: 15px; font-weight: 700; margin: 0 0 26px; }

.card {
  background: var(--white); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card); padding: 30px 26px;
}
.card h1 { font-weight: 800; font-size: 26px; color: var(--blue-deep); line-height: 1.2; margin: 0; }
.card p.lead { font-size: 15px; line-height: 1.55; color: var(--ink); margin: 12px 0 22px; }

.steps { display: grid; gap: 10px; margin-bottom: 26px; }
.step { display: flex; align-items: flex-start; gap: 12px; }
.step-n {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: 999px;
  color: #fff; font-weight: 800; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
}
.step-text { font-size: 14.5px; line-height: 1.4; padding-top: 4px; color: var(--ink); }

.divider { height: 1px; background: var(--gray-line); margin: 4px 0 22px; }

label.field-label { display: block; font-weight: 700; font-size: 17px; color: var(--blue-deep); margin-bottom: 4px; }
.field-hint { font-size: 13px; color: var(--gray); margin: 0 0 14px; }

.cap-chips { display: flex; gap: 8px; margin-bottom: 14px; }
.cap-chip {
  flex: 1; padding: 10px 0; border-radius: 12px;
  border: 2px solid var(--wash-blue-strong); background: #fff;
  color: var(--blue-deep); font-weight: 700; font-size: 15px;
  transition: border-color .15s, background .15s;
}
.cap-chip:hover { border-color: var(--blue-primary); }
.cap-chip.active { border-color: var(--blue-primary); background: var(--panel-blue); }

.cap-row { display: flex; gap: 10px; align-items: stretch; }
.cap-input-wrap { position: relative; flex: 1; }
.cap-input {
  width: 100%; height: 50px; padding: 0 16px; border-radius: var(--radius-md);
  border: 2px solid var(--wash-blue-strong); font-size: 17px; font-weight: 700;
  color: var(--ink); outline: none; transition: border-color .15s;
}
.cap-input:focus { border-color: var(--blue-primary); }
.cap-suffix { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--gray); font-size: 14px; pointer-events: none; }

.btn-primary {
  border: none; background: var(--blue-primary); color: #fff;
  font-weight: 800; border-radius: var(--radius-md);
  transition: background .18s, box-shadow .18s, opacity .18s;
}
.btn-primary:hover:not(:disabled) { background: var(--blue-deep); }
.btn-primary:disabled { background: #B9C6D4; cursor: not-allowed; }

.cap-start { flex: 0 0 auto; padding: 0 24px; font-size: 16px; }

.footnote { display: flex; align-items: center; justify-content: center; gap: 9px; font-size: 12px; color: var(--gray); margin-top: 18px; }

/* NGG brand mark */
.ngg-logo { height: 30px; width: auto; display: block; }
.header-ngg { height: 38px; margin-inline-start: 6px; padding-inline-start: 12px; border-inline-start: 1px solid var(--wash-blue); }
.sheet-foot-brand { display: flex; align-items: center; gap: 8px; }
.sheet-foot-brand .ngg-logo { height: 34px; }

/* ============================================================
   PLAN
   ============================================================ */
.plan-wrap { flex: 1; display: flex; flex-direction: column; }

header.app-header {
  background: rgba(255,255,255,0.9); backdrop-filter: saturate(1.15) blur(8px);
  -webkit-backdrop-filter: saturate(1.15) blur(8px);
  border-bottom: 1px solid var(--gray-line);
  padding: 11px 18px; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; position: sticky; top: 0; z-index: 30;
}
.header-left { display: flex; align-items: center; gap: 12px; }
.header-logo { font-weight: 800; font-size: 24px; color: var(--blue-primary); direction: ltr; line-height: 1; }
.header-meta { padding-right: 12px; border-right: 2px solid var(--wash-blue); }
.header-meta .en { font-size: 11px; color: var(--gray); direction: ltr; line-height: 1; }
.header-meta .cap { font-size: 13px; color: var(--blue-deep); font-weight: 700; line-height: 1.3; }
.header-actions { display: flex; align-items: center; gap: 8px; }

.btn-ghost {
  padding: 9px 14px; border-radius: 11px; border: 2px solid var(--wash-blue);
  background: #fff; color: var(--gray); font-weight: 700; font-size: 13.5px;
  transition: border-color .15s, color .15s;
}
.btn-ghost:hover { border-color: var(--gray-line); color: var(--ink); }
.btn-export {
  padding: 9px 18px; border-radius: 11px; border: none;
  background: var(--blue-primary); color: #fff; font-weight: 800; font-size: 14px;
  box-shadow: 0 2px 8px rgba(31,117,180,.28); transition: background .18s;
}
.btn-export:hover { background: var(--blue-deep); }

.balance-banner {
  background: var(--panel-green); border-bottom: 1px solid #BFE0D9;
  color: var(--green-deep); font-weight: 700; font-size: 14px; text-align: center; padding: 9px 16px;
}

.plan-grid {
  display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start;
  padding: 20px; max-width: 1220px; margin: 0 auto; width: 100%;
}

.weeks-col { flex: 1 1 560px; min-width: 280px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; gap: 8px; flex-wrap: wrap; }
.section-head h2 { margin: 0; font-size: 19px; font-weight: 800; color: var(--blue-deep); }
.section-head .hint { font-size: 13px; color: var(--gray); }

.weeks { display: grid; grid-template-columns: repeat(auto-fit, minmax(238px, 1fr)); gap: 16px; }

.week-card { background: #fff; border-radius: 18px; box-shadow: var(--shadow-soft); padding: 14px 14px 6px; display: flex; flex-direction: column; transition: transform .18s var(--ease-out), box-shadow .18s; }
.week-card:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(31,117,180,.15); }
.week-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.week-title { font-weight: 800; font-size: 16px; color: var(--blue-deep); }
.week-badge { font-size: 11px; font-weight: 700; color: #fff; padding: 2px 9px; border-radius: 999px; }

.battery-row { display: flex; align-items: center; gap: 7px; margin-bottom: 10px; }
.battery {
  position: relative; flex: 1; height: 22px; background: var(--paper);
  border: 2px solid var(--blue-deep); border-radius: 7px; overflow: hidden;
}
.battery-fill {
  position: absolute; top: 0; bottom: 0; right: 0; width: 0;
  transition: width .45s var(--ease-out), background .3s;
}
.battery-fill::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.30), rgba(255,255,255,0) 62%);
}
.battery-ticks {
  position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(to left, transparent 0, transparent calc(20% - 1px), rgba(9,87,138,.16) calc(20% - 1px), rgba(9,87,138,.16) 20%);
}
.battery-cap { width: 4px; height: 10px; background: var(--blue-deep); border-radius: 0 3px 3px 0; }
.battery-label { min-width: 70px; text-align: left; font-weight: 800; font-size: 12.5px; white-space: nowrap; }

.alert { display: flex; gap: 7px; border-radius: 10px; padding: 8px 10px; margin-bottom: 8px; }
.alert-icon { font-weight: 800; font-size: 14px; line-height: 1.3; flex: 0 0 auto; }
.alert-text { font-size: 12.5px; line-height: 1.35; }
.alert-over { background: #FCE9EA; border: 1px solid #F3B7BB; }
.alert-over .alert-icon { color: var(--red); }
.alert-over .alert-text { color: #A11820; }
.alert-imbalance { background: #FFF6E0; border: 1px solid #F2D68A; }
.alert-imbalance .alert-icon { color: var(--amber); }
.alert-imbalance .alert-text { color: #8A5B08; }

.dropzone {
  flex: 1; min-height: 96px; border-radius: 12px; border: 1.5px dashed var(--gray-line);
  padding: 8px; display: flex; flex-direction: column; gap: 8px;
  transition: background .15s, box-shadow .15s;
}
.dropzone-empty { flex: 1; display: flex; align-items: center; justify-content: center; color: var(--gray-faint); font-size: 12.5px; font-weight: 600; text-align: center; pointer-events: none; }
.dz-over-week { box-shadow: inset 0 0 0 3px var(--blue-primary); background: var(--panel-blue); }
.dz-over-bank { box-shadow: inset 0 0 0 2px var(--blue-primary); background: var(--panel-blue); }

/* task block */
.block {
  position: relative; touch-action: none; cursor: grab; user-select: none;
  background: #fff; border-radius: 11px; box-shadow: var(--shadow-block);
  overflow: hidden; transition: transform .15s var(--ease-out), box-shadow .15s;
}
.block:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(16,33,60,.16); }
.block:active { cursor: grabbing; }
.block.in-week { padding: 9px 34px 9px 11px; }
.block .accent { position: absolute; top: 0; bottom: 0; right: 0; width: 5px; }
.block .block-name { font-weight: 700; font-size: 13.5px; color: var(--ink); line-height: 1.25; margin-bottom: 3px; word-break: break-word; }
.block .block-meta { display: flex; align-items: center; gap: 6px; }
.dot { width: 8px; height: 8px; border-radius: 999px; flex: 0 0 auto; }
.block-hours { font-size: 11.5px; color: var(--gray); font-weight: 600; }
.block-grip { margin-inline-start: auto; color: #C3CDD9; font-size: 12px; letter-spacing: 1px; line-height: 1; transition: color .15s; }
.block:hover .block-grip { color: var(--blue-primary); }

/* insertion line shown while reordering within a week */
.drop-indicator {
  height: 4px; border-radius: 999px; margin: 1px 2px;
  background: linear-gradient(90deg, var(--teal), var(--blue-primary));
  box-shadow: 0 0 0 3px rgba(31, 117, 180, 0.12);
  animation: miloPop .16s var(--ease-out) both;
}
.block-remove {
  position: absolute; top: 6px; left: 6px; width: 22px; height: 22px; border-radius: 999px;
  border: none; background: #F1F4F8; color: var(--gray); font-size: 13px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.block-remove:hover { background: #E4E9F0; }

/* bank */
.bank-col { flex: 1 1 300px; min-width: 260px; position: sticky; top: 74px; }
.bank-card { background: #fff; border-radius: 18px; box-shadow: var(--shadow-soft); padding: 16px; }
.bank-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.bank-head h2 { margin: 0; font-size: 17px; font-weight: 800; color: var(--blue-deep); }
.bank-count { font-size: 12px; color: var(--gray); }
.bank-note { font-size: 12.5px; color: var(--gray); margin: 0 0 12px; }

.btn-add {
  width: 100%; padding: 12px; border-radius: 13px; border: 2px dashed var(--blue-primary);
  background: var(--panel-blue); color: var(--blue-deep); font-weight: 800; font-size: 14.5px;
  margin-bottom: 14px; transition: background .15s;
}
.btn-add:hover { background: var(--wash-blue-strong); }

.bank-empty { text-align: center; padding: 18px 8px; color: var(--gray-faint); font-size: 13px; line-height: 1.5; }
.bank-list { display: flex; flex-direction: column; gap: 9px; }

.bank-block { position: relative; touch-action: none; cursor: grab; user-select: none; background: #fff; border-radius: 12px; box-shadow: var(--shadow-block); padding: 11px 13px; overflow: hidden; transition: transform .15s var(--ease-out), box-shadow .15s; }
.bank-block:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(16,33,60,.16); }
.bank-block:active { cursor: grabbing; }
.bank-block .accent { position: absolute; top: 0; bottom: 0; right: 0; width: 5px; }
.bank-block-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; padding-right: 6px; }
.bank-block-name { font-weight: 700; font-size: 14px; color: var(--ink); line-height: 1.25; word-break: break-word; }
.bank-block-meta { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.bank-block-meta span.txt { font-size: 12px; color: var(--gray); font-weight: 600; }
.bank-tools { display: flex; gap: 3px; flex: 0 0 auto; }
.tool-btn { width: 26px; height: 26px; border-radius: 8px; border: none; background: #F1F4F8; color: var(--gray); font-size: 13px; display: flex; align-items: center; justify-content: center; transition: background .15s; }
.tool-btn:hover { background: #E4E9F0; }
.tool-btn.danger { background: #FCE9EA; color: #C0303A; }
.tool-btn.danger:hover { background: #F8D7DA; }

.bank-return { margin-top: 12px; border-radius: 12px; border: 1.5px dashed var(--wash-blue-strong); padding: 10px; text-align: center; color: var(--gray-soft); font-size: 12px; transition: background .15s, box-shadow .15s; }

.legend { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--wash-blue); display: flex; flex-direction: column; gap: 7px; }
.legend-row { display: flex; align-items: center; gap: 8px; }
.legend-swatch { width: 12px; height: 12px; border-radius: 4px; }
.legend-row span.txt { font-size: 12.5px; color: var(--ink); }

/* ============================================================
   EXPORT
   ============================================================ */
.export-wrap { flex: 1; background: var(--wash-blue); padding: 24px 16px; }
.export-toolbar { max-width: 900px; margin: 0 auto 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.btn-back { padding: 10px 16px; border-radius: 12px; border: 2px solid #fff; background: #fff; color: var(--blue-deep); font-weight: 800; font-size: 14px; box-shadow: 0 2px 8px rgba(16,33,60,.08); }
.btn-print { padding: 10px 22px; border-radius: 12px; border: none; background: var(--blue-primary); color: #fff; font-weight: 800; font-size: 14.5px; box-shadow: 0 3px 10px rgba(31,117,180,.32); transition: background .18s; }
.btn-print:hover { background: var(--blue-deep); }

.export-sheet {
  max-width: 900px; margin: 0 auto; background: #fff; border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg); padding: 34px 38px;
}
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; border-bottom: 3px solid var(--blue-primary); padding-bottom: 14px; margin-bottom: 18px; }
.sheet-title { font-weight: 800; font-size: 26px; color: var(--blue-deep); line-height: 1.1; }
.sheet-subtitle { font-size: 13.5px; color: var(--gray); margin-top: 4px; }
.sheet-logo { font-weight: 800; font-size: 20px; color: var(--blue-primary); direction: ltr; text-align: left; }
.sheet-date { font-size: 11.5px; color: var(--gray); text-align: left; }

.sheet-weeks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.sheet-week { border: 1px solid var(--wash-blue); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; }
.sheet-week-head { background: var(--panel-blue); padding: 8px 10px; display: flex; align-items: center; justify-content: space-between; }
.sheet-week-head .lbl { font-weight: 800; font-size: 13.5px; color: var(--blue-deep); }
.sheet-week-head .sum { font-weight: 800; font-size: 12px; }
.sheet-week-body { padding: 8px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.sheet-empty { color: var(--gray-faint); font-size: 11.5px; text-align: center; padding: 8px 0; }
.sheet-task { position: relative; background: #F9FAFB; border-radius: 7px; padding: 6px 8px; overflow: hidden; }
.sheet-task .accent { position: absolute; top: 0; bottom: 0; right: 0; width: 4px; }
.sheet-task .st-name { font-size: 11.5px; font-weight: 700; color: var(--ink); line-height: 1.25; word-break: break-word; }
.sheet-task .st-hours { font-size: 10.5px; color: var(--gray); }

.sheet-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--wash-blue); }
.sheet-foot-legend { display: flex; gap: 18px; }
.sheet-foot-legend .item { display: flex; align-items: center; gap: 7px; }
.sheet-foot-legend .item .sw { width: 11px; height: 11px; border-radius: 3px; }
.sheet-foot-legend .item .txt { font-size: 12px; color: var(--ink); }
.sheet-foot-brand { font-size: 11px; color: var(--gray-soft); }

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay { position: fixed; inset: 0; z-index: 60; background: rgba(16,33,60,.42); display: flex; align-items: center; justify-content: center; padding: 18px; }
.modal { animation: miloPop .24s var(--ease-out) both; width: 100%; max-width: 430px; background: #fff; border-radius: 20px; box-shadow: 0 24px 60px rgba(16,33,60,.32); padding: 24px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.modal-head h3 { margin: 0; font-size: 20px; font-weight: 800; color: var(--blue-deep); }
.modal-close { width: 30px; height: 30px; border-radius: 999px; border: none; background: #F1F4F8; color: var(--gray); font-size: 17px; }
.modal-close:hover { background: #E4E9F0; }

.modal label { display: block; font-size: 13.5px; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.modal input {
  width: 100%; height: 46px; padding: 0 14px; border-radius: 12px;
  border: 2px solid var(--wash-blue-strong); font-size: 15px; outline: none;
  transition: border-color .15s;
}
.modal input:focus { border-color: var(--blue-primary); }
.modal .input-gap { margin-bottom: 16px; }
.modal .field-note { font-size: 12px; color: var(--gray); margin: 6px 0 16px; line-height: 1.45; }

.cat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 22px; }
.cat-opt { position: relative; cursor: pointer; border-radius: 13px; padding: 13px; }
.cat-opt.ops { background: var(--panel-blue); }
.cat-opt.dev { background: var(--panel-green); }
.cat-ring { position: absolute; inset: -3px; border-radius: 16px; pointer-events: none; }
.cat-opt.ops.selected .cat-ring { border: 3px solid var(--blue-primary); }
.cat-opt.dev.selected .cat-ring { border: 3px solid var(--teal); }
.cat-opt .cat-head { display: flex; align-items: center; gap: 8px; }
.cat-opt .cat-swatch { width: 16px; height: 16px; border-radius: 5px; }
.cat-opt .cat-name { font-weight: 800; font-size: 14px; }
.cat-opt.ops .cat-name { color: var(--blue-deep); }
.cat-opt.dev .cat-name { color: var(--green-deep); }
.cat-opt .cat-desc { font-size: 11.5px; color: var(--gray); margin-top: 4px; }

.modal .btn-save { width: 100%; height: 50px; border-radius: var(--radius-md); font-size: 16px; }

/* ============================================================
   MONTHLY ALLOCATION (plan screen — single block)
   ============================================================ */
.plan-single { max-width: 780px; margin: 0 auto; width: 100%; padding: 20px; }
.month-card { padding: 10px 22px 22px; }

.alloc-list { display: flex; flex-direction: column; }
.alloc-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--wash-blue);
}
.alloc-row:last-child { border-bottom: none; }
.alloc-idx {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 999px;
  background: var(--wash-blue); color: var(--blue-deep);
  font-weight: 800; font-size: 13px; display: flex; align-items: center; justify-content: center;
}
.alloc-name { flex: 1 1 auto; min-width: 0; font-size: 15px; font-weight: 600; color: var(--ink); line-height: 1.35; }
.alloc-input-wrap { position: relative; flex: 0 0 auto; width: 104px; }
.alloc-input {
  width: 100%; height: 42px; padding: 0 12px; border-radius: 11px;
  border: 2px solid var(--wash-blue-strong); background: #fff;
  font-size: 16px; font-weight: 700; color: var(--ink); text-align: start; outline: none;
  transition: border-color .15s;
}
.alloc-input:focus { border-color: var(--blue-primary); }
.alloc-suffix { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--gray-soft); font-size: 12px; pointer-events: none; }

/* "Other" free-text actions */
.other-block { margin-top: 18px; padding-top: 16px; border-top: 2px dashed var(--wash-blue-strong); }
.other-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.other-title { font-size: 17px; font-weight: 800; color: var(--blue-deep); }
.other-sub { font-size: 12.5px; color: var(--gray); }
.other-idx { background: var(--panel-green); color: var(--green-deep); }
.other-name-input {
  width: 100%; height: 42px; padding: 0 12px; border-radius: 11px;
  border: 2px solid var(--wash-blue-strong); background: #fff;
  font-size: 15px; color: var(--ink); outline: none; transition: border-color .15s;
}
.other-name-input:focus { border-color: var(--blue-primary); }
.other-remove {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: 999px; border: none;
  background: #FCE9EA; color: #C0303A; font-size: 16px; line-height: 1;
  display: flex; align-items: center; justify-content: center; transition: background .15s;
}
.other-remove:hover { background: #F8D7DA; }
.other-block .btn-add { margin-top: 12px; margin-bottom: 0; }

/* allocation summary */
.alloc-summary { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--gray-line); }
.alloc-summary-top { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.alloc-summary-label { font-size: 14px; font-weight: 700; color: var(--blue-deep); }
.alloc-summary-nums { font-size: 14px; color: var(--ink); }
.alloc-summary-nums strong { font-size: 17px; color: var(--blue-primary); }
.alloc-bar { height: 12px; background: var(--paper); border: 1px solid var(--gray-line); border-radius: 999px; overflow: hidden; }
.alloc-bar-fill { height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--teal), var(--blue-primary)); transition: width .35s var(--ease-out); }
.alloc-note { margin-top: 8px; font-size: 12.5px; color: var(--gray); }

/* over-quota state on the allocation summary */
.over-flag {
  display: inline-block; background: var(--red); color: #fff;
  font-size: 11px; font-weight: 800; padding: 2px 9px; border-radius: 999px;
  margin-inline-start: 8px; vertical-align: middle;
}
.over-flag[hidden] { display: none; }
.alloc-summary.is-over .alloc-bar { border-color: #F3B7BB; }
.alloc-summary.is-over .alloc-bar-fill { background: var(--red); }
.alloc-summary.is-over .alloc-summary-nums strong { color: var(--red); }
.alloc-summary.is-over .alloc-note { color: #A11820; font-weight: 700; }

/* over-quota reinforcement in the results subtitle */
.subtitle-over { color: var(--red); font-weight: 800; }

.plan-cta { margin-top: 18px; display: flex; justify-content: center; }
.cta-results { padding: 13px 30px; font-size: 16px; }

/* ============================================================
   RESULTS (export sheet — category breakdown)
   ============================================================ */
/* allocation status banner (over / under / exact) */
.result-status {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px; border-radius: 12px; margin-bottom: 20px;
  font-size: 14px; font-weight: 700; line-height: 1.35;
}
.result-status-icon {
  flex: 0 0 auto; width: 24px; height: 24px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800; color: #fff;
}
.result-status.is-over { background: #FCE9EA; border: 1px solid #F3B7BB; color: #A11820; }
.result-status.is-over .result-status-icon { background: var(--red); }
.result-status.is-under { background: #FFF6E0; border: 1px solid #F2D68A; color: #8A5B08; }
.result-status.is-under .result-status-icon { background: var(--amber); }
.result-status.is-ok { background: var(--panel-green); border: 1px solid #BFE0D9; color: var(--green-deep); }
.result-status.is-ok .result-status-icon { background: var(--green); }

.result-body { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.result-chart { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; }
.donut { width: 180px; height: 180px; }
.donut-num { font-size: 26px; font-weight: 800; fill: var(--blue-deep); }
.donut-lbl { font-size: 12px; font-weight: 600; fill: var(--gray); }
.donut-empty {
  width: 180px; height: 180px; border-radius: 999px; border: 3px dashed var(--gray-line);
  display: flex; align-items: center; justify-content: center; text-align: center;
  color: var(--gray-faint); font-size: 14px; font-weight: 700; line-height: 1.4;
}
.result-table-wrap { flex: 1 1 340px; min-width: 300px; }

.cat-table { width: 100%; border-collapse: collapse; }
.cat-table th {
  text-align: right; font-size: 12px; font-weight: 700; color: var(--gray);
  padding: 6px 8px; border-bottom: 2px solid var(--wash-blue);
}
.cat-table th:last-child, .cat-table td:last-child { text-align: left; }
.cat-table td { padding: 10px 8px; border-bottom: 1px solid var(--wash-blue); vertical-align: middle; }
.cat-table tr:last-child td { border-bottom: none; }
.ct-name { font-size: 14px; font-weight: 600; color: var(--ink); }
.ct-swatch { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-inline-start: 8px; vertical-align: middle; }
.ct-hours { font-size: 13.5px; color: var(--gray); white-space: nowrap; }
.ct-pct { min-width: 120px; }
.ct-pct-num { font-weight: 800; font-size: 15px; display: block; margin-bottom: 4px; text-align: left; }
.ct-minibar { display: block; height: 6px; background: var(--paper); border-radius: 999px; overflow: hidden; }
.ct-minibar-fill { display: block; height: 100%; border-radius: 999px; }

/* contributing activities listed under each category */
.cat-table td { vertical-align: top; }
.ct-name-main { display: flex; align-items: center; gap: 8px; font-size: 14.5px; font-weight: 700; color: var(--ink); }
.ct-name-main .ct-swatch { margin-inline-start: 0; }
.ct-items { list-style: none; margin: 6px 0 0; padding: 0 20px 0 0; display: flex; flex-direction: column; gap: 3px; }
.ct-items li { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.ci-name { font-size: 12.5px; color: var(--gray); line-height: 1.35; }
.ci-hours { font-size: 12px; font-weight: 600; color: var(--gray-soft); white-space: nowrap; }
.ct-items-empty { margin: 6px 20px 0 0; font-size: 12px; color: var(--gray-faint); }
.ct-unalloc .ct-name-main, .ct-unalloc .ct-hours { color: var(--gray-soft); font-weight: 700; }

.result-detail { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--wash-blue); }
.detail-title { font-size: 15px; font-weight: 800; color: var(--blue-deep); margin-bottom: 10px; }
.detail-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 24px; }
.detail-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px dashed var(--wash-blue); }
.detail-name { font-size: 13.5px; color: var(--ink); min-width: 0; }
.detail-hours { font-size: 13px; font-weight: 700; color: var(--gray); white-space: nowrap; }
.detail-empty { color: var(--gray-faint); font-size: 13px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 720px) {
  .bank-col { position: static; }
  .brand-title { font-size: 40px; }
  .card { padding: 24px 18px; }
  .plan-single { padding: 14px; }
  .result-body { justify-content: center; }
  .detail-list { grid-template-columns: 1fr; }
  .alloc-name { font-size: 14px; }
}

/* ============================================================
   PRINT — half-page MILO sheet only
   ============================================================ */
@media print {
  [data-print-hide] { display: none !important; }
  body { background: #fff; }
  .export-wrap { padding: 0; background: #fff; }
  .export-sheet { box-shadow: none !important; margin: 0 !important; border: none !important; border-radius: 0 !important; max-width: none !important; }
  @page { size: A4 portrait; margin: 14mm; }
}
