/* =========================================================
   Attendance pages
   ========================================================= */

.attendance-page .card-title{
  margin-bottom: 10px;
}

.attendance-hero__head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-bottom:16px;
}

.attendance-state{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:96px;
  padding:8px 12px;
  border-radius:999px;
  font-weight:700;
  font-size:.9rem;
  border:1px solid rgba(255,255,255,.12);
}

.attendance-state--before{
  background:rgba(148,163,184,.16);
  color:#cbd5e1;
}

.attendance-state--working{
  background:rgba(59,130,246,.18);
  color:#dbeafe;
}

.attendance-state--break{
  background:rgba(245,158,11,.20);
  color:#fef3c7;
}

.attendance-state--done{
  background:rgba(107,114,128,.28);
  color:#f3f4f6;
}

.attendance-self-summary{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:12px;
  margin-bottom:16px;
}

.attendance-metric{
  border:1px solid rgba(255,255,255,.08);
  border-radius:14px;
  padding:12px 14px;
  background:rgba(255,255,255,.03);
}

.attendance-metric__label{
  display:block;
  font-size:.82rem;
  color:#94a3b8;
  margin-bottom:4px;
}

.attendance-metric__value{
  font-size:1.1rem;
  font-weight:800;
  font-variant-numeric: tabular-nums;
}

.btn-clock-main{
  width:100%;
  min-height:68px;
  font-size:1.35rem;
  letter-spacing:.03em;
  border-radius:18px;
}

.attendance-finished-box{
  margin-top:10px;
  padding:16px;
  border-radius:16px;
  border:1px solid rgba(34,197,94,.22);
  background:rgba(34,197,94,.10);
}

.attendance-finished-box__title{
  font-weight:800;
  margin-bottom:4px;
}

.attendance-alert-card{
  border-color:rgba(245,158,11,.30);
}

.attendance-flag-list{
  margin:0;
  padding-left:18px;
  display:grid;
  gap:6px;
}

.attendance-history-list{
  list-style:none;
  margin:0;
  padding:0;
  display:grid;
  gap:10px;
}

.attendance-history-item{
  display:grid;
  grid-template-columns:64px 88px 1fr;
  align-items:center;
  gap:10px;
  padding:12px 14px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.03);
  border-radius:12px;
}

.attendance-history-time{
  font-variant-numeric: tabular-nums;
  font-weight:700;
  opacity:.95;
}

.attendance-history-source{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.badge--clockin{
  color:#dbeafe;
  border-color:rgba(59,130,246,.36);
  background:rgba(59,130,246,.18);
}

.badge--breakout{
  color:#fef3c7;
  border-color:rgba(245,158,11,.40);
  background:rgba(245,158,11,.18);
}

.badge--breakin{
  color:#dcfce7;
  border-color:rgba(34,197,94,.36);
  background:rgba(34,197,94,.15);
}

.badge--clockout{
  color:#e5e7eb;
  border-color:rgba(107,114,128,.45);
  background:rgba(107,114,128,.22);
}

/* =========================================================
   Shared terminal
   ========================================================= */

.attendance-toolbar__top{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
  margin-bottom:14px;
}

.attendance-filter-row{
  display:grid;
  grid-template-columns:180px 180px auto auto;
  gap:12px;
  align-items:end;
  margin-bottom:14px;
}

.attendance-filter-check{
  align-self:center;
  min-height:52px;
}

.attendance-shared-stats{
  display:grid;
  grid-template-columns:repeat(5, minmax(0, 1fr));
  gap:10px;
}

.attendance-mini-stat{
  padding:10px 12px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.03);
}

.attendance-mini-stat span{
  display:block;
  font-size:.78rem;
  color:#94a3b8;
  margin-bottom:4px;
}

.attendance-mini-stat strong{
  font-size:1.05rem;
  font-weight:800;
  font-variant-numeric: tabular-nums;
}

.attendance-shared-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:12px;
}

.attendance-shared-form{
  margin:0;
}

.attendance-shared-btn{
  width:100%;
  min-height:112px;
  border:0;
  border-radius:18px;
  padding:14px 10px 12px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:4px;
  font-weight:800;
  cursor:pointer;
  transition:transform .06s ease, opacity .12s ease, filter .12s ease;
}

.attendance-shared-btn:hover{
  transform:translateY(-1px);
}

.attendance-shared-btn:active{
  transform:translateY(1px);
}

.attendance-shared-btn[disabled]{
  cursor:not-allowed;
  opacity:.92;
}

.attendance-shared-btn--before{
  background:#cbd5e1;
  color:#0f172a;
}

.attendance-shared-btn--working{
  background:#2563eb;
  color:#fff;
}

.attendance-shared-btn--break{
  background:#f59e0b;
  color:#111827;
}

.attendance-shared-btn--done{
  background:#6b7280;
  color:#fff;
}

.attendance-shared-btn__name{
  display:block;
  font-size:1.18rem;
  line-height:1.2;
  text-align:center;
  word-break:break-word;
}

.attendance-shared-btn__meta{
  display:block;
  font-size:.86rem;
  font-weight:700;
  opacity:.95;
}

.attendance-shared-btn__time{
  display:block;
  font-size:.82rem;
  font-weight:700;
  opacity:.88;
}

.attendance-shared-bottom{
  display:grid;
  grid-template-columns:1.5fr 1fr;
  gap:16px;
}

.attendance-history-list--compact .attendance-history-item{
  grid-template-columns:56px 88px 1fr;
  padding:10px 12px;
}

.attendance-undo-list{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:8px;
}

.attendance-undo-btn{
  width:100%;
  min-height:44px;
}

/* =========================================================
   Tablet / mobile
   ========================================================= */

@media (max-width: 1024px){
  .attendance-self-summary{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }

  .attendance-shared-grid{
    grid-template-columns:repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px){
  .attendance-filter-row{
    grid-template-columns:1fr 1fr;
  }

  .attendance-shared-stats{
    grid-template-columns:repeat(3, minmax(0, 1fr));
  }

  .attendance-shared-bottom{
    grid-template-columns:1fr;
  }
}

@media (max-width: 640px){
  .attendance-hero__head{
    flex-direction:column;
    align-items:flex-start;
  }

  .attendance-self-summary{
    grid-template-columns:1fr 1fr;
  }

  .attendance-history-item{
    grid-template-columns:56px 80px 1fr;
    gap:8px;
  }

  .attendance-shared-grid{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }
}

/* =========================================================
   Shared card action emphasis - append
   ========================================================= */

.attendance-shared-btn{
  position: relative;
  overflow: hidden;
}

.attendance-shared-btn__action{
  display:block;
  font-size:1.42rem;
  line-height:1.1;
  font-weight:900;
  letter-spacing:.05em;
  margin-top:2px;
}

.attendance-shared-btn__meta{
  display:block;
  font-size:.84rem;
  font-weight:700;
  opacity:.95;
}

.attendance-shared-btn__time{
  display:block;
  font-size:.8rem;
  font-weight:700;
  opacity:.88;
  font-variant-numeric: tabular-nums;
}

.attendance-shared-btn--action-ready-in .attendance-shared-btn__action{
  text-shadow: 0 1px 0 rgba(255,255,255,.18);
}

.attendance-shared-btn--action-ready-break .attendance-shared-btn__action{
  text-shadow: 0 1px 0 rgba(255,255,255,.18);
}

.attendance-shared-btn--action-ready-return .attendance-shared-btn__action{
  text-shadow: 0 1px 0 rgba(255,255,255,.16);
}

.attendance-shared-btn--action-ready-out .attendance-shared-btn__action{
  text-shadow: 0 1px 0 rgba(255,255,255,.14);
}

.attendance-shared-btn--action-done .attendance-shared-btn__action{
  opacity:.95;
}

.attendance-shared-btn--before{
  background: linear-gradient(180deg, #22c55e 0%, #16a34a 100%);
  color:#ffffff;
  box-shadow: inset 0 -4px 0 rgba(0,0,0,.12);
}

.attendance-shared-btn--working{
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
  color:#ffffff;
  box-shadow: inset 0 -4px 0 rgba(0,0,0,.14);
}

.attendance-shared-btn--break{
  background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%);
  color:#111827;
  box-shadow: inset 0 -4px 0 rgba(0,0,0,.10);
}

.attendance-shared-btn--done{
  background: linear-gradient(180deg, #6b7280 0%, #4b5563 100%);
  color:#ffffff;
  box-shadow: inset 0 -4px 0 rgba(255,255,255,.06);
}
/* 次アクションで微妙に見え方を変える */
.attendance-shared-btn--action-ready-in{
  box-shadow: inset 0 -4px 0 rgba(15,23,42,.10);
}

.attendance-shared-btn--action-ready-break{
  box-shadow: inset 0 -4px 0 rgba(255,255,255,.18);
}

.attendance-shared-btn--action-ready-return{
  box-shadow: inset 0 -4px 0 rgba(17,24,39,.14);
}

.attendance-shared-btn--action-ready-out{
  box-shadow: inset 0 -4px 0 rgba(255,255,255,.10);
}
.attendance-shared-btn--action-done{
  filter:saturate(.9);
}

.attendance-shared-btn__name{
  display:block;
  font-size:1.15rem;
  line-height:1.2;
  text-align:center;
  word-break:break-word;
}

@media (max-width: 1024px){
  .attendance-shared-btn{
    min-height:104px;
    padding:12px 8px 10px;
  }

  .attendance-shared-btn__name{
    font-size:1.06rem;
  }

  .attendance-shared-btn__action{
    font-size:1.24rem;
  }
}

@media (max-width: 820px){
  .attendance-shared-btn{
    min-height:96px;
    border-radius:16px;
  }

  .attendance-shared-btn__name{
    font-size:1rem;
  }

  .attendance-shared-btn__action{
    font-size:1.12rem;
  }

  .attendance-shared-btn__meta,
  .attendance-shared-btn__time{
    font-size:.76rem;
  }
}

/* =========================================================
   Shared button force override
   最下部に追記
   ========================================================= */

.attendance-page .attendance-shared-btn.attendance-shared-btn--before{
  background: linear-gradient(180deg, #22c55e 0%, #16a34a 100%) !important;
  color:#ffffff !important;
  box-shadow: inset 0 -4px 0 rgba(0,0,0,.12) !important;
}

.attendance-page .attendance-shared-btn.attendance-shared-btn--working{
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%) !important;
  color:#ffffff !important;
  box-shadow: inset 0 -4px 0 rgba(0,0,0,.14) !important;
}

.attendance-page .attendance-shared-btn.attendance-shared-btn--break{
  background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%) !important;
  color:#111827 !important;
  box-shadow: inset 0 -4px 0 rgba(0,0,0,.10) !important;
}

.attendance-page .attendance-shared-btn.attendance-shared-btn--done{
  background: linear-gradient(180deg, #6b7280 0%, #4b5563 100%) !important;
  color:#ffffff !important;
  box-shadow: inset 0 -4px 0 rgba(255,255,255,.06) !important;
}

.attendance-page .attendance-shared-btn.attendance-shared-btn--action-ready-in{
  box-shadow: inset 0 -4px 0 rgba(15,23,42,.10) !important;
}

.attendance-page .attendance-shared-btn.attendance-shared-btn--action-ready-break{
  box-shadow: inset 0 -4px 0 rgba(255,255,255,.18) !important;
}

.attendance-page .attendance-shared-btn.attendance-shared-btn--action-ready-return{
  box-shadow: inset 0 -4px 0 rgba(17,24,39,.14) !important;
}

.attendance-page .attendance-shared-btn.attendance-shared-btn--action-ready-out{
  box-shadow: inset 0 -4px 0 rgba(255,255,255,.10) !important;
}

.attendance-page .attendance-shared-btn.attendance-shared-btn--action-done{
  filter:saturate(.9) !important;
}

/* =========================================================
   Shared toolbar compact + live head
   append
   ========================================================= */

.attendance-toolbar--compact{
  padding-top:12px;
  padding-bottom:12px;
}

.attendance-settings-toggle{
  width:100%;
}

.attendance-settings-toggle__summary{
  list-style:none;
  cursor:pointer;
  user-select:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:40px;
  padding:8px 14px;
  border-radius:12px;
  font-weight:800;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.04);
}

.attendance-settings-toggle__summary::-webkit-details-marker{
  display:none;
}

.attendance-settings-toggle[open] .attendance-settings-toggle__summary{
  margin-bottom:12px;
}

.attendance-settings-toggle__body{
  padding-top:4px;
}

.attendance-shared-livehead{
  display:grid;
  grid-template-columns:1.15fr 1fr;
  gap:16px;
  align-items:start;
  margin-bottom:16px;
}

.attendance-shared-livehead__main{
  border:1px solid rgba(255,255,255,.08);
  border-radius:16px;
  padding:16px 18px;
  background:rgba(255,255,255,.03);
}

.attendance-shared-livehead__date{
  font-size:1.08rem;
  font-weight:800;
  line-height:1.3;
  color:#e5e7eb;
  margin-bottom:6px;
}

.attendance-shared-livehead__time{
  font-size:2rem;
  line-height:1;
  font-weight:900;
  letter-spacing:.05em;
  font-variant-numeric: tabular-nums;
  color:#ffffff;
}

.attendance-shared-stats--compact{
  margin:0;
}

@media (max-width: 1024px){
  .attendance-shared-livehead{
    grid-template-columns:1fr;
  }

  .attendance-shared-livehead__time{
    font-size:1.8rem;
  }
}

@media (max-width: 640px){
  .attendance-settings-toggle__summary{
    width:100%;
  }

  .attendance-shared-livehead__date{
    font-size:1rem;
  }

  .attendance-shared-livehead__time{
    font-size:1.55rem;
  }
}

.attendance-link-list{
  display:grid;
  gap:10px;
}

.attendance-link-btn{
  width:100%;
  min-height:48px;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
}

/* =========================================================
   Personal links + modal
   ========================================================= */

.attendance-personal-links{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:10px;
}

.attendance-link-btn{
  min-height:48px;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
}

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

.attendance-modal-backdrop{
  position:fixed;
  inset:0;
  background:rgba(15,23,42,.56);
  display:none;
  align-items:center;
  justify-content:center;
  z-index:9999;
  padding:16px;
}

.attendance-modal-backdrop.is-open{
  display:flex;
}

.attendance-modal{
  width:min(100%, 460px);
  background:#0f172a;
  border:1px solid rgba(255,255,255,.08);
  border-radius:20px;
  padding:20px;
  box-shadow:0 18px 48px rgba(0,0,0,.35);
}

.attendance-modal__title{
  margin:0 0 8px;
  font-size:1.2rem;
  font-weight:900;
}

.attendance-modal__name{
  margin-bottom:14px;
  color:#cbd5e1;
  font-weight:700;
}

.attendance-modal__grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:12px;
  margin-bottom:16px;
}

.attendance-modal__grid > div{
  border:1px solid rgba(255,255,255,.08);
  border-radius:14px;
  padding:12px;
  background:rgba(255,255,255,.03);
}

.attendance-modal__grid span{
  display:block;
  font-size:.82rem;
  color:#94a3b8;
  margin-bottom:4px;
}

.attendance-modal__grid strong{
  font-size:1.12rem;
  font-weight:900;
  font-variant-numeric:tabular-nums;
}

.attendance-modal__actions{
  display:flex;
  justify-content:flex-end;
}

@media (max-width: 640px){
  .attendance-personal-links,
  .grid-2,
  .attendance-modal__grid{
    grid-template-columns:1fr;
  }
}

/* ===== モーダル ===== */
.attendance-modal-overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.attendance-modal{
  width: 90vw;
  max-width: 720px;
  height: 80vh;
  background: #1e1e1e;
  border-radius: 16px;
  padding: 24px;
}

.attendance-modal-date{
  text-align: center;
  font-size: 20px;
  margin-bottom: 10px;
}

.attendance-modal-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 20px;
}

.attendance-modal-card{
  background: rgba(255,255,255,.05);
  padding: 16px;
  border-radius: 12px;
  text-align: center;
}

.attendance-modal-time{
  font-size: 26px;
  font-weight: bold;
}

.attendance-modal-name{
  margin: 14px 0 18px;
  font-size: 2rem;
  font-weight: 900;
  line-height: 1.2;
}

.attendance-modal-date{
  text-align: center;
  font-size: 1.2rem;
  margin-bottom: 8px;
  font-weight: 700;
  color: #e5e7eb;
}

.attendance-modal-time{
  font-size: 2rem;
  font-weight: 900;
  line-height: 1.2;
}

@media (max-width: 640px){
  .attendance-modal-name{
    font-size: 1.6rem;
  }

  .attendance-modal-date{
    font-size: 1rem;
  }

  .attendance-modal-time{
    font-size: 1.5rem;
  }
}

.attendance-modal-actions{
  display:flex;
  justify-content:center;
  margin-top:20px;
}

.attendance-modal-actions .btn{
  min-width:120px;
}

.attendance-approval-list{
  display:grid;
  gap:14px;
}

.attendance-approval-card{
  border:1px solid rgba(255,255,255,.08);
  border-radius:16px;
  padding:16px;
  background:rgba(255,255,255,.03);
}

.attendance-approval-card__head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}

.attendance-approval-card__name{
  font-size:1.1rem;
  font-weight:800;
}

.attendance-approval-card__badges{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.attendance-approval-card__body{
  display:grid;
  gap:12px;
}

.attendance-approval-meta{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:10px;
}

.attendance-approval-reason{
  border:1px solid rgba(255,255,255,.06);
  border-radius:12px;
  padding:12px;
  background:rgba(255,255,255,.02);
}

.attendance-approval-actions{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}

.attendance-approval-actions form{
  display:grid;
  gap:8px;
}

@media (max-width: 820px){
  .attendance-approval-card__head{
    flex-direction:column;
  }

  .attendance-approval-meta,
  .attendance-approval-actions{
    grid-template-columns:1fr;
  }
}

.attendance-shared-btn--done .attendance-shared-btn__meta{
  font-weight: 800;
}

.attendance-calendar-nav{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.attendance-calendar-nav__current{
  font-weight:800;
  min-width:90px;
  text-align:center;
}

.attendance-calendar-grid{
  display:grid;
  grid-template-columns:repeat(7, minmax(0, 1fr));
  gap:8px;
}

.attendance-calendar-grid--head{
  margin-bottom:8px;
}

.attendance-calendar-cell{
  min-height:72px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:12px;
  background:rgba(255,255,255,.03);
  padding:8px;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  justify-content:space-between;
  text-decoration:none;
  color:inherit;
}

.attendance-calendar-cell--head{
  min-height:auto;
  justify-content:center;
  align-items:center;
  font-weight:800;
  background:rgba(255,255,255,.05);
}

.attendance-calendar-cell--blank{
  min-height:72px;
  background:transparent;
  border:0;
}

.attendance-calendar-cell__day{
  font-weight:900;
  font-size:1rem;
}

.attendance-calendar-cell__label{
  font-size:.78rem;
  font-weight:700;
  opacity:.95;
}

.attendance-calendar-cell.is-selected{
  outline:2px solid rgba(59,130,246,.7);
}

.attendance-calendar-cell.is-worked{
  background:rgba(59,130,246,.18);
}

.attendance-calendar-cell.is-paid{
  background:rgba(34,197,94,.18);
}

.attendance-calendar-cell.is-half{
  background:rgba(245,158,11,.20);
}

.attendance-calendar-cell.is-absence{
  background:rgba(107,114,128,.25);
}

.attendance-calendar-cell.is-pending{
  background:rgba(244,114,182,.18);
}

@media (max-width: 820px){
  .attendance-calendar-cell{
    min-height:64px;
    padding:6px;
  }

  .attendance-calendar-cell__label{
    font-size:.72rem;
  }
}

.attendance-calendar-nav{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.attendance-calendar-nav__current{
  font-weight:800;
  min-width:90px;
  text-align:center;
}

.attendance-calendar-grid{
  display:grid;
  grid-template-columns:repeat(7, minmax(0, 1fr));
  gap:8px;
}

.attendance-calendar-grid--head{
  margin-bottom:8px;
}

.attendance-calendar-cell{
  min-height:76px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:12px;
  background:rgba(255,255,255,.03);
  padding:8px;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  justify-content:space-between;
  text-decoration:none;
  color:inherit;
}

.attendance-calendar-cell--head{
  min-height:auto;
  justify-content:center;
  align-items:center;
  font-weight:800;
  background:rgba(255,255,255,.05);
}

.attendance-calendar-cell--blank{
  min-height:76px;
  background:transparent;
  border:0;
}

.attendance-calendar-cell__day{
  font-weight:900;
  font-size:1.05rem;
}

.attendance-calendar-cell__label{
  font-size:.8rem;
  font-weight:700;
  opacity:.95;
}

.attendance-calendar-cell.is-selected{
  outline:2px solid rgba(59,130,246,.7);
}

.attendance-calendar-cell.is-worked{
  background:rgba(59,130,246,.18);
}

.attendance-calendar-cell.is-paid{
  background:rgba(34,197,94,.18);
}

.attendance-calendar-cell.is-half{
  background:rgba(245,158,11,.20);
}

.attendance-calendar-cell.is-absence{
  background:rgba(107,114,128,.25);
}

.attendance-calendar-cell.is-pending{
  background:rgba(244,114,182,.18);
}

.attendance-calendar-cell.is-weekend{
  background:rgba(255,255,255,.06);
}

@media (max-width: 820px){
  .attendance-calendar-cell{
    min-height:66px;
    padding:6px;
  }

  .attendance-calendar-cell__label{
    font-size:.72rem;
  }
}

.attendance-approval-summary{
  display:grid;
  grid-template-columns:repeat(5, minmax(0, 1fr));
  gap:10px;
}

.attendance-approval-summary__item{
  border:1px solid rgba(255,255,255,.06);
  border-radius:12px;
  padding:10px 12px;
  background:rgba(255,255,255,.02);
}

.attendance-approval-summary__label{
  display:block;
  font-size:.78rem;
  color:#94a3b8;
  margin-bottom:4px;
}

.attendance-approval-summary__value{
  font-size:1rem;
  font-weight:800;
}

.attendance-calendar-cell{
  min-height:84px;
  padding:10px;
}

.attendance-calendar-cell__day{
  font-weight:900;
  font-size:1.12rem;
}

.attendance-calendar-cell__label{
  font-size:.84rem;
  font-weight:800;
  opacity:.98;
}

.attendance-calendar-cell.is-weekend{
  background:rgba(148,163,184,.12);
}

.attendance-calendar-cell.is-worked{
  background:rgba(59,130,246,.22);
}

.attendance-calendar-cell.is-paid{
  background:rgba(34,197,94,.24);
}

.attendance-calendar-cell.is-half{
  background:rgba(245,158,11,.26);
}

.attendance-calendar-cell.is-absence{
  background:rgba(107,114,128,.32);
}

.attendance-calendar-cell.is-pending{
  background:rgba(236,72,153,.24);
}

.attendance-calendar-cell.is-rejected{
  background:rgba(239,68,68,.22);
}

.attendance-calendar-cell.is-selected{
  outline:2px solid rgba(255,255,255,.7);
  box-shadow:0 0 0 2px rgba(59,130,246,.25);
}

@media (max-width: 980px){
  .attendance-approval-summary{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px){
  .attendance-calendar-cell{
    min-height:72px;
    padding:8px;
  }

  .attendance-calendar-cell__day{
    font-size:1rem;
  }

  .attendance-calendar-cell__label{
    font-size:.75rem;
  }
}

/* =========================================================
   Self clock simple
   ========================================================= */

.attendance-clock-main{
  max-width: 560px;
}

.attendance-hero .card-title{
  margin-bottom: 6px;
}

.attendance-self-form{
  margin-top: 8px;
}

.attendance-finished-box .btn{
  margin-top: 4px;
}

@media (max-width: 900px){
  .attendance-self-summary{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px){
  .attendance-self-summary{
    grid-template-columns: 1fr;
  }

  .btn-clock-main{
    min-height: 74px;
    font-size: 1.2rem;
  }
}

/* =========================================================
   Self minimal clock（強化版）
   ========================================================= */

.attendance-self-big-action{
  width: 100%;
  min-height: 260px; /* ←さらに大きく */
  border: 0;
  border-radius: 999px;
  font-size: 2.6rem; /* ←文字デカく */
  font-weight: 900;
  letter-spacing: .06em;
  cursor: pointer;
  transition: transform .08s ease, box-shadow .12s ease, opacity .12s ease;
  box-shadow: 0 16px 40px rgba(0,0,0,.25); /* ←強め */
}

.attendance-self-big-action:hover{
  transform: translateY(-2px);
}

.attendance-self-big-action:active{
  transform: translateY(2px) scale(.98);
}

/* サブ導線（申請・確認） */
.attendance-self-minimal-links{
  display: flex;
  justify-content: center;
  margin-top: 8px;
}

/* 小さくする */
.attendance-self-minimal-links .btn{
  min-width: 160px;
  padding: 10px 14px;
  font-size: 0.9rem;
  opacity: 0.85;
}

/* 視覚的に主従つける */
.attendance-self-minimal-links .btn{
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
}

.attendance-self-minimal-links .btn:hover{
  opacity: 1;
}

/* スマホ最適化 */
@media (max-width: 640px){
  .attendance-self-big-action{
    min-height: 240px;
    font-size: 2.2rem;
  }

  .attendance-self-minimal-links .btn{
    width: 70%; /* フル幅にしないのがポイント */
  }
}

/* =========================================================
   Self clock modal
   ========================================================= */

.attendance-complete-modal-backdrop{
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(3, 10, 28, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.attendance-complete-modal{
  width: min(92vw, 420px);
  background: #071a3d;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,.45);
  padding: 22px 18px 18px;
  color: #fff;
}

.attendance-complete-modal h3{
  margin: 0 0 14px;
  font-size: 1.4rem;
  line-height: 1.4;
}

.attendance-complete-modal dl{
  margin: 0 0 18px;
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 10px 12px;
}

.attendance-complete-modal dt{
  margin: 0;
  color: rgba(255,255,255,.78);
  font-weight: 700;
}

.attendance-complete-modal dd{
  margin: 0;
  color: #fff;
}

.attendance-complete-modal .btn{
  min-width: 110px;
}

body.modal-open{
  overflow: hidden;
}

/* =========================================================
   Schedule calendar
   ========================================================= */

.schedule-cal-wrap{
  display: grid;
  gap: 8px;
}

.schedule-cal-header,
.schedule-cal-row{
  display: grid;
  grid-template-columns: 60px repeat(7, minmax(96px, 1fr));
  gap: 8px;
}

.schedule-cal-corner,
.schedule-cal-weekday,
.schedule-cal-weekno{
  min-height: 48px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.04);
  color: #fff;
  font-weight: 700;
}

.schedule-cal-weekday.is-sun{ color:#e74c3c; }
.schedule-cal-weekday.is-sat{ color:#4d8dff; }

.schedule-cal-cell{
  position: relative;
  min-height: 96px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
  padding: 10px;
  display: grid;
  gap: 8px;
  cursor: pointer;
}

.schedule-cal-cell input{
  position: absolute;
  top: 8px;
  right: 8px;
}

.schedule-cal-cell__day{
  font-weight: 800;
}

.schedule-cal-cell__label{
  font-size: .84rem;
  line-height: 1.35;
  white-space: pre-wrap;
}

.schedule-cal-cell.is-work{
  background: #dff3e4;
  color: #142a14;
}

.schedule-cal-cell.is-holiday{
  background: #7ddfe0;
  color: #062b2b;
}

.schedule-cal-cell.is-paid{
  background: #8be8c9;
  color: #0e2a22;
}

.schedule-cal-cell.is-absence{
  background: #f2b8b5;
  color: #381919;
}

.schedule-cal-cell.is-out-month{
  opacity: .45;
}

@media (max-width: 1200px){
  .schedule-cal-header,
  .schedule-cal-row{
    grid-template-columns: 52px repeat(7, minmax(82px, 1fr));
  }
}

@media (max-width: 860px){
  .schedule-cal-wrap{
    overflow-x: auto;
  }

  .schedule-cal-header,
  .schedule-cal-row{
    min-width: 860px;
  }
}

.schedule-cal-cell{
  position: relative;
  min-height: 108px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
  padding: 8px 10px 10px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 8px;
  cursor: pointer;
}

.schedule-cal-cell__day{
  font-weight: 800;
  font-size: .95rem;
}

.schedule-cal-cell__label{
  font-size: .82rem;
  line-height: 1.35;
  white-space: pre-wrap;
  word-break: break-word;
}

.schedule-cal-cell__check{
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

/* =========================================================
   Schedule patterns
   ========================================================= */

.patterns-table-wrap{
  overflow-x: hidden;
}

.patterns-table{
  width: 100%;
  table-layout: fixed;
}

.patterns-table th:nth-child(1),
.patterns-table td:nth-child(1){
  width: 18%;
}

.patterns-table th:nth-child(2),
.patterns-table td:nth-child(2){
  width: 9%;
}

.patterns-table th:nth-child(3),
.patterns-table td:nth-child(3){
  width: 13%;
}

.patterns-table th:nth-child(4),
.patterns-table td:nth-child(4){
  width: 13%;
}

.patterns-table th:nth-child(5),
.patterns-table td:nth-child(5){
  width: 7%;
}

.patterns-table th:nth-child(6),
.patterns-table td:nth-child(6),
.patterns-table th:nth-child(7),
.patterns-table td:nth-child(7){
  width: 12%;
}

.patterns-table th:nth-child(8),
.patterns-table td:nth-child(8){
  width: 6%;
  text-align: center;
}

.patterns-table th:nth-child(9),
.patterns-table td:nth-child(9){
  width: 6%;
}

.patterns-table th:nth-child(10),
.patterns-table td:nth-child(10){
  width: 8%;
}

.patterns-table th,
.patterns-table td{
  white-space: normal;
  word-break: break-word;
  vertical-align: middle;
}

.pattern-color-chip{
  display:inline-block;
  width:20px;
  height:20px;
  border-radius:6px;
  border:1px solid rgba(255,255,255,.18);
}

.pattern-color-picker-wrap{
  display:flex;
  align-items:center;
  gap:10px;
}

.pattern-color-picker-wrap input[type="color"]{
  width:56px;
  height:40px;
  border:none;
  padding:0;
  background:none;
  cursor:pointer;
}

.pattern-color-preview{
  display:inline-block;
  width:28px;
  height:28px;
  border-radius:8px;
  border:1px solid rgba(255,255,255,.14);
}

.is-disabled{
  opacity: .65;
  cursor: not-allowed;
}

@media (max-width: 1200px){
  .patterns-table{
    font-size: .92rem;
  }
}

@media (max-width: 980px){
  .patterns-table-wrap{
    overflow-x: auto;
  }

  .patterns-table{
    min-width: 960px;
  }
}

/* =========================================================
   Schedule list sticky table
   ========================================================= */

.schedule-table-outer{
  width: 100%;
}

.schedule-table-scroll{
  overflow: auto;
  max-height: 72vh;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
}

.schedule-sticky-table{
  border-collapse: separate;
  border-spacing: 0;
  min-width: 1400px;
  table-layout: fixed;
  background: #08162f;
}

.schedule-sticky-table thead th{
  position: sticky;
  top: 0;
  z-index: 20;
  background: #08162f;
  color: #dce8ff;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.schedule-sticky-table tbody td{
  color: #eef4ff;
  background: #08162f;
}

.schedule-sticky-table th,
.schedule-sticky-table td{
  border-right: 1px solid rgba(255,255,255,.06);
  border-bottom: 1px solid rgba(255,255,255,.06);
  vertical-align: middle;
}

.schedule-sticky-table .sticky-col{
  position: sticky;
  z-index: 15;
  background: #08162f;
}

.schedule-sticky-table thead .sticky-col{
  z-index: 30;
}

.schedule-sticky-table .sticky-col-1{
  left: 0;
  min-width: 140px;
  width: 140px;
}

.schedule-sticky-table .sticky-col-2{
  left: 140px;
  min-width: 130px;
  width: 130px;
}

.schedule-sticky-table .sticky-col-3{
  left: 270px;
  min-width: 86px;
  width: 86px;
}

.schedule-day-head{
  min-width: 90px;
  width: 90px;
  text-align: center;
}

.schedule-day-head.is-sun{
  color: #ff7c7c !important;
}

.schedule-day-head.is-sat{
  color: #78a9ff !important;
}

.schedule-grid-cell{
  min-width: 90px;
  width: 90px;
  text-align: center;
  padding: 6px 6px 8px;
  color: #f7fbff !important;
}

.schedule-grid-cell__label{
  min-height: 38px;
  font-size: .76rem;
  line-height: 1.3;
  white-space: normal;
  word-break: break-word;
  margin-bottom: 6px;
  color: inherit;
}

.schedule-grid-cell__check{
  display: flex;
  justify-content: center;
  align-items: center;
}

.schedule-grid-cell.is-work{
  background: #dff3e4 !important;
  color: #18301e !important;
}

.schedule-grid-cell.is-holiday{
  background: #7ddfe0 !important;
  color: #08292a !important;
}

.schedule-grid-cell.is-holiday-half{
  background: #9fe9ea !important;
  color: #08292a !important;
}

.schedule-grid-cell.is-paid{
  background: #8be8c9 !important;
  color: #0c2b22 !important;
}

.schedule-grid-cell.is-paid-half{
  background: #aef0da !important;
  color: #0c2b22 !important;
}

.schedule-grid-cell.is-absence{
  background: #f2b8b5 !important;
  color: #3b1918 !important;
}

.schedule-grid-cell.is-special{
  background: #f5dfa7 !important;
  color: #3a2b08 !important;
}

/* =========================================================
   Schedule calendar tweak
   ========================================================= */

.schedule-cal-cell{
  position: relative;
  min-height: 108px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
  padding: 8px 10px 10px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 8px;
  cursor: pointer;
}

.schedule-cal-cell__day{
  font-weight: 800;
  font-size: .95rem;
}

.schedule-cal-cell__label{
  font-size: .82rem;
  line-height: 1.35;
  white-space: pre-wrap;
  word-break: break-word;
}

.schedule-cal-cell__check{
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.schedule-cal-cell.is-work{
  background: #dff3e4;
  color: #142a14;
}

.schedule-cal-cell.is-holiday{
  background: #7ddfe0;
  color: #062b2b;
}

.schedule-cal-cell.is-holiday-half{
  background: #9fe9ea;
  color: #062b2b;
}

.schedule-cal-cell.is-paid{
  background: #8be8c9;
  color: #0e2a22;
}

.schedule-cal-cell.is-paid-half{
  background: #aef0da;
  color: #0e2a22;
}

.schedule-cal-cell.is-absence{
  background: #f2b8b5;
  color: #381919;
}

.schedule-cal-cell.is-special{
  background: #f5dfa7;
  color: #3a2b08;
}

.schedule-cal-cell.is-out-month{
  opacity: .42;
}

.schedule-cal-cell.is-out-month .schedule-cal-cell__check input{
  cursor: not-allowed;
}

/* =========================================================
   Default weekly template
   ========================================================= */

.default-week-grid{
  display: grid;
  grid-template-columns: repeat(7, minmax(140px, 1fr));
  gap: 12px;
}

.default-week-card{
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  background: rgba(255,255,255,.03);
  padding: 12px;
}

.default-week-card__head{
  font-weight: 800;
  margin-bottom: 10px;
  text-align: center;
}

@media (max-width: 1200px){
  .default-week-grid{
    grid-template-columns: repeat(4, minmax(140px, 1fr));
  }
}

@media (max-width: 820px){
  .default-week-grid{
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }
}

@media (max-width: 520px){
  .default-week-grid{
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   Default weekly patterns index
   ========================================================= */

.default-week-cell{
  min-width: 110px;
  text-align: center;
  padding: 8px 6px;
  color: #fff;
  vertical-align: middle;
}

.default-week-cell__label{
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .82rem;
  line-height: 1.2;
  font-weight: 700;
  border-radius: 10px;
  padding: 6px 8px;
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.default-week-cell__check{
  display: flex;
  justify-content: center;
  align-items: center;
}

.default-week-cell.is-work .default-week-cell__label{
  background: #dff3e4;
  color: #18301e;
}

.default-week-cell.is-holiday-legal .default-week-cell__label{
  background: #7ddfe0;
  color: #08292a;
}

.default-week-cell.is-holiday-nonlegal .default-week-cell__label{
  background: #1565ff;
  color: #ffffff;
}

.default-week-cell.is-holiday .default-week-cell__label{
  background: #8ddfe0;
  color: #08292a;
}

.default-week-cell.is-paid .default-week-cell__label{
  background: #8be8c9;
  color: #0c2b22;
}

.default-week-cell.is-special .default-week-cell__label{
  background: #f5dfa7;
  color: #3a2b08;
}

.default-week-cell.is-absence .default-week-cell__label{
  background: #f2b8b5;
  color: #3b1918;
}

.default-week-cell.is-empty .default-week-cell__label{
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.7);
}

.attendance-calendar-cell {
  position: relative;
}

/* 時間有休バッジ */
.attendance-calendar-cell__badge-hourly{
  position: absolute;
  top: 4px;
  right: 6px;
  font-size: 10px;
  padding: 2px 5px;
  border-radius: 999px;
  background: #3b82f6;
  color: #fff;
  font-weight: 600;
  line-height: 1;
}

/* =========================================================
   Shared personal links tweak
   ボタン幅ではなく間隔を広げる
   ========================================================= */

.attendance-personal-links-help{
  margin: 0 0 14px;
  font-size: 14px;
}

.attendance-personal-links{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:16px; /* 10px → 16px に拡大 */
}

.attendance-link-btn{
  min-height:52px; /* 少しだけ押しやすく */
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  font-size:1rem;
  font-weight:800;
}

.attendance-shared-personal-banner{
  margin-bottom:12px;
}

.attendance-shared-personal-banner__inner{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
}

@media (max-width: 640px){
  .attendance-personal-links{
    grid-template-columns:1fr;
    gap:14px;
  }

  .attendance-link-btn{
    min-height:50px;
  }
}

/* =========================================================
   Monthly editor
   ========================================================= */

.attendance-filter-row--editor{
  grid-template-columns:minmax(220px, 1fr) 180px auto;
}

.attendance-month-editor-table-wrap{
  overflow:auto;
  border:1px solid rgba(255,255,255,.08);
  border-radius:14px;
}

.attendance-month-editor-table{
  min-width:1120px;
  margin:0;
}

.attendance-month-editor-table th,
.attendance-month-editor-table td{
  vertical-align:middle;
  white-space:nowrap;
}

.attendance-month-editor-table td .input{
  min-width:110px;
}

@media (max-width: 820px){
  .attendance-filter-row--editor{
    grid-template-columns:1fr;
  }
}

/* =========================================================
   Attendance profile simple
   ========================================================= */

.attendance-profile-simple-form{
  display:grid;
  gap:16px;
}

.attendance-profile-box{
  border:1px solid rgba(255,255,255,.08);
  border-radius:14px;
  padding:14px;
  background:rgba(255,255,255,.03);
}

.attendance-profile-box__title{
  font-size:1rem;
  font-weight:800;
  margin-bottom:10px;
}

/* =========================================================
   Shared attendance (共用打刻)
   ========================================================= */

.attendance-shared {
  padding: 16px;
}

.shared-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}

.shared-card {
  border: none;
  border-radius: 18px;
  padding: 20px 10px;
  cursor: pointer;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 120px;
  transition: transform .08s ease, filter .1s ease;
}

.shared-card:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

.shared-card .name {
  font-size: 1.3rem;
  font-weight: 800;
  text-align: center;
}

.shared-card .action {
  font-size: 0.9rem;
  opacity: 0.9;
}

/* ==== 色 ==== */

.card-green {
  background: linear-gradient(135deg, #28c76f, #20a65a);
}

.card-blue {
  background: linear-gradient(135deg, #3a86ff, #265dba);
}

.card-orange {
  background: linear-gradient(135deg, #ff9f43, #d97a1d);
}

.card-red {
  background: linear-gradient(135deg, #ea5455, #b12c2c);
}

.card-gray {
  background: #666;
}

/* =========================================================
   共用打刻カード 調整
   ========================================================= */

.attendance-shared-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(190px, 1fr));
  gap:14px;
}

.attendance-shared-btn{
  min-height:130px;
  padding:18px 12px;
  border-radius:18px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  gap:10px;
}

.attendance-shared-btn__name{
  font-size:1.45rem;
  font-weight:800;
  line-height:1.2;
  text-align:center;
  letter-spacing:.02em;
}

.attendance-shared-btn__action{
  font-size:1rem;
  font-weight:700;
  line-height:1.2;
}

.attendance-shared-btn__meta,
.attendance-shared-btn__time{
  display:none !important;
}

/* 4色で判別しやすく */
.attendance-shared-btn--action-ready-in{
  background:linear-gradient(135deg, #28c76f, #20a65a);
  color:#fff;
}

.attendance-shared-btn--action-ready-break{
  background:linear-gradient(135deg, #3a86ff, #265dba);
  color:#fff;
}

.attendance-shared-btn--action-ready-return{
  background:linear-gradient(135deg, #ff9f43, #d97a1d);
  color:#fff;
}

.attendance-shared-btn--action-ready-out{
  background:linear-gradient(135deg, #ea5455, #b12c2c);
  color:#fff;
}

/* 完了・休みなど */
.attendance-shared-btn--action-done,
.attendance-shared-btn[disabled]{
  background:linear-gradient(135deg, #7a7f8a, #5f6570);
  color:#fff;
  opacity:.9;
}

.attendance-shared-btn:hover:not([disabled]){
  transform:translateY(-2px);
  filter:brightness(1.04);
}

@media (max-width: 640px){
  .attendance-shared-grid{
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:12px;
  }

  .attendance-shared-btn{
    min-height:118px;
    padding:16px 10px;
  }

  .attendance-shared-btn__name{
    font-size:1.25rem;
  }

  .attendance-shared-btn__action{
    font-size:.95rem;
  }
}

/* 退勤 */
.attendance-shared-btn--action-ready-out{
  background: linear-gradient(135deg, #ea5455, #b12c2c) !important;
  color:#fff;
}

/* =========================
   共用打刻カード サイズ復元
   ========================= */

.attendance-shared-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(220px, 1fr));
  gap:16px;
}

.attendance-shared-btn{
  min-height:400px; /* ←ここ大きく */
  padding:22px 14px; /* ←余白増やす */
  border-radius:18px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  gap:12px;
}

/* 名前さらに強調 */
.attendance-shared-btn__name{
  font-size:1.6rem;
  font-weight:900;
  text-align:center;
  line-height:1.2;
}

/* 行動 */
.attendance-shared-btn__action{
  font-size:1.05rem;
  font-weight:700;
}

/* 不要情報消す */
.attendance-shared-btn__meta,
.attendance-shared-btn__time{
  display:none !important;
}

/* =========================
   色（強制上書き）
   ========================= */

/* 出勤 */
.attendance-shared-btn--action-ready-in{
  background:linear-gradient(135deg, #28c76f, #20a65a) !important;
  color:#fff;
}

/* 休憩入 */
.attendance-shared-btn--action-ready-break{
  background:linear-gradient(135deg, #3a86ff, #265dba) !important;
  color:#fff;
}

/* 休憩戻 */
.attendance-shared-btn--action-ready-return{
  background:linear-gradient(135deg, #ff9f43, #d97a1d) !important;
  color:#fff;
}

/* 退勤（←今回の修正ポイント） */
.attendance-shared-btn--action-ready-out{
  background:linear-gradient(135deg, #ea5455, #b12c2c) !important;
  color:#fff;
}

/* 完了 */
.attendance-shared-btn--action-done,
.attendance-shared-btn[disabled]{
  background:linear-gradient(135deg, #7a7f8a, #5f6570) !important;
  color:#fff;
  opacity:.9;
}

/* ホバー */
.attendance-shared-btn:hover:not([disabled]){
  transform:translateY(-2px);
  filter:brightness(1.05);
}

/* =========================================================
   ★ 共用打刻 最終FIX（これが正解）
   ========================================================= */

/* ===== 3列固定 ===== */
.attendance-shared-grid{
  display:grid;
  grid-template-columns:repeat(3, 1fr) !important;
  gap:18px;
}

/* ===== サイズ（元よりちょい大きめ） ===== */
.attendance-shared-btn{
  min-height:220px !important;
  padding:24px 16px !important;
  border-radius:20px;
  gap:14px;
}

/* ===== 名前 ===== */
.attendance-shared-btn__name{
  font-size:1.8rem !important;
  font-weight:900;
}

/* ===== アクション ===== */
.attendance-shared-btn__action{
  font-size:1.2rem !important;
  font-weight:800;
}

/* ===== 不要非表示 ===== */
.attendance-shared-btn__meta,
.attendance-shared-btn__time{
  display:none !important;
}

/* =========================================================
   ★ 色は「action」を最優先にする
   ========================================================= */

/* 出勤 */
.attendance-shared-btn.attendance-shared-btn--action-ready-in{
  background:linear-gradient(135deg, #22c55e, #16a34a) !important;
  color:#fff !important;
}

/* 休憩入 */
.attendance-shared-btn.attendance-shared-btn--action-ready-break{
  background:linear-gradient(135deg, #3b82f6, #2563eb) !important;
  color:#fff !important;
}

/* 休憩戻 */
.attendance-shared-btn.attendance-shared-btn--action-ready-return{
  background:linear-gradient(135deg, #f59e0b, #d97706) !important;
  color:#111827 !important;
}

/* 🔴 退勤（ここが重要） */
.attendance-shared-btn.attendance-shared-btn--action-ready-out{
  background:linear-gradient(135deg, #ef4444, #b91c1c) !important;
  color:#fff !important;
}

/* 完了 */
.attendance-shared-btn.attendance-shared-btn--action-done,
.attendance-shared-btn[disabled]{
  background:linear-gradient(135deg, #6b7280, #4b5563) !important;
  color:#fff !important;
}

/* ホバー */
.attendance-shared-btn:hover:not([disabled]){
  transform:translateY(-2px);
  filter:brightness(1.05);
}

/* =========================================================
   共用打刻 最終FIX
   ========================================================= */

/* 余計なセクションを消したので、画面全体を打刻カードに使う */
.attendance-shared-page--fullscreen{
  min-height: calc(100vh - 24px);
  display: flex;
  flex-direction: column;
}

.attendance-shared-card-wrap--fullscreen{
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 80px);
}

.attendance-shared-flash{
  margin-bottom: 10px;
}

.attendance-shared-livehead--compact{
  margin-bottom: 12px;
}

.attendance-shared-grid--fit{
  flex: 1 1 auto;
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 14px !important;
  align-items: stretch;
}

.attendance-shared-form{
  margin: 0;
  height: 100%;
}

.attendance-shared-btn{
  width: 100%;
  height: 100%;
  min-height: 155px !important;
  padding: 18px 12px !important;
  border-radius: 20px !important;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 12px !important;
}

.attendance-shared-btn__name{
  font-size: 1.8rem !important;
  font-weight: 900 !important;
  line-height: 1.2 !important;
  text-align: center;
  letter-spacing: .02em;
}

.attendance-shared-btn__action{
  font-size: 1.15rem !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
}

.attendance-shared-btn__meta,
.attendance-shared-btn__time{
  display: none !important;
}

/* ---------------------------------------------------------
   色は state ではなく action を最優先
   --------------------------------------------------------- */

/* 出勤 */
.attendance-page .attendance-shared-btn.attendance-shared-btn--action-ready-in{
  background: linear-gradient(135deg, #22c55e, #16a34a) !important;
  color: #ffffff !important;
  box-shadow: inset 0 -4px 0 rgba(0,0,0,.12) !important;
}

/* 休憩入 */
.attendance-page .attendance-shared-btn.attendance-shared-btn--action-ready-break{
  background: linear-gradient(135deg, #3b82f6, #2563eb) !important;
  color: #ffffff !important;
  box-shadow: inset 0 -4px 0 rgba(255,255,255,.12) !important;
}

/* 休憩戻 */
.attendance-page .attendance-shared-btn.attendance-shared-btn--action-ready-return{
  background: linear-gradient(135deg, #f59e0b, #d97706) !important;
  color: #111827 !important;
  box-shadow: inset 0 -4px 0 rgba(0,0,0,.10) !important;
}

/* 退勤 ← working より強く上書き */
.attendance-page .attendance-shared-btn.attendance-shared-btn--action-ready-out{
  background: linear-gradient(135deg, #ef4444, #b91c1c) !important;
  color: #ffffff !important;
  box-shadow: inset 0 -4px 0 rgba(255,255,255,.08) !important;
}

/* 完了 */
.attendance-page .attendance-shared-btn.attendance-shared-btn--action-done,
.attendance-page .attendance-shared-btn[disabled]{
  background: linear-gradient(135deg, #6b7280, #4b5563) !important;
  color: #ffffff !important;
  opacity: .92 !important;
  box-shadow: inset 0 -4px 0 rgba(255,255,255,.06) !important;
}

.attendance-shared-btn:hover:not([disabled]){
  transform: translateY(-2px);
  filter: brightness(1.05);
}

.attendance-shared-btn:active:not([disabled]){
  transform: translateY(1px);
}

@media (max-width: 1024px){
  .attendance-shared-grid--fit{
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 14px !important;
  }

  .attendance-shared-btn{
    min-height: 160px !important;
  }

  .attendance-shared-btn__name{
    font-size: 1.5rem !important;
  }
}

@media (max-width: 820px){
  .attendance-shared-grid--fit{
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .attendance-shared-btn{
    min-height: 150px !important;
  }

  .attendance-shared-btn__name{
    font-size: 1.3rem !important;
  }

  .attendance-shared-btn__action{
    font-size: 1rem !important;
  }
}

/* =========================================================
   共用打刻 さらに上詰め・ヘッダー非表示
   ========================================================= */

body:has(.attendance-shared-page--fullscreen) .app-header,
body:has(.attendance-shared-page--fullscreen) .app-header-menu,
body:has(.attendance-shared-page--fullscreen) .hamburger,
body:has(.attendance-shared-page--fullscreen) .drawer,
body:has(.attendance-shared-page--fullscreen) .backdrop{
  display:none !important;
}

/* content-wrapper の上余白を詰める */
.attendance-shared-page--fullscreen{
  min-height:100vh;
  padding-top:6px !important;
}

.attendance-shared-card-wrap--fullscreen{
  min-height:calc(100vh - 16px);
  padding-top:10px !important;
}

/* flash を上に細く入れる */
.attendance-shared-inline-flash{
  margin:0 0 10px;
  padding:8px 12px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.04);
  font-size:.95rem;
  font-weight:700;
  line-height:1.4;
}

/* 上の日時・集計エリアも少し詰める */
.attendance-shared-livehead--compact{
  margin-bottom:10px !important;
}

.attendance-shared-livehead__main{
  padding:14px 16px !important;
}

.attendance-shared-livehead__date{
  margin-bottom:4px !important;
}

.attendance-shared-livehead__time{
  font-size:1.9rem !important;
}

/* 4列のまま、画面に収めやすく */
.attendance-shared-grid--fit{
  grid-template-columns:repeat(4, minmax(0, 1fr)) !important;
  gap:14px !important;
}

.attendance-shared-btn{
  min-height:150px !important;
  padding:18px 12px !important;
  gap:12px !important;
}

.attendance-shared-btn__name{
  font-size:1.65rem !important;
}

.attendance-shared-btn__action{
  font-size:1.08rem !important;
}

.attendance-shared-btn__meta,
.attendance-shared-btn__time{
  display:none !important;
}

/* 色は action 優先で固定 */
.attendance-page .attendance-shared-btn.attendance-shared-btn--action-ready-in{
  background:linear-gradient(135deg, #22c55e, #16a34a) !important;
  color:#fff !important;
}

.attendance-page .attendance-shared-btn.attendance-shared-btn--action-ready-break{
  background:linear-gradient(135deg, #3b82f6, #2563eb) !important;
  color:#fff !important;
}

.attendance-page .attendance-shared-btn.attendance-shared-btn--action-ready-return{
  background:linear-gradient(135deg, #f59e0b, #d97706) !important;
  color:#111827 !important;
}

/* 退勤は state より強く赤固定 */
.attendance-page .attendance-shared-btn.attendance-shared-btn--action-ready-out{
  background:linear-gradient(135deg, #ef4444, #b91c1c) !important;
  color:#fff !important;
  box-shadow:inset 0 -4px 0 rgba(255,255,255,.08) !important;
}

.attendance-page .attendance-shared-btn.attendance-shared-btn--action-done,
.attendance-page .attendance-shared-btn[disabled]{
  background:linear-gradient(135deg, #6b7280, #4b5563) !important;
  color:#fff !important;
}

@media (max-width: 1024px){
  .attendance-shared-grid--fit{
    grid-template-columns:repeat(4, minmax(0, 1fr)) !important;
    gap:12px !important;
  }

  .attendance-shared-btn{
    min-height:140px !important;
  }

  .attendance-shared-btn__name{
    font-size:1.45rem !important;
  }
}

@media (max-width: 820px){
  .attendance-shared-grid--fit{
    grid-template-columns:repeat(2, minmax(0, 1fr)) !important;
  }

  .attendance-shared-btn{
    min-height:132px !important;
  }

  .attendance-shared-btn__name{
    font-size:1.25rem !important;
  }

  .attendance-shared-btn__action{
    font-size:.98rem !important;
  }
}

/* =========================================================
   共用打刻：ヘッダー非表示ページの上詰め
   ========================================================= */

.attendance-shared-noheader .content-wrapper,
.content-wrapper.attendance-shared-page{
  padding-top: 8px !important;
}

.attendance-shared-card-wrap--fullscreen{
  min-height: calc(100vh - 16px);
  padding-top: 10px !important;
}

.attendance-shared-livehead--compact{
  margin-top: 0 !important;
  margin-bottom: 10px !important;
}

/* =========================================================
   個人打刻アプリ風UI（強制上書き版）
========================================================= */

body.attendance-self-app,
body.attendance-self-noheader,
body.theme-bath.attendance-self-noheader.attendance-self-app {
  min-height: 100vh;
}

body.attendance-self-noheader .app-header,
body.attendance-self-noheader .page-header,
body.attendance-self-noheader .header-menu,
body.attendance-self-noheader .global-nav,
body.attendance-self-noheader .sidebar,
body.attendance-self-noheader header {
  display: none !important;
}

body.attendance-self-app main,
body.attendance-self-app .main-content,
body.attendance-self-app .page-content,
body.attendance-self-app .content-wrapper {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.attendance-self-app-shell {
  min-height: 100vh;
  width: 100%;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 16px !important;
  box-sizing: border-box;
}

.attendance-self-app-card {
  width: min(100%, 560px);
  min-height: calc(100vh - 32px);
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 18px;
  padding: 20px 16px 24px !important;
  box-sizing: border-box;
  margin: 0 auto !important;
}

.attendance-self-app-head {
  width: 100%;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  text-align: center !important;
  gap: 8px;
}

.attendance-self-app-date {
  font-size: 1rem;
  font-weight: 700;
  opacity: .9;
}

.attendance-self-app-title {
  margin: 0 !important;
  font-size: clamp(2rem, 5vw, 3rem) !important;
  line-height: 1.2;
  font-weight: 800;
  text-align: center;
}

.attendance-self-app-user {
  font-size: 1.15rem;
  font-weight: 700;
  text-align: center;
}

.attendance-self-app-notice {
  width: min(100%, 420px);
  margin: 0 auto !important;
}

.attendance-self-app-main {
  width: 100%;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 18px;
}

.attendance-self-app-form {
  width: 100%;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
}

button.attendance-self-big-circle,
.attendance-self-big-circle {
  width: min(78vw, 360px) !important;
  height: min(78vw, 360px) !important;
  min-width: 260px !important;
  min-height: 260px !important;
  max-width: 360px !important;
  max-height: 360px !important;
  aspect-ratio: 1 / 1 !important;
  border-radius: 50% !important;
  border: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 20px !important;
  margin: 0 auto !important;
  box-sizing: border-box !important;
  font-size: clamp(2rem, 5vw, 2.8rem) !important;
  font-weight: 800 !important;
  line-height: 1.15 !important;
  text-align: center !important;
  cursor: pointer;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .22) !important;
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
  appearance: none;
  -webkit-appearance: none;
}

button.attendance-self-big-circle:hover,
.attendance-self-big-circle:hover,
button.attendance-self-big-circle:focus,
.attendance-self-big-circle:focus {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 20px 46px rgba(0, 0, 0, .26) !important;
}

button.attendance-self-big-circle:active,
.attendance-self-big-circle:active {
  transform: scale(.98);
}

.attendance-self-big-circle__label {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100%;
  text-align: center !important;
}

.attendance-self-big-circle--clock_in {
  background: linear-gradient(180deg, #22c55e 0%, #16a34a 100%) !important;
  color: #fff !important;
}

.attendance-self-big-circle--break_start {
  background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%) !important;
  color: #fff !important;
}

.attendance-self-big-circle--break_end {
  background: linear-gradient(180deg, #0ea5e9 0%, #0284c7 100%) !important;
  color: #fff !important;
}

.attendance-self-big-circle--clock_out {
  background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%) !important;
  color: #fff !important;
}

.attendance-self-app-done {
  width: min(100%, 380px);
  padding: 24px 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, .08);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.attendance-self-app-done__badge {
  font-size: 1.2rem;
  font-weight: 800;
}

.attendance-self-app-done__text {
  font-size: 1rem;
  opacity: .92;
}

.attendance-self-app-times {
  width: min(100%, 460px);
}

.attendance-self-app-times__grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.attendance-self-app-time {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .08);
  display: flex !important;
  flex-direction: column !important;
  gap: 4px;
  text-align: center;
}

.attendance-self-app-time__label {
  font-size: .82rem;
  opacity: .8;
}

.attendance-self-app-time__value {
  font-size: 1.05rem;
  font-weight: 700;
}

.attendance-self-app-links {
  width: 100%;
  display: flex !important;
  justify-content: center !important;
}

.attendance-self-app-link-btn {
  width: min(100%, 260px) !important;
}

.attendance-personal-back {
  margin: 0 0 12px;
  display: flex;
  justify-content: flex-start;
}

@media (max-width: 480px) {
  .attendance-self-app-shell {
    padding: 10px !important;
  }

  .attendance-self-app-card {
    min-height: calc(100vh - 20px);
    padding: 14px 10px 20px !important;
  }

  button.attendance-self-big-circle,
  .attendance-self-big-circle {
    width: min(84vw, 330px) !important;
    height: min(84vw, 330px) !important;
    min-width: 240px !important;
    min-height: 240px !important;
    font-size: clamp(1.8rem, 7vw, 2.4rem) !important;
  }

  .attendance-self-app-times__grid {
    gap: 8px;
  }

  .attendance-self-app-time {
    padding: 10px 8px;
  }
}