/* Adapted from the project admin.html reference. */


/* ----- CUSTOM CSS (clean, minimal, modern) ----- */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f5f7fb;
  /* soft grey background */
  color: #1e293b;
  overflow-x: hidden;
}


/* --- sidebar --- */

.sidebar {
  background: #ffffff;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.03);
  border-right: 1px solid rgba(0, 0, 0, 0.05);
  width: 280px;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  padding: 1.8rem 1.2rem;
  transition: all 0.2s;
  z-index: 1050;
  overflow-y: auto;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 0.5rem 1.8rem 0.5rem;
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.sidebar-brand i {
  color: #3b82f6;
  font-size: 1.8rem;
}

.sidebar-nav {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.sidebar-nav .nav-item {
  width: 100%;
}

.sidebar-nav .nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0.75rem 1rem;
  border-radius: 14px;
  font-weight: 500;
  font-size: 0.95rem;
  color: #475569;
  text-decoration: none;
  transition: all 0.15s;
}

.sidebar-nav .nav-link i {
  width: 20px;
  font-size: 1.1rem;
  color: #64748b;
  transition: color 0.15s;
}

.sidebar-nav .nav-link:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.sidebar-nav .nav-link:hover i {
  color: #3b82f6;
}

.sidebar-nav .nav-link.active {
  background: #eef2ff;
  color: #2563eb;
  font-weight: 600;
}

.sidebar-nav .nav-link.active i {
  color: #2563eb;
}


/* main content */

.main-wrapper {
  margin-left: 280px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}


/* --- top header --- */

.top-header {
  background: #ffffff;
  padding: 0.9rem 2rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 1040;
  backdrop-filter: blur(8px);
  background: rgba(255, 255, 255, 0.9);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.menu-toggle {
  display: none;
  background: transparent;
  border: none;
  font-size: 1.6rem;
  color: #1e293b;
  padding: 0.2rem 0.5rem;
  border-radius: 12px;
}

.search-box {
  display: flex;
  align-items: center;
  background: #f1f5f9;
  border-radius: 40px;
  padding: 0.4rem 1rem 0.4rem 1.2rem;
  gap: 8px;
}

.search-box i {
  color: #94a3b8;
  font-size: 0.9rem;
}

.search-box input {
  border: none;
  background: transparent;
  font-size: 0.9rem;
  padding: 0.3rem 0;
  outline: none;
  width: 220px;
  color: #1e293b;
}

.search-box input::placeholder {
  color: #94a3b8;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.icon-btn {
  background: transparent;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #475569;
  font-size: 1.2rem;
  transition: background 0.15s;
  position: relative;
}

.icon-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.notification-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  background: #ef4444;
  border-radius: 50%;
  border: 1.5px solid white;
}


/* user dropdown */

.user-dropdown .dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: none;
  padding: 0.3rem 0.8rem 0.3rem 0.3rem;
  border-radius: 40px;
  transition: background 0.15s;
}

.user-dropdown .dropdown-toggle:hover {
  background: #f1f5f9;
}

.user-avatar {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 1rem;
}

.user-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: #1e293b;
}

.user-name i {
  font-size: 0.7rem;
  color: #94a3b8;
  margin-left: 4px;
}

.dropdown-menu {
  border: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  padding: 0.5rem;
  margin-top: 8px !important;
  min-width: 200px;
}

.dropdown-item {
  border-radius: 10px;
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 10px;
}

.dropdown-item i {
  color: #64748b;
  width: 18px;
}

.dropdown-item:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.dropdown-divider {
  margin: 0.4rem 0;
  border-color: #e2e8f0;
}


/* --- page content --- */

.page-content {
  padding: 2rem;
  flex: 1;
}

.page-title {
  font-weight: 600;
  font-size: 1.6rem;
  letter-spacing: -0.02em;
  color: #0b1b33;
  margin-bottom: 1.5rem;
}

.page-title span {
  font-weight: 400;
  font-size: 0.95rem;
  color: #64748b;
  margin-left: 12px;
}


/* --- widget cards --- */

.stat-card {
  background: #ffffff;
  border-radius: 24px;
  padding: 1.5rem 1.4rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(0, 0, 0, 0.02);
  transition: transform 0.15s, box-shadow 0.2s;
  height: 100%;
}

.stat-card:hover {
  box-shadow: 0 12px 28px -8px rgba(0, 0, 0, 0.08);
  transform: translateY(-3px);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

.stat-label {
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #64748b;
  margin-bottom: 0.3rem;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0f172a;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.stat-trend {
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #10b981;
  font-weight: 500;
}

.stat-trend i {
  font-size: 0.75rem;
}

.stat-trend.negative {
  color: #ef4444;
}


/* subtle variations for icons */

.stat-icon.blue {
  background: #eef2ff;
  color: #3b82f6;
}

.stat-icon.purple {
  background: #f3e8ff;
  color: #8b5cf6;
}

.stat-icon.green {
  background: #e6f7ed;
  color: #10b981;
}

.stat-icon.orange {
  background: #fff4e6;
  color: #f97316;
}


/* --- recent activity list (widget) --- */

.activity-card {
  background: #ffffff;
  border-radius: 24px;
  padding: 1.6rem 1.5rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(0, 0, 0, 0.02);
  height: 100%;
}

.card-header-clean {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.2rem;
}

.card-header-clean h5 {
  font-weight: 600;
  font-size: 1.1rem;
  color: #0f172a;
  margin: 0;
  letter-spacing: -0.01em;
}

.card-header-clean a {
  font-size: 0.85rem;
  color: #3b82f6;
  text-decoration: none;
  font-weight: 500;
}

.card-header-clean a:hover {
  text-decoration: underline;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 0.9rem 0;
  border-bottom: 1px solid #f1f5f9;
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-avatar {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: #3b82f6;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.activity-content {
  flex: 1;
}

.activity-title {
  font-weight: 500;
  font-size: 0.9rem;
  color: #0f172a;
  margin-bottom: 0.15rem;
}

.activity-time {
  font-size: 0.75rem;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 6px;
}

.activity-badge {
  font-size: 0.7rem;
  background: #f1f5f9;
  color: #475569;
  padding: 0.2rem 0.6rem;
  border-radius: 40px;
  font-weight: 500;
}


/* --- progress widget --- */

.progress-widget {
  background: #ffffff;
  border-radius: 24px;
  padding: 1.6rem 1.5rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(0, 0, 0, 0.02);
  height: 100%;
}

.progress-item {
  margin-bottom: 1.4rem;
}

.progress-item:last-child {
  margin-bottom: 0;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  font-weight: 500;
  color: #334155;
  margin-bottom: 0.5rem;
}

.progress {
  height: 8px;
  border-radius: 20px;
  background: #f1f5f9;
}

.progress-bar {
  border-radius: 20px;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6);
}


/* --- responsive --- */

@media (max-width: 991.98px) {
  .sidebar {
    transform: translateX(-100%);
    box-shadow: none;
  }
  .sidebar.show {
    transform: translateX(0);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.1);
  }
  .main-wrapper {
    margin-left: 0;
  }
  .menu-toggle {
    display: inline-flex;
  }
  .search-box input {
    width: 160px;
  }
}

@media (max-width: 767.98px) {
  .top-header {
    padding: 0.8rem 1.2rem;
  }
  .page-content {
    padding: 1.5rem 1.2rem;
  }
  .search-box {
    display: none;
  }
  .user-name {
    display: none;
  }
  .user-dropdown .dropdown-toggle {
    padding: 0.2rem;
  }
  .stat-value {
    font-size: 1.6rem;
  }
}


/* nice scrollbar (optional) */

 ::-webkit-scrollbar {
  width: 6px;
}

 ::-webkit-scrollbar-track {
  background: #f1f5f9;
}

 ::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}

 ::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}


/* small helper */

.gap-2 {
  gap: 0.5rem;
}

.fw-600 {
  font-weight: 600;
}


/* Dueping integration and accessible responsive behavior. */

[hidden] {
  display: none !important;
}

.sidebar {
  display: flex;
  flex-direction: column;
}

.sidebar-brand {
  text-decoration: none;
}

.sidebar-label {
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: #94a3b8;
  font-weight: 600;
  padding: 0 1rem;
  margin-bottom: .7rem;
}

.sidebar-account {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-top: auto;
  padding: 1.5rem .5rem .25rem;
}

.sidebar-account>div:last-child {
  min-width: 0;
}

.sidebar-account p {
  overflow-wrap: anywhere;
}

.main-wrapper {
  min-width: 0;
}

.page-content {
  min-width: 0;
  width: 100%;
}

.admin-panel .card {
  border-radius: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .02) !important;
}

.admin-panel .btn,
.admin-auth .btn {
  border-radius: 12px;
  padding: .65rem 1rem;
  font-size: .9rem;
}

.admin-panel .btn-primary,
.admin-auth .btn-primary {
  background: #3b82f6;
  border-color: #3b82f6;
}

.admin-panel .btn-primary:hover,
.admin-auth .btn-primary:hover {
  background: #2563eb;
  border-color: #2563eb;
}

.admin-panel .form-control,
.admin-panel .form-select,
.admin-auth .form-control {
  border-radius: 12px;
  border-color: #e2e8f0;
  padding: .7rem .9rem;
  font-size: .9rem;
}

.form-label {
  font-size: .85rem;
  font-weight: 500;
  color: #334155;
}

.form-text {
  font-size: .78rem;
  line-height: 1.6;
}

.admin-panel .alert {
  border-radius: 16px;
}

.user-dropdown .dropdown-toggle::after {
  display: none;
}

.user-dropdown .dropdown-toggle:focus-visible,
a:focus-visible,
button:focus-visible {
  outline: 3px solid #93c5fd;
  outline-offset: 3px;
}

.account-email {
  overflow-wrap: anywhere;
  display: block;
  max-width: 260px;
}

.admin-footer {
  text-align: center;
  padding: .25rem 1.5rem 1.5rem;
  font-size: .8rem;
  color: #94a3b8;
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .35);
  z-index: 1045;
}

.admin-search {
  position: relative;
}

.search-results {
  position: absolute;
  top: calc(100% + 10px);
  width: 100%;
  min-width: 240px;
  padding: .5rem;
  border-radius: 16px;
  background: white;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .1);
}

.search-results a {
  display: block;
  text-decoration: none;
  color: #334155;
  padding: .7rem .9rem;
  font-size: .9rem;
  border-radius: 10px;
}

.search-results a:hover,
.search-results a:focus {
  background: #f1f5f9;
}

.empty-activity {
  text-align: center;
  padding: 2.2rem 1rem;
}

.empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border-radius: 20px;
  background: #eef2ff;
  color: #3b82f6;
  font-size: 1.5rem;
}

.activity-content {
  min-width: 0;
}

.activity-title {
  overflow-wrap: anywhere;
}

.activity-badge {
  flex-shrink: 0;
}

.email-method {
  border-top: 1px solid #f1f5f9;
  padding-top: 1rem;
}

.auth-wrapper {
  width: 100%;
  max-width: 480px;
  padding: 2rem 1rem;
  margin: auto;
}

.admin-auth {
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.admin-auth .card {
  border-radius: 24px;
  box-shadow: 0 12px 48px rgba(15, 23, 42, .05) !important;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 1rem;
  z-index: 1100;
  background: white;
  padding: .7rem 1rem;
  border-radius: 10px;
}

.skip-link:focus {
  top: 1rem;
}

@media (max-width: 991.98px) {
  body.sidebar-open {
    overflow: hidden;
  }
  .sidebar {
    max-width: calc(100vw - 48px);
  }
}

@media (max-width: 575.98px) {
  .page-title span {
    display: block;
    margin: .45rem 0 0;
  }
  .activity-item {
    flex-wrap: wrap;
  }
  .activity-badge {
    margin-left: 52px;
  }
  .stat-card {
    padding: 1.25rem;
  }
  .top-header {
    flex-wrap: nowrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

.plans-table th {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #64748b;
  background: #f8fafc;
  padding: 1rem;
  border-bottom-color: #e2e8f0;
}

.plans-table td {
  padding: 1.1rem 1rem;
  border-bottom-color: #f1f5f9;
  font-size: .9rem;
}

.plans-table td:first-child {
  min-width: 180px;
  max-width: 260px;
  overflow-wrap: anywhere;
}

.plans-table .btn-sm {
  padding: .4rem .75rem;
  font-size: .8rem;
}