html {
  font-size: 14px;
  position: relative;
  min-height: 100%;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

:root {
  --wel-primary: #5b5fef;
  --wel-primary-dark: #3730a3;
  --wel-accent: #14b8a6;
  --wel-bg: #f6f8fb;
  --wel-surface: #ffffff;
  --wel-text: #0f172a;
  --wel-muted: #64748b;
  --wel-border: #e2e8f0;
  --wel-soft: #eef2ff;
  --wel-shadow: 0 10px 26px rgba(15, 23, 42, .08);
}

body {
  background: var(--wel-bg);
  color: var(--wel-text);
  letter-spacing: 0;
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
  border-color: rgba(91, 95, 239, .55);
  box-shadow: 0 0 0 .18rem rgba(91, 95, 239, .16);
}

.layout-page,
.content-wrapper {
  background: var(--wel-bg);
}

.container-p-y {
  padding-top: 1.35rem !important;
  padding-bottom: 1.35rem !important;
}

.container-xxl > h4.fw-bold {
  margin-bottom: 1.2rem !important;
  padding: 0 !important;
  color: var(--wel-text);
  font-size: 1.35rem;
  font-weight: 800 !important;
}

.container-xxl > h4.fw-bold .text-muted {
  color: var(--wel-accent) !important;
  font-size: .78rem;
  font-weight: 800 !important;
  letter-spacing: .2px;
  text-transform: uppercase;
}

.card {
  border: 1px solid rgba(226, 232, 240, .92);
  border-radius: 10px;
  box-shadow: var(--wel-shadow);
}

.card-header {
  min-height: 64px;
  border-bottom: 1px solid var(--wel-border);
  background: var(--wel-surface);
}

.card-header h5,
.card-header .mb-0 {
  color: var(--wel-text);
  font-weight: 800;
}

.card-body.border-bottom,
.card-body.bg-light {
  background: #fbfdff !important;
  border-color: var(--wel-border) !important;
}

.form-label,
label {
  color: #334155;
  font-size: .78rem;
  font-weight: 700;
  margin-bottom: .4rem;
}

.form-control,
.form-select,
.input-group-text {
  min-height: 42px;
  border-color: var(--wel-border);
  border-radius: 9px;
  color: var(--wel-text);
}

.btn {
  min-height: 40px;
  border-radius: 9px;
  font-weight: 700;
}

.btn-sm {
  min-height: 32px;
  border-radius: 8px;
}

.btn-primary {
  background: var(--wel-primary);
  border-color: var(--wel-primary);
  box-shadow: 0 8px 16px rgba(91, 95, 239, .18);
}

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

.table-responsive {
  border-radius: 0 0 10px 10px;
}

.table {
  margin-bottom: 0;
  color: var(--wel-text);
}

.table thead th {
  border-bottom: 1px solid var(--wel-border);
  color: #475569;
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .2px;
  text-transform: uppercase;
  white-space: nowrap;
}

.table tbody td {
  vertical-align: middle;
  color: #1e293b;
}

.table-hover tbody tr:hover {
  background: #f8fafc;
}

.badge {
  border-radius: 999px;
  padding: .42rem .62rem;
  font-weight: 800;
}

.modal-content {
  border: 1px solid rgba(226, 232, 240, .95);
  border-radius: 14px;
  box-shadow: 0 24px 50px rgba(15, 23, 42, .22);
}

.modal-header,
.modal-footer {
  border-color: var(--wel-border);
}

.empty-state {
  max-width: 520px;
  margin: 0 auto;
  padding: 34px 18px;
  text-align: center;
}

.empty-state i {
  width: 68px;
  height: 68px;
  margin: 0 auto 16px;
  border-radius: 22px;
  background: linear-gradient(135deg, #eef2ff, #ecfeff);
  color: var(--wel-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
}

.empty-state h5 {
  margin-bottom: 8px;
  color: var(--wel-text);
  font-weight: 800;
}

.empty-state p {
  margin: 0 auto 18px;
  color: var(--wel-muted);
}

.action-tile {
  min-height: 160px;
  border: 1px solid rgba(226, 232, 240, .95);
  border-radius: 10px;
  background: var(--wel-surface);
  color: var(--wel-text);
  box-shadow: var(--wel-shadow);
  text-decoration: none;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.action-tile:hover {
  color: var(--wel-text);
  border-color: rgba(91, 95, 239, .35);
  box-shadow: 0 14px 30px rgba(15, 23, 42, .1);
  transform: translateY(-1px);
}

.action-tile i {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: linear-gradient(135deg, #eef2ff, #ecfeff);
  color: var(--wel-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
}

.action-tile span {
  color: var(--wel-text);
  font-size: 1.05rem;
  font-weight: 800;
}

.action-tile small {
  color: var(--wel-muted);
  font-weight: 600;
}

.auth-page {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 20% 10%, rgba(20, 184, 166, .16), transparent 28%),
    radial-gradient(circle at 80% 0%, rgba(91, 95, 239, .16), transparent 30%),
    var(--wel-bg);
}

.auth-page .authentication-wrapper {
  min-height: 100vh;
}

.auth-page .authentication-inner {
  max-width: 430px;
}

.auth-page .card {
  border-radius: 18px;
  box-shadow: 0 22px 50px rgba(15, 23, 42, .14);
}

.auth-page .card-body {
  padding: 30px;
}

.auth-page h4 {
  color: var(--wel-text);
  font-weight: 800;
}

.auth-page p {
  color: var(--wel-muted);
}

.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
  text-align: start;
}

@media (max-width: 767.98px) {
  body {
    background: #f8fafc;
    margin-bottom: 0;
  }

  .mobile-app .container-xxl,
  .mobile-app .container {
    width: 100%;
    padding: 14px 16px 0 !important;
  }

  .mobile-app .container-p-y {
    padding-top: 14px !important;
    padding-bottom: 10px !important;
  }

  .mobile-app .container-xxl > h4.fw-bold {
    margin: 4px 0 14px !important;
    font-size: 1.45rem;
    line-height: 1.15;
  }

  .mobile-app .card {
    border-radius: 20px;
    border-color: rgba(226, 232, 240, .95);
    box-shadow: 0 10px 28px rgba(15, 23, 42, .08);
    overflow: hidden;
  }

  .mobile-app .card + .card,
  .mobile-app .card.mb-3,
  .mobile-app .card.mb-4 {
    margin-bottom: 14px !important;
  }

  .mobile-app .card-header {
    min-height: auto;
    padding: 16px;
    align-items: flex-start !important;
    gap: 12px;
  }

  .mobile-app .card-header.d-flex {
    flex-direction: column;
  }

  .mobile-app .card-header .btn,
  .mobile-app .card-header small,
  .mobile-app .card-header small .btn {
    width: 100%;
  }

  .mobile-app .card-body {
    padding: 16px;
  }

  .mobile-app .row {
    --bs-gutter-y: .85rem;
  }

  .mobile-app [class*="col-md-"],
  .mobile-app [class*="col-lg-"] {
    width: 100%;
  }

  .mobile-app .text-end {
    text-align: left !important;
  }

  .mobile-app .form-control,
  .mobile-app .form-select,
  .mobile-app .input-group-text {
    min-height: 50px;
    border-radius: 14px;
    background: #f8fafc;
    font-size: 15px;
  }

  .mobile-app .btn {
    min-height: 48px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
  }

  .mobile-app .btn-sm {
    min-height: 38px;
    padding: .45rem .65rem;
  }

  .mobile-app .table-responsive {
    overflow-x: auto;
    border-top: 1px solid var(--wel-border);
    border-radius: 0;
    -webkit-overflow-scrolling: touch;
  }

  .mobile-app .table {
    min-width: 720px;
  }

  .mobile-app .table thead th {
    background: #f8fafc;
    position: sticky;
    top: 0;
    z-index: 1;
  }

  .mobile-app .table tbody td {
    padding: .9rem .75rem;
  }

  .mobile-app .table .btn,
  .mobile-app .table i[onclick] {
    margin: 2px;
  }

  .mobile-app .modal-dialog {
    margin: .75rem;
  }

  .mobile-app .modal-content {
    border-radius: 22px;
  }

  .mobile-app .action-tile {
    min-height: 128px;
    border-radius: 20px;
  }

  .mobile-app .empty-state {
    padding: 28px 8px;
  }
}
