/* ==========================================================================
   EZY Portal 2026 — Shared Custom CSS
   Tailwind CDN handles utility classes. This file handles custom properties,
   animations, and components that can't be expressed as Tailwind utilities.
   ========================================================================== */

:root {
  --hue: 210;
}

body {
  letter-spacing: 0.02em;
  line-height: 1.8;
}

h1, h2, h3 {
  letter-spacing: 0.04em;
}

/* Smooth transitions on all elements */
* {
  transition-property: background-color, border-color, color;
  transition-duration: 0.15s;
  transition-timing-function: ease;
}

/* Focus visible outline */
*:focus-visible {
  outline: 2px solid hsl(210 70% 55%);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Error states ---------- */
.error-message {
  color: rgb(225 29 72);
  font-size: 0.8125rem;
  margin-top: 0.25rem;
  display: none;
}
.error-message.visible {
  display: block;
}
.input-error {
  border-color: rgb(225 29 72) !important;
}

/* ---------- Spinner ---------- */
@keyframes spin {
  to { transform: rotate(360deg); }
}
.spinner {
  animation: spin 0.7s linear infinite;
}

/* ---------- Login decorative circles ---------- */
.deco-circle {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.08);
}

/* ---------- Skip link (a11y) ---------- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 100;
  padding: 0.5rem 1rem;
  background: hsl(210 65% 45%);
  color: white;
  border-radius: 0 0 0.5rem 0.5rem;
  font-weight: 600;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 0;
}

/* ---------- Sidebar ---------- */
.sidebar {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
@media (max-width: 1279px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
}

/* ---------- Status pulse ---------- */
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.status-pulse {
  animation: pulse-dot 2s ease-in-out infinite;
}

/* ---------- Donut progress ring ---------- */
.donut-ring {
  transition: stroke-dashoffset 0.6s ease;
}

/* ---------- Order table → card (mobile) ---------- */
@media (max-width: 639px) {
  .order-table { table-layout: fixed; }
  .order-table thead { display: none; }
  .order-table tbody { display: block; }
  .order-table tbody tr {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.125rem 0.5rem;
    padding: 0.625rem 1rem;
    border-bottom: 1px solid hsl(210 10% 92%);
  }
  .dark .order-table tbody tr { border-color: hsl(210 10% 22%); }
  .order-table tbody td {
    display: block;
    padding: 0;
    border: none;
    font-size: 0.8125rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .order-table tbody td.col-fy { grid-column: 1; font-weight: 600; }
  .order-table tbody td.col-form { grid-column: 2; text-align: right; }
  .order-table tbody td.col-status { grid-column: 1; }
  .order-table tbody td.col-date { grid-column: 2; text-align: right; color: hsl(210 10% 55%); }
  .order-table tbody td.col-action { grid-column: 1 / -1; margin-top: 0.25rem; }
}

/* ---------- Scrollbar hide ---------- */
.scrollbar-hide::-webkit-scrollbar { display: none; }

/* ---------- AI FAB pulse ---------- */
@keyframes fab-pulse {
  0%, 100% { box-shadow: 0 4px 6px -1px rgba(0,0,0,.1), 0 0 0 0 hsla(var(--hue) 80% 55% / .4); }
  50% { box-shadow: 0 4px 6px -1px rgba(0,0,0,.1), 0 0 0 8px hsla(var(--hue) 80% 55% / 0); }
}
.ai-fab-pulse { animation: fab-pulse 2s ease-in-out infinite; }
.ai-pod-mobile { transform: translateY(100%); transition: transform .3s ease; }
.ai-pod-mobile.open { transform: translateY(0); }

/* ---------- Timeline ---------- */
.timeline-item { position: relative; padding-left: 2rem; }
.timeline-item::before {
  content: '';
  position: absolute;
  left: 0.4375rem;
  top: 1.5rem;
  bottom: -0.75rem;
  width: 2px;
  background: hsl(210 20% 90%);
}
.dark .timeline-item::before { background: hsl(210 10% 25%); }
.timeline-item:last-child::before { display: none; }
.timeline-dot {
  position: absolute;
  left: 0;
  top: 0.375rem;
  width: 1rem;
  height: 1rem;
  border-radius: 9999px;
  border: 2px solid hsl(210 65% 45%);
  background: white;
}
.dark .timeline-dot { background: hsl(210 15% 12%); border-color: hsl(210 65% 50%); }

/* ---------- Card link hover ---------- */
.card-link {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.card-link:active {
  transform: translateY(0);
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .sidebar { transition: none; }
  .status-pulse { animation: none; }
  .ai-fab-pulse { animation: none; }
  .spinner { animation: none; }
}

/* ==========================================================================
   Bootstrap Compatibility Layer
   Allows existing Livewire component views to render correctly without
   Bootstrap CSS. Only covers classes actually used in this project.
   DO NOT add Bootstrap classes here speculatively — add only what's needed.
   ========================================================================== */

/* ---------- Grid ---------- */
.row {
  display: flex;
  flex-wrap: wrap;
  margin-left: -0.5rem;
  margin-right: -0.5rem;
}
.row > * { box-sizing: border-box; padding-left: 0.5rem; padding-right: 0.5rem; }
.col-1  { width: 8.333%; }
.col-2  { width: 16.666%; }
.col-3  { width: 25%; }
.col-4  { width: 33.333%; }
.col-5  { width: 41.666%; }
.col-6  { width: 50%; }
.col-7  { width: 58.333%; }
.col-8  { width: 66.666%; }
.col-9  { width: 75%; }
.col-10 { width: 83.333%; }
.col-11 { width: 91.666%; }
.col-12 { width: 100%; }
@media (min-width: 768px) {
  .col-md-6  { width: 50%; }
  .col-md-12 { width: 100%; }
}
@media (min-width: 992px) {
  .col-lg-3  { width: 25%; }
  .col-lg-4  { width: 33.333%; }
  .col-lg-6  { width: 50%; }
  .col-lg-8  { width: 66.666%; }
  .col-lg-9  { width: 75%; }
  .col-lg-12 { width: 100%; }
  .d-lg-flex  { display: flex !important; }
  .d-lg-block { display: block !important; }
  .d-lg-none  { display: none !important; }
}

/* ---------- Display utilities ---------- */
.d-flex   { display: flex !important; }
.d-block  { display: block !important; }
.d-inline { display: inline !important; }
.d-none   { display: none !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-center  { justify-content: center !important; }
.justify-content-end     { justify-content: flex-end !important; }
.align-items-center { align-items: center !important; }
.align-items-start  { align-items: flex-start !important; }
.text-right  { text-align: right !important; }
.text-center { text-align: center !important; }
.text-left   { text-align: left !important; }
.font-weight-bold   { font-weight: 700 !important; }
.font-weight-normal { font-weight: 400 !important; }

/* ---------- Custom spacing (theme-specific px-based) ---------- */
.mr-5  { margin-right: 0.3125rem !important; }
.ml-5  { margin-left:  0.3125rem !important; }
.mr-10 { margin-right: 0.625rem !important; }
.ml-10 { margin-left:  0.625rem !important; }
.mt-10 { margin-top:    0.625rem !important; }
.mb-10 { margin-bottom: 0.625rem !important; }
.mt-15 { margin-top:    0.9375rem !important; }
.mb-15 { margin-bottom: 0.9375rem !important; }
.mt-20 { margin-top:    1.25rem !important; }
.mb-20 { margin-bottom: 1.25rem !important; }
.mb-30 { margin-bottom: 1.875rem !important; }

/* ---------- Text color utilities ---------- */
.text-danger  { color: rgb(220 38 38) !important; }
.text-success { color: rgb(16 185 129) !important; }
.text-warning { color: rgb(245 158 11) !important; }
.text-muted   { color: rgb(100 116 139) !important; }
.dark .text-muted { color: rgb(148 163 184) !important; }

/* ---------- Form controls ---------- */
.form-group { margin-bottom: 1rem; }
.form-group:last-child { margin-bottom: 0; }

.form-control {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: rgb(30 41 59);
  background: white;
  border: 1px solid rgb(203 213 225);
  border-radius: 0.5rem;
  appearance: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-control:focus {
  outline: none;
  border-color: hsl(var(--hue) 65% 55%);
  box-shadow: 0 0 0 3px hsl(var(--hue) 65% 55% / 0.2);
}
.dark .form-control {
  color: rgb(226 232 240);
  background: rgb(15 23 42);
  border-color: rgb(51 65 85);
}
.dark .form-control:focus {
  border-color: hsl(var(--hue) 65% 55%);
}
/* Safari セレクト潰れ (R-13 再修正): 前回の min-height だけでは native 描画の
   内在高さ縮みが解消しなかったため、native スタイルをリセットして再定義する
   (appearance: none + SVG 矢印での再描画 — レビュー指摘の提示解法)。
   - 全 select 一括適用 (個別クラスへの手当てはしない)。multiple / size 付きの
     リストボックスは appearance none で崩れるため native のまま除外
   - appearance を消すと矢印も消えるため、SVG background で再描画する。
     utility クラスの背景色 (bg-*) は background-color のみのため共存できる
   - padding-right は矢印スペースの確保 (attribute セレクタ 2 つ分の詳細度で
     utility の px-* より優先される) */
select:not([multiple]):not([size]) {
    -webkit-appearance: none;
    appearance: none;
    min-height: 2.5rem;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-position: right 0.625rem center;
    background-repeat: no-repeat;
    background-size: 1.25rem 1.25rem;
    padding-right: 2.25rem;
}
/* ダークモード (現在は無効化中・将来復活時のための追従): 矢印を明色にする */
.dark select:not([multiple]):not([size]) {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%239ca3af' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
}
/* リストボックス型は native 描画のまま高さだけ防御する */
select[multiple], select[size] { min-height: 2.5rem; }
textarea.form-control { resize: vertical; min-height: 6rem; }

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.375rem;
  color: rgb(51 65 85);
}
.dark .form-label { color: rgb(203 213 225); }

/* ---------- Custom radio / checkbox ---------- */
.custom-control {
  position: relative;
  display: block;
  padding-left: 1.75rem;
  margin-bottom: 0.5rem;
  cursor: pointer;
}
.custom-control-inline {
  display: inline-flex;
  align-items: center;
  margin-right: 1.25rem;
  margin-bottom: 0;
}
.custom-control-input {
  position: absolute;
  left: 0;
  top: 0.2rem;
  width: 1.125rem;
  height: 1.125rem;
  opacity: 0;
  z-index: 1;
  cursor: pointer;
  margin: 0;
}
.custom-control-label {
  font-size: 0.9375rem;
  cursor: pointer;
  position: relative;
  padding-left: 0;
  color: rgb(30 41 59);
}
.dark .custom-control-label { color: rgb(226 232 240); }
.custom-control-label::before {
  content: '';
  position: absolute;
  left: -1.75rem;
  top: 0.2rem;
  width: 1.125rem;
  height: 1.125rem;
  background: white;
  border: 2px solid rgb(203 213 225);
  border-radius: 0.25rem;
  transition: background 0.15s, border-color 0.15s;
}
.custom-radio .custom-control-label::before { border-radius: 50%; }
.dark .custom-control-label::before { background: rgb(30 41 59); border-color: rgb(71 85 105); }
.custom-control-input:checked ~ .custom-control-label::before {
  background: hsl(var(--hue) 65% 45%);
  border-color: hsl(var(--hue) 65% 45%);
}
.custom-control-label::after {
  content: '';
  position: absolute;
  left: -1.375rem;
  top: 0.45rem;
  width: 0.375rem;
  height: 0.625rem;
  border: 2px solid white;
  border-top: none;
  border-left: none;
  transform: rotate(45deg) scaleY(0);
  transition: transform 0.1s;
}
.custom-radio .custom-control-label::after {
  left: -1.3125rem;
  top: 0.45rem;
  width: 0.375rem;
  height: 0.375rem;
  border: none;
  border-radius: 50%;
  background: white;
  transform: scale(0);
  transition: transform 0.1s;
}
.custom-control-input:checked ~ .custom-control-label::after {
  transform: rotate(45deg) scaleY(1);
}
.custom-radio .custom-control-input:checked ~ .custom-control-label::after {
  transform: scale(1);
}

/* ---------- Custom file input ---------- */
.custom-file { position: relative; display: block; width: 100%; }
.custom-file-input { position: relative; z-index: 2; width: 100%; opacity: 0; height: 2.5rem; }
.custom-file-label {
  position: absolute;
  top: 0; left: 0; right: 0;
  padding: 0.5rem 0.75rem;
  font-size: 0.9375rem;
  background: white;
  border: 1px solid rgb(203 213 225);
  border-radius: 0.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: rgb(100 116 139);
}
.dark .custom-file-label { background: rgb(15 23 42); border-color: rgb(51 65 85); color: rgb(148 163 184); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.5rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.5;
  border-radius: 0.5rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-sm { padding: 0.3125rem 0.75rem; font-size: 0.8125rem; border-radius: 0.375rem; }
.btn-rounded { border-radius: 9999px; }
.btn-block { display: flex; width: 100%; }

.btn-primary {
  background: hsl(var(--hue) 65% 45%);
  color: white;
  border-color: hsl(var(--hue) 65% 45%);
}
.btn-primary:hover:not(:disabled) {
  background: hsl(var(--hue) 65% 38%);
  border-color: hsl(var(--hue) 65% 38%);
  color: white;
}
.btn-secondary, .btn-alt-secondary {
  background: rgb(241 245 249);
  color: rgb(51 65 85);
  border-color: rgb(226 232 240);
}
.btn-secondary:hover:not(:disabled), .btn-alt-secondary:hover:not(:disabled) {
  background: rgb(226 232 240);
  color: rgb(30 41 59);
}
.dark .btn-secondary, .dark .btn-alt-secondary {
  background: rgb(51 65 85);
  color: rgb(226 232 240);
  border-color: rgb(71 85 105);
}
.dark .btn-secondary:hover:not(:disabled), .dark .btn-alt-secondary:hover:not(:disabled) {
  background: rgb(71 85 105);
}
.btn-warning {
  background: rgb(245 158 11);
  color: white;
  border-color: rgb(245 158 11);
}
.btn-warning:hover:not(:disabled) { background: rgb(217 119 6); border-color: rgb(217 119 6); color: white; }
.btn-danger {
  background: rgb(239 68 68);
  color: white;
  border-color: rgb(239 68 68);
}
.btn-danger:hover:not(:disabled) { background: rgb(220 38 38); border-color: rgb(220 38 38); color: white; }
.btn-success {
  background: rgb(16 185 129);
  color: white;
  border-color: rgb(16 185 129);
}
.btn-success:hover:not(:disabled) { background: rgb(5 150 105); border-color: rgb(5 150 105); color: white; }
.btn-outline-primary {
  background: transparent;
  color: hsl(var(--hue) 65% 45%);
  border-color: hsl(var(--hue) 65% 45%);
}
.btn-outline-primary:hover:not(:disabled) {
  background: hsl(var(--hue) 65% 45%);
  color: white;
}
.btn-outline-danger {
  background: transparent;
  color: rgb(239 68 68);
  border-color: rgb(239 68 68);
}
.btn-outline-danger:hover:not(:disabled) { background: rgb(239 68 68); color: white; }

/* ---------- Alerts ---------- */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  margin-bottom: 1rem;
  border: 1px solid transparent;
}
.alert-danger {
  background: rgb(254 242 242);
  color: rgb(185 28 28);
  border-color: rgb(254 202 202);
}
.alert-success {
  background: rgb(236 253 245);
  color: rgb(6 95 70);
  border-color: rgb(167 243 208);
}
.alert-warning {
  background: rgb(255 251 235);
  color: rgb(146 64 14);
  border-color: rgb(253 230 138);
}
.alert-info {
  background: rgb(239 246 255);
  color: rgb(29 78 216);
  border-color: rgb(191 219 254);
}
.dark .alert-danger  { background: rgb(127 29 29 / 0.3); color: rgb(252 165 165); border-color: rgb(127 29 29 / 0.6); }
.dark .alert-success { background: rgb(6 78 59 / 0.3); color: rgb(110 231 183); border-color: rgb(6 78 59 / 0.6); }
.dark .alert-warning { background: rgb(120 53 15 / 0.3); color: rgb(253 230 138); border-color: rgb(120 53 15 / 0.6); }

/* ---------- Tables ---------- */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}
.table th,
.table td {
  padding: 0.625rem 0.75rem;
  border-bottom: 1px solid rgb(226 232 240);
  text-align: left;
  vertical-align: top;
}
.table thead th {
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgb(100 116 139);
  background: rgb(248 250 252);
  border-bottom: 2px solid rgb(226 232 240);
}
.table tbody tr:last-child td { border-bottom: none; }
.table-hover tbody tr:hover { background: rgb(248 250 252); }
.table-bordered th, .table-bordered td { border: 1px solid rgb(226 232 240); }
.dark .table th, .dark .table td  { border-color: rgb(51 65 85); color: rgb(226 232 240); }
.dark .table thead th { background: rgb(15 23 42); color: rgb(148 163 184); border-bottom-color: rgb(51 65 85); }
.dark .table-hover tbody tr:hover { background: rgb(30 41 59); }
.dark .table-bordered th, .dark .table-bordered td { border-color: rgb(51 65 85); }

/* confirm-table: 2-column definition table */
.confirm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}
.confirm-table th,
.confirm-table td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid rgb(241 245 249);
  vertical-align: top;
}
.confirm-table th {
  font-weight: 500;
  color: rgb(100 116 139);
  width: 40%;
  min-width: 8rem;
  white-space: nowrap;
}
.confirm-table tbody tr:last-child th,
.confirm-table tbody tr:last-child td { border-bottom: none; }
.dark .confirm-table th, .dark .confirm-table td { border-color: rgb(51 65 85); }
.dark .confirm-table th { color: rgb(148 163 184); }

/* child-table: nested data tables */
.child-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; margin-top: 0.5rem; }
.child-table th, .child-table td { padding: 0.4375rem 0.625rem; border: 1px solid rgb(226 232 240); }
.child-table thead th { background: rgb(248 250 252); font-weight: 600; color: rgb(100 116 139); }
.dark .child-table th, .dark .child-table td { border-color: rgb(51 65 85); }
.dark .child-table thead th { background: rgb(15 23 42); color: rgb(148 163 184); }

/* ---------- Nav tabs (form section navigation) ---------- */
.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.125rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.nav-tabs {
  border-bottom: 2px solid rgb(226 232 240);
  margin-bottom: 1.25rem;
  gap: 0;
}
.dark .nav-tabs { border-color: rgb(51 65 85); }
.nav-item { flex-shrink: 0; }
.nav-link {
  display: block;
  padding: 0.5625rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgb(100 116 139);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  text-decoration: none;
  white-space: nowrap;
  border-radius: 0.375rem 0.375rem 0 0;
  transition: color 0.15s, border-color 0.15s;
}
.nav-link:hover { color: hsl(var(--hue) 65% 45%); background: hsl(var(--hue) 80% 97%); }
.nav-link.active {
  color: hsl(var(--hue) 65% 45%);
  border-bottom-color: hsl(var(--hue) 65% 45%);
  font-weight: 600;
}
.dark .nav-link { color: rgb(148 163 184); }
.dark .nav-link:hover { background: hsl(var(--hue) 20% 15%); color: rgb(226 232 240); }
.dark .nav-link.active { color: hsl(var(--hue) 65% 60%); border-bottom-color: hsl(var(--hue) 65% 60%); }

/* ---------- Modal (Livewire $showModal controlled) ---------- */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1050;
  overflow-y: auto;
  padding: 2rem 1rem;
  background: rgba(15 23 42 / 0.7);
  backdrop-filter: blur(3px);
}
/* Livewire togles display:block via @if($showModal) style="display:block;" */
.modal[style*="display:block"],
.modal[style*="display: block"] {
  display: flex !important;
  align-items: flex-start;
  justify-content: center;
}
.modal__bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  cursor: pointer;
}
.modal-dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 38rem;
  margin: 0 auto;
  background: white;
  border-radius: 0.75rem;
  box-shadow: 0 25px 50px -12px rgba(0 0 0 / 0.4);
  overflow: hidden;
}
.dark .modal-dialog { background: rgb(30 41 59); }
.modal-dialog-lg { max-width: 52rem; }
.modal-content { display: flex; flex-direction: column; }
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgb(226 232 240);
}
.dark .modal-header { border-color: rgb(51 65 85); }
.modal-title {
  font-size: 1rem;
  font-weight: 600;
  color: rgb(15 23 42);
  margin: 0;
}
.dark .modal-title { color: rgb(248 250 252); }
.modal-body { padding: 1.25rem; flex: 1; }
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.875rem 1.25rem;
  border-top: 1px solid rgb(226 232 240);
}
.dark .modal-footer { border-color: rgb(51 65 85); }
.close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 0.25rem 0.375rem;
  font-size: 1.375rem;
  line-height: 1;
  color: rgb(148 163 184);
  border-radius: 0.375rem;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.close:hover { color: rgb(51 65 85); background: rgb(241 245 249); }
.dark .close:hover { color: rgb(226 232 240); background: rgb(51 65 85); }

/* ---------- Project custom block components ---------- */
.frame-layout {
  max-width: 52rem;
  margin: 0 auto;
}

/* NOTE: .block collides with Tailwind's "block" (display:block).
   Scope to elements that have block-header or block-content children. */
.block:has(.block-header),
.block:has(.block-content) {
  background: white;
  border: 1px solid rgb(226 232 240);
  border-radius: 0.75rem;
  overflow: hidden;
  margin-bottom: 1.25rem;
}
.dark .block:has(.block-header),
.dark .block:has(.block-content) { background: rgb(30 41 59); border-color: rgb(51 65 85); }

.block-header {
  display: flex;
  align-items: center;
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid rgb(226 232 240);
}
.dark .block-header { border-color: rgb(51 65 85); }
.block-header-default { background: rgb(248 250 252); }
.dark .block-header-default { background: rgb(15 23 42 / 0.6); }

.block-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: rgb(30 41 59);
  margin: 0;
}
.dark .block-title { color: rgb(226 232 240); }

.block-content { padding: 1.25rem; }

.inner-block {
  border: 1px solid rgb(226 232 240);
  border-radius: 0.5rem;
  padding: 1rem;
  margin-bottom: 0.875rem;
  background: rgb(250 252 255);
}
.dark .inner-block { border-color: rgb(51 65 85); background: rgb(15 23 42 / 0.4); }

.confirm-block { margin-bottom: 1rem; }

.label-title {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: rgb(100 116 139);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
}
.dark .label-title { color: rgb(148 163 184); }

/* btn-colmun: prev/next navigation wrapper */
.btn-colmun { margin-top: 0.5rem; }
.btn-colmun .block-content { padding: 1rem 1.25rem; }

/* Back button */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgb(100 116 139);
  border: 1px solid rgb(226 232 240);
  border-radius: 0.5rem;
  text-decoration: none;
  background: white;
  transition: all 0.15s;
}
.back-btn:hover {
  color: rgb(51 65 85);
  border-color: rgb(148 163 184);
  background: rgb(248 250 252);
}
.dark .back-btn {
  background: rgb(30 41 59);
  color: rgb(148 163 184);
  border-color: rgb(51 65 85);
}
.dark .back-btn:hover { color: rgb(226 232 240); background: rgb(51 65 85); }

/* Primary action links (top-right header buttons) */
.primary-ex-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  background: hsl(var(--hue) 65% 45%);
  color: white;
  border-radius: 0.5rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.15s;
}
.primary-ex-btn:hover { background: hsl(var(--hue) 65% 38%); color: white; }
.primary-ex-btn-wide { display: flex; width: 100%; justify-content: center; }

/* Remove item button (inline danger) */
.remove_btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.3125rem 0.625rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgb(220 38 38);
  border: 1px solid rgb(220 38 38);
  border-radius: 0.375rem;
  background: transparent;
  cursor: pointer;
  transition: all 0.15s;
}
.remove_btn:hover { background: rgb(220 38 38); color: white; }

/* ---------- User management detail layout ---------- */
.user-mng-detail-item {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.4375rem 0;
  border-bottom: 1px solid rgb(241 245 249);
}
.user-mng-detail-item:last-child { border-bottom: none; }
.dark .user-mng-detail-item { border-color: rgb(51 65 85); }

.detail-item-title {
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgb(100 116 139);
  min-width: 9rem;
  flex-shrink: 0;
}
.detail-item-text {
  font-size: 0.9375rem;
  color: rgb(30 41 59);
}
.dark .detail-item-title { color: rgb(148 163 184); }
.dark .detail-item-text  { color: rgb(226 232 240); }

/* ---------- Notice / info content ---------- */
.notice-content {
  background: rgb(239 246 255);
  border: 1px solid rgb(191 219 254);
  border-radius: 0.5rem;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}
.dark .notice-content { background: rgb(30 58 138 / 0.2); border-color: rgb(30 64 175 / 0.4); }
.notice-content-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: rgb(29 78 216);
  margin: 0 0 0.375rem;
}
.notice-content-text {
  font-size: 0.875rem;
  color: rgb(30 64 175);
  margin: 0.25rem 0 0;
}
.dark .notice-content-title { color: hsl(var(--hue) 65% 65%); }
.dark .notice-content-text  { color: hsl(var(--hue) 50% 55%); }

/* ---------- Expense title heading ---------- */
.expense-title {
  font-size: 1rem;
  font-weight: 600;
  color: rgb(30 41 59);
  margin: 0 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgb(226 232 240);
}
.dark .expense-title { color: rgb(226 232 240); border-color: rgb(51 65 85); }

/* ---------- Input group (Bootstrap compat) ---------- */
.input-group {
  display: flex;
  align-items: stretch;
}
.input-group .form-control {
  flex: 1;
  border-radius: 0.5rem 0 0 0.5rem;
}
.input-group-append { display: flex; }
.input-group-append .btn { border-radius: 0 0.5rem 0.5rem 0; }
.input-group-text {
  display: flex;
  align-items: center;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: rgb(100 116 139);
  background: rgb(248 250 252);
  border: 1px solid rgb(203 213 225);
  border-left: none;
  border-radius: 0 0.5rem 0.5rem 0;
}

/* ---------- Badge ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.1875rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 9999px;
  line-height: 1;
}
.badge-primary { background: hsl(var(--hue) 65% 45%); color: white; }
.badge-success { background: rgb(16 185 129); color: white; }
.badge-danger  { background: rgb(239 68 68); color: white; }
.badge-warning { background: rgb(245 158 11); color: white; }
.badge-secondary { background: rgb(100 116 139); color: white; }

/* ---------- Pagination (Bootstrap compat) ---------- */
.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}
.page-item .page-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.5rem;
  font-size: 0.875rem;
  color: rgb(100 116 139);
  border: 1px solid rgb(226 232 240);
  border-radius: 0.375rem;
  text-decoration: none;
  transition: all 0.15s;
}
.page-item.active .page-link {
  background: hsl(var(--hue) 65% 45%);
  color: white;
  border-color: hsl(var(--hue) 65% 45%);
}
.page-item.disabled .page-link { opacity: 0.4; cursor: not-allowed; }
.page-item .page-link:hover:not(.page-item.disabled .page-link) {
  background: rgb(241 245 249);
  color: rgb(30 41 59);
}
.dark .page-item .page-link {
  color: rgb(148 163 184);
  border-color: rgb(51 65 85);
  background: transparent;
}
.dark .page-item.active .page-link { background: hsl(var(--hue) 65% 45%); color: white; }
.dark .page-item .page-link:hover { background: rgb(51 65 85); }

/* ============================================================
   PAGE-INDEX-TABLE-BLOCK / DASHBOARD USER-MANAGEMENT STYLES
   ============================================================ */

/* Card container */
.card-content {
  background: #fff;
  border-radius: 0.75rem;
  border: 1px solid rgb(226 232 240);
  box-shadow: 0 1px 3px 0 rgba(0,0,0,.06);
  overflow: hidden;
  margin-bottom: 1.5rem;
}
.dark .card-content { background: rgb(30 41 59); border-color: rgb(51 65 85); }

.card-content-with-header { padding: 0; }

/* User management header (type 2 - used in page-index-table-block) */
.user-mng-header2 {
  background: hsl(var(--hue) 65% 45%);
  color: #fff;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem 0.75rem 0 0;
}
.user-mng-header2-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.user-mng-header2-item-left { flex: 1; min-width: 0; }
.user-mng-header2-name { font-weight: 700; font-size: 1rem; }
.user-mng-header2-tfn { font-size: 0.75rem; opacity: 0.85; margin-top: 0.125rem; }
.user-mng-header2-divider { width: 1px; height: 2rem; background: rgba(255,255,255,0.3); flex-shrink: 0; }
.user-mng-header2-item-btn { display: flex; gap: 0.5rem; flex-shrink: 0; }

/* User management header (type 1 - used in user-management-block) */
.user-mng-header {
  background: hsl(var(--hue) 65% 45%);
  color: #fff;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem 0.75rem 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.user-mng-header-name { font-weight: 700; font-size: 1rem; }
.user-mng-header-tfn { font-size: 0.75rem; opacity: 0.85; }
.user-mng-header-btn { display: flex; gap: 0.5rem; }

/* Column header (user-management-block table header) */
.column-header {
  display: flex;
  align-items: center;
  padding: 0.5rem 1rem;
  background: rgb(248 250 252);
  border-bottom: 1px solid rgb(226 232 240);
  font-size: 0.75rem;
  font-weight: 600;
  color: rgb(100 116 139);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.dark .column-header { background: rgb(15 23 42); border-color: rgb(51 65 85); color: rgb(100 116 139); }
.column-header-title { flex: 2; }
.column-header-email { flex: 2; }
.column-header-count { flex: 1; text-align: center; }

/* User management block (form list container) */
.user-mng-block { padding: 1rem; }
.user-mng-detail { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; padding: 0.5rem 1rem; font-size: 0.8rem; color: rgb(100 116 139); border-bottom: 1px solid rgb(241 245 249); }
.dark .user-mng-detail { border-color: rgb(51 65 85); color: rgb(100 116 139); }
.user-mng-detail-item { display: flex; gap: 0.25rem; }
.wrap-block { width: 100%; height: 0; }

/* Dashboard form list */
.dashboard-form-list { display: flex; flex-direction: column; gap: 0.5rem; }
.dashboard-form-list-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  border: 1px solid rgb(226 232 240);
  border-radius: 0.5rem;
  background: rgb(248 250 252);
  flex-wrap: wrap;
}
.dark .dashboard-form-list-item { background: rgb(15 23 42); border-color: rgb(51 65 85); }
.dashboard-form-list-item-left { display: flex; align-items: center; gap: 0.5rem; flex: 1; min-width: 0; }

/* List item components */
.list-item-badge { flex-shrink: 0; }
.list-item-detail { display: flex; flex-direction: column; gap: 0.125rem; min-width: 0; flex: 1; }
.list-item-detail.wide-detail { flex: 2; }
.submitted-date { font-size: 0.75rem; color: rgb(148 163 184); }
.fiscal-year { font-size: 0.8rem; font-weight: 600; color: rgb(51 65 85); }
.dark .fiscal-year { color: rgb(203 213 225); }
.form-type { font-size: 0.75rem; color: rgb(100 116 139); }
.list-item-divider { width: 1px; height: 2rem; background: rgb(226 232 240); flex-shrink: 0; }
.dark .list-item-divider { background: rgb(51 65 85); }
.list-item-btn { display: flex; gap: 0.375rem; flex-shrink: 0; flex-wrap: wrap; align-items: center; }

/* Table columns (commented-out table view) */
.col-badge { flex: 0 0 5rem; }
.col-date { flex: 0 0 7rem; font-size: 0.75rem; }
.col-year { flex: 0 0 4rem; font-weight: 600; }
.col-form { flex: 1; font-size: 0.8rem; }
.col-setting { flex: 0 0 8rem; }
.col-btn { flex: 0 0 10rem; display: flex; gap: 0.375rem; }
.col-tfn { flex: 0 0 9rem; font-size: 0.8rem; }
.list-item-row, .list-header-row { display: flex; align-items: center; gap: 0.5rem; width: 100%; }
.dashboard-form-list-header { padding: 0.25rem 0; }

/* Base setting link */
.base-setting {
  font-size: 0.75rem;
  color: hsl(var(--hue) 65% 45%);
  text-decoration: underline;
  cursor: pointer;
}
.base-setting:hover { color: hsl(var(--hue) 65% 35%); }

/* Error message */
.error-message { color: rgb(220 38 38); font-size: 0.75rem; margin-top: 0.25rem; }
.dark .error-message { color: rgb(252 165 165); }

/* ============================================================
   BUTTON VARIANTS (ex-btn series)
   ============================================================ */
.warning-ex-btn-wide {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.25rem;
  background: hsl(38 95% 50%);
  color: #fff;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background 0.15s;
  white-space: nowrap;
}
.warning-ex-btn-wide:hover { background: hsl(38 95% 42%); }

.success-ex-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.75rem;
  background: rgb(16 185 129);
  color: #fff;
  border-radius: 0.375rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: background 0.15s;
  white-space: nowrap;
}
.success-ex-btn:hover { background: rgb(5 150 105); color: #fff; }

.primary-ex-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.75rem;
  background: hsl(var(--hue) 65% 45%);
  color: #fff;
  border-radius: 0.375rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: background 0.15s;
  white-space: nowrap;
}
.primary-ex-btn:hover { background: hsl(var(--hue) 65% 38%); color: #fff; }

.primary-ex-normal-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.75rem;
  background: hsl(var(--hue) 65% 45%);
  color: #fff;
  border-radius: 0.375rem;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: background 0.15s;
  white-space: nowrap;
}
.primary-ex-normal-btn:hover { background: hsl(var(--hue) 65% 38%); color: #fff; }

.primary-ex-outline-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.75rem;
  background: transparent;
  color: hsl(var(--hue) 65% 45%);
  border: 1.5px solid hsl(var(--hue) 65% 45%);
  border-radius: 0.375rem;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
  white-space: nowrap;
}
.primary-ex-outline-btn:hover { background: hsl(var(--hue) 65% 45%); color: #fff; }

.delete-ex-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.75rem;
  background: rgb(239 68 68);
  color: #fff;
  border-radius: 0.375rem;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: background 0.15s;
  white-space: nowrap;
}
.delete-ex-btn:hover { background: rgb(220 38 38); color: #fff; }

.delete-ex-outline-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.75rem;
  background: transparent;
  color: rgb(239 68 68);
  border: 1.5px solid rgb(239 68 68);
  border-radius: 0.375rem;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
  white-space: nowrap;
}
.delete-ex-outline-btn:hover { background: rgb(239 68 68); color: #fff; }

/* ============================================================
   STATUS BADGE VARIANTS
   ============================================================ */
.badge-warning-02 {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 600;
  background: rgb(254 243 199);
  color: rgb(146 64 14);
  border: 1px solid rgb(252 211 77);
}
.dark .badge-warning-02 { background: rgba(146,64,14,0.2); color: rgb(252 211 77); border-color: rgba(252,211,77,0.3); }

.badge-pending {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 600;
  background: rgb(241 245 249);
  color: rgb(100 116 139);
  border: 1px solid rgb(203 213 225);
}
.dark .badge-pending { background: rgba(100,116,139,0.15); color: rgb(148 163 184); border-color: rgb(71 85 105); }

.badge-reco {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 600;
  background: rgb(240 253 244);
  color: rgb(22 101 52);
  border: 1px solid rgb(134 239 172);
}
.dark .badge-reco { background: rgba(22,101,52,0.2); color: rgb(134 239 172); border-color: rgba(134,239,172,0.3); }

/* Extend existing badge classes with flex display */
.badge { display: inline-flex; align-items: center; padding: 0.2rem 0.6rem; border-radius: 9999px; font-size: 0.72rem; font-weight: 600; }
.badge-info { background: rgb(219 234 254); color: rgb(30 64 175); border: 1px solid rgb(147 197 253); }
.badge-success { background: rgb(220 252 231); color: rgb(22 101 52); border: 1px solid rgb(134 239 172); }
.badge-secondary { background: rgb(241 245 249); color: rgb(71 85 105); border: 1px solid rgb(203 213 225); }
.badge-warning { background: rgb(254 249 195); color: rgb(113 63 18); border: 1px solid rgb(250 204 21); }
.dark .badge-info { background: rgba(30,64,175,0.2); color: rgb(147 197 253); border-color: rgba(147,197,253,0.3); }
.dark .badge-success { background: rgba(22,101,52,0.2); color: rgb(134 239 172); border-color: rgba(134,239,172,0.3); }
.dark .badge-secondary { background: rgba(71,85,105,0.2); color: rgb(148 163 184); border-color: rgb(71 85 105); }
.dark .badge-warning { background: rgba(113,63,18,0.2); color: rgb(250 204 21); border-color: rgba(250,204,21,0.3); }

/* ============================================================
   MEDIA INDEX — filter/search bar & grid
   ============================================================ */
.add-file-col {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.add-file-col .count {
  font-size: 0.8rem;
  color: rgb(100 116 139);
  font-weight: 500;
}
.dark .add-file-col .count { color: rgb(148 163 184); }

.media-select-col {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}
.media-select-col-inner-1,
.media-select-col-inner-2 {
  position: relative;
}
/* wrapper の ▼ 疑似要素は撤去 (R-13 再修正で全 select が共通の SVG 矢印を
   持つようになり、残すと media 系 8 select だけ矢印が二重に見えるため)。
   矢印は select 本体の background-image (上の select:not(...) ルール) に一本化 */
.media-select {
  appearance: none;
  background: white;
  border: 1px solid rgb(226 232 240);
  border-radius: 0.5rem;
  padding: 0.5rem 2rem 0.5rem 0.75rem;
  font-size: 0.8rem;
  color: rgb(51 65 85);
  cursor: pointer;
  transition: border-color 0.15s;
}
.media-select:focus {
  outline: none;
  border-color: hsl(var(--hue) 65% 45%);
  box-shadow: 0 0 0 2px hsl(var(--hue) 65% 45% / 0.15);
}
.dark .media-select {
  background: rgb(30 41 59);
  border-color: rgb(51 65 85);
  color: rgb(203 213 225);
}

.media-toggle .inline-radio {
  display: flex;
  gap: 0;
  border-radius: 0.5rem;
  overflow: hidden;
  border: 1px solid rgb(226 232 240);
}
.dark .media-toggle .inline-radio { border-color: rgb(51 65 85); }
.media-toggle .inline-radio div {
  display: flex;
  align-items: center;
}
.media-toggle .inline-radio input {
  display: none;
}
.media-toggle .inline-radio label {
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
  cursor: pointer;
  background: white;
  color: rgb(100 116 139);
  transition: all 0.15s;
  white-space: nowrap;
  user-select: none;
}
.dark .media-toggle .inline-radio label {
  background: rgb(30 41 59);
  color: rgb(148 163 184);
}
.media-toggle .inline-radio div:last-child label {
  border-left: 1px solid rgb(226 232 240);
}
.dark .media-toggle .inline-radio div:last-child label {
  border-color: rgb(51 65 85);
}
.media-toggle .inline-radio input:checked + label {
  background: hsl(var(--hue) 65% 45%);
  color: white;
}

.media-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: rgb(100 116 139);
}
.dark .media-search { color: rgb(148 163 184); }
.media-search input[type=text] {
  border: 1px solid rgb(226 232 240);
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
  color: rgb(51 65 85);
  background: white;
  transition: border-color 0.15s;
}
.media-search input[type=text]:focus {
  outline: none;
  border-color: hsl(var(--hue) 65% 45%);
  box-shadow: 0 0 0 2px hsl(var(--hue) 65% 45% / 0.15);
}
.dark .media-search input[type=text] {
  background: rgb(30 41 59);
  border-color: rgb(51 65 85);
  color: rgb(203 213 225);
}

/* Media grid */
.media-block {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.media-block-item {
  background: white;
  border: 1px solid rgb(226 232 240);
  border-radius: 0.75rem;
  overflow: hidden;
  transition: box-shadow 0.15s;
}
.media-block-item:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.dark .media-block-item { background: rgb(30 41 59); border-color: rgb(51 65 85); }
.media-block-item .media-thumb {
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
}
.media-block-item .media-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-block-item .media-desc {
  padding: 0.5rem 0.625rem;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}
.media-block-item .media-desc .time {
  font-size: 0.7rem;
  color: rgb(148 163 184);
}
.media-block-item .media-desc .status {
  font-size: 0.7rem;
  color: rgb(148 163 184);
}
/* 処理済バッジ: blade 側の text-emerald-600 が上の固定グレーに詳細度で負けるため、
   処理済 (emerald 付与時) の色をここで担保する (未処理との視認差) */
.media-block-item .media-desc .status.text-emerald-600 {
  color: rgb(5 150 105);
  font-weight: 600;
}
.media-block-item .form {
  padding: 0 0.625rem;
  font-size: 0.7rem;
  color: rgb(100 116 139);
  margin: 0;
}
.media-block-item .delete {
  display: block;
  padding: 0.375rem 0.625rem;
  font-size: 0.7rem;
  text-decoration: none;
}

/* File list */
.file-block {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
}
.file-block-item {
  background: white;
  border: 1px solid rgb(226 232 240);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
}
.dark .file-block-item { background: rgb(30 41 59); border-color: rgb(51 65 85); }
.file-block-item-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.file-block-item .file-thumb {
  font-size: 0.8rem;
  color: hsl(var(--hue) 65% 45%);
  text-decoration: none;
  font-weight: 500;
}
.file-block-item .file-thumb:hover { text-decoration: underline; }
.file-block-item .file-desc {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.file-block-item .file-desc .time {
  font-size: 0.7rem;
  color: rgb(148 163 184);
}
.file-block-item .file-desc .status {
  font-size: 0.7rem;
  color: rgb(148 163 184);
}
.file-block-item .file-desc .status.text-emerald-600 {
  color: rgb(5 150 105);
  font-weight: 600;
}
.file-block-item .file-delete .delete {
  font-size: 0.75rem;
  text-decoration: none;
}
.file-block-item .file-connection {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 0.375rem;
}
.file-block-item .file-connection .form {
  font-size: 0.7rem;
  color: rgb(100 116 139);
  margin: 0;
}

/* ============================================================
   USER MANAGEMENT — delete button
   ============================================================ */
.user-mng-header .user-delete-btn {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  color: rgb(239 68 68);
  opacity: 0.6;
  transition: opacity 0.15s;
  text-decoration: none;
  font-size: 1rem;
}
.user-mng-header .user-delete-btn:hover { opacity: 1; }

/* ============================================================
   VANILLA MODAL (Bootstrap replacement)
   ============================================================ */
[data-ezy-toggle="modal"] { cursor: pointer; }
[data-ezy-dismiss="modal"] { cursor: pointer; }

/* ============================================================
   STEP WIZARD (car page / work-at-home page)
   ============================================================ */
.step-content {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}
.step-content.open {
  max-height: 5000px;
  opacity: 1;
}

/* Vertical connector line between steps */
.step-connector {
  position: absolute;
  left: 19px;
  top: 44px;
  bottom: -24px;
  width: 2px;
  background: hsl(210 20% 88%);
  z-index: 0;
}
.dark .step-connector {
  background: hsl(210 10% 30%);
}

/* ============================================================
   SECTION ACCORDION (offset page / deductions page)
   ============================================================ */
.section-detail {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}
.section-detail.open {
  max-height: 5000px;
  opacity: 1;
}
.step-connector.completed {
  background: hsl(160 60% 45%);
}
