:root {
  --yp-yellow: #fbc701;
  --yp-yellow-deep: #d6a900;
  --yp-yellow-soft: #ffe79d;
  --yp-navy-1: #152035;
  --yp-navy-2: #1d2a43;
  --yp-surface: #ffffff;
  --yp-surface-soft: #f4f7fd;
  --yp-ink: #132036;
  --yp-muted: #667085;
  --yp-border: #dbe3f0;
  --yp-blue: #3f8efc;
  --yp-green: #18a957;
  --yp-red: #e24f5d;
  --yp-radius: 22px;
  --yp-sidebar-width: 282px;
  --yp-shadow: 0 18px 42px rgba(18, 30, 50, 0.12);
}

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(251, 199, 1, 0.45) rgba(18, 32, 54, 0.08);
}

body {
  font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--yp-ink);
  background:
    radial-gradient(780px 340px at 8% -14%, rgba(251, 199, 1, 0.22), transparent 66%),
    radial-gradient(540px 260px at 92% 0%, rgba(63, 142, 252, 0.12), transparent 62%),
    var(--yp-surface-soft);
}

body.login-page {
  margin: 0;
}

body:not(.login-page) .content-wrapper {
  min-height: calc(100vh - 6.2rem) !important;
  margin-top: 1rem;
  border-radius: var(--yp-radius);
  background:
    radial-gradient(680px 300px at 8% -12%, rgba(251, 199, 1, 0.2), transparent 64%),
    linear-gradient(180deg, #f9fbff 0%, #f1f5fc 100%);
  box-shadow: var(--yp-shadow);
}

body:not(.login-page) .main-footer {
  margin-top: 1rem;
  border-radius: var(--yp-radius);
  border: 1px solid #e2e9f5;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(20, 31, 49, 0.08);
}

.main-header {
  margin: 1rem 1rem 0;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.83);
  backdrop-filter: blur(18px);
  box-shadow: 0 14px 34px rgba(18, 30, 50, 0.1);
}

body:not(.sidebar-collapse):not(.login-page) .main-header,
body:not(.sidebar-collapse):not(.login-page) .content-wrapper,
body:not(.sidebar-collapse):not(.login-page) .main-footer {
  margin-left: calc(var(--yp-sidebar-width) + 2rem) !important;
}

body.sidebar-collapse:not(.login-page) .main-header,
body.sidebar-collapse:not(.login-page) .content-wrapper,
body.sidebar-collapse:not(.login-page) .main-footer {
  margin-left: 1rem !important;
}

.main-header .nav-link {
  border-radius: 999px;
  color: var(--yp-ink);
}

.main-header .nav-link:hover,
.main-header .nav-link:focus {
  background: rgba(251, 199, 1, 0.16);
  color: #453100;
}

.navbar-ops {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.navbar-status {
  display: inline-flex;
  align-items: center;
  gap: 0.48rem;
  padding: 0.45rem 0.86rem;
  border-radius: 999px;
  background: rgba(251, 199, 1, 0.18);
  color: #4c3800;
  font-size: 0.82rem;
  font-weight: 800;
}

.status-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #23c26f;
  box-shadow: 0 0 0 5px rgba(35, 194, 111, 0.16);
}

.navbar-user {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.35rem 0.5rem 0.35rem 0.75rem;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(20, 31, 49, 0.1);
  box-shadow: 0 10px 24px rgba(20, 31, 49, 0.06);
}

.navbar-user-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  color: #2f2200;
  background: linear-gradient(140deg, #fbc701, #ffe38b);
  font-size: 0.86rem;
}

.dropdown-menu {
  border: 1px solid rgba(19, 32, 54, 0.08);
  border-radius: 16px;
  padding: 0.5rem;
  box-shadow: 0 18px 38px rgba(16, 27, 46, 0.15);
}

.dropdown-item {
  border-radius: 10px;
  padding: 0.68rem 0.85rem;
}

.dropdown-item:hover,
.dropdown-item:focus {
  background: rgba(251, 199, 1, 0.12);
  color: #4a3400;
}

.main-sidebar {
  width: var(--yp-sidebar-width);
  margin: 1rem 0 1rem 1rem;
  border-radius: 28px;
  background: #16233a !important;
  background-image: none !important;
  box-shadow: 0 22px 52px rgba(10, 17, 30, 0.3);
}

.main-sidebar,
.main-sidebar::before {
  width: var(--yp-sidebar-width) !important;
  border-radius: 28px;
  background: #16233a !important;
  background-image: none !important;
}

.main-sidebar .sidebar {
  height: calc(100% - 5.75rem);
  padding-bottom: 1rem;
  overflow-x: hidden;
}

body.sidebar-collapse:not(.login-page) .main-sidebar,
body.sidebar-collapse:not(.login-page) .main-sidebar::before {
  margin-left: calc(-1 * (var(--yp-sidebar-width) + 2rem)) !important;
}

body.sidebar-collapse:not(.login-page) .main-sidebar {
  box-shadow: none;
  pointer-events: none;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1.3rem 1.35rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 18px;
  background: linear-gradient(135deg, #ffe99d, #fbc701);
  color: #3a2a00;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: 0 14px 30px rgba(251, 199, 1, 0.24);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.brand-link .brand-text {
  color: #ffffff;
  font-size: 1.08rem;
  font-weight: 700;
}

.brand-subtitle {
  color: rgba(255, 255, 255, 0.64);
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sidebar .user-panel {
  margin: 1.15rem 1rem 1.35rem;
  padding: 0.95rem;
  border-radius: 20px;
  border-bottom: 0;
  background: rgba(255, 255, 255, 0.07);
}

.sidebar .user-panel .image img {
  border: 2px solid rgba(255, 255, 255, 0.18);
}

.sidebar .user-panel .info a {
  font-weight: 700;
  color: #ffffff;
}

.user-role {
  display: block;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.75rem;
}

.nav-sidebar {
  padding: 0 0.8rem 1.2rem;
}

.nav-sidebar > .nav-item {
  margin-bottom: 0.4rem;
}

.nav-sidebar .nav-link {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.78rem;
  border-radius: 16px;
  color: rgba(255, 255, 255, 0.74);
  padding: 0.78rem 0.95rem;
  font-weight: 600;
  width: 100%;
  overflow: hidden;
}

.nav-sidebar .nav-link > .nav-icon {
  flex: 0 0 1.35rem;
  margin-right: 0;
  text-align: center;
}

.nav-sidebar .nav-link p {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex: 1 1 auto;
  min-width: 0;
  padding-right: 0;
  margin-bottom: 0;
  line-height: 1.35;
  font-size: 0.95rem;
}

.nav-sidebar > .nav-item > .nav-link p {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 0.65rem;
  width: 100%;
}

.nav-sidebar .nav-link:hover,
.nav-sidebar .nav-link:focus,
.nav-sidebar .nav-link.active {
  background: rgba(255, 255, 255, 0.13);
  color: #ffffff;
}

.nav-sidebar .menu-open > .nav-link {
  background: rgba(255, 255, 255, 0.13);
  color: #ffffff;
}

.sidebar-dark-primary .nav-sidebar .nav-link {
  background-color: transparent !important;
}

.sidebar-dark-primary .nav-sidebar > .nav-item > .nav-link.active,
.sidebar-dark-primary .nav-sidebar > .nav-item.menu-open > .nav-link,
.sidebar-dark-primary .nav-sidebar .nav-link:hover,
.sidebar-dark-primary .nav-sidebar .nav-link:focus,
.sidebar-dark-primary .nav-sidebar .nav-treeview > .nav-item > .nav-link.active {
  background: rgba(255, 255, 255, 0.13) !important;
  color: #ffffff !important;
}

.nav-sidebar .nav-treeview {
  padding-left: 0;
  margin-top: 0.45rem;
}

.nav-sidebar .nav-treeview > .nav-item > .nav-link {
  margin-top: 0.34rem;
  padding: 0.68rem 0.85rem 0.68rem 1rem;
  color: rgba(255, 255, 255, 0.67);
}

.nav-sidebar .nav-treeview > .nav-item > .nav-link > .nav-icon {
  flex-basis: 1rem;
  width: 1rem;
  font-size: 0.7rem;
}

.nav-sidebar .nav-treeview > .nav-item > .nav-link p {
  font-size: 0.89rem;
}

.nav-sidebar .nav-link > .right,
.nav-sidebar .nav-link > p > .right,
.nav-sidebar .right {
  position: static !important;
  top: auto !important;
  right: auto !important;
  transform: none !important;
  flex: 0 0 auto;
  margin-left: auto;
  padding-left: 0.25rem;
}

.nav-icon {
  width: 1.35rem;
}

.nav-sidebar .badge {
  font-size: 11px;
  border-radius: 999px;
  padding: 0.28rem 0.52rem;
}

.badge-warning {
  color: #3f2d00;
  background: linear-gradient(120deg, #fbc701, #ffe083);
}

.badge-danger {
  background: linear-gradient(120deg, #ed6370, #d64552);
}

.content-header h1 {
  font-weight: 900;
  letter-spacing: -0.01em;
}

.breadcrumb-item + .breadcrumb-item::before {
  color: #9fafc5;
}

.card,
.info-box {
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--yp-shadow);
  overflow: hidden;
}

.card:hover,
.info-box:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 46px rgba(18, 31, 49, 0.15);
}

.card-header {
  background: linear-gradient(180deg, #ffffff, #f8faff);
  border-bottom: 1px solid #dbe4f1;
}

.card-title {
  font-weight: 800;
  color: #0f172a;
}

.yp-card-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.yp-card-head::after {
  display: none !important;
  content: none !important;
}

.yp-card-head .card-title {
  margin-bottom: 0;
  float: none;
}

.yp-list-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.38rem 0.82rem;
  border-radius: 999px;
  border: 1px solid #f0c02b;
  color: #3b2a00 !important;
  background: linear-gradient(120deg, #ffd558, #f8c52d);
  box-shadow: 0 8px 16px rgba(251, 199, 1, 0.24);
  margin-left: auto;
}

.yp-list-add-btn:hover,
.yp-list-add-btn:focus {
  color: #3b2a00 !important;
  border-color: #dfb123;
  background: linear-gradient(120deg, #ffcf49, #f2bc1d);
}

.yp-list-add-btn > i {
  width: 1rem;
  height: 1rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  background: rgba(255, 255, 255, 0.45);
}

.btn {
  border-radius: 11px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.btn-primary {
  color: #2d1f00;
  border-color: var(--yp-yellow);
  background: linear-gradient(120deg, var(--yp-yellow), #ffd852);
  box-shadow: 0 8px 18px rgba(251, 199, 1, 0.25);
}

.btn-primary:hover {
  color: #2d1f00;
  border-color: var(--yp-yellow-deep);
  background: linear-gradient(120deg, #f2bd00, #ffd142);
}

.btn-success {
  border-color: #189a56;
  background: linear-gradient(120deg, #21b968, #149652);
}

.btn-danger {
  border-color: #cf3b47;
  background: linear-gradient(120deg, #ea5562, #cf3d49);
}

.btn-secondary {
  color: #1f2a44;
  border-color: #d0daee;
  background: linear-gradient(120deg, #f5f8ff, #ecf1fb);
}

.btn-warning {
  color: #3b2a00;
  border-color: #f0c02b;
  background: linear-gradient(120deg, #ffd558, #f8c52d);
}

.form-control,
.custom-select,
.custom-file-label,
.select2-container--default .select2-selection--single {
  border-radius: 11px !important;
  border-color: #d3ddef !important;
  min-height: 40px;
}

.form-control:focus,
.custom-select:focus,
.select2-container--default .select2-selection--single:focus {
  border-color: rgba(251, 199, 1, 0.95) !important;
  box-shadow: 0 0 0 0.2rem rgba(251, 199, 1, 0.22) !important;
}

.table thead th {
  background: linear-gradient(180deg, #fff4cb, #ffe8a8);
  color: #2f2300;
  border-bottom: 1px solid #f0d88d !important;
}

.table td,
.table th {
  vertical-align: middle !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
  background: var(--yp-yellow) !important;
  border-color: var(--yp-yellow) !important;
  color: #211700 !important;
}

.yp-dashboard-cards .small-box {
  border-radius: 17px;
  overflow: hidden;
  box-shadow: 0 16px 34px rgba(17, 24, 39, 0.16);
}

.yp-card-primary {
  background: linear-gradient(145deg, #fbc701, #ffe280) !important;
  color: #1f2937 !important;
}

.yp-card-blue {
  background: linear-gradient(145deg, #2f80ed, #63a5f6) !important;
}

.yp-card-green {
  background: linear-gradient(145deg, #1faa63, #30ca7e) !important;
}

.yp-card-red {
  background: linear-gradient(145deg, #e34d59, #f07782) !important;
}

.yp-runtime-badges {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}

.yp-runtime-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 800;
}

.yp-runtime-badge.ok {
  color: #0f5f31;
  background: rgba(35, 194, 111, 0.16);
}

.yp-runtime-badge.bad {
  color: #8d1f2a;
  background: rgba(226, 79, 93, 0.15);
}

.yp-runtime-badge.info {
  color: #684800;
  background: rgba(251, 199, 1, 0.22);
}

.yp-metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 10px;
}

.yp-metric-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.yp-metric-label {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  color: #4b5b75;
}

.yp-metric-grid input {
  min-height: 34px;
  padding: 6px 8px;
  font-size: 12px;
}

.yp-metric-grid input.yp-passive-input {
  background: #edf2f9 !important;
  color: #64748b !important;
  cursor: not-allowed;
}

.yp-response-item {
  border: 1px solid #e0e7f2;
  border-radius: 14px;
  padding: 12px 14px;
  background: #fff;
}

.yp-response-item + .yp-response-item {
  margin-top: 10px;
}

.yp-response-item.support {
  border-left: 4px solid #fbc701;
  background: #fffdf5;
}

.yp-response-item.customer {
  border-left: 4px solid #3f8efc;
  background: #f7fbff;
}

.yp-muted {
  color: var(--yp-muted) !important;
}

.login-page {
  background:
    radial-gradient(760px 280px at 8% 0%, rgba(251, 199, 1, 0.3), transparent 60%),
    radial-gradient(680px 300px at 100% 100%, rgba(47, 128, 237, 0.2), transparent 62%),
    #f4f8ff;
}

.login-box-modern {
  width: min(1140px, 94vw);
  max-width: 1140px;
}

.login-box-modern .login-card {
  border: 0;
  border-radius: 24px;
  overflow: hidden;
  margin-bottom: 0;
  box-shadow: 0 26px 60px rgba(16, 24, 40, 0.2);
}

.yp-login-shell {
  display: grid;
  grid-template-columns: minmax(360px, 1.1fr) minmax(320px, 0.9fr);
  min-height: 660px;
}

.yp-login-brand-panel {
  position: relative;
  padding: 48px 44px;
  border-right: 1px solid var(--yp-border);
  background:
    radial-gradient(460px 240px at 16% 0%, rgba(251, 199, 1, 0.34), transparent 66%),
    radial-gradient(420px 220px at 90% 100%, rgba(47, 128, 237, 0.15), transparent 64%),
    linear-gradient(150deg, #fffdf4 0%, #f9fcff 68%, #f2f7ff 100%);
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.yp-login-brand-panel::after {
  content: "";
  position: absolute;
  right: 28px;
  top: 28px;
  width: 76px;
  height: 76px;
  border-radius: 24px;
  background: linear-gradient(130deg, #fbc701, #ffe58e);
  opacity: 0.9;
}

.yp-login-brand-copy {
  position: relative;
  z-index: 1;
}

.yp-login-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #2c2000;
  background: linear-gradient(120deg, var(--yp-yellow), #ffe183);
}

.yp-login-brand-copy h1 {
  margin: 14px 0 10px;
  font-size: clamp(1.6rem, 2.5vw, 2.35rem);
  line-height: 1.16;
  font-weight: 900;
  color: #111827;
}

.yp-login-brand-copy p {
  margin: 0;
  color: #4b5563;
  max-width: 540px;
}

.yp-login-feature-list {
  display: grid;
  gap: 14px;
}

.yp-login-feature-item {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  align-items: start;
  padding: 13px 14px;
  border: 1px solid #e4eaf5;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
}

.yp-login-feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #2f2200;
  background: linear-gradient(145deg, #fbc701, #ffe48f);
}

.yp-login-feature-copy strong {
  display: block;
  font-size: 14px;
  font-weight: 800;
  color: #111827;
  margin-bottom: 3px;
}

.yp-login-feature-copy span {
  display: block;
  font-size: 13px;
  line-height: 1.45;
  color: #4b5563;
}

.yp-login-form-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 34px 28px;
  background: linear-gradient(180deg, #ffffff 0%, #fafdff 100%);
}

.yp-login-form-panel-inner {
  width: 100%;
  max-width: 390px;
}

.yp-login-form-header h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 900;
  color: #111827;
}

.yp-login-form-header p {
  margin: 8px 0 16px;
  color: #6b7280;
  font-size: 14px;
}

.yp-inline-alert {
  border-radius: 10px;
  font-size: 13px;
}

.yp-login-field label {
  font-size: 13px;
  font-weight: 800;
  color: #334155;
}

.yp-login-helper-text {
  margin: 14px 0 0;
  text-align: center;
  color: #6b7280;
  font-size: 12px;
}

@media (max-width: 991.98px) {
  body:not(.login-page) .main-header,
  body:not(.login-page) .content-wrapper,
  body:not(.login-page) .main-footer {
    margin-left: 1rem !important;
  }

  .main-sidebar,
  .main-sidebar::before {
    border-radius: 0;
    margin: 0;
    width: var(--yp-sidebar-width) !important;
  }

  .login-box-modern {
    width: min(560px, 94vw);
  }

  .yp-login-shell {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .yp-login-brand-panel {
    border-right: 0;
    border-bottom: 1px solid var(--yp-border);
    padding: 34px 24px;
  }

  .yp-login-brand-panel::after {
    width: 60px;
    height: 60px;
    right: 20px;
    top: 20px;
    border-radius: 18px;
  }

  .yp-login-form-panel {
    padding: 24px 20px 28px;
  }
}
