


:root {
  --font-main: 'Noto Sans JP', sans-serif;
  --fs-lg: clamp(20px, 2vw, 24px);
  --fs-md: 16px;
  --fs-sm: 14px;
  --c-primary: #2d89ef;
  --c-bg: #f7f7f7;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
  height: 100%;
  font-family: var(--font-main);
  background: var(--c-bg);
}
a {color: #000;text-decoration: none;}
li {list-style: none;}

.container { padding: 80px 20px; max-width: 1200px; margin: 0 auto; }
.text-right  { text-align: right; }
h1.page-title { margin:1rem 0; }

.fixed-header {
  position: fixed; top: 0; left: 0; right: 0; height: 64px;
  justify-content: space-between;
  background: #1a1a1a;               
  color: #fff; z-index: 1000;
  display: flex; align-items: center; gap: 1.5rem;
  padding: 0 1.2rem;
}
.site-title {
  font-size: var(--fs-md); font-weight: 600;
  display: flex; align-items: center; gap: .5rem;
  color: #fff;
  text-decoration: none;
}
.site-title i { font-size: 1.4rem; color: var(--c-primary); }
.nav {
  margin-left: auto;                 
  display: flex; gap: 1.2rem; list-style: none;
}
.nav a {
  color: #fff; text-decoration: none; font-size: var(--fs-sm);
  display: flex; align-items: center; gap: .3rem;
}
.nav a:hover { color: #c8d8ff; }

.hamburger{
  display:none;                     
  flex-direction:column;
  gap:4px; width:28px; height:24px;
  background:transparent; border:none; cursor:pointer;
}
.hamburger span{
  display:block; height:3px; width:100%;
  background:#fff; border-radius:2px;
}



.hamburger.open span:nth-child(1){
  transform: translateY(7px) rotate(45deg);
}
.hamburger.open span:nth-child(2){
  opacity:0;
}
.hamburger.open span:nth-child(3){
  transform: translateY(-7px) rotate(-45deg);
}
.hamburger span{
  transition:transform .25s ease, opacity .2s ease;
}


@media(max-width:780px){
  .hamburger{
    display: flex;
    align-items: center;
    justify-content: center;
  }          
  .nav-wrapper{
    position:fixed; top:64px; right:0;   
    width:220px; height:calc(100% - 64px);
    background:#1a1a1a; transform:translateX(100%);
    transition:.24s ease; overflow-y:auto;
  }
  .nav-wrapper.open{ transform:translateX(0); }
  .nav{ flex-direction:column; padding:1rem .8rem; }
  .nav li{ margin-bottom:.6rem; }
  .nav .spacer{ display:none; }
}


.dropdown { position: relative; }
.dropdown ul {
  position: absolute; top: 100%; right: 0;
  background: #2c2c2c; border-radius: 4px;
  padding: .4rem 0; display: none; flex-direction: column;
  min-width: 180px;
}
.dropdown.open ul { display: flex; }
.dropdown ul li a {
  padding: .5rem 1rem; white-space: nowrap; color: #fff;
}
.dropdown ul li a:hover { background: #3c3c3c; }
.nav-divider { border-top: 1px solid #444; margin: .3rem 0; }

input[type="text"],
input[type="number"],
input[type="date"],
input[type="month"],
input[type="email"],
input[type="password"],
select {
  height: 38px; min-width: 130px;
  padding: 0 .8rem;
  border: 1px solid #ccc; border-radius: 4px;
  font-size: var(--fs-sm);
}
input[type="text"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="month"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
select:focus {
  outline: none;
  border-color: var(--c-primary);
  box-shadow: 0 0 0 2px rgba(45,137,239,.2);
}


.btn {
  display: inline-block;
  height: 38px; line-height: 38px;          
  padding: 0 1.2rem;
  background: var(--c-primary); color: #fff;
  border: none; border-radius: 4px;
  font-size: var(--fs-sm); font-weight: 600;
  cursor: pointer; transition: background .15s ease;
}
.btn:hover      { background: #1d6fd0; }
.btn:disabled   { background: #bbb; cursor: not-allowed; }


.filter-form {
  display: flex; flex-wrap: wrap; gap: .6rem;
  align-items: center; margin-bottom: 1rem;
}
.filter-form label,
.pl-toolbar .filters label{
  flex-direction:row; align-items:center; gap:.4rem; margin:0;
}
.filter-form label > input,
.filter-form label > select,
.pl-toolbar .filters label > input,
.pl-toolbar .filters label > select{
  width:auto;
}
.filter-form > input,
.filter-form > select,
.card .filter-form input[type="text"],
.card .filter-form input[type="number"],
.card .filter-form input[type="date"],
.card .filter-form input[type="month"],
.card .filter-form input[type="email"],
.card .filter-form select{
  width:auto;
}


.table{
  width:100%;
  border-collapse:collapse;
  margin-top:.5rem;
  font-size:var(--fs-sm);
}
.table thead th{
  background:#eef0f4;
  color:#333;
  font-weight:600;
  padding:.5rem .4rem;
  border:1px solid #d9dfe5;
  text-align:center;
}
.table tbody th{
  background:#eef0f4;
  color:#333;
  font-weight:600;
  padding:.5rem .4rem;
  border:1px solid #d9dfe5;
  text-align:center;
}
.table tbody td{
  padding:.4rem .3rem;
  border:1px solid #e5e9ef;
  vertical-align:middle;
}
.table tbody tr:nth-child(even){ background:#fafafa; }
.table tbody tr:hover      { background:#f0f7ff; }


.table tbody td.action{
  display:flex;
  justify-content:center;
  gap:.4rem;
}
.table tfoot th{
  background:#eef0f4;
  color:#333;
  font-weight:600;
  padding:.5rem .4rem;
  border:1px solid #d9dfe5;
  text-align:center;
}
.table tfoot td{
  background:#eef0f4;
  color:#333;
  font-weight:600;
  padding:.5rem .4rem;
  border:1px solid #d9dfe5;
}
.table tfoot tr:nth-child(even){ background:#fafafa; }
.table tfoot tr:hover      { background:#f0f7ff; }


.table tfoot td.action{
  display:flex;
  justify-content:center;
  gap:.4rem;
}

.table input[type="number"],
.table select{
  height:28px;
  min-width:60px;
  padding:0 .4rem;
  font-size:12px;
}
#detailTable input[type="number"]{
  width:72px;
  min-width:52px;
  max-width:80px;
  text-align:right;
}
#detailTable .pct-input{
  width:56px;
  min-width:48px;
  max-width:64px;
}
#detailTable td:nth-child(1),
#detailTable th:nth-child(1){ width:32px; text-align:center; padding:4px 2px; }
#detailTable td:nth-child(2),
#detailTable th:nth-child(2){ width:50px; padding:4px; text-align:center; }

.totalest th {
  width: 80%;
  text-align: right;
  padding: 0 10px 0 0;
  box-sizing: border-box;
}

.pager    { margin: 1.2rem 0; }
.pager ul { list-style: none; display: flex; gap: .4rem; }
.pager a  {
  display: inline-block;
  height: 34px; min-width: 34px; line-height: 34px;
  text-align: center;
  border: 1px solid #ccc; border-radius: 4px;
  font-size: var(--fs-sm);
  text-decoration: none; color: #333;
}
.pager a.current,
.pager a:hover {
  background: var(--c-primary); color: #fff; border-color: var(--c-primary);
}


a.detail {
  color: #7745d6; text-decoration: none;
}
a.detail:hover { text-decoration: underline; }


h2 {
  margin: 24px 0;
  font-size: 1rem;
  width: 100%;
  padding: 5px;
  box-sizing: border-box;
  background-color: #e2eefc;
  border-radius: 5px;
}
.flex-end {margin: 10px 0;display: flex;justify-content: flex-end;gap: 0 10px;}
textarea.othertext {width: 48%; min-height: 80px; padding: 5px; box-sizing: border-box; border: 1px solid #ccc; border-radius: 5px;}
.gap-original {
  width: 100%;
  gap: 10px;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-around;
}
.gap-original label {
  background-color: #e2e2e2;
  padding: 10px 10px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px solid #ccc;
  position: relative;
}
.gap-original a {
  font-size: 0.8rem;
  color: #b50000;
  font-weight: 500;
  background-color: #fff;
  padding: 2px 10px;
  box-sizing: border-box;
  border-radius: 10px;
  position: absolute;
  right: 2%;
  display: inline;
}
.labelcard {
  background-color: #e2e2e2;
  padding: 10px 10px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px solid #ccc;
  position: relative;
  flex-direction: column;
  font-size: var(--fs-sm);
}
.labelcard p {
  height: 38px;
  width: 100%;
  min-width: 130px;
  padding: 0 .8rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  background-color: #fafafa;
  line-height: 38px;
  font-size: 13px;
}

.info-table th{
  width:120px;
  background:#eef0f4;
  text-align:left;
  padding:.4rem .6rem;
  font-weight:600;
}
.info-table td{
  padding:.4rem .6rem;
}

label{
  display:flex;
  flex-direction:column;
  font-size:var(--fs-sm);
  gap:.3rem;
}
label > input,
label > select,
label > textarea{
  width:100%;
  font-size:var(--fs-sm);
}


.grid-2col{
  display:grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap:16px;
}

.grid-col-span-2{
  grid-column:1 / span 2;
}


.grid-2col input[type="text"],
.grid-2col input[type="number"],
.grid-2col input[type="date"],
.grid-2col input[type="month"],
.grid-2col input[type="email"],
.grid-2col select{
  height:34px;
  padding:0 .6rem;
}


.info-table{
  width:100%;
  border-collapse:collapse;
  font-size:var(--fs-sm);
}
.info-table th{
  width:140px;
  background:#eef0f4;
  padding:.5rem .6rem;
  text-align:left;
  font-weight:600;
}
.info-table td{
  padding:.5rem .6rem;
  border-bottom:1px solid #e5e9ef;
}
.delbtn {
  display: flex;
  justify-content: flex-end;
}


.modal{
  position:fixed; inset:0;
  background:rgba(0,0,0,.45);           
  display:flex; align-items:center; justify-content:center;
  z-index:2000;
  opacity:0; visibility:hidden;         
  transition:opacity .18s ease;
}
.modal[hidden]{
  display:flex;                         
}
.modal:not([hidden]){
  opacity:1; visibility:visible;
}


.modal::before{
  content:"";
  position:absolute; inset:0;
}


.modal-content{
  position:relative;
  background:#fff;
  width:min(94%,640px);
  max-height:84vh;
  border-radius:8px;
  box-shadow:0 6px 24px rgba(0,0,0,.25);
  display:flex; flex-direction:column;
  padding:1.4rem 1.6rem;
  animation:modalIn .2s ease;
}
@keyframes modalIn{
  from{ transform:translateY(-20px); opacity:0; }
  to  { transform:translateY(0);      opacity:1; }
}
.modal-content h3{
  font-size:var(--fs-md);
  margin:0 0 1rem;
}
h3.titleh3 {
  margin: 24px 0;
  font-size: 1rem;
  width: 100%;
  padding: 5px;
  box-sizing: border-box;
  background-color: #e2eefc;
  border-radius: 5px;
}

.modal-body-scroll{
  flex:1 1 auto;
  overflow-y:auto;
  border:1px solid #e0e4e9;
  border-radius:4px;
  padding:.4rem;
  margin-bottom:1rem;
}


.item-list{
  list-style:none;
  margin:0; padding:0;
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(200px,1fr));
  gap:.5rem;
}
.item-list li{
  padding:.35rem .45rem;
  border-radius:4px;
  transition:background .12s ease;
}
.item-list li:hover{
  background:#eef4ff;
}
.item-list input[type="checkbox"]{
  margin-right:.45rem;
  transform:scale(.95);
}


.modal-footer{
  display:flex;
  justify-content:flex-end;
  gap:.8rem;
}


#itemSearch{
  width:100%;
  padding:.55rem .8rem;
  border:1px solid #ccc;
  border-radius:4px;
  font-size:var(--fs-sm);
  margin-bottom:.7rem;
}


.modal-content{
  width:min(98%,1100px);
  max-height:90vh;
  padding:1rem 1.2rem;
  font-size:var(--fs-sm);
}


.modal-body-scroll{ padding:.3rem; }


.item-list{
  
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(150px,1fr));
  gap:.25rem;
}


.item-list input[type="checkbox"]{
  display:none;               
}
.item-list li{
  padding:.45rem .6rem;
  border:1px solid #d3d7e2;
  border-radius:6px;
  background:#f6f8fb;
  cursor:pointer;
  user-select:none;
  font-size:calc(var(--fs-sm) - 1px);
  transition:background .12s ease, border .12s ease;
}
.item-list li:hover{
  background:#e7eefc;
  border-color:#2d89ef;
}


   .item-list li:has(input:checked){
    background:#2d89ef !important;
    border-color:#2d89ef;
    color:#fff;
  }


#itemSearch{
  padding:.45rem .6rem;
  font-size:calc(var(--fs-sm) - 1px);
  margin-bottom:.5rem;
}
.modal-footer{ gap:.6rem; }


body.login-bg {
  
  background: linear-gradient(135deg, #4f79ff 0%, #4fa4ff 40%, #8fd3ff 100%);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}
body.login-bg::before {

  content: "";
  position: absolute;
  width: 600px; height: 600px;
  background: radial-gradient(circle at 30% 30%, #ffffff55 0%, #ffffff00 70%);
  filter: blur(120px);
  top: -10%; left: -10%;
  pointer-events: none;
}
body.login-bg::after {
  content: "";
  position: absolute;
  width: 500px; height: 500px;
  background: radial-gradient(circle at 70% 70%, #ffffff44 0%, #ffffff00 70%);
  filter: blur(100px);
  bottom: -10%; right: -8%;
  pointer-events: none;
}


.login-card {
  position: relative;
  z-index: 1;
  width: min(94%, 420px);
  padding: 48px 42px 54px;
  border-radius: 16px;
  background: rgba(255,255,255,0.24);
  backdrop-filter: blur(24px) saturate(160%);
  box-shadow: 0 8px 28px rgba(0,0,0,0.25);
  color: #fff;
  text-align: center;
}
.login-card h1 {
  font-size: var(--fs-lg);
  font-weight: 700;
  margin-bottom: 26px;
  letter-spacing: .04em;
}


.login-card input[type="text"],
.login-card input[type="password"]{
  width: 100%;
  height: 46px;
  border: transparent;
  border-radius: 12px;
  padding: 0 16px;
  margin-bottom: 18px;
  font-size: var(--fs-md);
  background: rgba(255,255,255,.85);
  color: #333;
}
.login-card input:focus{
  outline: none;
  box-shadow: 0 0 0 3px rgba(45,137,239,.35);
}
.login-card .btn-login{
  width: 100%;
  height: 46px;
  line-height: 46px;
  border-radius: 12px;
  font-size: var(--fs-md);
}


.login-card .error{
  background: #ff4e5a;
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 14px;
  font-size: var(--fs-sm);
}


.login-card .small-link{
  display: inline-block;
  margin-top: 14px;
  font-size: 13px;
  color: #e8f0ff;
}
.login-card .small-link:hover{ text-decoration: underline; }


.form-actions{
  display:flex;
  justify-content:flex-end;
  gap:.6rem;
  margin-top:20px;
  padding-top:12px;
  border-top:1px solid #ddd;
}
.btn--primary{
  background:var(--c-primary); color:#fff;
}
.btn--primary:hover{ background:#1d6fd0; }
.btn--secondary{
  background:#fff; color:var(--c-primary);
  border:1px solid var(--c-primary);
}
.btn--secondary:hover{ background:#eaf2ff; }

.action-bar{
  display:flex; flex-wrap:wrap;
  justify-content:flex-end;
  gap:.6rem;
  margin: 24px 0;
}

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

   .grid-3col > label{
    
    background:#f7f8fa;
    border:1px solid #e0e4eb;
    border-radius:8px;
    box-shadow:0 2px 4px rgba(0,0,0,.05);

    
    padding:1rem 1.2rem;
    display:flex;
    flex-direction:column;
    gap:.4rem;

    
    font-weight:600;
  }


.grid-3col > label input,
.grid-3col > label select{
  background:#fff;
  border:1px solid #cdd4e0;
  border-radius:4px;
  height:38px;
  padding:0 .8rem;
  font-size:var(--fs-sm);
}


.grid-3col > label input[type="date"]{
  padding:0 .6rem;
}


@media(max-width:720px){
  .grid-3col{
    gap:12px;
  }
}
.flex-between{display:flex;justify-content:space-between;align-items:center}
.badge        { padding:2px 6px; border-radius:4px; font-size:12px; }
.badge.draft      { background:#f6c343; color:#000; }
.badge.confirmed  { background:#5cb85c; color:#fff; }
.badge.open       { background:#0275d8; color:#fff; }
.badge.closed     { background:#6c757d; color:#fff; }
.badge.none       { background:#999;    color:#fff; }
.badge.added { background:#198754; color:#fff; } 



.input-month{
  appearance:none;          
  -webkit-appearance:none;
  padding:4px 8px;
  font-size:.95rem;
  line-height:1.4;
  border:1px solid #ccc;
  border-radius:4px;
  background:#fff
  url("data:image/svg+xml;utf8,\
    <svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23666'><path d='M4 6l4 4 4-4z'/></svg>")
  right 8px center / 12px no-repeat;
  width:9.5rem;             
  cursor:pointer;
}
.input-month:focus{
  border-color:#007bff;
  outline:none;
  box-shadow:0 0 0 2px rgba(0,123,255,.25);
}


#dash-mock { --dm-bg:#0f172a0a; --dm-card:#fff; --dm-ink:#0f172a; --dm-muted:#6b7280;
  --dm-primary:#2563eb; --dm-success:#16a34a; --dm-warn:#f59e0b; --dm-danger:#ef4444; --dm-border:#e5e7eb; }
  #dash-mock *{ box-sizing:border-box; }
  #dash-mock .dm-container{ max-width:1200px; margin:0 auto; padding:16px; color:var(--dm-ink); }
  #dash-mock h1,#dash-mock h2,#dash-mock h3{ margin:.25rem 0 .5rem; }
  #dash-mock a{ color:var(--dm-primary); text-decoration:none; }


#dash-mock .dm-toolbar{ margin:8px 0 16px; }
#dash-mock .dm-filters{ display:flex; gap:.5rem; flex-wrap:wrap; align-items:center; justify-content:space-between; }
#dash-mock .dm-filters select{ padding:.45rem .6rem; border:1px solid var(--dm-border); border-radius:8px; background:#fff; }
#dash-mock .dm-actions{ margin-left:auto; display:flex; gap:.5rem; }
#dash-mock .dm-btn{ display:inline-flex; align-items:center; justify-content:center; gap:.25rem; padding:.5rem .8rem;
  border:1px solid var(--dm-border); border-radius:10px; background:#fff; cursor:pointer; color:inherit; }
  #dash-mock .dm-btn--primary{ background:var(--dm-primary); color:#fff; border-color:transparent; }
  #dash-mock .dm-btn--ghost{ background:transparent; }


#dash-mock .dm-card{ background:var(--dm-card); border:1px solid var(--dm-border); border-radius:14px; padding:14px; }
#dash-mock .dm-kpi-grid{ display:grid; grid-template-columns:repeat(6,1fr); gap:12px; }
#dash-mock .dm-kpi .dm-label{ color:var(--dm-muted); font-size:.85rem; }
#dash-mock .dm-kpi .dm-value{ font-size:1.4rem; font-weight:800; letter-spacing:.5px; }
#dash-mock .dm-subtle{ color:var(--dm-muted);font-size: .85rem; }
#dash-mock .dm-badge{ display:inline-block; padding:.18rem .55rem; border-radius:999px; font-size:.75rem; font-weight:700; }
#dash-mock .dm-badge--ok{ background:#dcfce7; color:#166534; }
#dash-mock .dm-badge--warn{ background:#fef3c7; color:#92400e; }
#dash-mock .dm-badge--info{ background:#dbeafe; color:#1e3a8a; }


#dash-mock .dm-chart-grid{ display:grid; grid-template-columns:2fr 1.2fr; gap:12px; margin-top:12px; }
#dash-mock .dm-chart .dm-chart-title{ display:flex; align-items:center; justify-content:space-between; }
#dash-mock .dm-plot{ height:220px; margin-top:8px; background:var(--dm-bg); border:1px dashed var(--dm-border);
  border-radius:10px; display:flex; align-items:flex-end; gap:8px; padding:8px; }
  #dash-mock .dm-bar{ flex:1; min-width:8px; background:linear-gradient(180deg,#60a5fa,#2563eb); border-radius:6px; }
  #dash-mock .dm-thin{ flex:.6; }
  #dash-mock .dm-bar--green{ background:linear-gradient(180deg,#a7f3d0,#10b981); }


#dash-mock .dm-columns{
  
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}
#dash-mock .dm-alert-list{ list-style:none; padding:0; margin:0; }
#dash-mock .dm-alert-list li{ display:flex; align-items:center; justify-content:space-between; gap:10px; padding:8px 0; border-bottom:1px solid var(--dm-border); }
#dash-mock .dm-table{ width:100%; border-collapse:collapse; font-size:.92rem; }
#dash-mock .dm-table th,#dash-mock .dm-table td{ border-bottom:1px solid var(--dm-border); padding:8px 10px; text-align:left; }
#dash-mock .dm-table thead th{ background:#f8fafc; color:#334155; font-weight:700; }
#dash-mock .dm-text-right{ text-align:right; }
#dash-mock .dm-text-center{ text-align:center; }


@media (max-width:1100px){
  #dash-mock .dm-kpi-grid{ grid-template-columns:repeat(3,1fr); }
  #dash-mock .dm-chart-grid{ grid-template-columns:1fr; }
  #dash-mock .dm-columns{ grid-template-columns:1fr; }
}
@media (max-width:560px){
  #dash-mock .dm-kpi-grid{ grid-template-columns:repeat(2,1fr); }
  #dash-mock .dm-filters{ width:100%; }
  #dash-mock .dm-filters > *{ flex:1; }
}


.site-footer{
  border-top:1px solid #e5e9ef;
  background:#f8fafc;
  margin-top:28px;
}
.site-footer .footer-inner{
  max-width:1200px;
  margin:0 auto;
  padding:12px 20px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
  font-size:var(--fs-sm);
  color:#6b7280;
}
.site-footer .footer-left,
.site-footer .footer-right{
  display:flex;
  align-items:center;
  gap:10px;
}
.site-footer .brand{ color:#111; font-weight:600; }
.site-footer .muted{ color:#6b7280; }
.site-footer .dot{ color:#c7cbd4; }
.site-footer .env-badge{
  background:#1f2937; color:#fff;
  padding:2px 8px; border-radius:999px;
  font-size:12px;
}

@media (max-width:640px){
  .site-footer .footer-inner{ padding:12px 14px; }
}


.pl-list .muted, .pl-view .muted{ color:#6b7280; }
.pl-list .num,   .pl-view .num  { font-variant-numeric: tabular-nums; }


.pl-list .pl-toolbar, .pl-view .pl-toolbar{
  display:flex; gap:.6rem; align-items:center; justify-content:space-between; margin:8px 0 14px;
}
.pl-list .pl-toolbar .filters, .pl-view .pl-toolbar .filters{
  display:flex; flex-wrap:wrap; gap:.5rem; align-items:center;
}
.pl-list .pl-toolbar .actions, .pl-view .pl-toolbar .actions{
  display:flex; gap:.5rem;
}
.btn-ghost{
  display:inline-block; height:38px; line-height:38px; padding:0 1rem;
  background:#fff; color:#111; border:1px solid #d9dfe5; border-radius:8px; cursor:pointer;
}
.btn-ghost:hover{ background:#f4f7ff; }


.pl-list .kpi-grid, .pl-view .kpi-grid{
  display:grid; grid-template-columns:repeat(5,1fr); gap:12px; margin-bottom:10px;
}
.pl-list .kpi, .pl-view .kpi{
  background:#fff; border:1px solid #e5e9ef; border-radius:12px; padding:12px 14px;
}
.pl-list .kpi .label, .pl-view .kpi .label{ font-size:.85rem; color:#6b7280; }
.pl-list .kpi .value, .pl-view .kpi .value{ font-size:1.35rem; font-weight:800; letter-spacing:.3px; }
.pl-list .kpi .hint,  .pl-view .kpi .hint { font-size:.82rem; color:#6b7280; margin-top:.2rem; }
.badge--ok{ background:#dcfce7; color:#166534; padding:.18rem .55rem; border-radius:999px; font-weight:700; font-size:.78rem; }


.pl-list .section, .pl-view .section{ background:#fff; border:1px solid #e5e9ef; border-radius:12px; padding:12px 14px; margin:10px 0; }
.pl-list h3, .pl-view h3{ margin:4px 0 10px; font-size:1rem; }


table.pl{ width:100%; border-collapse:collapse; font-size:.94rem; }
table.pl thead th{
  background:#f8fafc; color:#334155; border-bottom:1px solid #e5e9ef; padding:8px 10px; text-align:left; font-weight:700;
}
table.pl tbody td{ border-bottom:1px solid #eef2f7; padding:8px 10px; }
table.pl .num{ text-align:right; }
table.pl .cell-actions{ text-align:center; white-space:nowrap; }
.table--dense tbody td{ padding:6px 8px; }


.statline{
  display:grid;
  grid-template-columns: 110px repeat(8, 1fr);
  gap:8px; align-items:center;
  border-top:1px solid #eef2f7; padding:8px 0;
}
.statline:first-of-type{ border-top:1px solid #e5e9ef; }
.statline .k{ color:#111; font-weight:600; }
.statline .v{ text-align:right; }


.seg-tabs{ display:flex; gap:6px; }
.seg-tabs .tab{
  height:32px; padding:0 12px; border:1px solid #d9dfe5; background:#fff; border-radius:999px; cursor:pointer; font-size:.9rem;
}
.seg-tabs .tab.is-active{ background:#eaf2ff; border-color:#bcd3ff; }


.spark{ display:inline-flex; gap:2px; height:18px; width:120px; align-items:flex-end; }
.spark i{ display:block; width:6px; background:#93c5fd; border-radius:2px; }
.spark i:nth-child(odd){ background:#60a5fa; }


.chip{ display:inline-block; background:#eef2ff; color:#1e3a8a; padding:2px 8px; border-radius:999px; font-size:.8rem; }


.progress{ position:relative; display:inline-block; height:6px; width:140px; background:#eef2f7; border-radius:999px; vertical-align:middle; }
.progress i{ position:absolute; left:0; top:0; height:100%; width:var(--p,0); background:#3b82f6; border-radius:999px; }


@media (max-width:1100px){
  .pl-list .kpi-grid, .pl-view .kpi-grid{ grid-template-columns:repeat(3,1fr); }
}
@media (max-width:640px){
  .pl-list .kpi-grid, .pl-view .kpi-grid{ grid-template-columns:repeat(2,1fr); }
  .statline{ grid-template-columns: 86px repeat(8,1fr); }
}






.grid { display:grid; gap: 12px; }


.card{
  background:#fff;
  border:1px solid #e5e9ef;
  border-radius:12px;
  box-shadow:0 1px 2px rgba(0,0,0,.04);
  overflow:hidden;
}
.card-header, .card-head{
  padding:10px 14px;
  background:#f8fafc;
  border-bottom:1px solid #e5e9ef;
  font-weight:600;
  color:#334155;
  font-size:14px;
}
.card-body{ padding:12px 14px; }


.chip{
  display:inline-flex; align-items:center; gap:6px;
  padding:6px 10px;
  background:#eef2ff;
  color:#1e3a8a;
  border:1px solid #dbeafe;
  border-radius:999px;
  font-size:12.5px;
}


.badge{ display:inline-block; padding:.2rem .6rem; border-radius:999px; font-size:12px; font-weight:700; }
.badge.lend { background:#e0ecff; color:#1d4ed8; }   
.badge.plan { background:#fff3cd; color:#8a5800; }   
.badge.done { background:#e6f7f1; color:#0f5132; }   


.alert{
  margin:8px 0 12px; padding:10px 12px;
  border-radius:10px; border:1px solid #e5e9ef; background:#fff;
}
.alert-success{ border-color:#bbf7d0; background:#f0fdf4; color:#166534; }
.alert-danger { border-color:#fecaca; background:#fef2f2; color:#991b1b; }


.card input[type="number"],
.card input[type="text"],
.card input[type="date"],
.card input[type="month"],
.card input[type="email"],
.card select,
.card textarea{
  width:100%; height:34px; padding:0 .6rem;
  border:1px solid #cdd4e0; border-radius:6px; font-size:var(--fs-sm);
  background:#fff;
}
.card input:focus, .card select:focus, .card textarea:focus{
  outline:none; border-color: var(--c-primary);
  box-shadow:0 0 0 2px rgba(45,137,239,.18);
}


input[type="range"]{
  width:100%; height:4px; border-radius:999px;
  background:#e5e9ef; outline:none;
}
input[type="range"]::-webkit-slider-thumb{
  -webkit-appearance:none; width:16px; height:16px; border-radius:50%;
  background: var(--c-primary);
  box-shadow:0 0 0 3px rgba(45,137,239,.2);
  border:2px solid #fff;
}
input[type="range"]::-moz-range-thumb{
  width:16px; height:16px; border-radius:50%;
  background: var(--c-primary);
  border:2px solid #fff;
}


.btn-xs{ height:26px; line-height:26px; padding:0 .6rem; font-size:12px; border-radius:6px; }


.table .text-right{ text-align:right; }
.table .num { font-variant-numeric: tabular-nums; }


@media (max-width: 980px){
  .grid[style*="grid-template-columns:2fr 1fr"]{ grid-template-columns: 1fr !important; }
}























/* ===== Billing preview (sys/billing/preview) ===== */
.table--compact thead th{ padding:.42rem .36rem; font-size:12px; }
.table--compact tbody td{ padding:.34rem .30rem; font-size:12px; }
.table--compact input[type="number"],
.table--compact input[type="text"],
.table--compact select{ height:26px; font-size:12px; }

/* striped（調整行は別色で上書き） */
.billing-preview-table tbody tr:nth-child(odd):not(.billing-adjust-row) td{ background:#fafafa; }

/* 単価調整行 */
.billing-adjust-row td{
  background:#fff7ed;
  border-top:1px dashed #f59e0b;
  border-bottom:1px dashed #f59e0b;
  color:#92400e;
}
.billing-adjust-name{ white-space:nowrap; }
.billing-adjust-badge{
  display:inline-block;
  padding:.15rem .55rem;
  border-radius:999px;
  background:#ffedd5;
  border:1px solid #fed7aa;
  color:#9a3412;
  font-weight:700;
  font-size:12px;
  margin-right:6px;
}
.billing-adjust-text{ font-weight:700; }
.billing-adjust-unit{ font-variant-numeric: tabular-nums; font-weight:700; }

/* ===== Billing preview tools (2026-02-19) ===== */
.billing-tools{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  margin:8px 0 10px;
}
.billing-tools__left{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  align-items:center;
}
.billing-tools__right{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
  margin-left:auto;
}
.billing-tools__chk{
  font-size:12px;
  color:#374151;
  user-select:none;
}
.billing-tools__search{
  min-width:220px;
  height:28px;
  padding:0 10px;
  border:1px solid #d1d5db;
  border-radius:6px;
  font-size:12px;
}

/* 見失い対策：ヘッダ固定（2段ヘッダ想定） */
.billing-preview-table{ --billing-head1: 28px; }
.billing-preview-table thead tr:nth-child(1) th{
  position: sticky;
  top: 0;
  z-index: 6;
  background: #f3f4f6;
}
.billing-preview-table thead tr:nth-child(2) th{
  position: sticky;
  top: var(--billing-head1);
  z-index: 6;
  background: #f3f4f6;
}
.billing-preview-table thead th{
  box-shadow: 0 1px 0 rgba(0,0,0,.10);
}

/* 数字の視認性 */
.billing-preview-table td,
.billing-preview-table th{
  font-variant-numeric: tabular-nums;
}

/* hover */
.billing-preview-table tbody tr:hover td{
  background:#f5faff;
}
/* ===== Billing preview polish (2026-02-19) ===== */

/* 対象：案件セレクトは不要 */
.billing-project-group{ display:none !important; }

/* 入力（テーブル内） */
.billing-preview-table input.input,
.billing-preview-table input[type="text"],
.billing-preview-table input[type="number"]{
  height:28px;
  padding:0 8px;
  border-radius:6px;
  border:1px solid #cbd5e1;
  background:#fff;
}
.billing-preview-table input.input:focus,
.billing-preview-table input[type="text"]:focus,
.billing-preview-table input[type="number"]:focus{
  outline:none;
  box-shadow:0 0 0 3px rgba(59,130,246,.15);
  border-color:#60a5fa;
}

/* チェックボックス（上部ツール） */
.billing-tools input[type="checkbox"]{
  width:16px;
  height:16px;
  vertical-align:middle;
  accent-color:#2563eb;
}
.billing-tools__chk{
  display:inline-flex;
  gap:6px;
  align-items:center;
}

/* 商品名＋条件バッジ（文字の羅列対策） */
.billing-item-name{
  font-weight:600;
  line-height:1.25;
}
.billing-item-badges{
  margin-top:3px;
  display:flex;
  gap:6px;
  flex-wrap:wrap;
}
.billing-badge{
  display:inline-flex;
  align-items:center;
  height:18px;
  padding:0 8px;
  border-radius:999px;
  font-size:11px;
  border:1px solid #e5e7eb;
  background:#f3f4f6;
  color:#374151;
}
.billing-badge--rent{
  background:#fff7ed;
  border-color:#fed7aa;
  color:#9a3412;
}
.billing-badge--base{
  background:#f0fdf4;
  border-color:#bbf7d0;
  color:#166534;
}

/* 賃料欄／基本料欄の視覚的セパレータ（列位置が固定の場合） */
.billing-preview-table th:nth-child(8),
.billing-preview-table td:nth-child(8){
  border-left:2px solid #e5e7eb;
}
.billing-preview-table th:nth-child(11),
.billing-preview-table td:nth-child(11){
  border-left:2px solid #e5e7eb;
}


/* ===== Billing preview month input (2026-02-20) ===== */
/* month input を他の .input と同等に（デフォルト感の解消） */
form[action="/sys/billing/preview.html"] input[type="month"].input{
  height:32px;
  padding:0 10px;
  border:1px solid #cbd5e1;
  border-radius:6px;
  background:#fff;
  font-size:14px;
  line-height:32px;
  -webkit-appearance: none;
  appearance: none;
}

/* ===== Billing detail split tables (2026-02-20) ===== */
.billing-split-wrap{ margin-top:6px; }
.billing-split-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  margin:6px 0 6px;
}
.billing-split-title{ font-weight:700; }
.billing-split-sum{ font-size:12px; color:#374151; }
.billing-item-name-only{ font-weight:600; white-space:nowrap; }
/* ===== BILLING_PREVIEW_UI_BRUSHUP_MARK:2026-02-23 ===== */

/* fixed header(64px)の下にstickyヘッダが来るように補正 */
.billing-preview-table thead tr:nth-child(1) th{ top:64px; }
.billing-preview-table thead tr:nth-child(2) th{ top: calc(64px + var(--billing-head1)); }

/* 上部の条件フォームを「箱化」して読みやすく */
form[action="/sys/billing/preview.html"][method="get"]{
  background:#f8fafc;
  border:1px solid #e5e7eb;
  border-radius:12px;
  padding:10px 12px;
}
form[action="/sys/billing/preview.html"][method="get"] > div{
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:10px;
  padding:8px 10px;
}
form[action="/sys/billing/preview.html"][method="get"] .muted{
  font-size:11px;
  margin-bottom:4px;
}
form[action="/sys/billing/preview.html"][method="get"] .btn{
  height:32px;
  padding:0 14px;
  border-radius:10px;
}

/* 明細テーブルを少しだけ「板」に寄せる */
.billing-preview-table{
  border:1px solid #e5e7eb;
  border-radius:12px;
  overflow:hidden;
}
.billing-preview-table thead th{
  background:#f3f4f6;
}
.billing-preview-table tbody tr:hover td{
  background:#f8fafc;
}

/* 商品列は折り返し、数値列は桁揃え */
.billing-preview-table td:first-child{
  white-space:normal;
  overflow:visible;
  text-overflow:initial;
}

/* ===== BILLING_PREVIEW_FULL_MARK:2026-02-23 ===== */
/* 画面全体：カード/見出し/巨大テーブル/合計ブロックの“素っぽさ”解消 */

/* ページ枠（この画面だけ） */
.billing-preview{ max-width: 1280px; margin: 0 auto; }

/* 見出し（この画面だけ少し締める） */
.billing-preview h2{
  margin:14px 0 10px;
  padding:8px 10px;
  background:#f8fafc;
  border:1px solid #e5e7eb;
  border-radius:10px;
}

/* カードの強弱 */
.billing-preview .card{ border-radius:12px; }
.billing-preview .card-header{ padding:10px 12px; background:#f8fafc; font-size:13px; }
.billing-preview .card-body{ padding:12px; }

/* 巨大テーブルを“板”にして可読性を上げる */
.billing-preview-table{
  border:1px solid #e5e7eb;
  border-radius:12px;
  overflow:hidden;
}
.billing-preview-table thead th{ background:#f3f4f6; }

/* fixed header(64px)の下にstickyヘッダが来るように補正 */
.billing-preview-table thead tr:nth-child(1) th{ top:64px; }
.billing-preview-table thead tr:nth-child(2) th{ top: calc(64px + var(--billing-head1)); }

/* 商品列は省略せず折り返し（文字の羅列の“圧”を減らす） */
.billing-preview-table td:first-child{
  white-space:normal;
  overflow:visible;
  text-overflow:clip;
  line-height:1.25;
}
.billing-preview-table th:first-child,
.billing-preview-table td:first-child{ min-width:220px; }

/* 数値列は右寄せを明確に */
.billing-preview-table th:not(:first-child),
.billing-preview-table td:not(:first-child){ text-align:right; }

/* 合計（右下）を少し強く */
.billing-summary-kv{
  border:1px solid #e5e7eb;
  border-radius:12px;
  overflow:hidden;
}
.billing-summary-kv th{ background:#f8fafc; }
.billing-summary-kv tr:last-child th,
.billing-summary-kv tr:last-child td{
  font-weight:800;
  font-size:16px;
}

/* ===== BILLING_PREVIEW_ALIGN_MARK:2026-02-23 ===== */
/* 固定ヘッダ下のズレ防止（固定ヘッダ=64px前提を共通化） */
:root{
  --sys-fixed-header-h: 64px;
  --sys-fixed-header-gap: 16px; /* container の余白（現状80px=64+16） */
}
/* 既存 .container の左右paddingは維持しつつ、上だけ共通化 */
.container{ padding-top: calc(var(--sys-fixed-header-h) + var(--sys-fixed-header-gap)); }

/* 請求プレビューの sticky thead を固定ヘッダ直下へ */
.billing-preview-table thead tr:nth-child(1) th{
  top: var(--sys-fixed-header-h);
}
.billing-preview-table thead tr:nth-child(2) th{
  top: calc(var(--sys-fixed-header-h) + var(--billing-head1));
}

/* テーブルタイトル（賃料/基本料）をテーブルと一緒に横スクロールさせる（caption化） */
.billing-split-caption{
  caption-side: top;
  text-align: left;
  padding: 6px 8px;
}
.billing-split-caption .billing-split-head{
  margin: 6px 0 6px; /* 既存の見た目に近い余白 */
}

/* ===== BILLING_STICKY_FIX_MARK:2026-02-23 ===== */
/* --sys-fixed-header-h は維持したまま、請求プレビューの sticky thead 段ズレを解消 */

/* ここが本丸：table-layout:fixed を請求プレビューだけ解除（固定幅でtheadが折れて高さが増えるのを止める） */
.billing-preview .billing-preview-table{
  table-layout: auto;
}

/* thead は折り返し禁止（高さが変動すると sticky 2段目がずれる） */
.billing-preview .billing-preview-table thead th{
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 2段stickyの基準高さを実態に寄せる（28pxは小さすぎるケースがある） */
.billing-preview .billing-preview-table{
  --billing-head1: 36px;
}

/* 明示：固定ヘッダ(64px) + 1段目高さ で 2段目を固定 */
.billing-preview .billing-preview-table thead tr:nth-child(1) th{
  top: var(--sys-fixed-header-h);
}
.billing-preview .billing-preview-table thead tr:nth-child(2) th{
  top: calc(var(--sys-fixed-header-h) + var(--billing-head1));
}



/* 賃料テーブル（min-width:980px）: 9列（合計 980px） */
.billing-preview table.billing-preview-table[style*="min-width:980"] th:nth-child(1),
.billing-preview table.billing-preview-table[style*="min-width:980"] td:nth-child(1){ width:260px !important; }
.billing-preview table.billing-preview-table[style*="min-width:980"] th:nth-child(2),
.billing-preview table.billing-preview-table[style*="min-width:980"] td:nth-child(2){ width:70px !important; }
.billing-preview table.billing-preview-table[style*="min-width:980"] th:nth-child(3),
.billing-preview table.billing-preview-table[style*="min-width:980"] td:nth-child(3){ width:70px !important; }
.billing-preview table.billing-preview-table[style*="min-width:980"] th:nth-child(4),
.billing-preview table.billing-preview-table[style*="min-width:980"] td:nth-child(4){ width:70px !important; }
.billing-preview table.billing-preview-table[style*="min-width:980"] th:nth-child(5),
.billing-preview table.billing-preview-table[style*="min-width:980"] td:nth-child(5){ width:100px !important; }
.billing-preview table.billing-preview-table[style*="min-width:980"] th:nth-child(6),
.billing-preview table.billing-preview-table[style*="min-width:980"] td:nth-child(6){ width:130px !important; }
.billing-preview table.billing-preview-table[style*="min-width:980"] th:nth-child(7),
.billing-preview table.billing-preview-table[style*="min-width:980"] td:nth-child(7){ width:90px !important; }
.billing-preview table.billing-preview-table[style*="min-width:980"] th:nth-child(8),
.billing-preview table.billing-preview-table[style*="min-width:980"] td:nth-child(8){ width:95px !important; }
.billing-preview table.billing-preview-table[style*="min-width:980"] th:nth-child(9),
.billing-preview table.billing-preview-table[style*="min-width:980"] td:nth-child(9){ width:95px !important; }

/* 基本料テーブル（min-width:820px）: 6列（合計 820px） */
.billing-preview table.billing-preview-table[style*="min-width:820"] th:nth-child(1),
.billing-preview table.billing-preview-table[style*="min-width:820"] td:nth-child(1){ width:260px !important; }
.billing-preview table.billing-preview-table[style*="min-width:820"] th:nth-child(2),
.billing-preview table.billing-preview-table[style*="min-width:820"] td:nth-child(2){ width:120px !important; }
.billing-preview table.billing-preview-table[style*="min-width:820"] th:nth-child(3),
.billing-preview table.billing-preview-table[style*="min-width:820"] td:nth-child(3){ width:140px !important; }
.billing-preview table.billing-preview-table[style*="min-width:820"] th:nth-child(4),
.billing-preview table.billing-preview-table[style*="min-width:820"] td:nth-child(4){ width:90px !important; }
.billing-preview table.billing-preview-table[style*="min-width:820"] th:nth-child(5),
.billing-preview table.billing-preview-table[style*="min-width:820"] td:nth-child(5){ width:105px !important; }
.billing-preview table.billing-preview-table[style*="min-width:820"] th:nth-child(6),
.billing-preview table.billing-preview-table[style*="min-width:820"] td:nth-child(6){ width:105px !important; }


/* BILLING_STICKY_RESET_MARK:2026-02-23
   root_esc撤去後：請求プレビューのstickyを“普通”に戻して収束させる
*/
.billing-preview .billing-preview-table{ --billing-head1: 0px; }
.billing-preview .billing-preview-table thead tr:nth-child(1) th{
  position: sticky;
  top: var(--sys-fixed-header-h);
  z-index: 6;
}
.billing-preview .billing-preview-table thead tr:nth-child(2) th{
  position: static !important;
  top: auto !important;
}

/* BILLING_THEAD_VERTICAL_FIX_MARK:2026-02-23
   請求プレビュー：theadの縦ズレ（固定ヘッダとの被り）だけを補正
*/
.billing-preview .billing-preview-table thead th{
  top: calc(var(--sys-fixed-header-h) + 8px) !important;
}

/* BILLING_PREVIEW_NO_STICKY_MARK:2026-02-23
   請求プレビュー：theadは残すがstickyをやめて縦ズレを確実に消す
*/
.billing-preview .billing-preview-table thead th{
  position: static !important;
  top: auto !important;
}

/* ===== BUILD-B: 2-column billing layout ===== */

/* Tabs */
.billing-tabs{
  display:flex; gap:0; margin-top:12px;
  border-bottom:2px solid #e5e9ef;
}
.billing-tab{
  padding:8px 20px; border:none; background:none;
  font-size:14px; font-weight:600; color:#6b7280;
  cursor:pointer; border-bottom:2px solid transparent;
  margin-bottom:-2px; transition:color .15s, border-color .15s;
}
.billing-tab:hover{ color:#2d89ef; }
.billing-tab.is-active{
  color:#2d89ef; border-bottom-color:#2d89ef;
}

/* Tab panes */
.billing-tab-pane{ margin-top:12px; }

/* 2-column layout */
.billing-layout{
  display:grid;
  grid-template-columns:1fr 340px;
  gap:12px;
  align-items:start;
}
@media(max-width:1100px){
  .billing-layout{ grid-template-columns:1fr; }
}

/* Sidebar */
.billing-sidebar{
  position:sticky; top:76px;
}
@media(max-width:1100px){
  .billing-sidebar{ position:static; }
}

/* Sidebar actions */
.billing-sidebar-actions{
  display:flex; flex-direction:column; gap:8px;
  margin-top:12px;
}
.billing-sidebar-actions .btn{
  width:100%; justify-content:center;
  height:36px; line-height:36px;
  font-size:13px; font-weight:600;
  border-radius:8px;
  display:flex; align-items:center; gap:6px;
}
.billing-sidebar-actions .btn--primary{
  box-shadow:0 2px 6px rgba(45,137,239,.25);
}
.billing-sidebar-actions .btn--secondary{
  background:#f8fafc;
}

/* Bulk % bar */
.billing-bulk-pct{
  display:flex; align-items:center; gap:8px;
  padding:6px 12px;
  background:#f0f5ff; border-bottom:1px solid #e5e9ef;
  font-size:13px; font-weight:600; color:#374151;
}
.billing-bulk-pct .btn{ padding:3px 10px; font-size:12px; }

/* Expense rows with ON/OFF toggles */
.billing-expense-rows{
  display:flex; flex-direction:column; gap:0;
}
.billing-expense-row{
  display:flex; align-items:center; justify-content:space-between; gap:8px;
  padding:7px 0;
  border-bottom:1px solid #f0f2f5;
}
.billing-expense-row:last-child{ border-bottom:none; }

/* Toggle switch (iOS style) */
.billing-toggle{
  display:flex; align-items:center; gap:8px; cursor:pointer;
  font-size:13px; user-select:none;
}
.billing-toggle input[type="checkbox"]{
  appearance:none; -webkit-appearance:none;
  width:36px; height:20px;
  background:#ccd0d5; border-radius:10px;
  position:relative; cursor:pointer;
  transition:background .2s ease;
  flex-shrink:0;
}
.billing-toggle input[type="checkbox"]::after{
  content:'';
  position:absolute; top:2px; left:2px;
  width:16px; height:16px;
  background:#fff; border-radius:50%;
  box-shadow:0 1px 3px rgba(0,0,0,.15);
  transition:transform .2s ease;
}
.billing-toggle input[type="checkbox"]:checked{
  background:#2d89ef;
}
.billing-toggle input[type="checkbox"]:checked::after{
  transform:translateX(16px);
}
.billing-toggle-label{
  font-size:13px; font-weight:600; white-space:nowrap;
  color:#374151;
}

/* Sidebar inputs */
.billing-sidebar .input.input--sm,
.billing-sidebar input.input--sm{
  height:32px; padding:0 8px;
  border:1px solid #d1d5db; border-radius:6px;
  font-size:13px; font-variant-numeric:tabular-nums;
  background:#fff; color:#1f2937;
  transition:border-color .15s, box-shadow .15s;
}
.billing-sidebar .input.input--sm:focus,
.billing-sidebar input.input--sm:focus{
  border-color:#2d89ef;
  box-shadow:0 0 0 2px rgba(45,137,239,.15);
  outline:none;
}

/* Sidebar select */
.billing-sidebar select.input,
.billing-sidebar select.input--sm{
  height:32px; padding:0 8px;
  border:1px solid #d1d5db; border-radius:6px;
  font-size:13px; background:#fff; color:#1f2937;
  appearance:auto; cursor:pointer;
}
.billing-sidebar select.input:focus,
.billing-sidebar select.input--sm:focus{
  border-color:#2d89ef;
  box-shadow:0 0 0 2px rgba(45,137,239,.15);
  outline:none;
}

/* Sidebar card styling */
.billing-sidebar .card{
  border:1px solid #e5e9ef; border-radius:10px;
  overflow:hidden;
}
.billing-sidebar .card-header{
  padding:8px 12px; background:#f8fafc;
  font-size:12px; font-weight:700; color:#6b7280;
  text-transform:uppercase; letter-spacing:.03em;
  border-bottom:1px solid #e5e9ef;
}
.billing-sidebar .card-body{
  padding:10px 12px;
}

/* Sidebar input width */
.billing-sidebar-input{
  width:120px; flex-shrink:0;
}

/* Label without checkbox (for 損料 rows) */
.billing-label-nocheck{
  padding-left:44px; /* 36px switch + 8px gap */
}

/* Expense total row */
.billing-expense-row--total{
  border-top:1px solid #d1d5db !important;
  border-bottom:none !important;
  padding-top:8px; margin-top:2px;
  background:#f8fafc; margin:2px -12px 0;
  padding:8px 12px 6px;
  border-radius:0 0 10px 10px;
}
.billing-total-value{
  font-weight:700; font-size:14px; color:#1f2937;
  font-variant-numeric:tabular-nums;
}

/* Rate adjustment row */
.billing-rate-adjust{
  display:flex; gap:8px; align-items:center;
}
.billing-rate-pct{
  display:flex; align-items:center; gap:4px; flex-shrink:0;
}
.billing-rate-pct input{
  width:64px;
}
.billing-rate-unit{
  font-size:13px; font-weight:600; color:#6b7280;
}

/* Summary total row highlight */
.billing-summary-total th,
.billing-summary-total td{
  background:#f0f5ff !important;
  border-top:2px solid #2d89ef;
}

/* Unbilled months warning */
.billing-unbilled-warning{
  background:#fff3cd; color:#8a5800;
  border:1px solid #ffc107; border-radius:8px;
  padding:10px 14px; margin-bottom:12px;
  font-size:13px; font-weight:600;
}
.billing-unbilled-warning a{
  color:#0b57d0; text-decoration:underline;
}
.billing-unbilled-warning i{
  margin-right:6px; color:#e6a700;
}

/* billing-kv: 当月請求サマリーテーブル（出来高タブ） */
.billing-kv{
  width:100%; border-collapse:collapse;
}
.billing-kv td{
  padding:4px 0; font-size:13px; color:#374151;
}
.billing-kv td.muted{ color:#6b7280; }
.billing-kv td.text-right{ text-align:right; font-variant-numeric:tabular-nums; }
.billing-kv tr[style*="border-top"] td{
  padding-top:8px; margin-top:4px;
}

/* ===== /BUILD-B ===== */
