/* ==========================================================================
   NOL Admin Portal — Ultra-Modern Dark Theme CSS (Master Plan v3.2.2)
   Inspired by: Linear, Vercel, Telegram Web & Apple Dark Aesthetic
   ========================================================================== */

:root {
  --bg-main: #070a12;
  --bg-header: rgba(10, 15, 26, 0.88);
  --bg-nav: rgba(13, 19, 33, 0.95);
  --bg-card: rgba(17, 24, 39, 0.75);
  --bg-card-hover: rgba(22, 32, 50, 0.85);
  --bg-input: #090d16;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(59, 130, 246, 0.35);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;
  --primary: #3b82f6;
  --primary-glow: rgba(59, 130, 246, 0.25);
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(at 50% 0%, rgba(59, 130, 246, 0.09) 0%, transparent 50%),
    radial-gradient(at 100% 100%, rgba(124, 58, 237, 0.06) 0%, transparent 45%);
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.mono {
  font-family: 'JetBrains Mono', monospace;
  font-feature-settings: 'tnum';
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   Navigation Tabs Bar (Segmented Pill Design)
   ========================================================================== */
.nav-tabs-wrapper {
  background: var(--bg-nav);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.6rem 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: 0.85rem;
  border: 1px solid transparent;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  background: transparent;
  white-space: nowrap !important;
  flex-shrink: 0;
  user-select: none;
  line-height: 1.25;
}

.tab-btn svg {
  width: 1.05rem;
  height: 1.05rem;
  flex-shrink: 0;
  transition: transform 0.2s ease, color 0.2s ease;
}

.tab-btn:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.09);
}

.tab-btn:hover svg {
  transform: scale(1.08);
}

.tab-btn.active {
  color: #60a5fa;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.2) 0%, rgba(59, 130, 246, 0.1) 100%);
  border-color: rgba(59, 130, 246, 0.45);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.tab-btn.active svg {
  color: #60a5fa;
}

.tab-btn.standby {
  color: var(--text-subtle);
  opacity: 0.75;
}

.tab-btn.standby:hover {
  color: #cbd5e1;
  opacity: 1;
  background: rgba(255, 255, 255, 0.03);
}

/* ==========================================================================
   Glassmorphic Cards & UI Elements
   ========================================================================== */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: 1.25rem;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.glass-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

.metric-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: 1.25rem;
  padding: 1.35rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.metric-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.metric-card:hover {
  transform: translateY(-2px);
  border-color: rgba(59, 130, 246, 0.35);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 0 20px rgba(59, 130, 246, 0.1);
}

/* ==========================================================================
   Forms, Inputs & Buttons
   ========================================================================== */
input[type="text"],
input[type="url"],
input[type="datetime-local"],
textarea,
select {
  background-color: var(--bg-input) !important;
  border: 1px solid var(--border-color) !important;
  color: #ffffff !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input[type="text"]:focus,
input[type="url"]:focus,
input[type="datetime-local"]:focus,
textarea:focus,
select:focus {
  outline: none !important;
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2) !important;
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
  color: #ffffff;
  border-radius: 0.75rem;
  font-weight: 600;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

/* ==========================================================================
   Table & Lists
   ========================================================================== */
table tbody tr {
  transition: background-color 0.15s ease;
}

table tbody tr:hover {
  background-color: rgba(59, 130, 246, 0.04);
}

/* ==========================================================================
   Status Dots & Animations
   ========================================================================== */
@keyframes pulseGlow {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
  }
  50% {
    opacity: 0.6;
    transform: scale(0.92);
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
  }
}

.pulse-dot {
  animation: pulseGlow 2.4s infinite ease-in-out;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #070a12;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* ==========================================================================
   Quill Visual WYSIWYG Dark Theme Overrides
   ========================================================================== */
.quill-dark-wrapper {
  border-radius: 0.85rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #060a12;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.quill-dark-wrapper:focus-within {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 1px #3b82f6;
}

.ql-toolbar.ql-snow {
  background: #090d16 !important;
  border: none !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  padding: 8px 12px !important;
  font-family: inherit !important;
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}

.ql-toolbar.ql-snow .ql-formats {
  margin-right: 10px !important;
  margin-bottom: 3px !important;
}

.ql-container.ql-snow {
  background: #060a12 !important;
  border: none !important;
  color: #f1f5f9 !important;
  font-family: inherit !important;
  font-size: 0.875rem !important;
  min-height: 160px;
}

.ql-editor {
  min-height: 160px;
  line-height: 1.6;
  color: #f1f5f9;
  padding: 14px 16px !important;
}

.ql-editor.ql-blank::before {
  color: #64748b !important;
  font-style: normal !important;
  left: 16px !important;
}

.ql-editor img {
  max-width: 100%;
  height: auto;
  border-radius: 0.75rem;
  margin: 0.75rem 0;
  display: inline-block;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.ql-editor pre.ql-syntax {
  background-color: #0b1120 !important;
  color: #38bdf8 !important;
  border: 1px solid #1e293b !important;
  border-radius: 0.5rem !important;
  padding: 0.75rem 1rem !important;
  font-family: 'JetBrains Mono', monospace !important;
  font-size: 0.8125rem !important;
  overflow-x: auto;
}

.ql-editor blockquote {
  border-left: 3px solid #3b82f6 !important;
  background: rgba(59, 130, 246, 0.08) !important;
  padding: 0.55rem 0.85rem !important;
  border-radius: 0.5rem !important;
  color: #93c5fd !important;
  font-style: italic;
  margin: 0.5rem 0 !important;
}

.ql-editor .ql-align-center {
  text-align: center;
}
.ql-editor .ql-align-right {
  text-align: right;
}
.ql-editor .ql-align-justify {
  text-align: justify;
}

.ql-snow .ql-stroke {
  stroke: #94a3b8 !important;
}

.ql-snow .ql-fill {
  fill: #94a3b8 !important;
}

.ql-snow .ql-picker {
  color: #94a3b8 !important;
}

.ql-snow .ql-picker-label {
  color: #94a3b8 !important;
  border: 1px solid transparent;
  padding-left: 6px !important;
  padding-right: 4px !important;
}

.ql-snow .ql-picker-options {
  background-color: #0b1120 !important;
  border: 1px solid #1e293b !important;
  color: #f1f5f9 !important;
  box-shadow: 0 12px 30px -5px rgba(0, 0, 0, 0.65) !important;
  border-radius: 0.6rem !important;
  padding: 8px !important;
  z-index: 100 !important;
}

/* Color & Background Picker Dark Grid */
.ql-snow .ql-color .ql-picker-options,
.ql-snow .ql-background .ql-picker-options {
  width: 172px !important;
  padding: 8px 10px !important;
}

.ql-snow .ql-color .ql-picker-item,
.ql-snow .ql-background .ql-picker-item {
  border-radius: 4px !important;
  margin: 2px !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  transition: transform 0.15s ease;
}

.ql-snow .ql-color .ql-picker-item:hover,
.ql-snow .ql-background .ql-picker-item:hover {
  transform: scale(1.2);
  border: 1.5px solid #ffffff !important;
}

.ql-snow .ql-picker-item:hover,
.ql-snow .ql-picker-item.ql-selected {
  color: #3b82f6 !important;
}

.ql-snow button:hover .ql-stroke,
.ql-snow button.ql-active .ql-stroke {
  stroke: #3b82f6 !important;
}

.ql-snow button:hover .ql-fill,
.ql-snow button.ql-active .ql-fill {
  fill: #3b82f6 !important;
}

/* ==========================================================================
   Admin Modal Test Preview Dynamic Rich Content
   ========================================================================== */
#admin-preview-modal-content h1,
#admin-preview-modal-content h2 {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  margin-top: 0.75rem;
  margin-bottom: 0.25rem;
  letter-spacing: -0.01em;
}

#admin-preview-modal-content h3,
#admin-preview-modal-content h4 {
  font-size: 1rem;
  font-weight: 700;
  color: #38bdf8;
  margin-top: 0.5rem;
  margin-bottom: 0.25rem;
}

#admin-preview-modal-content p {
  margin-top: 0.35rem;
  margin-bottom: 0.35rem;
  color: #e2e8f0;
  line-height: 1.6;
}

#admin-preview-modal-content ul {
  list-style-type: disc;
  padding-left: 1.25rem;
  margin: 0.5rem 0;
  color: #cbd5e1;
}

#admin-preview-modal-content ol {
  list-style-type: decimal;
  padding-left: 1.25rem;
  margin: 0.5rem 0;
  color: #cbd5e1;
}

#admin-preview-modal-content li {
  margin: 0.25rem 0;
}

#admin-preview-modal-content blockquote {
  border-left: 3px solid #3b82f6;
  background: rgba(59, 130, 246, 0.1);
  padding: 0.55rem 0.85rem;
  border-radius: 0.5rem;
  font-style: italic;
  color: #93c5fd;
  margin: 0.5rem 0;
}

#admin-preview-modal-content a {
  color: #38bdf8;
  text-decoration: underline;
  font-weight: 600;
}

#admin-preview-modal-content img {
  max-width: 100%;
  border-radius: 0.75rem;
  margin: 0.5rem 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

