/* ═══════════════════════════════════════════════════════════════
   SAGE MMORPG - Admin Panel Premium Design
   ═══════════════════════════════════════════════════════════════ */

/* Fix image positioning in editor */
#news-editor-ckeditor {
  position: relative;
  overflow: hidden;
}

#news-editor-ckeditor img {
  position: relative !important;
  z-index: 1 !important;
  vertical-align: top !important;
  clear: both !important;
  max-width: 100% !important;
  height: auto !important;
  display: block !important;
  margin: 20px 0 !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3) !important;
}

/* Fix H1 visibility in editor */
#news-editor-ckeditor h1 {
  font-size: 2rem !important;
  font-weight: 700 !important;
  color: #00e5ff !important;
  margin: 20px 0 10px 0 !important;
  line-height: 1.2 !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

#news-editor-ckeditor h2 {
  font-size: 1.5rem !important;
  font-weight: 600 !important;
  color: #00e5ff !important;
  margin: 18px 0 8px 0 !important;
  line-height: 1.3 !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

#news-editor-ckeditor h3 {
  font-size: 1.25rem !important;
  font-weight: 600 !important;
  color: #00e5ff !important;
  margin: 16px 0 6px 0 !important;
  line-height: 1.4 !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Ensure all content is visible in editor */
#news-editor-ckeditor * {
  visibility: visible !important;
  opacity: 1 !important;
}

#news-editor-ckeditor span {
  display: inline !important;
}

#news-editor-ckeditor div {
  display: block !important;
}

#news-editor-ckeditor p {
  display: block !important;
  margin: 10px 0 !important;
}

/* Preserve alignment styles in editor */
#news-editor-ckeditor [style*="text-align: center"],
#news-editor-ckeditor [style*="text-align:center"] {
  text-align: center !important;
}

#news-editor-ckeditor [style*="text-align: right"],
#news-editor-ckeditor [style*="text-align:right"] {
  text-align: right !important;
}

#news-editor-ckeditor [style*="text-align: left"],
#news-editor-ckeditor [style*="text-align:left"] {
  text-align: left !important;
}

/* Base Variables */
:root {
  --bg-dark: #0a0e1a;
  --bg-darker: #050810;
  --panel-bg: rgba(15, 25, 45, 0.85);
  --panel-border: rgba(100, 180, 255, 0.25);
  --text-primary: #ffffff;
  --text-secondary: #b8c9e0;
  --text-muted: #7a8ba5;
  --accent-blue: #4da8ff;
  --accent-cyan: #00e5ff;
  --accent-gold: #ffd700;
  --accent-purple: #a855f7;
  --accent-green: #00ff88;
  --accent-red: #ff6b6b;
  --glow-blue: rgba(77, 168, 255, 0.4);
  --glow-gold: rgba(255, 215, 0, 0.3);
}

/* Badge Styles */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.badge.success {
  background: linear-gradient(135deg, rgba(0, 255, 136, 0.2), rgba(0, 200, 100, 0.2));
  color: #00ff88;
  border-color: rgba(0, 255, 136, 0.4);
  box-shadow: 0 0 10px rgba(0, 255, 136, 0.2);
}

.badge.danger {
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.2), rgba(200, 50, 50, 0.2));
  color: #ff6b6b;
  border-color: rgba(255, 107, 107, 0.4);
  box-shadow: 0 0 10px rgba(255, 107, 107, 0.2);
}

.badge.warning {
  background: linear-gradient(135deg, rgba(255, 193, 7, 0.2), rgba(255, 152, 0, 0.2));
  color: #ffc107;
  border-color: rgba(255, 193, 7, 0.4);
  box-shadow: 0 0 10px rgba(255, 193, 7, 0.2);
}

/* Global Reset & Base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: 
    radial-gradient(ellipse 1200px 800px at 50% -20%, rgba(77, 168, 255, 0.15), transparent 60%),
    radial-gradient(ellipse 1000px 600px at 0% 100%, rgba(168, 85, 247, 0.12), transparent 70%),
    radial-gradient(ellipse 1000px 600px at 100% 80%, rgba(0, 229, 255, 0.1), transparent 70%),
    linear-gradient(180deg, #050810 0%, #0a0e1a 50%, #0f1528 100%);
  background-attachment: fixed;
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  overflow-y: scroll;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Custom Scrollbar for Body */
body::-webkit-scrollbar {
  width: 10px;
}

body::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.3);
}

body::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent-blue), var(--accent-cyan));
  border-radius: 10px;
}

body::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--accent-cyan), var(--accent-blue));
}

/* Animated Background Particles */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: 
    radial-gradient(2px 2px at 20% 30%, rgba(255, 255, 255, 0.3), transparent),
    radial-gradient(2px 2px at 60% 70%, rgba(77, 168, 255, 0.4), transparent),
    radial-gradient(1px 1px at 50% 50%, rgba(0, 229, 255, 0.3), transparent),
    radial-gradient(1px 1px at 80% 10%, rgba(168, 85, 247, 0.3), transparent),
    radial-gradient(2px 2px at 90% 60%, rgba(255, 215, 0, 0.2), transparent);
  background-size: 200px 200px, 250px 250px, 300px 300px, 180px 180px, 220px 220px;
  background-position: 0 0, 40px 60px, 130px 270px, 70px 100px, 150px 50px;
  animation: sparkle 60s linear infinite;
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}

@keyframes sparkle {
  0% { transform: translateY(0); }
  100% { transform: translateY(-200px); }
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.3s ease;
}

.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

.muted {
  color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════════════════════ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(5, 8, 16, 0.75);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(77, 168, 255, 0.2);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: linear-gradient(90deg, 
    transparent, 
    var(--accent-blue) 20%, 
    var(--accent-cyan) 50%, 
    var(--accent-blue) 80%, 
    transparent
  );
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 70px;
  position: relative;
  max-width: 100%;
  padding: 0 40px;
}

.brand {
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: 24px;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  text-shadow: 
    0 0 20px var(--glow-blue),
    0 0 40px var(--glow-blue);
  transition: all 0.3s ease;
}

.brand:hover {
  text-shadow: 
    0 0 30px var(--glow-blue),
    0 0 60px var(--glow-blue),
    0 0 80px var(--glow-blue);
  transform: scale(1.05);
}

.brand span {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Mobile Menu Toggle (Hamburger) */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 24px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
  margin-left: auto;
}

.mobile-menu-toggle span {
  width: 100%;
  height: 3px;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
  border-radius: 3px;
  transition: all 0.3s ease;
  box-shadow: 0 0 10px var(--glow-blue);
}

.mobile-menu-toggle:hover span {
  box-shadow: 0 0 15px var(--glow-blue), 0 0 25px var(--glow-blue);
}

/* Hamburger animation when active */
.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

.main-nav {
  display: flex;
  gap: 8px;
  align-items: center;
  flex: 1;
}

.main-nav .panel-tab {
  padding: 10px 20px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.main-nav .panel-tab i {
  font-size: 16px;
}

.main-nav .panel-tab:hover {
  color: var(--accent-cyan);
  background: rgba(77, 168, 255, 0.1);
}

.main-nav .panel-tab.active {
  color: var(--accent-cyan);
  background: rgba(0, 229, 255, 0.15);
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.2);
}

.main-nav .panel-tab.active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
}

.nav-link {
  padding: 10px 20px;
  border-radius: 8px;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 14px;
  position: relative;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.nav-link i {
  font-size: 16px;
}

.nav-link::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 8px;
  padding: 1px;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.nav-link:hover {
  color: var(--text-primary);
  background: rgba(77, 168, 255, 0.1);
  transform: translateY(-2px);
}

.nav-link:hover::before {
  opacity: 1;
}

/* ═══════════════════════════════════════════════════════════════
   ADMIN LAYOUT
   ═══════════════════════════════════════════════════════════════ */

.site-main {
  position: relative;
  flex: 1 0 auto;
  z-index: 1;
  padding: 40px 0;
}

/* Full Width Layout - No Sidebar */
.admin-container {
  width: 100%;
  max-width: 100%;
  padding: 0 40px;
}

.admin-layout {
  display: none; /* Old layout - not used */
}

/* Hide Sidebar - Navigation moved to header */
.admin-aside {
  display: none;
}

/* Custom Scrollbar for Sidebar */
.admin-aside::-webkit-scrollbar {
  width: 6px;
}

.admin-aside::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
}

.admin-aside::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent-blue), var(--accent-cyan));
  border-radius: 10px;
}

.admin-aside::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--accent-cyan), var(--accent-blue));
}

.admin-aside h3 {
  font-family: 'Orbitron', sans-serif;
  font-size: 18px;
  margin: 0 0 20px 0;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-menu button,
.admin-menu a {
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.admin-menu button:hover,
.admin-menu a:hover {
  background: rgba(77, 168, 255, 0.1);
  border-color: var(--accent-blue);
  color: var(--text-primary);
}

.admin-menu button.active {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
  border-color: transparent;
  color: white;
  box-shadow: 0 4px 15px rgba(77, 168, 255, 0.4);
}

/* Main Content */
.admin-main {
  min-height: calc(100vh - 160px);
  width: 100%;
  max-width: 100%;
}

.admin-main h1 {
  display: none; /* Title moved to header/navigation */
}

/* ═══════════════════════════════════════════════════════════════
   PANEL VIEWS
   ═══════════════════════════════════════════════════════════════ */

.panel-nav {
  display: none; /* Navigation moved to header */
}

/* Panel tabs are now styled in .main-nav .panel-tab (see header section above) */
.panel-tab {
  /* Base styles inherited from .main-nav .panel-tab */
}

.panel-view {
  display: none;
}

.panel-view.visible {
  display: block;
}

.panel-content {
  background: var(--panel-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  padding: 32px;
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.panel-sub {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 20px;
}

/* ═══════════════════════════════════════════════════════════════
   KPI CARDS
   ═══════════════════════════════════════════════════════════════ */

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}

.kpi-card {
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.2));
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 24px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.kpi-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-cyan));
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.kpi-card:hover {
  border-color: var(--accent-blue);
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(77, 168, 255, 0.3);
}

.kpi-card:hover::before {
  transform: scaleX(1);
}

.kpi-label {
  color: var(--text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
  font-weight: 600;
}

.kpi-value {
  font-family: 'Orbitron', sans-serif;
  font-size: 36px;
  font-weight: 700;
  color: var(--accent-cyan);
  text-shadow: 0 0 20px var(--glow-blue);
}

/* ═══════════════════════════════════════════════════════════════
   GRID & CARDS
   ═══════════════════════════════════════════════════════════════ */

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

/* ═══════════════════════════════════════════════════════════════
   NEWS EDITOR - Full Width Layout
   ═══════════════════════════════════════════════════════════════ */

.news-selector-bar {
  background: var(--panel-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 24px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.news-selector-group {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.news-selector-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

#news-selector {
  flex: 1;
  max-width: 500px;
  min-width: 250px;
}

.news-editor-container {
  background: var(--panel-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 32px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.news-editor-header {
  margin-bottom: 32px;
}

.news-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.news-meta-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.news-meta-item label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0;
}

.news-meta-item input,
.news-meta-item select {
  width: 100%;
}

.news-editor-body {
  margin-bottom: 24px;
}

.news-editor-body textarea {
  min-height: 500px;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 14px;
  line-height: 1.6;
}

/* ═══ Quill Rich Text Editor Dark Theme ═══ */
.ql-toolbar.ql-snow {
  background: rgba(10, 20, 35, 0.6);
  border: 1px solid rgba(100, 180, 255, 0.2) !important;
  border-bottom: none !important;
  border-radius: 8px 8px 0 0;
  padding: 12px;
}

.ql-container.ql-snow {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(100, 180, 255, 0.2) !important;
  border-radius: 0 0 8px 8px;
  font-size: 15px;
  font-family: 'Inter', sans-serif;
  color: var(--text-primary);
}

.ql-editor {
  min-height: 450px;
  color: var(--text-primary) !important;
}

.ql-editor.ql-blank::before {
  color: var(--text-muted);
  font-style: italic;
}

/* Quill Toolbar Buttons */
.ql-snow .ql-stroke {
  stroke: var(--text-secondary) !important;
}

.ql-snow .ql-fill {
  fill: var(--text-secondary) !important;
}

.ql-snow .ql-picker-label {
  color: var(--text-secondary) !important;
}

.ql-toolbar.ql-snow .ql-picker-label:hover,
.ql-toolbar.ql-snow .ql-picker-item:hover {
  color: var(--accent-cyan) !important;
}

.ql-toolbar.ql-snow button:hover .ql-stroke,
.ql-toolbar.ql-snow button.ql-active .ql-stroke {
  stroke: var(--accent-cyan) !important;
}

.ql-toolbar.ql-snow button:hover .ql-fill,
.ql-toolbar.ql-snow button.ql-active .ql-fill {
  fill: var(--accent-cyan) !important;
}

.ql-toolbar.ql-snow button:hover,
.ql-toolbar.ql-snow button.ql-active {
  background: rgba(0, 229, 255, 0.1);
  border-radius: 4px;
}

/* Quill Dropdown Menus */
.ql-snow .ql-picker-options {
  background: rgba(15, 25, 45, 0.98);
  border: 1px solid rgba(100, 180, 255, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  border-radius: 8px;
  padding: 8px 0;
}

.ql-snow .ql-picker-item {
  color: var(--text-secondary) !important;
}

.ql-snow .ql-picker-item:hover {
  background: rgba(0, 229, 255, 0.15) !important;
  color: var(--accent-cyan) !important;
}

/* Quill Content Styles */
.ql-editor h1 {
  font-size: 2em;
  font-weight: 700;
  color: var(--accent-cyan);
  margin: 0.67em 0;
  font-family: 'Orbitron', sans-serif;
}

.ql-editor h2 {
  font-size: 1.5em;
  font-weight: 600;
  color: var(--accent-blue);
  margin: 0.83em 0;
  font-family: 'Orbitron', sans-serif;
}

.ql-editor h3 {
  font-size: 1.17em;
  font-weight: 600;
  color: var(--text-primary);
  margin: 1em 0;
}

.ql-editor code {
  background: rgba(0, 229, 255, 0.1);
  color: var(--accent-cyan);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Consolas', monospace;
}

.ql-editor pre {
  background: rgba(0, 0, 0, 0.4);
  border-left: 3px solid var(--accent-cyan);
  padding: 12px;
  border-radius: 4px;
  overflow-x: auto;
}

.ql-editor blockquote {
  border-left: 4px solid var(--accent-blue);
  padding-left: 16px;
  margin: 16px 0;
  color: var(--text-secondary);
  font-style: italic;
}

.ql-editor a {
  color: var(--accent-cyan);
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 229, 255, 0.3);
  transition: all 0.3s ease;
}

.ql-editor a:hover {
  color: var(--accent-blue);
  border-bottom-color: var(--accent-blue);
}

/* Visual HTML Table Styling */
.quill-visual-table {
  border-collapse: collapse;
  width: 100%;
  margin: 20px 0;
  background: rgba(15, 25, 45, 0.8);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(100, 180, 255, 0.2);
}

.quill-visual-table thead {
  background: linear-gradient(135deg, #1a1f35 0%, #2d3748 50%, #1a1f35 100%);
  border-bottom: 2px solid #4da8ff;
}

.quill-visual-table th {
  padding: 16px 20px;
  text-align: left;
  font-weight: 600;
  color: #00e5ff;
  border-right: 1px solid rgba(100, 180, 255, 0.3);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  background: linear-gradient(135deg, #1a1f35 0%, #2d3748 50%, #1a1f35 100%);
  position: relative;
}

.quill-visual-table th:last-child {
  border-right: none;
}

.quill-visual-table th:focus {
  outline: 2px solid #00e5ff;
  outline-offset: -2px;
  background: rgba(0, 229, 255, 0.1);
  box-shadow: inset 0 0 0 2px rgba(0, 229, 255, 0.3);
}

.quill-visual-table tbody tr {
  background: rgba(15, 25, 45, 0.6);
  transition: all 0.3s ease;
  border-bottom: 1px solid rgba(100, 180, 255, 0.15);
}

.quill-visual-table tbody tr:nth-child(even) {
  background: rgba(15, 25, 45, 0.8);
}

.quill-visual-table tbody tr:hover {
  background: rgba(100, 180, 255, 0.1);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.quill-visual-table tbody tr:last-child {
  border-bottom: none;
}

.quill-visual-table td {
  padding: 14px 20px;
  color: #d0d7e5;
  border-right: 1px solid rgba(100, 180, 255, 0.15);
  font-size: 14px;
  line-height: 1.4;
  transition: all 0.3s ease;
}

.quill-visual-table td:last-child {
  border-right: none;
}

.quill-visual-table td:focus {
  outline: 2px solid #00e5ff;
  outline-offset: -2px;
  background: rgba(0, 229, 255, 0.1);
  box-shadow: inset 0 0 0 2px rgba(0, 229, 255, 0.3);
}

.quill-visual-table th:empty::before,
.quill-visual-table td:empty::before {
  content: 'Click to edit';
  color: rgba(255, 255, 255, 0.4);
  font-style: italic;
  font-size: 12px;
}

/* Enhanced hover effects */
.quill-visual-table tbody tr:hover td {
  color: #ffffff;
  border-right-color: rgba(100, 180, 255, 0.3);
}

/* Responsive table */
@media (max-width: 768px) {
  .quill-visual-table {
    font-size: 12px;
    margin: 15px 0;
  }
  
  .quill-visual-table th,
  .quill-visual-table td {
    padding: 10px 12px;
  }
  
  .quill-visual-table th {
    font-size: 12px;
    letter-spacing: 0.5px;
  }
}

/* Table wrapper styling for admin editor */
.quill-table-wrapper {
  margin: 20px 0 !important;
  border: 2px solid rgba(0, 229, 255, 0.3) !important;
  border-radius: 8px !important;
  padding: 10px !important;
  background: rgba(0, 0, 0, 0.2) !important;
  position: relative !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  min-height: 100px !important;
}

.quill-table-wrapper::before {
  content: 'Table';
  position: absolute;
  top: -10px;
  left: 10px;
  background: rgba(0, 229, 255, 0.9);
  color: #000;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}

/* Ensure table is visible inside wrapper */
.quill-table-wrapper table {
  display: table !important;
  visibility: visible !important;
  opacity: 1 !important;
  width: 100% !important;
  table-layout: auto !important;
  overflow-x: auto !important;
}

/* Handle large tables with horizontal scroll */
.quill-table-wrapper {
  overflow-x: auto !important;
  max-width: 100% !important;
}

.quill-table-wrapper table {
  min-width: 100% !important;
  white-space: nowrap !important;
}

/* Ensure cells are properly sized */
.quill-table-wrapper table th,
.quill-table-wrapper table td {
  min-width: 120px !important;
  max-width: 200px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* Table button styling */
.ql-toolbar .ql-table:hover {
  background: rgba(0, 229, 255, 0.1) !important;
  border-color: rgba(0, 229, 255, 0.5) !important;
  color: #00e5ff !important;
  transform: translateY(-1px);
}

.ql-toolbar .ql-table:active {
  background: rgba(0, 229, 255, 0.2) !important;
  transform: translateY(0);
}

/* Quill Images */
.ql-editor img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 16px 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Quill Lists */
.ql-editor ul,
.ql-editor ol {
  padding-left: 1.5em;
  margin: 12px 0;
}

.ql-editor li {
  margin: 8px 0;
  color: var(--text-secondary);
}

/* Quill Video */
.ql-editor .ql-video {
  border-radius: 8px;
  margin: 16px 0;
}

/* Quill Tooltip (for links and images) */
.ql-snow .ql-tooltip {
  background: rgba(15, 25, 45, 0.98);
  border: 1px solid rgba(100, 180, 255, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  color: var(--text-primary);
  border-radius: 8px;
  padding: 8px 12px;
}

.ql-snow .ql-tooltip input[type="text"] {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(100, 180, 255, 0.2);
  color: var(--text-primary);
  padding: 6px 10px;
  border-radius: 4px;
}

.ql-snow .ql-tooltip input[type="text"]:focus {
  border-color: var(--accent-cyan);
  outline: none;
}

.ql-snow .ql-tooltip a {
  color: var(--accent-cyan) !important;
}

.ql-snow .ql-tooltip a:hover {
  color: var(--accent-blue) !important;
}

.news-editor-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive News Editor */
@media (max-width: 1200px) {
  .news-meta-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .news-meta-grid {
    grid-template-columns: 1fr;
  }
  
  .news-selector-group {
    flex-direction: column;
    align-items: stretch;
  }
  
  #news-selector {
    max-width: 100%;
  }
  
  .news-editor-container {
    padding: 20px;
  }
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.card-header h3 {
  font-family: 'Orbitron', sans-serif;
  font-size: 20px;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0;
}

/* ═══════════════════════════════════════════════════════════════
   FORMS
   ═══════════════════════════════════════════════════════════════ */

.form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form.visible {
  display: flex;
}

label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

input[type="text"],
input[type="url"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="datetime-local"],
select,
textarea {
  width: 100%;
  padding: 14px 18px;
  background: rgba(5, 10, 20, 0.6);
  border: 1px solid rgba(77, 168, 255, 0.2);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 15px;
  transition: all 0.3s ease;
  font-family: inherit;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent-cyan);
  box-shadow: 
    inset 0 2px 8px rgba(0, 0, 0, 0.3),
    0 0 0 3px rgba(0, 229, 255, 0.15),
    0 0 20px rgba(0, 229, 255, 0.1);
  background: rgba(5, 10, 20, 0.8);
}

input:hover,
select:hover,
textarea:hover {
  border-color: rgba(77, 168, 255, 0.4);
  background: rgba(5, 10, 20, 0.7);
}

textarea {
  min-height: 200px;
  resize: vertical;
}

input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
}

/* Rich Text Editor Toolbar */
.rich-editor-toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  margin-bottom: 12px;
}

.rich-editor-toolbar button {
  padding: 8px 12px;
  background: rgba(77, 168, 255, 0.1);
  border: 1px solid var(--accent-blue);
  border-radius: 6px;
  color: var(--accent-cyan);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.rich-editor-toolbar button:hover {
  background: rgba(77, 168, 255, 0.2);
  transform: translateY(-2px);
}

.rich-editor-toolbar select {
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 14px;
}

.form-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

/* Settings Section Styling */
.panel-view[data-view="settings"] h4 {
  color: var(--accent-cyan);
  font-family: 'Orbitron', sans-serif;
  font-size: 18px;
  margin-bottom: 20px;
  margin-top: 0;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 0 0 10px rgba(0, 229, 255, 0.3);
}

.panel-view[data-view="settings"] hr {
  margin: 32px 0;
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.panel-view[data-view="settings"] .muted {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 8px;
  display: block;
  line-height: 1.5;
}

.panel-view[data-view="settings"] label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ═══════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
  color: white;
  box-shadow: 0 4px 15px rgba(77, 168, 255, 0.4);
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn:hover::before {
  opacity: 1;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(77, 168, 255, 0.6);
}

.btn.small {
  padding: 8px 16px;
  font-size: 13px;
}

.btn.danger, .btn-danger {
  background: linear-gradient(135deg, #ff6b6b, #ff4444);
  box-shadow: 0 4px 15px rgba(255, 68, 68, 0.4);
}

.btn.danger:hover, .btn-danger:hover {
  box-shadow: 0 6px 25px rgba(255, 68, 68, 0.6);
}

.btn-success {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, var(--accent-green), #00cc70) !important;
  box-shadow: 0 4px 15px rgba(0, 255, 136, 0.4) !important;
  color: white;
}

.btn-success::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn-success:hover::before {
  opacity: 1;
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(0, 255, 136, 0.6) !important;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan)) !important;
  box-shadow: 0 4px 15px rgba(77, 168, 255, 0.4) !important;
  color: white;
}

.btn-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn-primary:hover::before {
  opacity: 1;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(77, 168, 255, 0.6) !important;
}

.btn-small {
  padding: 6px 14px !important;
  font-size: 12px !important;
}

/* Payment Package Inputs */
.package-input:focus {
  outline: none;
  border-color: rgba(77, 168, 255, 0.5) !important;
  box-shadow: 0 0 0 3px rgba(77, 168, 255, 0.1) !important;
}

.package-input::placeholder {
  color: #7a8ba5;
}

/* ═══════════════════════════════════════════════════════════════
   TABLES
   ═══════════════════════════════════════════════════════════════ */

.table-wrap {
  overflow-x: auto;
  overflow-y: auto;
  border-radius: 8px;
  max-height: 500px;
}

/* Activity table - fit 10 rows without scroll */
.panel-view[data-view="activity"] .table-wrap {
  max-height: none;
  overflow-y: visible;
}

.panel-view[data-view="activity"] .table thead th {
  padding: 10px 12px;
  font-size: 11px;
}

.panel-view[data-view="activity"] .table tbody td {
  padding: 10px 12px;
  font-size: 13px;
}

.panel-view[data-view="activity"] .table {
  border-spacing: 0 4px;
}

.panel-view[data-view="activity"] .btn.small {
  padding: 6px 12px;
  font-size: 12px;
}

.panel-view[data-view="activity"] .badge {
  padding: 4px 8px;
  font-size: 11px;
}

/* Custom Scrollbar for Tables */
.table-wrap::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.table-wrap::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
}

.table-wrap::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent-blue), var(--accent-cyan));
  border-radius: 10px;
}

.table-wrap::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--accent-cyan), var(--accent-blue));
}

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 8px;
}

.table thead th {
  color: var(--accent-gold);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 12px 16px;
  text-align: left;
  border-bottom: 2px solid rgba(255, 215, 0, 0.3);
}

.table tbody tr {
  background: rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.table tbody tr:hover {
  background: rgba(77, 168, 255, 0.1);
  box-shadow: 0 4px 20px rgba(77, 168, 255, 0.2);
}

.table tbody td {
  padding: 14px 16px;
  color: var(--text-secondary);
  font-size: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.table tbody td:first-child {
  border-left: 1px solid rgba(255, 255, 255, 0.05);
  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
}

.table tbody td:last-child {
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
}

/* ═══════════════════════════════════════════════════════════════
   BADGES
   ═══════════════════════════════════════════════════════════════ */

.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge.success {
  background: linear-gradient(135deg, var(--accent-green), #00cc6a);
  color: white;
  box-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
}

.badge.danger {
  background: linear-gradient(135deg, var(--accent-red), #ff4444);
  color: white;
  box-shadow: 0 0 10px rgba(255, 68, 68, 0.3);
}

.badge.muted {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.badge.hot {
  background: linear-gradient(135deg, #ff6b6b, #ff4444);
  color: white;
  box-shadow: 0 0 10px rgba(255, 68, 68, 0.5);
}

.badge.new {
  background: linear-gradient(135deg, #00ff88, #00cc6a);
  color: white;
  box-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

.badge.update {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
  color: white;
  box-shadow: 0 0 10px var(--glow-blue);
}

.badge.event {
  background: linear-gradient(135deg, var(--accent-gold), #ffed4e);
  color: #1a0f00;
  box-shadow: 0 0 10px var(--glow-gold);
}

/* ═══════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════ */

.site-footer {
  background: rgba(5, 8, 16, 0.9);
  border-top: 1px solid rgba(77, 168, 255, 0.2);
  padding: 32px 0;
  margin-top: 80px;
  position: relative;
}

.site-footer::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -2px;
  height: 2px;
  background: linear-gradient(90deg, 
    transparent, 
    var(--accent-blue) 20%, 
    var(--accent-cyan) 50%, 
    var(--accent-blue) 80%, 
    transparent
  );
  opacity: 0.5;
}

.footer-inner {
  max-width: 100%;
  padding: 0 40px;
  text-align: center;
}

.site-footer p {
  color: var(--text-secondary);
  font-size: 14px;
  margin: 0;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE DESIGN
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 1200px) {
  .admin-container {
    padding: 0 20px;
  }
  
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .main-nav {
    flex-wrap: wrap;
  }
}

@media (max-width: 768px) {
  .header-inner {
    height: 64px;
  }
  
  .brand {
    font-size: 18px;
  }
  
  /* Show hamburger menu on mobile */
  .mobile-menu-toggle {
    display: flex !important;
  }
  
  /* Hide navigation by default on mobile */
  .main-nav {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(5, 8, 16, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 0;
    border-top: 1px solid rgba(77, 168, 255, 0.2);
    border-bottom: 1px solid rgba(77, 168, 255, 0.2);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 999;
  }
  
  .main-nav.active {
    max-height: 500px;
    opacity: 1;
    padding: 20px;
  }
  
  .main-nav .panel-tab,
  .main-nav .nav-link {
    width: 100%;
    text-align: center;
    margin-left: 0 !important;
    margin-bottom: 8px;
  }
  
  .admin-main h1 {
    font-size: 32px;
  }
  
  .kpi-grid {
    grid-template-columns: 1fr;
  }
  
  .grid-2 {
    grid-template-columns: 1fr;
  }
  
  .panel-nav {
    flex-direction: column;
  }
  
  .panel-tab {
    width: 100%;
  }
  
  .panel-content {
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .form-actions {
    flex-direction: column;
  }
  
  .form-actions .btn {
    width: 100%;
  }
}
