:root {
  --v2-bg: #f6f8fb;
  --v2-surface: #ffffff;
  --v2-surface-soft: #eef4f7;
  --v2-line: #dce4ea;
  --v2-text: #17212b;
  --v2-muted: #667789;
  --v2-primary: #0f766e;
  --v2-primary-dark: #0b5f59;
  --v2-primary-soft: #dff4f1;
  --v2-accent: #c2410c;
  --v2-accent-soft: #fff1e8;
  --v2-focus: rgba(15, 118, 110, 0.22);
  --v2-shadow: 0 16px 44px rgba(23, 33, 43, 0.08);
  --v2-shadow-soft: 0 10px 28px rgba(23, 33, 43, 0.05);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body.tfdv-v2 {
  min-height: 100vh;
  margin: 0;
  color: var(--v2-text);
  background:
    linear-gradient(180deg, rgba(15, 118, 110, 0.08), rgba(246, 248, 251, 0) 320px),
    var(--v2-bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  line-height: 1.6;
}

a {
  color: var(--v2-primary);
}

a:hover {
  color: var(--v2-primary-dark);
}

.v2-navbar {
  padding: 0.65rem clamp(1rem, 2.4vw, 2rem);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(220, 228, 234, 0.92);
  box-shadow: 0 10px 30px rgba(23, 33, 43, 0.06);
  backdrop-filter: blur(16px);
}

.v2-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  margin-right: 1.4rem;
  color: var(--v2-text) !important;
}

.v2-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  color: #fff;
  background: var(--v2-primary);
  border-radius: 8px;
  box-shadow: 0 12px 26px rgba(15, 118, 110, 0.28);
}

.v2-brand-title,
.v2-brand-subtitle {
  display: block;
  line-height: 1.25;
}

.v2-brand-title {
  font-size: 1.02rem;
  font-weight: 800;
}

.v2-brand-subtitle {
  max-width: 20rem;
  margin-top: 0.1rem;
  overflow: hidden;
  color: var(--v2-muted);
  font-size: 0.78rem;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v2-main-nav {
  gap: 0.25rem;
}

.v2-main-nav .nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 40px;
  padding: 0.48rem 0.72rem !important;
  color: #3b4b5a !important;
  border-radius: 8px;
  font-weight: 700;
}

.v2-main-nav .nav-link:hover,
.v2-main-nav .nav-link.active {
  color: var(--v2-primary-dark) !important;
  background: var(--v2-primary-soft);
}

.v2-dropdown {
  padding: 0.45rem;
  border: 1px solid var(--v2-line);
  border-radius: 8px;
  box-shadow: var(--v2-shadow);
}

.v2-dropdown .dropdown-item {
  border-radius: 6px;
  color: #263542;
  font-weight: 600;
}

.v2-dropdown .dropdown-item:hover {
  color: var(--v2-primary-dark);
  background: var(--v2-primary-soft);
}

.v2-nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 0.75rem;
}

.v2-icon-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: #324353;
  background: #f3f6f8;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 1.15rem;
}

.v2-icon-button:hover {
  color: var(--v2-primary-dark);
  background: var(--v2-primary-soft);
  text-decoration: none;
}

.v2-badge {
  position: absolute;
  top: 2px;
  right: 1px;
  transform: translate(35%, -35%);
}

.v2-user-menu {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-left: 0.25rem;
  padding-left: 0.7rem;
  border-left: 1px solid var(--v2-line);
}

.v2-user-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  max-width: 13rem;
  color: var(--v2-text);
  font-weight: 800;
}

.v2-user-link:hover {
  color: var(--v2-primary-dark);
  text-decoration: none;
}

.v2-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  object-fit: cover;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(23, 33, 43, 0.16);
}

.v2-avatar-fallback {
  color: #fff;
  background: var(--v2-primary);
  font-weight: 800;
}

.v2-user-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v2-logout {
  border-radius: 8px;
  font-weight: 700;
}

.v2-page-shell {
  min-height: calc(100vh - 155px);
}

.v2-content {
  width: min(100%, 1320px);
  padding: clamp(1rem, 2vw, 1.75rem);
}

.v2-content > .container,
.v2-content > .container-fluid {
  width: 100%;
  max-width: none;
  padding-right: 0;
  padding-left: 0;
  margin-top: 0 !important;
}

.v2-content h1,
.v2-content h2,
.v2-content h3,
.v2-content h4 {
  color: var(--v2-text);
  font-weight: 850;
  letter-spacing: 0;
}

.v2-content > h1:first-child,
.v2-content > h2:first-child,
.v2-content > .container > h1:first-child,
.v2-content > .container > h2:first-child,
.v2-page-title {
  margin-bottom: 1rem;
}

.v2-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.1rem;
  padding: 1.1rem 1.2rem;
  background: linear-gradient(135deg, #ffffff, #f5faf9);
  border: 1px solid var(--v2-line);
  border-left: 5px solid var(--v2-primary);
  border-radius: 8px;
  box-shadow: var(--v2-shadow-soft);
}

.v2-page-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  color: var(--v2-primary-dark);
  background: var(--v2-primary-soft);
  border-radius: 8px;
  font-size: 1.35rem;
}

.v2-page-title-group {
  flex: 1 1 auto;
  min-width: 0;
}

.v2-page-header h1,
.v2-page-header h2 {
  margin: 0;
  font-size: clamp(1.35rem, 2.4vw, 2rem);
}

.v2-page-header .v2-page-subtitle {
  margin: 0.35rem 0 0;
  color: var(--v2-muted);
}

.v2-page-actions,
.v2-action-row,
.v2-content .btn-group,
.v2-content .form-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.v2-table-count {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0.25rem 0.65rem;
  color: var(--v2-primary-dark);
  background: var(--v2-primary-soft);
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 850;
}

.v2-content > p {
  color: var(--v2-muted);
}

.v2-content .alert {
  border: 0;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(23, 33, 43, 0.06);
}

.v2-content .card,
.v2-panel,
.v2-form-panel,
.v2-content .jumbotron {
  background: var(--v2-surface);
  border: 1px solid var(--v2-line);
  border-radius: 8px;
  box-shadow: var(--v2-shadow-soft);
}

.v2-content .jumbotron {
  padding: clamp(1rem, 2vw, 1.35rem);
}

.v2-content .jumbotron .container {
  width: 100%;
  max-width: none;
  padding-right: 0;
  padding-left: 0;
}

.v2-content .card-header {
  background: #f8fafb;
  border-bottom: 1px solid var(--v2-line);
  font-weight: 800;
}

.v2-content .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 40px;
  border-radius: 8px;
  font-weight: 750;
  white-space: normal;
}

.v2-content .btn-sm {
  min-height: 34px;
  padding: 0.28rem 0.62rem;
  font-size: 0.875rem;
}

.v2-content .btn-link {
  min-height: auto;
}

.v2-content .btn-warning {
  color: #5f3205;
  background: #facc15;
  border-color: #facc15;
}

.v2-content .btn-danger {
  background: #dc2626;
  border-color: #dc2626;
}

.v2-content .btn-secondary,
.v2-content a.btn-secondary {
  color: #fff;
  background: #475569;
  border-color: #475569;
}

.v2-content .btn-secondary:hover,
.v2-content a.btn-secondary:hover {
  color: #fff;
  background: #334155;
  border-color: #334155;
}

.v2-content .btn-outline-secondary {
  color: #334155;
  border-color: #b8c5d0;
}

.v2-content .btn-outline-primary {
  color: var(--v2-primary-dark);
  border-color: rgba(15, 118, 110, 0.44);
}

.v2-content .btn-outline-primary:hover,
.v2-content .btn-outline-primary.active {
  color: #fff;
  background: var(--v2-primary);
  border-color: var(--v2-primary);
}

.v2-content .btn-outline-success {
  color: #166534;
  border-color: rgba(22, 101, 52, 0.42);
}

.v2-content .btn-outline-success:hover,
.v2-content .btn-outline-success.active {
  color: #fff;
  background: #15803d;
  border-color: #15803d;
}

.v2-content .btn-primary {
  background: var(--v2-primary);
  border-color: var(--v2-primary);
}

.v2-content .btn-primary:hover,
.v2-content .btn-primary:focus {
  background: var(--v2-primary-dark);
  border-color: var(--v2-primary-dark);
}

.v2-content .btn-success {
  background: #15803d;
  border-color: #15803d;
}

.v2-content a.btn[href*="filter=team"][href*="team_id"],
.v2-content a.btn[href*="team_id"][href*="filter=team"] {
  color: var(--v2-primary-dark);
  background: #effafa;
  border-color: rgba(15, 118, 110, 0.42);
}

.v2-content a.btn[href*="filter=team"][href*="team_id"]:hover,
.v2-content a.btn[href*="filter=team"][href*="team_id"].active,
.v2-content a.btn[href*="team_id"][href*="filter=team"]:hover,
.v2-content a.btn[href*="team_id"][href*="filter=team"].active {
  color: #fff;
  background: var(--v2-primary);
  border-color: var(--v2-primary);
}

.v2-content a.btn[href*="filter=aggregated"][href*="team_id"],
.v2-content a.btn[href*="team_id"][href*="filter=aggregated"] {
  color: #166534;
  background: #f0fdf4;
  border-color: rgba(22, 101, 52, 0.42);
}

.v2-content a.btn[href*="filter=aggregated"][href*="team_id"]:hover,
.v2-content a.btn[href*="filter=aggregated"][href*="team_id"].active,
.v2-content a.btn[href*="team_id"][href*="filter=aggregated"]:hover,
.v2-content a.btn[href*="team_id"][href*="filter=aggregated"].active {
  color: #fff;
  background: #15803d;
  border-color: #15803d;
}

.v2-content .btn-info {
  background: #2563eb;
  border-color: #2563eb;
}

.v2-content .form-control,
.v2-content .custom-select,
.v2-content .form-select,
.v2-content select,
.v2-content textarea,
.v2-content input[type="text"],
.v2-content input[type="date"],
.v2-content input[type="time"],
.v2-content input[type="number"],
.v2-content input[type="email"],
.v2-content input[type="password"] {
  min-height: 42px;
  border-color: #cad6df;
  border-radius: 8px;
}

.v2-content .form-control:focus,
.v2-content .custom-select:focus,
.v2-content .form-select:focus {
  border-color: var(--v2-primary);
  box-shadow: 0 0 0 0.2rem var(--v2-focus);
}

.v2-content label {
  margin-bottom: 0.35rem;
  color: #2f4050;
  font-weight: 750;
}

.v2-content .form-group {
  margin-bottom: 1rem;
}

.v2-content .form-row {
  row-gap: 0.8rem;
}

.v2-content .form-inline {
  row-gap: 0.6rem;
}

.v2-content .form-inline .form-control,
.v2-content .form-inline .custom-select,
.v2-content .form-inline select {
  width: auto;
  max-width: 100%;
}

.v2-content .row {
  row-gap: 0.8rem;
}

.v2-content .form-label {
  display: inline-block;
  margin-bottom: 0.35rem;
  color: #2f4050;
  font-weight: 750;
}

.v2-content .form-check-inline {
  margin-right: 1rem;
  padding: 0.4rem 0.7rem;
  background: #f8fafb;
  border: 1px solid var(--v2-line);
  border-radius: 8px;
}

.v2-form-panel {
  margin-bottom: 1.2rem;
  padding: clamp(1rem, 2vw, 1.35rem);
}

.v2-form-panel > .form-group:last-child,
.v2-form-panel > p:last-child {
  margin-bottom: 0;
}

.v2-compact-form {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin: 0.15rem 0;
}

.v2-compact-form .btn,
.v2-compact-form input[type="submit"].btn {
  min-height: 34px;
}

.v2-content .input-group {
  gap: 0.55rem;
}

.v2-content .input-group > .form-control,
.v2-content .input-group > .custom-select {
  border-radius: 8px !important;
}

.v2-content table {
  width: 100%;
  margin-bottom: 0;
  background: var(--v2-surface);
}

.v2-content .table-responsive {
  margin-bottom: 1.2rem;
  background: var(--v2-surface);
  border: 1px solid var(--v2-line);
  border-radius: 8px;
  box-shadow: var(--v2-shadow-soft);
}

.v2-content .table th,
.v2-content table th {
  color: #2d3c49;
  background: #edf5f4;
  border-top: 0;
  font-size: 0.92rem;
  font-weight: 850;
  white-space: nowrap;
}

.v2-content .table td,
.v2-content table td {
  vertical-align: middle;
  border-color: #e5edf2;
}

.v2-content .table-bordered,
.v2-content .table-bordered td,
.v2-content .table-bordered th {
  border-color: #e5edf2;
}

.v2-content .table-hover tbody tr:hover {
  background: #f7fbfa;
}

.v2-content .table td .btn + .btn,
.v2-content .table td a + a,
.v2-content .table td form + form {
  margin-left: 0.25rem;
}

.v2-content .badge {
  border-radius: 999px;
  font-weight: 800;
}

.v2-content .badge.bg-success,
.v2-content .badge-success {
  color: #fff;
  background: #15803d;
}

.v2-content .badge.bg-warning,
.v2-content .badge-warning {
  color: #5f3205;
  background: #facc15;
}

.v2-content .badge.bg-danger,
.v2-content .badge-danger {
  color: #fff;
  background: #dc2626;
}

.v2-status-hint {
  border-left: 5px solid var(--v2-primary) !important;
}

.v2-status-hint.alert-warning {
  border-left-color: #f59e0b !important;
}

.v2-content .align-middle {
  vertical-align: middle !important;
}

.v2-content .text-end {
  text-align: right !important;
}

.v2-content .modal-content {
  border: 0;
  border-radius: 8px;
  box-shadow: var(--v2-shadow);
}

.v2-content .modal-header,
.modal-header {
  border-bottom-color: var(--v2-line);
}

.v2-content .modal-footer,
.modal-footer {
  border-top-color: var(--v2-line);
}

.modal.show {
  display: block;
}

body.modal-open {
  overflow: hidden;
}

.modal-backdrop.v2-fallback-backdrop {
  opacity: 0.5;
}

.v2-filter-panel {
  margin-bottom: 1rem;
  padding: 0.9rem;
  background: #fff;
  border: 1px solid var(--v2-line);
  border-radius: 8px;
  box-shadow: var(--v2-shadow-soft);
}

.v2-filter-cluster {
  display: block;
}

.v2-filter-cluster strong {
  display: block;
  margin-bottom: 0.55rem;
  color: var(--v2-text);
}

.v2-filter-cluster .btn {
  margin: 0.15rem 0.2rem 0.15rem 0;
}

.v2-filter-cluster ul {
  margin-bottom: 0;
}

.v2-list-panel {
  padding: 1rem 1rem 1rem 1.35rem;
  background: var(--v2-surface);
  border: 1px solid var(--v2-line);
  border-radius: 8px;
  box-shadow: var(--v2-shadow-soft);
}

.v2-info-list {
  display: grid;
  gap: 0.65rem;
  padding: 0;
  margin: 0 0 1rem;
  list-style: none;
}

.v2-info-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0.8rem;
  background: #f8fbfb;
  border: 1px solid var(--v2-line);
  border-radius: 8px;
}

.v2-info-label {
  color: var(--v2-muted);
  font-size: 0.9rem;
  font-weight: 750;
}

.v2-info-list strong {
  color: var(--v2-text);
  text-align: right;
  word-break: break-word;
}

.v2-kind-panel {
  margin-bottom: 1.2rem;
  padding: 0.75rem;
  background: var(--v2-surface);
  border: 1px solid var(--v2-line);
  border-radius: 8px;
  box-shadow: var(--v2-shadow-soft);
}

.v2-kind-tree {
  padding-left: 0;
  margin: 0;
  list-style: none;
}

.v2-kind-tree .v2-kind-tree {
  margin-top: 0.45rem;
}

.v2-kind-item + .v2-kind-item {
  margin-top: 0.45rem;
}

.v2-kind-node {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.65rem 0.75rem 0.65rem calc(0.75rem + (var(--v2-kind-level, 0) * 1.35rem));
  background: #f8fbfb;
  border: 1px solid var(--v2-line);
  border-radius: 8px;
}

.v2-kind-node[data-level="1"] {
  --v2-kind-level: 1;
}

.v2-kind-node[data-level="2"] {
  --v2-kind-level: 2;
}

.v2-kind-node[data-level="3"] {
  --v2-kind-level: 3;
}

.v2-kind-node[data-level="4"] {
  --v2-kind-level: 4;
}

.v2-kind-node[data-level="5"] {
  --v2-kind-level: 5;
}

.v2-kind-node[data-level="6"] {
  --v2-kind-level: 6;
}

.v2-kind-node[data-level="7"] {
  --v2-kind-level: 7;
}

.v2-kind-node[data-level="8"] {
  --v2-kind-level: 8;
}

.v2-kind-name {
  color: var(--v2-text);
  font-weight: 800;
}

.v2-kind-actions {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem;
}

.v2-content [class*="collapse"] {
  margin-top: 0.5rem;
}

.v2-content .collapse.show {
  display: block;
}

.v2-content .ms-1 { margin-left: 0.25rem !important; }
.v2-content .ms-2 { margin-left: 0.5rem !important; }
.v2-content .ms-3 { margin-left: 1rem !important; }
.v2-content .me-1 { margin-right: 0.25rem !important; }
.v2-content .me-2 { margin-right: 0.5rem !important; }
.v2-content .me-3 { margin-right: 1rem !important; }
.v2-content .g-2 {
  margin-right: -0.25rem;
  margin-left: -0.25rem;
}
.v2-content .g-2 > [class*="col"],
.v2-content .g-2 > .col-auto {
  padding-right: 0.25rem;
  padding-left: 0.25rem;
}

.v2-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(1rem, 3vw, 2rem);
  align-items: center;
  margin-bottom: 1.5rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  color: #fff;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.96), rgba(12, 74, 110, 0.92)),
    url("../img/v2-hero-pattern.svg");
  background-size: cover;
  border-radius: 8px;
  box-shadow: var(--v2-shadow);
}

.v2-hero h1 {
  margin-bottom: 0.45rem;
  color: #fff;
  font-size: clamp(1.75rem, 4vw, 2.8rem);
  font-weight: 900;
  letter-spacing: 0;
}

.v2-hero p {
  max-width: 43rem;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.86);
}

.v2-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: flex-end;
}

.v2-page-index .v2-hero {
  min-height: 190px;
}

.v2-dashboard-hero {
  min-height: 170px;
}

.v2-hero-actions .btn {
  min-height: 44px;
  padding-right: 1rem;
  padding-left: 1rem;
}

.v2-quick-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}

.v2-quick-card {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-height: 92px;
  padding: 1rem;
  color: var(--v2-text);
  background: var(--v2-surface);
  border: 1px solid var(--v2-line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(23, 33, 43, 0.05);
}

.v2-quick-card:hover {
  color: var(--v2-primary-dark);
  border-color: rgba(15, 118, 110, 0.28);
  text-decoration: none;
  transform: translateY(-1px);
}

.v2-quick-card i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  color: var(--v2-primary-dark);
  background: var(--v2-primary-soft);
  border-radius: 8px;
  font-size: 1.25rem;
}

.v2-quick-card strong,
.v2-quick-card span {
  display: block;
}

.v2-quick-card strong {
  font-size: 1rem;
}

.v2-quick-card span {
  color: var(--v2-muted);
  font-size: 0.86rem;
}

.v2-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}

.v2-dashboard-card {
  min-height: 128px;
  padding: 1rem;
  background: var(--v2-surface);
  border: 1px solid var(--v2-line);
  border-radius: 8px;
  box-shadow: var(--v2-shadow-soft);
}

.v2-dashboard-label,
.v2-dashboard-card small {
  display: block;
  color: var(--v2-muted);
}

.v2-dashboard-label {
  margin-bottom: 0.35rem;
  font-size: 0.86rem;
  font-weight: 800;
}

.v2-dashboard-card strong {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--v2-text);
  font-size: 1.55rem;
  font-weight: 900;
  line-height: 1.2;
}

.v2-dashboard-action-text {
  display: flex !important;
  align-items: center;
  gap: 0.45rem;
  font-size: 1.25rem !important;
}

.v2-dashboard-action-text i {
  color: var(--v2-primary-dark);
  font-size: 1.15rem;
}

.v2-dashboard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.6rem;
}

.v2-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 1.35rem 0 0.85rem;
}

.v2-section-title h2,
.v2-section-title h3 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 850;
}

.v2-empty {
  padding: 1.4rem;
  color: var(--v2-muted);
  background: var(--v2-surface);
  border: 1px dashed #b9c7d2;
  border-radius: 8px;
}

.v2-auth-layout {
  display: grid;
  place-items: center;
  min-height: min(620px, calc(100vh - 210px));
  padding: clamp(1rem, 4vw, 2.5rem) 0;
}

.v2-auth-card {
  width: min(100%, 460px);
  padding: clamp(1.1rem, 3vw, 1.6rem);
  background: var(--v2-surface);
  border: 1px solid var(--v2-line);
  border-radius: 8px;
  box-shadow: var(--v2-shadow);
}

.v2-auth-card-center {
  text-align: center;
}

.v2-auth-heading {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.2rem;
}

.v2-auth-card-center .v2-auth-heading {
  justify-content: center;
}

.v2-auth-heading h1 {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 2rem);
}

.v2-auth-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  color: var(--v2-primary-dark);
  background: var(--v2-primary-soft);
  border-radius: 8px;
  font-size: 1.35rem;
}

.v2-auth-form {
  padding: 0;
  border: 0;
  box-shadow: none;
}

.v2-auth-form .btn {
  width: 100%;
}

.v2-notice-panel {
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  color: #334155;
  background: #f8fbfb;
  border: 1px solid var(--v2-line);
  border-radius: 8px;
}

.v2-terms-content {
  padding: clamp(1rem, 2vw, 1.4rem);
  background: #fff;
  border: 1px solid var(--v2-line);
  border-radius: 8px;
  box-shadow: var(--v2-shadow-soft);
}

.v2-terms-content h4 {
  margin-top: 1.45rem;
  color: var(--v2-text);
  font-weight: 850;
}

.v2-terms-content h4:first-of-type {
  margin-top: 1rem;
}

.v2-terms-content p,
.v2-terms-content li {
  color: #334155;
  line-height: 1.75;
}

.v2-terms-content ul,
.v2-terms-content ol {
  display: block;
  margin-top: 0;
  margin-bottom: 1rem;
  padding-left: 2rem;
}

.v2-terms-content ul {
  list-style: disc outside;
}

.v2-terms-content ol {
  list-style: decimal outside;
}

.v2-terms-content li {
  display: list-item;
  padding: 0;
  margin-bottom: 0.25rem;
  background: transparent;
  border: 0;
}

.v2-qr-frame {
  display: inline-flex;
  padding: 0.65rem;
  background: #fff;
  border: 1px solid var(--v2-line);
  border-radius: 8px;
}

.v2-qr-frame img {
  display: block;
  width: min(220px, 68vw);
  height: auto;
}

.v2-qr-link {
  display: block;
  margin-top: 0.9rem;
  font-weight: 800;
  word-break: break-word;
}

.v2-message-tabs,
.v2-message-batch {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.v2-message-table tr.clickable {
  cursor: pointer;
}

.v2-message-table tr.clickable:hover {
  background: #f7fbfa;
}

.v2-message-table .unread td {
  color: #0f3f7a;
  font-weight: 850;
}

.v2-message-table .read td {
  color: var(--v2-text);
  font-weight: 500;
}

.v2-message-view .card-body {
  padding: clamp(1rem, 2vw, 1.4rem);
}

.v2-message-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
  margin-bottom: 1rem;
}

.v2-message-meta span {
  display: block;
  padding: 0.7rem 0.8rem;
  background: #f8fbfb;
  border: 1px solid var(--v2-line);
  border-radius: 8px;
}

.v2-message-meta strong {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--v2-muted);
  font-size: 0.86rem;
}

.v2-message-body {
  min-height: 180px;
  padding: 1rem;
  white-space: pre-wrap;
  background: #fff;
  border: 1px solid var(--v2-line);
  border-radius: 8px;
}

.v2-attachment-list {
  display: grid;
  gap: 0.45rem;
  padding: 0;
  list-style: none;
}

.v2-attachment-list li {
  padding: 0.6rem 0.75rem;
  background: #f8fbfb;
  border: 1px solid var(--v2-line);
  border-radius: 8px;
}

.v2-compose-form .select2-container--bootstrap-5 .select2-selection,
.v2-compose-form .select2-container .select2-selection--multiple {
  min-height: 42px;
  border-color: #cad6df;
  border-radius: 8px;
}

.v2-compose-form .tox-tinymce {
  border-color: #cad6df;
  border-radius: 8px;
}

.v2-attachment-field .form-control-file {
  display: block;
  width: 100%;
  padding: 0.75rem;
  background: #f8fbfb;
  border: 1px dashed #b9c7d2;
  border-radius: 8px;
}

.v2-insight-card .card-header {
  color: var(--v2-primary-dark);
  background: var(--v2-primary-soft);
}

.v2-insight-item {
  height: 100%;
  padding: 1rem;
  background: #f8fbfb;
  border: 1px solid var(--v2-line);
  border-radius: 8px;
}

.v2-insight-item span,
.v2-insight-item small {
  display: block;
  color: var(--v2-muted);
}

.v2-insight-item strong {
  display: block;
  margin: 0.25rem 0;
  color: var(--v2-text);
  font-size: 1.25rem;
}

.v2-chart-card .card-body {
  min-height: 300px;
}

.v2-chart-card canvas {
  width: 100% !important;
  height: 280px !important;
}

.v2-inline-form {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
}

.v2-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.v2-train-table .v2-row-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(4.8rem, 1fr));
  min-width: 15.5rem;
}

.v2-train-table .v2-row-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  width: 100%;
  white-space: nowrap;
}

.v2-train-page .v2-page-actions {
  justify-content: flex-start;
}

.v2-page-actions .v2-inline-form,
.v2-page-actions .v2-inline-form.v2-form-panel {
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.v2-train-edit-form .form-row {
  row-gap: 0.85rem;
}

.v2-scroll-panel {
  max-height: 320px;
  padding: 0.75rem;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--v2-line);
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
  -webkit-overflow-scrolling: touch;
}

.v2-check-list {
  display: grid;
  gap: 0.35rem;
}

.v2-check-list .form-check {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 38px;
  margin: 0;
  padding: 0.45rem 0.55rem;
  background: #f8fbfb;
  border: 1px solid #edf3f5;
  border-radius: 8px;
}

.v2-check-list .form-check-input {
  position: static;
  flex: 0 0 auto;
  margin: 0;
}

.v2-check-list .form-check-label {
  margin: 0;
}

.v2-train-table {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--v2-line);
  border-radius: 8px;
  box-shadow: var(--v2-shadow-soft);
}

.v2-train-table thead th {
  color: #2a3a48;
  background: #f4f8fa;
  border-bottom: 1px solid var(--v2-line);
  white-space: nowrap;
}

.v2-train-table tbody td {
  vertical-align: middle;
}

.v2-train-table tbody tr:hover {
  background: #f8fbfb;
}

.v2-switch {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  width: 44px;
  height: 24px;
  margin: 0;
}

.v2-switch input {
  width: 0;
  height: 0;
  opacity: 0;
}

.v2-switch-slider {
  position: absolute;
  inset: 0;
  cursor: pointer;
  background: #cbd5df;
  border-radius: 999px;
  transition: background 0.2s ease;
}

.v2-switch-slider::before {
  position: absolute;
  bottom: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  content: "";
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(23, 33, 43, 0.18);
  transition: transform 0.2s ease;
}

.v2-switch input:checked + .v2-switch-slider {
  background: var(--v2-primary);
}

.v2-switch input:checked + .v2-switch-slider::before {
  transform: translateX(20px);
}

.v2-count-pill,
.v2-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0.25rem 0.65rem;
  color: #475569;
  background: #eef3f6;
  border: 1px solid #d6e1e8;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 850;
  white-space: nowrap;
}

.v2-count-pill {
  color: var(--v2-primary-dark);
  background: var(--v2-primary-soft);
  border-color: rgba(15, 118, 110, 0.2);
}

.v2-count-danger,
.v2-status-danger {
  color: #b91c1c;
  background: #fee2e2;
  border-color: #fecaca;
}

.v2-status-success {
  color: #166534;
  background: #dcfce7;
  border-color: #bbf7d0;
}

.v2-train-summary {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(11rem, 0.8fr) minmax(11rem, 0.8fr);
  gap: 0.75rem;
  margin-bottom: 1.2rem;
}

.v2-train-summary div {
  min-width: 0;
  padding: 0.9rem 1rem;
  background: #fff;
  border: 1px solid var(--v2-line);
  border-radius: 8px;
  box-shadow: var(--v2-shadow-soft);
}

.v2-train-summary span {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--v2-muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.v2-train-summary strong {
  display: block;
  overflow-wrap: anywhere;
}

.v2-train-qr-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(15rem, 18rem);
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.25rem;
  padding: clamp(1rem, 2vw, 1.2rem);
  background: #f8fbfb;
  border: 1px solid var(--v2-line);
  border-radius: 8px;
}

.v2-train-qr-copy {
  display: grid;
  justify-items: start;
  gap: 0.55rem;
}

.v2-train-qr-copy h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 850;
}

.v2-train-qr-box {
  display: grid;
  justify-items: center;
  gap: 0.55rem;
}

.v2-train-qr-modal-body {
  display: grid;
  justify-items: center;
  gap: 0.75rem;
}

.v2-delegate-form {
  display: grid;
  grid-template-columns: minmax(14rem, 24rem) auto;
  gap: 0.6rem;
  align-items: center;
}

.v2-code-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(16rem, 24rem);
  gap: 1rem;
  align-items: start;
  padding: clamp(1rem, 2vw, 1.25rem);
  background: #fff;
  border: 1px solid var(--v2-line);
  border-radius: 8px;
  box-shadow: var(--v2-shadow-soft);
}

.v2-code-notice {
  margin: -0.35rem 0 1rem;
  padding: 0.75rem 0.9rem;
  color: #334155;
  background: #f8fbfb;
  border: 1px solid var(--v2-line);
  border-left: 4px solid var(--v2-primary);
  border-radius: 8px;
  font-weight: 700;
}

.v2-code-actions {
  display: grid;
  gap: 0.75rem;
}

.v2-code-qr {
  display: grid;
  justify-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: #f8fbfb;
  border: 1px solid var(--v2-line);
  border-radius: 8px;
}

.v2-code-qr h4 {
  margin: 0;
  font-size: 1rem;
}

.v2-code-qr-box {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 220px;
  min-height: 220px;
  padding: 0.75rem;
  background: #fff;
  border: 1px solid #dbe5ec;
  border-radius: 8px;
}

.v2-code-error {
  max-width: 220px;
  padding: 0.85rem;
  color: #b91c1c;
  text-align: center;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
}

.v2-admin-table {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--v2-line);
  border-radius: 8px;
  box-shadow: var(--v2-shadow-soft);
}

.v2-admin-table thead th {
  color: #2a3a48;
  background: #f4f8fa;
  border-bottom: 1px solid var(--v2-line);
  white-space: nowrap;
}

.v2-admin-table td {
  vertical-align: middle;
}

.v2-admin-settings-page .table-responsive {
  margin-bottom: 1rem;
}

.v2-super-admin-form {
  display: grid;
  grid-template-columns: minmax(16rem, 1fr) auto;
  gap: 0.75rem;
  align-items: end;
}

.v2-check-stack {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.25rem;
}

.v2-check-stack .form-check {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 42px;
  margin: 0;
  padding: 0.6rem 0.75rem;
  background: #f8fbfb;
  border: 1px solid var(--v2-line);
  border-radius: 8px;
}

.v2-check-stack .form-check-input {
  position: static;
  margin: 0;
}

.v2-check-stack .form-check-label {
  margin: 0;
}

.v2-team-table {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--v2-line);
  border-radius: 8px;
  box-shadow: var(--v2-shadow-soft);
}

.v2-team-table thead th {
  color: #2a3a48;
  background: #f4f8fa;
  border-bottom: 1px solid var(--v2-line);
  white-space: nowrap;
}

.v2-team-table td {
  vertical-align: middle;
}

.v2-wrap-cell {
  white-space: normal;
  word-break: break-word;
}

.v2-team-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.v2-team-summary div,
.v2-leader-panel {
  min-width: 0;
  padding: 0.9rem 1rem;
  background: #fff;
  border: 1px solid var(--v2-line);
  border-radius: 8px;
  box-shadow: var(--v2-shadow-soft);
}

.v2-team-summary span {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--v2-muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.v2-team-summary strong,
.v2-leader-panel {
  overflow-wrap: anywhere;
}

.v2-modal-info-list {
  display: grid;
  grid-template-columns: minmax(8rem, 0.42fr) minmax(0, 1fr);
  gap: 0.45rem 0.75rem;
  margin: 0;
}

.v2-modal-info-list dt,
.v2-modal-info-list dd {
  min-width: 0;
  margin: 0;
  padding: 0.55rem 0;
  border-bottom: 1px solid #eef3f6;
}

.v2-modal-info-list dt {
  color: var(--v2-muted);
  font-weight: 850;
}

.v2-modal-info-list dd {
  overflow-wrap: anywhere;
}

.v2-user-table td {
  vertical-align: middle;
}

.v2-notice-card .card-header {
  color: var(--v2-primary-dark);
  background: var(--v2-primary-soft);
}

.v2-notice-card .card-body {
  color: #334155;
}

.v2-notice-card p:last-child {
  margin-bottom: 0;
}

.v2-notice-card {
  margin-bottom: 1rem;
  padding: 1rem 1.1rem;
  color: #334155;
  background: #fff;
  border: 1px solid var(--v2-line);
  border-radius: 8px;
  box-shadow: var(--v2-shadow-soft);
}

.v2-notice-card h3 {
  margin: 0 0 0.45rem;
  color: var(--v2-primary-dark);
  font-size: 1.05rem;
  font-weight: 850;
}

.v2-announcement-table {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--v2-line);
  border-radius: 8px;
  box-shadow: var(--v2-shadow-soft);
}

.v2-announcement-table thead th {
  color: #2a3a48;
  background: #f4f8fa;
  border-bottom: 1px solid var(--v2-line);
  white-space: nowrap;
}

.v2-announcement-table td {
  vertical-align: middle;
}

.v2-announcement-preview-list {
  display: grid;
  gap: 0.55rem;
}

.v2-announcement-preview-item {
  display: grid;
  grid-template-columns: 6.8rem minmax(0, 1fr) max-content;
  align-items: center;
  gap: 0.8rem;
  min-width: 0;
  padding: 0.85rem 0.95rem;
  color: var(--v2-text);
  background: #fff;
  border: 1px solid var(--v2-line);
  border-radius: 8px;
  box-shadow: var(--v2-shadow-soft);
}

.v2-announcement-preview-item:hover,
.v2-announcement-preview-item:focus {
  color: var(--v2-primary-dark);
  text-decoration: none;
  border-color: rgba(15, 118, 110, 0.35);
}

.v2-announcement-date {
  justify-self: start;
  padding: 0.22rem 0.48rem;
  color: var(--v2-primary-dark);
  font-size: 0.82rem;
  font-weight: 850;
  line-height: 1.2;
  white-space: nowrap;
  background: var(--v2-primary-soft);
  border-radius: 999px;
}

.v2-announcement-unit {
  color: var(--v2-muted);
  font-size: 0.88rem;
  font-weight: 750;
  white-space: nowrap;
}

.v2-text-truncate {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v2-announcement-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.v2-announcement-meta div {
  min-width: 0;
  padding: 0.85rem 0.95rem;
  background: #fff;
  border: 1px solid var(--v2-line);
  border-radius: 8px;
  box-shadow: var(--v2-shadow-soft);
}

.v2-announcement-meta span {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--v2-muted);
  font-size: 0.86rem;
  font-weight: 850;
}

.v2-announcement-meta strong {
  display: block;
  overflow-wrap: anywhere;
}

.v2-announcement-content {
  margin-bottom: 1rem;
  padding: clamp(1rem, 2vw, 1.25rem);
  background: #fff;
  border: 1px solid var(--v2-line);
  border-radius: 8px;
  box-shadow: var(--v2-shadow-soft);
  color: var(--v2-text);
  overflow-wrap: anywhere;
}

.v2-announcement-content h1,
.v2-announcement-content h2,
.v2-announcement-content h3,
.v2-announcement-content h4,
.v2-announcement-content h5,
.v2-announcement-content h6 {
  margin: 1rem 0 0.55rem;
  color: inherit;
  font-weight: 800;
}

.v2-announcement-content p {
  margin: 0 0 0.85rem;
  color: inherit;
}

.v2-announcement-content ul,
.v2-announcement-content ol {
  margin: 0 0 0.85rem 1.35rem;
  padding-left: 1rem;
}

.v2-announcement-content li {
  margin-bottom: 0.25rem;
}

.v2-announcement-content blockquote {
  margin: 0 0 1rem;
  padding: 0.65rem 0.9rem;
  color: #334155;
  border-left: 4px solid var(--v2-line);
  background: #f8fafb;
}

.v2-announcement-content table {
  width: 100%;
  margin-bottom: 1rem;
  border-collapse: collapse;
}

.v2-announcement-content th,
.v2-announcement-content td {
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--v2-line);
}

.v2-announcement-content img {
  max-width: 100%;
  height: auto;
}

.v2-attachment-edit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.v2-announcement-form .tox-tinymce {
  border-color: #cad6df;
  border-radius: 8px;
}

.v2-announcement-form .form-control-file {
  display: block;
  width: 100%;
  padding: 0.75rem;
  background: #f8fbfb;
  border: 1px dashed #b9c7d2;
  border-radius: 8px;
}

.v2-record-filter {
  padding: 0.9rem 1rem;
  background: #fff;
  border: 1px solid var(--v2-line);
  border-radius: 8px;
  box-shadow: var(--v2-shadow-soft);
}

.v2-record-filter > strong {
  display: block;
  margin-bottom: 0.6rem;
  color: #2f4050;
  font-weight: 850;
}

.v2-record-filter ul {
  margin-bottom: 0;
}

.v2-record-filter li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.v2-record-filter input[type="date"] {
  margin: 0.25rem 0.25rem 0 0;
}

.v2-record-table {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--v2-line);
  border-radius: 8px;
  box-shadow: var(--v2-shadow-soft);
}

.v2-record-table thead th {
  color: #2a3a48;
  background: #f4f8fa;
  border-bottom: 1px solid var(--v2-line);
  white-space: nowrap;
}

.v2-record-table td {
  vertical-align: middle;
}

.v2-reason-start {
  text-align: left;
}

.v2-reason-end {
  text-align: right;
}

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

.v2-pagination-wrap {
  display: flex;
  justify-content: center;
  margin: 1rem 0 0;
}

.v2-content nav[aria-label*="Page"],
.v2-content nav[aria-label*="分頁"] {
  display: flex;
  justify-content: center;
  margin: 1rem 0 0;
}

.v2-content .pagination {
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem;
}

.v2-pagination-wrap .pagination,
.v2-record-page .pagination {
  flex-wrap: wrap;
  gap: 0.25rem;
}

.v2-content .page-link,
.v2-pagination-wrap .page-link,
.v2-record-page .page-link {
  border-radius: 8px;
  color: var(--v2-primary-dark);
  border-color: var(--v2-line);
  font-weight: 750;
}

.v2-content .page-item.active .page-link,
.v2-pagination-wrap .page-item.active .page-link {
  color: #fff;
  background: var(--v2-primary);
  border-color: var(--v2-primary);
}

.v2-duty-form,
.v2-ems-form {
  display: grid;
  gap: 0.2rem;
}

.v2-choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.v2-choice-row .form-check {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 42px;
  margin: 0;
  padding: 0.6rem 0.85rem;
  background: #f8fbfb;
  border: 1px solid var(--v2-line);
  border-radius: 8px;
}

.v2-choice-row .form-check-input {
  position: static;
  margin: 0;
}

.v2-choice-row .form-check-label {
  margin: 0;
}

.v2-ems-form .input-group {
  align-items: stretch;
}

.v2-is-hidden {
  display: none !important;
}

.v2-report-filter,
.v2-report-controls {
  padding: 0.9rem 1rem;
  background: #fff;
  border: 1px solid var(--v2-line);
  border-radius: 8px;
  box-shadow: var(--v2-shadow-soft);
}

.v2-report-filter > strong {
  display: block;
  margin-bottom: 0.6rem;
  color: #2f4050;
  font-weight: 850;
}

.v2-report-filter ul {
  margin-bottom: 0;
}

.v2-report-filter li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.v2-report-filter .v2-team-filter-button {
  color: var(--v2-primary-dark);
  background: #effafa;
  border-color: rgba(15, 118, 110, 0.42);
}

.v2-report-filter .v2-team-filter-button:hover,
.v2-report-filter .v2-team-filter-button.active {
  color: #fff;
  background: var(--v2-primary);
  border-color: var(--v2-primary);
}

.v2-report-filter .v2-team-filter-aggregated {
  color: #166534;
  background: #f0fdf4;
  border-color: rgba(22, 101, 52, 0.42);
}

.v2-report-filter .v2-team-filter-aggregated:hover,
.v2-report-filter .v2-team-filter-aggregated.active {
  color: #fff;
  background: #15803d;
  border-color: #15803d;
}

.v2-report-controls .form-group:last-child {
  margin-bottom: 0;
}

.v2-report-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  margin-bottom: 1rem;
}

.v2-report-toolbar h2 {
  margin: 0;
}

.v2-report-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.7rem;
}

.v2-report-table {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--v2-line);
  border-radius: 8px;
  box-shadow: var(--v2-shadow-soft);
}

.v2-report-table thead th {
  color: #2a3a48;
  background: #f4f8fa;
  border-bottom: 1px solid var(--v2-line);
  white-space: nowrap;
}

.v2-report-table td {
  vertical-align: middle;
}

.v2-report-output-table {
  min-width: 980px;
}

.v2-report-wide-table {
  min-width: 1120px;
}

.v2-wide-report-scroll {
  overflow-x: auto;
  background: #fff;
  border: 1px solid var(--v2-line);
  border-radius: 8px;
  box-shadow: var(--v2-shadow-soft);
  -webkit-overflow-scrolling: touch;
}

.v2-report-legend {
  display: grid;
  gap: 0.35rem;
  padding: 0.85rem 1rem;
  margin: 0 0 1rem;
  list-style: none;
  color: #334155;
  background: #fff;
  border: 1px solid var(--v2-line);
  border-radius: 8px;
  box-shadow: var(--v2-shadow-soft);
}

.v2-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}

.v2-stat-card {
  min-width: 0;
  padding: 1rem;
  background: #fff;
  border: 1px solid var(--v2-line);
  border-radius: 8px;
  box-shadow: var(--v2-shadow-soft);
}

.v2-stat-card span,
.v2-stat-card small {
  display: block;
  color: var(--v2-muted);
}

.v2-stat-card span {
  margin-bottom: 0.3rem;
  font-size: 0.86rem;
  font-weight: 850;
}

.v2-stat-card strong {
  display: block;
  color: var(--v2-text);
  font-size: 1.45rem;
  font-weight: 900;
  line-height: 1.25;
}

.v2-rank-col {
  width: 60px;
}

.table-main {
  min-width: max-content;
  font-size: 0.875rem;
  text-align: center;
}

.table-main .table-head {
  width: fit-content;
  font-weight: 850;
  background-color: #fff !important;
  border-bottom: 1px solid #dee2e6;
}

.table-main .table-head div {
  background-color: #fff !important;
}

.table-main .table-left {
  max-width: 62px;
  background-color: #f8fafc;
  border-right: 1px solid #dee2e6;
}

.table-main .table-left > div {
  border-bottom: 1px solid #dee2e6;
}

.table-main .table-left > div > div {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 98px;
  padding: 0 8px;
}

.table-main .table-center > div {
  width: fit-content;
  border-bottom: 1px solid #dee2e6;
}

.table-main .table-center > div > div {
  height: 98px;
}

.table-main .table-center > div > div > div {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 90px;
  height: 50%;
}

.table-main .table-center > div > div > div:nth-child(1) {
  background-color: #f8fafc;
}

.table-main .table-right {
  border-left: 1px solid #dee2e6;
}

.table-main .table-right > div {
  width: 100%;
  border-bottom: 1px solid #dee2e6;
}

.table-main .table-right > div > div {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 49px;
  padding: 0 8px;
}

.table-main .table-right > div > div:nth-child(1) {
  background-color: #f8fafc;
}

.hours-low {
  color: #dc2626;
  font-weight: 850;
}

.hours-sufficient {
  color: #15803d;
  font-weight: 850;
}

.v2-footer {
  margin-top: 2rem;
  color: #5e7082;
  background: #fff;
  border-top: 1px solid var(--v2-line);
}

.v2-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(100%, 1320px);
  padding: 1rem clamp(1rem, 2vw, 1.75rem);
}

.v2-footer strong,
.v2-footer span {
  display: block;
}

.v2-footer strong {
  color: var(--v2-text);
}

@media (max-width: 1199.98px) {
  .v2-navbar .navbar-collapse {
    padding-top: 0.8rem;
  }

  .v2-main-nav .nav-link {
    width: 100%;
  }

  .v2-nav-actions {
    align-items: stretch;
    flex-wrap: wrap;
    margin: 0.75rem 0 0;
    padding-top: 0.75rem;
    border-top: 1px solid var(--v2-line);
  }

  .v2-user-menu {
    flex: 1 1 100%;
    justify-content: space-between;
    margin-left: 0;
    padding-left: 0;
    border-left: 0;
  }
}

@media (max-width: 991.98px) {
  .v2-quick-grid {
    grid-template-columns: 1fr 1fr;
  }

  .v2-dashboard-grid {
    grid-template-columns: 1fr 1fr;
  }

  .v2-stat-grid {
    grid-template-columns: 1fr 1fr;
  }

  .v2-hero {
    grid-template-columns: 1fr;
  }

  .v2-hero-actions {
    justify-content: flex-start;
  }

  .v2-page-header {
    flex-direction: column;
  }

  .v2-page-icon {
    width: 42px;
    height: 42px;
  }
}

@media (max-width: 767.98px) {
  .v2-brand-subtitle {
    max-width: 13rem;
  }

  .v2-content {
    padding: 0.9rem;
  }

  .v2-quick-grid {
    grid-template-columns: 1fr;
  }

  .v2-dashboard-grid {
    grid-template-columns: 1fr;
  }

  .v2-stat-grid {
    grid-template-columns: 1fr;
  }

  .v2-content .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .v2-content .table-responsive table {
    min-width: 0;
  }

  .v2-content .table-responsive thead {
    display: none;
  }

  .v2-content .table-responsive tbody,
  .v2-content .table-responsive tr,
  .v2-content .table-responsive td {
    display: block;
    width: 100%;
  }

  .v2-content .table-responsive tr {
    margin: 0.65rem;
    padding: 0.65rem;
    background: #fff;
    border: 1px solid var(--v2-line);
    border-radius: 8px;
  }

  .v2-content .table-responsive td {
    display: grid;
    grid-template-columns: minmax(6.5rem, 34%) minmax(0, 1fr);
    gap: 0.65rem;
    padding: 0.55rem 0;
    border: 0;
    border-bottom: 1px solid #eef3f6;
    text-align: left !important;
  }

  .v2-content .table-responsive td:last-child {
    border-bottom: 0;
  }

  .v2-content .table-responsive td::before {
    content: attr(data-label);
    color: var(--v2-muted);
    font-weight: 800;
  }

  .v2-content .table-responsive .v2-report-wide-table,
  .v2-content .table-responsive .v2-report-output-table {
    display: table;
    min-width: 980px;
  }

  .v2-content .table-responsive .v2-report-wide-table {
    min-width: 1120px;
  }

  .v2-content .table-responsive .v2-report-wide-table thead,
  .v2-content .table-responsive .v2-report-output-table thead {
    display: table-header-group;
  }

  .v2-content .table-responsive .v2-report-wide-table tbody,
  .v2-content .table-responsive .v2-report-wide-table tr,
  .v2-content .table-responsive .v2-report-wide-table td,
  .v2-content .table-responsive .v2-report-output-table tbody,
  .v2-content .table-responsive .v2-report-output-table tr,
  .v2-content .table-responsive .v2-report-output-table td {
    display: revert;
    width: auto;
  }

  .v2-content .table-responsive .v2-report-wide-table tr,
  .v2-content .table-responsive .v2-report-output-table tr {
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
  }

  .v2-content .table-responsive .v2-report-wide-table td,
  .v2-content .table-responsive .v2-report-output-table td {
    padding: 0.55rem;
    border-bottom: 1px solid #eef3f6;
  }

  .v2-content .table-responsive .v2-report-wide-table td::before,
  .v2-content .table-responsive .v2-report-output-table td::before {
    content: none;
  }

  .v2-content .table-responsive td .btn,
  .v2-content .table-responsive td .v2-compact-form {
    width: 100%;
  }

  .v2-content .table-responsive td .btn + .btn,
  .v2-content .table-responsive td a + a,
  .v2-content .table-responsive td form + form {
    margin-top: 0.35rem;
    margin-left: 0;
  }

  .v2-form-panel {
    padding: 0.9rem;
  }

  .v2-page-actions,
  .v2-action-row,
  .v2-report-toolbar,
  .v2-content .form-inline {
    align-items: stretch;
    flex-direction: column;
  }

  .v2-page-actions .btn,
  .v2-action-row .btn,
  .v2-report-toolbar .btn,
  .v2-content .form-inline .btn,
  .v2-content form > .btn,
  .v2-content form > input[type="submit"].btn {
    width: 100%;
  }

  .v2-content .input-group {
    flex-direction: column;
  }

  .v2-content .form-inline .form-control,
  .v2-content .form-inline .custom-select,
  .v2-content .form-inline select,
  .v2-content .form-inline .btn,
  .v2-content .form-inline input[type="submit"].btn {
    width: 100%;
  }

  .v2-filter-cluster .btn,
  .v2-filter-cluster input[type="date"] {
    width: 100%;
    margin-right: 0;
  }

  .v2-info-list li {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.2rem;
  }

  .v2-info-list strong {
    text-align: left;
  }

  .v2-message-tabs .btn,
  .v2-message-batch .btn {
    width: 100%;
  }

  .v2-message-meta {
    grid-template-columns: 1fr;
  }

  .v2-train-summary,
  .v2-train-qr-panel,
  .v2-delegate-form,
  .v2-super-admin-form,
  .v2-code-panel,
  .v2-team-summary,
  .v2-announcement-meta {
    grid-template-columns: 1fr;
  }

  .v2-delegate-form .btn,
  .v2-super-admin-form .btn,
  .v2-inline-form,
  .v2-inline-form .btn {
    width: 100%;
  }

  .v2-announcement-preview-item {
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }

  .v2-announcement-unit {
    white-space: normal;
  }

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

  .v2-row-actions .btn {
    width: 100%;
  }

  .v2-train-table .v2-row-actions {
    grid-template-columns: 1fr;
    min-width: 0;
  }

  .v2-modal-info-list {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .v2-modal-info-list dt {
    padding-bottom: 0.1rem;
    border-bottom: 0;
  }

  .v2-modal-info-list dd {
    padding-top: 0;
  }

  .v2-attachment-edit-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .v2-kind-node {
    align-items: stretch;
    flex-direction: column;
  }

  .v2-kind-actions {
    justify-content: flex-start;
  }

  .v2-kind-actions .btn {
    flex: 1 1 auto;
  }

  .v2-content .input-group > .form-control,
  .v2-content .input-group > .input-group-append,
  .v2-content .input-group > .input-group-prepend {
    width: 100%;
  }

  .v2-footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 420px) {
  .v2-brand {
    gap: 0.55rem;
  }

  .v2-brand-mark {
    width: 38px;
    height: 38px;
  }

  .v2-brand-title {
    font-size: 0.92rem;
  }

  .v2-brand-subtitle {
    max-width: 10rem;
    font-size: 0.72rem;
  }
}
