:root {
  --brand-primary: #7387ff;
  --brand-accent: #00d8ff;
  --brand-surface: #1c2642;
  --brand-surface-alt: #10182d;
  --brand-surface-muted: #252f51;
  --brand-text: #f2f4ff;
  --brand-text-muted: #bbc6f0;
  --border-soft: rgba(115, 135, 255, 0.28);
  --shadow-soft: 0 24px 48px rgba(6, 10, 22, 0.55);
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --transition-base: 0.2s ease;
}

body {
  font-family: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", "Segoe UI", sans-serif;
  background: var(--brand-surface-alt);
  color: var(--brand-text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a,
a strong {
  color: var(--brand-accent);
}

a {
  transition: color var(--transition-base);
}

a:hover,
a:focus {
  color: #7deaff;
}

main {
  flex: 1 0 auto;
  padding: 2.5rem 0 3rem;
}

.navbar {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(15, 20, 36, 0.92);
  backdrop-filter: blur(12px);
}

.navbar-brand {
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #d7deff !important;
}

.navbar-nav .nav-link {
  font-weight: 600;
  color: var(--brand-text-muted);
  transition: color var(--transition-base);
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus,
.navbar-nav .nav-link.active {
  color: var(--brand-accent);
}

@media (max-width: 991.98px) {
  .navbar .navbar-collapse {
    background: rgba(15, 20, 36, 0.94);
    border: 1px solid rgba(0, 216, 255, 0.16);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-top: 0.75rem;
    box-shadow: 0 20px 32px rgba(8, 12, 26, 0.45);
  }

  .navbar .navbar-nav .nav-link {
    border-bottom: 1px solid rgba(0, 216, 255, 0.08);
    padding: 0.75rem 0;
  }

  .navbar .navbar-nav .nav-link:last-child {
    border-bottom: none;
  }
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-accent));
  border: none;
  border-radius: var(--radius-sm);
  color: #0b1224;
  font-weight: 600;
  box-shadow: 0 12px 30px rgba(0, 228, 255, 0.3);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.btn-primary:hover,
.btn-primary:focus {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(0, 228, 255, 0.35);
}

.btn-danger {
  background: linear-gradient(135deg, rgba(140, 47, 71, 0.9), rgba(111, 34, 51, 0.92));
  border: none;
  border-radius: var(--radius-sm);
  color: #ffe0eb;
  font-weight: 600;
  box-shadow: 0 12px 28px rgba(255, 120, 147, 0.35);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.btn-danger:hover,
.btn-danger:focus {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(255, 120, 147, 0.45);
  color: #ffe8f1;
}

.btn-outline-primary {
  border-radius: var(--radius-sm);
  border-color: rgba(0, 216, 255, 0.5);
  color: #8ef2ff;
  transition: background var(--transition-base), color var(--transition-base), border-color var(--transition-base);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
  background: rgba(0, 216, 255, 0.16);
  border-color: rgba(0, 216, 255, 0.75);
  color: #b7f7ff;
}

.btn-outline-danger {
  border-radius: var(--radius-sm);
  border-color: rgba(255, 120, 147, 0.45);
  color: #ffbccd;
  transition: background var(--transition-base), color var(--transition-base), border-color var(--transition-base);
}

.btn-outline-danger:hover,
.btn-outline-danger:focus {
  background: rgba(140, 47, 71, 0.25);
  border-color: rgba(255, 120, 147, 0.65);
  color: #ffe0eb;
}

.btn-light {
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.15);
  color: var(--brand-text);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-light:hover,
.btn-light:focus {
  background: rgba(255, 255, 255, 0.22);
}


.card {
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-lg);
  background: rgba(22, 31, 55, 0.85);
  box-shadow: var(--shadow-soft);
  color: var(--brand-text);
}

.card-header {
  border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(135deg, rgba(63, 81, 160, 0.45), rgba(28, 44, 96, 0.75));
  color: #e9edff;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}

.section-title i {
  color: var(--brand-accent);
}

.hero-card {
  padding: 3rem 3.5rem;
  border-radius: 28px;
  background: linear-gradient(120deg, rgba(41, 54, 107, 0.95), rgba(3, 105, 238, 0.85));
  color: #f2f6ff;
  overflow: hidden;
  position: relative;
  box-shadow: 0 30px 60px rgba(9, 15, 32, 0.45);
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  pointer-events: none;
}

.hero-card .lead {
  font-size: 1.12rem;
  color: rgba(243, 245, 255, 0.88);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.info-chip {
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: rgba(0, 228, 255, 0.16);
  color: #8ff3ff;
  font-weight: 600;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.muted-card {
  background: var(--brand-surface-muted);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--brand-text);
}

.list-card {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 1.5rem;
  background: var(--brand-surface);
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}

.list-card:hover {
  transform: translateY(-3px);
  border-color: rgba(0, 228, 255, 0.35);
  box-shadow: 0 22px 40px rgba(6, 12, 26, 0.55);
}

.list-card h5 {
  margin-bottom: 0.6rem;
  color: #f4f6ff;
}

.timeline {
  display: grid;
  gap: 1rem;
}

.timeline-step {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.2rem;
  border-radius: var(--radius-md);
  background: rgba(0, 228, 255, 0.08);
  border: 1px solid rgba(0, 228, 255, 0.18);
}

.timeline-step .step-index {
  min-width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--brand-accent);
  background: rgba(12, 20, 45, 0.85);
  box-shadow: 0 8px 20px rgba(0, 228, 255, 0.22);
}

.badge-soft {
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-weight: 600;
  background: rgba(0, 228, 255, 0.12);
  color: #85eaff;
}

.status-urgent {
  border-left: 4px solid #ff6b81;
}

.status-warn {
  border-left: 4px solid #ffb347;
}

.status-info {
  border-left: 4px solid #5ae3ff;
}

.footer {
  background: rgba(15, 20, 36, 0.92);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding: 1.5rem 0;
  margin-top: auto;
  color: var(--brand-text-muted);
}

.avatar-stack {
  display: flex;
  align-items: center;
}

.avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--brand-surface-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--brand-accent);
  margin-right: 0.4rem;
}

.empty-state {
  text-align: center;
  padding: 3rem 1.25rem;
  border-radius: var(--radius-lg);
  border: 1px dashed rgba(0, 228, 255, 0.4);
  background: rgba(0, 228, 255, 0.08);
  color: var(--brand-text);
}

.empty-state i {
  font-size: 2rem;
  color: var(--brand-accent);
  margin-bottom: 0.75rem;
}

.flash-container {
  position: fixed;
  top: 80px;
  right: 24px;
  z-index: 1055;
  display: grid;
  gap: 0.75rem;
}

.flash-message {
  border-radius: var(--radius-md);
  box-shadow: 0 16px 38px rgba(8, 12, 26, 0.45);
  padding: 0.75rem 1.1rem;
  background: var(--brand-surface);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--brand-text);
}

.card-text,
p {
  color: rgba(239, 242, 255, 0.9);
}

.text-muted,
small,
.lead small {
  color: var(--brand-text-muted) !important;
}

.text-dark {
  color: var(--brand-text) !important;
}

.alert {
  background: linear-gradient(150deg, rgba(26, 34, 56, 0.92), rgba(20, 27, 45, 0.95));
  border: 1px solid rgba(115, 135, 255, 0.25);
  color: rgba(241, 244, 255, 0.95);
}

.alert-success {
  background: linear-gradient(135deg, rgba(34, 62, 59, 0.92), rgba(26, 46, 40, 0.92));
  border-color: rgba(79, 209, 197, 0.35);
  color: #d6fff5;
}

.alert-warning {
  background: linear-gradient(135deg, rgba(78, 51, 20, 0.92), rgba(118, 75, 16, 0.92));
  border-color: rgba(255, 179, 71, 0.45);
  color: #ffe6b0;
}

.alert-danger {
  background: linear-gradient(135deg, rgba(64, 20, 34, 0.92), rgba(98, 27, 37, 0.92));
  border-color: rgba(255, 94, 129, 0.42);
  color: #ffd5e1;
}

.bg-info {
  background: linear-gradient(135deg, rgba(26, 52, 84, 0.92), rgba(16, 34, 63, 0.94)) !important;
  color: #dbeeff !important;
}

.card-header.bg-info {
  background: linear-gradient(135deg, rgba(32, 68, 112, 0.88), rgba(20, 41, 76, 0.9)) !important;
  color: #dff6ff !important;
  border-bottom-color: rgba(0, 216, 255, 0.32) !important;
}

.bg-warning {
  background: linear-gradient(135deg, rgba(74, 51, 22, 0.92), rgba(118, 78, 18, 0.94)) !important;
  color: #ffe9bd !important;
}

.card-header.bg-warning {
  background: linear-gradient(135deg, rgba(132, 84, 22, 0.88), rgba(101, 64, 17, 0.92)) !important;
  color: #ffeaca !important;
  border-bottom-color: rgba(255, 188, 87, 0.38) !important;
}

.bg-primary {
  background: linear-gradient(135deg, rgba(40, 54, 110, 0.95), rgba(22, 35, 73, 0.95)) !important;
  color: #e9efff !important;
}

.card-header.bg-primary {
  background: linear-gradient(135deg, rgba(42, 58, 112, 0.9), rgba(24, 36, 72, 0.92)) !important;
  color: #e8edff !important;
  border-bottom-color: rgba(115, 135, 255, 0.35) !important;
}

.btn-outline-secondary,
.btn-outline-info,
.btn-outline-warning {
  color: rgba(220, 226, 255, 0.9);
  border-color: rgba(200, 210, 255, 0.3);
  background: transparent;
}

.btn-outline-secondary:hover,
.btn-outline-info:hover,
.btn-outline-warning:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(0, 216, 255, 0.35);
  color: rgba(232, 238, 255, 0.96);
}

.form-control,
.form-select,
.form-control:focus,
.form-select:focus {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--brand-text);
  box-shadow: none;
}

.form-control::placeholder,
.form-select option {
  color: rgba(188, 199, 235, 0.7);
}

.badge {
  border-radius: 999px;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  letter-spacing: 0.02em;
  border: 1px solid rgba(0, 216, 255, 0.16);
  background: rgba(23, 30, 54, 0.82);
  color: var(--brand-text);
  text-transform: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.badge.bg-primary {
  background: linear-gradient(135deg, rgba(66, 88, 171, 0.7), rgba(35, 53, 112, 0.85)) !important;
  border-color: rgba(115, 135, 255, 0.42);
  color: #e8edff !important;
}

.badge.bg-success {
  background: linear-gradient(135deg, rgba(34, 124, 112, 0.68), rgba(27, 88, 76, 0.78)) !important;
  border-color: rgba(92, 233, 198, 0.4);
  color: #dcfff5 !important;
}

.badge.bg-danger {
  background: linear-gradient(135deg, rgba(140, 47, 71, 0.72), rgba(111, 34, 51, 0.82)) !important;
  border-color: rgba(255, 120, 147, 0.45);
  color: #ffe0eb !important;
}

.badge.bg-info {
  background: linear-gradient(135deg, rgba(40, 109, 153, 0.68), rgba(26, 68, 112, 0.82)) !important;
  border-color: rgba(0, 216, 255, 0.42);
  color: #dff6ff !important;
}

.badge.bg-secondary {
  background: linear-gradient(135deg, rgba(74, 82, 110, 0.7), rgba(47, 55, 82, 0.82)) !important;
  border-color: rgba(156, 163, 194, 0.32);
  color: #e6e9ff !important;
}

.badge.bg-warning,
.badge.bg-warning.text-dark {
  background: linear-gradient(135deg, rgba(170, 112, 36, 0.7), rgba(132, 84, 22, 0.82)) !important;
  border-color: rgba(255, 188, 87, 0.45);
  color: #ffe9bd !important;
}

.card-header.bg-success {
  background: linear-gradient(135deg, rgba(36, 92, 80, 0.88), rgba(28, 72, 61, 0.92)) !important;
  color: #d8fff2 !important;
  border-bottom-color: rgba(82, 233, 189, 0.38) !important;
}

.card-header.bg-danger {
  background: linear-gradient(135deg, rgba(115, 35, 53, 0.9), rgba(84, 25, 39, 0.92)) !important;
  color: #ffe0eb !important;
  border-bottom-color: rgba(255, 107, 129, 0.4) !important;
}

.card-header.bg-secondary {
  background: linear-gradient(135deg, rgba(74, 82, 110, 0.88), rgba(47, 55, 82, 0.92)) !important;
  color: #e6e9ff !important;
  border-bottom-color: rgba(156, 163, 194, 0.28) !important;
}

.border-warning {
  border-color: rgba(255, 188, 87, 0.42) !important;
}

.border-primary {
  border-color: rgba(115, 135, 255, 0.4) !important;
}

.border-success {
  border-color: rgba(82, 233, 189, 0.38) !important;
}

.border-danger {
  border-color: rgba(255, 120, 147, 0.42) !important;
}

.border-info {
  border-color: rgba(0, 216, 255, 0.38) !important;
}

.progress {
  background: rgba(18, 26, 48, 0.8);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(0, 216, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.progress-bar {
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-accent));
  box-shadow: 0 6px 14px rgba(0, 216, 255, 0.25);
}

@media (max-width: 992px) {
  .hero-card {
    padding: 2.4rem 2.6rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .timeline-step {
    flex-direction: column;
  }

  main {
    padding: 2rem 0 2.5rem;
  }
}

@media (max-width: 576px) {
  body {
    font-size: 0.95rem;
  }

  .hero-card {
    padding: 2rem 1.8rem;
  }

  .navbar {
    border-radius: 0;
  }

  .flash-container {
    left: 1rem;
    right: 1rem;
    top: 72px;
  }
}
.card-body {
  background: linear-gradient(160deg, rgba(21, 29, 53, 0.9), rgba(16, 22, 41, 0.95));
}

.bg-light,
.bg-white {
  background: radial-gradient(circle at top left, rgba(42, 58, 96, 0.92), rgba(20, 29, 51, 0.95)) !important;
  color: rgba(232, 238, 255, 0.96) !important;
  border-radius: var(--radius-md);
  border: 1px solid rgba(142, 242, 255, 0.16) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.surface-panel {
  background: radial-gradient(circle at top left, rgba(45, 62, 104, 0.9), rgba(24, 34, 62, 0.95));
  color: rgba(232, 238, 255, 0.96);
  border: 1px solid rgba(0, 216, 255, 0.18);
  border-radius: var(--radius-md);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.surface-glass {
  background: linear-gradient(160deg, rgba(23, 29, 50, 0.8), rgba(16, 23, 39, 0.92));
  border: 1px solid rgba(0, 216, 255, 0.12);
  border-radius: var(--radius-md);
  backdrop-filter: blur(6px);
}

.list-group-item {
  background: rgba(23, 30, 54, 0.94) !important;
  border: 1px solid rgba(0, 216, 255, 0.12) !important;
  color: rgba(231, 236, 255, 0.95) !important;
  transition: background var(--transition-base), border-color var(--transition-base);
}

.list-group-item .text-muted {
  color: rgba(182, 194, 235, 0.75) !important;
}

.list-group-item:not(.active):hover {
  background: rgba(34, 45, 76, 0.96) !important;
  border-color: rgba(0, 216, 255, 0.28) !important;
}

.modal-content {
  background: linear-gradient(160deg, rgba(18, 24, 44, 0.96), rgba(10, 14, 28, 0.98));
  border: 1px solid rgba(0, 216, 255, 0.18);
  color: var(--brand-text);
  box-shadow: 0 24px 60px rgba(6, 10, 22, 0.7);
}

.modal-header,
.modal-footer {
  border-color: rgba(255, 255, 255, 0.08);
}

.modal-header .btn-close {
  filter: invert(90%);
}

.breadcrumb {
  background: rgba(18, 26, 44, 0.6);
  border-radius: var(--radius-sm);
  padding: 0.65rem 1rem;
}

.breadcrumb .breadcrumb-item,
.breadcrumb .breadcrumb-item a {
  color: rgba(196, 206, 240, 0.9);
}

.chat-messages,
#chat-messages,
.bg-light .chat-messages,
.surface-panel .chat-messages {
  background: linear-gradient(155deg, rgba(19, 28, 49, 0.92), rgba(11, 18, 36, 0.96));
  border: 1px solid rgba(0, 216, 255, 0.18);
  color: rgba(228, 234, 255, 0.96);
  box-shadow: inset 0 16px 32px rgba(2, 6, 14, 0.58);
  padding: 18px;
  border-radius: var(--radius-md);
}

.message-scroll {
  height: 460px;
  overflow-y: auto;
  touch-action: pan-y;
}

.chat-messages .message,
#chat-messages .message {
  background: rgba(23, 32, 58, 0.75);
  border: 1px solid rgba(0, 216, 255, 0.12);
  border-radius: 14px;
  padding: 10px 14px;
  margin-bottom: 12px;
  color: rgba(232, 238, 255, 0.96);
}

.chat-messages .message.admin,
#chat-messages .message.admin {
  background: linear-gradient(135deg, rgba(50, 68, 118, 0.85), rgba(32, 45, 88, 0.88));
  border-color: rgba(0, 216, 255, 0.3);
}

.form-label,
label {
  color: rgba(224, 230, 255, 0.88);
}
.chat-messages .message,
#chat-messages .message {
  background: rgba(25, 33, 60, 0.78);
  border: 1px solid rgba(0, 216, 255, 0.16);
  border-radius: 14px;
  padding: 12px 16px;
  margin-bottom: 14px;
  color: rgba(232, 238, 255, 0.96);
}

.chat-messages .message:last-child,
#chat-messages .message:last-child {
  margin-bottom: 0;
}

.message-header strong {
  color: rgba(239, 244, 255, 0.96);
}

.message-meta {
  color: rgba(188, 199, 235, 0.7);
  font-size: 12px;
}

.message-content {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border-left: 3px solid transparent;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(225, 231, 255, 0.95);
}

.message.system .message-content {
  background: rgba(142, 149, 175, 0.18);
  border-left-color: rgba(188, 199, 235, 0.7);
}

.message.admin .message-content {
  background: rgba(229, 96, 123, 0.18);
  border-left-color: rgba(255, 104, 139, 0.65);
}

.message.user .message-content {
  background: rgba(0, 216, 255, 0.12);
  border-left-color: rgba(0, 216, 255, 0.6);
}
