/* ==========================================================================
   LostParadise AdminCP Theme - Vibrant Cyan & Bright Blue Edition
   - Electric Blue & Cyan Palette (#00b4d8 / #0284c7 / #00e5ff)
   - Deep Midnight Navy Sidebar (#071527 -> #0b223d)
   - Solid Bright Blue Table Headers (#0284c7 / #0099ff)
   - Sleek Monogram LP Logo Integration
   ========================================================================== */

:root {
  --primary-blue: #0284c7;
  --primary-cyan: #00b4d8;
  --accent-cyan: #00e5ff;
  --header-blue: #0284c7;
  --header-blue-gradient: linear-gradient(135deg, #0284c7 0%, #00b4d8 100%);
  --sidebar-bg-top: #061325;
  --sidebar-bg-bottom: #0b223d;
  --sidebar-hover: rgba(0, 180, 216, 0.12);
  --sidebar-active-bg: #ffffff;
  --sidebar-active-text: #0284c7;
  --bg-main: #f8fafc;
  --text-dark: #1e293b;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --table-border: #e9ecef;
  --table-stripe: #fcfdfe;
  --table-hover: #f0f9ff;
  --btn-blue: #0284c7;
  --btn-blue-hover: #0369a1;
  --btn-cyan: #00b4d8;
  --btn-cyan-hover: #0096c7;
  --btn-purple: #6366f1;
  --btn-purple-hover: #4f46e5;
  --btn-red: #ef4444;
  --btn-red-hover: #dc2626;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --sidebar-width: 255px;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-main);
  color: var(--text-dark);
  font-size: 13.5px;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   Layout Containers
   ========================================================================== */

.app-wrapper {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  background: linear-gradient(180deg, var(--sidebar-bg-top) 0%, var(--sidebar-bg-bottom) 100%);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1000;
  overflow-y: auto;
  box-shadow: 3px 0 12px rgba(0, 0, 0, 0.2);
  transition: transform 0.25s ease;
  border-right: 1px solid rgba(0, 180, 216, 0.15);
}

.sidebar-header {
  height: 56px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.25);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  text-decoration: none;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.sidebar-brand .brand-logo-img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  filter: drop-shadow(0 0 6px rgba(0, 229, 255, 0.4));
}

.sidebar-nav {
  padding: 10px 0;
  flex: 1;
}

.nav-item {
  position: relative;
  margin: 2px 0;
}

.nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8.5px 16px;
  color: #e2e8f0;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease;
  cursor: pointer;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
}

.nav-link-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-link svg, .nav-link i {
  width: 16px;
  height: 16px;
  text-align: center;
  flex-shrink: 0;
}

.nav-link:hover {
  background: var(--sidebar-hover);
  color: var(--accent-cyan);
}

/* Active Nav State - Crisp White with Bright Blue Text */
.nav-link.active, .sub-nav-link.active {
  background: var(--sidebar-active-bg) !important;
  color: var(--sidebar-active-text) !important;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.nav-link.active svg, .sub-nav-link.active svg {
  fill: var(--sidebar-active-text);
  color: var(--sidebar-active-text);
}

.toggle-icon {
  font-size: 12px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.4);
  line-height: 1;
  color: #94a3b8;
}

/* Submenu */
.sub-nav {
  display: none;
  background: rgba(0, 0, 0, 0.25);
  padding: 4px 0;
}

.sub-nav.show {
  display: block;
}

.sub-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 16px 7px 38px;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 13px;
  transition: background 0.15s ease, color 0.15s ease;
}

.sub-nav-link:hover {
  background: var(--sidebar-hover);
  color: var(--accent-cyan);
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 16px;
  text-align: center;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.65);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.3);
  line-height: 1.4;
}

.sidebar-footer .dev-name {
  font-weight: 600;
  color: var(--accent-cyan);
}

.sidebar-footer .php-ver {
  color: rgba(255, 255, 255, 0.5);
  margin-top: 2px;
}

/* ==========================================================================
   Main Content Layout
   ========================================================================== */

.main-wrapper {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Topbar */
.topbar {
  height: 56px;
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 99;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.sidebar-toggle-btn {
  display: none;
  background: none;
  border: 1px solid #cbd5e1;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  color: var(--text-dark);
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

.topbar-brand img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: #334155;
}

.admin-greeting {
  font-weight: 500;
}

.admin-name-badge {
  font-weight: 700;
  color: var(--primary-blue);
}

/* Page Content */
.content-body {
  padding: 24px 28px;
  flex: 1;
}

.page-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.page-title {
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.3px;
}

/* ==========================================================================
   Data Table & DataTables Header Controls (Bright Blue Theme)
   ========================================================================== */

.table-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 12px;
}

.table-controls-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.entries-select-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #475569;
}

.entries-select {
  padding: 4px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #ffffff;
  font-size: 13px;
  cursor: pointer;
}

.btn-primary-blue {
  background: var(--header-blue-gradient);
  color: #ffffff;
  border: none;
  padding: 7px 15px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 2px 4px rgba(2, 132, 199, 0.25);
  transition: transform 0.1s ease, box-shadow 0.15s ease;
}

.btn-primary-blue:hover {
  box-shadow: 0 4px 8px rgba(2, 132, 199, 0.35);
  transform: translateY(-1px);
}

.search-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #475569;
}

.search-input {
  padding: 5px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font-size: 13px;
  width: 180px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.search-input:focus {
  border-color: var(--primary-cyan);
  box-shadow: 0 0 0 2px rgba(0, 180, 216, 0.2);
}

/* The Vibrant Bright Blue Table Header */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.admincp-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

.admincp-table thead th {
  background: var(--header-blue);
  color: #ffffff;
  font-weight: 600;
  padding: 10px 14px;
  white-space: nowrap;
  border-right: 1px solid rgba(255, 255, 255, 0.2);
  user-select: none;
  position: relative;
}

.admincp-table thead th:last-child {
  border-right: none;
}

.admincp-table thead th .sort-arrows {
  display: inline-block;
  margin-left: 6px;
  opacity: 0.7;
  font-size: 10px;
}

.admincp-table tbody td {
  padding: 9.5px 14px;
  border-bottom: 1px solid var(--table-border);
  color: #334155;
  white-space: nowrap;
}

.admincp-table tbody tr:nth-child(even) {
  background-color: var(--table-stripe);
}

.admincp-table tbody tr:hover {
  background-color: var(--table-hover);
}

/* Action Buttons */
.action-btn-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-icon-blue {
  background: #0284c7;
  color: #ffffff;
  border: none;
  width: 30px;
  height: 28px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-icon-blue:hover {
  background: #0369a1;
}

.btn-icon-red {
  background: #ef4444;
  color: #ffffff;
  border: none;
  width: 30px;
  height: 28px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-icon-red:hover {
  background: #dc2626;
}

/* Pagination Row */
.table-pagination-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  font-size: 13px;
  color: #64748b;
  flex-wrap: wrap;
  gap: 10px;
}

.pagination-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  text-decoration: none;
  border-radius: 3px;
  font-size: 12.5px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.page-btn:hover {
  background: #f0f9ff;
  border-color: #38bdf8;
}

.page-btn.active {
  background: #0284c7;
  border: 1px solid #0284c7;
  font-weight: 700;
  color: #ffffff;
}

.page-dots {
  padding: 0 4px;
  color: #94a3b8;
}

/* ==========================================================================
   Modals
   ========================================================================== */

.modal-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 25, 47, 0.6);
  backdrop-filter: blur(2px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop.show {
  display: flex;
}

.modal-card {
  background: #ffffff;
  border-radius: 8px;
  width: 100%;
  max-width: 540px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.25), 0 8px 10px -6px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  animation: modalSlideIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid #e2e8f0;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header {
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 22px;
  color: #94a3b8;
  cursor: pointer;
  padding: 2px 6px;
  line-height: 1;
}

.modal-close-btn:hover {
  color: #0f172a;
}

.modal-body {
  padding: 20px 24px;
  max-height: 75vh;
  overflow-y: auto;
}

.modal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-bottom: 18px;
}

.modal-table th {
  background: #f1f5f9;
  color: #334155;
  font-weight: 600;
  padding: 8px 12px;
  border-bottom: 1px solid #cbd5e1;
}

.modal-table td {
  padding: 8px 12px;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
}

.modal-footer {
  padding: 14px 24px;
  display: flex;
  justify-content: flex-end;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  gap: 10px;
}

.btn-modal-close {
  background: #0284c7;
  color: #ffffff;
  border: none;
  padding: 8px 24px;
  border-radius: 4px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-modal-close:hover {
  background: #0369a1;
}

/* Form Styles */
.form-group {
  margin-bottom: 14px;
}

.form-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 5px;
}

.form-control {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.15s ease;
}

.form-control:focus {
  border-color: var(--primary-cyan);
  box-shadow: 0 0 0 2px rgba(0, 180, 216, 0.2);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Status Badges */
.badge-unlocked {
  color: #10b981;
  font-weight: 600;
}

.badge-locked {
  color: #ef4444;
  font-weight: 600;
}

.badge-level-restricted {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 4px;
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
  font-size: 12px;
  font-weight: 600;
}

.badge-cdn-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 3px;
  background: #f0f9ff;
  color: #0284c7;
  border: 1px solid #bae6fd;
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
}

.badge-cdn-link:hover {
  background: #e0f2fe;
}

/* Notification Toast */
.toast-notice {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #0f172a;
  color: #ffffff;
  padding: 12px 20px;
  border-radius: 6px;
  font-size: 13.5px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
  z-index: 3000;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  border-left: 4px solid var(--accent-cyan);
}

.toast-notice.show {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main-wrapper {
    margin-left: 0;
  }
  .sidebar-toggle-btn {
    display: block;
  }
}
