@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --sidebar: #172231;
  --sidebar-soft: #223044;
  --accent: #0f766e;
  --accent-dark: #0b5f59;
  --canvas: #f3f5f7;
  --line: #dfe4e8;
  --ink: #202936;
  --muted: #667281;
  --sidebar-width: 264px;
}
* {
  box-sizing: border-box;
}
html,
body {
  min-height: 100%;
}
body {
  font-family:
    'Inter',
    system-ui,
    -apple-system,
    'Segoe UI',
    sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-size: 0.9rem;
  -webkit-font-smoothing: antialiased;
}
.min-w-0 {
  min-width: 0;
}
.app-shell {
  min-height: 100vh;
}
.app-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-width);
  background: var(--sidebar);
  color: #fff;
  z-index: 1030;
  flex-direction: column;
  border-right: 1px solid rgba(255, 255, 255, 0.04);
}
.sidebar-brand {
  height: 70px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.sidebar-brand strong {
  display: block;
  font-size: 1rem;
  letter-spacing: 0.01em;
}
.sidebar-brand small {
  display: block;
  color: #9eabba;
  font-size: 0.7rem;
  margin-top: 1px;
}
.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: var(--accent);
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  flex: 0 0 auto;
}
.sidebar-scroll {
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
  padding: 12px 10px 18px;
  scrollbar-width: thin;
  scrollbar-color: #3b4959 transparent;
}
.sidebar-label {
  padding: 17px 12px 7px;
  color: #718096;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.11em;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 36px;
  padding: 6px 11px;
  margin: 2px 0;
  color: #b7c1cd;
  text-decoration: none;
  border-radius: 5px;
  font-size: 0.76rem;
  font-weight: 500;
  transition:
    background 0.15s,
    color 0.15s;
}
.sidebar-link i {
  width: 16px;
  font-size: 0.82rem;
  text-align: center;
  color: #8e9baa;
}
.sidebar-link:hover {
  background: var(--sidebar-soft);
  color: #fff;
}
.sidebar-link:hover i {
  color: #d9e0e7;
}
.sidebar-link.active {
  background: var(--accent);
  color: #fff;
}
.sidebar-link.active i {
  color: #fff;
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.75rem;
}
.sidebar-user small {
  color: #8f9baa;
}
.sidebar-user strong {
  max-width: 155px;
}
.user-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #304054;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
}
.user-avatar.light {
  background: #e5efee;
  color: var(--accent);
  width: 32px;
  height: 32px;
}
.app-offcanvas {
  width: min(86vw, 290px) !important;
  background: var(--sidebar);
  color: #fff;
}
.app-offcanvas .sidebar-brand {
  padding-right: 14px;
}
.app-offcanvas .offcanvas-body {
  display: flex;
  flex-direction: column;
}
.app-page {
  min-height: 100vh;
  width: calc(100% - var(--sidebar-width));
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
}
.app-topbar {
  height: 70px;
  position: sticky;
  top: 0;
  z-index: 1020;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 26px;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--line);
}
.topbar-kicker {
  font-size: 0.61rem;
  letter-spacing: 0.11em;
  font-weight: 700;
  color: #87919e;
}
.topbar-title {
  font-size: 1rem;
  font-weight: 700;
  color: #253040;
  max-width: 48vw;
}
.topbar-menu {
  padding: 3px 7px;
  border: 1px solid var(--line);
  font-size: 1.35rem;
  color: #344052;
}
.topbar-user {
  align-items: center;
  gap: 9px;
  padding-right: 12px;
  border-right: 1px solid var(--line);
}
.topbar-user strong,
.topbar-user small {
  display: block;
  line-height: 1.25;
}
.topbar-user strong {
  font-size: 0.75rem;
}
.topbar-user small {
  font-size: 0.65rem;
  color: var(--muted);
}
.btn-icon {
  display: flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  background: #fff;
  color: #4d5968;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.43rem 0.65rem;
}
.btn-icon:hover {
  background: #f7f8f9;
  border-color: #cfd5da;
}
.app-content {
  flex: 1;
  padding: 24px 26px;
}
.app-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 26px;
  color: #7b8693;
  background: #fff;
  border-top: 1px solid var(--line);
  font-size: 0.7rem;
}
h1.h3 {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
h2.h5 {
  font-size: 0.95rem;
  font-weight: 700;
}
.text-secondary {
  color: var(--muted) !important;
}
.card {
  border-radius: 7px !important;
  border: 1px solid var(--line) !important;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.035) !important;
}
.card-header {
  border-bottom-color: var(--line);
  padding: 0.85rem 1rem;
}
.card-body {
  padding: 1rem;
}
.card-stat {
  border-left: 0 !important;
  position: relative;
  overflow: hidden;
}
.card-stat:before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent);
}
.card-stat .h4 {
  font-size: 1.25rem;
  font-weight: 700;
}
.btn {
  border-radius: 5px;
  font-weight: 600;
  font-size: 0.75rem;
}
.app-content .btn {
  padding: 0.3rem 0.55rem;
}
.app-content .btn-sm {
  padding: 0.22rem 0.42rem;
  font-size: 0.7rem;
}
.btn-success {
  background: var(--accent);
  border-color: var(--accent);
}
.btn-success:hover,
.btn-success:focus {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}
.btn-outline-success {
  color: var(--accent);
  border-color: var(--accent);
}
.btn-outline-success:hover {
  background: var(--accent);
  border-color: var(--accent);
}
.form-control,
.form-select,
.input-group-text {
  border-color: #d7dde2;
  border-radius: 5px;
  font-size: 0.84rem;
  min-height: 38px;
}
.form-control:focus,
.form-select:focus {
  border-color: #67a9a3;
  box-shadow: 0 0 0 0.18rem rgba(15, 118, 110, 0.12);
}
.form-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #485463;
  margin-bottom: 0.35rem;
}
.form-text {
  font-size: 0.68rem;
}
.table {
  font-size: 0.78rem;
  color: #303b49;
}
.table > :not(caption) > * > * {
  padding: 0.7rem 0.75rem;
  border-bottom-color: #e8ebee;
  vertical-align: middle;
}
.table thead th {
  font-size: 0.67rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #687483;
  white-space: nowrap;
  background: #f7f8f9 !important;
}
.table tfoot {
  background: #f7f8f9 !important;
}
.table-responsive {
  border-radius: 7px;
}
.badge {
  font-weight: 600;
  border-radius: 4px;
}
.alert {
  border-radius: 6px;
  border-width: 1px;
  font-size: 0.8rem;
}
.progress {
  border-radius: 3px;
  background: #e5e9ec;
}
.progress-bar {
  background: var(--accent) !important;
}
.login-card {
  max-width: 420px;
  width: 100%;
  border: 1px solid var(--line) !important;
}
.login-input-group .input-group-text {
  min-width: 44px;
  justify-content: center;
  color: var(--accent);
  background: #f0f7f3;
  border-right: 0;
}
.login-input-group .form-control {
  border-left: 0;
}
.login-input-group:focus-within .input-group-text,
.login-input-group:focus-within .form-control {
  border-color: var(--accent);
}
.login-input-group:focus-within .input-group-text {
  box-shadow: 0 0 0 0.2rem rgba(24, 105, 70, 0.12);
}
.login-input-group:focus-within .form-control {
  box-shadow: 0.2rem 0 0 0.2rem rgba(24, 105, 70, 0.12);
}
.login-credit {
  color: var(--muted);
  font-size: 0.78rem;
}
.login-heart {
  margin: 0 0.18rem;
  color: #dc3545 !important;
  font-size: 0.72rem;
  vertical-align: 0.02em;
}
.login-credit a {
  color: inherit;
  font-weight: 600;
  text-decoration: none;
}
.login-credit a:hover,
.login-credit a:focus-visible {
  color: var(--accent);
  text-decoration: underline;
}
.bg-success-subtle {
  background: #edf2f3 !important;
}
body > .d-flex.align-items-center.justify-content-center {
  min-height: 100vh;
}

@media (max-width: 991.98px) {
  .app-page {
    width: 100%;
    margin-left: 0;
  }
  .app-topbar {
    height: 62px;
    padding: 0 18px;
  }
  .app-content {
    padding: 20px 18px;
  }
  .topbar-title {
    max-width: 52vw;
  }
  .app-footer {
    padding: 13px 18px;
  }
  .sidebar-scroll {
    padding-bottom: 28px;
  }
}
@media (max-width: 575.98px) {
  body {
    font-size: 0.84rem;
  }
  .app-topbar {
    padding: 0 12px;
    gap: 8px;
  }
  .app-content {
    padding: 15px 12px;
  }
  .app-footer {
    padding: 12px;
  }
  .topbar-kicker {
    display: none;
  }
  .topbar-title {
    font-size: 0.9rem;
    max-width: 44vw;
  }
  .btn-icon {
    padding: 0.42rem 0.55rem;
  }
  .container-fluid {
    padding: 0;
  }
  .app-content > .container-fluid > .d-flex {
    flex-wrap: wrap;
    gap: 10px;
  }
  .app-content > .container-fluid > .d-flex > div:last-child {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }
  .app-content > .container-fluid > .d-flex .btn {
    margin: 0 !important;
  }
  .card-body {
    padding: 0.85rem;
  }
  .table > :not(caption) > * > * {
    padding: 0.6rem 0.65rem;
  }
  .table {
    font-size: 0.72rem;
  }
  .table-responsive .table {
    width: max-content;
    min-width: 100%;
  }
  .table-responsive .table th,
  .table-responsive .table td {
    white-space: nowrap;
  }
  .form-control,
  .form-select {
    font-size: 0.8rem;
  }
  .row.g-2 > [class*='col-'],
  .row.g-3 > [class*='col-'] {
    min-width: 0;
  }
  .alert {
    padding: 0.7rem 0.8rem;
  }
  h1.h3 {
    font-size: 1.15rem;
  }
  .h4 {
    font-size: 1.1rem;
  }
  .login-card .card-body {
    padding: 1.25rem !important;
  }
}
@media (max-width: 575.98px) {
  .table-responsive .table th,
  .table-responsive .table td {
    white-space: nowrap !important;
  }
}

.brand-logo {
  width: 38px;
  height: 38px;
  object-fit: contain;
  background: #fff;
  border-radius: 6px;
  padding: 3px;
  flex: 0 0 auto;
}
.identity-preview {
  width: 112px;
  height: 112px;
  object-fit: contain;
}
.identity-placeholder {
  width: 90px;
  height: 90px;
  display: grid;
  place-items: center;
  margin-inline: auto;
  background: #e5efee;
  color: var(--accent);
  border-radius: 8px;
  font-size: 1.35rem;
  font-weight: 700;
}
.identity-placeholder.small-logo {
  width: 58px;
  height: 58px;
  font-size: 0.95rem;
}
.login-logo {
  width: 78px;
  height: 78px;
  object-fit: contain;
}
.table-tools,
.table-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: #fff;
}
.table-tools {
  border-bottom: 1px solid var(--line);
}
.table-pagination {
  border-top: 1px solid var(--line);
  font-size: 0.72rem;
  color: var(--muted);
}
.table-search {
  position: relative;
  width: min(300px, 100%);
}
.table-search i {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: #84909d;
  font-size: 0.75rem;
}
.table-search input {
  padding-left: 31px;
}
.table-size {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 0.72rem;
}
.table-size select {
  width: 68px;
  min-height: 32px;
}
.pagination-buttons {
  display: flex;
  gap: 4px;
}
.page-btn {
  min-width: 30px;
  height: 30px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: #526070;
  font-size: 0.72rem;
}
.page-btn:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}
.page-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.page-btn:disabled {
  opacity: 0.4;
}
@media (max-width: 575.98px) {
  .table-tools {
    align-items: stretch;
    flex-direction: column;
  }
  .table-search {
    width: 100%;
  }
  .table-size {
    justify-content: space-between;
  }
  .table-pagination {
    align-items: flex-start;
    flex-direction: column;
  }
  .pagination-buttons {
    width: 100%;
    justify-content: flex-end;
  }
  .identity-preview {
    width: 90px;
    height: 90px;
  }
}
