
/* All pages use the same working width */
.page{
  max-width:1300px !important;
  width:calc(100% - 40px) !important;
  margin:0 auto !important;
  padding:24px !important;
  box-sizing:border-box !important;
}

body{margin:0;padding:0;}

.app-version-badge{display:none !important;}

.header-version-inline,
.version-badge,
.footer-version,
.back-link{
  display:none !important;
}

.menu.no-print,
.menu{
  display:flex !important;
  flex-wrap:wrap !important;
  align-items:center !important;
  gap:8px 10px !important;
  margin:0 0 14px 0 !important;
  padding:10px 12px !important;
  min-height:48px !important;
  box-sizing:border-box !important;
}

.menu.no-print a,
.menu a{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  min-height:34px !important;
  padding:6px 12px !important;
  margin:0 !important;
  line-height:1.2 !important;
  white-space:nowrap !important;
  box-sizing:border-box !important;
}

@media (max-width: 900px){
  .page{
    width:calc(100% - 24px) !important;
    padding:16px !important;
  }
  .app-version-badge{display:none !important;}
}


:root{
  --bg:#eef3ec;
  --card:#ffffff;
  --line:#dbe5d7;
  --soft:#eef4e9;
  --head:#d8e7c6;
  --text:#22331f;
  --muted:#6a7568;
  --green:#2f7d32;
  --green-dark:#276a2a;
  --blue:#5f7f92;
  --orange:#f57c00;
  --red:#d32f2f;
}

*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  font-family:-apple-system,BlinkMacSystemFont,"Apple SD Gothic Neo","Malgun Gothic",sans-serif;
  background:var(--bg);
  color:var(--text);
}
.page{
  max-width:1800px;
  margin:0 auto;
  padding:22px;
}
.header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
  flex-wrap:wrap;
}

.title-wrap{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:18px;
  flex-wrap:wrap;
  width:100%;
}
.title-wrap .subtitle{
  margin-top:0;
  margin-left:auto;
  text-align:right;
  max-width:720px;
  line-height:1.35;
}
.title-wrap h1{
  margin:0;
  font-size:34px;
  line-height:1.15;
  letter-spacing:-0.02em;
}
.subtitle{
  margin-top:10px;
  color:var(--muted);
  font-size:14px;
}
.actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
  justify-content:flex-end;
  max-width:100%;
}
.menu{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin:10px 0 14px;
}
.menu a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 16px;
  border-radius:999px;
  background:#dfe9d9;
  color:#20331d;
  text-decoration:none;
  font-weight:700;
  font-size:15px;
  line-height:1.2;
}
.menu a.active{background:var(--green);color:#fff}
.card{
  background:var(--card);
  border-radius:22px;
  padding:10px 12px;
  margin-bottom:12px;
  box-shadow:0 2px 10px rgba(24,43,20,.06);
  border:1px solid #e7eee3;
}
.card h2{
  margin:0 0 10px;
  font-size:26px;
  letter-spacing:-0.02em;
}
.section-title{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:16px;
  flex-wrap:wrap;
}
.grid{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:10px;
}
.grid-1{grid-column:span 1}
.grid-2{grid-column:span 2}
.grid-3{grid-column:span 3}
.grid-4{grid-column:span 4}
input,select,textarea{
  display:block;
  width:100%;
  min-width:0;
  padding:12px 14px;
  border-radius:16px;
  border:2px solid #d5dfd1;
  background:#fff;
  font-size:16px;
  color:var(--text);
  outline:none;
}
input:focus,select:focus,textarea:focus{border-color:#93b38e}
textarea{min-height:64px; resize:vertical}
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:none;
  border-radius:14px;
  padding:10px 14px;
  font-size:15px;
  font-weight:800;
  color:#fff;
  cursor:pointer;
  text-decoration:none;
  white-space:nowrap;
}
.btn.primary{background:var(--green)}
.btn.primary:hover{background:var(--green-dark)}
.btn.blue{background:var(--blue)}
.btn.orange{background:var(--orange)}
.btn.red{background:var(--red)}
.btn.pill{border-radius:12px;padding:6px 10px;font-size:12px}
.searchbar{margin-top:14px; display:block}
table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  overflow:hidden;
  font-size:16px;
}
thead th{
  background:var(--head);
  text-align:left;
  padding:11px 12px;
  font-size:15px;
}
tbody td{
  background:#fff;
  padding:10px 12px;
  border-bottom:1px solid var(--line);
  vertical-align:top;
}
tbody tr:last-child td{border-bottom:none}
.actions-cell{display:flex;gap:10px;white-space:nowrap}
.actions-cell .btn{padding:6px 10px;border-radius:12px;font-size:12px}
.back-link{
  display:inline-flex;
  align-items:center;
  gap:8px;
  color:#4f2a95;
  text-decoration:none;
  font-weight:700;
}
.metric-grid{
  display:grid;
  grid-template-columns:repeat(7,minmax(0,1fr));
  gap:10px;
}
.metric{
  border:1px solid #dde6d8;
  border-radius:18px;
  padding:10px 12px;
  background:#f8fbf6;
}
.metric .label{font-size:13px;color:var(--muted);margin-bottom:4px}
.metric .value{font-size:18px;font-weight:800;color:var(--green-dark)}
.inline-help{font-size:13px;color:var(--muted);margin-top:8px;display:block}
.dual-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.triple-grid{display:grid;grid-template-columns:1fr 1fr 1fr;gap:12px}
.tag-list{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.tag-item{
  display:inline-flex;
  align-items:center;
  gap:8px;
  background:#eef4e9;
  border:1px solid #d7e2d1;
  border-radius:999px;
  padding:8px 12px;
  font-weight:700;
}
.tag-item button{
  border:none;
  border-radius:999px;
  padding:6px 10px;
  font-size:12px;
  color:#fff;
  cursor:pointer;
}
.version-badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:8px 12px;
  border-radius:999px;
  background:#eef4e9;
  border:1px solid #d7e2d1;
  color:#50624d;
  font-weight:700;
  font-size:13px;
}
.calendar-toolbar{
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  margin-bottom:14px;
}
.calendar-grid{
  display:grid;
  grid-template-columns:repeat(7,minmax(0,1fr));
  gap:8px;
}
.calendar-head{
  background:#d8e7c6;
  border-radius:12px;
  padding:10px 8px;
  text-align:center;
  font-weight:800;
}
.calendar-cell{
  background:#fff;
  border:1px solid #dfe7d8;
  border-radius:14px;
  min-height:118px;
  padding:10px;
  cursor:pointer;
  min-width:0;
  overflow:hidden;
}
.calendar-cell.muted{opacity:.45}
.calendar-cell.selected{outline:3px solid #93b38e}
.calendar-day{font-weight:800;margin-bottom:6px}
.event-chip{
  display:block;
  background:#eef4e9;
  border-radius:8px;
  padding:4px 6px;
  margin-bottom:4px;
  font-size:12px;
  line-height:1.3;
  max-width:100%;
  white-space:normal;
  word-break:break-word;
  overflow-wrap:anywhere;
}
.event-chip.schedule{background:#e7f2ff}
.event-chip.log{background:#f4efe1}
.event-chip.purchase{background:#f7ece7}
.event-chip.revenue{background:#e7f7ec}
.side-panel{display:grid;grid-template-columns:1.2fr .8fr;gap:18px}
.event-list{display:flex;flex-direction:column;gap:10px}
.event-item{border:1px solid #dde6d8;border-radius:12px;padding:12px;background:#fff}
.event-item .meta{font-size:12px;color:#6a7568;margin-top:4px}
.dashboard-grid{display:grid;grid-template-columns:1.1fr .9fr;gap:18px}
.todo-list{display:flex;flex-direction:column;gap:10px}
.todo-item{background:#fff;border:1px solid #dde6d8;border-radius:12px;padding:12px}
.todo-item .date{font-size:12px;color:#6a7568;margin-bottom:4px}
.todo-item.today{border-left:6px solid #2f7d32}
.todo-item.overdue{border-left:6px solid #d32f2f}
.todo-item.week{border-left:6px solid #5f7f92}
.compare-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}
.chart-wrap{max-width:600px !important; margin:18px auto 0 !important;}
.chart-wrap canvas{max-height:360px !important;}
.print-title,.print-meta{display:none !important}

@media (max-width:1200px){
  .grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .grid-2,.grid-3,.grid-4{grid-column:span 2}
  .metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .triple-grid,.dual-grid,.dashboard-grid,.side-panel{grid-template-columns:1fr}
  .compare-grid{grid-template-columns:1fr 1fr}
}
@media (max-width:760px){
  .page{padding:16px}
  .grid{grid-template-columns:1fr}
  .grid-2,.grid-3,.grid-4{grid-column:span 1}
  .metric-grid,.compare-grid{grid-template-columns:1fr}
  
.title-wrap{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:18px;
  flex-wrap:wrap;
  width:100%;
}
.title-wrap .subtitle{
  margin-top:0;
  margin-left:auto;
  text-align:right;
  max-width:720px;
  line-height:1.35;
}
.title-wrap h1{font-size:28px}
  .card{padding:16px;border-radius:18px}
  .actions{justify-content:flex-start}
}
@media print{
  @page{margin:10mm 12mm}
  html, body{background:#fff !important;margin:0 !important;padding:0 !important}
  body{-webkit-print-color-adjust:exact;print-color-adjust:exact}
  .page{padding:0 !important;max-width:none !important}
  .header,.menu,.actions,.subtitle,.back-link,.version-badge,.no-print,.grid,.searchbar,.inline-help,.calendar-toolbar,input,select,textarea,button,label{
    display:none !important;
  }
  .print-title{
    display:block !important;
    font-size:18pt !important;
    font-weight:800 !important;
    margin:0 0 8mm 0 !important;
    color:#22331f !important;
  }
  .print-meta{
    display:block !important;
    font-size:10pt !important;
    color:#333 !important;
    margin-bottom:6mm !important;
  }
  .print-meta .line{margin-bottom:2mm}
  .card{
    box-shadow:none !important;
    border:none !important;
    background:#fff !important;
    padding:0 !important;
    margin:0 0 6mm 0 !important;
    border-radius:0 !important;
  }
  .section-title{display:none !important}
  table{width:100% !important;border-collapse:collapse !important;font-size:10.5pt !important;margin:0 !important}
  thead{display:table-header-group !important}
  tr,td,th{page-break-inside:avoid !important;break-inside:avoid !important}
  thead th{
    background:#eef4e9 !important;
    color:#22331f !important;
    border:1px solid #cfd8cb !important;
    padding:7px 8px !important;
  }
  tbody td{
    border:1px solid #d7dfd3 !important;
    padding:7px 8px !important;
    color:#22331f !important;
    word-break:break-word !important;
    overflow-wrap:anywhere !important;
    vertical-align:top !important;
  }
  .event-list,.todo-list{display:block !important}
  .event-item,.todo-item{
    border:1px solid #d7dfd3 !important;
    background:#fff !important;
    margin:0 0 6px 0 !important;
    padding:8px 10px !important;
    break-inside:avoid !important;
    page-break-inside:avoid !important;
  }
  .calendar-grid{display:grid !important;grid-template-columns:repeat(7,minmax(0,1fr)) !important;gap:4px !important;margin:0 !important}
  .calendar-head{
    background:#eef4e9 !important;
    border:1px solid #cfd8cb !important;
    padding:6px !important;
    text-align:center !important;
    font-weight:800 !important;
  }
  .calendar-cell{
    min-width:0 !important;
    min-height:84px !important;
    border:1px solid #d7dfd3 !important;
    background:#fff !important;
    padding:6px !important;
    border-radius:8px !important;
  }
  .calendar-day{font-weight:800 !important;margin-bottom:4px !important}
  .event-chip{
    display:block !important;
    max-width:100% !important;
    white-space:normal !important;
    word-break:break-word !important;
    overflow-wrap:anywhere !important;
    padding:3px 5px !important;
    margin-bottom:3px !important;
    border-radius:6px !important;
    background:#f4f6ef !important;
  }
  canvas{max-width:100% !important;height:auto !important}
}


/* v27 UI polish */
.page{
  max-width:1400px;
  margin:0 auto;
}

.card{
  border-radius:18px !important;
  box-shadow:0 4px 12px rgba(0,0,0,0.06) !important;
}

.menu a{
  background:#e8f1e8 !important;
}

.menu a.active{
  background:#2f7d32 !important;
  color:#fff !important;
}

.btn{
  border-radius:10px !important;
}

input,select,textarea{
  border-radius:10px !important;
}

.metric{
  background:#f4f8f3 !important;
}

.chart-wrap{
  max-width:500px !important;
}


.hero-panel{padding-bottom:24px}
.metric-grid-hero{grid-template-columns:repeat(7,minmax(0,1fr))}
.metric-emphasis{background:#edf7ea;border-color:#cfe3c8}
.metric-alert{background:#fff3f0;border-color:#f0d2c9}
.metric-alert .value{color:#c13b32}
.metric-profit{background:#f2f7ff;border-color:#d6e1f4}
.focus-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-bottom:18px}
.priority-list{display:flex;flex-direction:column;gap:10px;min-height:120px}
.compact-list .todo-item{padding:11px 12px}
.todo-item.log{border-left:6px solid #8a6d3b}
.todo-item.empty{background:#fafcf8;color:#63705f}
.todo-item .meta{font-size:13px;color:#6a7568;margin-top:6px}
.chart-wrap{height:320px;max-width:100% !important;margin:18px auto 0 !important}
.chart-wrap canvas{max-height:none !important}
.btn-group{display:flex;gap:10px;flex-wrap:wrap}
.toolbar-right{display:flex;align-items:center;gap:12px;flex-wrap:wrap;justify-content:flex-end}
.chip-filters{display:flex;gap:8px;flex-wrap:wrap}
.filter-chip{
  border:none;
  background:#edf3ea;
  color:#31422d;
  padding:6px 10px;
  border-radius:999px;
  font-weight:700;
  cursor:pointer;
}
.filter-chip.active{background:var(--green);color:#fff}
.calendar-hero{padding-bottom:24px}
.calendar-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:16px}
.calendar-side-panel{grid-template-columns:1.1fr .9fr}
.calendar-cell{
  min-height:138px;
  padding:12px;
  border-radius:18px;
  position:relative;
  background:#fcfdfb;
}
.calendar-cell.today{outline:3px solid #93b38e;background:#f4fbf1}
.calendar-cell.has-overdue::after{
  content:"";
  width:10px;height:10px;border-radius:50%;
  background:#d32f2f;
  position:absolute;top:12px;right:12px;
}
.calendar-day{font-size:18px}
.event-chip{padding:5px 7px;border-radius:10px;font-size:12px}
.event-chip.schedule{background:#e8f2ff}
.event-chip.water{background:#e7f5ff}
.event-chip.pest{background:#ffefef}
.event-chip.harvest{background:#fff0df}
.event-chip.log{background:#f4efe1}
.event-chip.purchase{background:#ece7f7}
.event-chip.revenue{background:#e7f7ec}
.event-more{font-size:12px;color:#6a7568;margin-top:4px}
.event-item.large{padding:16px;border-radius:16px}
.event-item.large.schedule{border-left:6px solid #5f7f92}
.event-item.large.water{border-left:6px solid #3f88c5}
.event-item.large.pest{border-left:6px solid #d32f2f}
.event-item.large.harvest{border-left:6px solid #f57c00}
.event-item.large.log{border-left:6px solid #8a6d3b}
.event-item.large.purchase{border-left:6px solid #7b5fb3}
.event-item.large.revenue{border-left:6px solid #2f7d32}
.event-item.large.empty{border-left:none;background:#fafcf8}
.event-item-top{display:flex;justify-content:space-between;gap:12px;align-items:center;flex-wrap:wrap}
.event-date-badge{font-size:12px;color:#55624f;background:#eef4e9;padding:6px 10px;border-radius:999px}
.event-main{font-size:20px;font-weight:800;margin-top:8px;line-height:1.4}
@media (max-width:1200px){
  .focus-grid,.calendar-side-panel{grid-template-columns:1fr}
  .calendar-summary{grid-template-columns:1fr 1fr}
}
@media (max-width:760px){
  .metric-grid-hero,.calendar-summary{grid-template-columns:1fr}
  .calendar-cell{min-height:120px;padding:10px}
  .calendar-day{font-size:16px}
  .event-main{font-size:18px}
}


.main-dense-grid{
  display:grid;
  grid-template-columns:1.25fr 1.05fr .9fr;
  gap:18px;
  align-items:start;
  margin-bottom:18px;
}
.main-dense-grid.secondary{
  grid-template-columns:1fr 1fr .9fr;
}
.command-card,.schedule-preview-card,.side-summary-card{
  height:100%;
}
.command-strip{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
  margin-bottom:14px;
}
.mini-metric{
  border:1px solid #dde6d8;
  border-radius:16px;
  background:#f8fbf6;
  padding:12px 14px;
}
.mini-metric .label{font-size:13px;color:var(--muted);margin-bottom:6px}
.mini-metric .value{font-size:22px;font-weight:800}
.mini-metric.alert .value{color:var(--red)}
.dense-table thead th{ text-align:center; }
.dense-table tbody td{ padding:12px 10px; }
.click-row{ cursor:pointer; }
.click-row:hover td{ background:#f5f9f1; }
.click-row:focus td{ outline:2px solid #93b38e; outline-offset:-2px; }
.row-main{ font-weight:700; }
.row-sub{ margin-top:4px; font-size:12px; color:var(--muted); }
.state-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:46px;
  padding:5px 8px;
  border-radius:999px;
  font-size:12px;
  font-weight:800;
  background:#eef4e9;
}
.state-badge.today{ background:#dff1df; color:#1f6b22; }
.state-badge.week{ background:#e5eff7; color:#345468; }
.nested-list{
  display:flex;
  flex-direction:column;
  gap:8px;
  margin-top:10px;
}
.mini-row{
  border:1px solid #dde6d8;
  border-radius:12px;
  padding:10px;
  background:#fff;
}
.mini-row-main{
  font-weight:700;
  margin-bottom:8px;
}
.mini-row-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.priority-list.compact-list .todo-item{
  padding:10px 12px;
}
.priority-list .todo-item strong{
  display:block;
  line-height:1.4;
}
@media (max-width:1200px){
  .main-dense-grid,
  .main-dense-grid.secondary{
    grid-template-columns:1fr;
  }
  .command-strip{
    grid-template-columns:1fr 1fr 1fr;
  }
}
@media (max-width:760px){
  .command-strip{
    grid-template-columns:1fr;
  }
}

.num{text-align:right}
.metric-grid-hero{grid-template-columns:repeat(6,minmax(0,1fr))}
@media (max-width:1200px){
  .metric-grid-hero{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media (max-width:760px){
  .metric-grid-hero{grid-template-columns:1fr 1fr}
}

.selected-row td{background:#f4f9ee !important}
.state-badge.overdue{background:#fdeaea;color:#a62525}


.compact-table td{
  padding:6px 8px;
}

.row-main-inline{
  font-weight:700;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.actions-cell{
  display:flex;
  gap:6px;
  justify-content:flex-end;
}

.compact-table tr{
  cursor:pointer;
}

.compact-table tr:hover td{
  background:#f5f9f1;
}

.btn.pill{
  padding:4px 8px;
  font-size:12px;
}

.state-badge{
  font-size:11px;
  padding:4px 6px;
}


.compact-hero{
  padding:18px 22px;
}
.edit-card-fixed{
  padding:18px 22px;
}
.compact-form{
  grid-template-columns:1.1fr 1.7fr 1fr 1.5fr .9fr;
  gap:12px;
}
.compact-form input,
.compact-form select{
  padding:13px 15px;
}
.wide-btn{
  width:100%;
}
.schedule-bottom-grid{
  grid-template-columns:1.45fr .85fr;
  align-items:start;
}
.schedule-list-card,
.selected-card{
  height:100%;
}
.compact-filter{
  grid-template-columns:1.4fr .8fr .8fr .8fr;
  gap:10px;
}
.compact-filter input,
.compact-filter select{
  padding:12px 14px;
}

.list-scroll-wrap{
  margin-top:16px;
  max-height:54vh;
  min-height:180px;
  overflow:auto;
  border:1px solid #dfe7d8;
  border-radius:18px;
  background:#fff;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.55);
  -webkit-overflow-scrolling:touch;
  scrollbar-gutter:stable both-edges;
}
.list-scroll-wrap table{
  margin-top:0 !important;
  min-width:960px;
}
.list-scroll-wrap thead th{
  position:sticky;
  top:0;
  z-index:2;
  box-shadow:0 1px 0 #c9d8bc;
}
.list-scroll-wrap::-webkit-scrollbar{
  width:12px;
  height:12px;
}
.list-scroll-wrap::-webkit-scrollbar-thumb{
  background:#b7c8ae;
  border-radius:999px;
  border:3px solid #f4f8f1;
}
.list-scroll-wrap::-webkit-scrollbar-track{
  background:#f4f8f1;
  border-radius:999px;
}
.list-scroll-wrap tbody tr:hover td{
  background:#fbfdf9;
}
.list-table th,
.list-table td{
  vertical-align:top;
}
.list-table .cell-num,
.list-table .cell-money{
  text-align:right;
  white-space:nowrap;
}
.list-table .cell-memo{
  min-width:16rem;
  white-space:normal;
  line-height:1.35;
  overflow-wrap:anywhere;
}
.list-table .cell-actions{
  white-space:nowrap;
}
@media (max-width:1200px){
  .list-scroll-wrap{max-height:52vh;}
}
@media print{
  .list-scroll-wrap{
    max-height:none !important;
    overflow:visible !important;
    border:none !important;
    border-radius:0 !important;
    box-shadow:none !important;
  }
}
.table-scroll-wrap{
  max-height:520px;
  overflow:auto;
  border:1px solid #e3eadf;
  border-radius:18px;
}
.sticky-head-table{
  margin-top:0 !important;
}
.sticky-head-table thead th{
  position:sticky;
  top:0;
  z-index:2;
}
.sticky-head-table tbody td{
  background:#fff;
}
.selected-card .event-list{
  min-height:220px;
}
.selected-card .event-item.large{
  min-height:200px;
}
.selected-card .event-main{
  font-size:26px;
  line-height:1.35;
  font-weight:800;
}
.selected-card .meta{
  font-size:15px;
  line-height:1.55;
}
.selected-card .event-item{
  border-radius:18px;
  padding:18px;
  background:#f9fbf7;
}
.compact-table td{
  padding:10px 10px;
}
.compact-table .row-main-inline{
  white-space:normal;
  line-height:1.4;
}
.schedule-list-card .section-title,
.selected-card .section-title{
  margin-bottom:14px;
}
.action-slot{
  display:flex;
  align-items:stretch;
}
@media (max-width:1200px){
  .compact-form{
    grid-template-columns:1fr 1fr;
  }
  .schedule-bottom-grid{
    grid-template-columns:1fr;
  }
  .table-scroll-wrap{
    max-height:420px;
  }
}
@media (max-width:760px){
  .compact-filter,
  .compact-form{
    grid-template-columns:1fr;
  }
  .table-scroll-wrap{
    max-height:360px;
  }
}

.schedule-bottom-grid{
  grid-template-columns:1fr !important;
}
.selected-card{
  display:none !important;
}
.click-row td{
  transition:all .28s ease;
}


.main-hero-clean{
  padding:24px;
}
.main-hero-grid{
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
}
.main-overview-grid{
  display:grid;
  grid-template-columns:1.2fr .8fr;
  gap:18px;
}
.link-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}
.dashboard-link-card{
  display:block;
  text-decoration:none;
  color:var(--text);
  background:#f8fbf6;
  border:1px solid #dde6d8;
  border-radius:18px;
  padding:10px 12px;
}
.dashboard-link-card:hover{
  background:#f1f7ed;
}
.link-title{
  font-weight:800;
  font-size:18px;
  margin-bottom:6px;
}
.link-desc{
  color:var(--muted);
  font-size:14px;
  line-height:1.45;
}
.metric.metric-alert .value{ color: var(--red); }
.metric.metric-profit .value{ color: #1f6b22; }

@media (max-width:1200px){
  .main-overview-grid{
    grid-template-columns:1fr;
  }
  .main-hero-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}
@media (max-width:760px){
  .main-hero-grid,
  .link-grid{
    grid-template-columns:1fr;
  }
}


.inline-guide-note{
  margin:-4px 0 14px;
  padding:6px 6px 2px;
  color:var(--muted);
  font-size:13px;
}
.inline-guide-note strong{
  color:var(--text);
  margin-right:8px;
}
.guide-sections{
  display:flex;
  flex-direction:column;
  gap:18px;
}
.guide-group{
  border:1px solid #dde6d8;
  border-radius:20px;
  padding:10px 12px;
  background:#f9fbf7;
}
.guide-head{
  font-size:18px;
  font-weight:800;
  margin-bottom:12px;
  color:var(--green-dark);
}
.guide-links{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
}
@media (max-width:1200px){
  .guide-links{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}
@media (max-width:760px){
  .guide-links{
    grid-template-columns:1fr;
  }
  .inline-guide-note{
    font-size:12px;
  }
}


.page{padding:16px}
.header{margin-bottom:10px}
.menu a{padding:6px 10px;font-size:13px}

.main-hero-clean{padding:16px}
.main-hero-grid{grid-template-columns:repeat(4,1fr);gap:10px}

.metric{padding:10px}
.metric .label{font-size:12px}
.metric .value{font-size:16px}

.compact-guide-grid{
 display:grid;
 grid-template-columns:repeat(6,1fr);
 gap:8px;
 margin-top:10px;
}
.mini-link{
 display:block;
 padding:10px;
 background:#f4f8f2;
 border-radius:10px;
 text-align:center;
 font-size:12px;
 text-decoration:none;
 color:#222;
}
.mini-link:hover{background:#e8f3e3}

@media (max-width:1200px){
 .main-hero-grid{grid-template-columns:repeat(3,1fr)}
 .compact-guide-grid{grid-template-columns:repeat(4,1fr)}
}
@media (max-width:760px){
 .main-hero-grid{grid-template-columns:repeat(2,1fr)}
 .compact-guide-grid{grid-template-columns:repeat(2,1fr)}
}


.compact-work-guide{padding:16px 18px}
.group-menu-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
}
.group-menu-card{
  border:1px solid #dde6d8;
  border-radius:16px;
  background:#f8fbf6;
  padding:12px;
}
.group-title{
  font-size:15px;
  font-weight:800;
  color:var(--green-dark);
  margin-bottom:8px;
}
.group-links{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}
.group-links a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:6px 10px;
  border-radius:999px;
  background:#eef4e9;
  color:var(--text);
  text-decoration:none;
  font-size:12px;
  font-weight:700;
}
.main-list-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}
.main-list-grid .card{
  padding:12px 14px;
}
.main-list-grid .todo-item{
  padding:10px 12px;
}
.main-list-grid .todo-item strong{
  line-height:1.35;
}
@media (max-width:1200px){
  .group-menu-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .main-list-grid{
    grid-template-columns:1fr;
  }
}
@media (max-width:760px){
  .group-menu-grid{
    grid-template-columns:1fr;
  }
}


/* v57 main screen split */
.page{
  max-width: 1860px;
}
.screen-block{
  min-height: calc(100vh - 170px);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
.first-screen{
  padding-bottom: 12px;
}
.second-screen{
  padding-top: 10px;
}
.first-screen .card:last-child{
  margin-bottom: 0;
}
.second-screen .card:last-child{
  margin-bottom: 0;
}
.compact-work-guide{
  padding: 14px 18px;
}
.group-menu-card{
  padding: 10px 12px;
}
.group-title{
  font-size: 17px;
}
.group-links a{
  padding: 8px 14px;
  font-size: 15px;
  font-weight: 800;
}
.main-list-grid .card{
  min-height: calc(100vh - 230px);
}
.main-list-grid .priority-list{
  flex: 1;
}
.main-list-grid{
  align-items: stretch;
}
.main-list-grid .card{
  display: flex;
  flex-direction: column;
}
.main-list-grid .section-title{
  margin-bottom: 12px;
}

@media (max-width: 1200px){
  .screen-block{
    min-height: auto;
  }
  .main-list-grid .card{
    min-height: auto;
  }
}


.master-simple-grid{
  display:grid;
  grid-template-columns:1fr 1fr 1fr;
  gap:10px;
}
.simple-entry-card{
  padding:18px;
}
.simple-head{
  margin-bottom:12px;
}
.simple-head h2{
  margin:0 0 6px;
  font-size:24px;
}
.simple-entry-row{
  display:grid;
  grid-template-columns:1fr auto;
  gap:10px;
  align-items:center;
  margin-bottom:12px;
}
.simple-entry-row input{
  padding:14px 16px;
}
.simple-list{
  display:flex;
  flex-direction:column;
  gap:10px;
  max-height:520px;
  overflow:auto;
  padding-right:4px;
}
.simple-item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:12px 14px;
  border:1px solid #dde6d8;
  border-radius:16px;
  background:#f8fbf6;
}
.simple-item .name{
  font-size:17px;
  font-weight:800;
  line-height:1.35;
  word-break:keep-all;
}
.item-actions{
  display:flex;
  gap:8px;
  flex-shrink:0;
}
@media (max-width:1200px){
  .master-simple-grid{
    grid-template-columns:1fr;
  }
  .simple-list{
    max-height:none;
  }
}
@media (max-width:760px){
  .simple-entry-row{
    grid-template-columns:1fr;
  }
  .item-actions{
    width:100%;
    justify-content:flex-end;
  }
}


/* v72 calendar clean rebuild */
.calendar-bottom .card{margin-top:18px;}
.calendar-bottom .event-list{min-height:260px;}
.modal-backdrop{
  position:fixed; inset:0; background:rgba(34,51,31,.28);
  display:flex; align-items:center; justify-content:center; padding:24px; z-index:1000;
}
.modal-card{
  width:min(1220px,96vw); background:#fff; border-radius:28px;
  border:1px solid #dfe7d8; box-shadow:0 20px 60px rgba(24,43,20,.18); padding:28px;
}
.modal-schedule-grid{grid-template-columns:repeat(4,minmax(0,1fr));}
.modal-schedule-grid .grid-4{grid-column:span 2;}
.quick-add-btn{
  position:absolute; top:8px; right:8px; width:28px; height:28px;
  border:none; border-radius:999px; background:#eef4e9; color:var(--green-dark);
  font-weight:900; font-size:20px; line-height:1; cursor:pointer;
  display:inline-flex; align-items:center; justify-content:center;
}
.quick-add-btn:hover{background:#dfead8;}
.calendar-cell{position:relative;}
.calendar-day{padding-right:30px;}
.event-kind-badge{
  display:inline-flex; align-items:center; justify-content:center; min-width:48px;
  padding:4px 8px; margin-right:8px; border-radius:999px; font-size:12px; font-weight:800;
  vertical-align:middle;
}
.event-kind-badge.crop{background:#e7f7ec;color:#1f6b22;}
.event-kind-badge.material{background:#e7f2ff;color:#345468;}
.event-kind-badge.other{background:#fff0e1;color:#8a4b00;}
@media (max-width:900px){
  .modal-card{padding:20px;}
  .modal-schedule-grid{grid-template-columns:1fr;}
  .modal-schedule-grid .grid-2,
  .modal-schedule-grid .grid-4,
  .modal-schedule-grid .grid-1{grid-column:span 1;}
}


/* v74 menu font upgrade */
.menu {
  gap: 10px;
}

.menu a {
  font-size: 17px;
  padding: 10px 18px;
  font-weight: 600;
  letter-spacing: -0.3px;
}

.menu a.active {
  font-weight: 700;
}


/* v75 backup note */
.backup-note{
  margin-top:8px;
  font-size:13px;
  color:var(--muted);
}


/* v80 more-events popup */
.more-events-card{
  width:min(980px, 94vw);
}
.more-events-card .event-list{
  max-height:70vh;
  overflow:auto;
  padding-right:6px;
}
.more-events-card .event-item{
  margin-bottom:12px;
}


body{background:linear-gradient(180deg,#eef3ec 0%, #f7faf5 100%)}
.header{margin-bottom:20px}
.menu{position:sticky;top:0;z-index:30;padding:12px 0 14px;background:linear-gradient(180deg,rgba(238,243,236,.98) 0%, rgba(238,243,236,.92) 70%, rgba(238,243,236,0) 100%);backdrop-filter:blur(8px)}
.menu a{background:#e6eee1;border:1px solid #d8e2d3;box-shadow:0 1px 3px rgba(24,43,20,.04);transition:all .15s ease}
.menu a:hover{transform:translateY(-1px);background:#edf4e8}
.menu a.active{box-shadow:0 8px 18px rgba(47,125,50,.22)}
.card{box-shadow:0 10px 30px rgba(24,43,20,.06);border:1px solid #e3ece0}
input,select,textarea{box-shadow:inset 0 1px 2px rgba(0,0,0,.03)}
.section-title h2{margin:0}
.page{max-width:1680px}
@media (max-width: 1100px){
  .grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .metric-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .dual-grid,.triple-grid{grid-template-columns:1fr}
}
@media (max-width: 700px){
  .page{padding:16px}
  
.title-wrap{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:18px;
  flex-wrap:wrap;
  width:100%;
}
.title-wrap .subtitle{
  margin-top:0;
  margin-left:auto;
  text-align:right;
  max-width:720px;
  line-height:1.35;
}
.title-wrap h1{font-size:28px}
  .grid,.metric-grid{grid-template-columns:1fr}
  .menu{position:static}
}

/* v83 integrated search */
.search-hero-card{overflow:visible}
.search-toolbar{display:grid;gap:8px;margin-top:4px}
.search-main-row{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:8px;align-items:center}
.search-keyword-input{font-size:15px;height:42px}
.search-filter-row{display:flex;flex-wrap:wrap;gap:8px;align-items:center;justify-content:space-between}
.search-chip-group{display:flex;flex-wrap:wrap;gap:6px}
.search-date-range{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.search-date-range input{min-width:150px}
.search-quick-buttons{display:flex;flex-wrap:wrap;gap:6px}
.search-summary-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px;margin-top:10px}
.search-state-note{margin-top:8px;padding:8px 10px;border-radius:12px;background:#f5f8f2;border:1px solid #e1eadc;color:#51624a;font-size:13px}
.integrated-results-wrap{max-height:60vh}
.integrated-results-table td{vertical-align:top}
.search-type-badge{display:inline-flex;align-items:center;justify-content:center;min-width:56px;padding:5px 10px;border-radius:999px;font-size:12px;font-weight:800}
.search-type-badge.purchase{background:#e8f0ff;color:#305485}
.search-type-badge.irrigation{background:#e8f7ff;color:#006a88}
.search-type-badge.schedule{background:#edf7e8;color:#2d6a2d}
.result-link-btn{display:inline-flex;align-items:center;justify-content:center;padding:7px 10px;border-radius:10px;background:#edf4e8;border:1px solid #d8e2d3;color:#24471f;text-decoration:none;font-weight:700}
.result-link-btn:hover{background:#e1edd8}
.empty-cell{text-align:center;padding:18px 10px;color:#6c7a68}
@media (max-width:1280px){
  .search-summary-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media (max-width:820px){
  .search-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:820px){
  .search-main-row{grid-template-columns:1fr}
  .search-filter-row{align-items:flex-start}
  .search-date-range input{min-width:0;width:100%}
}
@media print{
  .integrated-results-wrap{max-height:none;overflow:visible}
}

/* ultra compact mode */
body{line-height:1.38}
.page{padding:16px 18px}
.header{margin-bottom:8px}

.title-wrap{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:18px;
  flex-wrap:wrap;
  width:100%;
}
.title-wrap .subtitle{
  margin-top:0;
  margin-left:auto;
  text-align:right;
  max-width:720px;
  line-height:1.35;
}
.title-wrap h1{font-size:28px;line-height:1.08}
.subtitle{margin-top:6px;font-size:13px}
.menu{gap:8px;margin:8px 0 10px}
.menu a{padding:8px 12px;font-size:13px}
.card{padding:8px 10px;margin-bottom:10px;border-radius:18px}
.card h2{margin:0 0 8px;font-size:22px}
.section-title{margin-bottom:10px}
.grid,.metric-grid,.dual-grid,.triple-grid,.focus-grid,.main-dense-grid,.main-dense-grid.secondary,.calendar-summary,.compare-grid{gap:8px}
input,select,textarea{padding:9px 11px;font-size:14px;border-radius:12px}
input,select{min-height:40px}
textarea{min-height:50px}
.btn{padding:8px 12px;font-size:14px;border-radius:11px!important}
.btn.pill,.actions-cell .btn{padding:5px 9px;font-size:12px}
.inline-help{margin-top:4px;font-size:12px}
.searchbar{margin-top:8px}
table{font-size:14px}
thead th{padding:8px 10px;font-size:14px}
tbody td{padding:8px 10px;font-size:14px;line-height:1.32}
.metric{padding:8px 10px;border-radius:14px}
.metric .label{font-size:12px;margin-bottom:2px}
.metric .value{font-size:16px}
.tag-list{gap:6px;margin-top:8px}
.tag-item{padding:6px 10px}
.actions{gap:8px}
.version-badge{padding:7px 11px;font-size:12px}
.list-scroll-wrap,.table-scroll{margin-top:6px}
.purchase-scroll{max-height:380px}
.list-table th,.data-table th{position:sticky;top:0;z-index:2}
@media (max-width:760px){
  .page{padding:12px}
  .card{padding:8px}
  
.title-wrap{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:18px;
  flex-wrap:wrap;
  width:100%;
}
.title-wrap .subtitle{
  margin-top:0;
  margin-left:auto;
  text-align:right;
  max-width:720px;
  line-height:1.35;
}
.title-wrap h1{font-size:24px}
  input,select,textarea{font-size:14px;padding:8px 10px}
  thead th,tbody td{padding:7px 8px}
}


@media (max-width: 980px){
  .title-wrap{
    align-items:flex-start;
  }
  .title-wrap .subtitle{
    margin-left:0;
    text-align:left;
    max-width:100%;
  }
}

/* v84 header and menu refinement */
.header{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;column-gap:18px;row-gap:6px;margin-bottom:10px}
.title-wrap{display:grid;grid-template-columns:auto minmax(240px,1fr);align-items:start;column-gap:18px;row-gap:4px;width:100%}
.title-wrap h1{grid-column:1;margin:0;white-space:nowrap}
.title-wrap .subtitle{grid-column:2;justify-self:end;align-self:center;margin:2px 0 0 0;max-width:420px;text-align:right;line-height:1.32}
.title-wrap .backup-note{grid-column:2;justify-self:end;max-width:420px;text-align:right;margin-top:2px;line-height:1.32}
.actions{grid-column:2;grid-row:1;justify-self:end;align-self:start;display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.menu{gap:6px;margin:6px 0 10px;padding:10px 0 12px}
.menu a{font-size:15px;padding:10px 16px}
@media (max-width:980px){.header{grid-template-columns:1fr}.actions{grid-column:1;grid-row:auto;justify-self:start}.title-wrap{grid-template-columns:1fr}.title-wrap .subtitle,.title-wrap .backup-note{grid-column:1;justify-self:start;text-align:left;max-width:100%}.title-wrap h1{white-space:normal}.menu a{font-size:14px;padding:9px 14px}}



/* v87 header usability */
.title-wrap .subtitle{max-width:360px;font-size:13px;line-height:1.28;word-break:keep-all}
.title-wrap .backup-note{max-width:360px;font-size:12px;line-height:1.28;word-break:keep-all}
.actions{gap:10px}
.btn.red{margin-left:6px}
.app-toast{position:fixed;right:20px;bottom:20px;z-index:9999;background:#20331d;color:#fff;padding:12px 16px;border-radius:14px;box-shadow:0 12px 28px rgba(0,0,0,.18);font-size:14px;font-weight:700;opacity:0;transform:translateY(10px);transition:all .2s ease}
.app-toast.show{opacity:1;transform:translateY(0)}
.app-toast.success{background:#2f7d32}
.app-toast.error{background:#b3261e}
@media (max-width:980px){
  .title-wrap .subtitle,.title-wrap .backup-note{max-width:100%}
  .btn.red{margin-left:0}
}


/* integrated search compact */
.search-summary-grid .metric{
  padding:10px 12px;
  min-height:72px;
}
.search-summary-grid .metric .label{
  font-size:13px;
  margin-bottom:4px;
}
.search-summary-grid .metric .value{
  font-size:20px;
  line-height:1.05;
}
.integrated-results-wrap{
  max-height:65vh;
}


/* v88 compact date + summary */
.date-range-row{
  display:flex;
  align-items:center;
  gap:6px;
  flex-wrap:nowrap;
}
.date-range-row input{
  width:200px;
  height:38px;
  padding:6px 8px;
  font-size:14px;
}
.date-sep{
  font-weight:700;
  color:#556;
}

.search-summary-grid{
  display:grid;
  grid-template-columns:repeat(6, minmax(0,1fr));
  gap:6px;
}

.search-summary-grid .metric{
  padding:8px 10px;
  min-height:60px;
}
.search-summary-grid .metric .label{
  font-size:12px;
  margin-bottom:2px;
}
.search-summary-grid .metric .value{
  font-size:18px;
  line-height:1.05;
}

.filter-chip-row{
  gap:6px;
}


/* exact fix: integrated search date range one-row */
.search-filter-row{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

.search-date-range{
  display:flex !important;
  align-items:center;
  gap:6px;
  flex-wrap:nowrap !important;
  white-space:nowrap;
  flex:0 0 auto;
}

.search-date-range input,
.search-date-range .date-input,
.search-date-range input[type="date"],
.search-date-range input[type="text"]{
  width:200px !important;
  min-width:200px !important;
  height:38px;
  padding:6px 8px;
  font-size:14px;
}

.search-date-range .date-sep,
.search-date-range span{
  display:inline-flex;
  align-items:center;
  font-weight:700;
  color:#556;
  margin:0 2px;
}

@media (max-width: 1280px){
  .search-date-range{
    flex-wrap:wrap !important;
  }
}


/* move range note beside quick range buttons */
.quick-range-row,
.search-quick-row,
.search-shortcut-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}

.quick-range-buttons,
.search-quick-buttons{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

.search-range-note-inline{
  font-size:14px;
  font-weight:600;
  color:#5f6f57;
  white-space:nowrap;
  margin-left:auto;
  padding-right:4px;
}

/* hide old standalone note rows if still present */
.search-range-note,
.search-summary-note,
.range-note{
  display:none !important;
}



/* actual fix: move #searchState beside quick buttons */
.search-filter-row{
  align-items:center;
}

.search-quick-buttons{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

.search-state-note{
  display:inline-flex;
  align-items:center;
  min-height:42px;
  margin:0 0 0 10px !important;
  padding:0 !important;
  border:0 !important;
  background:transparent !important;
  box-shadow:none !important;
  white-space:nowrap;
  font-size:14px;
  font-weight:600;
  color:#5f6f57;
}

.search-summary-grid + .search-state-note{
  display:none !important;
}


/* version display */
.app-version-badge{display:none !important;}



/* title + description in one row */
.title-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:nowrap;
  margin-bottom:8px;
}

.title-row h1,
.title-row h2,
.title-row h3{
  margin:0;
  white-space:nowrap;
  flex:0 0 auto;
}

.title-desc{
  flex:1 1 auto;
  min-width:0;
  font-size:13px;
  color:#6b7a65;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  text-align:left;
}

.title-desc p{
  margin:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

@media (max-width: 1100px){
  .title-row{
    flex-wrap:wrap;
  }
  .title-desc,
  .title-desc p{
    white-space:normal;
  }
}


/* actual inline titles + clear version */
.section-title-inline{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.inline-title-wrap{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
  flex:1 1 auto;
}
.inline-title-wrap h2{
  margin:0;
  white-space:nowrap;
  flex:0 0 auto;
}
.inline-title-wrap .inline-subtitle{
  margin:0;
  min-width:0;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.result-title-row{
  margin-bottom:10px;
}
.header-title-line{
  display:flex;
  align-items:center;
  gap:10px;
}
.header-version-inline{
  display:inline-flex;
  align-items:center;
  padding:3px 10px;
  border-radius:999px;
  background:#2e7d32;
  color:#fff;
  font-size:13px;
  font-weight:800;
}
.version-badge{
  display:inline-flex !important;
  align-items:center;
  padding:5px 10px !important;
  border-radius:999px !important;
  background:#2e7d32 !important;
  color:#fff !important;
  font-size:13px !important;
  font-weight:800 !important;
}

@media (max-width: 1200px){
  .inline-title-wrap{
    flex-wrap:wrap;
  }
  .inline-title-wrap .inline-subtitle{
    white-space:normal;
  }
}


/* real inline title layout */
.section-title-inline{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:12px !important;
}
.inline-title-wrap{
  display:flex !important;
  align-items:center !important;
  gap:12px !important;
  min-width:0 !important;
  flex:1 1 auto !important;
}
.inline-title-wrap h2{
  margin:0 !important;
  white-space:nowrap !important;
  flex:0 0 auto !important;
}
.inline-title-wrap .inline-subtitle{
  margin:0 !important;
  min-width:0 !important;
  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
}
.result-title-row{
  margin-bottom:10px !important;
}
.header-version-inline,
.version-badge{
  display:inline-flex !important;
  align-items:center !important;
  padding:4px 10px !important;
  border-radius:999px !important;
  background:#2e7d32 !important;
  color:#fff !important;
  font-size:13px !important;
  font-weight:800 !important;
}

@media (max-width: 1200px){
  .inline-title-wrap{
    flex-wrap:wrap !important;
  }
  .inline-title-wrap .inline-subtitle{
    white-space:normal !important;
  }
}


/* main header + main screen title real fix */
.header-main-clean{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  flex-wrap:wrap;
}
.title-wrap-main-clean{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  flex:1 1 auto;
  min-width:0;
}
.app-main-title-line{
  display:flex;
  align-items:center;
  gap:12px;
  flex:0 0 auto;
}
.app-main-title-line h1{
  margin:0;
  font-size:34px;
  line-height:1.15;
  letter-spacing:-0.02em;
  white-space:nowrap;
}
.app-main-badge{
  display:inline-flex;
  align-items:center;
  padding:5px 12px;
  border-radius:999px;
  background:#2e7d32;
  color:#fff;
  font-size:14px;
  font-weight:800;
  white-space:nowrap;
}
.app-main-desc{
  flex:1 1 auto;
  min-width:280px;
  color:var(--muted);
  font-size:14px;
  line-height:1.45;
  text-align:right;
  padding-top:6px;
}
.section-title-inline{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:12px !important;
  flex-wrap:nowrap !important;
}
.inline-title-wrap{
  display:flex !important;
  align-items:center !important;
  gap:12px !important;
  min-width:0 !important;
  flex:1 1 auto !important;
}
.inline-title-wrap h2{
  margin:0 !important;
  white-space:nowrap !important;
  flex:0 0 auto !important;
}
.inline-title-wrap .inline-subtitle{
  margin:0 !important;
  min-width:0 !important;
  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
}

@media (max-width: 1300px){
  .title-wrap-main-clean{
    flex-wrap:wrap;
  }
  .app-main-desc{
    text-align:left;
    padding-top:0;
  }
}
@media (max-width: 1100px){
  .section-title-inline{
    flex-wrap:wrap !important;
  }
  .inline-title-wrap{
    flex-wrap:wrap !important;
  }
  .inline-title-wrap .inline-subtitle{
    white-space:normal !important;
  }
}


/* layout cleanup */
[hidden]{display:none !important;}

.header-main-clean{
  align-items:center !important;
}
.title-wrap-main-clean{
  align-items:center !important;
}
.app-main-title-line{
  gap:10px !important;
}
.app-main-title-line h1{
  font-size:32px !important;
}
.app-main-desc{
  text-align:right !important;
  padding-top:0 !important;
  max-width:620px;
}
.header-main-clean .actions{
  display:flex !important;
  align-items:center !important;
  justify-content:flex-end !important;
  gap:10px !important;
  flex-wrap:wrap !important;
}
.header-main-clean .actions .version-badge{
  display:none !important; /* title badge only */
}
.header-main-clean input[type="file"]{
  display:none !important;
}

.section-title-actions{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.section-title-actions .btn{
  margin:0 !important;
}

@media (max-width: 1200px){
  .app-main-desc{
    text-align:left !important;
    max-width:none;
  }
}


/* HARD header rebuild */
.header-main-clean{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.header-main-clean .title-wrap{
  display:flex;
  justify-content:space-between;
  align-items:center;
}

.header-main-clean .actions{
  display:flex !important;
  gap:10px;
  align-items:center;
}

.header-main-clean .actions .btn{
  opacity:1 !important;
  filter:none !important;
}

.app-main-desc{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  font-size:14px;
}

/* hide duplicate version badge */
.version-badge{
  display:none !important;
}

/* hide file input */
input[type="file"]{
  display:none !important;
}


/*b actual fix */
.btn.green{background:var(--green) !important;color:#fff !important;}
.btn.green:hover{background:var(--green-dark) !important;}
.btn.steel{background:var(--blue) !important;color:#fff !important;opacity:1 !important;filter:none !important;}
.btn.steel:hover{background:#537082 !important;}
input[type="file"]{display:none !important;}
.version-badge{display:none !important;}

.header-main-clean{
  display:flex !important;
  flex-direction:column !important;
  gap:10px !important;
  margin-bottom:12px !important;
}
.header-main-clean .title-wrap{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:16px !important;
  width:100% !important;
  flex-wrap:nowrap !important;
}
.header-main-clean .actions{
  display:flex !important;
  gap:10px !important;
  align-items:center !important;
  justify-content:flex-start !important;
  width:100% !important;
  flex-wrap:wrap !important;
}
.header-main-clean .app-main-desc{
  margin-left:auto !important;
  text-align:right !important;
  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  font-size:14px !important;
  color:var(--muted) !important;
}
@media (max-width: 1200px){
  .header-main-clean .title-wrap{
    flex-wrap:wrap !important;
  }
  .header-main-clean .app-main-desc{
    margin-left:0 !important;
    text-align:left !important;
    white-space:normal !important;
  }
}


/* finish polish */
.header-main-clean .title-wrap{
  gap:10px !important;
}
.header-main-clean .actions .btn{
  height:36px !important;
  padding:0 14px !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  border-radius:14px !important;
  transition:transform .12s ease, box-shadow .12s ease, opacity .12s ease;
}
.header-main-clean .actions .btn:hover{
  transform:translateY(-1px);
  box-shadow:0 4px 10px rgba(24,43,20,.12);
}
.header-main-clean .actions .btn:active{
  transform:translateY(0);
  box-shadow:none;
}
.header-main-clean .btn.green{
  background:var(--green) !important;
}
.header-main-clean .btn.steel{
  background:#648093 !important;
}
.main, main{
  padding-top:10px !important;
}
.card{
  margin-bottom:10px !important;
}
.subtitle, .inline-subtitle{
  line-height:1.35 !important;
}
@media (max-width: 900px){
  .header-main-clean .actions{
    gap:8px !important;
  }
  .header-main-clean .actions .btn{
    height:34px !important;
    padding:0 12px !important;
    font-size:14px !important;
  }
  .menu{
    gap:8px !important;
  }
  .menu a{
    padding:9px 14px !important;
    font-size:14px !important;
  }
}



/* master page polish */
.master-page-clean .actions .back-link,
.master-page-clean .go-main,
.master-page-clean .back-main{
  display:none !important;
}

.master-page-clean .header{
  margin-bottom:14px;
}
.master-page-clean .title-wrap{
  align-items:flex-start;
}
.master-page-clean .title-wrap .subtitle{
  max-width:720px;
  color:#667560;
}

.master-page-clean .master-simple-grid{
  gap:14px;
}
.master-page-clean .simple-entry-card{
  padding:16px;
  border-radius:22px;
}
.master-page-clean .simple-head{
  margin-bottom:10px;
}
.master-page-clean .simple-head h2{
  font-size:20px;
  margin:0 0 4px;
}
.master-page-clean .inline-help{
  font-size:13px;
  color:#74826f;
}
.master-page-clean .simple-entry-row{
  gap:8px;
  margin-bottom:14px;
}
.master-page-clean .simple-entry-row input{
  height:48px;
  padding:0 16px;
  border-radius:14px;
}
.master-page-clean .simple-entry-row .btn{
  min-width:58px;
  height:44px;
  border-radius:14px;
}
.master-page-clean .simple-list{
  gap:8px;
  max-height:548px;
  padding-right:2px;
}
.master-page-clean .simple-item{
  min-height:50px;
  padding:10px 14px;
  border-radius:14px;
  background:#f7faf5;
}
.master-page-clean .simple-item .name{
  font-size:15px;
  font-weight:800;
}
.master-page-clean .item-actions{
  gap:6px;
}
.master-page-clean .item-actions .btn{
  min-width:42px;
  height:34px;
  padding:0 10px;
}
.master-page-clean .simple-list::-webkit-scrollbar{
  width:10px;
}
.master-page-clean .simple-list::-webkit-scrollbar-thumb{
  background:#d6e0d0;
  border-radius:999px;
}
.master-page-clean .simple-list::-webkit-scrollbar-track{
  background:transparent;
}

@media (max-width: 1280px){
  .master-page-clean .master-simple-grid{
    grid-template-columns:1fr;
  }
  .master-page-clean .simple-list{
    max-height:none;
  }
}


/* schedule print stabilization */
body.schedule-page 
body.schedule-page .event-more.more-btn,
body.schedule-page .quick-add-btn{display:inline-flex}
body.schedule-page .calendar-cell .event-chip:nth-of-type(n+3){display:none}
body.schedule-page .calendar-bottom{margin-top:12px}

@media print{
  @page{size:A4 landscape;margin:9mm}

  body.schedule-page{
    background:#fff !important;
    color:#1f2d1c !important;
  }
  body.schedule-page .footer-version,
  body.schedule-page .calendar-bottom,
  body.schedule-page .toolbar-right,
  body.schedule-page .btn-group,
  body.schedule-page .menu,
  body.schedule-page .header .subtitle,
  body.schedule-page .version-badge,
  body.schedule-page .event-more,
  body.schedule-page .quick-add-btn,
  body.schedule-page .modal-backdrop{
    display:none !important;
  }

  body.schedule-page .print-title{
    display:block !important;
    margin:0 0 4mm 0 !important;
    font-size:18pt !important;
    font-weight:800 !important;
    letter-spacing:-0.02em;
  }
  body.schedule-page .print-meta{
    display:block !important;
    margin:0 0 4mm 0 !important;
    font-size:9.5pt !important;
    color:#435240 !important;
  }

  body.schedule-page .page{
    padding:0 !important;
    max-width:none !important;
  }
  body.schedule-page .calendar-hero{
    margin:0 !important;
    padding:0 !important;
    break-inside:avoid-page !important;
    page-break-inside:avoid !important;
  }
  body.schedule-page .calendar-toolbar{
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:0 !important;
    margin:0 0 4mm 0 !important;
  }
  body.schedule-page #monthTitle{
    display:block !important;
    text-align:center !important;
    font-size:18pt !important;
    line-height:1.15 !important;
    margin:0 !important;
    padding:0 !important;
    color:#22331f !important;
  }
  body.schedule-page .calendar-summary{
    display:grid !important;
    grid-template-columns:repeat(4,minmax(0,1fr)) !important;
    gap:3mm !important;
    margin:0 0 4mm 0 !important;
  }
  body.schedule-page .metric{
    border:1px solid #d3ddd0 !important;
    border-radius:10px !important;
    padding:2.5mm 3mm !important;
    background:#f8fbf6 !important;
    min-height:auto !important;
  }
  body.schedule-page .metric .label{
    font-size:8pt !important;
    margin-bottom:1mm !important;
    color:#5c6a58 !important;
  }
  body.schedule-page .metric .value{
    font-size:12pt !important;
    color:#22331f !important;
  }
  body.schedule-page .metric-alert .value{color:#b2362d !important}

  body.schedule-page #calendarHead,
  body.schedule-page #calendarGrid{
    gap:2mm !important;
  }
  body.schedule-page .calendar-head{
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    min-height:10mm !important;
    padding:1.5mm 1mm !important;
    font-size:9pt !important;
    border-radius:8px !important;
    border:1px solid #ccd7c7 !important;
    background:#e8f0e3 !important;
  }
  body.schedule-page .calendar-cell{
    min-height:31mm !important;
    height:31mm !important;
    padding:2.2mm !important;
    border-radius:10px !important;
    border:1px solid #d5dfd1 !important;
    background:#fff !important;
    overflow:hidden !important;
    box-shadow:none !important;
    outline:none !important;
  }
  body.schedule-page .calendar-cell.today{
    outline:2px solid #7da978 !important;
    outline-offset:-2px !important;
    background:#f5fbf2 !important;
  }
  body.schedule-page .calendar-cell.selected{
    box-shadow:inset 0 0 0 2px #93b38e !important;
  }
  body.schedule-page .calendar-cell.has-overdue::after{
    top:2.2mm !important;
    right:2.2mm !important;
    width:2.2mm !important;
    height:2.2mm !important;
  }
  body.schedule-page .calendar-day{
    font-size:10pt !important;
    line-height:1 !important;
    margin:0 0 1.6mm 0 !important;
    font-weight:800 !important;
  }
  body.schedule-page .event-chip{
    display:-webkit-box !important;
    -webkit-box-orient:vertical !important;
    -webkit-line-clamp:1 !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
    white-space:normal !important;
    word-break:break-all !important;
    overflow-wrap:anywhere !important;
    min-height:5.6mm !important;
    max-height:5.6mm !important;
    line-height:1.15 !important;
    margin:0 0 1mm 0 !important;
    padding:1.2mm 1.4mm !important;
    border-radius:6px !important;
    font-size:7.6pt !important;
    background:#f2f5ef !important;
  }
  body.schedule-page .calendar-cell .event-chip:nth-of-type(n+3){
    display:none !important;
  }
}


/* schedule-page compact single-screen tuning */
body.schedule-page .page{
  max-width:1680px;
  padding:14px 18px 22px;
}
body.schedule-page .header{
  margin-bottom:10px;
  align-items:flex-start;
}
body.schedule-page .title-wrap{
  align-items:flex-start;
  gap:12px;
}
body.schedule-page .title-wrap h1{
  font-size:32px;
  line-height:1.05;
  margin:0;
}
body.schedule-page .title-wrap .subtitle{
  margin-left:auto;
  max-width:560px;
  font-size:12px;
  line-height:1.25;
  color:#6a7568;
}
body.schedule-page .menu{
  gap:10px;
  padding:10px 0 12px;
  margin-bottom:8px;
}
body.schedule-page .menu a{
  padding:9px 14px;
  font-size:15px;
  box-shadow:0 2px 8px rgba(77,99,70,.06);
}
body.schedule-page .calendar-hero{
  padding:14px 16px 16px;
  border-radius:24px;
}
body.schedule-page .calendar-toolbar{
  margin-bottom:10px;
  gap:8px;
}
body.schedule-page .calendar-toolbar h2{
  font-size:24px;
  letter-spacing:-0.02em;
}
body.schedule-page .btn-group,
body.schedule-page .toolbar-right,
body.schedule-page .chip-filters{
  gap:8px;
}
body.schedule-page .btn{
  padding:10px 14px;
  font-size:15px;
}
body.schedule-page .filter-chip{
  padding:8px 12px;
  font-size:14px;
}
body.schedule-page .calendar-summary{
  gap:10px;
  margin-bottom:10px;
}
body.schedule-page .metric{
  min-height:auto;
  padding:12px 14px;
  border-radius:18px;
}
body.schedule-page .metric .label{
  font-size:12px;
  margin-bottom:4px;
}
body.schedule-page .metric .value{
  font-size:18px;
}
body.schedule-page #calendarHead,
body.schedule-page #calendarGrid{
  gap:6px;
}
body.schedule-page .calendar-head{
  padding:8px 6px;
  border-radius:12px;
  font-size:14px;
}
body.schedule-page .calendar-cell{
  min-height:104px;
  padding:9px 10px 8px;
  border-radius:16px;
}
body.schedule-page .calendar-day{
  font-size:17px;
  margin-bottom:4px;
}
body.schedule-page .event-chip{
  padding:4px 6px;
  margin-bottom:3px;
  border-radius:9px;
  font-size:11px;
  line-height:1.15;
}
body.schedule-page .event-more{
  margin-top:2px;
  font-size:11px;
}
body.schedule-page .calendar-bottom{
  margin-top:14px;
}

@media (min-width:1400px){
  body.schedule-page .page{
    padding-top:10px;
  }
  body.schedule-page .title-wrap .subtitle{
    display:none;
  }
  body.schedule-page .calendar-cell{
    min-height:96px;
  }
  body.schedule-page .event-chip{
    font-size:10.5px;
    padding:3px 6px;
    line-height:1.1;
  }
}

@media (max-width:1360px){
  body.schedule-page .title-wrap .subtitle{
    max-width:100%;
    margin-left:0;
    text-align:left;
  }
  body.schedule-page .menu{
    gap:8px;
  }
  body.schedule-page .menu a{
    padding:8px 12px;
    font-size:14px;
  }
  body.schedule-page .calendar-toolbar h2{
    font-size:22px;
  }
  body.schedule-page .calendar-summary{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  body.schedule-page .calendar-cell{
    min-height:92px;
    padding:8px;
  }
}

@media (max-width:980px){
  body.schedule-page .page{
    padding:12px;
  }
  body.schedule-page .title-wrap h1{
    font-size:28px;
  }
  body.schedule-page .calendar-toolbar{
    align-items:flex-start;
  }
  body.schedule-page .calendar-summary{
    grid-template-columns:1fr 1fr;
  }
  body.schedule-page .calendar-cell{
    min-height:84px;
  }
  body.schedule-page .calendar-day{
    font-size:15px;
  }
}


.master-v2-page{padding-top:8px}
.master-v2-page .master-summary{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:8px;color:#445245}
.master-v2-page .master-summary.card{padding:14px 18px}
.master-v2-page .master-summary b{font-size:15px}
.master-v2-page .master-summary div{font-size:13px;line-height:1.42}
.master-tabs{display:flex;gap:8px;margin:0 0 10px;flex-wrap:wrap}
.master-tab{border:none;background:#e7ece4;color:#2f4a31;padding:10px 16px;border-radius:999px;font-weight:800;cursor:pointer;font-size:15px;line-height:1}
.master-tab.active{background:#2f8c35;color:#fff;box-shadow:0 10px 20px rgba(47,140,53,.18)}
.master-panel{display:none}
.master-panel.active{display:block}
.master-v2-page #tab-quick .master-simple-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;align-items:stretch}
.master-v2-page #tab-quick .simple-entry-card{display:flex;flex-direction:column;min-height:0;height:312px;padding:12px 12px 10px}
.master-v2-page #tab-quick .simple-head{margin-bottom:5px}
.master-v2-page #tab-quick .simple-head h2{font-size:17px;margin:0 0 1px;line-height:1.15}
.master-v2-page #tab-quick .inline-help{font-size:11px;line-height:1.28}
.master-v2-page #tab-quick .simple-entry-row{gap:8px;margin-bottom:7px}
.master-v2-page #tab-quick .simple-entry-row input{height:40px;padding:0 12px;font-size:14px}
.master-v2-page #tab-quick .simple-entry-row .btn{height:40px;min-width:52px;padding:0 12px;font-size:14px}
.master-v2-page #tab-quick .simple-list{flex:1;min-height:0;max-height:none;gap:5px;padding-right:2px}
.master-v2-page #tab-quick .simple-item{min-height:38px;padding:6px 10px;border-radius:13px}
.master-v2-page #tab-quick .simple-item .name{font-size:13px;line-height:1.18}
.master-v2-page #tab-quick .simple-item .code{font-size:11px}
.master-v2-page #tab-quick .item-actions .btn{height:28px;min-width:38px;padding:0 9px;font-size:12px}

.master-v2-page #tab-quick .quick-entry-meta{display:flex;gap:8px;align-items:center;flex-wrap:wrap;min-height:18px;margin:-1px 0 7px;padding:0 2px;font-size:12px;line-height:1.25}
.master-v2-page #tab-quick .quick-entry-meta .meta-code{color:#6e7d6d;font-weight:700}
.master-v2-page #tab-quick .quick-entry-meta .meta-ok{color:#247a31;font-weight:800}
.master-v2-page #tab-quick .quick-entry-meta .meta-warning{color:#c46a00;font-weight:800}
.master-v2-page #tab-quick .quick-entry-meta .meta-neutral{color:#70806f}
.master-v2-page #tab-quick .simple-item{display:grid;grid-template-columns:minmax(0,1.2fr) auto auto;gap:8px;align-items:center}
.master-v2-page #tab-quick .simple-item .name{display:flex;flex-wrap:wrap;align-items:center;gap:6px}
.master-v2-page #tab-quick .simple-item .code{display:inline-block;color:#7a857a;font-size:11px;font-weight:700}
.master-v2-page #tab-quick .quick-item-meta{display:flex;gap:6px;align-items:center;flex-wrap:wrap;justify-content:flex-end}
.master-v2-page #tab-quick .usage-chip{display:inline-flex;align-items:center;justify-content:center;height:24px;padding:0 8px;border-radius:999px;font-size:11px;font-weight:800;white-space:nowrap}
.master-v2-page #tab-quick .usage-chip.is-used{background:#eef6ea;color:#2f7a35}
.master-v2-page #tab-quick .usage-chip.is-idle{background:#f1f3ef;color:#6f7c6e}
.master-v2-page #tab-quick .usage-chip.is-active{background:#ecf5ff;color:#245f97}
.master-v2-page #tab-quick .usage-chip.is-inactive{background:#fff2e8;color:#b56a18}
@media (max-width: 1360px){
  .master-v2-page #tab-quick .simple-item{grid-template-columns:minmax(0,1fr) auto}
  .master-v2-page #tab-quick .quick-item-meta{grid-column:1 / -1;justify-content:flex-start}
}
@media (max-width: 840px){
  .master-v2-page #tab-quick .quick-entry-meta{font-size:11px}
}

.master-admin-grid{display:grid;grid-template-columns:220px 1.1fr .95fr;gap:16px;align-items:start}
.master-side,.master-center,.master-detail{min-height:620px}
.master-side h3,.master-detail h3{margin:0 0 12px;color:#1f3720}
.master-side-list{display:flex;flex-direction:column;gap:10px}
.master-side-btn{border:none;background:#eef2ec;color:#334836;padding:14px 16px;border-radius:16px;text-align:left;font-weight:800;cursor:pointer}
.master-side-btn.active{background:#2f8c35;color:#fff}
.master-toolbar{display:flex;gap:10px;margin:10px 0 14px}
.master-toolbar input,.master-toolbar select{height:46px}
.master-table-wrap{max-height:520px;overflow:auto;border:1px solid #dce6d8;border-radius:16px}
.master-table tbody tr{cursor:pointer}
.master-table tbody tr.is-selected{background:#eef6ea}
.master-form-grid label{display:block;font-size:13px;font-weight:700;color:#61705f;margin:0 0 6px}
.master-form-grid input,.master-form-grid select{height:46px}
.master-form-actions{display:flex;gap:10px;margin-top:16px;flex-wrap:wrap}
.section-title.compact{margin-bottom:0}
.empty-state{padding:22px 12px;text-align:center;color:#738172}
@media (max-width: 1180px){
  .master-admin-grid{grid-template-columns:1fr}
  .master-side,.master-center,.master-detail{min-height:auto}
}
@media (max-width: 1360px){
  .master-v2-page #tab-quick .master-simple-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .master-v2-page #tab-quick .simple-entry-card{height:300px}
}
@media (max-width: 840px){
  .master-v2-page .master-summary{grid-template-columns:1fr}
  .master-v2-page #tab-quick .master-simple-grid{grid-template-columns:1fr}
  .master-v2-page #tab-quick .simple-entry-card{height:auto;min-height:240px}
}


/* header layout cleanup */
.title-wrap,
.inline-title-wrap,
.header-title-line,
.title-row,
.app-main-title-row{
  display:flex !important;
  align-items:center !important;
  justify-content:flex-start !important;
  gap:10px !important;
  flex-wrap:wrap !important;
}

.title-wrap{
  width:auto !important;
  max-width:100% !important;
}

.title-wrap .subtitle,
.inline-title-wrap .inline-subtitle,
.header-title-line + .subtitle,
.app-main-desc,
.title-row .subtitle{
  margin:0 !important;
  margin-left:0 !important;
  text-align:left !important;
  max-width:none !important;
  line-height:1.35 !important;
}

.version-badge,
.header-version-inline,
.app-version-badge{display:none !important;}



@media (max-width: 860px){
  .title-wrap,
  .inline-title-wrap,
  .header-title-line,
  .title-row,
  .app-main-title-row{
    align-items:flex-start !important;
    gap:6px !important;
  }
}


/* cleanup */


@media print{
  
}


/* Main screen header layout refinement */
.main-header-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
}
.main-title-wrap{
  display:flex;
  align-items:center;
  gap:14px;
  flex-wrap:wrap;
}
.inline-desc{
  margin:0;
  white-space:nowrap;
}
.same-row-actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  margin:0;
}
.same-row-actions .btn{
  margin:0;
}


/* Main page header single-row layout */
.main-page-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
  margin:0 0 14px 0;
}
.main-header-left{
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
  min-width:0;
}
.main-header-left h1{
  margin:0;
}
.main-header-desc{
  color:#5f6f5f;
  white-space:nowrap;
}
.main-header-actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}
.main-header-actions .btn{
  margin:0;
}


/* ===== Stable top menu ===== */
.menu.no-print,
.menu{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px 10px;
  margin:0 0 14px 0 !important;
  padding:10px 12px !important;
  min-height:48px;
  box-sizing:border-box;
}
.menu.no-print a,
.menu a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:32px;
  padding:6px 12px;
  margin:0 !important;
  line-height:1.2;
  white-space:nowrap;
  vertical-align:middle;
  box-sizing:border-box;
}
.header + .menu.no-print,
header + .menu.no-print,
.main-page-header + .menu.no-print{
  margin-top:0 !important;
}


/* ===== Calendar day controls ===== */
.calendar-grid td,
.calendar-table td,
.calendar td,
.day-cell,
.calendar-day{
  position:relative;
  vertical-align:top;
}
.day-add-btn{
  position:absolute;
  top:6px;
  right:6px;
  width:22px;
  height:22px;
  border:1px solid #cfd8dc;
  border-radius:999px;
  background:#fff;
  font-size:14px;
  font-weight:700;
  line-height:20px;
  padding:0;
  cursor:pointer;
  z-index:2;
}
.day-items{
  max-height:72px;
  overflow:hidden;
}
.day-cell.expanded .day-items,
.calendar-day.expanded .day-items{
  max-height:none;
}
.day-more-btn{
  display:inline-block;
  margin-top:4px;
  padding:0;
  border:0;
  background:transparent;
  color:#2563eb;
  font-size:12px;
  cursor:pointer;
}



/* Main screen action buttons always enabled */
#backupBtn,
#restoreBtn,
#csvBtn,
#resetBtn{
  opacity:1 !important;
  pointer-events:auto !important;
  filter:none !important;
  cursor:pointer !important;
}



/* ===== Grouped menu & dashboard upgrade ===== */
.grouped-nav{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin:0 0 18px 0;
}
.grouped-nav-tabs,
.grouped-nav-links{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}
.grouped-nav-tabs button,
.grouped-nav-links a{
  border:1px solid #d9e4d3;
  background:#f4f8f1;
  color:#2f3d2e;
  border-radius:999px;
  padding:8px 16px;
  min-height:38px;
  font-weight:800;
  line-height:1.2;
  text-decoration:none;
  cursor:pointer;
  box-sizing:border-box;
}
.grouped-nav-tabs button.active,
.grouped-nav-links a.active{
  background:var(--green);
  color:#fff;
  border-color:var(--green);
  box-shadow:0 6px 14px rgba(47,125,50,.16);
}
.grouped-nav-tabs button:hover,
.grouped-nav-links a:hover{
  background:#e8f1e2;
}
.grouped-nav-tabs button.active:hover,
.grouped-nav-links a.active:hover{
  background:var(--green-dark);
}
.main-action-btn{
  opacity:1 !important;
  pointer-events:auto !important;
  filter:none !important;
  cursor:pointer !important;
  color:#fff !important;
}
.main-header-actions .main-action-btn{
  min-height:38px !important;
  padding:8px 14px !important;
  border-radius:11px !important;
  font-weight:800 !important;
}
.cultivation-overview{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
}
.cultivation-card{
  border:1px solid #dfe7d8;
  border-radius:16px;
  background:#fff;
  padding:14px 16px;
}
.cultivation-card .top{
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:center;
  margin-bottom:8px;
}
.cultivation-card .state{
  background:#eef4e9;
  color:#2f7d32;
  border-radius:999px;
  padding:4px 10px;
  font-size:12px;
  font-weight:800;
}
.cultivation-card .meta{
  color:#667360;
  font-size:13px;
  margin-top:4px;
}
.quick-entry-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:14px;
}
.quick-entry-card{
  display:flex;
  flex-direction:column;
  gap:6px;
  padding:16px;
  border-radius:16px;
  border:1px solid #dfe7d8;
  background:#fff;
  text-decoration:none;
  color:#243423;
}
.quick-entry-card strong{
  font-size:16px;
}
.quick-entry-card span{
  color:#667360;
  font-size:13px;
}
.quick-entry-card:hover{
  transform:translateY(-1px);
  box-shadow:0 8px 18px rgba(31,52,35,.08);
}
@media (max-width: 1100px){
  .cultivation-overview{grid-template-columns:repeat(2,minmax(0,1fr));}
  .quick-entry-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media (max-width: 700px){
  .cultivation-overview,
  .quick-entry-grid{grid-template-columns:1fr;}
}


/* ===== Purchase page compact layout ===== */
body.purchase-page .header,
body.purchase-page .menu.no-print,
body.purchase-page .grouped-nav{
  margin-bottom:10px !important;
}

body.purchase-page .card{
  padding:16px 18px !important;
}

body.purchase-page .section-title{
  margin-bottom:10px !important;
}

body.purchase-page .metric-grid{
  gap:10px !important;
  margin-bottom:10px !important;
}
body.purchase-page .metric{
  padding:12px 14px !important;
}
body.purchase-page .metric .label{
  margin-bottom:4px !important;
}
body.purchase-page .metric .value{
  font-size:18px !important;
}

body.purchase-page .grid{
  gap:10px 12px !important;
}
body.purchase-page .inline-note,
body.purchase-page .inline-help{
  margin-top:4px !important;
  margin-bottom:0 !important;
}

body.purchase-page .purchase-filter-tabs{
  position:relative !important;
  z-index:5 !important;
  display:flex !important;
  flex-wrap:wrap !important;
  gap:8px !important;
  margin:8px 0 10px 0 !important;
}
body.purchase-page .purchase-filter-tabs button{
  position:relative !important;
  z-index:6 !important;
}

body.purchase-page .searchbar{
  position:relative !important;
  z-index:1 !important;
  margin:0 0 10px 0 !important;
}

body.purchase-page .purchase-scroll,
body.purchase-page .purchase-list-scroll{
  max-height:560px !important;
  overflow-y:auto !important;
  overflow-x:auto !important;
  border:1px solid #e3ecde !important;
  border-radius:12px !important;
  padding-right:6px !important;
}

/* table should be content-aware, not evenly split */
body.purchase-page .purchase-table{
  width:100% !important;
  table-layout:auto !important;
}
body.purchase-page .purchase-table th,
body.purchase-page .purchase-table td{
  padding:10px 12px !important;
  vertical-align:top !important;
  line-height:1.45 !important;
  white-space:normal !important;
  word-break:keep-all !important;
  overflow-wrap:anywhere !important;
}
body.purchase-page .purchase-table tbody tr:hover{
  background:#f7fbf4 !important;
}
body.purchase-page .purchase-table th:nth-child(1),
body.purchase-page .purchase-table td:nth-child(1){ width:106px !important; white-space:nowrap !important; }
body.purchase-page .purchase-table th:nth-child(2),
body.purchase-page .purchase-table td:nth-child(2){ width:86px !important; white-space:nowrap !important; }
body.purchase-page .purchase-table th:nth-child(3),
body.purchase-page .purchase-table td:nth-child(3){ min-width:120px !important; }
body.purchase-page .purchase-table th:nth-child(4),
body.purchase-page .purchase-table td:nth-child(4){ min-width:140px !important; }
body.purchase-page .purchase-table th:nth-child(5),
body.purchase-page .purchase-table td:nth-child(5){ width:72px !important; white-space:nowrap !important; text-align:center !important; }
body.purchase-page .purchase-table th:nth-child(6),
body.purchase-page .purchase-table td:nth-child(6){ width:92px !important; white-space:nowrap !important; }
body.purchase-page .purchase-table th:nth-child(7),
body.purchase-page .purchase-table td:nth-child(7){ width:104px !important; white-space:nowrap !important; }
body.purchase-page .purchase-table th:nth-child(8),
body.purchase-page .purchase-table td:nth-child(8){ width:100px !important; white-space:nowrap !important; }
body.purchase-page .purchase-table th:nth-child(9),
body.purchase-page .purchase-table td:nth-child(9){ min-width:220px !important; max-width:320px !important; }
body.purchase-page .purchase-table th:nth-child(10),
body.purchase-page .purchase-table td:nth-child(10){ width:100px !important; white-space:nowrap !important; }

body.purchase-page .purchase-table .memo-cell{
  white-space:normal !important;
  word-break:keep-all !important;
  overflow-wrap:anywhere !important;
}

/* main page action buttons remain active */
.main-header-actions .main-action-btn,
#backupBtn,#restoreBtn,#csvBtn,#resetBtn{
  opacity:1 !important;
  pointer-events:auto !important;
  filter:none !important;
  cursor:pointer !important;
}


/* v1.0.8 main width sync */
body.main-page .page,
body.main-page .main-page-header,
body.main-page .main-header-left,
body.main-page .main-header-actions{
  max-width:1300px !important;
  box-sizing:border-box !important;
}
body.main-page .main-page-header{
  width:100% !important;
  margin:0 auto 14px auto !important;
  padding:6px 0 0 0 !important;
  align-items:flex-start !important;
}
body.main-page .main-header-left{
  width:auto !important;
  margin:0 !important;
}
body.main-page .main-header-actions{
  width:auto !important;
  margin:0 !important;
}



/* v1.0.9 index stabilization */
body.main-page > .page {
  max-width: 1300px !important;
  width: calc(100% - 40px) !important;
  margin: 0 auto !important;
  padding: 24px !important;
  box-sizing: border-box !important;
}

body.main-page .main-page-header,
body.main-page .grouped-nav,
body.main-page .screen-block {
  max-width: 100% !important;
}

body.main-page .main-header-actions {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
  opacity: 1 !important;
}

body.main-page .main-header-actions .main-action-btn,
body.main-page #backupBtn,
body.main-page #restoreBtn,
body.main-page #csvBtn,
body.main-page #resetBtn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 38px !important;
  padding: 8px 14px !important;
  border-radius: 11px !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  filter: none !important;
  cursor: pointer !important;
  color: #fff !important;
  font-weight: 800 !important;
  border: none !important;
}

body.main-page #backupBtn { background: var(--green) !important; }
body.main-page #restoreBtn,
body.main-page #csvBtn { background: var(--blue) !important; }
body.main-page #resetBtn { background: var(--red) !important; }

body.main-page .app-version-badge {
  top: 68px !important;
  right: 18px !important;
}


/* v1.1.1 version footer */
.footer-version{
  position:fixed !important;
  right:12px !important;
  bottom:10px !important;
  z-index:9999 !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  min-height:24px !important;
  padding:4px 8px !important;
  border-radius:8px !important;
  background:rgba(255,255,255,.92) !important;
  color:#5f6b63 !important;
  font-size:11px !important;
  font-weight:700 !important;
  border:1px solid rgba(0,0,0,.08) !important;
  box-shadow:0 2px 8px rgba(0,0,0,.08) !important;
  backdrop-filter: blur(2px) !important;
  pointer-events:none !important;
}



/* ===== v1.1.2 FINAL FIX ===== */

/* 전체 레이아웃 균형 */
body{
  display:flex;
  justify-content:center;
  background:#eef2ef !important;
}

/* 모든 페이지 동일 폭 */
.page{
  width:100%;
  max-width:1300px;
  margin:0 auto;
}

/* 활성 버튼 (파랑) */
button.active,
.tab.active,
.menu a.active{
  background:#2b6ef3 !important;
  color:#fff !important;
  font-weight:700 !important;
}

/* 기본 버튼 */
button{
  background:#f1f3f2 !important;
  color:#333 !important;
}

/* hover */
button:hover{
  background:#d9e2ff !important;
}

/* 상단 버전 표시 제거 */
.app-version-badge{display:none !important;}


/* ===== v1.1.3 layout + dropdown ===== */
body {
  display:block !important;
  margin:0 !important;
  padding:0 !important;
  background:#eef2ef !important;
}

.page {
  width:min(1300px, calc(100vw - 48px)) !important;
  max-width:none !important;
  margin:16px auto 24px auto !important;
  padding:0 !important;
  box-sizing:border-box !important;
  background:transparent !important;
  border-radius:0 !important;
  box-shadow:none !important;
}

body.main-page > .page,
body > .page {
  width:min(1300px, calc(100vw - 48px)) !important;
}

.main-page-header,
.grouped-nav,
.screen-block,
.header,
.card,
section,
.dropdown-nav {
  width:100% !important;
  box-sizing:border-box !important;
}

.main-page-header {
  padding:0 !important;
  margin:0 0 14px 0 !important;
}

.main-header-actions .main-action-btn,
#backupBtn,#restoreBtn,#csvBtn,#resetBtn {
  opacity:1 !important;
  pointer-events:auto !important;
  filter:none !important;
  cursor:pointer !important;
}

.dropdown-nav {
  margin:0 0 14px 0 !important;
}
.dropdown-tabs {
  display:flex !important;
  flex-wrap:wrap !important;
  gap:10px !important;
  align-items:flex-start !important;
}
.nav-group {
  position:relative;
}
.nav-group-btn {
  border:1px solid #d9e4d3;
  background:#f4f8f1;
  color:#2f3d2e;
  border-radius:999px;
  padding:8px 16px;
  min-height:38px;
  font-weight:800;
  line-height:1.2;
  cursor:pointer;
  box-sizing:border-box;
}
.nav-group-btn.active,
.nav-group.open .nav-group-btn,
.menu a.active,
button.active,
.tab.active {
  background:#2b6ef3 !important;
  color:#fff !important;
  font-weight:700 !important;
  box-shadow:0 2px 6px rgba(0,0,0,.15) !important;
  border-color:#2b6ef3 !important;
}
.nav-dropdown {
  position:absolute;
  top:calc(100% + 8px);
  left:0;
  min-width:180px;
  display:none;
  flex-direction:column;
  gap:4px;
  padding:10px;
  background:#fff;
  border:1px solid #dfe7d8;
  border-radius:14px;
  box-shadow:0 10px 24px rgba(0,0,0,.10);
  z-index:50;
}
.nav-group:hover .nav-dropdown,
.nav-group.open .nav-dropdown {
  display:flex;
}
.nav-dropdown a {
  display:block;
  padding:10px 12px;
  border-radius:10px;
  color:#243423;
  text-decoration:none;
  font-weight:700;
  white-space:nowrap;
}
.nav-dropdown a:hover,
.nav-dropdown a.active {
  background:#eef4ff;
  color:#1d4ed8;
}

.footer-version {
  position:fixed !important;
  right:12px !important;
  bottom:10px !important;
  z-index:9999 !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  min-height:24px !important;
  padding:4px 8px !important;
  border-radius:8px !important;
  background:rgba(255,255,255,.92) !important;
  color:#5f6b63 !important;
  font-size:11px !important;
  font-weight:700 !important;
  border:1px solid rgba(0,0,0,.08) !important;
  box-shadow:0 2px 8px rgba(0,0,0,.08) !important;
  backdrop-filter: blur(2px) !important;
  pointer-events:none !important;
}




/* ===== v1.3.2 stable layout + hover click topbar ===== */
:root {
  --topbar-offset: 92px;
  --app-width: 1300px;
  --page-side-gap: 48px;
  --topbar-blue: #2b6ef3;
  --topbar-blue-dark: #1d4ed8;
}

html, body {
  margin: 0 !important;
  padding: 0 !important;
}

body {
  background: #eef2ef !important;
}

.page {
  width: min(var(--app-width), calc(100vw - var(--page-side-gap))) !important;
  max-width: none !important;
  margin: 0 auto !important;
  padding: 0 !important;
  box-sizing: border-box !important;
  background: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.page-with-topbar {
  padding-top: var(--topbar-offset) !important;
}

.fixed-topbar {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 1200 !important;
  background: rgba(238,242,239,.97) !important;
  border-bottom: 1px solid #dce6d8 !important;
  box-shadow: 0 4px 14px rgba(0,0,0,.06) !important;
  backdrop-filter: blur(6px) !important;
}

.fixed-topbar-inner {
  width: min(var(--app-width), calc(100vw - var(--page-side-gap))) !important;
  margin: 0 auto !important;
  min-height: 64px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 14px !important;
  padding: 10px 0 !important;
  box-sizing: border-box !important;
}

.topbar-left,
.topbar-right {
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
}

.topbar-group {
  position: relative !important;
}

.topbar-main-btn {
  border: 1px solid #d9e4d3 !important;
  background: #f4f8f1 !important;
  color: #2f3d2e !important;
  border-radius: 999px !important;
  padding: 10px 18px !important;
  min-height: 42px !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  cursor: pointer !important;
  box-sizing: border-box !important;
}
.topbar-main-btn.active,
.topbar-group.open .topbar-main-btn {
  background: var(--topbar-blue) !important;
  border-color: var(--topbar-blue) !important;
  color: #fff !important;
  box-shadow: 0 4px 10px rgba(43,110,243,.22) !important;
}
.topbar-main-btn:hover {
  background: #e8f0ff !important;
}

.topbar-dropdown {
  position: absolute !important;
  top: calc(100% + 8px) !important;
  left: 0 !important;
  min-width: 160px !important;
  display: none !important;
  flex-direction: column !important;
  gap: 2px !important;
  padding: 8px !important;
  background: #fff !important;
  border: 1px solid #dfe7d8 !important;
  border-radius: 10px !important;
  box-shadow: 0 8px 16px rgba(0,0,0,.08) !important;
  z-index: 1300 !important;
}
.topbar-group:hover .topbar-dropdown,
.topbar-group.open .topbar-dropdown {
  display: flex !important;
}
.topbar-dropdown a {
  display: block !important;
  padding: 8px 10px !important;
  border-radius: 8px !important;
  color: #243423 !important;
  text-decoration: none !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
}
.topbar-dropdown a:hover,
.topbar-dropdown a.active {
  background: #eef4ff !important;
  color: var(--topbar-blue-dark) !important;
}

.topbar-action {
  border: none !important;
  border-radius: 11px !important;
  min-height: 42px !important;
  padding: 10px 14px !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  color: #fff !important;
  cursor: pointer !important;
  white-space: nowrap !important;
}
.topbar-action.action-backup { background: #2f7d32 !important; }
.topbar-action.action-restore,
.topbar-action.action-csv { background: #5b7a8e !important; }
.topbar-action.action-reset { background: #d93025 !important; }

.topbar-version {
  margin-left: 4px !important;
  padding-left: 6px !important;
  color: #6b7280 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
}

.app-version-badge,
.footer-version,
.main-page-header,
.header,
.title-wrap,
.title-row,
.page-title,
.main-header-desc {
  display: none !important;
}

.screen-block,
.card,
section {
  width: 100% !important;
  box-sizing: border-box !important;
}

.screen-block:first-child,
.card:first-child,
section:first-child {
  margin-top: 0 !important;
}

@media (max-width: 900px) {
  :root {
    --page-side-gap: 24px;
  }
  .topbar-action {
    padding: 8px 10px !important;
    font-size: 12px !important;
    min-height: 38px !important;
  }
  .topbar-main-btn {
    padding: 8px 14px !important;
    min-height: 38px !important;
    font-size: 13px !important;
  }
}


/* ===== v1.3.3 hard override ===== */
:root {
  --topbar-offset: 96px;
  --app-width: 1300px;
  --page-gap: 48px;
}

html, body {
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

body {
  background: #eef2ef !important;
}

body > .page,
.page {
  width: min(var(--app-width), calc(100vw - var(--page-gap))) !important;
  max-width: none !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  box-sizing: border-box !important;
}

.page-with-topbar {
  padding-top: var(--topbar-offset) !important;
}

.fixed-topbar {
  position: fixed !important;
  inset: 0 0 auto 0 !important;
  z-index: 1200 !important;
}

.fixed-topbar-inner {
  width: min(var(--app-width), calc(100vw - var(--page-gap))) !important;
  max-width: none !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.topbar-left,
.topbar-right {
  gap: 12px !important;
}

.topbar-main-btn,
.topbar-action {
  min-height: 42px !important;
  font-size: 14px !important;
  line-height: 1.2 !important;
}

.topbar-main-btn {
  padding: 10px 18px !important;
}

.topbar-action {
  padding: 10px 14px !important;
}

.topbar-dropdown {
  display: none !important;
  pointer-events: none !important;
}

.topbar-group:hover .topbar-dropdown,
.topbar-group.open .topbar-dropdown,
.topbar-group:focus-within .topbar-dropdown {
  display: flex !important;
  pointer-events: auto !important;
}

.topbar-dropdown a {
  pointer-events: auto !important;
}

.topbar-main-btn.active,
.topbar-group.open .topbar-main-btn {
  background: #2b6ef3 !important;
  border-color: #2b6ef3 !important;
  color: #fff !important;
}

@media (max-width: 900px) {
  :root {
    --page-gap: 24px;
  }
}


/* === layout hotfix v1.3.3-r3 === */
:root{
  --app-max-width:1300px;
  --app-side-gap:40px;
}
body{
  overflow-x:hidden;
}
.page.page-with-topbar,
body > .card,
body > .metric-grid,
body > .dual-grid,
body > .triple-grid,
body > .report-top,
body > .report-grid,
body > .calendar-hero,
body > .calendar-bottom{
  width:min(var(--app-max-width), calc(100vw - var(--app-side-gap))) !important;
  margin-left:auto !important;
  margin-right:auto !important;
}
.page.page-with-topbar{
  max-width:var(--app-max-width) !important;
  padding:22px !important;
}
body > .card,
body > .metric-grid,
body > .dual-grid,
body > .triple-grid,
body > .report-top,
body > .report-grid,
body > .calendar-hero,
body > .calendar-bottom{
  box-sizing:border-box !important;
  margin-top:0 !important;
  margin-bottom:18px !important;
}
body > .metric-grid,
body > .dual-grid,
body > .triple-grid,
body > .report-top,
body > .report-grid,
body > .calendar-bottom{
  padding-left:22px !important;
  padding-right:22px !important;
}
.page.page-with-topbar > .header{
  margin-bottom:12px !important;
}
.page.page-with-topbar > .header:empty{
  display:none !important;
}
@media (max-width: 900px){
  :root{ --app-side-gap:24px; }
  .page.page-with-topbar,
  body > .card,
  body > .metric-grid,
  body > .dual-grid,
  body > .triple-grid,
  body > .report-top,
  body > .report-grid,
  body > .calendar-hero,
  body > .calendar-bottom{
    width:min(var(--app-max-width), calc(100vw - var(--app-side-gap))) !important;
  }
  body > .metric-grid,
  body > .dual-grid,
  body > .triple-grid,
  body > .report-top,
  body > .report-grid,
  body > .calendar-bottom,
  .page.page-with-topbar{
    padding-left:16px !important;
    padding-right:16px !important;
  }
}


/* === v1.3.3-r4 topbar + width final fix === */
:root{
  --app-max-width:1300px;
  --app-side-gap:40px;
  --page-inner-pad:22px;
}
.fixed-topbar-inner,
.page.page-with-topbar{
  width:min(var(--app-max-width), calc(100vw - var(--app-side-gap))) !important;
  max-width:var(--app-max-width) !important;
  margin-left:auto !important;
  margin-right:auto !important;
  box-sizing:border-box !important;
}
.fixed-topbar-inner{
  padding:10px var(--page-inner-pad) !important;
}
.page.page-with-topbar{
  padding:calc(var(--topbar-offset) + 6px) var(--page-inner-pad) 22px !important;
}
.topbar-left,
.topbar-right{
  gap:10px !important;
}
.topbar-group{
  position:relative !important;
}
.topbar-group::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  top:100%;
  height:12px;
}
.topbar-dropdown{
  top:calc(100% + 6px) !important;
}
.topbar-group:hover .topbar-dropdown,
.topbar-group.open .topbar-dropdown,
.topbar-group.hover-open .topbar-dropdown,
.topbar-group:focus-within .topbar-dropdown{
  display:flex !important;
  pointer-events:auto !important;
}
.topbar-group.hover-open .topbar-main-btn,
.topbar-group.open .topbar-main-btn,
.topbar-group:focus-within .topbar-main-btn{
  background:#2b6ef3 !important;
  border-color:#2b6ef3 !important;
  color:#fff !important;
}
@media (max-width: 900px){
  :root{
    --app-side-gap:24px;
    --page-inner-pad:16px;
  }
  .fixed-topbar-inner{
    padding:8px var(--page-inner-pad) !important;
  }
  .page.page-with-topbar{
    padding:calc(var(--topbar-offset) + 4px) var(--page-inner-pad) 16px !important;
  }
}


/* === v1.4 final ui unification === */
:root{
  --app-max-width: 1280px;
  --app-side-gap: 40px;
  --page-inner-pad: 22px;
  --topbar-shell-bg: #ffffff;
  --topbar-shell-line: #d9e4d4;
  --topbar-shell-shadow: 0 10px 24px rgba(28, 43, 24, .10);
  --topbar-btn-text: #1f2e1d;
  --topbar-blue-2: #2b6ef3;
  --topbar-blue-3: #1f5ad2;
}
html, body{
  overflow-x:hidden !important;
}
body{
  background:#eef2ef !important;
}
.fixed-topbar{
  background: transparent !important;
  border-bottom: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  padding-top: 10px !important;
}
.fixed-topbar-inner,
.page.page-with-topbar{
  width:min(var(--app-max-width), calc(100vw - var(--app-side-gap))) !important;
  max-width:var(--app-max-width) !important;
  margin-left:auto !important;
  margin-right:auto !important;
  box-sizing:border-box !important;
}
.fixed-topbar-inner{
  background: var(--topbar-shell-bg) !important;
  border:1px solid var(--topbar-shell-line) !important;
  border-radius: 18px !important;
  box-shadow: var(--topbar-shell-shadow) !important;
  min-height: 66px !important;
  padding: 10px var(--page-inner-pad) !important;
  align-items: center !important;
}
.page.page-with-topbar{
  padding: calc(var(--topbar-offset) + 10px) var(--page-inner-pad) 22px !important;
}
.topbar-left,
.topbar-right{
  gap: 8px !important;
}
.topbar-main-btn{
  background:#f4f7f2 !important;
  color:var(--topbar-btn-text) !important;
  border:1px solid #d6e0d1 !important;
  padding:10px 16px !important;
  min-height:42px !important;
  font-size:14px !important;
  font-weight:800 !important;
}
.topbar-main-btn:hover,
.topbar-group.hover-open .topbar-main-btn,
.topbar-group.open .topbar-main-btn,
.topbar-group:focus-within .topbar-main-btn,
.topbar-main-btn.active{
  background: var(--topbar-blue-2) !important;
  border-color: var(--topbar-blue-2) !important;
  color:#fff !important;
  box-shadow: 0 6px 14px rgba(43,110,243,.22) !important;
}
.topbar-group{
  position:relative !important;
}
.topbar-group::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  top:100%;
  height:14px;
}
.topbar-dropdown{
  top:calc(100% + 6px) !important;
  left:0 !important;
  min-width:176px !important;
  padding:8px !important;
  border:1px solid #d9e4d4 !important;
  border-radius:14px !important;
  background:#fff !important;
  box-shadow:0 12px 24px rgba(24,37,20,.12) !important;
  z-index:1600 !important;
}
.topbar-group:hover .topbar-dropdown,
.topbar-group.hover-open .topbar-dropdown,
.topbar-group.open .topbar-dropdown,
.topbar-group:focus-within .topbar-dropdown{
  display:flex !important;
  pointer-events:auto !important;
}
.topbar-dropdown a{
  display:block !important;
  padding:10px 12px !important;
  font-size:13px !important;
  font-weight:700 !important;
  border-radius:10px !important;
  color:#233322 !important;
}
.topbar-dropdown a:hover,
.topbar-dropdown a.active{
  background:#edf3ff !important;
  color:var(--topbar-blue-3) !important;
}
.topbar-action{
  min-height:42px !important;
  border-radius:12px !important;
  padding:10px 14px !important;
  font-size:13px !important;
  font-weight:800 !important;
  letter-spacing:-0.01em !important;
  box-shadow: none !important;
}
.topbar-action.action-backup{ background:#2f7d32 !important; }
.topbar-action.action-restore{ background:#546e7a !important; }
.topbar-action.action-csv{ background:#607d8b !important; }
.topbar-action.action-reset{ background:#c62828 !important; }
.topbar-version{
  font-size:12px !important;
  color:#6b7280 !important;
  font-weight:700 !important;
  margin-left:6px !important;
}
.page.page-with-topbar > .header:empty{
  display:none !important;
}
.card{
  overflow:hidden;
}
@media (max-width: 900px){
  :root{
    --app-side-gap: 22px;
    --page-inner-pad: 16px;
  }
  .fixed-topbar{
    padding-top: 8px !important;
  }
  .fixed-topbar-inner{
    padding: 8px var(--page-inner-pad) !important;
    border-radius: 16px !important;
  }
  .page.page-with-topbar{
    padding: calc(var(--topbar-offset) + 8px) var(--page-inner-pad) 16px !important;
  }
  .topbar-right{
    row-gap: 6px !important;
  }
  .topbar-main-btn,
  .topbar-action{
    min-height:38px !important;
    padding:8px 12px !important;
  }
}


/* === v1.4.1 page header standardization === */
.page-header{
  background:#f6f8f6;
  border:1px solid #e3e8e3;
  border-radius:20px;
  padding:18px 20px;
  box-shadow:0 2px 8px rgba(0,0,0,.04);
  margin-bottom:16px;
}
.page-header-main{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
}
.page-title-wrap{display:block !important;min-width:0;flex:1 1 auto;}
.page-title-wrap h2,
.page-title-wrap .page-title-heading{
  margin:0;
  font-size:22px;
  font-weight:800;
  line-height:1.25;
  color:#111;
}
.page-title-wrap .page-desc,
.page-title-wrap .subtitle,
.page-title-wrap .inline-subtitle{
  margin:6px 0 0;
  font-size:14px;
  line-height:1.5;
  color:#4f5b52;
}
.page-actions{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.page-subnav{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:14px;
}
.page-subnav .segment-btn,
.page-subnav button,
.page-subnav .chip,
.page-subnav .buy-tab{
  border:1px solid #d5ddd5;
  background:#f3f6f3;
  color:#263126;
  border-radius:999px;
  min-height:42px;
  padding:0 18px;
  font-size:14px;
  font-weight:700;
  cursor:pointer;
}
.page-subnav .segment-btn.active,
.page-subnav button.active,
.page-subnav .chip.active,
.page-subnav .buy-tab.active{
  background:#2f6df3;
  color:#fff;
  border-color:#2f6df3;
  box-shadow:0 6px 14px rgba(43,110,243,.18);
}
.page-panel-title{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:14px;
}
.page-panel-title h3,
.page-panel-title .title{
  margin:0;
  font-size:18px;
  font-weight:800;
  color:#111;
}
.page-panel-title .subtitle{
  margin-top:4px;
  font-size:13px;
  color:#5b665c;
}
@media (max-width: 900px){
  .page-header{padding:16px; border-radius:18px;}
  .page-header-main{flex-direction:column; align-items:stretch;}
  .page-actions{justify-content:flex-start;}
}


/* === v1.4.2 micro alignment polish === */
.page-header{
  margin-bottom:18px !important;
}
.page-header-main{
  align-items:center !important;
}
.page-title-wrap{
  display:flex !important;
  flex-direction:column !important;
  justify-content:center !important;
}
.page-title-wrap h2,
.page-title-wrap .page-title-heading{
  margin:0 !important;
}
.page-title-wrap .page-desc,
.page-title-wrap .subtitle,
.page-title-wrap .inline-subtitle{
  margin-top:8px !important;
}
.page-actions{
  margin-top:4px !important;
}
.page-actions .btn{
  min-height:40px !important;
  padding:10px 14px !important;
  border-radius:12px !important;
  border:1px solid transparent !important;
  box-shadow:none !important;
  font-size:14px !important;
  font-weight:800 !important;
  opacity:1 !important;
  filter:none !important;
}
.page-actions .btn.primary,
.page-actions .btn.green{
  background:#2f8f3a !important;
  color:#fff !important;
  border-color:#2f8f3a !important;
}
.page-actions .btn.blue,
.page-actions .btn.steel,
.page-actions .btn.orange{
  background:#eef3ef !important;
  color:#2f3a31 !important;
  border-color:#d7e0d7 !important;
}
.page-actions .btn.red{
  background:#c62828 !important;
  color:#fff !important;
  border-color:#c62828 !important;
}
.page-actions .btn:disabled,
.page-actions .btn[disabled]{
  background:#e3e8e3 !important;
  color:#9aa59a !important;
  border-color:#e3e8e3 !important;
  cursor:not-allowed !important;
}
.page-header + .grid,
.page-header + .cleanup-layout,
.page-header + .kpi-row,
.page-header + .metric-grid,
.page-header + .dual-grid,
.page-header + .triple-grid,
.page-header + .purchase-grid,
.page-header + .list-scroll-wrap,
.page-header + .table-scroll,
.page-header + .card,
.page-header + .report-top,
.page-header + .report-grid,
.page-header + .calendar-hero,
.page-header + .calendar-bottom,
.page-header + .inline-help{
  margin-top:0 !important;
}
body.purchase-page .page-header-main{
  align-items:center !important;
}
body.purchase-page .page-subnav{
  margin-top:16px !important;
}
body.purchase-page .kpi-row{
  margin-top:0 !important;
}
body.purchase-page .page-actions{
  align-self:center !important;
}
body:not(.purchase-page) .page-header + .grid > .inline-help:first-child{
  margin-top:2px !important;
}
body .page-header + .grid .inline-help:first-child,
body .page-header + .purchase-grid + .inline-note:first-child{
  margin-top:0 !important;
}
@media (max-width: 900px){
  .page-actions{margin-top:0 !important;}
  .page-actions .btn{min-height:38px !important;padding:8px 12px !important;font-size:13px !important;}
}


/* === v1.4.4 common UI polish (PC Chrome) === */
.page{
  max-width:1360px !important;
}
.header:empty{
  display:none !important;
}
.card{
  padding:18px 20px !important;
  border-radius:20px !important;
  border:1px solid #e3ebe0 !important;
  box-shadow:0 4px 14px rgba(24,43,20,.05) !important;
}
.section-title{
  align-items:flex-start !important;
  margin-bottom:14px !important;
}
.section-title h2,
.section-title h3,
.section-title .title{
  margin:0 !important;
  line-height:1.3 !important;
}
.subtitle,
.inline-subtitle,
.inline-help{
  line-height:1.45 !important;
}
.btn{
  min-height:42px !important;
  padding:10px 16px !important;
  border-radius:12px !important;
  border:1px solid transparent !important;
  transition:background-color .15s ease,border-color .15s ease,box-shadow .15s ease,transform .12s ease !important;
}
.btn.primary{
  background:#2f7d32 !important;
  color:#fff !important;
  border-color:#2f7d32 !important;
}
.btn.primary:hover{
  background:#276a2a !important;
  box-shadow:0 6px 14px rgba(47,125,50,.16) !important;
}
.btn.blue{
  background:#eef3ef !important;
  color:#243228 !important;
  border-color:#d7e0d7 !important;
}
.btn.blue:hover,
.btn.orange:hover,
.btn.red:hover{
  box-shadow:0 6px 14px rgba(31,41,35,.10) !important;
}
.btn.orange{
  background:#f57c00 !important;
  border-color:#f57c00 !important;
}
.btn.red{
  background:#d32f2f !important;
  border-color:#d32f2f !important;
}
.btn.pill{
  min-height:32px !important;
  padding:6px 10px !important;
  border-radius:999px !important;
}
input,select,textarea{
  min-height:44px !important;
  border-radius:14px !important;
  border-color:#d6dfd3 !important;
  box-shadow:none !important;
}
input:focus,select:focus,textarea:focus{
  border-color:#8cab87 !important;
  box-shadow:0 0 0 3px rgba(140,171,135,.14) !important;
}
.summary-grid,
.kpi-row,
.metric-grid{
  gap:12px !important;
}
.summary-grid .card,
.kpi-card,
.metric{
  min-height:104px;
  display:flex;
  flex-direction:column;
  justify-content:center;
}
.summary-grid .label,
.kpi-card .label,
.metric .label{
  margin-bottom:6px !important;
}
.big-number,
.kpi-card .value,
.metric .value{
  line-height:1.15 !important;
}
.list-scroll-wrap,
.table-scroll{
  margin-top:12px !important;
  border:1px solid #e4ebe1;
  border-radius:16px;
  overflow:auto;
  background:#fff;
}
.list-table thead th,
table thead th{
  position:sticky;
  top:0;
  z-index:1;
}
.actions-cell{
  gap:6px !important;
}
.searchbar{
  margin-top:12px !important;
}
.searchbar input{
  background:#fbfcfb !important;
}
.crops-header-actions .btn,
.section-title-actions .btn{
  min-width:88px;
}
@media (max-width: 1100px){
  .summary-grid{grid-template-columns:repeat(2,minmax(0,1fr)) !important;}
}


/* === v1.4.4 compact density tuning (PC Chrome) === */
:root{
  --app-max-width: 1440px !important;
  --page-inner-pad: 14px !important;
}
.page,
.page.page-with-topbar{
  max-width:1440px !important;
}
.fixed-topbar{
  padding-top:6px !important;
}
.fixed-topbar-inner{
  min-height:56px !important;
  padding:8px 12px !important;
  border-radius:16px !important;
}
.page.page-with-topbar{
  padding:calc(var(--topbar-offset) - 2px) 14px 14px !important;
}
.topbar-left, .topbar-right{
  gap:6px !important;
}
.topbar-main-btn{
  min-height:36px !important;
  padding:8px 14px !important;
  font-size:13px !important;
}
.topbar-action{
  min-height:36px !important;
  padding:8px 12px !important;
  font-size:12px !important;
}
.topbar-version{
  font-size:11px !important;
}
.card{
  padding:12px 14px !important;
  border-radius:18px !important;
  margin-bottom:10px !important;
}
.card h2,
.section-title h2{
  font-size:18px !important;
  line-height:1.25 !important;
}
.section-title{
  margin-bottom:10px !important;
  gap:8px !important;
}
.subtitle, .inline-subtitle, .inline-help{
  font-size:12px !important;
  line-height:1.35 !important;
}
.btn{
  min-height:34px !important;
  padding:7px 12px !important;
  border-radius:11px !important;
  font-size:13px !important;
}
.btn.pill{
  min-height:28px !important;
  padding:4px 9px !important;
  font-size:11px !important;
}
input,select,textarea{
  min-height:34px !important;
  padding:7px 10px !important;
  border-radius:12px !important;
  font-size:14px !important;
}
textarea{
  min-height:54px !important;
}
.grid, .dual-grid, .triple-grid, .metric-grid, .summary-grid, .kpi-row{
  gap:8px !important;
}
.summary-grid{
  margin-top:10px !important;
}
.summary-grid .card,
.kpi-card,
.metric{
  min-height:74px !important;
  padding:10px 12px !important;
}
.summary-grid .label, .kpi-card .label, .metric .label{
  font-size:12px !important;
  margin-bottom:4px !important;
}
.big-number, .kpi-card .value, .metric .value{
  font-size:16px !important;
}
.list-scroll-wrap, .table-scroll{
  margin-top:8px !important;
  border-radius:14px !important;
}
.list-table, table{
  font-size:14px !important;
}
thead th,
.list-table thead th{
  padding:8px 10px !important;
  font-size:13px !important;
}
tbody td,
.list-table tbody td{
  padding:7px 10px !important;
  line-height:1.35 !important;
}
.searchbar{
  margin-top:8px !important;
}
.event-list, .priority-list, .group-links{
  gap:6px !important;
}
.priority-list{
  min-height:auto !important;
}
.todo-item, .event-item, .today-item, .done-item{
  padding:8px 10px !important;
}
.todo-item .meta, .event-item .meta{
  font-size:12px !important;
}
.inline-guide-note{
  margin:4px 0 8px !important;
  font-size:12px !important;
}
.compact-work-guide{
  padding:10px 12px !important;
}
.group-menu-grid{
  gap:8px !important;
}
.group-menu-card{
  padding:9px 10px !important;
  border-radius:14px !important;
}
.group-title{
  font-size:14px !important;
  margin-bottom:6px !important;
}
.group-links a{
  padding:5px 9px !important;
  font-size:12px !important;
}
.screen-block{
  min-height:auto !important;
}
.first-screen, .second-screen{
  padding-top:0 !important;
  padding-bottom:4px !important;
}
.main-list-grid{
  gap:8px !important;
}
.main-list-grid .card{
  min-height:auto !important;
  padding:10px 12px !important;
}
.main-list-grid .todo-item{
  padding:8px 10px !important;
}
body .page .card + .metric-grid{
  margin-top:8px !important;
}
body .page .metric-grid + .dual-grid{
  margin-top:10px !important;
}
.crops-header-actions .btn,
.section-title-actions .btn{
  min-width:72px !important;
}
@media (max-width: 1200px){
  .group-menu-grid{grid-template-columns:repeat(2,minmax(0,1fr)) !important;}
}


/* === v1.4.5 main dashboard title + priority layout === */
.dashboard-page-header{margin-bottom:10px !important;}
.compact-hero-panel{padding-top:12px !important;}
.compact-section-title{margin-bottom:10px !important;}
.compact-hero-panel .section-title h2{font-size:18px !important;}
.compact-hero-panel .inline-subtitle{font-size:12px !important;}
.compact-help-screen{min-height:auto !important;}
.dashboard-help-toggle{padding:10px 12px !important;}
.dashboard-help-toggle summary{
  cursor:pointer;
  list-style:none;
  font-weight:700;
  font-size:14px;
  color:#2c3e2f;
}
.dashboard-help-toggle summary::-webkit-details-marker{display:none;}
.dashboard-help-toggle .help-toggle-body{margin-top:10px;}
.compact-guide-note{margin-bottom:10px !important; padding:8px 10px !important;}
.main-page .first-screen{min-height:auto !important;}
.main-page .second-screen{min-height:auto !important;}
.main-page .main-list-grid{margin-top:0 !important;}
.main-page .main-list-grid .card{padding:12px 14px !important;}
.main-page .main-list-grid .section-title{margin-bottom:8px !important;}
.main-page .main-list-grid .subtitle{font-size:12px !important;}


/* === v1.4.6 requested layout adjustments === */
.main-summary-panel{padding-top:10px !important;}
.main-summary-panel .main-hero-grid{margin-top:0 !important;}
.report-top-summary{align-self:start !important;}
.report-top-summary .metric{height:auto !important; min-height:0 !important;}
.irrigation-header-actions{display:flex !important; align-items:center !important; gap:8px !important; flex-wrap:wrap !important;}
.irrigation-header-actions .btn{min-width:0 !important;}


/* phase 6 structure update */
.main-summary-integrated .integrated-main-summary-title{margin-bottom:14px;align-items:flex-start}
.main-summary-integrated .integrated-main-summary-title .subtitle{margin-top:4px}
.report-top-card{padding-bottom:16px}
.report-filter-summary-wrap{display:flex;gap:14px;align-items:flex-end;justify-content:space-between;flex-wrap:nowrap}
.report-filter-panel-compact{flex:1 1 auto;margin-top:10px}
.report-summary-inline{flex:0 0 auto;grid-template-columns:repeat(4,minmax(96px,1fr));gap:8px;max-width:420px}
.report-summary-inline .metric{min-height:88px;padding:10px 12px}
.report-summary-inline .label{line-height:1.25}
.irrigation-overview-card{margin-bottom:14px}
.irrigation-summary-grid{margin-bottom:12px}
.irrigation-status-grid{margin-top:8px;gap:12px}
.irrigation-status-grid .status-panel{border:1px solid #dbe4d6;border-radius:16px;padding:12px 14px;background:#fff}
.irrigation-status-grid .status-title{font-size:16px;font-weight:700;color:#2e3b2f;margin-bottom:8px}
.irrigation-status-grid .event-list{margin-top:0}
@media (max-width: 1200px){
  .report-filter-summary-wrap{flex-wrap:wrap}
  .report-summary-inline{max-width:none;width:100%;grid-template-columns:repeat(4,minmax(120px,1fr))}
}


/* ===== v3.1 sidebar integration ===== */
body.sidebar-app{
  background:#edf1ee !important;
  min-width:1280px;
  height:100vh;
  overflow:hidden;
}
body.sidebar-app .legacy-topbar-hidden{
  display:none !important;
}
body.sidebar-app .sidebar-shell{
  display:grid;
  grid-template-columns:232px minmax(0,1fr);
  height:100vh;
}
body.sidebar-app .sidebar-nav{
  position:sticky;
  top:0;
  align-self:start;
  height:100vh;
  padding:20px 16px 24px;
  background:#3f5c48;
  color:#f4f7f3;
  box-shadow:inset -1px 0 0 rgba(255,255,255,.08);
  overflow-y:auto;
  overscroll-behavior:contain;
}
body.sidebar-app .sidebar-brand{
  padding:4px 0 18px;
  border-bottom:1px solid rgba(255,255,255,.14);
  margin-bottom:14px;
}
body.sidebar-app .sidebar-brand-link{
  display:flex;
  flex-direction:column;
  gap:4px;
  color:inherit;
  text-decoration:none;
}
body.sidebar-app .sidebar-brand strong{
  font-size:23px;
  font-weight:800;
  letter-spacing:-.03em;
}
body.sidebar-app .sidebar-brand span{
  font-size:13px;
  opacity:.92;
}
body.sidebar-app .sidebar-menu{
  display:flex;
  flex-direction:column;
  gap:16px;
}
body.sidebar-app .sidebar-group{
  display:flex;
  flex-direction:column;
  gap:8px;
}
body.sidebar-app .sidebar-group-label{
  font-size:12px;
  font-weight:700;
  color:rgba(255,255,255,.7);
  padding:0 8px;
}
body.sidebar-app .sidebar-links{
  display:flex;
  flex-direction:column;
  gap:6px;
}
body.sidebar-app .sidebar-link{
  display:block;
  padding:12px 14px;
  border-radius:14px;
  color:#f7faf7;
  text-decoration:none;
  font-size:15px;
  font-weight:700;
  transition:background .16s ease, transform .16s ease, opacity .16s ease;
  opacity:.92;
}
body.sidebar-app .sidebar-link:hover{
  background:rgba(255,255,255,.08);
  opacity:1;
  transform:translateX(2px);
}
body.sidebar-app .sidebar-link.active{
  background:#6f8a76;
  color:#fff;
  opacity:1;
}
body.sidebar-app .sidebar-main{
  min-width:0;
  height:100vh;
  overflow-y:auto;
  overscroll-behavior:contain;
  padding:16px 24px 32px;
}
body.sidebar-app .sidebar-topbar{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-bottom:18px;
}
body.sidebar-app .sidebar-page-meta h1{
  margin:0;
  font-size:24px;
  line-height:1.2;
  color:#20303a;
  letter-spacing:-.03em;
}
body.sidebar-app .sidebar-page-meta p{
  margin:8px 0 0;
  font-size:15px;
  color:#5f6b64;
  font-weight:600;
}
body.sidebar-app .sidebar-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  flex-wrap:wrap;
}
body.sidebar-app .sidebar-version{
  display:inline-flex;
  align-items:center;
  height:40px;
  padding:0 14px;
  border-radius:999px;
  border:1px solid #d6dfd6;
  background:#ffffff;
  font-size:13px;
  font-weight:800;
  color:#4b5b55;
}
body.sidebar-app .sidebar-content-wrap{
  min-width:0;
}
body.sidebar-app .page.page-with-topbar{
  padding:0 !important;
  width:100% !important;
  max-width:none !important;
  margin:0 !important;
}
body.sidebar-app .footer-version{
  position:fixed;
  right:14px;
  bottom:12px;
  z-index:15;
  background:rgba(255,255,255,.92);
  border:1px solid #d7e1d7;
  border-radius:999px;
  padding:6px 10px;
  font-size:12px;
  color:#55645b;
  box-shadow:0 8px 18px rgba(27,39,31,.08);
}
@media (max-width: 1180px){
  body.sidebar-app{
    min-width:0;
  }
  body.sidebar-app .sidebar-shell{
    grid-template-columns:1fr;
  }
  body.sidebar-app .sidebar-nav{
    position:relative;
    height:auto;
  }
}
@media print{
  body.sidebar-app .sidebar-nav,
  body.sidebar-app .sidebar-topbar,
  body.sidebar-app .footer-version{
    display:none !important;
  }
  body.sidebar-app .sidebar-main{
    padding:0 !important;
  }
}


/* ===== v3.2 quick input ===== */
.quick-grid{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:12px}
.quick-grid > .span-2{grid-column:span 2}.quick-grid > .span-3{grid-column:span 3}.quick-grid > .span-4{grid-column:span 4}.quick-grid > .span-5{grid-column:span 5}.quick-grid > .span-6{grid-column:span 6}.quick-grid > .span-8{grid-column:span 8}.quick-grid > .span-12{grid-column:span 12}
.quick-section{border:1px solid #dbe4d6;border-radius:18px;background:#fbfcfb;padding:16px}
.quick-section h3{margin:0 0 6px;font-size:18px;color:#223029}
.quick-section p{margin:0 0 12px;color:#6a756d;font-size:13px;font-weight:600}
.quick-switch{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}
.quick-switch label{font-weight:800;color:#20303a}
.quick-switch input{width:18px;height:18px}
.quick-muted{font-size:12px;color:#77827b;font-weight:600}
.quick-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-top:14px}
.quick-kpi{border:1px solid #dbe4d6;background:#fff;border-radius:16px;padding:14px 16px}
.quick-kpi .label{font-size:13px;color:#708078;font-weight:700;margin-bottom:8px}
.quick-kpi .value{font-size:20px;color:#20303a;font-weight:800}
.quick-recent-list{display:flex;flex-direction:column;gap:10px;margin-top:12px}
.quick-recent-item{display:flex;justify-content:space-between;gap:16px;padding:12px 14px;border-radius:14px;background:#f6f8f6;border:1px solid #e3ebe3}
.quick-recent-main{min-width:0}.quick-recent-main b{display:block;color:#20303a;margin-bottom:4px}.quick-recent-main span{display:block;color:#66756d;font-size:13px}
.quick-recent-side{white-space:nowrap;font-size:13px;font-weight:700;color:#4f6057}
@media (max-width: 1180px){body.sidebar-app{height:auto;overflow:auto}body.sidebar-app .sidebar-shell{height:auto}body.sidebar-app .sidebar-main{height:auto;overflow:visible}.quick-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.quick-grid{grid-template-columns:repeat(6,minmax(0,1fr))}.quick-grid > .span-8,.quick-grid > .span-6,.quick-grid > .span-5,.quick-grid > .span-4,.quick-grid > .span-3,.quick-grid > .span-2{grid-column:span 6}}


/* ===== v3.3 quick input purchase scope + dashboard connect ===== */
.quick-scope-row{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:8px}
.quick-scope-pill{display:inline-flex;align-items:center;gap:7px;padding:8px 12px;border:1px solid #d8e4d8;border-radius:999px;background:#fff;color:#274134;font-size:13px;font-weight:700}
.quick-scope-pill input{margin:0}
.field-emphasis{outline:2px solid rgba(70,124,83,.18)}
.dashboard-quick-connect-grid{display:grid;grid-template-columns:1.15fr .85fr;gap:18px}
.dashboard-entry-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:12px}
.dashboard-entry-card{display:flex;flex-direction:column;gap:6px;padding:16px;border-radius:16px;border:1px solid #dfe8de;background:#f8fbf8;text-decoration:none;transition:transform .15s ease, box-shadow .15s ease, border-color .15s ease}
.dashboard-entry-card strong{color:#20303a;font-size:15px}
.dashboard-entry-card span{color:#66756d;font-size:13px;font-weight:600}
.dashboard-entry-card:hover{transform:translateY(-1px);box-shadow:0 10px 24px rgba(35,55,42,.08);border-color:#cbdacb}
.dashboard-entry-card-soft{background:#fcfcfa}
.dashboard-quick-kpis{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:12px}
.dashboard-quick-kpi{border:1px solid #dbe4d6;background:#fff;border-radius:16px;padding:14px 16px}
.dashboard-quick-kpi .label{font-size:13px;color:#708078;font-weight:700;margin-bottom:8px}
.dashboard-quick-kpi .value{font-size:22px;color:#20303a;font-weight:800}
.dashboard-quick-note{margin-top:14px;padding:12px 14px;border-radius:14px;background:#f7faf7;border:1px solid #e1e9e1;color:#53645b;font-size:13px;font-weight:700;line-height:1.55}
@media (max-width: 1180px){
  .dashboard-quick-connect-grid{grid-template-columns:1fr}
}
@media (max-width: 760px){
  .dashboard-entry-grid,.dashboard-quick-kpis{grid-template-columns:1fr}
}


/* v3.5 UX step2 */
.compact-section-card{padding:18px 20px;}
.compact-section-card .section-title{margin-bottom:10px;}
.compact-subtitle{font-size:13px;color:#6f7f6e;line-height:1.45;margin-top:4px;}
.compact-inline-form{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:10px;align-items:start;margin-top:12px;}
.compact-inline-form .field-span-1{grid-column:span 1;}
.compact-inline-form .field-span-2{grid-column:span 2;}
.compact-inline-form .field-span-3{grid-column:span 3;}
.compact-inline-form .field-span-4{grid-column:span 4;}
.compact-inline-form .field-span-5{grid-column:span 5;}
.compact-inline-form .field-span-6{grid-column:span 6;}
.compact-inline-form .field-actions{grid-column:span 2;display:flex;gap:8px;flex-wrap:wrap;align-items:center;justify-content:flex-end;}
.compact-inline-form .field-help{margin-top:6px;font-size:12px;color:#75846f;line-height:1.4;}
.compact-inline-form input,
.compact-inline-form select{padding:12px 14px;}
.compact-table-note{font-size:13px;color:#71826d;margin:0 0 10px;}
.inline-status-bar{display:flex;flex-wrap:wrap;gap:10px;align-items:center;justify-content:space-between;margin:8px 0 12px;}
.inline-status-bar .inline-help{margin:0;}
.simple-list-wrap{margin-top:12px;border:1px solid #dfe7d8;border-radius:16px;background:#fff;overflow:hidden;}
.simple-list-head,.simple-list-row{display:grid;grid-template-columns:1.3fr .95fr .75fr 1.2fr;gap:12px;align-items:center;padding:12px 14px;}
.simple-list-head{background:#edf4e6;font-weight:700;color:#31402f;border-bottom:1px solid #dbe6d2;}
.simple-list-row{border-bottom:1px solid #eef3ea;}
.simple-list-row:last-child{border-bottom:none;}
.simple-list-row.empty{grid-template-columns:1fr;color:#6f7f6e;}
.simple-list-title{font-weight:700;color:#253621;}
.simple-list-meta{font-size:12px;color:#71826d;margin-top:3px;line-height:1.35;}
.simple-list-actions{display:flex;justify-content:flex-end;gap:8px;flex-wrap:wrap;}
.file-input-compact input[type="file"]{padding:10px 12px;}
@media (max-width:1100px){
  .compact-inline-form{grid-template-columns:repeat(6,minmax(0,1fr));}
  .compact-inline-form .field-span-1,
  .compact-inline-form .field-span-2,
  .compact-inline-form .field-span-3,
  .compact-inline-form .field-span-4,
  .compact-inline-form .field-span-5,
  .compact-inline-form .field-span-6,
  .compact-inline-form .field-actions{grid-column:span 3;}
  .simple-list-head,.simple-list-row{grid-template-columns:1fr .9fr .8fr 1fr;}
}
@media (max-width:760px){
  .compact-inline-form{grid-template-columns:1fr;}
  .compact-inline-form .field-span-1,
  .compact-inline-form .field-span-2,
  .compact-inline-form .field-span-3,
  .compact-inline-form .field-span-4,
  .compact-inline-form .field-span-5,
  .compact-inline-form .field-span-6,
  .compact-inline-form .field-actions{grid-column:span 1;}
  .simple-list-head{display:none;}
  .simple-list-row{grid-template-columns:1fr;gap:8px;}
  .simple-list-actions{justify-content:flex-start;}
}


/* ===== v3.6 operation list emphasis ===== */
.operation-list-strong{display:flex;flex-direction:column;gap:10px}
.operation-list-strong .operation-row-strong{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:14px;align-items:center;padding:14px 16px;border:1px solid #d9e1d9;border-radius:16px;background:#fff}


/* ===== v3.6.1 dense real list ===== */
.dense-line-list{display:flex;flex-direction:column;margin-top:8px;border-top:1px solid #e4ebe1}
.dense-line-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:center;padding:8px 4px;border-bottom:1px solid #e8eee5;background:transparent}
.dense-line-row:hover{background:#fafcf8}
.dense-line-main{min-width:0}
.dense-line-top{font-size:12px;color:#6e7c6d;line-height:1.3;margin-bottom:2px}
.dense-line-title{font-size:15px;font-weight:800;color:#20303a;line-height:1.35}
.dense-line-meta{font-size:12px;color:#738170;line-height:1.35;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dense-line-side{font-size:12px;font-weight:800;color:#56655c;white-space:nowrap;text-align:right}
.dense-line-empty{padding:10px 4px;color:#6f7f6e;border-bottom:1px solid #e8eee5}
.recent-flow-list{margin-top:10px}
.main-list-grid .card .dense-line-list{margin-top:10px}
@media (max-width:760px){.dense-line-row{grid-template-columns:1fr;gap:4px}.dense-line-side{text-align:left}}


/* ===== v3.7 sidebar menu refresh ===== */
body.sidebar-app .sidebar-menu{gap:18px}
body.sidebar-app .sidebar-group{
  display:flex;
  flex-direction:column;
  gap:8px;
  padding-top:2px;
}
body.sidebar-app .sidebar-group + .sidebar-group{
  border-top:1px solid rgba(255,255,255,.10);
  padding-top:14px;
}
body.sidebar-app .sidebar-group.is-highlight{
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.10);
  border-radius:16px;
  padding:12px 10px 10px;
}
body.sidebar-app .sidebar-group.is-highlight + .sidebar-group{
  border-top:none;
  padding-top:2px;
}
body.sidebar-app .sidebar-group-label{
  font-size:11px;
  font-weight:800;
  letter-spacing:.02em;
  color:rgba(255,255,255,.72);
  padding:0 8px;
}
body.sidebar-app .sidebar-link{
  display:flex;
  align-items:center;
  min-height:40px;
  padding:9px 12px;
  border-radius:12px;
  color:#f7faf7;
  text-decoration:none;
  font-size:14px;
  font-weight:700;
  transition:background .16s ease, transform .16s ease, opacity .16s ease, box-shadow .16s ease;
  opacity:.94;
}
body.sidebar-app .sidebar-link:hover{
  background:rgba(255,255,255,.09);
  opacity:1;
  transform:translateX(2px);
}
body.sidebar-app .sidebar-link.active{
  background:#eef5ef;
  color:#284233;
  opacity:1;
  box-shadow:inset 3px 0 0 #7bb08b;
}
body.sidebar-app .sidebar-topbar{
  align-items:stretch;
}
body.sidebar-app .sidebar-topbar-tools{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:10px;
  min-width:320px;
}
body.sidebar-app .sidebar-global-search{
  display:flex;
  align-items:center;
  gap:8px;
  width:min(100%, 420px);
}
body.sidebar-app .sidebar-global-search-input{
  flex:1 1 auto;
  height:42px;
  padding:0 14px;
  border-radius:12px;
  border:1px solid #d7e0d8;
  background:#fff;
  color:#21352b;
  font-size:14px;
  font-weight:600;
  outline:none;
}
body.sidebar-app .sidebar-global-search-input::placeholder{color:#7b8780;font-weight:600}
body.sidebar-app .sidebar-global-search-input:focus{
  border-color:#7bb08b;
  box-shadow:0 0 0 4px rgba(123,176,139,.15);
}
body.sidebar-app .topbar-action.action-search{
  height:42px;
  border-radius:12px;
  padding:0 16px;
}
@media (max-width: 1180px){
  body.sidebar-app .sidebar-topbar{flex-direction:column;align-items:stretch}
  body.sidebar-app .sidebar-topbar-tools{align-items:stretch;min-width:0}
  body.sidebar-app .sidebar-global-search{width:100%}
}


body.sidebar-app .sidebar-group.is-active-group{
  background:rgba(255,255,255,.07);
  border-radius:16px;
  padding:10px 8px;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.06);
}
body.sidebar-app .sidebar-group.is-active-group .sidebar-group-label{
  color:rgba(255,255,255,.96);
}
body.sidebar-app .sidebar-group.is-highlight.is-active-group{
  background:rgba(255,255,255,.12);
}
body.sidebar-app .sidebar-link.active{
  position:relative;
  font-weight:800;
}
body.sidebar-app .sidebar-link.active::after{
  content:'';
  position:absolute;
  right:12px;
  top:50%;
  width:8px;
  height:8px;
  border-radius:999px;
  background:currentColor;
  transform:translateY(-50%);
  opacity:.35;
}


/* ===== v3.8 main dashboard quick layout ===== */
.dashboard-quick-connect-grid{
  display:grid;
  grid-template-columns:minmax(0,1.7fr) minmax(300px,.9fr);
  gap:16px;
  align-items:start;
}
.dashboard-entry-grid{
  grid-template-columns:repeat(2,minmax(0,1fr));
}
.dashboard-entry-card{
  min-height:86px;
  padding:14px 15px;
}
.dashboard-shortcuts-card{
  padding:18px 18px 16px;
}
.compact-shortcut-title{
  margin-bottom:10px;
}
.dashboard-shortcut-groups{
  display:flex;
  flex-direction:column;
  gap:12px;
}
.dashboard-shortcut-group{
  padding:12px 12px 10px;
  border:1px solid #dfe8de;
  border-radius:14px;
  background:#fbfcfb;
}
.dashboard-shortcut-group-title{
  font-size:14px;
  font-weight:800;
  color:#2c4a35;
  margin-bottom:8px;
}
.dashboard-shortcut-links{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.dashboard-shortcut-links a{
  display:inline-flex;
  align-items:center;
  padding:6px 10px;
  border-radius:999px;
  background:#eef4ea;
  border:1px solid #dbe6d5;
  color:#294134;
  text-decoration:none;
  font-size:12px;
  font-weight:800;
  line-height:1.2;
}
.dashboard-shortcut-links a:hover{
  background:#e4efe0;
  border-color:#cfdcc9;
}
@media (max-width: 1180px){
  .dashboard-quick-connect-grid{
    grid-template-columns:1fr;
  }
  .dashboard-entry-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}
@media (max-width: 760px){
  .dashboard-entry-grid{
    grid-template-columns:1fr;
  }
}


/* v3.8.2 requested home fixes */
.dashboard-quick-connect-grid{
  grid-template-columns: 1.2fr 0.8fr;
  align-items: start;
}
.dashboard-status-side-card{
  padding: 18px;
}
.dashboard-status-side-card .section-title{
  margin-bottom: 10px;
}
.dashboard-status-side-card .subtitle{
  font-size: 13px;
  line-height: 1.4;
}
.dashboard-status-side-card .dashboard-quick-kpis{
  margin-top: 10px;
}
.dashboard-status-side-card .dashboard-quick-kpi{
  padding: 12px 14px;
}
.dashboard-status-side-card .dashboard-quick-note{
  margin-top: 12px;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.45;
}

body.sidebar-app .sidebar-nav{
  padding: 12px 10px 16px;
}
body.sidebar-app .sidebar-brand{
  padding: 2px 0 12px;
  margin-bottom: 10px;
}
body.sidebar-app .sidebar-brand strong{
  font-size: 18px;
}
body.sidebar-app .sidebar-brand span{
  font-size: 12px;
}
body.sidebar-app .sidebar-menu{
  gap: 10px;
}
body.sidebar-app .sidebar-group{
  gap: 4px;
}
body.sidebar-app .sidebar-group-label{
  font-size: 11px;
  padding: 0 6px;
}
body.sidebar-app .sidebar-links{
  gap: 3px;
}
body.sidebar-app .sidebar-link{
  padding: 8px 10px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.2;
}
@media (max-width: 1180px){
  .dashboard-quick-connect-grid{
    grid-template-columns: 1fr;
  }
}


/* === readability tweak === */
.menu-link,
.menu-item {
  font-size: 18px !important;
  padding: 10px 4px !important;
  line-height: 1.3 !important;
}

.section-title {
  font-size: 20px !important;
  margin-bottom: 10px !important;
}

.menu-item.active {
  font-size: 19px !important;
  font-weight: 700 !important;
}


/* === font size upgrade (match right panel) === */
.menu-link,
.menu-item {
  font-size: 20px !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
}

.section-title {
  font-size: 21px !important;
}

.menu-item.active {
  font-size: 21px !important;
}


/* === FORCE sidebar font fix === */
.sidebar a,
.sidebar .menu-link,
.sidebar .menu-item,
.sidebar div {
  font-size: 20px !important;
  font-weight: 700 !important;
  line-height: 1.4 !important;
}


/* === REAL sidebar font fix ===
   common.js creates the sidebar dynamically with these exact classes.
   The old patch targeted .menu-item / .sidebar, which this sidebar does not use.
*/
body.sidebar-app .sidebar-nav{
  width: 260px !important;
  padding: 20px 18px 24px !important;
}
body.sidebar-app .sidebar-shell{
  grid-template-columns: 260px minmax(0,1fr) !important;
}
body.sidebar-app .sidebar-group-label{
  font-size: 15px !important;
  font-weight: 800 !important;
  color: rgba(255,255,255,.82) !important;
  padding: 0 10px !important;
}
body.sidebar-app .sidebar-links{
  gap: 8px !important;
}
body.sidebar-app .sidebar-link{
  font-size: 20px !important;
  font-weight: 800 !important;
  line-height: 1.3 !important;
  padding: 14px 16px !important;
  letter-spacing: -0.01em !important;
}
body.sidebar-app .sidebar-link.active{
  font-size: 21px !important;
}
body.sidebar-app .sidebar-brand strong{
  font-size: 26px !important;
}
body.sidebar-app .sidebar-brand span{
  font-size: 16px !important;
}


/* === sidebar spacing reduction for one-screen fit === */
body.sidebar-app .sidebar-nav{
  padding: 14px 16px 18px !important;
}
body.sidebar-app .sidebar-shell{
  grid-template-columns: 250px minmax(0,1fr) !important;
}
body.sidebar-app .sidebar-brand{
  gap: 4px !important;
  margin-bottom: 8px !important;
}
body.sidebar-app .sidebar-brand strong{
  font-size: 24px !important;
  line-height: 1.05 !important;
}
body.sidebar-app .sidebar-brand span{
  font-size: 15px !important;
  line-height: 1.15 !important;
}
body.sidebar-app .sidebar-divider{
  margin: 10px 0 12px !important;
}
body.sidebar-app .sidebar-group{
  gap: 8px !important;
}
body.sidebar-app .sidebar-group + .sidebar-group{
  margin-top: 8px !important;
}
body.sidebar-app .sidebar-group-label{
  font-size: 14px !important;
  padding: 0 8px !important;
  margin-bottom: 2px !important;
  line-height: 1.15 !important;
}
body.sidebar-app .sidebar-links{
  gap: 4px !important;
}
body.sidebar-app .sidebar-link{
  font-size: 20px !important;
  font-weight: 800 !important;
  line-height: 1.12 !important;
  padding: 8px 12px !important;
  min-height: auto !important;
}
body.sidebar-app .sidebar-link.active{
  font-size: 20px !important;
  padding: 10px 14px !important;
}
body.sidebar-app .today-card,
body.sidebar-app .sidebar-card,
body.sidebar-app .today-work-card{
  padding: 10px 12px !important;
}


/* === more spacing reduction === */
body.sidebar-app .sidebar-link{
  padding: 6px 10px !important;
  line-height: 1.05 !important;
}
body.sidebar-app .sidebar-group{
  gap: 4px !important;
}
body.sidebar-app .sidebar-group-label{
  margin-bottom: 1px !important;
}

/* === section label blue color === */
body.sidebar-app .sidebar-group-label{
  color: #6FA8FF !important;
}

/* === merge 분석 + 검색 visually === */
/* hide '검색' label */
body.sidebar-app .sidebar-group-label:contains("검색"){
  display:none !important;
}

/* rename '분석' to '분석·검색' via pseudo */
body.sidebar-app .sidebar-group-label:contains("분석"){
  position: relative;
  color: #6FA8FF !important;
}


/* === final fine-tune: slightly smaller menu font === */
body.sidebar-app .sidebar-link{
  font-size: 18px !important;
  line-height: 1.08 !important;
  padding: 6px 10px !important;
}

body.sidebar-app .sidebar-link.active{
  font-size: 19px !important;
}

body.sidebar-app .sidebar-group-label{
  font-size: 14px !important;
}


/* purchase print */
.pv-print-area{display:none}
@media print{
  body.pv-print-mode .topbar,
  body.pv-print-mode .sidebar,
  body.pv-print-mode .pv-header-top,
  body.pv-print-mode .pv-summary-line,
  body.pv-print-mode .pv-input-shell,
  body.pv-print-mode .pv-section-head,
  body.pv-print-mode .pv-analysis-grid,
  body.pv-print-mode .pv-meta-row,
  body.pv-print-mode .pv-table-wrap,
  body.pv-print-mode #mergeLabelScript,
  body.pv-print-mode script{
    display:none !important;
  }
  body.pv-print-mode .page,
  body.pv-print-mode .page-with-topbar,
  body.pv-print-mode .purchase-v27,
  body.pv-print-mode .pv-wrap,
  body.pv-print-mode .pv-panel,
  body.pv-print-mode .content,
  body.pv-print-mode main{
    all: initial;
  }
  body.pv-print-mode{
    background:#fff !important;
  }
  body.pv-print-mode #pv-printArea,
  body.pv-print-mode #pv-printArea *{
    visibility:visible !important;
  }
  body.pv-print-mode #pv-printArea{
    display:block !important;
    position:absolute;
    left:0;
    top:0;
    width:100%;
    background:#fff;
    color:#111;
    padding:0;
    margin:0;
    visibility:visible !important;
    font-family:Arial,"Apple SD Gothic Neo","Malgun Gothic",sans-serif;
  }
  body.pv-print-mode .pv-print-sheet{padding:16px;}
  body.pv-print-mode .pv-print-sheet h1{margin:0 0 10px 0;font-size:22px;font-weight:800;}
  body.pv-print-mode .pv-print-summary{margin:0 0 12px 0;font-size:12px;color:#444;}
  body.pv-print-mode .pv-print-table{width:100%;border-collapse:collapse;table-layout:fixed;}
  body.pv-print-mode .pv-print-table th,
  body.pv-print-mode .pv-print-table td{border:1px solid #999;padding:8px;font-size:12px;vertical-align:top;}
  body.pv-print-mode .pv-print-table th{background:#f3f3f3;}
  body.pv-print-mode .pv-print-table thead{display:table-header-group;}
  body.pv-print-mode .pv-print-table tr,
  body.pv-print-mode .pv-print-table td,
  body.pv-print-mode .pv-print-table th{page-break-inside:avoid;break-inside:avoid;}
  body.pv-print-mode .pv-print-table .memo-col{white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word;}
  @page{size:A4;margin:12mm;}
}


/* === v3.8.3 sidebar/header compaction === */
body.sidebar-app .sidebar-topbar{
  align-items:center;
  gap:12px;
  margin-bottom:12px;
}
body.sidebar-app .sidebar-page-meta{
  min-width:0;
}
body.sidebar-app .sidebar-page-meta.is-inline{
  display:flex;
  align-items:baseline;
  gap:10px;
  flex-wrap:wrap;
}
body.sidebar-app .sidebar-page-meta.is-inline h1,
body.sidebar-app .sidebar-page-meta.is-inline p{
  margin:0;
}
body.sidebar-app .sidebar-page-meta.is-inline p{
  font-size:13px;
  color:#6a756d;
}
body.sidebar-app .sidebar-topbar-tools.compact-actions-only{
  min-width:auto;
}
body.sidebar-app .sidebar-topbar-tools.compact-actions-only .sidebar-actions{
  gap:6px;
}
body.sidebar-app .sidebar-topbar-tools.compact-actions-only .topbar-action{
  min-height:36px;
  padding:0 12px;
  border-radius:10px;
  font-size:13px;
}
body.sidebar-app .sidebar-version{
  display:none !important;
}
@media (max-width:1180px){
  body.sidebar-app .sidebar-page-meta.is-inline{
    display:block;
  }
  body.sidebar-app .sidebar-page-meta.is-inline p{
    margin-top:4px;
  }
}

/* === v3.8.3 dashboard one-screen density === */
body.main-page.sidebar-app .sidebar-main{
  padding:12px 20px 22px;
}
body.main-page.sidebar-app .sidebar-content-wrap .page{
  max-width:none !important;
}
body.main-page.sidebar-app .screen-block{
  min-height:auto !important;
  padding-top:0 !important;
  padding-bottom:2px !important;
}
body.main-page.sidebar-app .card{
  border-radius:16px;
}
body.main-page.sidebar-app .main-summary-panel{
  padding:10px 14px 12px !important;
}
body.main-page.sidebar-app .integrated-main-summary-title{
  margin-bottom:10px !important;
}
body.main-page.sidebar-app .main-summary-panel .section-title h2,
body.main-page.sidebar-app .dashboard-quick-connect-card .section-title h2,
body.main-page.sidebar-app .main-list-grid .section-title h2{
  font-size:17px !important;
}
body.main-page.sidebar-app .main-summary-panel .subtitle,
body.main-page.sidebar-app .dashboard-quick-connect-card .subtitle,
body.main-page.sidebar-app .main-list-grid .subtitle{
  font-size:12px !important;
  line-height:1.35 !important;
  margin-top:2px !important;
}
body.main-page.sidebar-app .main-hero-grid{
  grid-template-columns:repeat(5,minmax(0,1fr)) !important;
  gap:8px !important;
}
body.main-page.sidebar-app .metric{
  padding:8px 10px !important;
  border-radius:14px !important;
}
body.main-page.sidebar-app .metric .label{
  font-size:11px !important;
  margin-bottom:4px !important;
}
body.main-page.sidebar-app .metric .value{
  font-size:15px !important;
  line-height:1.2 !important;
}
body.main-page.sidebar-app .dashboard-quick-shell .main-list-grid{
  gap:10px !important;
}
body.main-page.sidebar-app .dashboard-quick-connect-card,
body.main-page.sidebar-app .main-list-grid .card{
  padding:10px 12px !important;
}
body.main-page.sidebar-app .dashboard-entry-grid{
  gap:8px !important;
  margin-top:8px !important;
}
body.main-page.sidebar-app .dashboard-entry-card{
  padding:11px 12px !important;
  border-radius:14px !important;
  gap:3px !important;
}
body.main-page.sidebar-app .dashboard-entry-card strong{
  font-size:14px !important;
}
body.main-page.sidebar-app .dashboard-entry-card span{
  font-size:12px !important;
  line-height:1.3 !important;
}
body.main-page.sidebar-app .dashboard-quick-kpis{
  gap:8px !important;
  margin-top:8px !important;
}
body.main-page.sidebar-app .dashboard-quick-kpi{
  padding:10px 12px !important;
  border-radius:14px !important;
}
body.main-page.sidebar-app .dashboard-quick-kpi .label{
  font-size:12px !important;
  margin-bottom:4px !important;
}
body.main-page.sidebar-app .dashboard-quick-kpi .value{
  font-size:18px !important;
}
body.main-page.sidebar-app .dashboard-quick-note{
  margin-top:8px !important;
  padding:9px 11px !important;
  font-size:12px !important;
  line-height:1.4 !important;
}
body.main-page.sidebar-app .main-list-grid{
  gap:10px !important;
}
body.main-page.sidebar-app .main-list-grid .section-title{
  margin-bottom:6px !important;
}
body.main-page.sidebar-app .dense-line-list{
  margin-top:6px !important;
}
body.main-page.sidebar-app .dense-line-row{
  padding:7px 2px !important;
  gap:8px !important;
}
body.main-page.sidebar-app .dense-line-top,
body.main-page.sidebar-app .dense-line-meta,
body.main-page.sidebar-app .dense-line-side{
  font-size:11px !important;
}
body.main-page.sidebar-app .dense-line-title{
  font-size:13px !important;
}
@media (max-width:1320px){
  body.main-page.sidebar-app .main-hero-grid{
    grid-template-columns:repeat(4,minmax(0,1fr)) !important;
  }
}
@media (max-width:1180px){
  body.main-page.sidebar-app .main-hero-grid,
  body.main-page.sidebar-app .dashboard-entry-grid,
  body.main-page.sidebar-app .dashboard-quick-kpis{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }
}
@media (max-width:760px){
  body.main-page.sidebar-app .main-hero-grid,
  body.main-page.sidebar-app .dashboard-entry-grid,
  body.main-page.sidebar-app .dashboard-quick-kpis{
    grid-template-columns:1fr !important;
  }
}


/* v3.8.3 dashboard wording + tighter layout */
body.main-page.sidebar-app .main-summary-panel{
  padding:8px 12px 10px !important;
}
body.main-page.sidebar-app .integrated-main-summary-title{
  margin-bottom:8px !important;
}
body.main-page.sidebar-app .main-summary-panel .section-title{
  margin-bottom:4px !important;
}
body.main-page.sidebar-app .main-summary-panel .section-title h2{
  font-size:16px !important;
  line-height:1.15 !important;
}
body.main-page.sidebar-app .main-summary-panel .subtitle{
  margin-top:1px !important;
  line-height:1.25 !important;
}
body.main-page.sidebar-app .main-hero-grid{
  gap:6px !important;
}
body.main-page.sidebar-app .metric{
  padding:7px 9px !important;
}
body.main-page.sidebar-app .metric .label{
  font-size:10.5px !important;
  margin-bottom:2px !important;
}
body.main-page.sidebar-app .metric .value{
  font-size:14px !important;
}
body.main-page.sidebar-app .dashboard-entry-grid{
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  gap:8px !important;
}
body.main-page.sidebar-app .dashboard-entry-card{
  min-height:76px !important;
}


/* v3.8.2 compact integrated dashboard patch */
body.main-page.sidebar-app .sidebar-topbar.is-dashboard{
  margin-bottom:8px !important;
  padding-bottom:6px !important;
}
body.main-page.sidebar-app .sidebar-page-meta.is-inline h1{
  font-size:17px !important;
  line-height:1.1 !important;
}
body.main-page.sidebar-app .sidebar-page-meta.is-inline p{
  font-size:12px !important;
  margin-top:2px !important;
}
body.main-page.sidebar-app .sidebar-topbar-tools.compact-actions-only .sidebar-actions{
  gap:8px !important;
}
body.main-page.sidebar-app .sidebar-topbar-tools.compact-actions-only .topbar-action{
  padding:7px 12px !important;
  border-radius:12px !important;
  font-size:12px !important;
}
body.main-page.sidebar-app .sidebar-content-wrap{
  padding-top:2px !important;
}
body.main-page.sidebar-app .screen-block{
  margin-bottom:8px !important;
}
body.main-page.sidebar-app .main-summary-panel{
  padding:8px 10px 10px !important;
}
body.main-page.sidebar-app .integrated-main-summary-title{
  align-items:center !important;
  gap:10px !important;
  margin-bottom:8px !important;
}
body.main-page.sidebar-app .integrated-main-summary-title .btn{
  padding:7px 12px !important;
  border-radius:12px !important;
  white-space:nowrap !important;
}
body.main-page.sidebar-app .main-summary-panel .section-title h2,
body.main-page.sidebar-app .dashboard-quick-connect-card .section-title h2,
body.main-page.sidebar-app .main-list-grid .section-title h2{
  font-size:16px !important;
}
body.main-page.sidebar-app .main-summary-panel .subtitle,
body.main-page.sidebar-app .dashboard-quick-connect-card .subtitle,
body.main-page.sidebar-app .main-list-grid .subtitle{
  font-size:11.5px !important;
  line-height:1.25 !important;
}
body.main-page.sidebar-app .main-hero-grid{
  grid-template-columns:repeat(5,minmax(0,1fr)) !important;
  gap:6px !important;
}
body.main-page.sidebar-app .metric{
  min-height:72px !important;
  padding:7px 9px !important;
  border-radius:13px !important;
}
body.main-page.sidebar-app .dashboard-quick-connect-card,
body.main-page.sidebar-app .main-list-grid .card{
  padding:9px 11px !important;
}
body.main-page.sidebar-app .dashboard-quick-shell .main-list-grid,
body.main-page.sidebar-app .main-list-grid{
  gap:8px !important;
}
body.main-page.sidebar-app .dashboard-entry-grid{
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  gap:8px !important;
  margin-top:8px !important;
}
body.main-page.sidebar-app .dashboard-entry-card{
  min-height:68px !important;
  padding:10px 12px !important;
  justify-content:center !important;
  box-shadow:none !important;
  background:#f9fbf8 !important;
}
body.main-page.sidebar-app .dashboard-entry-card strong{
  font-size:14px !important;
  line-height:1.15 !important;
}
body.main-page.sidebar-app .dashboard-entry-card span{
  font-size:11.5px !important;
  line-height:1.2 !important;
}
body.main-page.sidebar-app .dashboard-quick-kpis{
  gap:8px !important;
}
body.main-page.sidebar-app .dashboard-quick-kpi{
  padding:10px 12px !important;
  min-height:74px !important;
}
body.main-page.sidebar-app a.dashboard-quick-kpi-link{
  text-decoration:none !important;
  color:inherit !important;
  transition:transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
body.main-page.sidebar-app a.dashboard-quick-kpi-link:hover{
  transform:translateY(-1px);
  box-shadow:0 8px 18px rgba(35,55,42,.08);
  border-color:#c5d6c0 !important;
}
body.main-page.sidebar-app .dashboard-quick-kpi:nth-child(1){background:#fbfdf9 !important;}
body.main-page.sidebar-app .dashboard-quick-kpi:nth-child(2){background:#f8fbff !important;}
body.main-page.sidebar-app .dashboard-quick-kpi:nth-child(3){background:#fffaf3 !important;}
body.main-page.sidebar-app .dashboard-quick-kpi:nth-child(4){background:#fbf8ff !important;}
body.main-page.sidebar-app .dashboard-quick-kpi:nth-child(5),
body.main-page.sidebar-app .dashboard-quick-kpi:nth-child(6){background:#f9fbfa !important;}
body.main-page.sidebar-app .dashboard-quick-note{
  margin-top:8px !important;
  padding:8px 10px !important;
  font-size:11.5px !important;
  border-radius:12px !important;
}
body.main-page.sidebar-app .main-list-grid .section-title{
  margin-bottom:4px !important;
}
body.main-page.sidebar-app .main-list-grid .section-title .btn{
  padding:6px 11px !important;
  border-radius:11px !important;
}
body.main-page.sidebar-app .dense-line-list{
  margin-top:4px !important;
}
body.main-page.sidebar-app .dense-line-row{
  padding:6px 2px !important;
}
body.main-page.sidebar-app .dense-line-top,
body.main-page.sidebar-app .dense-line-meta,
body.main-page.sidebar-app .dense-line-side{
  font-size:10.5px !important;
}
body.main-page.sidebar-app .dense-line-title{
  font-size:12.5px !important;
  line-height:1.25 !important;
}
@media (max-width:1360px){
  body.main-page.sidebar-app .main-hero-grid{grid-template-columns:repeat(4,minmax(0,1fr)) !important;}
}
@media (max-width:1180px){
  body.main-page.sidebar-app .integrated-main-summary-title{align-items:flex-start !important;}
}


/* ===== v3.8 dashboard final polish ===== */
body.sidebar-app .sidebar-main{padding:12px 22px 24px;}
body.sidebar-app .sidebar-topbar{margin-bottom:10px;}
body.sidebar-app .sidebar-page-meta h1{font-size:22px;}
body.sidebar-app .sidebar-page-meta p{margin-top:6px;font-size:14px;}
body.sidebar-app .sidebar-actions{gap:6px;}
body.sidebar-app .sidebar-actions .btn{height:36px;padding:0 14px;border-radius:12px;font-size:13px;}

.screen-block{margin-bottom:12px;}
.main-summary-panel.card{padding:10px 12px 8px !important;}
.integrated-main-summary-title.section-title{margin-bottom:10px;align-items:flex-start;}
.integrated-main-summary-title h2{font-size:18px !important;margin:0 0 2px !important;}
.integrated-main-summary-title .subtitle{font-size:12px;line-height:1.35;margin-top:0;}
.integrated-main-summary-title .btn.blue{height:40px;padding:0 14px;border-radius:12px;font-size:13px;box-shadow:none;}
.main-hero-grid{grid-template-columns:repeat(5,minmax(0,1fr)) !important;gap:8px !important;}
.main-hero-grid .metric{min-height:66px;padding:9px 10px;border-radius:14px;background:#fbfdfb;display:flex;flex-direction:column;justify-content:center;}
.main-hero-grid .metric .label{font-size:12px;margin-bottom:3px;}
.main-hero-grid .metric .value{font-size:15px;line-height:1.2;}
.main-hero-grid .metric-profit .value,.main-hero-grid .metric-alert .value{font-size:16px;}

.dashboard-quick-connect-grid{gap:14px;align-items:stretch;}
.dashboard-quick-connect-card{padding:10px 12px 10px !important;}
.dashboard-quick-connect-card .section-title{margin-bottom:10px;}
.dashboard-quick-connect-card h2{font-size:17px !important;margin:0 0 2px !important;}
.dashboard-quick-connect-card .subtitle{font-size:12px;line-height:1.35;margin-top:0;}
.dashboard-quick-connect-card .btn.primary{height:38px;padding:0 14px;border-radius:12px;font-size:13px;}
.dashboard-entry-grid{gap:8px;margin-top:8px;}
.dashboard-entry-card{padding:12px 14px !important;gap:4px;border-radius:14px;min-height:64px;justify-content:center;}
.dashboard-entry-card strong{font-size:14px;line-height:1.2;}
.dashboard-entry-card span,.dashboard-entry-card .entry-mini{font-size:11px;font-weight:700;color:#7a887f;line-height:1.2;}
.dashboard-entry-card:hover{transform:translateY(-1px);box-shadow:0 6px 14px rgba(35,55,42,.06);}

.dashboard-quick-kpis{gap:8px;margin-top:8px;}
.dashboard-quick-kpi{padding:12px 14px !important;border-radius:14px;min-height:68px;display:flex;flex-direction:column;justify-content:center;transition:background .15s ease,border-color .15s ease,transform .15s ease,box-shadow .15s ease;}
.dashboard-quick-kpi .label{font-size:12px;margin-bottom:5px;}
.dashboard-quick-kpi .value{font-size:18px;line-height:1.2;}
.dashboard-quick-kpi-link{text-decoration:none;color:inherit;}
.dashboard-quick-kpi-link:hover{background:#f8fbf7;border-color:#cfdccc;transform:translateY(-1px);box-shadow:0 6px 14px rgba(35,55,42,.05);}
.dashboard-quick-kpi-link:nth-child(1){background:#fbfdf9;}
.dashboard-quick-kpi-link:nth-child(2){background:#f8fbff;}
.dashboard-quick-kpi-link:nth-child(3){background:#fffaf4;}
.dashboard-quick-kpi-link:nth-child(4){background:#fcf8ff;}
.dashboard-quick-kpi-link:nth-child(5){background:#fbfdf9;}
.dashboard-quick-kpi-link:nth-child(6){background:#fbfbfb;}
.dashboard-quick-note{margin-top:10px;padding:10px 12px;border-radius:12px;font-size:12px;line-height:1.45;}

.main-list-grid{gap:12px;}
.main-list-grid .card{padding:10px 12px 8px !important;}
.main-list-grid .card .section-title{margin-bottom:8px;}
.main-list-grid .card h2{font-size:17px !important;margin:0 0 2px !important;}
.main-list-grid .card .subtitle{font-size:12px;line-height:1.35;margin-top:0;}
.main-list-grid .card .btn.blue{height:36px;padding:0 13px;border-radius:12px;font-size:13px;}
.dense-line-list{margin-top:6px;}
.dense-line-row{padding:7px 2px;gap:10px;}
.dense-line-top{font-size:11px;margin-bottom:1px;}
.dense-line-title{font-size:14px;line-height:1.28;}
.dense-line-meta{font-size:11px;margin-top:1px;}
.dense-line-side{font-size:11px;}
.dense-line-empty{padding:8px 2px;font-size:12px;}

@media (max-width: 1380px){
  .main-hero-grid{grid-template-columns:repeat(3,minmax(0,1fr)) !important;}
}
@media (max-width: 1180px){
  body.sidebar-app .sidebar-main{padding:14px 16px 22px;}
  .main-hero-grid{grid-template-columns:repeat(2,minmax(0,1fr)) !important;}
  .dashboard-quick-connect-grid,.main-list-grid{grid-template-columns:1fr !important;}
}
@media (max-width: 760px){
  .main-hero-grid,.dashboard-entry-grid,.dashboard-quick-kpis{grid-template-columns:1fr !important;}
}


/* ===== v3.8.4 dashboard final density balance ===== */
body.main-page.sidebar-app .dashboard-quick-connect-grid,
body.main-page .dashboard-quick-connect-grid{
  grid-template-columns:minmax(0,1fr) minmax(0,1fr) !important;
  gap:14px !important;
  align-items:stretch !important;
}
body.main-page.sidebar-app .main-summary-panel.card,
body.main-page .main-summary-panel.card{
  padding:8px 10px 6px !important;
}
body.main-page.sidebar-app .integrated-main-summary-title.section-title,
body.main-page .integrated-main-summary-title.section-title{
  margin-bottom:8px !important;
}
body.main-page.sidebar-app .main-hero-grid,
body.main-page .main-hero-grid{
  gap:7px !important;
}
body.main-page.sidebar-app .main-hero-grid .metric,
body.main-page .main-hero-grid .metric{
  min-height:50px !important;
  padding:7px 9px !important;
  border-radius:13px !important;
}
body.main-page.sidebar-app .main-hero-grid .metric .label,
body.main-page .main-hero-grid .metric .label{
  font-size:11px !important;
  margin-bottom:2px !important;
  line-height:1.15 !important;
}
body.main-page.sidebar-app .main-hero-grid .metric .value,
body.main-page .main-hero-grid .metric .value{
  font-size:14px !important;
  line-height:1.1 !important;
}
body.main-page.sidebar-app .main-hero-grid .metric-profit .value,
body.main-page.sidebar-app .main-hero-grid .metric-alert .value,
body.main-page .main-hero-grid .metric-profit .value,
body.main-page .main-hero-grid .metric-alert .value{
  font-size:15px !important;
}
body.main-page.sidebar-app .dashboard-quick-connect-card,
body.main-page .dashboard-quick-connect-card{
  padding:10px 12px 10px !important;
}
body.main-page.sidebar-app .dashboard-entry-grid,
body.main-page .dashboard-entry-grid,
body.main-page.sidebar-app .dashboard-quick-kpis,
body.main-page .dashboard-quick-kpis{
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
}
@media (max-width: 1180px){
  body.main-page.sidebar-app .dashboard-quick-connect-grid,
  body.main-page .dashboard-quick-connect-grid{
    grid-template-columns:1fr !important;
  }
}

/* ===== v3.8 integrated update: inline header descriptions ===== */
.section-title-inline-desc{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.section-title-inline-desc .title-inline-meta{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}
.section-title-inline-desc .title-inline-meta h2{
  margin:0 !important;
  white-space:nowrap;
}
.section-title-inline-desc .title-inline-meta .subtitle{
  margin:0 !important;
  font-size:12px;
  line-height:1.25;
  color:#6e7d73;
}
.dashboard-status-side-card .section-title-inline-desc{
  justify-content:flex-start;
}
@media (max-width: 980px){
  .section-title-inline-desc,
  .section-title-inline-desc .title-inline-meta{
    align-items:flex-start;
  }
  .section-title-inline-desc .title-inline-meta{
    flex-direction:column;
    gap:4px;
  }
}


/* v3.8.7 schedule header/card compaction */
body.schedule-page.sidebar-app .sidebar-page-meta{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap;}
body.schedule-page.sidebar-app .sidebar-page-meta h1,
body.schedule-page.sidebar-app .sidebar-page-meta p{margin:0 !important;}
body.schedule-page.sidebar-app .sidebar-page-meta p{font-size:13px;color:#6a756d;font-weight:600;}

body.schedule-page .calendar-summary{gap:8px;margin-bottom:8px;}
body.schedule-page .calendar-summary .metric{padding:9px 12px;min-height:0;border-radius:16px;}
body.schedule-page .calendar-summary .metric .label{font-size:11px;margin-bottom:2px;}
body.schedule-page .calendar-summary .metric .value{font-size:16px;line-height:1.1;}

/* v3.8.4 schedule summary compact fix */
body.schedule-page .calendar-summary .metric{padding:7px 10px !important;min-height:62px !important;border-radius:16px;}
body.schedule-page .calendar-summary .metric .label{font-size:11px !important;margin-bottom:1px !important;}
body.schedule-page .calendar-summary .metric .value{font-size:15px !important;line-height:1.05 !important;}


/* === v3.8.5 menu group clarity === */
body.sidebar-app .sidebar-group + .sidebar-group{
  margin-top: 14px !important;
  padding-top: 14px !important;
  border-top: 1px solid rgba(255,255,255,0.20) !important;
}
body.sidebar-app .sidebar-group-label{
  color: #7fb3ff !important;
}


/* ===== v3.8.6 brand display update ===== */
body.sidebar-app .sidebar-brand strong.brand-title{
  font-size:18px !important;
  font-weight:700 !important;
  color:#ffffff !important;
  letter-spacing:-.01em;
}
body.sidebar-app .sidebar-brand .brand-sub{
  font-size:12px !important;
  color:#b8d8c0 !important;
  margin-top:2px;
  opacity:1 !important;
}
body.sidebar-app .sidebar-brand .brand-meta{
  font-size:11px !important;
  color:#9fb3a7 !important;
  margin-top:4px;
  opacity:1 !important;
}


/* ===== v3.8.11 purchase header alignment + stronger list hover ===== */
.purchase-v27 .pv-head-main{display:flex;align-items:center;gap:10px;flex-wrap:wrap;min-width:0}
.purchase-v27 .pv-input-head,.purchase-v27 .pv-section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:nowrap;margin-bottom:8px}
.purchase-v27 .pv-input-head .pv-section-title,.purchase-v27 .pv-section-head .pv-section-title{flex:0 0 auto}
.purchase-v27 .pv-input-head .pv-section-note,.purchase-v27 .pv-section-head .pv-section-note{white-space:normal;text-align:left;flex:0 1 auto}
.purchase-v27 .pv-input-head .pv-actions{margin-left:auto;flex:0 0 auto}
.purchase-v27 .pv-inline-head{display:none !important}
.purchase-v27 .pv-operation-table tbody tr:hover{background:#eef6ef !important; box-shadow: inset 4px 0 0 #7fb38b;}
.purchase-v27 .pv-operation-table tbody tr:hover td{background:transparent !important;}
.purchase-v27 .pv-operation-table tbody tr.pv-selected:hover{background:#eaf4ff !important; box-shadow: inset 4px 0 0 #2f6df3;}
@media (max-width:980px){
  .purchase-v27 .pv-input-head,.purchase-v27 .pv-section-head{flex-direction:column;align-items:flex-start;flex-wrap:wrap}
  .purchase-v27 .pv-head-main{width:100%}
  .purchase-v27 .pv-input-head .pv-actions{margin-left:0}
}


.list-table tbody tr.saved-row-highlight td,
.schedule-table tbody tr.saved-row-highlight td,
#eventList tr.saved-row-highlight td,
#moreEventsList tr.saved-row-highlight td{
  background:#eef8ef !important;
}
.list-table tbody tr.saved-row-highlight,
.schedule-table tbody tr.saved-row-highlight,
#eventList tr.saved-row-highlight,
#moreEventsList tr.saved-row-highlight{
  box-shadow: inset 5px 0 0 #2f8f3a;
}

/* Dashboard KPI subtitles */
.main-hero-grid .metric-with-sub{justify-content:flex-start;align-items:flex-start;}
.main-hero-grid .metric-with-sub .metric-sub{font-size:11px;line-height:1.25;color:#7a877b;margin-top:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;}
.main-hero-grid .metric-with-sub .value{margin-top:1px;}
@media (max-width: 980px){
  .main-hero-grid .metric-with-sub .metric-sub{white-space:normal;}
}


/* dashboard-only refinement */
.dashboard-top-grid-shell{margin-top:-4px}
.dashboard-top-grid{grid-template-columns:1fr 1fr;gap:16px;align-items:stretch}
.dashboard-top-grid>.card{height:100%}
.dashboard-priority-shell{margin-top:-4px}
.dashboard-priority-card{padding:18px}
.dashboard-priority-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;align-items:start}
.dashboard-priority-label{font-size:13px;font-weight:800;color:#35513f;margin:2px 0 6px}
.dashboard-check-ok .dense-line-top{color:#5b7b60}
.dashboard-check-warn .dense-line-top{color:#b26a2d}
.dashboard-check-warn .dense-line-title{color:#8f3e1d}
@media (max-width:1180px){.dashboard-top-grid{grid-template-columns:1fr}.dashboard-priority-grid{grid-template-columns:1fr}}


/* === sidebar compact real fix === */

body.sidebar-app .sidebar-nav{
  width: 208px !important;
}

body.sidebar-app .sidebar-shell{
  grid-template-columns: 208px minmax(0,1fr) !important;
}

body.sidebar-app .sidebar-link{
  font-size: 17px !important;
  padding: 8px 10px !important;
}

body.sidebar-app .sidebar-group-label{
  font-size: 13px !important;
}



/* === v3.8.16 schedule KPI + weekday refinement === */
body.schedule-page .calendar-summary{
  gap:8px !important;
  margin-bottom:6px !important;
}
body.schedule-page .calendar-summary .metric{
  padding:6px 10px !important;
  min-height:50px !important;
  border-radius:15px !important;
}
body.schedule-page .calendar-summary .metric .label{
  font-size:11px !important;
  margin-bottom:0 !important;
  line-height:1.1 !important;
}
body.schedule-page .calendar-summary .metric .value{
  font-size:14px !important;
  line-height:1.0 !important;
}
body.schedule-page #calendarHead{
  margin:2px 0 6px !important;
  gap:4px !important;
}
body.schedule-page .calendar-head{
  min-height:22px !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  padding:2px 0 !important;
  border-radius:10px !important;
  background:#f3f6f1 !important;
  color:#6c786b !important;
  font-size:12px !important;
  font-weight:800 !important;
  letter-spacing:-0.02em;
}


/* === schedule weekday emphasis === */
.calendar-weekdays div{
  font-weight: 600 !important;
  color: #444 !important;
  font-size: 14px !important;
}

.calendar-weekdays div:nth-child(1){
  color: #e53935 !important;
  font-weight: 700 !important;
}

/* optional subtle Saturday emphasis for balance */
.calendar-weekdays div:nth-child(7){
  color: #4a90e2 !important;
}


/* === schedule weekday emphasis real fix === */
body.schedule-page #calendarHead .calendar-head{
  font-weight: 800 !important;
  font-size: 14px !important;
  color: #4b5549 !important;
  letter-spacing: -0.02em !important;
}

body.schedule-page #calendarHead .calendar-head:nth-child(1){
  color: #d93025 !important;
}

body.schedule-page #calendarHead .calendar-head:nth-child(7){
  color: #4a90e2 !important;
}


/* === schedule visual tune: weekend date colors + KPI hierarchy === */

/* KPI hierarchy */
body.schedule-page .calendar-summary .metric:nth-child(1){
  background:#f8fbf6 !important;
  border-color:#d8e3d4 !important;
}
body.schedule-page .calendar-summary .metric:nth-child(1) .value{
  color:#2f6f38 !important;
}

body.schedule-page .calendar-summary .metric:nth-child(2){
  background:#eef8ea !important;
  border-color:#bcd9b4 !important;
}
body.schedule-page .calendar-summary .metric:nth-child(2) .label{
  color:#4d6b48 !important;
}
body.schedule-page .calendar-summary .metric:nth-child(2) .value{
  color:#1f7a31 !important;
}

body.schedule-page .calendar-summary .metric:nth-child(4){
  background:#f3f8ef !important;
  border-color:#cfe0c9 !important;
}
body.schedule-page .calendar-summary .metric:nth-child(4) .label{
  color:#5a6d56 !important;
}
body.schedule-page .calendar-summary .metric:nth-child(4) .value{
  color:#2f6f38 !important;
}

/* Weekend date numbers */
body.schedule-page #calendarGrid .calendar-cell:nth-child(7n+1) .calendar-day{
  color:#d93025 !important;
}
body.schedule-page #calendarGrid .calendar-cell:nth-child(7n) .calendar-day{
  color:#4a90e2 !important;
}

/* Keep muted cells softer but still weekend-aware */
body.schedule-page #calendarGrid .calendar-cell.muted:nth-child(7n+1) .calendar-day{
  color:rgba(217,48,37,.55) !important;
}
body.schedule-page #calendarGrid .calendar-cell.muted:nth-child(7n) .calendar-day{
  color:rgba(74,144,226,.55) !important;
}


/* === more-events popup widen + inline subtitle === */
.more-events-card{
  width:min(1127px, 96vw) !important; /* ~15% wider than 980px */
}

.more-events-header{
  margin-bottom: 14px !important;
}

.more-events-header .inline-title-wrap{
  flex: 1 1 auto !important;
  min-width: 0 !important;
}

.more-events-header .inline-subtitle{
  color: var(--muted) !important;
  font-size: 13px !important;
  line-height: 1.35 !important;
  white-space: nowrap !important;
}

@media (max-width: 1100px){
  .more-events-header .inline-subtitle{
    white-space: normal !important;
  }
}
