:root {
  /* Design Tokens */
  --color-bg-deep: #0f1c2e;
  --color-bg-surface: rgba(255, 255, 255, 0.1);
  --color-bg-card: rgba(255, 255, 255, 0.05);

  --color-primary: #00e0ff;
  --color-primary-hover: #00b8d4;
  --color-secondary: #fff;
  --color-text-main: #ffffff;
  --color-text-muted: #a0aec0;

  --color-success: #00d26a;
  --color-error: #ff4d4d;

  --border-radius-lg: 16px;
  --border-radius-md: 8px;

  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;

  --transition-speed: 0.3s;

  --glass-border: 1px solid rgba(255, 255, 255, 0.1);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);

  /* Landing Page Compatibility */
  --glass-bg: rgba(255, 255, 255, 0.05);
  --primary-cyan: #00e0ff;
  --accent-yellow: #ffd700;
}

/* Reset & Base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Outfit', 'Noto Sans JP', sans-serif;
  color: var(--color-text-main);
  background-color: var(--color-bg-deep);
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

/* ✅ Layout Stabilization: #app-root fills viewport, .admin-ui-wrapper centers via margin:0 auto */
#app-root {
  width: 100%;
  min-width: 100%;
}

/* ✅ Dashboard Booting (Flash Prevention) */
body.admin-booting #app-root,
body.admin-booting .tab-menu {
  visibility: hidden !important;
}

/* Background Ambient */
.background-ambient {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: radial-gradient(circle at 50% 10%, #1a3c61 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, #004d61 0%, transparent 50%);
  filter: blur(40px);
}

/* Container */
.app-container {
  width: 95%;
  max-width: 1200px;
  padding: var(--space-lg);
  padding-bottom: 80px;
}

/* Header */
.app-header {
  margin-bottom: var(--space-lg);
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-md);
}

.logo {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.logo .accent {
  color: var(--color-primary);
}

/* Progress Bar */
.progress-bar-container {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar {
  width: 0%;
  /* JS will update this */
  height: 100%;
  background: var(--color-primary);
  transition: width 0.5s ease;
}

/* Glass Card */
.glass-card {
  background: var(--color-bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: var(--glass-border);
  border-radius: var(--border-radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--glass-shadow);
  margin-bottom: var(--space-lg);
  animation: fadeIn 0.5s ease-out;
}

/* --- Permission Modes (Staff/Owner) --- */
body:not(.owner-mode-active) .owner-only {
  display: none !important;
}

.mode-badge {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-right: 15px;
  display: inline-flex;
  align-items: center;
  transition: all 0.3s ease;
}

.mode-badge.staff {
  background: rgba(160, 174, 192, 0.15);
  color: var(--color-text-muted);
  border: 1px solid rgba(160, 174, 192, 0.3);
}

.mode-badge.owner {
  background: rgba(0, 224, 255, 0.15);
  color: var(--color-primary);
  border: 1px solid rgba(0, 224, 255, 0.4);
  box-shadow: 0 0 10px rgba(0, 224, 255, 0.2);
}

.menu-item i {
  margin-right: 10px;
  width: 16px;
  text-align: center;
}

.menu-item#btn-toggle-owner-mode {
  font-weight: 700;
}

.owner-mode-active #btn-toggle-owner-mode {
  color: #a0aec0;
}

body:not(.owner-mode-active) #btn-toggle-owner-mode {
  color: var(--color-primary);
}

/* --- Always Owner Toggle --- */
#menu-item-always-owner .switch input:checked + .slider {
  background-color: var(--color-primary) !important;
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.4);
}
#menu-item-always-owner .switch .slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}
#menu-item-always-owner .switch input:checked + .slider:before {
  transform: translateX(16px);
}

/* --- Edit Restrictions (Staff Read-only) --- */
body:not(.owner-mode-active) .owner-edit-only {
  opacity: 0.65;
  pointer-events: none !important;
  cursor: not-allowed;
}

body:not(.owner-mode-active) .owner-edit-only input,
body:not(.owner-mode-active) .owner-edit-only select,
body:not(.owner-mode-active) .owner-edit-only button {
  pointer-events: none !important;
}

body:not(.owner-mode-active) .owner-edit-only .drag-handle {
  visibility: hidden;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Form Steps */
.form-step {
  display: none;
}

.form-step.active {
  display: block;
}

.step-header {
  display: flex;
  align-items: center;
  margin-bottom: var(--space-lg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: var(--space-sm);
}

.step-number {
  font-family: 'Outfit', sans-serif;
  font-size: 2rem;
  color: var(--color-primary);
  font-weight: 700;
  opacity: 0.5;
  margin-right: var(--space-md);
  flex-shrink: 0;
  /* 番号が潰れないようにする */
}

/* ステップタイトルのレイアウト */
.form-step h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  /* 番号とテキストの間隔 */
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
}

/* Form Elements */
.form-group {
  margin-bottom: var(--space-lg);
}

label {
  display: block;
  margin-bottom: var(--space-sm);
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--border-radius-md);
  color: var(--color-text-main);
  font-size: 1rem;
  outline: none;
  transition: all 0.2s;
}

.form-control:focus {
  border-color: var(--color-primary);
  background: rgba(0, 0, 0, 0.4);
}

/* Radio Cards */
.radio-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: var(--space-md);
}

.radio-card {
  cursor: pointer;
  position: relative;
}

.radio-card input {
  position: absolute;
  opacity: 0;
}

.radio-card .card-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid transparent;
  border-radius: var(--border-radius-md);
  transition: all 0.2s;
  text-align: center;
  height: 100%;
}

.radio-card .icon {
  font-size: 2rem;
  margin-bottom: var(--space-sm);
}

.radio-card input:checked+.card-content {
  border-color: var(--color-primary);
  background: rgba(0, 224, 255, 0.1);
}

.small-price {
  font-size: 0.9em;
  opacity: 0.8;
}

/* Checkbox Group */
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.checkbox-item {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  padding: 12px;
  border-radius: var(--border-radius-md);
  cursor: pointer;
  transition: background 0.2s;
}

.checkbox-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

.checkbox-item input {
  margin-right: var(--space-md);
  transform: scale(1.2);
}

/* Buttons */
.action-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: var(--space-lg);
  gap: var(--space-md);
}

.btn {
  padding: 12px 24px;
  border-radius: var(--border-radius-md);
  border: none;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-lg {
  width: 100%;
  padding: 16px;
  font-size: 1.1rem;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.85rem;
}

.btn-primary {
  background: var(--color-primary);
  color: #0f1c2e;
}

.btn-primary:hover {
  background: var(--color-primary-hover);
  transform: translateY(-2px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-text-main);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
}

.btn-success {
  background: var(--color-success);
  color: white;
}

.btn-success:hover {
  background: #00b35a;
}

/* Utilities */
.hidden {
  display: none !important;
}

/* Lazy Validation Feedback */
.form-control.is-invalid {
  border-color: var(--color-error);
  background: rgba(255, 77, 77, 0.05);
}

.error-message {
  color: var(--color-error);
  font-size: 0.8rem;
  margin-top: 4px;
  display: none;
}

.form-control.is-invalid~.error-message {
  display: block;
}

.text-center {
  text-align: center;
}

/* Summary */
.summary-box {
  background: rgba(0, 0, 0, 0.2);
  padding: var(--space-md);
  border-radius: var(--border-radius-md);
  margin-bottom: var(--space-lg);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--space-sm);
  font-size: 0.95rem;
}

.summary-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: var(--space-sm) 0;
}

.summary-row.total {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-primary);
}

/* Payment */
.payment-selection h4 {
  margin-bottom: var(--space-md);
}

/* Responsive */
@media (max-width: 480px) {
  .app-container {
    padding: var(--space-md);
  }

  .radio-group {
    grid-template-columns: 1fr;
    /* Already in 480px query, ensuring it overrides */
  }
}

/* Mobile & Tablet Optimizations (New) */
@media (max-width: 768px) {
  .app-container {
    padding: var(--space-md);
    width: 100%;
  }

  .glass-card {
    padding: var(--space-md);
    width: 100%;
  }

  /* Stack form rows */
  .form-row {
    flex-direction: column;
    gap: var(--space-md) !important;
  }

  /* Stack radio groups (redundant with 480px but good for tablets) */
  .radio-group {
    grid-template-columns: 1fr;
  }

  /* Wrap date pickers */
  .custom-datetime-picker,
  .custom-date-picker {
    flex-wrap: wrap;
    gap: 8px;
  }

  .custom-datetime-picker select,
  .custom-date-picker select {
    flex: 1 1 auto;
    /* Allow flexible width */
    min-width: 70px;
  }

  /* Button sizing for touch */
  .btn {
    min-height: 48px;
  }

  .action-buttons {
    flex-direction: column-reverse;
    /* Stack buttons, Back on bottom */
    gap: var(--space-md);
  }

  .action-buttons .btn {
    width: 100%;
  }

  /* Admin specific mobile fixes */
  .admin-ui-wrapper {
    width: 100%;
    padding: 10px;
  }

  .admin-nav {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-nav .nav-right {
    margin-top: 10px;
    width: 100%;
    display: flex;
    justify-content: space-between;
  }
}

/* Admin Plan Settings Responsive Table */
.plan-header-row,
.plan-item-row {
  display: flex;
  width: 100%;
  gap: 0;
  margin-bottom: 8px;
  align-items: center;
}

.plan-col-name {
  width: 35%;
}

.plan-col-price {
  width: 15%;
}

.plan-col-target {
  width: 45%;
}

.plan-col-action {
  width: 5%;
}

.plan-col-price-inner {
  display: flex;
  align-items: center;
  width: 100%;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  padding: 0 8px;
  height: 38px;
  margin: 0 4px;
}

.plan-col-target-inner {
  width: 100%;
  display: flex;
  gap: 12px;
  justify-content: center;
}

@media (max-width: 768px) {

  /* Hide Header on Mobile */
  .plan-header-row {
    display: none !important;
  }

  /* Turn Rows into Cards */
  .plan-item-row {
    flex-direction: column;
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    align-items: flex-start;
    gap: 10px;
  }

  .plan-col-name,
  .plan-col-price,
  .plan-col-target,
  .plan-col-action {
    width: 100%;
  }

  .plan-col-price-inner {
    margin: 0;
    /* Reset margin */
  }

  .plan-col-target-inner {
    justify-content: flex-start;
    flex-direction: column;
    /* Stack targets on very narrow screens if needed, or row */
  }

  /* Add labels via ::before if needed, or just rely on placeholders */
  .plan-col-action {
    display: flex;
    justify-content: flex-end;
  }
}

/* Customer Table Responsive */
.customer-table-header,
.customer-row {
  display: grid;
  /* ✅ 6列に再編（Name, License, Status, Plan, Contact, Date） */
  /* Name(200px) License(110px) Status(140px) Plan(260px) Contact(240px) Date(100px) = 1050px */
  grid-template-columns: 200px 110px 140px 260px 240px 100px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  align-items: center;
  gap: 15px;
  transition: background 0.2s;
}

/* ✅ ヘッダーは列の中心に (デフォルト) */
.customer-table-header {
  font-weight: 600;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  justify-items: center;
  align-items: center;
  text-align: center;
}

/* 行もヘッダーと同じ中央揃え (デフォルト) */
.customer-row {
  justify-items: center;
  align-items: center;
  text-align: center;
}

/* 氏名と連絡先は左揃えの方が見やすいので明示的に両方揃える */
.customer-table-header .col-name,
.customer-row .col-name,
.customer-table-header .col-contact,
.customer-row .col-contact {
  justify-self: start;
  text-align: left;
  width: 100%;
}

/* ライセンス・登録日は改行防止 */
.customer-table-header .col-license,
.customer-row .col-license,
.customer-table-header .col-date,
.customer-row .col-date {
  white-space: nowrap;
}

.customer-row:hover {
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
}

/* --- Customer Photo & Avatar --- */
.cust-avatar-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cust-avatar-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.cust-avatar-placeholder {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2b6cb0, #4299e1);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.2rem;
  flex-shrink: 0;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.cust-avatar-placeholder i {
  opacity: 0.9;
}

.cust-name-primary {
  font-size: 0.95rem;
  color: #fff;
}

.cust-name-secondary {
  font-size: 0.75rem;
  color: #888;
  margin-top: 2px;
}

.cust-contact-email {
  font-size: 0.85rem;
  color: #ddd;
}

.cust-contact-phone {
  font-size: 0.75rem;
  color: #888;
  margin-top: 2px;
}

.cust-photo-mgmt-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  margin-bottom: 25px;
}

.cust-photo-actions {
  display: flex;
  gap: 10px;
}

.btn-delete-photo {
  background: #fff !important;
  color: #ff4d4d !important;
  border: 1px solid #ff4d4d !important;
  font-weight: bold;
  padding: 6px 16px;
}

.btn-delete-photo:hover {
  background: #fff0f0 !important;
  border-color: #ff4d4d !important;
  box-shadow: 0 2px 8px rgba(255, 77, 77, 0.2);
}

.profile-summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  background: rgba(0,0,0,0.15);
  padding: 10px;
  border-radius: 8px;
  margin-top: 6px;
}

.visit-count-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 1px 6px;
  border: 1px solid rgba(0, 229, 255, 0.65);
  border-radius: 6px;
  color: #00e5ff;
  background: rgba(0, 229, 255, 0.08);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.2;
  vertical-align: middle;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s;
}

.visit-count-badge:hover {
  background: rgba(0, 229, 255, 0.2);
  border-color: #00e5ff;
  transform: translateY(-1px);
}

/* History Filter Banner */
.customer-history-filter-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 229, 255, 0.1);
  border: 1px solid rgba(0, 229, 255, 0.3);
  border-radius: 8px;
  padding: 12px 20px;
  margin-bottom: 20px;
  animation: fadeIn 0.3s ease-out;
}

.customer-history-filter-banner span {
  color: #00e5ff;
  font-weight: 600;
  font-size: 0.95rem;
}

.customer-history-filter-banner .btn-clear-filter {
  background: rgba(0, 229, 255, 0.2);
  border: 1px solid rgba(0, 229, 255, 0.5);
  color: #fff;
  padding: 6px 16px;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

.customer-history-filter-banner .btn-clear-filter:hover {
  background: rgba(0, 229, 255, 0.4);
  border-color: #00e5ff;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.cust-photo-preview-lg {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  background: #222;
}

.cust-photo-actions {
  display: flex;
  gap: 10px;
}

.cust-photo-placeholder-lg {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: rgba(255, 255, 255, 0.1);
  border: 2px dashed rgba(255, 255, 255, 0.1);
}

/* Mobile specific for Customer Table */
@media (max-width: 768px) {
  .customer-table-header {
    display: none;
  }

  .customer-row {
    grid-template-columns: 1fr;
    padding: 15px 5px;
  }

  .col-nationality,
  .col-plan,
  .col-contact,
  .col-date {
    display: none !important;
  }

  .col-name {
    width: 100%;
  }
}

/* Admin UI Wrapper - Responsive */
.admin-ui-wrapper {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  box-sizing: border-box;
  overflow-x: hidden;
  min-width: 0;
}

/* Admin UI Specifics */
.admin-header-logo {
  font-family: 'Outfit', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-header-logo .accent {
  color: #00ffaa;
}

.admin-header-subtitle {
  font-size: 0.9rem;
  color: #aaa;
  font-weight: 400;
  margin-left: 10px;
  padding-left: 10px;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
}

#dashboard-view {
  overflow-x: hidden;
  min-width: 0;
  box-sizing: border-box;
}

.admin-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  min-width: 0;
}

.header-action-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 6px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}

.header-action-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
}

/* Tab Menu */
.tab-menu {
  display: flex;
  gap: 16px;
  background: rgba(0, 0, 0, 0.2);
  padding: 12px;
  border-radius: 16px;
  margin-bottom: 24px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  flex-wrap: wrap;
}

.tab-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ccc;
  padding: 10px 24px;
  border-radius: 30px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.3s ease;
  text-align: center;
  flex: 1;
  /* Keep flex:1 for consistent alignment unless it breaks layout, looks like hint implied simple resize */
  min-width: 100px;
}

.tab-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

.tab-btn.active {
  background: linear-gradient(135deg, #00e5ff 0%, #0097a7 100%);
  color: #ffffff;
  border: 1px solid rgba(0, 229, 255, 0.5);
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.3), inset 0 0 10px rgba(255, 255, 255, 0.2);
  font-weight: 600;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transform: translateY(-1px);
}

/* Calendar & Staff (Existing) */
/* #shift-grid removed (duplicate) */

/* Tab content overflow containment */
[id^="tab-"] {
  overflow-x: hidden;
  min-width: 0;
  box-sizing: border-box;
}

/* .calendar-day-header removed (duplicate) */

/* Staff List: 3-Column Grid (PC) */
/* #staff-list-container removed (duplicate) */

/* Staff Header: inline flex with compact button */
.staff-header-area {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.btn-add-staff-compact {
  padding: 6px 14px;
  font-size: 0.9rem;
  background: #00ffaa;
  color: #111;
  border-radius: 6px;
  font-weight: bold;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

.btn-add-staff-compact:hover {
  background: #00cc88;
}

/* Mobile Enhancements for Admin */
@media (max-width: 768px) {

  /* Stack Staff List to 1 column */
  /* Stack Staff List to 1 column */
  /* #staff-list-container removed (duplicate) */
  /* #staff-list-container {
    grid-template-columns: 1fr !important;
  } */

  /* Stack Header Area */
  .staff-header-area {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }

  /* Tab menu wrapping */
  .tab-menu {
    flex-wrap: wrap;
  }
}

/* Staff cards */
/* Old staff card styles removed */

/* Shift calendar */
.shift-nav {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 6px;
  margin-bottom: 6px;
}

.shift-nav-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  border-radius: 10px;
  padding: 6px 10px;
  cursor: pointer;
}

.shift-nav-title {
  font-weight: 700;
  color: #fff;
  opacity: 0.9;
}

.shift-cell {
  position: relative;
  min-height: 86px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 8px;
}

.shift-cell-empty {
  background: transparent;
  border: none;
}

.shift-dayno {
  font-size: 0.85rem;
  color: #a0aec0;
  position: absolute;
  top: 6px;
  left: 8px;
}

.shift-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding-top: 18px;
}

.shift-badge {
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0f1c2e;
  font-weight: 800;
}

.shift-badge-x {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: none;
  background: #ff4d4d;
  color: #fff;
  font-size: 12px;
  line-height: 16px;
  cursor: pointer;
}

/* Legacy Staff UI Overrides */

/* Staff List Grid (2 rows x 3 cols) */
#staff-list-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 5px;
}

.staff-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  cursor: grab;
  transition: background 0.2s;
}

.staff-card:hover {
  background: rgba(255, 255, 255, 0.1);
}

.staff-card:active {
  cursor: grabbing;
}

.staff-badge {
  min-width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: #1a202c;
  font-size: 0.9rem;
}

.staff-meta {
  flex: 1;
  overflow: hidden;
}

.staff-name {
  font-weight: bold;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.staff-sub {
  font-size: 0.75rem;
  color: #a0aec0;
  display: flex;
  gap: 6px;
  align-items: center;
}

.staff-actions {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.icon-btn {
  background: none;
  border: none;
  color: #718096;
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0;
}

.icon-btn:hover {
  color: #fff;
}

/* Shift Calendar */
/* #shift-grid removed (duplicate) */

.shift-cell {
  position: relative;
  min-height: 100px;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: 6px;
  transition: background 0.2s;
}

.shift-cell.drag-over {
  background: rgba(0, 255, 170, 0.1);
  box-shadow: inset 0 0 10px rgba(0, 255, 170, 0.2);
}

.shift-day-num {
  font-size: 0.85rem;
  color: #a0aec0;
  margin-bottom: 4px;
  pointer-events: none;
}

/* Avatar Badges in Calendar */
.shift-avatars {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.assigned-avatar {
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: #1a202c;
  font-size: 0.8rem;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.remove-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 14px;
  height: 14px;
  background: #ff4d4d;
  color: white;
  border-radius: 50%;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  /* Hidden by default */
  transition: opacity 0.2s;
}

.assigned-avatar:hover .remove-badge {
  opacity: 1;
}

/* Header style for calendar */
.calendar-day-header {
  text-align: center;
  padding: 8px 0;
  font-size: 0.8rem;
  color: #718096;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.btn-add-staff-compact {
  /* Ensure specific styling for the add button */
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  transition: 0.2s;
  padding: 6px 12px;
  font-size: 0.85rem;
  border-radius: 8px;
}

.btn-add-staff-compact:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Staff panel (PDF Layout: Rows, Full Width) */
.staff-panel {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(20, 30, 45, 0.25);
  margin-top: 10px;
}

.staff-row {
  display: grid;
  grid-template-columns: 56px 1fr 72px;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.staff-row:last-child {
  border-bottom: none;
}

.staff-row:hover {
  background: rgba(255, 255, 255, 0.03);
}

.staff-badge {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #0b1020;
}

.staff-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.staff-name {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}

.staff-role {
  color: #2ef2a7;
  font-weight: 700;
  font-size: 0.9rem;
}

.staff-sub {
  display: flex;
  gap: 10px;
  align-items: center;
  color: #9fb0c8;
  font-size: 12px;
}

.staff-exp {
  font-weight: 600;
  color: #a0aec0;
}

.staff-lang {
  display: flex;
  gap: 4px;
}

.lang-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 20px;
  padding: 0 8px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #cfe7ff;
  font-size: 0.75rem;
}

/* Shift calendar grid fixed layout (Consolidated) - REMOVED (Replaced by Unified Grid below) */
/*
.shift-grid,
#shift-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-left: 1px solid rgba(255, 255, 255, 0.05);
  width: 100%;
  padding: 0 14px;
  box-sizing: border-box;
}

.shift-cell {
  min-height: 86px;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  position: relative;
  padding: 10px;
}
*/

.shift-cell-empty {
  background: rgba(255, 255, 255, 0.02);
}

.shift-dayno {
  position: absolute;
  top: 8px;
  left: 8px;
  color: #c8d4e6;
  font-size: 0.85rem;
  font-weight: 700;
  opacity: 0.6;
}

.shift-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 20px;
}

.shift-badge {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #0b1020;
  position: relative;
  font-size: 0.8rem;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.shift-badge-remove {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #ff4d4d;
  color: #fff;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  cursor: pointer;
  z-index: 10;
}

.shift-header-bar h5 {
  font-size: 1.1rem;
  font-weight: 600;
}

.month-nav {
  display: flex;
  align-items: center;
}

/* ===== Staff Top Layout (Single Column) ===== */
.staff-card-top {
  padding: 14px 14px 16px;
}

.staff-top-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 4px 12px;
}

.staff-top-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
}

.staff-role-legend {
  font-size: 1rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  display: flex;
  gap: 12px;
  align-items: center;
  white-space: nowrap;
}

.section-title {
  margin: 0;
  color: #fff;
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: .02em;
}

.section-hint {
  color: #9aa9b7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chart-range-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #888;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  min-width: 32px;
  text-align: center;
}

.chart-range-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  color: #ccc;
}

.chart-range-btn.active {
  background: rgba(0, 160, 255, 0.2);
  border-color: #00a0ff;
  color: #00a0ff;
}

.chart-range-btn.is-hidden {
  visibility: hidden;
  pointer-events: none;
}

.chart-nav-prev, .chart-nav-next {
  min-width: 36px;
}

.chart-nav-current {
  min-width: 48px;
}

.chart-controls-divider {
  display: block;
}

@media (max-width: 900px) {
  .chart-controls-divider {
    display: none !important;
  }
}

.staff-top-grid {
  display: grid;
  grid-template-columns: 1fr;
  /* CHANGED: Full width */
  gap: 8px;
  min-height: auto;
  /* Allow auto height */
}

.staff-list {
  border-radius: 14px;
  overflow: hidden;
  background: rgba(20, 28, 38, .35);
  border: 1px solid rgba(255, 255, 255, .06);
}

.staff-empty-panel {
  display: none;
}

/* Ensure it's hidden if somehow present */

/* ===== Staff Row ===== */
.staff-row {
  display: grid;
  grid-template-columns: 54px 1fr 76px;
  gap: 12px;
  align-items: center;
  padding: 18px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.staff-row:last-child {
  border-bottom: none;
}

.staff-badge {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0b1220;
  font-weight: 800;
}

.staff-name {
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.2;
}

.staff-role {
  color: #38f7b1;
  font-weight: 700;
  margin-top: 2px;
}

.staff-sub {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
  color: #93a4b6;
  font-size: .85rem;
}

.staff-exp {
  opacity: .9;
}

.staff-lang {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .22);
  border: 1px solid rgba(255, 255, 255, .08);
  color: #c9d4df;
  font-size: .78rem;
}

/* actions */
.staff-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.icon-btn {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(0, 0, 0, .18);
  color: #cfd8e3;
  cursor: pointer;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, .08);
}

/* ===== Shift Bottom ===== */
.shift-card-bottom {
  padding: 0;
  overflow: hidden;
}

.shift-header-bar {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.shift-month-label {
  font-weight: 800;
  color: #dbe7f3;
}

/* ===== Shift Calendar Unified Grid ===== */
:root {
  --shift-pad-x: 14px;
  --shift-border: 1px solid rgba(255, 255, 255, 0.06);
}

.shift-weekdays,
.shift-grid,
#shift-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr) !important;
  width: 100%;
  box-sizing: border-box;
  padding: 0 var(--shift-pad-x);
  transform: translateZ(0);
  /* Sub-pixel rendering fix */
}

.shift-weekdays {
  border-bottom: var(--shift-border);
  border-left: var(--shift-border);
  border-right: var(--shift-border);
}

.shift-weekdays .calendar-day-header {
  text-align: center;
  padding: 10px 0;
  font-size: 0.8rem;
  color: #718096;
  border-right: var(--shift-border);
}

.shift-weekdays .calendar-day-header:nth-child(7n) {
  border-right: none;
}

.shift-grid,
#shift-grid {
  border-left: var(--shift-border);
  border-right: var(--shift-border);
  border-top: none;
}

.shift-cell {
  min-height: 86px;
  border-right: var(--shift-border);
  border-bottom: var(--shift-border);
  position: relative;
  padding: 10px;
  box-sizing: border-box;
}

.shift-cell:nth-child(7n) {
  border-right: none;
}

/* Shift Header Note */
.shift-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.shift-note {
  color: #9aa9b7;
  font-size: 0.8rem;
  white-space: nowrap;
  opacity: 0.9;
}

/* Bad duplicate at end removed */

/* ===== Staff Grid Panel (match staff.pdf style) ===== */
.staff-grid-panel {
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(20, 28, 38, .35);
}

/* 3 columns grid */
.staff-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

/* “cell” style: draw internal dividers like a table */
.staff-cell {
  display: grid;
  grid-template-columns: 56px 1fr 76px;
  gap: 12px;
  align-items: center;
  padding: 16px 14px;
  min-height: 92px;
  cursor: grab;

  border-right: 1px solid rgba(255, 255, 255, .06);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}

/* remove right border on 3rd column */
.staff-cell:nth-child(3n) {
  border-right: none;
}

/* remove bottom border on last row (works for 6 items = 2 rows) */
.staff-cell:nth-last-child(-n + 3) {
  border-bottom: none;
}

.staff-cell:hover {
  background: rgba(255, 255, 255, .03);
}

.staff-cell:active {
  cursor: grabbing;
}

/* keep your existing badge/info look (reuse class names you already have) */
.staff-cell .staff-badge {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #0b1220;
}

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

/* responsive: 1 column on small screens */
@media (max-width: 768px) {
  .staff-grid {
    grid-template-columns: 1fr;
  }

  .staff-cell {
    border-right: none;
  }

  .staff-cell:nth-last-child(-n + 3) {
    border-bottom: 1px solid rgba(255, 255, 255, .06);
  }

  .staff-cell:last-child {
    border-bottom: none;
  }
}

/* ===== Staff (scoped) : match staff.pdf ===== */
#tab-staff #staff-list-container {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 8px;
  width: 100%;
  box-sizing: border-box;
}

/* 既存 .staff-card を活かす前提 */
#tab-staff .staff-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 8px;
  cursor: grab;
  transition: background 0.2s;
}

#tab-staff .staff-card:hover {
  background: rgba(255, 255, 255, 0.10);
}

#tab-staff .staff-card:active {
  cursor: grabbing;
}

#tab-staff .staff-badge {
  min-width: 30px;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #0b1220;
  font-size: 0.85rem;
}

#tab-staff .staff-meta {
  flex: 1;
  overflow: hidden;
}

#tab-staff .staff-name {
  font-weight: 800;
  font-size: 0.92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#tab-staff .staff-role {
  color: #38f7b1;
  font-weight: 800;
  font-size: 0.8rem;
}

#tab-staff .staff-sub {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-top: 2px;
  color: #93a4b6;
  font-size: 0.75rem;
}

#tab-staff .staff-actions {
  display: flex;
  gap: 6px;
}

#tab-staff .icon-btn {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(0, 0, 0, .18);
  color: #cfd8e3;
  cursor: pointer;
}

@media (max-width: 768px) {
  #tab-staff #staff-list-container {
    grid-template-columns: 1fr;
  }
}

/* Staff Header Refactoring */
#tab-staff .staff-top-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

#tab-staff .section-title {
  font-size: 1rem !important;
}

#tab-staff .staff-top-left {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
}

#tab-staff .section-hint {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.75rem !important;
}

/* Drag Handle Styles */
#tab-staff .staff-drag-handle {
  cursor: grab;
}

#tab-staff .staff-drag-handle:active {
  cursor: grabbing;
}

/* Card default cursor */
#tab-staff .staff-card {
  cursor: pointer;
  /* Changed from default to pointer */
}

/* スタッフエリアの上部固定 */
.staff-card-top {
  position: sticky;
  top: 15px;
  z-index: 100;
  padding: 10px 15px !important;
  margin-bottom: 12px !important;
  /* 背景が透けすぎないように少し調整 */
  background: rgba(10, 25, 47, 0.85);
  backdrop-filter: blur(10px);
}

/* 選択中のスタッフカードのハイライト */
.staff-card.active-staff {
  box-shadow: 0 0 0 2px #00e5ff, 0 0 15px rgba(0, 229, 255, 0.4);
  transform: translateY(-2px);
  transition: all 0.2s ease;
}

/* =========================================================
   SHIFT CALENDAR - FINAL ALIGN PATCH (put at END of style.css)
   目的:
   1) 曜日行と日付グリッドの左右端ズレを完全解消
   2) カレンダー下にも左右と同じ余白を付与
   ========================================================= */

:root {
  --shift-pad-x: 14px;
  --shift-pad-y: 14px;
  /* ←下余白も同じ幅にする */
  --shift-line: 1px solid rgba(255, 255, 255, 0.06);
}

/* 1) 曜日行と日付グリッドの“箱”を完全一致させる */
.shift-weekdays,
.shift-grid,
#shift-grid {
  box-sizing: border-box;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(7, 1fr) !important;
  gap: 0 !important;
  padding-left: var(--shift-pad-x) !important;
  padding-right: var(--shift-pad-x) !important;
}

/* 2) 下の余白は日付グリッドだけに付与（左右と同じ幅） */
.shift-grid,
#shift-grid {
  padding-bottom: var(--shift-pad-y) !important;
}

/* 3) 外枠の左右線は“両方”に同じ条件で付与 */
.shift-weekdays {
  border-left: var(--shift-line) !important;
  border-right: var(--shift-line) !important;
  border-bottom: var(--shift-line) !important;
}

.shift-grid,
#shift-grid {
  border-left: var(--shift-line) !important;
  border-right: var(--shift-line) !important;
  border-top: none !important;
}

/* 4) 重要：古い .shift-cell の border(四辺) を確実に無効化してから再定義
      → これがズレの主犯（border-left / top が残っている） */
.shift-cell {
  border: none !important;
  /* ←古いborderを殺す */
  border-right: var(--shift-line) !important;
  border-bottom: var(--shift-line) !important;
  box-sizing: border-box !important;
  min-height: 86px !important;
  position: relative !important;
  padding: 10px !important;
  background: rgba(255, 255, 255, 0.04) !important;
}

/* 空セルも線を揃える（以前の border:none が残るのを防ぐ） */
.shift-cell.shift-cell-empty {
  border-right: var(--shift-line) !important;
  border-bottom: var(--shift-line) !important;
  background: rgba(255, 255, 255, 0.02) !important;
}

/* 最終列の右線はセルではなくコンテナの border-right に任せる */
.shift-cell:nth-child(7n) {
  border-right: none !important;
}

/* 5) 曜日ヘッダーの線も統一 */
.shift-weekdays .calendar-day-header {
  border-right: var(--shift-line) !important;
  border-left: none !important;
  border-top: none !important;
  border-bottom: none !important;
  padding: 10px 0 !important;
  text-align: center !important;
  color: #718096 !important;
}

.shift-weekdays .calendar-day-header:nth-child(7n) {
  border-right: none !important;
}

/* ===== FIX: 曜日行と日付グリッドの左右の“帯”を消して完全一致させる ===== */
:root {
  --shift-pad-x: 14px;
  /* 左右余白 */
  --shift-pad-y: 14px;
  /* 下余白 */
  --shift-line: 1px solid rgba(255, 255, 255, 0.06);
}

/* 重要：paddingで内側に押すのをやめ、marginで外側余白を作る */
.shift-weekdays,
.shift-grid,
#shift-grid {
  padding-left: 0 !important;
  padding-right: 0 !important;

  margin-left: var(--shift-pad-x) !important;
  margin-right: var(--shift-pad-x) !important;

  width: calc(100% - (var(--shift-pad-x) * 2)) !important;
  box-sizing: border-box !important;

  display: grid;
  grid-template-columns: repeat(7, 1fr) !important;
  gap: 0 !important;
}

/* 下の余白（左右と同じ幅）をカレンダー下にも付与 */
.shift-grid,
#shift-grid {
  margin-bottom: var(--shift-pad-y) !important;
}

/* 外枠線は同じ条件で */
.shift-weekdays {
  border-left: var(--shift-line) !important;
  border-right: var(--shift-line) !important;
  border-bottom: var(--shift-line) !important;
}

.shift-grid,
#shift-grid {
  border-left: var(--shift-line) !important;
  border-right: var(--shift-line) !important;
  border-top: none !important;
}

/* ついでに：古い shift-cell の四辺borderが残ってズレるのを殺す */
.shift-cell {
  border: none !important;
  border-right: var(--shift-line) !important;
  border-bottom: var(--shift-line) !important;
  box-sizing: border-box !important;
  min-height: 100px !important; /* Slightly taller for more badges */
  position: relative !important;
  padding: 8px !important;
  background: rgba(255, 255, 255, 0.03) !important;
  transition: background 0.2s ease;
}

.shift-cell:hover {
  background: rgba(255, 255, 255, 0.08) !important;
}

/* Shift Navigation & Filter UI */
.shift-nav-btn {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.shift-nav-btn:hover {
  background: rgba(0, 229, 255, 0.15) !important;
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 229, 255, 0.2);
}

.shift-nav-btn:active {
  transform: translateY(0);
}

.shift-nav-btn.today-btn:hover {
  border-color: rgba(0, 229, 255, 0.5) !important;
  color: #00e5ff !important;
}

#shift-grid {
  animation: shiftFadeIn 0.3s ease-out;
}

@keyframes shiftFadeIn {
  from { opacity: 0.6; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

#shift-staff-filter {
  transition: all 0.2s ease;
  cursor: pointer;
}

#shift-staff-filter:hover {
  border-color: rgba(255, 255, 255, 0.3) !important;
  background: rgba(255, 255, 255, 0.05) !important;
}

#shift-staff-filter:focus {
  border-color: #00e5ff !important;
  box-shadow: 0 0 0 2px rgba(0, 229, 255, 0.2);
  outline: none;
}

/* Shift Summary Bar */
.shift-summary-bar {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 10px 5px 15px 5px;
  margin-bottom: 10px;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}
.shift-summary-bar::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.summary-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 6px 12px 6px 8px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.summary-chip:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(0, 229, 255, 0.3);
  transform: translateY(-1px);
}

.summary-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: bold;
}

.summary-info {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.summary-name {
  font-size: 0.85rem;
  font-weight: 500;
  color: #ccc;
}

.summary-count {
  font-size: 1rem;
  font-weight: 700;
  color: #00e5ff;
}

.summary-count small {
  font-size: 0.7rem;
  margin-left: 2px;
  color: #aaa;
  font-weight: 400;
}

/* Today & Weekend Highlights */
.shift-cell.shift-today {
  background: rgba(54, 214, 255, 0.08) !important;
  box-shadow: inset 0 0 10px rgba(54, 214, 255, 0.1);
}
.shift-badge {
  border-radius: 50% !important;
  overflow: hidden !important;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.4) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #2a3a4a; /* default background, no !important to allow JS override */
  transition: transform 0.1s ease, box-shadow 0.1s ease !important;
}

.shift-badge:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 8px rgba(0,0,0,0.5) !important;
  z-index: 5;
}

.shift-badge-wrapper:hover .shift-badge-remove {
  display: flex !important;
  align-items: center;
  justify-content: center;
}

.shift-badge-remove {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ff4d4d !important;
  color: white !important;
  border-radius: 50% !important;
  width: 16px !important;
  height: 16px !important;
  font-size: 11px !important;
  font-weight: bold !important;
  line-height: 1 !important;
  cursor: pointer !important;
  display: none !important;
  z-index: 10 !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.4) !important;
  border: 1px solid rgba(255,255,255,0.8) !important;
}

.shift-badge-remove:hover {
  background: #ff1a1a !important;
  transform: scale(1.1);
}
.shift-cell.shift-sat {
  background: rgba(54, 214, 255, 0.04) !important;
}
.shift-cell.shift-sun {
  background: rgba(255, 90, 165, 0.04) !important;
}

.shift-today-marker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #36d6ff;
  color: #1a2634;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-weight: 800;
  font-size: 0.75rem;
  margin-left: -4px;
}

.shift-dayno {
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(255,255,255,0.5);
  margin-bottom: 6px;
}

.shift-sat .shift-dayno { color: #36d6ff !important; opacity: 0.8; }
.shift-sun .shift-dayno { color: #ff5aa5 !important; opacity: 0.8; }
.shift-today .shift-dayno { color: #fff !important; opacity: 1; }

.shift-cell:nth-child(7n) {
  border-right: none !important;
}

/* =========================================
   Staff Modal Styles (Restored)
   ========================================= */
.staff-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  backdrop-filter: blur(2px);
}

.staff-modal {
  background: #1a2634;
  /* Dark blue-grey to match theme */
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: #e0e6ed;
  border: 1px solid rgba(255, 255, 255, 0.1);
  animation: modalPop 0.2s ease-out;
}

.staff-modal.modal-workspace {
  width: 92vw;
  max-width: 1240px;
  height: 90vh;
  max-height: 90vh;
  background: #0f172a;
  border: 1px solid rgba(0, 229, 255, 0.25);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
}

.staff-modal.modal-workspace .staff-modal-header {
  padding: 16px 24px;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(15, 23, 42, 0.95);
}

.staff-modal.modal-workspace .staff-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.staff-modal.modal-workspace .staff-modal-footer {
  flex-shrink: 0;
  padding: 14px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(15, 23, 42, 0.95);
}

.btn-daily-schedule-mail {
  background: rgba(0, 229, 255, 0.15);
  border: 1px solid rgba(0, 229, 255, 0.35);
  color: #00e5ff;
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 0.68rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s;
  line-height: 1.2;
}

.btn-daily-schedule-mail:hover {
  background: rgba(0, 229, 255, 0.3);
  border-color: #00e5ff;
  color: #ffffff;
  transform: translateY(-1px);
}

@media (max-width: 768px) {
  .staff-modal.modal-workspace {
    width: 96vw;
    height: 95vh;
    max-height: 95vh;
  }
  .staff-modal.modal-workspace .staff-modal-body {
    padding: 16px;
  }
}

@keyframes modalPop {
  from {
    transform: scale(0.95);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

.staff-modal-header {
  padding: 16px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
}

.staff-modal-title {
  font-size: 1.25rem;
  font-weight: 700;
}

.staff-modal-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.staff-modal-close:hover {
  color: #fff;
}

.staff-modal-body {
  padding: 16px 24px;
  overflow-y: auto;
  flex: 1;
  /* Ensure content doesn't get cut off by fixed footer */
  padding-bottom: 25px;
}

.staff-form-row {
  margin-bottom: 20px;
}

.staff-form-row label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
}

.staff-inline {
  display: flex;
  gap: 10px;
  align-items: center;
}

.staff-lang-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

.staff-check {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 0.95rem;
  user-select: none;
}

.staff-check input {
  margin-right: 8px;
  accent-color: #3b82f6;
}

.staff-chip {
  display: inline-block;
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  font-size: 0.75rem;
  margin-left: 4px;
}

.staff-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* Role Manager */
.staff-role-pill {
  display: inline-flex;
  align-items: center;
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.9rem;
  margin-right: 8px;
  margin-bottom: 8px;
}

.staff-role-pill button {
  background: none;
  border: none;
  color: inherit;
  margin-left: 6px;
  cursor: pointer;
  font-size: 1.1em;
  padding: 0;
  opacity: 0.7;
}

.staff-role-pill button:hover {
  opacity: 1;
}

/* =========================================
   Staff Icon Styles
   ========================================= */
.staff-badge img,
.shift-badge img,
.assigned-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

/* Ensure badges are circular and centered content */
.staff-badge,
.shift-badge,
.assigned-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  overflow: hidden;
  font-weight: bold;
}

.shift-badge {
  /* Existing shift badge override if needed */
  width: 28px;
  height: 28px;
  font-size: 0.8rem;
}

.staff-badge {
  /* List badge */
  width: 40px;
  height: 40px;
  font-size: 1rem;
}

.has-image {
  background-color: transparent !important;
}

/* Modal color swatch selected state */
.color-swatch.selected {
  box-shadow: 0 0 0 2px #1a2634, 0 0 0 4px #3b82f6;
}

/* =========================================
   Staff Icon Styles (Continued)
   ========================================= */

/* Text Color Selection Palette */
.icon-textcolor-palette {
  display: flex !important;
  gap: 10px !important;
  align-items: center !important;
}

.icon-textcolor-palette label {
  position: relative !important;
  overflow: hidden !important;
  padding: 4px 8px !important;
  border-radius: 6px !important;
  background: rgba(255, 255, 255, 0.05) !important;
  transition: all 0.2s ease !important;
  border: 1px solid transparent !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  color: rgba(255, 255, 255, 0.7) !important;
}

.icon-textcolor-palette label:hover {
  background: rgba(255, 255, 255, 0.1) !important;
}

.icon-textcolor-palette label:has(input:checked) {
  background: rgba(0, 229, 255, 0.1) !important;
  border-color: rgba(0, 229, 255, 0.5) !important;
  color: #00e5ff !important;
}

.icon-textcolor-palette input[type="radio"] {
  accent-color: #00e5ff;
  margin: 0 !important;
  opacity: 0.8 !important;
}
.shift-badge-content {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* =========================================
   レスポンシブデザイン（スマホ・タブレット対応）
   ========================================= */
@media screen and (max-width: 768px) {

  /* コンテナやカードの余白・幅をスマホに最適化 */
  .container,
  .main-content {
    padding: 10px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .glass-card {
    padding: 20px 15px !important;
    margin-bottom: 15px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* インラインで設定された横並びグリッド（2カラム等）を強制的に1カラム(縦並び)に解除 */
  [style*="grid-template-columns"],
  .grid-2col {
    grid-template-columns: 1fr !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 15px !important;
  }

  /* iOS Safariの自動ズーム防止（inputのフォントサイズを16px以上に強制） */
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="number"],
  input[type="tel"],
  select,
  textarea {
    font-size: 16px !important;
  }

  /* アクションボタンをタップしやすく微調整 */
  .btn-primary,
  .btn-success,
  .btn-danger,
  .btn-lg {
    padding: 12px !important;
  }

  /* テキストサイズをスマホ向けに微調整 */
  h2 {
    font-size: 1.4rem !important;
  }

  h3 {
    font-size: 1.2rem !important;
  }

  /* ロゴが端に寄りすぎないように調整 */
  .brand-wrapper {
    margin-left: 10px;
    margin-right: 10px;
  }
}

.brand-logo-text {
  font-family: 'Inter', 'Arial', sans-serif;
  /* モダンなサンセリフ体 */
  font-weight: 800;
  font-size: 1.8rem;
  background: linear-gradient(135deg, #00e5ff 0%, #0077ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.5px;
  margin: 0;
  display: inline-block;
}

/* バリデーションエラー用：入力フィールドの赤枠 */
.input-error {
  border: 2px solid #ff4444 !important;
  background-color: rgba(255, 68, 68, 0.05) !important;
}

/* 無効化されたボタンのスタイル */
.btn:disabled {
  background-color: #555 !important;
  color: #888 !important;
  cursor: not-allowed;
  box-shadow: none !important;
  transform: none !important;
}

/* 管理画面（ダッシュボード）ではロゴ画像を完全に非表示にし、テキストのみとする */
.admin-ui-wrapper .admin-header-logo img,
.admin-ui-wrapper .admin-nav img {
  display: none !important;
}

/* =========================================
   印刷・PDF出力用スタイル (Chromeレンダリングバグ完全排除版)
   ========================================= */
@media print {
  @page {
    size: A4 landscape;
    margin: 5mm;
  }

  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    box-sizing: border-box !important;
  }

  /* 🚨 処方箋1: bodyのFlexboxを強制解除し、Chromeの「ページ分割エラー」を直す */
  html,
  body {
    display: block !important;
    /* ← これが超重要です */
    background-color: #0f1c2e !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
  }

  /* 見切れの元凶となる固定幅や制限を解除 */
  #app-root,
  .app-container,
  .admin-ui-wrapper,
  #dashboard-view,
  .dashboard-container {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
  }

  /* 不要なUIを非表示 */
  #tab-customers,
  #tab-sales,
  #tab-form-config,
  #tab-bank,
  #tab-account,
  .admin-nav,
  .tab-menu,
  .btn-add-staff-compact,
  .staff-actions,
  .month-nav button,
  .shift-badge-remove,
  .shift-note,
  .background-ambient {
    display: none !important;
  }

  #tab-staff {
    display: block !important;
    width: 100% !important;
    padding: 0 3mm !important;
    overflow: visible !important;
  }

  /* 🚨 処方箋2: すべての「3Dレイヤー・エフェクト」を強制的に殺す（ユーザー提案） */
  .glass-card,
  .shift-card-bottom,
  .staff-card-top,
  .shift-weekdays,
  .shift-grid,
  #shift-grid,
  .shift-cell,
  .shift-badges {
    transform: none !important;
    -webkit-transform: none !important;
    filter: none !important;
    -webkit-filter: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    animation: none !important;
    box-shadow: none !important;
  }

  /* --- 上部：スタッフリスト（スクショ通りの美しい2列を強制） --- */
  .staff-card-top {
    margin-bottom: 10px !important;
    position: static !important;
    /* stickyを解除して重なりを防ぐ */
  }

  .staff-top-header {
    padding-bottom: 2px !important;
    margin: 0 !important;
  }

  .section-title {
    font-size: 1.1rem !important;
    color: #fff !important;
    margin: 0 !important;
  }

  #staff-list-container {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    /* スクショ通り2列に */
    gap: 8px !important;
    padding: 0 !important;
  }

  .staff-card {
    padding: 6px 10px !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    background: rgba(255, 255, 255, 0.05) !important;
    page-break-inside: avoid !important;
  }

  /* アイコン四角バグ対策 */
  .staff-badge,
  .shift-badge,
  .assigned-avatar {
    border-radius: 50% !important;
    background-clip: padding-box !important;
    -webkit-mask-image: -webkit-radial-gradient(white, black) !important;
    mask-image: radial-gradient(white, black) !important;
    overflow: hidden !important;
  }

  .staff-card .staff-badge {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    font-size: 0.9rem !important;
  }

  .staff-meta {
    overflow: hidden !important;
    flex: 1 !important;
  }

  .staff-name {
    font-size: 0.95rem !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .staff-role {
    font-size: 0.8rem !important;
  }

  .staff-sub {
    display: none !important;
  }

  /* 省スペース化 */

  /* --- 下部：カレンダー --- */
  .shift-card-bottom {
    page-break-inside: auto !important;
    break-inside: auto !important;
  }

  /* --- 下部：カレンダーヘッダー（月表示の見切れ防止 完全版） --- */
  .shift-header-bar {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 0 2mm 5px 0 !important;
    /* 右端に少し逃がす */
    overflow: visible !important;
  }

  .shift-header-right {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    margin-left: auto !important;
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: none !important;
    min-width: max-content !important;
    overflow: visible !important;
  }

  .month-nav {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: none !important;
    min-width: max-content !important;
    overflow: visible !important;
    white-space: nowrap !important;
  }

  .shift-month-label {
    display: inline-block !important;
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: none !important;
    min-width: max-content !important;
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: nowrap !important;
    word-break: keep-all !important;
    font-size: 1.2rem !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    letter-spacing: 0 !important;
    color: #fff !important;
  }

  /* カレンダーのGridを安定化 */
  .shift-weekdays {
    display: grid !important;
    grid-template-columns: repeat(7, 1fr) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-left: 1px solid rgba(255, 255, 255, 0.3) !important;
    background: rgba(255, 255, 255, 0.05) !important;
  }

  .shift-weekdays .calendar-day-header {
    border-right: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3) !important;
    padding: 4px 0 !important;
    text-align: center !important;
    color: #fff !important;
    font-size: 0.85rem !important;
  }

  .shift-grid,
  #shift-grid {
    display: grid !important;
    grid-template-columns: repeat(7, 1fr) !important;
    border-left: 1px solid rgba(255, 255, 255, 0.3) !important;
  }

  .shift-cell {
    min-height: 60px !important;
    height: auto !important;
    padding: 4px !important;
    border-right: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3) !important;
    background: transparent !important;
    position: relative !important;
    page-break-inside: avoid !important;
  }

  .shift-cell-empty {
    background: rgba(255, 255, 255, 0.02) !important;
  }

  .shift-dayno {
    position: absolute !important;
    top: 2px !important;
    left: 4px !important;
    color: #aaa !important;
    font-size: 0.8rem !important;
    margin: 0 !important;
  }

  .shift-badges {
    padding-top: 16px !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 4px !important;
    justify-content: flex-start !important;
  }

  .shift-badge-wrapper {
    width: 22px !important;
    height: 22px !important;
  }

  .shift-badge,
  .assigned-avatar {
    width: 22px !important;
    height: 22px !important;
    font-size: 0.7rem !important;
  }
}

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

  html,
  body {
    display: block !important;
  }

  /* 通常時は印刷用バッジを隠す（JSのafterprint復帰とも整合） */
  .schedule-badges-print {
    display: none !important;
  }

  /* scheduleタブのときだけ発動 */
  body[data-active-tab="schedule"] {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    background: #0f1c2e !important;
  }

  /* 印刷時は印刷用DOM優先（JSでも切替するがCSSでも担保） */
  body[data-active-tab="schedule"] .schedule-badges-screen {
    display: none !important;
  }

  body[data-active-tab="schedule"] .schedule-badges-print {
    display: flex !important;
  }

  /* 許可リスト方式：予定管理以外を物理的に非表示（将来タブ追加にも対応） */
  body[data-active-tab="schedule"] #dashboard-view> :not(#tab-schedule) {
    display: none !important;
  }

  /* 予定管理を確実に表示 */
  body[data-active-tab="schedule"] #tab-schedule,
  body[data-active-tab="schedule"] #tab-schedule.hidden {
    display: block !important;
    visibility: visible !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  /* 不要UI非表示 */
  body[data-active-tab="schedule"] .admin-nav,
  body[data-active-tab="schedule"] .tab-menu,
  body[data-active-tab="schedule"] .background-ambient,
  body[data-active-tab="schedule"] .print-hide {
    display: none !important;
  }

  /* コンテナ制限解除 */
  body[data-active-tab="schedule"] #app-root,
  body[data-active-tab="schedule"] .app-container,
  body[data-active-tab="schedule"] .admin-ui-wrapper,
  body[data-active-tab="schedule"] .dashboard-container {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
  }

  /* カード装飾を落とす */
  body[data-active-tab="schedule"] #tab-schedule .glass-card {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* 1ページに収めやすく圧縮 */
  body[data-active-tab="schedule"] #tab-schedule .shift-weekdays,
  body[data-active-tab="schedule"] #tab-schedule #schedule-grid {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body[data-active-tab="schedule"] #tab-schedule .shift-cell {
    min-height: 44px !important;
    padding: 2px 3px !important;
    overflow: hidden !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  body[data-active-tab="schedule"] #tab-schedule .shift-cell.shift-cell-empty {
    min-height: 44px !important;
  }

  body[data-active-tab="schedule"] #tab-schedule .shift-cell * {
    font-size: 7.5pt !important;
    line-height: 1.05 !important;
  }

  body[data-active-tab="schedule"] #tab-schedule .shift-cell>div {
    margin-bottom: 2px !important;
  }

  body[data-active-tab="schedule"] #tab-schedule .shift-cell>div>div {
    padding: 1px 3px !important;
    margin-bottom: 1px !important;
  }
}

/* --- Calendar Full Status Styles --- */
.shift-cell.calendar-day.status-full {
  background: rgba(255, 77, 77, 0.1) !important;
  border: 1.5px solid rgba(255, 77, 77, 0.3) !important;
}

.shift-cell.calendar-day.status-full .day-number {
  color: #ffdede !important;
}

.shift-cell.calendar-day.status-full .schedule-badges-screen .schedule-badge {
  background: rgba(0, 0, 0, 0.32) !important;
}

.shift-cell.calendar-day.status-full .schedule-badges-print > div {
  background: rgba(0, 0, 0, 0.32) !important;
}

/* Admin Toast Notification */
.admin-toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: rgba(0, 229, 255, 0.9);
  color: #000;
  padding: 12px 24px;
  border-radius: 30px;
  font-weight: 600;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
  z-index: 999999 !important;
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.admin-toast.show {
  transform: translateY(0);
  opacity: 1;
}

.admin-toast.error {
  background: rgba(255, 77, 77, 0.9);
  color: #fff;
}

.admin-toast-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(0, 0, 0, 0.2);
  border-top-color: #000;
  border-radius: 50%;
  animation: toast-spin 0.8s linear infinite;
}

.admin-toast.error .admin-toast-spinner {
  border-top-color: #fff;
}

@keyframes toast-spin {
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   Admin Dashboard MENU Styles (Refined)
   ========================================================================== */
.menu-container {
    position: relative;
    display: inline-block;
    z-index: 2100; /* Above regular content and toasts if needed */
}

.menu-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    padding: 8px 18px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    outline: none;
}

.menu-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: #00e5ff;
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.3);
    transform: translateY(-1px);
}

.menu-btn:active {
    transform: translateY(0);
}

.menu-btn.active {
    background: rgba(0, 229, 255, 0.15);
    border-color: #00e5ff;
    color: #00e5ff;
}

/* Custom Hamburger Icon (Pure CSS) */
.menu-hamburger {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 18px;
    height: 12px;
    pointer-events: none; /* Let clicks pass to button */
}

.menu-hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: rgba(255, 255, 255, 0.9); /* Default white-ish */
    border-radius: 1px;
    transition: all 0.2s ease;
}

.menu-btn:hover .menu-hamburger span,
.menu-btn.active .menu-hamburger span {
    background-color: #00e5ff; /* Cyan accent on hover/active */
}

.menu-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    min-width: 220px;
    background: rgba(20, 30, 42, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
    display: none; /* Crucial: hide by default */
    padding: 8px 0;
    overflow: hidden;
    transform-origin: top right;
    animation: menuFadeIn 0.2s cubic-bezier(0, 0, 0.2, 1);
}

.menu-dropdown.show {
    display: block !important;
}

@keyframes menuFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.menu-item {
    padding: 14px 22px;
    color: #eee;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
    border: none;
    width: 100%;
    background: transparent;
    text-align: left;
}

.menu-item:hover {
    background: rgba(0, 229, 255, 0.12);
    color: #00e5ff;
}

.menu-item i {
    width: 18px;
    text-align: center;
    font-size: 1.1rem;
    opacity: 0.8;
}

.menu-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 6px 0;
}

/* Header Action Layout Fix */
.header-action-group {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 15px;
}

#shop-name-display {
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    padding-right: 15px;
    margin-right: 5px;
}

/* ==========================================================================
   System Log Summary Card Styles (Modular & Premium)
   ========================================================================== */
.log-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
    width: 100%;
}

.log-stats-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    min-height: 72px;
    position: relative;
    overflow: hidden;
    text-decoration: none;
}

.log-stats-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: transparent;
    transition: background 0.3s ease;
}

.log-stats-card:hover {
    background: rgba(255, 255, 255, 0.07);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.15);
}

/* Card Types for Error/Warning/Info */
.log-stats-card.error::after { background: #ff4d4d; }
.log-stats-card.error:hover { box-shadow: 0 8px 30px rgba(255, 77, 77, 0.15); }
.log-stats-card.error .log-stats-value { color: #ff4d4d; }

.log-stats-card.warning::after { background: #ffae42; }
.log-stats-card.warning:hover { box-shadow: 0 8px 30px rgba(255, 174, 66, 0.15); }
.log-stats-card.warning .log-stats-value { color: #ffae42; }

.log-stats-card.notif::after { background: #ff781f; }
.log-stats-card.notif:hover { box-shadow: 0 8px 30px rgba(255, 120, 31, 0.15); }
.log-stats-card.notif .log-stats-value { color: #ff781f; }

.log-stats-card.audit::after { background: #00e5ff; }
.log-stats-card.audit:hover { box-shadow: 0 8px 30px rgba(0, 229, 255, 0.15); }
.log-stats-card.audit .log-stats-value { color: #00e5ff; }

.log-stats-label {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.45);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 2px;
    font-weight: 600;
}

.log-stats-value {
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
}

/* Responsive Grid Adjustments */
@media (max-width: 992px) {
    .log-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .log-stats-grid {
        gap: 10px;
    }
}
/* Customer Photo Management */
.cust-photo-mgmt-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.temp-preview-label {
    position: absolute;
    bottom: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    pointer-events: none;
    z-index: 10;
}

/* ✅ Customer Detail Modal Tab Size Adjustment (2026-04-30) */
#btn-cust-tab-1, #btn-cust-tab-2 {
    padding-top: 12px !important;
    padding-bottom: 12px !important;
    font-size: 1rem !important;
    min-height: 44px;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

/* Payment Breakdown UI */
.payment-breakdown-card {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 12px;
  border-left: 3px solid #00e5ff;
  grid-column: span 2;
}

.breakdown-title {
  font-size: 0.85rem;
  font-weight: bold;
  color: #00e5ff;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid rgba(0, 229, 255, 0.2);
  padding-bottom: 6px;
}

.breakdown-section {
  margin-bottom: 15px;
}

.breakdown-section:last-child {
  margin-bottom: 0;
}

.breakdown-section-header {
  font-size: 0.8rem;
  font-weight: bold;
  color: #eee;
  padding-bottom: 4px;
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.breakdown-state-label {
  font-size: 0.7rem;
  color: #777;
  margin-top: 6px;
  margin-bottom: 3px;
  padding-left: 2px;
  font-weight: 500;
}

.breakdown-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  margin-bottom: 3px;
  padding-left: 6px;
  color: #ccc;
}

.payment-diff-added {
  color: #ffe95c;
  font-weight: 500;
}

.payment-diff-removed {
  color: #ff4d4f;
  font-weight: 500;
}

.payment-diff-unchanged {
  color: #ccc;
}

.breakdown-label {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.breakdown-amount {
  font-family: 'Roboto Mono', 'Courier New', monospace;
  font-weight: 500;
  margin-left: 10px;
  min-width: 85px;
  text-align: right;
}

.breakdown-summary-section {
  margin-top: 15px;
  padding-top: 10px;
  border-top: 1px dashed rgba(255, 255, 255, 0.15);
}

.breakdown-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  margin-bottom: 4px;
  color: #aaa;
}

.breakdown-summary-row .val {
  font-family: 'Roboto Mono', monospace;
  color: #eee;
}

.breakdown-summary-row.total {
  font-size: 0.95rem;
  font-weight: bold;
  margin-top: 10px;
  color: #eee;
  padding-top: 5px;
}

.breakdown-summary-row.total .val {
  color: #00e5ff;
  font-size: 1.1rem;
}

.highlight-cyan {
  color: #00ffd5 !important;
  font-weight: bold;
}

/* ==========================================================================
   Daily Bulk Mail Editor & Token Visualization (Phase UX 2026-09-04)
   ========================================================================== */
.mail-editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  gap: 12px;
  align-items: stretch;
  width: 100%;
}

@media (max-width: 768px) {
  .mail-editor-grid {
    grid-template-columns: 1fr;
  }
}

.mail-var-sidebar {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(0, 229, 255, 0.25);
  border-radius: 6px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-sizing: border-box;
  height: 320px;
  min-height: 220px;
}

.mail-var-sidebar-title {
  font-size: 0.82rem;
  font-weight: bold;
  color: #00e5ff;
  display: flex;
  align-items: center;
}

.mail-var-sidebar-desc {
  font-size: 0.72rem;
  color: #94a3b8;
  line-height: 1.3;
  margin-bottom: 2px;
}

.mail-var-chips-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  flex: 1;
}

.daily-mail-var-chip {
  cursor: pointer;
  background: rgba(0, 229, 255, 0.12);
  color: #00e5ff;
  border: 1px solid rgba(0, 229, 255, 0.3);
  padding: 5px 8px;
  font-size: 0.78rem;
  font-family: monospace;
  border-radius: 4px;
  text-align: left;
  transition: all 0.15s ease;
  display: inline-block;
  width: 100%;
  box-sizing: border-box;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  outline: none;
}

.daily-mail-var-chip:hover {
  background: rgba(0, 229, 255, 0.25);
  border-color: #00e5ff;
  color: #fff;
  transform: translateX(2px);
}

.mail-editor-wrapper {
  position: relative;
  isolation: isolate;
  width: 100%;
  height: 320px;
  min-height: 220px;
  border-radius: 6px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(0, 229, 255, 0.4);
  box-sizing: border-box;
  overscroll-behavior: none;
}

.mail-editor-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100% !important;
  height: 100% !important;
  overflow: hidden !important;
  pointer-events: none !important;
  box-sizing: border-box !important;
  z-index: 1 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  overscroll-behavior: none;
}

.mail-editor-highlights,
.mail-editor-highlights *,
.mail-editor-highlights-inner,
.mail-editor-highlights-inner * {
  color: transparent !important;
  -webkit-text-fill-color: transparent !important;
}

.mail-editor-highlights,
.mail-editor-highlights-inner {
  position: absolute;
  top: 0;
  left: 0;
  box-sizing: border-box !important;
  margin: 0 !important;
  border: none !important;
  padding: 10px 12px !important;
  font-family: inherit !important;
  font-size: 0.9rem !important;
  line-height: 1.6 !important;
  letter-spacing: normal !important;
  text-transform: none !important;
  white-space: pre-wrap !important;
  word-break: break-word !important;
  overflow-wrap: break-word !important;
  tab-size: 4 !important;
  -moz-tab-size: 4 !important;
  pointer-events: none !important;
  will-change: transform;
  overscroll-behavior: none;
  z-index: 1;
}

.mail-editor-highlights mark.token-highlight,
.mail-editor-highlights-inner mark.token-highlight {
  background: rgba(0, 229, 255, 0.22) !important;
  color: transparent !important;
  -webkit-text-fill-color: transparent !important;
  border: none !important;
  box-shadow: 0 0 0 1px rgba(0, 229, 255, 0.45) !important;
  border-radius: 3px;
  box-sizing: border-box;
  padding: 0 !important;
  margin: 0 !important;
}

.mail-editor-textarea {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100% !important;
  height: 100% !important;
  padding: 10px 12px !important;
  margin: 0 !important;
  border: none !important;
  outline: none !important;
  box-sizing: border-box !important;
  resize: none !important;
  background: transparent !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  opacity: 1 !important;
  visibility: visible !important;
  caret-color: #00e5ff !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  z-index: 2 !important;
  pointer-events: auto !important;
  font-family: inherit !important;
  font-size: 0.9rem !important;
  line-height: 1.6 !important;
  letter-spacing: normal !important;
  text-transform: none !important;
  white-space: pre-wrap !important;
  word-break: break-word !important;
  overflow-wrap: break-word !important;
  tab-size: 4 !important;
  -moz-tab-size: 4 !important;
  transition: none !important;
  overscroll-behavior: none !important;
}

.mail-editor-textarea:focus {
  outline: none !important;
}

.mail-editor-wrapper.expanded {
  height: 480px !important;
  max-height: calc(85vh - 200px);
}

.mail-editor-grid:has(.mail-editor-wrapper.expanded) .mail-var-sidebar {
  height: 480px !important;
  max-height: calc(85vh - 200px);
}

.daily-mail-submodal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 10500 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.daily-mail-submodal {
  background: #0f172a;
  border: 1px solid rgba(0, 229, 255, 0.4);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
  border-radius: 10px;
  width: 100%;
  max-width: 760px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: #e2e8f0;
}

.daily-mail-workspace-modal {
  width: 94vw !important;
  max-width: 1240px !important;
  height: 88vh !important;
  max-height: 88vh !important;
  display: flex;
  flex-direction: column;
}

.daily-mail-workspace-modal .daily-mail-submodal-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 16px 20px;
  overflow: hidden;
}

.daily-mail-workspace-modal .mail-editor-grid {
  flex: 1;
  min-height: 350px;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  grid-template-rows: 1fr;
  align-items: stretch;
}

.daily-mail-workspace-modal .mail-editor-wrapper {
  position: relative;
  height: 100% !important;
  min-height: 350px;
  display: block;
  overscroll-behavior: none;
}

.daily-mail-workspace-modal .mail-var-sidebar {
  height: 100% !important;
  min-height: 350px;
  display: flex;
  flex-direction: column;
}

.daily-mail-workspace-modal .mail-editor-textarea {
  height: 100% !important;
  min-height: 0 !important;
  resize: none !important;
  overscroll-behavior: none !important;
}

.daily-mail-preview-modal-large {
  width: 94vw !important;
  max-width: 1240px !important;
  height: 82vh !important;
  max-height: 85vh !important;
  display: flex;
  flex-direction: column;
}

.daily-mail-preview-modal-large .daily-mail-submodal-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 16px 20px;
  overflow: hidden;
}

.daily-mail-final-confirm-modal {
  width: 94vw !important;
  max-width: 1240px !important;
  height: 88vh !important;
  max-height: 90vh !important;
  display: flex;
  flex-direction: column;
}

.daily-mail-final-confirm-modal .daily-mail-submodal-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 16px 20px;
  overflow: hidden;
}

.daily-mail-confirm-grid {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 16px;
  flex: 1;
  min-height: 0;
}

@media (max-width: 860px) {
  .daily-mail-confirm-grid {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }
}

.daily-mail-recipient-card {
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-bottom: 8px;
}

.daily-mail-recipient-card:hover {
  background: rgba(0, 229, 255, 0.08);
  border-color: rgba(0, 229, 255, 0.3);
}

.daily-mail-recipient-card.active {
  background: rgba(0, 229, 255, 0.15);
  border-color: #00e5ff;
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.2);
}

.daily-mail-tpl-modal-large {
  width: 90vw !important;
  max-width: 1150px !important;
  height: 85vh !important;
  max-height: 88vh !important;
  display: flex;
  flex-direction: column;
}

.daily-mail-tpl-modal-large .daily-mail-submodal-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 16px 20px;
  overflow-y: auto;
}

.daily-mail-tpl-modal-large .mail-editor-grid {
  flex: 1;
  min-height: 320px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  grid-template-rows: 1fr;
  align-items: stretch;
}

.daily-mail-tpl-modal-large .mail-editor-wrapper {
  position: relative;
  height: 100% !important;
  min-height: 320px;
  display: block;
}

.daily-mail-tpl-modal-large .mail-var-sidebar {
  height: 100% !important;
  min-height: 320px;
  display: flex;
  flex-direction: column;
}

.daily-mail-tpl-modal-large .mail-editor-textarea {
  height: 100% !important;
  min-height: 0 !important;
  resize: none !important;
}

.daily-mail-submodal-header {
  padding: 14px 20px;
  background: rgba(15, 23, 42, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.daily-mail-submodal-title {
  font-size: 1.05rem;
  font-weight: bold;
  color: #00e5ff;
}

.daily-mail-submodal-body {
  padding: 18px 20px;
  overflow-y: auto;
  flex: 1;
}

.daily-mail-submodal-footer {
  padding: 12px 20px;
  background: rgba(15, 23, 42, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

