/*
 * ホーム（ダッシュボード）の見た目（2026-10-25。App\Filament\Pages\Dashboard、resources/views/filament/pages/dashboard.blade.php）。
 * Filament のビルド済み CSS に無いクラスを使わないよう、ここで全部書く。ダークモードは html.dark。
 * 幅：PC（64rem 以上）は3列（小＝1/3、中＝2/3、大＝全幅。小＋中・小×3で1行がちょうど埋まる）、タブレット（40rem 以上）は2列（小＝1、中・大＝2）、スマホは1列。
 * 同じ行のカードは高さをそろえる（空いた隙間を作らない）。
 */

.tone-home { --tone-border: rgba(0, 0, 0, .08); --tone-muted: #6b7280; --tone-soft: #f9fafb; --tone-amber: #f59e0b; --tone-danger: #dc2626; --tone-warning: #b45309; display: flex; flex-direction: column; gap: 1rem; }
.dark .tone-home { --tone-border: rgba(255, 255, 255, .1); --tone-muted: #9ca3af; --tone-soft: rgba(255, 255, 255, .04); --tone-danger: #f87171; --tone-warning: #fbbf24; }

/* 見出し：ロゴ・あいさつ・時刻・ボタン */
.tone-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem 1.5rem; flex-wrap: wrap; }
.tone-head-left { display: flex; align-items: center; gap: 1rem; min-width: 0; }
.tone-head-text { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.tone-greeting { font-size: 1rem; font-weight: 600; }
.tone-date { font-size: .8rem; color: var(--tone-muted); }
.tone-head-right { display: flex; align-items: center; gap: .5rem 1rem; flex-wrap: wrap; justify-content: flex-end; }
.tone-clocks { display: flex; gap: .9rem; font-variant-numeric: tabular-nums; }
.tone-clock { display: flex; align-items: baseline; gap: .35rem; }
.tone-clock-label { font-size: .7rem; color: var(--tone-muted); }
.tone-clock-time { font-size: 1.1rem; font-weight: 700; }
.tone-tools { display: flex; gap: .4rem; flex-wrap: wrap; }
.tone-btn { display: inline-flex; align-items: center; gap: .3rem; font-size: .8rem; font-weight: 600; padding: .35rem .7rem; border-radius: .5rem; border: 1px solid var(--tone-border); background: transparent; color: inherit; cursor: pointer; white-space: nowrap; }
.tone-btn:hover { background: var(--tone-soft); }
.tone-btn-primary { background: var(--tone-amber); border-color: var(--tone-amber); color: #111827; }
.tone-btn-primary:hover { background: #d97706; }
.tone-btn svg { width: 1rem; height: 1rem; }

.tone-editbar { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; font-size: .8rem; padding: .55rem .8rem; border-radius: .6rem; background: rgba(245, 158, 11, .12); }

/* カードの並び */
.tone-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; align-items: stretch; }
@media (min-width: 40rem) { .tone-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tone-size-m, .tone-size-l { grid-column: span 2; } }
@media (min-width: 64rem) {
    .tone-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .tone-size-s { grid-column: span 1; } .tone-size-m { grid-column: span 2; } .tone-size-l { grid-column: span 3; }
}

/* カード */
.tone-card { border-radius: .75rem; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .05); border: 1px solid var(--tone-border); min-width: 0; display: flex; flex-direction: column; }
.dark .tone-card { background: #18181b; }
.tone-card-head { display: flex; align-items: center; gap: .5rem; padding: .7rem .9rem .5rem; }
.tone-card-title { font-size: .9rem; font-weight: 700; display: flex; align-items: center; gap: .4rem; min-width: 0; }
.tone-card-title svg { width: 1.05rem; height: 1.05rem; color: var(--tone-muted); flex: none; }
.tone-count { font-size: .75rem; font-weight: 700; padding: .05rem .45rem; border-radius: 9999px; background: var(--tone-soft); border: 1px solid var(--tone-border); font-variant-numeric: tabular-nums; }
.tone-count-alert { background: var(--tone-danger); border-color: var(--tone-danger); color: #fff; }
.tone-card-link { margin-left: auto; font-size: .75rem; color: var(--tone-muted); white-space: nowrap; text-decoration: none; }
.tone-card-link:hover { text-decoration: underline; color: inherit; }
.tone-card-body { padding: 0 .9rem .8rem; font-size: .85rem; }
.tone-summary { font-size: .75rem; color: var(--tone-muted); margin-bottom: .35rem; }
.tone-summary b { color: inherit; }
.tone-empty { font-size: .8rem; color: var(--tone-muted); padding: .25rem 0; }
.tone-error { font-size: .8rem; color: var(--tone-danger); }
.tone-more { font-size: .75rem; color: var(--tone-muted); padding-top: .3rem; }

/* 1行ずつ */
.tone-rows { list-style: none; margin: 0; padding: 0; }
.tone-row { display: flex; align-items: flex-start; gap: .5rem; padding: .4rem 0; border-top: 1px solid var(--tone-border); }
.tone-row:first-child { border-top: 0; }
.tone-row-main { min-width: 0; flex: 1; }
.tone-row-text { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; color: inherit; text-decoration: none; }
a.tone-row-text:hover { text-decoration: underline; }
.tone-row-sub { font-size: .72rem; color: var(--tone-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tone-row-meta { font-size: .75rem; color: var(--tone-muted); white-space: nowrap; text-align: right; flex: none; }
.tone-tone-danger .tone-row-meta, .tone-tone-danger .tone-row-text { color: var(--tone-danger); }
.tone-tone-warning .tone-row-meta { color: var(--tone-warning); font-weight: 600; }
.tone-tone-up .tone-row-meta { color: var(--tone-danger); }
.tone-tone-down .tone-row-meta { color: #2563eb; }
.dark .tone-tone-down .tone-row-meta { color: #60a5fa; }
.tone-subhead { font-size: .72rem; font-weight: 700; color: var(--tone-muted); margin: .5rem 0 .1rem; }

.tone-done { flex: none; font-size: .72rem; padding: .15rem .45rem; border-radius: .35rem; border: 1px solid var(--tone-border); background: transparent; color: inherit; cursor: pointer; }
.tone-done:hover { background: var(--tone-soft); }

/* チャット：数を大きく */
.tone-bignums { display: flex; gap: 1.25rem; margin: .1rem 0 .4rem; }
.tone-bignum { display: flex; flex-direction: column; }
.tone-bignum b { font-size: 1.6rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tone-bignum span { font-size: .72rem; color: var(--tone-muted); }
.tone-bignum-alert b { color: var(--tone-danger); }

/* お知らせ */
.tone-notice { padding: .45rem 0; border-top: 1px solid var(--tone-border); }
.tone-notice:first-child { border-top: 0; }
.tone-notice-title { font-weight: 700; display: flex; align-items: center; gap: .35rem; }
.tone-notice-important .tone-notice-title { color: var(--tone-danger); }
.tone-notice-body { font-size: .8rem; white-space: pre-line; margin-top: .15rem; }
.tone-notice-meta { font-size: .7rem; color: var(--tone-muted); margin-top: .15rem; }

/* よく使う画面 */
.tone-shortcuts { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: .5rem; }
.tone-shortcut { display: flex; align-items: center; gap: .5rem; padding: .6rem .7rem; border-radius: .6rem; border: 1px solid var(--tone-border); background: var(--tone-soft); color: inherit; text-decoration: none; font-weight: 600; font-size: .82rem; }
.tone-shortcut:hover { border-color: var(--tone-amber); }
.tone-shortcut svg { width: 1.15rem; height: 1.15rem; color: var(--tone-amber); flex: none; }

/* 休日 */
.tone-region { flex: none; font-size: .68rem; font-weight: 700; padding: .05rem .35rem; border-radius: .3rem; margin-top: .1rem; }
.tone-region-CN { background: rgba(220, 38, 38, .12); color: #b91c1c; }
.tone-region-HK { background: rgba(37, 99, 235, .12); color: #1d4ed8; }
.dark .tone-region-CN { color: #fca5a5; } .dark .tone-region-HK { color: #93c5fd; }
.tone-tone-workday .tone-row-text::after { content: '（出勤日）'; font-weight: 400; font-size: .72rem; color: var(--tone-warning); }
.tone-soon .tone-row-meta { font-weight: 700; color: inherit; }
.tone-note { font-size: .72rem; color: var(--tone-warning); margin-top: .3rem; }

/* 並べ替えの最中 */
.tone-editing .tone-card { outline: 2px dashed rgba(245, 158, 11, .5); outline-offset: -2px; }
.tone-card.is-hidden { opacity: .45; }
.tone-edit-tools { display: flex; align-items: center; gap: .35rem; margin-left: auto; }
.tone-handle { cursor: grab; display: inline-flex; padding: .15rem; border-radius: .3rem; color: var(--tone-muted); }
.tone-handle:active { cursor: grabbing; }
.tone-handle svg { width: 1.1rem; height: 1.1rem; }
.tone-seg { display: inline-flex; border: 1px solid var(--tone-border); border-radius: .4rem; overflow: hidden; }
.tone-seg button { font-size: .7rem; padding: .15rem .45rem; background: transparent; color: inherit; border: 0; cursor: pointer; }
.tone-seg button + button { border-left: 1px solid var(--tone-border); }
.tone-seg button.is-on { background: var(--tone-amber); color: #111827; font-weight: 700; }
.tone-eye { display: inline-flex; align-items: center; gap: .2rem; font-size: .7rem; padding: .15rem .45rem; border-radius: .4rem; border: 1px solid var(--tone-border); background: transparent; color: inherit; cursor: pointer; }
.tone-eye svg { width: .95rem; height: .95rem; }
.tone-edit-note { font-size: .75rem; color: var(--tone-muted); }
.tone-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: .25rem .75rem; margin-top: .5rem; }
.tone-checks label { display: flex; align-items: center; gap: .35rem; font-size: .8rem; cursor: pointer; }
.fi-sortable-ghost.tone-card { opacity: .3; }

@media (max-width: 39.99rem) {
    .tone-head-right { justify-content: flex-start; }
    .tone-edit-tools { flex-wrap: wrap; justify-content: flex-end; }
}

/* ホームのカレンダー（今日から1週間。2026-10-25） */
.tone-agenda { display: flex; flex-direction: column; gap: .5rem; max-height: 18rem; overflow-y: auto; }
.tone-days { display: inline-flex; margin: .1rem 0 .4rem; border-radius: .45rem; overflow: hidden; box-shadow: 0 0 0 1px rgba(127,127,127,.4) inset; }
.tone-days button { border: 0; background: transparent; color: inherit; font-size: .72rem; padding: .22rem .6rem; cursor: pointer; opacity: .75; }
.tone-days button + button { border-left: 1px solid rgba(127,127,127,.35); }
.tone-days button:hover { background: rgba(127,127,127,.15); opacity: 1; }
.tone-days button.is-on { background: rgba(245,158,11,.28); opacity: 1; font-weight: 700; }
.tone-agenda-date { font-size: .75rem; font-weight: 700; color: var(--tone-muted); margin-bottom: .15rem; }
.tone-agenda-date.is-today { color: var(--tone-amber); }
.tone-agenda-item { display: flex; align-items: center; gap: .45rem; padding: .2rem 0; min-width: 0; }
.tone-agenda-bar { width: .25rem; align-self: stretch; border-radius: .2rem; flex: none; }
.tone-agenda-time { font-size: .75rem; color: var(--tone-muted); width: 2.6rem; flex: none; font-variant-numeric: tabular-nums; }
.tone-agenda-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: inherit; text-decoration: none; min-width: 0; }
a.tone-agenda-title:hover { text-decoration: underline; }
.tone-agenda-item.is-done .tone-agenda-title { text-decoration: line-through; opacity: .5; }
