/* Design System & Global Styles */
:root {
  --font-title: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  /* Color Palette - Cyber Dark Glassmorphism */
  --bg-dark: #090b11;
  --bg-darker: #050609;
  --glass-bg: rgba(18, 22, 35, 0.65);
  --glass-bg-hover: rgba(26, 32, 50, 0.8);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-active: rgba(255, 255, 255, 0.2);
  
  --text-primary: #f1f3f9;
  --text-secondary: #9aa2b6;
  --text-muted: #646b7c;
  
  /* Glowing Accents */
  --accent-purple: #9d4edd;
  --accent-purple-glow: rgba(157, 78, 221, 0.45);
  --accent-cyan: #00f5d4;
  --accent-cyan-glow: rgba(0, 245, 212, 0.45);
  
  --success-green: #38b000;
  --success-green-glow: rgba(56, 176, 0, 0.4);
  --error-red: #ff0054;
  --error-red-glow: rgba(255, 0, 84, 0.45);
  --warning-yellow: #ffb703;
  
  --sidebar-width: 260px;
  --header-height: 80px;
}

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

body {
  background-color: var(--bg-dark);
  background-image: 
    radial-gradient(at 10% 10%, rgba(157, 78, 221, 0.15) 0px, transparent 50%),
    radial-gradient(at 90% 90%, rgba(0, 245, 212, 0.1) 0px, transparent 50%);
  color: var(--text-primary);
  font-family: var(--font-body);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-darker);
}
::-webkit-scrollbar-thumb {
  background: var(--glass-border);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Layout */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar Navigation */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-darker);
  border-right: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  position: fixed;
  height: 100vh;
  z-index: 100;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 36px;
  padding: 0 8px;
}

.logo-icon {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-cyan));
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-family: var(--font-title);
  color: var(--bg-darker);
  box-shadow: 0 0 15px var(--accent-purple-glow);
}

.brand h2 {
  font-family: var(--font-title);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  background: linear-gradient(to right, #ffffff, #dcdde1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

.nav-item {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  padding: 12px 16px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-title);
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item svg {
  color: var(--text-muted);
  transition: color 0.25s ease;
}

.nav-item:hover {
  background: var(--glass-bg-hover);
  color: var(--text-primary);
  border-color: var(--glass-border);
}

.nav-item:hover svg {
  color: var(--text-primary);
}

.nav-item.active {
  background: rgba(157, 78, 221, 0.12);
  border: 1px solid rgba(157, 78, 221, 0.3);
  color: var(--text-primary);
  box-shadow: 0 4px 15px rgba(157, 78, 221, 0.05);
}

.nav-item.active svg {
  color: var(--accent-purple);
}

.ai-spark {
  background: linear-gradient(45deg, var(--accent-purple), var(--accent-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
}

.sidebar-footer {
  padding: 16px 8px 0;
  border-top: 1px solid var(--glass-border);
  color: var(--text-muted);
  font-size: 0.8rem;
  text-align: center;
}

/* Main Content Area */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  padding: 0 32px 40px;
  min-height: 100vh;
}

/* Header */
.top-header {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--glass-border);
  margin-bottom: 32px;
}

.page-title h1 {
  font-family: var(--font-title);
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.page-title p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.scheduler-toggle-container {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  padding: 8px 16px;
  border-radius: 20px;
}

.scheduler-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.status-indicator-badge {
  font-size: 0.8rem;
  padding: 3px 10px;
  border-radius: 12px;
  font-weight: 600;
  background: rgba(255, 0, 84, 0.1);
  color: var(--error-red);
  border: 1px solid rgba(255, 0, 84, 0.2);
  transition: all 0.3s ease;
}

.status-indicator-badge.active {
  background: rgba(56, 176, 0, 0.1);
  color: var(--success-green);
  border: 1px solid rgba(56, 176, 0, 0.2);
  box-shadow: 0 0 8px var(--success-green-glow);
  animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
  0% { box-shadow: 0 0 0 0 rgba(56, 176, 0, 0.4); }
  70% { box-shadow: 0 0 0 6px rgba(56, 176, 0, 0); }
  100% { box-shadow: 0 0 0 0 rgba(56, 176, 0, 0); }
}

/* Switch UI */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--text-muted);
  transition: .3s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
}

input:checked + .slider {
  background-gradient: linear-gradient(135deg, var(--accent-purple), var(--accent-cyan));
  background-color: var(--accent-purple);
}

input:checked + .slider:before {
  transform: translateX(20px);
}

.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

/* Tab Sections */
.tab-section {
  display: none;
  animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.tab-section.active {
  display: block;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Glassmorphism Panel */
.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  transition: border-color 0.3s ease;
}

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

/* Stats Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 20px;
  backdrop-filter: blur(12px);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  border-color: var(--glass-border-active);
}

.stat-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-icon.purple { background: rgba(157, 78, 221, 0.15); color: var(--accent-purple); border: 1px solid rgba(157, 78, 221, 0.25); }
.stat-icon.cyan { background: rgba(0, 245, 212, 0.15); color: var(--accent-cyan); border: 1px solid rgba(0, 245, 212, 0.25); }
.stat-icon.green { background: rgba(56, 176, 0, 0.15); color: var(--success-green); border: 1px solid rgba(56, 176, 0, 0.25); }
.stat-icon.red { background: rgba(255, 0, 84, 0.15); color: var(--error-red); border: 1px solid rgba(255, 0, 84, 0.25); }

.stat-info h3 {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.stat-info p {
  font-family: var(--font-title);
  font-size: 1.6rem;
  font-weight: 700;
  margin-top: 4px;
}

/* Dashboard Panel Layout */
.dashboard-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.dashboard-layout.no-sidebar-layout {
  grid-template-columns: 4fr 6fr;
}

.dashboard-panel {
  display: flex;
  flex-direction: column;
  min-height: 450px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--glass-border);
}

.panel-header h2 {
  font-family: var(--font-title);
  font-size: 1.15rem;
  font-weight: 600;
}

.panel-body {
  flex: 1;
}

/* Buttons */
.btn {
  background: transparent;
  border: 1px solid transparent;
  padding: 10px 20px;
  font-family: var(--font-title);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.25s ease;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
  border-radius: 8px;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1.05rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-purple));
  color: white;
  border: none;
  box-shadow: 0 4px 15px rgba(157, 78, 221, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #ae5aff, #ab4bf0);
  box-shadow: 0 6px 20px var(--accent-purple-glow);
  transform: translateY(-2px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--glass-border-active);
}

.btn-outline {
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
}

.btn-outline:hover {
  border-color: var(--glass-border-active);
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.02);
}

.btn-danger-outline {
  border: 1px solid rgba(255, 0, 84, 0.3);
  color: var(--error-red);
}

.btn-danger-outline:hover {
  background: rgba(255, 0, 84, 0.1);
  border-color: var(--error-red);
}

.btn-close-modal {
  background: transparent;
  border: none;
  font-size: 1.8rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.2s;
}

.btn-close-modal:hover {
  color: var(--error-red);
}

.w-100 { width: 100%; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }

/* Sub Tabs */
.tabs-sub {
  display: flex;
  gap: 12px;
  border-bottom: 1px solid var(--glass-border);
  margin-bottom: 24px;
}

.tab-sub-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-title);
  font-size: 1rem;
  font-weight: 500;
  padding: 12px 16px;
  cursor: pointer;
  position: relative;
  transition: color 0.2s;
}

.tab-sub-btn:hover {
  color: var(--text-primary);
}

.tab-sub-btn.active {
  color: var(--accent-purple);
  font-weight: 600;
}

.tab-sub-btn.active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent-purple);
  box-shadow: 0 0 8px var(--accent-purple-glow);
}

.sub-tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

.sub-tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Empty States & Lists */
.empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  height: 150px;
}

.list-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.list-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.2s, border-color 0.2s;
}

.list-item:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.15);
}

.list-item-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.list-item-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.list-item-meta {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.list-item-side {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Sites Tab styles */
.action-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.action-bar h2 {
  font-family: var(--font-title);
  font-size: 1.3rem;
  font-weight: 600;
}

.sites-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.site-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 180px;
  position: relative;
  overflow: hidden;
}

.site-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--text-muted);
}

.site-card.online::before {
  background: var(--success-green);
  box-shadow: 0 0 10px var(--success-green-glow);
}

.site-card.offline::before {
  background: var(--error-red);
  box-shadow: 0 0 10px var(--error-red-glow);
}

.site-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}

.site-domain {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.05rem;
  word-break: break-all;
  color: white;
  margin-right: 8px;
}

.site-badge {
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 8px;
  font-weight: 600;
  text-transform: uppercase;
}

.site-badge.online { background: rgba(56, 176, 0, 0.15); color: var(--success-green); }
.site-badge.offline { background: rgba(255, 0, 84, 0.15); color: var(--error-red); }

.site-meta {
  font-size: 0.8rem;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 16px;
}

.site-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid var(--glass-border);
  padding-top: 12px;
}

.empty-state-card {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px;
  color: var(--text-secondary);
}

/* Forms & Inputs */
.form-row {
  display: flex;
  gap: 20px;
  margin-bottom: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}

.form-group.col-8 { flex: 8; }
.form-group.col-6 { flex: 6; }
.form-group.col-4 { flex: 4; }

label {
  font-family: var(--font-title);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
}

input[type="text"],
input[type="url"],
input[type="number"],
input[type="password"],
input[type="datetime-local"],
select,
textarea {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 12px 16px;
  color: white;
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: all 0.3s ease;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(157, 78, 221, 0.6);
  box-shadow: 0 0 10px rgba(157, 78, 221, 0.2);
}

.form-help {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.radio-group {
  display: flex;
  gap: 24px;
  margin-top: 8px;
}

.radio-container {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  user-select: none;
}

.radio-container input {
  display: none;
}

.radio-mark {
  width: 18px;
  height: 18px;
  border: 2px solid var(--glass-border);
  border-radius: 50%;
  display: inline-block;
  position: relative;
  transition: all 0.2s;
}

.radio-container input:checked + .radio-mark {
  border-color: var(--accent-purple);
  background: transparent;
}

.radio-container input:checked + .radio-mark::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  background: var(--accent-purple);
  border-radius: 50%;
  top: 3px;
  left: 3px;
}

.input-password-wrapper {
  display: flex;
  position: relative;
}

.input-password-wrapper input {
  width: 100%;
  padding-right: 64px;
}

.btn-toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-family: var(--font-title);
  font-weight: 600;
  cursor: pointer;
  padding: 4px;
}

.btn-toggle-password:hover {
  color: var(--text-primary);
}

/* Bulk Importer Help Box */
.bulk-instructions {
  background: rgba(255, 255, 255, 0.015);
  border: 1px dashed var(--glass-border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
}

.bulk-instructions h3 {
  font-family: var(--font-title);
  font-size: 1rem;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.bulk-instructions p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.format-examples {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  padding: 12px;
}

.format-col pre {
  font-family: monospace;
  font-size: 0.8rem;
  color: var(--accent-cyan);
  overflow-x: auto;
  white-space: pre;
  margin-top: 6px;
}

/* Data Tables */
.table-container {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th,
.data-table td {
  padding: 16px 20px;
  font-size: 0.9rem;
}

.data-table th {
  font-family: var(--font-title);
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.1);
}

.data-table td {
  border-bottom: 1px solid var(--glass-border);
  color: var(--text-primary);
}

.data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.015);
}

.post-link-btn {
  color: var(--accent-cyan);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.85rem;
}

.post-link-btn:hover {
  text-decoration: underline;
}

/* AI Preview Screen Split */
.flex-column { display: flex; flex-direction: column; }
.flex-1 { flex: 1; }

.ai-empty-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-muted);
  text-align: center;
  padding: 40px;
  gap: 16px;
}

.preview-spark {
  font-size: 2.5rem;
  background: linear-gradient(to bottom, var(--accent-purple), var(--accent-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
  100% { transform: translateY(0px); }
}

.ai-preview-content {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.preview-title-input {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.1rem !important;
}

.ai-html-toggle {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.ai-rich-editor-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 16px;
  color: white;
  min-height: 250px;
  max-height: 350px;
  overflow-y: auto;
  outline: none;
  font-size: 0.95rem;
  line-height: 1.6;
}

.ai-rich-editor-box:focus {
  border-color: rgba(157, 78, 221, 0.6);
}

.ai-rich-editor-box h2,
.ai-rich-editor-box h3 {
  font-family: var(--font-title);
  margin-top: 14px;
  margin-bottom: 8px;
}

.ai-rich-editor-box p {
  margin-bottom: 12px;
}

.ai-code-editor-box {
  font-family: monospace !important;
  font-size: 0.85rem !important;
}

/* AI Spark animations */
.ai-spark-large {
  display: inline-block;
  animation: ai-pulse 1.5s infinite alternate;
}

@keyframes ai-pulse {
  from { transform: scale(1); filter: drop-shadow(0 0 1px var(--accent-cyan)); }
  to { transform: scale(1.15); filter: drop-shadow(0 0 5px var(--accent-cyan-glow)); }
}

/* Modals */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  width: 90%;
  max-width: 580px;
  animation: zoomIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes zoomIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 16px;
  margin-bottom: 20px;
}

.modal-header h2 {
  font-family: var(--font-title);
  font-size: 1.3rem;
  font-weight: 700;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

.test-result-box {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  animation: fadeIn 0.2s ease;
}

.test-result-box.success {
  background: rgba(56, 176, 0, 0.1);
  color: var(--success-green);
  border: 1px solid rgba(56, 176, 0, 0.2);
}

.test-result-box.error {
  background: rgba(255, 0, 84, 0.1);
  color: var(--error-red);
  border: 1px solid rgba(255, 0, 84, 0.2);
}

/* Badge States */
.badge {
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: 12px;
  font-weight: 600;
}

.badge-pending { background: rgba(255, 183, 3, 0.12); color: var(--warning-yellow); border: 1px solid rgba(255, 183, 3, 0.2); }
.badge-posting { background: rgba(0, 245, 212, 0.12); color: var(--accent-cyan); border: 1px solid rgba(0, 245, 212, 0.2); }
.badge-published { background: rgba(56, 176, 0, 0.12); color: var(--success-green); border: 1px solid rgba(56, 176, 0, 0.2); }
.badge-failed { background: rgba(255, 0, 84, 0.12); color: var(--error-red); border: 1px solid rgba(255, 0, 84, 0.2); }

/* Toast Notification */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 10000;
}

.toast {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
  color: white;
  padding: 16px 24px;
  border-radius: 12px;
  font-weight: 500;
  font-size: 0.9rem;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideInLeft 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  position: relative;
  min-width: 280px;
  overflow: hidden;
}

.toast::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 100%;
  background: var(--accent-purple);
  animation: shrink-progress 3s linear forwards;
}

.toast.success::after { background: var(--success-green); }
.toast.error::after { background: var(--error-red); }

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(50px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes shrink-progress {
  from { width: 100%; }
  to { width: 0%; }
}

/* Settings Box */
.settings-container {
  max-width: 680px;
}

.section-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* SEO Sub elements for Queue Table */
.slug-cell-sub {
  font-size: 0.78rem;
  color: var(--accent-cyan);
  margin-top: 4px;
}
.slug-cell-sub code {
  background: rgba(0, 245, 212, 0.1);
  padding: 1px 4px;
  border-radius: 4px;
  font-family: monospace;
}
.excerpt-cell-sub {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 350px;
}
.error-msg-sub {
  font-size: 0.78rem;
  color: var(--error-red);
  margin-top: 4px;
}

/* Post Type Sub-elements in Queue */
.type-cell-sub {
  font-size: 0.78rem;
  color: var(--accent-purple);
  margin-top: 4px;
  font-weight: 500;
}
.badge-tag-disabled {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
}

/* Large Modal styling for post editing */
.modal-content.modal-lg {
  max-width: 950px;
}

.mb-3 {
  margin-bottom: 1rem;
}

/* Rich Preview styling */
.preview-body-content h1,
.preview-body-content h2,
.preview-body-content h3,
.preview-body-content h4 {
  font-family: var(--font-title);
  color: white;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.preview-body-content p {
  margin-bottom: 1rem;
}

.preview-body-content ul,
.preview-body-content ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.preview-body-content li {
  margin-bottom: 0.5rem;
}

.preview-body-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
}

.preview-body-content th,
.preview-body-content td {
  border: 1px solid var(--glass-border);
  padding: 10px 14px;
  font-size: 0.9rem;
}

.preview-body-content th {
  background: rgba(255, 255, 255, 0.05);
  font-weight: 600;
  text-align: left;
}

.preview-body-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1rem 0;
}

/* Presets grid */
.presets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 16px;
}

.preset-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  border-radius: 12px;
  background: var(--panel-bg);
  border: 1px solid var(--glass-border);
  position: relative;
  overflow: hidden;
}

.preset-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.preset-name {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.1rem;
  color: white;
}

.preset-prompt-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preset-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: auto;
}

