/* ==============================================
   Zoro CMS - Admin Panel CSS
   Matches the original Next.js ZORO panel design
   Dark sidebar + header layout
   ============================================== */

/* --- CSS Variables (matching config.reui.css) --- */
:root {
  --background: #e7e7e7;
  --foreground: #09090b;
  --card: #f6f6f6;
  --card-foreground: #09090b;
  --popover: #ffffff;
  --popover-foreground: #09090b;
  --primary: #2271b1;
  --primary-foreground: #ffffff;
  --secondary: #f4f4f5;
  --secondary-foreground: #18181b;
  --muted: #f4f4f5;
  --muted-foreground: #71717a;
  --accent: #dcdcde;
  --accent-foreground: #18181b;
  --destructive: #dc2626;
  --destructive-foreground: #ffffff;
  --border: #ebebed;
  --input: #f1f1f1;
  --input-background: #f1f1f1;
  --ring: #a1a1aa;
  --radius: 0.5rem;

  /* Dark Sidebar & Header */
  --sidebar: #1d2327;
  --sidebar-foreground: #9aa0a5;
  --sidebar-accent: #2c3338;
  --sidebar-accent-foreground: #ffffff;
  --sidebar-border: #3c434a;
  --sidebar-ring: #2271b1;
  --sidebar-hover-text: #72aee6;

  /* Layout Dimensions */
  --header-height: 56px;
  --sidebar-width: 215px;
  --sidebar-collapsed-width: 60px;

  /* Spacing unit (0.25rem) – pub-date ve tutarlı boşluklar için */
  --spacing: 0.25rem;

  /* Açılan pencereler (dialog/modal) tek arka plan – bütünlük için */
  --dialog-bg: var(--card);
}

.dark {
  --background: #09090b;
  --foreground: #fafafa;
  --card: #09090b;
  --card-foreground: #fafafa;
  --popover: #09090b;
  --popover-foreground: #fafafa;
  --primary: #2271b1;
  --primary-foreground: #ffffff;
  --secondary: #27272a;
  --secondary-foreground: #fafafa;
  --muted: #18181b;
  --muted-foreground: #71717a;
  --accent: #18181b;
  --accent-foreground: #fafafa;
  --border: #27272a;
  --input: #27272a;
  --ring: #52525b;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.15) transparent;
}

*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 9999px;
}

*::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.25);
}

*::-webkit-scrollbar-corner {
  background: transparent;
}

*::-webkit-scrollbar-button {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

body {
  font-family: 'Geist', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  background-color: var(--background);
  color: var(--foreground);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* =============================================
   HEADER - Full width, fixed top, dark
   ============================================= */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: var(--header-height);
  background-color: var(--sidebar);
  color: var(--sidebar-foreground);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 16px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 4px;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: var(--sidebar-foreground);
  font-weight: 700;
  font-size: 1.25rem;
}

.header-logo:hover {
  color: #fff;
}

.logo-icon {
  width: 28px;
  height: 28px;
}

.logo-text {
  letter-spacing: 0.02em;
}

.header-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 32px;
  padding: 0 8px;
  border-radius: 4px;
  font-size: 0.875rem;
  color: rgba(154, 160, 165, 0.7);
  background: transparent;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.15s, background-color 0.15s;
}

.header-btn:hover {
  color: var(--sidebar-foreground);
  background-color: var(--sidebar-accent);
}

.header-stat span {
  font-size: 0.75rem;
}

.header-avatar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--sidebar-accent);
  color: rgba(154, 160, 165, 0.7);
  border: none;
  cursor: pointer;
  transition: color 0.15s, background-color 0.15s;
}

.header-avatar-btn:hover {
  color: var(--sidebar-foreground);
  background: rgba(44, 51, 56, 0.8);
}

.header-divider {
  width: 1px;
  height: 20px;
  background: var(--sidebar-border);
  margin: 0 4px;
}

.mobile-menu-btn {
  display: none;
}

/* Header Dropdown */
.header-dropdown {
  position: relative;
}

.header-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 176px;
  background: var(--sidebar);
  color: var(--sidebar-foreground);
  border-radius: 0 0 var(--radius) var(--radius);
  z-index: 60;
  padding: 4px 0;
  margin-top: 4px;
  animation: dropdown-in 0.15s ease;
}

/* Dropdown hover bridge - menüye geçerken hover korunur */
.header-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -4px;
  left: 0;
  right: 0;
  height: 4px;
}

.header-dropdown-menu.dropdown-right {
  left: auto;
  right: 0;
}

.header-dropdown.open>.header-dropdown-menu,
.header-dropdown:hover>.header-dropdown-menu {
  display: block;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  font-size: 14px;
  color: rgba(154, 160, 165, 0.7);
  text-decoration: none;
  border: none;
  background: none;
  cursor: pointer;
  text-align: left;
  transition: background 0.1s, color 0.1s;
}

.dropdown-item:hover {
  background: var(--sidebar-accent);
  color: var(--sidebar-foreground);
}

.dropdown-item-danger {
  color: var(--destructive);
}

.dropdown-item-danger:hover {
  background: rgba(220, 38, 38, 0.08);
}

.dropdown-header {
  padding: 8px 12px;
  margin-bottom: 4px;
}

.dropdown-user-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--sidebar-foreground);
}

.dropdown-user-role {
  font-size: 12px;
  color: rgba(154, 160, 165, 0.6);
}

.dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

.dropdown-form {
  display: contents;
}

/* Site Selector in Header */
.header-site-selector {
  display: flex;
  align-items: center;
}

.site-select {
  height: 32px;
  padding: 0 28px 0 10px;
  font-size: 0.875rem;
  background: var(--sidebar-accent);
  color: var(--sidebar-foreground);
  border: 1px solid var(--sidebar-border);
  border-radius: 4px;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239aa0a5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}

.site-select:hover {
  border-color: var(--sidebar-hover-text);
}

.site-select:focus {
  outline: none;
  border-color: var(--sidebar-hover-text);
  box-shadow: 0 0 0 2px rgba(114, 174, 230, 0.25);
}

.site-select option {
  background: var(--sidebar);
  color: var(--sidebar-foreground);
}

@keyframes dropdown-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =============================================
   SIDEBAR - Fixed, below header, dark
   ============================================= */
.sidebar {
  position: fixed;
  top: var(--header-height);
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background: var(--sidebar);
  color: var(--sidebar-foreground);
  border-right: 1px solid var(--sidebar-border);
  z-index: 30;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: width 0.2s ease;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px 8px;
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}

.sidebar-nav:hover {
  scrollbar-color: var(--sidebar-accent) transparent;
}

.sidebar-nav::-webkit-scrollbar {
  width: 5px;
}

.sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 20px;
}

.sidebar-nav:hover::-webkit-scrollbar-thumb {
  background: var(--sidebar-accent);
}

/* Section Headings */
.sidebar-heading {
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 600;
  color: rgba(154, 160, 165, 0.6);
  padding: 16px 12px 4px 12px;
  letter-spacing: 0.05em;
}

.sidebar-heading:first-child {
  padding-top: 0;
}

/* Menu Items */
.sidebar-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 36px;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--sidebar-foreground);
  text-decoration: none;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 0;
  transition: none;
  text-align: left;
}

.sidebar-item:hover {
  color: var(--sidebar-hover-text);
  box-shadow: inset 4px 0 0 0 currentColor;
}

.sidebar-item.active {
  color: var(--sidebar-hover-text);
  box-shadow: inset 4px 0 0 0 currentColor;
}

.sidebar-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.sidebar-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  font-size: 0.625rem;
  font-weight: 600;
  line-height: 1;
  color: var(--popover-foreground);
  background: var(--sidebar-foreground);
  border-radius: 999px;
  margin-left: auto;
  flex-shrink: 0;
}

/* Submenu */
.sidebar-submenu {}

.sidebar-chevron {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  opacity: 0.5;
  transition: transform 0.2s;
}

.sidebar-submenu.open>.sidebar-item>.sidebar-chevron {
  transform: rotate(180deg);
}

.sidebar-submenu-items {
  display: none;
  padding-left: 24px;
}

.sidebar-submenu.open>.sidebar-submenu-items {
  display: block;
}

.sidebar-subitem {
  display: block;
  padding: 6px 12px;
  font-size: 14px;
  color: var(--sidebar-foreground);
  text-decoration: none;
  transition: none;
}

.sidebar-subitem:hover {
  color: var(--sidebar-hover-text);
  box-shadow: inset 4px 0 0 0 currentColor;
}

.sidebar-subitem.active {
  color: var(--sidebar-hover-text);
  box-shadow: inset 4px 0 0 0 currentColor;
}

/* Sidebar Footer */
.sidebar-footer {
  border-top: 1px solid var(--sidebar-border);
  padding: 8px;
}

.sidebar-collapse-btn {
  color: rgba(154, 160, 165, 0.7) !important;
}

.sidebar-collapse-btn:hover {
  color: var(--sidebar-hover-text) !important;
}

.collapse-icon-closed {
  display: none;
}

.sidebar.collapsed .collapse-icon-open {
  display: none;
}

.sidebar.collapsed .collapse-icon-closed {
  display: block;
}

/* Sidebar Collapsed State */
.sidebar.collapsed {
  width: var(--sidebar-collapsed-width);
}

.sidebar.collapsed .sidebar-label,
.sidebar.collapsed .sidebar-heading,
.sidebar.collapsed .sidebar-chevron,
.sidebar.collapsed .sidebar-submenu-items,
.sidebar.collapsed .sidebar-badge,
.sidebar.collapsed .logo-text {
  display: none;
}

.sidebar.collapsed .sidebar-item {
  justify-content: center;
  padding: 0;
}

.sidebar.collapsed~.content-wrapper {
  margin-left: var(--sidebar-collapsed-width);
}

/* Sidebar Overlay (mobile) */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 25;
}

/* =============================================
   CONTENT WRAPPER
   ============================================= */
.content-wrapper {
  margin-left: var(--sidebar-width);
  padding-top: var(--header-height);
  min-height: 100vh;
  transition: margin-left 0.2s ease;
}

.main-content {
  padding: 20px;
  transition: opacity .15s ease;
}

/* =============================================
   FLASH MESSAGES
   ============================================= */
/* Toast Notification System */
.toast-container {
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
  max-width: 420px;
  width: 100%;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #fff;
  pointer-events: auto;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  animation: toast-in 0.3s ease forwards;
}

.toast.dismissing {
  animation: toast-out 0.3s ease forwards;
}

.toast-success {
  background: #2ecc71;
}

.toast-error {
  background: #e74c3c;
}

.toast-warning {
  background: #f39c12;
}

.toast-info {
  background: #3498db;
}

.toast-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

.toast-message {
  flex: 1;
  min-width: 0;
  line-height: 1.4;
}

.toast-close {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border-radius: 4px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.15s, background 0.15s;
}

.toast-close:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.25);
}

.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 0 0 8px 8px;
  animation: toast-progress-shrink 5s linear forwards;
  animation-play-state: running;
}

.toast:hover .toast-progress {
  animation-play-state: paused;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateX(100%);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes toast-out {
  from {
    opacity: 1;
    transform: translateX(0);
  }

  to {
    opacity: 0;
    transform: translateX(100%);
  }
}

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

  to {
    width: 0%;
  }
}

/* =============================================
   SVG ICON SIZES
   ============================================= */
.icon-xs {
  width: 12px;
  height: 12px;
}

.icon-sm {
  width: 16px;
  height: 16px;
}

.icon-md {
  width: 20px;
  height: 20px;
}

.icon-lg {
  width: 24px;
  height: 24px;
}

.icon-xl {
  width: 48px;
  height: 48px;
}

svg {
  flex-shrink: 0;
}

/* =============================================
   UTILITY CLASSES (Tailwind-like)
   ============================================= */

/* Display */
.flex {
  display: flex;
}

.inline-flex {
  display: inline-flex;
}

.grid {
  display: grid;
}

.inline {
  display: inline;
}

.block {
  display: block;
}

.hidden {
  display: none;
}

/* Flex */
.flex-col {
  flex-direction: column;
}

.flex-1 {
  flex: 1 1 0%;
}

.items-center {
  align-items: center;
}

.items-start {
  align-items: flex-start;
}

.items-end {
  align-items: flex-end;
}

.justify-between {
  justify-content: space-between;
}

.justify-center {
  justify-content: center;
}

.justify-end {
  justify-content: flex-end;
}

.gap-1 {
  gap: 0.25rem;
}

.gap-1\.5 {
  gap: 0.375rem;
}

.gap-2 {
  gap: 0.5rem;
}

.gap-3 {
  gap: 0.75rem;
}

.gap-4 {
  gap: 1rem;
}

.gap-5 {
  gap: 1.25rem;
}

.gap-6 {
  gap: 1.5rem;
}

.flex-wrap {
  flex-wrap: wrap;
}

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

.grow {
  flex-grow: 1;
}

/* Grid */
.grid-cols-1 {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

.grid-cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (min-width: 640px) {
  .sm\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sm\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .sm\:col-span-2 {
    grid-column: span 2 / span 2;
  }
}

@media (min-width: 768px) {
  .md\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .md\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .md\:grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .md\:gap-5 {
    gap: 1.25rem;
  }

  .md\:col-span-2 {
    grid-column: span 2 / span 2;
  }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lg\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .lg\:grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .lg\:grid-cols-5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .lg\:col-span-2 {
    grid-column: span 2 / span 2;
  }
}

/* Spacing */
.p-0 {
  padding: 0;
}

.p-1 {
  padding: 0.25rem;
}

.p-1\.5 {
  padding: 0.375rem;
}

.p-2 {
  padding: 0.5rem;
}

.p-3 {
  padding: 0.75rem;
}

.p-3\.5 {
  padding: 0.875rem;
}

.p-4 {
  padding: 1rem;
}

.p-5 {
  padding: 1.25rem;
}

.p-6 {
  padding: 1.5rem;
}

.px-2 {
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.px-3 {
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

.px-4 {
  padding-left: 1rem;
  padding-right: 1rem;
}

.px-5 {
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.px-6 {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.py-1 {
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}

.py-1\.5 {
  padding-top: 0.375rem;
  padding-bottom: 0.375rem;
}

.py-2 {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.py-2\.5 {
  padding-top: 0.625rem;
  padding-bottom: 0.625rem;
}

.py-3 {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.py-4 {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.py-6 {
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

.py-8 {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.py-10 {
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
}

.pt-2 {
  padding-top: 0.5rem;
}

.pt-3 {
  padding-top: 0.75rem;
}

.pt-4 {
  padding-top: 1rem;
}

.pt-5 {
  padding-top: 1.25rem;
}

.pb-0 {
  padding-bottom: 0;
}

.pb-3 {
  padding-bottom: 0.75rem;
}

.pr-12 {
  padding-right: 3rem;
}

.pr-16 {
  padding-right: 4rem;
}

.m-0 {
  margin: 0;
}

.mt-0\.5 {
  margin-top: 0.125rem;
}

.mt-1 {
  margin-top: 0.25rem;
}

.mt-2 {
  margin-top: 0.5rem;
}

.mt-3 {
  margin-top: 0.75rem;
}

.mt-4 {
  margin-top: 1rem;
}

.mt-5 {
  margin-top: 1.25rem;
}

.mt-6 {
  margin-top: 1.5rem;
}

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

.mb-1\.5 {
  margin-bottom: 0.375rem;
}

.mb-2 {
  margin-bottom: 0.5rem;
}

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

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

.mb-5 {
  margin-bottom: 1.25rem;
}

.mb-6 {
  margin-bottom: 1.5rem;
}

.mb-8 {
  margin-bottom: 2rem;
}

.ml-1 {
  margin-left: 0.25rem;
}

.ml-2 {
  margin-left: 0.5rem;
}

.ml-auto {
  margin-left: auto;
}

.mr-1 {
  margin-right: 0.25rem;
}

.mr-2 {
  margin-right: 0.5rem;
}

.mx-2 {
  margin-left: 0.5rem;
  margin-right: 0.5rem;
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

/* Sizing */
.w-full {
  width: 100%;
}

.w-4 {
  width: 1rem;
}

.w-5 {
  width: 1.25rem;
}

.w-8 {
  width: 2rem;
}

.w-9 {
  width: 2.25rem;
}

.w-10 {
  width: 2.5rem;
}

.w-11 {
  width: 2.75rem;
}

.w-12 {
  width: 3rem;
}

.h-4 {
  height: 1rem;
}

.h-5 {
  height: 1.25rem;
}

.h-8 {
  height: 2rem;
}

.h-9 {
  height: 2.25rem;
}

.h-10 {
  height: 2.5rem;
}

.h-11 {
  height: 2.75rem;
}

.h-12 {
  height: 3rem;
}

.h-14 {
  height: 3.5rem;
}

.h-full {
  height: 100%;
}

.size-4 {
  width: 1rem;
  height: 1rem;
}

.size-5 {
  width: 1.25rem;
  height: 1.25rem;
}

.size-6 {
  width: 1.5rem;
  height: 1.5rem;
}

.size-8 {
  width: 2rem;
  height: 2rem;
}

.size-9 {
  width: 2.25rem;
  height: 2.25rem;
}

.size-10 {
  width: 2.5rem;
  height: 2.5rem;
}

.size-11 {
  width: 2.75rem;
  height: 2.75rem;
}

.min-h-screen {
  min-height: 100vh;
}

.min-w-0 {
  min-width: 0;
}

.max-w-sm {
  max-width: 24rem;
}

.max-w-md {
  max-width: 28rem;
}

.max-w-lg {
  max-width: 32rem;
}

.max-w-xl {
  max-width: 36rem;
}

.max-w-2xl {
  max-width: 42rem;
}

.max-w-4xl {
  max-width: 56rem;
}

/* Position */
.relative {
  position: relative;
}

.absolute {
  position: absolute;
}

.fixed {
  position: fixed;
}

.sticky {
  position: sticky;
}

.top-0 {
  top: 0;
}

.left-0 {
  left: 0;
}

.right-0 {
  right: 0;
}

.bottom-0 {
  bottom: 0;
}

.inset-0 {
  inset: 0;
}

.z-10 {
  z-index: 10;
}

.z-20 {
  z-index: 20;
}

.z-30 {
  z-index: 30;
}

.z-40 {
  z-index: 40;
}

.z-50 {
  z-index: 50;
}

/* Typography */
.text-xs {
  font-size: 0.75rem;
  line-height: 1rem;
}

.text-sm {
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.text-base {
  font-size: 1rem;
  line-height: 1.5rem;
}

.text-lg {
  font-size: 1.125rem;
  line-height: 1.75rem;
}

.text-xl {
  font-size: 1.25rem;
  line-height: 1.75rem;
}

.text-2xl {
  font-size: 1.5rem;
  line-height: 2rem;
}

.text-3xl {
  font-size: 1.875rem;
  line-height: 2.25rem;
}

.text-4xl {
  font-size: 2.25rem;
  line-height: 2.5rem;
}

.text-6xl {
  font-size: 3.75rem;
  line-height: 1;
}

.font-normal {
  font-weight: 400;
}

.font-medium {
  font-weight: 500;
}

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

.font-bold {
  font-weight: 700;
}

.uppercase {
  text-transform: uppercase;
}

.lowercase {
  text-transform: lowercase;
}

.capitalize {
  text-transform: capitalize;
}

.tracking-wider {
  letter-spacing: 0.05em;
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.whitespace-nowrap {
  white-space: nowrap;
}

.text-start {
  text-align: left;
}

.text-left {
  text-align: left;
}

.text-center {
  text-align: center;
}

.text-end {
  text-align: right;
}

.text-right {
  text-align: right;
}

.line-clamp-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.antialiased {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.font-sans {
  font-family: 'Geist', system-ui, sans-serif;
}

.leading-none {
  line-height: 1;
}

.leading-tight {
  line-height: 1.25;
}

/* Colors */
.bg-background {
  background-color: var(--background);
}

.bg-card {
  background-color: var(--card);
}

.bg-primary {
  background-color: var(--primary);
}

.bg-primary\/10 {
  background-color: rgba(34, 113, 177, 0.1);
}

.bg-accent {
  background-color: var(--accent);
}

.bg-input {
  background-color: var(--input);
}

.bg-muted {
  background-color: var(--muted);
}

.bg-muted\/50 {
  background-color: rgba(244, 244, 245, 0.5);
}

.bg-destructive {
  background-color: var(--destructive);
}

.bg-white {
  background-color: #fff;
}

.bg-transparent {
  background-color: transparent;
}

.bg-red-50 {
  background-color: #fef2f2;
}

.bg-red-500\/10 {
  background-color: rgba(239, 68, 68, 0.1);
}

.bg-green-50 {
  background-color: #f0fdf4;
}

.bg-green-500\/10 {
  background-color: rgba(34, 197, 94, 0.1);
}

.bg-yellow-50 {
  background-color: #fefce8;
}

.bg-blue-50 {
  background-color: #eff6ff;
}

.bg-blue-500\/10 {
  background-color: rgba(59, 130, 246, 0.1);
}

.bg-orange-50 {
  background-color: #fff7ed;
}

.bg-orange-500\/10 {
  background-color: rgba(249, 115, 22, 0.1);
}

.bg-purple-50 {
  background-color: #faf5ff;
}

.bg-purple-500\/10 {
  background-color: rgba(168, 85, 247, 0.1);
}

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

.text-card-foreground {
  color: var(--card-foreground);
}

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

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

.text-primary-foreground {
  color: var(--primary-foreground);
}

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

.text-destructive-foreground {
  color: var(--destructive-foreground);
}

.text-white {
  color: #fff;
}

.text-red-500 {
  color: #ef4444;
}

.text-red-600 {
  color: #dc2626;
}

.text-red-700 {
  color: #b91c1c;
}

.text-green-500 {
  color: #22c55e;
}

.text-green-600 {
  color: #16a34a;
}

.text-green-700 {
  color: #15803d;
}

.text-yellow-500 {
  color: #eab308;
}

.text-yellow-600 {
  color: #ca8a04;
}

.text-yellow-700 {
  color: #a16207;
}

.text-blue-500 {
  color: #3b82f6;
}

.text-blue-600 {
  color: #2563eb;
}

.text-orange-500 {
  color: #f97316;
}

.text-purple-500 {
  color: #a855f7;
}

/* Borders */
.border {
  border: 1px solid var(--border);
}

.border-0 {
  border: 0;
}

.border-b {
  border-bottom: 1px solid var(--border);
}

.border-t {
  border-top: 1px solid var(--border);
}

.border-l {
  border-left: 1px solid var(--border);
}

.border-border {
  border-color: var(--border);
}

.border-primary {
  border-color: var(--primary);
}

.border-transparent {
  border-color: transparent;
}

.border-red-200 {
  border-color: #fecaca;
}

.border-green-200 {
  border-color: #bbf7d0;
}

.border-yellow-200 {
  border-color: #fef08a;
}

.rounded {
  border-radius: 0.25rem;
}

.rounded-md {
  border-radius: calc(var(--radius) - 2px);
}

.rounded-lg {
  border-radius: var(--radius);
}

.rounded-xl {
  border-radius: calc(var(--radius) + 4px);
}

.rounded-full {
  border-radius: 9999px;
}

.rounded-none {
  border-radius: 0;
}

.rounded-\[3px\] {
  border-radius: 3px;
}

/* Shadows */
.shadow-none {
  box-shadow: none;
}

.shadow-sm {
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.shadow {
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
}

.shadow-md {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
}

/* Effects */
.overflow-hidden {
  overflow: hidden;
}

.overflow-x-auto {
  overflow-x: auto;
}

.overflow-y-auto {
  overflow-y: auto;
}

.max-h-\[280px\] {
  max-height: 280px;
}

.transition-colors {
  transition: color 0.15s, background-color 0.15s, border-color 0.15s;
}

.transition-all {
  transition: all 0.2s;
}

.transition-shadow {
  transition: box-shadow 0.2s;
}

.transition-opacity {
  transition: opacity 0.15s;
}

.divide-y>*+* {
  border-top: 1px solid var(--border);
}

.space-y-1>*+* {
  margin-top: 0.25rem;
}

.space-y-2>*+* {
  margin-top: 0.5rem;
}

.space-y-3>*+* {
  margin-top: 0.75rem;
}

.space-y-4>*+* {
  margin-top: 1rem;
}

.space-y-6>*+* {
  margin-top: 1.5rem;
}

.space-x-2>*+* {
  margin-left: 0.5rem;
}

.opacity-50 {
  opacity: 0.5;
}

.opacity-70 {
  opacity: 0.7;
}

.opacity-90 {
  opacity: 0.9;
}

.cursor-pointer {
  cursor: pointer;
}

.select-none {
  user-select: none;
}

.pointer-events-none {
  pointer-events: none;
}

/* Hover */
.hover\:bg-accent:hover {
  background-color: var(--accent);
}

.hover\:bg-muted:hover {
  background-color: var(--muted);
}

.hover\:bg-muted\/50:hover {
  background-color: rgba(244, 244, 245, 0.5);
}

.hover\:bg-destructive\/90:hover {
  background-color: rgba(220, 38, 38, 0.9);
}

.hover\:text-primary:hover {
  color: var(--primary);
}

.hover\:text-foreground:hover {
  color: var(--foreground);
}

.hover\:text-destructive:hover {
  color: var(--destructive);
}

.hover\:text-white:hover {
  color: #fff;
}

.hover\:underline:hover {
  text-decoration: underline;
}

.hover\:opacity-90:hover {
  opacity: 0.9;
}

.hover\:shadow-md:hover {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
}

/* Focus */
.focus\:outline-none:focus {
  outline: none;
}

.focus\:ring-2:focus {
  box-shadow: 0 0 0 2px var(--ring);
}

.focus\:ring-primary\/30:focus {
  box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.3);
}

.focus\:border-primary:focus {
  border-color: var(--primary);
}

/* --- Tailwind-like UI Utilities (Added for article title component) --- */
.top-1\/2 {
  top: 50%;
}

.left-3 {
  left: 0.75rem;
}

.left-11 {
  left: 2.75rem;
}

.right-3 {
  right: 0.75rem;
}

.gap-2\.5 {
  gap: 0.625rem;
}

.space-y-0>*+* {
  margin-top: 0;
}

.-translate-y-1\/2 {
  transform: translateY(-50%);
}

.transition-\[color\,box-shadow\] {
  transition-property: color, box-shadow;
  transition-duration: 0.15s;
}

.text-muted-foreground\/70 {
  color: rgba(113, 113, 122, 0.7);
}

.text-muted-foreground\/80 {
  color: rgba(113, 113, 122, 0.8);
}

.placeholder\:text-muted-foreground\/80::placeholder {
  color: rgba(113, 113, 122, 0.8);
}

.shadow-black\/5 {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.focus-visible\:ring-ring\/30:focus-visible {
  box-shadow: 0 0 0 3px rgba(161, 161, 170, 0.3);
}

.focus-visible\:border-ring:focus-visible {
  border-color: var(--ring);
}

.focus-visible\:outline-none:focus-visible {
  outline: none;
}

.focus-visible\:ring-0:focus-visible {
  box-shadow: none;
}

.pl-11 {
  padding-left: 2.75rem !important;
}

.pr-14 {
  padding-right: 3.5rem !important;
}

.pt-4 {
  padding-top: 1rem;
}

.pb-1 {
  padding-bottom: 0.25rem !important;
}

/* =============================================
   PAGE HEADER (matching PageHeader component)
   ============================================= */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
}

.page-header-left {
  min-width: 0;
}

.page-header-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--foreground);
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-header-desc {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-top: 4px;
}

.page-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* =============================================
   CARD (matching ShadcnUI Card)
   ============================================= */
.card {
  background: var(--card);
  color: var(--card-foreground);
  border-radius: 0.75rem;
  border: none;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  overflow: visible;
}

.card-header {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 20px 20px 0;
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
}

.card-desc {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-top: 4px;
}

.card-body {
  padding: 20px;
}

.card-content {
  padding: 20px;
}

.card-footer {
  padding: 0 20px 20px;
  display: flex;
  align-items: center;
}

/* Compact section header for form cards */
.card-section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 0 16px;
  min-height: 48px;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground);
  letter-spacing: -0.01em;
}

.card-section-header .icon-sm {
  width: 16px;
  height: 16px;
}

.card-section-header-lg {
  padding: 0 20px;
  min-height: 56px;
}

.card-section-header-lg .icon-sm {
  width: 20px;
  height: 20px;
}

.card-section-header-lg .card-header-title {
  font-size: 1rem;
  font-weight: 600;
}

.card-section-header-lg .card-header-sub {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

/* =============================================
   STAT CARD (Dashboard stats - matches original)
   ============================================= */
.stat-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem;
  /* p-3.5 */
}

.stat-number {
  font-size: 1.875rem;
  /* text-3xl */
  line-height: 2.25rem;
  font-weight: 700;
  flex-shrink: 0;
  color: var(--foreground);
}

.stat-info {
  min-width: 0;
  flex: 1;
}

.stat-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stat-sub {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  /* size-11 */
  height: 2.75rem;
  border-radius: var(--radius);
  flex-shrink: 0;
}

/* Dashboard section card header */
.dash-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 0;
}

.dash-card-header-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dash-card-header-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  /* size-8 */
  height: 2rem;
  border-radius: var(--radius);
  flex-shrink: 0;
}

.dash-card-title {
  font-size: 1rem;
  font-weight: 600;
}

.dash-card-desc {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

/* Dashboard table */
.dash-table {
  width: 100%;
  border-collapse: collapse;
}

.dash-table th {
  text-align: left;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted-foreground);
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid var(--border);
}

.dash-table th.text-end {
  text-align: right;
}

.dash-table td {
  padding: 0.75rem 0.5rem;
  font-size: 0.875rem;
  vertical-align: middle;
}

.dash-table tbody tr {
  transition: background 0.1s;
}

.dash-table tbody tr:hover {
  background: rgba(244, 244, 245, 0.5);
}

.dash-table tbody tr+tr td {
  border-top: 1px solid var(--border);
}

/* Dashboard article thumbnail */
.dash-thumb {
  width: 2.25rem;
  /* size-9 */
  height: 2.25rem;
  border-radius: var(--radius);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
}

.dash-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Dashboard site rank */
.dash-rank {
  width: 2.5rem;
  /* size-10 */
  height: 2.5rem;
  border-radius: var(--radius);
  background: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--muted-foreground);
  flex-shrink: 0;
}

/* Dashboard trending row */
.dash-trend-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  border-radius: var(--radius);
  transition: background 0.1s;
  text-decoration: none;
  color: inherit;
}

.dash-trend-row:hover {
  background: rgba(244, 244, 245, 0.5);
}

.dash-trend-icon {
  width: 2rem;
  /* size-8 */
  height: 2rem;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Orange text */
.text-orange-600 {
  color: #ea580c;
}

/* =============================================
   FORM COMPONENTS
   ============================================= */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="number"],
input[type="search"],
input[type="tel"],
input[type="date"],
input[type="datetime-local"],
textarea,
select {
  font-family: inherit;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--foreground);
  background: var(--input-background);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 2px);
  padding: 8px 12px;
  width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.15);
}

input:disabled,
textarea:disabled,
select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

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

select {
  cursor: pointer;
}

label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground);
  margin-bottom: 6px;
}

.form-group {
  margin-bottom: 16px;
}

.form-hint {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  margin-top: 4px;
}

.form-error {
  font-size: 0.75rem;
  color: var(--destructive);
  margin-top: 4px;
}

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

/* Checkbox & Radio */
input[type="radio"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}

input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1px solid var(--input);
  background: var(--background);
  flex-shrink: 0;
  cursor: pointer;
  position: relative;
  transition: background-color 0.15s, border-color 0.15s;
}

input[type="checkbox"]:checked {
  background: var(--primary);
  border-color: var(--primary);
}

input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 2px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

input[type="checkbox"]:indeterminate {
  background: var(--primary);
  border-color: var(--primary);
}

input[type="checkbox"]:indeterminate::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 7px;
  width: 10px;
  height: 2px;
  background: #fff;
  border-radius: 1px;
}

input[type="checkbox"]:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

input[type="checkbox"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--background), 0 0 0 4px var(--ring);
}

/* Larger variant (20px) */
input.form-checkbox {
  width: 20px;
  height: 20px;
  border-radius: 6px;
}

input.form-checkbox:checked::after {
  left: 6px;
  top: 3px;
}

/* =============================================
   TABLE (matching ShadcnUI Table)
   ============================================= */
.table-wrapper {
  overflow-x: auto;
  position: relative;
  width: 100%;
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  caption-side: bottom;
  font-size: 0.875rem;
}

table.data-table th {
  height: 48px;
  padding: 0 16px;
  text-align: left;
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--muted-foreground);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  vertical-align: middle;
}

a.sort-header {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: inherit;
  text-decoration: none;
  transition: color 0.15s;
}

a.sort-header:hover {
  color: var(--primary);
}

table.data-table td {
  padding: 16px;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

table.data-table tbody tr {
  transition: background-color 0.15s;
}

table.data-table tbody tr:last-child td {
  border-bottom: none;
}

table.data-table tbody tr:hover {
  background-color: color-mix(in srgb, var(--muted) 50%, transparent);
}

table.data-table th.text-center,
table.data-table td.text-center {
  text-align: center;
}

table.data-table td.text-center>.flex,
table.data-table td.text-center>div {
  justify-content: center;
}

table.data-table th.text-end,
table.data-table td.text-end {
  text-align: right;
}

table.data-table td.text-end>.flex,
table.data-table td.text-end>.actions,
table.data-table td.text-end>div {
  justify-content: flex-end;
}

table.data-table th.w-actions,
table.data-table td.w-actions {
  width: 1%;
  white-space: nowrap;
  text-align: right;
}

table.data-table td.w-actions .actions {
  justify-content: flex-end;
}

/* =============================================
   BADGE (matching ShadcnUI Badge)
   ============================================= */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  height: 20px;
  min-width: 20px;
  font-size: 0.6875rem;
  font-weight: 500;
  line-height: 0.75rem;
  border-radius: 2px;
  white-space: nowrap;
  gap: 4px;
  border: 1px solid transparent;
}

.badge svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  margin-left: -1px;
}

.badge-success {
  background: #22c55e;
  color: #fff;
}

.badge-warning {
  background: #f59e0b;
  color: #fff;
}

.badge-danger {
  background: var(--destructive);
  color: var(--destructive-foreground);
}

.badge-info {
  background: #3b82f6;
  color: #fff;
}

.badge-default {
  background: transparent;
  color: var(--secondary-foreground);
  border-color: var(--border);
}

.badge-primary {
  background: rgba(34, 113, 177, 0.1);
  color: var(--primary);
}

.badge-secondary {
  background: var(--secondary);
  color: var(--secondary-foreground);
}

.badge-outline {
  background: transparent;
  color: var(--foreground);
  border-color: var(--border);
}

.badge-xs {
  padding: 0 5px;
  font-size: 0.625rem;
}

.badge-destructive {
  background: var(--destructive);
  color: var(--destructive-foreground);
}

/* =============================================
   BUTTON (matching ShadcnUI Button)
   ============================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 16px;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 3px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: color 0.15s, background-color 0.15s, box-shadow 0.15s;
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
  font-family: inherit;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary);
  color: var(--primary-foreground);
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.btn-primary:hover {
  opacity: 0.9;
}

.btn-secondary {
  background: var(--secondary);
  color: var(--secondary-foreground);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: var(--accent);
}

.btn-outline {
  background: var(--background);
  color: var(--accent-foreground);
  border-color: var(--border);
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.btn-outline:hover {
  background: var(--accent);
}

.btn-outline svg:not([role="img"]):not([class*="text-"]):not([class*="opacity-"]) {
  opacity: 0.6;
}

.btn-ghost {
  background: transparent;
  color: var(--foreground);
  border: none;
}

.btn-ghost:hover {
  background: var(--accent);
}

.btn-danger {
  background: var(--destructive);
  color: var(--destructive-foreground);
}

.btn-danger:hover {
  opacity: 0.9;
}

.btn-xs {
  height: 28px;
  padding: 0 10px;
  font-size: 0.75rem;
  border-radius: 3px;
  gap: 5px;
}

.btn-ghost svg:not([role="img"]):not([class*="text-"]):not([class*="opacity-"]) {
  opacity: 0.6;
}

.btn-sm {
  height: 32px;
  padding: 0 12px;
  font-size: 0.75rem;
}

.btn-lg {
  height: 42px;
  padding: 0 24px;
  font-size: 0.9375rem;
}

.btn-icon {
  padding: 0;
  width: 36px;
}

.btn-icon.btn-sm {
  width: 32px;
  height: 32px;
  padding: 0;
}

/* =============================================
   PAGINATION
   ============================================= */
.pagination {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  padding: 0 10px;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--foreground);
  background: var(--card);
  transition: background 0.1s;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.pagination a:hover {
  background: var(--accent);
}

.pagination .active {
  background: var(--muted);
  font-weight: 600;
  border-color: var(--border);
  color: var(--foreground);
}

.pagination .disabled {
  opacity: 0.5;
  pointer-events: none;
}

/* =============================================
   EMPTY STATE
   ============================================= */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
}

.empty-state-icon {
  width: 48px;
  height: 48px;
  color: var(--muted-foreground);
  margin-bottom: 16px;
}

.empty-state-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 4px;
}

.empty-state-desc {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-bottom: 16px;
}

/* =============================================
   ACTION BUTTONS (table row actions)
   ============================================= */
.actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 3px;
  border: none;
  background: transparent;
  color: var(--muted-foreground);
  cursor: pointer;
  transition: color 0.15s, background-color 0.15s, box-shadow 0.15s;
  text-decoration: none;
  flex-shrink: 0;
  padding: 0;
  font-size: 0.75rem;
  font-weight: 500;
}

.action-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.action-btn:hover {
  background: var(--accent);
  color: var(--accent-foreground);
}

.action-btn.text-destructive,
.action-btn.action-btn-danger {
  color: var(--destructive);
}

.action-btn.text-destructive:hover,
.action-btn.action-btn-danger:hover {
  background: var(--accent);
  color: var(--destructive);
}

.text-success {
  color: #22c55e;
}

/* Analytics stat cards (in modal) */
.analytics-stat-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  text-align: center;
}

/* Ad analytics clickable button */
.ad-analytics-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
  color: var(--primary);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.ad-analytics-btn:hover {
  text-decoration: underline;
}

/* =============================================
   SEARCH TOOLBAR
   ============================================= */
.toolbar-card {
  margin-bottom: 1.5rem;
}

.toolbar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.toolbar-row .search-box {
  flex: 1;
  min-width: 180px;
}

@media (max-width: 768px) {
  .toolbar-row .search-box {
    flex-basis: 100%;
  }

  .toolbar-row > .flex {
    width: 100%;
  }

  .toolbar-row .site-cb,
  .toolbar-row .tf-cb {
    flex: 1;
    min-width: 0;
    width: auto;
  }
}

.search-box {
  position: relative;
  flex: 1;
}

.search-box .search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1rem;
  height: 1rem;
  color: var(--muted-foreground);
  pointer-events: none;
}

.search-box input {
  width: 100%;
  padding: 0.5rem 0.75rem 0.5rem 2.25rem;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 2px);
  background: var(--input);
  color: var(--foreground);
  font-size: 0.875rem;
}

.search-box input:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.3);
  border-color: var(--primary);
}

/* Toolbar select with icon */
.toolbar-select-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.toolbar-select-icon {
  position: absolute;
  left: 0.75rem;
  width: 1rem;
  height: 1rem;
  color: var(--muted-foreground);
  pointer-events: none;
}

.toolbar-select {
  padding: 0.5rem 2rem 0.5rem 2.25rem;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 2px);
  background: var(--input);
  color: var(--foreground);
  font-size: 0.875rem;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  cursor: pointer;
  min-width: 160px;
}

.toolbar-select:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.3);
  border-color: var(--primary);
}

/* Toolbar Filter (combobox dropdown - replaces native select) */
.tf-cb {
  position: relative;
  flex-shrink: 0;
}

.tf-cb--block {
  width: 100%;
}

.tf-cb--block .tf-cb-trigger {
  width: 100%;
}

.tf-cb-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 2px);
  background: var(--input);
  color: var(--foreground);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
  white-space: nowrap;
}

.tf-cb-trigger:hover {
  border-color: rgba(113, 113, 122, 0.4);
}

.tf-cb.open .tf-cb-trigger {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.3);
}

.tf-cb-value {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tf-cb-value.placeholder {
  color: var(--muted-foreground);
}

.tf-cb-chevron {
  flex-shrink: 0;
  opacity: 0.5;
  transition: transform .15s;
}

.tf-cb.open .tf-cb-chevron {
  transform: rotate(180deg);
}

.tf-cb-popover {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 4px;
  min-width: 100%;
  width: max-content;
  z-index: 9999;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.tf-cb-list {
  max-height: 260px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 4px;
}

.tf-cb-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 3px;
  cursor: pointer;
  user-select: none;
  transition: background .1s;
  font-size: 0.875rem;
  color: var(--foreground);
  white-space: nowrap;
}

.tf-cb-item:hover {
  background: var(--accent);
}

.tf-cb-item.selected {
  font-weight: 500;
}

.tf-cb-item-label {
  flex: 1;
  min-width: 0;
}

.tf-cb-check {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: var(--primary);
  opacity: 0;
  transition: opacity .1s;
}

.tf-cb-item.selected .tf-cb-check {
  opacity: 1;
}

/* Site icon box in table */
.site-icon-box {
  width: 40px;
  height: 40px;
  border-radius: calc(var(--radius));
  background: rgba(34, 113, 177, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.site-icon-box svg {
  width: 20px;
  height: 20px;
  color: var(--primary);
}

.site-info {
  min-width: 0;
}

.site-info .site-name {
  font-weight: 500;
  color: var(--foreground);
  text-decoration: none;
  transition: color 0.15s;
}

.site-info .site-name:hover {
  color: var(--primary);
}

.site-info .site-domain {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.15s;
}

.site-info .site-domain:hover {
  color: var(--primary);
}

.site-info .site-domain svg {
  width: 12px;
  height: 12px;
}

/* Cell with icon + text inline */
.cell-icon-text {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  color: var(--muted-foreground);
  text-decoration: none;
  transition: color 0.15s;
}

a.cell-icon-text:hover {
  color: var(--primary);
}

.cell-icon-text svg {
  width: 1rem;
  height: 1rem;
}

/* Dropdown context menu */
.context-menu {
  position: relative;
  display: inline-block;
}

.context-menu-content {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  min-width: 160px;
  background: var(--popover);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius));
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  z-index: 50;
  padding: 4px 0;
}

.context-menu.open .context-menu-content {
  display: block;
}

.context-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  font-size: 0.875rem;
  color: var(--foreground);
  text-decoration: none;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.context-menu-item:hover {
  background: var(--accent);
}

.context-menu-item svg {
  width: 1rem;
  height: 1rem;
}

.context-menu-item-danger {
  color: var(--destructive);
}

.context-menu-item-danger:hover {
  background: rgba(220, 38, 38, 0.08);
}

.context-menu-sep {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

/* Empty state */
.empty-state {
  padding: 4rem 1rem;
  text-align: center;
}

.empty-state-icon {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.empty-state-icon svg {
  width: 2rem;
  height: 2rem;
  color: var(--muted-foreground);
}

.empty-state h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.empty-state p {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-bottom: 1rem;
}

/* =============================================
   MENU PAGE - Index (grid layout)
   ============================================= */
.menu-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 1024px) {
  .menu-grid {
    grid-template-columns: 1fr 3fr;
  }
}

.menu-list-card {
  overflow: hidden;
}

.menu-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.menu-list-body {
  max-height: calc(100vh - 240px);
  overflow-y: auto;
}

.menu-list-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 16px;
  text-align: center;
}

.menu-list-items {
  display: flex;
  flex-direction: column;
}

.menu-list-item {
  position: relative;
  border-bottom: 1px solid var(--border);
  transition: background .1s;
}

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

.menu-list-item:hover {
  background: rgba(0, 0, 0, 0.02);
}

.menu-list-item-link {
  display: block;
  padding: 12px 40px 12px 16px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.menu-list-item-link:hover {
  text-decoration: none;
}

/* Card-based menu list items (Zoro-style) */
.menu-card-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: background .15s, border-color .15s;
  margin-bottom: 8px;
}

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

.menu-card-item:hover {
  background: color-mix(in srgb, var(--muted) 50%, transparent);
}

.menu-card-item.active {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 5%, transparent);
}

.menu-card-item-link {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  text-decoration: none;
  color: inherit;
  padding-right: 32px;
}

.menu-card-item-link:hover {
  text-decoration: none;
}

.menu-editor-card {
  overflow: hidden;
}

.menu-editor-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.menu-editor-body {
  min-height: 300px;
}

.menu-editor-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
  text-align: center;
}

/* =============================================
   MENU PAGE - Form (builder)
   ============================================= */
.menu-builder-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 1024px) {
  .menu-builder-grid {
    grid-template-columns: 1fr 2fr;
  }
}

/* Accordion sections */
.menu-add-section {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.menu-add-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  cursor: pointer;
  user-select: none;
  list-style: none;
}

.menu-add-summary::-webkit-details-marker {
  display: none;
}

.menu-add-summary::marker {
  display: none;
  content: '';
}

.menu-add-summary:hover {
  background: var(--accent);
}

.menu-add-section>div {
  padding-left: 16px;
  padding-right: 16px;
}

.menu-add-chevron {
  transition: transform .2s;
}

.menu-add-section[open]>.menu-add-summary .menu-add-chevron {
  transform: rotate(180deg);
}

.menu-add-list label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.875rem;
}

.menu-add-list label:hover {
  background: var(--muted);
}

.menu-add-list input[type="checkbox"] {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  accent-color: var(--primary);
  cursor: pointer;
}

/* Builder items */
.menu-builder-item {
  transition: opacity .15s;
}

.menu-builder-item.dragging {
  opacity: 0.5;
}

.menu-builder-item.menu-item-hidden {
  opacity: 0.5;
}

.menu-builder-item-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 2px);
  margin-bottom: 4px;
  transition: background .1s;
}

.menu-builder-item-inner:hover {
  background: var(--muted);
}

.menu-builder-grip {
  cursor: grab;
  color: var(--muted-foreground);
  flex-shrink: 0;
  opacity: 0.5;
}

.menu-builder-grip:active {
  cursor: grabbing;
}

.menu-item-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.875rem;
  font-weight: 500;
}

.menu-builder-actions {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity .15s;
}

.menu-builder-item-inner:hover .menu-builder-actions {
  opacity: 1;
}

.menu-builder-action-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: calc(var(--radius) - 2px);
  border: none;
  background: none;
  color: var(--muted-foreground);
  cursor: pointer;
  transition: background .1s, color .1s;
}

.menu-builder-action-btn:hover {
  background: var(--accent);
  color: var(--foreground);
}

.menu-builder-action-danger:hover {
  color: var(--destructive);
}

/* Icon picker */
.menu-icon-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  max-height: 192px;
  overflow-y: auto;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.menu-icon-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid transparent;
  background: none;
  border-radius: calc(var(--radius) - 2px);
  color: var(--muted-foreground);
  cursor: pointer;
  transition: background .1s, border-color .1s;
}

.menu-icon-btn:hover {
  background: var(--muted);
  color: var(--foreground);
}

.menu-icon-btn.selected {
  border-color: var(--primary);
  background: hsl(var(--primary) / 0.1);
  color: var(--primary);
}

/* AMP status icons */
.text-green-500 {
  color: #22c55e;
}

.text-red-500 {
  color: #ef4444;
}

.text-yellow-500 {
  color: #eab308;
}

/* =============================================
   RESPONSIVE (Mobile)
   ============================================= */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    z-index: 45;
    width: var(--sidebar-width);
  }

  .sidebar.mobile-open {
    transform: translateX(0);
  }

  .sidebar-overlay.active {
    display: block;
  }

  .content-wrapper {
    margin-left: 0;
  }

  .mobile-menu-btn {
    display: inline-flex;
  }

  .hide-mobile {
    display: none;
  }

  .page-header {
    flex-direction: column;
    gap: 12px;
  }
  .page-header-right {
    width: 100%;
    gap: 6px;
  }
  .page-header-right .btn {
    flex: 1;
    min-width: 0;
    justify-content: center;
    white-space: nowrap;
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}

/* =============================================
   CLOSE DROPDOWN ON OUTSIDE CLICK (handled by JS)
   ============================================= */

/* =============================================
   MISC / HELPERS
   ============================================= */

/* Featured image thumbnail */
.thumb {
  width: 40px;
  height: 40px;
  border-radius: 3px;
  object-fit: cover;
  background: var(--muted);
}

.thumb-placeholder {
  width: 40px;
  height: 40px;
  border-radius: 3px;
  background: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-foreground);
}

/* Status dot */
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.status-dot-success {
  background: #22c55e;
}

.status-dot-warning {
  background: #eab308;
}

.status-dot-danger {
  background: #ef4444;
}

.status-dot-info {
  background: #3b82f6;
}

.status-dot-muted {
  background: #a1a1aa;
}

/* Separator */
.separator {
  height: 1px;
  background: var(--border);
  margin: 16px 0;
}

/* Link */
a.link {
  color: var(--primary);
  text-decoration: none;
}

a.link:hover {
  text-decoration: underline;
}

/* Tabs */
.tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  padding: 4px;
  border-radius: 8px;
  overflow-x: auto;
  margin-bottom: 16px;
}

.tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  color: var(--muted-foreground);
  text-decoration: none;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: color 0.15s, background 0.15s, box-shadow 0.15s;
}

.tab svg {
  color: var(--muted-foreground);
  transition: color 0.15s;
}

.tab:hover {
  color: var(--foreground);
}

.tab:hover svg {
  color: var(--primary);
}

.tab.active {
  color: var(--foreground);
  background: var(--background);
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.tab.active svg {
  color: var(--primary);
}

/* Tabs — underline variant */
.tabs-underline {
  display: flex;
  align-items: stretch;
  gap: 0;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
  margin-bottom: 0;
  background: none;
  padding: 0;
  border-radius: 0;
}

.tabs-underline::-webkit-scrollbar {
  display: none;
}

.tabs-underline .tab {
  position: relative;
  padding: 10px 16px;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: var(--muted-foreground);
  gap: 8px;
  transition: color .15s;
}

.tabs-underline .tab::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: transparent;
  border-radius: 1px 1px 0 0;
  transition: background .15s;
}

.tabs-underline .tab:hover {
  color: var(--foreground);
  background: none;
}

.tabs-underline .tab.active {
  color: var(--foreground);
  background: none;
  box-shadow: none;
}

.tabs-underline .tab.active::after {
  background: var(--primary);
}

.tabs-underline .tab.active svg {
  color: var(--primary);
}

/* Toolbar (filter bar) */
.toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.toolbar-search {
  position: relative;
  flex: 1;
  min-width: 200px;
  max-width: 320px;
}

.toolbar-search input {
  padding-left: 36px;
}

.toolbar-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted-foreground);
  pointer-events: none;
}

/* --- Toggle Switch (matches original: h-6 w-10 = 24x40px) --- */

/* ================================================================ */
/* USERS PAGE STYLES */
/* ================================================================ */

/* Login History Popover */
.login-history-btn { display:inline-flex; align-items:center; gap:6px; padding:4px 8px; border-radius:4px; cursor:pointer; background:none; border:1px solid transparent; color:var(--muted-foreground); transition:background 0.15s,color 0.15s; }
.login-history-btn:hover { background:var(--accent); color:var(--foreground); }
.login-history-dropdown {
    position:fixed; z-index:999; min-width:320px;
    background:var(--card); border:1px solid var(--border); border-radius:8px;
    box-shadow:0 4px 24px rgba(0,0,0,0.12);
}
.lh-header { padding:12px 16px; border-bottom:1px solid var(--border); }
.lh-header strong { display:block; font-size:0.875rem; }
.lh-header span { display:block; margin-top:2px; }
.lh-body { max-height:280px; overflow-y:auto; }
.lh-loading { padding:24px; text-align:center; color:var(--muted-foreground); font-size:0.875rem; }
.lh-empty { padding:24px; text-align:center; color:var(--muted-foreground); font-size:0.875rem; }
.lh-entry { padding:10px 16px; border-bottom:1px solid var(--border); }
.lh-entry:last-child { border-bottom:none; }
.lh-entry:hover { background:color-mix(in srgb, var(--muted) 50%, transparent); }
.lh-entry-top { display:flex; align-items:flex-start; justify-content:space-between; gap:8px; }
.lh-entry-status { display:flex; align-items:center; gap:6px; }
.lh-entry-status .icon-sm { width:16px; height:16px; }
.lh-entry-status .success-icon { color:var(--success, #22c55e); }
.lh-entry-status .fail-icon { color:var(--destructive); }
.lh-entry-label { font-size:0.875rem; font-weight:500; }
.lh-entry-reason { font-size:0.75rem; color:var(--destructive); }
.lh-entry-time { font-size:0.75rem; color:var(--muted-foreground); white-space:nowrap; }
.lh-entry-ip { font-size:0.75rem; color:var(--muted-foreground); margin-top:4px; padding-left:22px; font-family:monospace; }

/* Permissions Grid - Zoro design */
.rp-th-label {
    text-align: left; padding: 12px; font-size: 0.875rem; font-weight: 600;
    min-width: 200px; position: sticky; left: 0;
    background: color-mix(in srgb, var(--muted) 50%, transparent);
}
.rp-th-role {
    text-align: center; padding: 12px; font-size: 0.875rem; font-weight: 600;
    min-width: 110px;
}
.rp-group-header td {
    background: color-mix(in srgb, var(--muted) 30%, transparent);
    padding: 8px 12px !important;
    font-size: 0.75rem; font-weight: 600;
    color: var(--muted-foreground);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.rp-perm-row { border-bottom: 1px solid color-mix(in srgb, var(--border) 50%, transparent); }
.rp-perm-row:hover { background: color-mix(in srgb, var(--muted) 20%, transparent); }
.rp-perm-row td { padding: 8px !important; }
.rp-perm-row td:first-child {
    padding-left: 24px !important; font-size: 0.875rem;
    position: sticky; left: 0; background: var(--background);
}
.rp-perm-row:hover td:first-child { background: color-mix(in srgb, var(--muted) 20%, transparent); }
.rp-perm-row td:not(:first-child) { text-align: center; }

.role-save-btn {
    cursor:pointer; background:none; border:none; font-weight:500; font-family:inherit;
    font-size:0.75rem; color:var(--primary); padding:2px 8px; border-radius:4px;
    transition:background 0.15s;
}
.role-save-btn:hover { background:color-mix(in srgb, var(--primary) 10%, transparent); }

.space-y-4 > * + * { margin-top: 1rem; }

/* Import Drop Zone */
.import-drop-zone {
    border: 2px dashed var(--border);
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}
.import-drop-zone:hover,
.import-drop-zone.dragover {
    border-color: var(--primary);
    background: color-mix(in srgb, var(--primary) 5%, transparent);
}

/* Toast notification styles */
.toast-notification {
    position: fixed; bottom: 24px; right: 24px; z-index: 200;
    padding: 12px 20px; border-radius: 8px;
    font-size: 0.875rem; font-weight: 500;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    opacity: 0; transform: translateY(8px);
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
}
.toast-notification.show { opacity: 1; transform: translateY(0); }
.toast-success { background: #16a34a; color: #fff; }
.toast-error { background: var(--destructive); color: #fff; }

/* ================================================================ */
/* MEDIA PAGE STYLES */
/* ================================================================ */

/* Zoro-style tabs */
.tabs-list {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 4px;
    background: var(--accent);
    border-radius: var(--radius);
}
.tabs-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: calc(var(--radius) - 2px);
    font-size: 13px;
    font-weight: 500;
    color: var(--muted-foreground);
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.15s, background 0.15s;
    cursor: pointer;
}
.tabs-trigger svg {
    color: var(--muted-foreground);
    transition: color 0.15s;
}
.tabs-trigger:hover {
    color: var(--foreground);
}
.tabs-trigger:hover svg {
    color: var(--primary);
}
.tabs-trigger.active {
    background: var(--background);
    color: var(--foreground);
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.tabs-trigger.active svg {
    color: var(--primary);
}
.tabs-badge {
    display: none;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 4px;
    background: var(--secondary);
    color: var(--secondary-foreground);
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    margin-left: 4px;
}
@media (min-width: 640px) {
    .tabs-badge { display: inline-flex; }
}
.tabs-badge-destructive {
    background: var(--destructive);
    color: #fff;
}

/* Media card grid */
.media-card {
    position: relative;
    cursor: pointer;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--card);
    transition: box-shadow 0.15s, border-color 0.15s;
}
.media-card:hover {
    border-color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary);
}

.media-card-inner {
    position: relative;
    width: 100%;
    padding-top: 100%; /* square aspect ratio */
}
.media-card-inner > img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.media-card-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--muted);
}

/* Global badge */
.media-badge-global {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 3;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(59,130,246,0.9);
    color: #fff;
    line-height: 1.4;
}

/* Hover overlay */
.media-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px 10px 10px;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.15s;
    z-index: 2;
    display: flex;
    align-items: flex-end;
}
.media-card:hover .media-card-overlay {
    opacity: 1;
}
.media-card-filename {
    color: #fff;
    font-size: 12px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

/* Dropdown menu */
.media-card-menu {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 4;
    opacity: 0;
    transition: opacity 0.15s;
}
.media-card:hover .media-card-menu {
    opacity: 1;
}
.media-menu-trigger {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: rgba(0,0,0,0.5);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}
.media-menu-trigger:hover {
    background: rgba(0,0,0,0.7);
}
.media-menu-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    min-width: 160px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 4px;
    z-index: 50;
}
.media-menu-dropdown button,
.media-menu-dropdown a {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 7px 10px;
    border: none;
    background: none;
    color: var(--foreground);
    font-size: 13px;
    cursor: pointer;
    border-radius: 4px;
    text-decoration: none;
    white-space: nowrap;
}
.media-menu-dropdown button:hover,
.media-menu-dropdown a:hover {
    background: var(--muted);
}
.media-menu-danger {
    color: var(--destructive) !important;
}
.media-menu-danger:hover {
    background: hsl(0 84% 60% / 0.1) !important;
}
.media-menu-divider {
    height: 1px;
    background: var(--border);
    margin: 4px 0;
}

/* Upload dropzone */
.upload-dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 40px 20px;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    text-align: center;
}
.upload-dropzone:hover,
.upload-dropzone.dragover {
    border-color: var(--primary);
    background: hsl(var(--primary-hsl, 220 90% 56%) / 0.04);
}
.upload-dropzone-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--foreground);
    margin: 0;
}
.upload-dropzone-subtitle {
    font-size: 12px;
    color: var(--muted-foreground);
    margin: 0;
}

/* Upload preview */
.upload-preview {
    margin-top: 16px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--muted);
}
.upload-thumb {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    overflow: hidden;
    background: var(--background);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.upload-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ================================================================ */
/* COMMENTS PAGE STYLES */
/* ================================================================ */

.comment-select-header {
    display: flex; align-items: center; gap: 16px;
    padding: 12px 24px; background: color-mix(in srgb, var(--muted) 50%, transparent);
}
.comment-checkbox-wrap {
    flex-shrink: 0; display: flex; align-items: flex-start; padding-top: 2px;
}
.comment-row {
    display: flex; gap: 16px; padding: 16px 24px;
    transition: background .15s;
}
.comment-row:hover { background: color-mix(in srgb, var(--muted) 30%, transparent); }
.comment-row.selected { background: color-mix(in srgb, var(--primary) 5%, transparent); }
.comment-actions-wrap { flex-shrink: 0; align-self: flex-start; }
@media (max-width: 768px) {
    .comment-row { flex-wrap: wrap; padding: 12px 16px; gap: 8px; }
    .comment-actions-wrap { width: 100%; justify-content: flex-end; padding-left: 36px; }
}
.comment-dropdown form { margin: 0; }
.dropdown-menu.comment-dropdown {
    position: fixed !important;
    z-index: 1050;
    box-shadow: 0 4px 24px rgba(0,0,0,0.12);
}
.comment-meta-link {
    text-decoration: none; color: var(--muted-foreground);
    transition: color .15s;
}
.comment-meta-link:hover { color: var(--primary); }
.comment-meta-link:hover span { text-decoration: underline; }
.comment-meta-truncate {
    max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    display: inline-block; vertical-align: bottom;
}
.comment-badge-reply {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
    font-size: 11px;
    font-weight: 500;
}
.comment-row[data-parent-id] { padding-left: 32px; border-left: 2px solid var(--border); }
.divide-y > * + * { border-top: 1px solid var(--border); }

/* Filter row: side by side desktop, stacked mobile */
.filter-row {
    display: flex; gap: 16px; align-items: stretch;
}
.filter-site { width: 240px; flex-shrink: 0; }
.filter-search { flex: 1; min-width: 0; }

@media (max-width: 640px) {
    .tab-label { display: none; }
    .tab { gap: 4px; padding: 6px 8px; }
    .filter-row { flex-direction: column; }
    .filter-site { width: 100%; }
}
.toggle-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 40px;
  height: 24px;
  cursor: pointer;
  flex-shrink: 0;
}

.toggle-switch input {
  display: none;
}

.toggle-switch .toggle-track {
  width: 100%;
  height: 100%;
  border-radius: 9999px;
  background: var(--input);
  transition: background .2s;
}

.toggle-switch input:checked+.toggle-track {
  background: var(--primary);
}

.toggle-switch .toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 9999px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
  transition: transform .2s;
  pointer-events: none;
}

.toggle-switch input:checked~.toggle-thumb {
  transform: translateX(16px);
}

.toggle-switch .toggle-slider {
  width: 100%;
  height: 100%;
  border-radius: 9999px;
  background: var(--input);
  transition: background .2s;
  position: relative;
}

.toggle-switch .toggle-slider::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: calc(50% - 2px);
  height: calc(100% - 4px);
  border-radius: 9999px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
  transition: transform .2s;
}

.toggle-switch input:checked+.toggle-slider {
  background: var(--primary);
}

.toggle-switch input:checked+.toggle-slider::after {
  transform: translateX(calc(100% - 2px));
}

/* --- Input with Char Counter (flex wrapper that looks like input) --- */
.input-with-counter {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  background: var(--input);
  transition: border-color .15s, box-shadow .15s;
}

.input-with-counter:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.3);
  outline: none;
}

.input-with-counter input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: var(--foreground);
  font-size: 0.875rem;
  line-height: 1.5;
  outline: none;
  padding: 0;
}

.input-with-counter input::placeholder {
  color: var(--muted-foreground);
  opacity: 0.6;
}

.input-with-counter .char-count {
  flex-shrink: 0;
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  color: var(--muted-foreground);
  margin-left: 0.75rem;
  white-space: nowrap;
}

.input-with-counter .char-count.warn {
  color: #f59e0b;
}

.input-with-counter .char-count.danger {
  color: #dc2626;
}

/* --- Width Selector Buttons --- */
.width-selector {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}

.width-btn {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--muted);
  border-radius: var(--radius);
  background: var(--card);
  text-align: center;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s;
  color: var(--foreground);
}

.width-btn:hover {
  border-color: rgba(113, 113, 122, 0.3);
  background: rgba(244, 244, 245, 0.5);
}

.width-btn.active {
  border-color: var(--primary);
  background: rgba(34, 113, 177, 0.1);
  color: var(--primary);
}

/* --- Toggle Row (for component toggles with bg) --- */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(244, 244, 245, 0.3);
}

/* --- Upload Zone --- */
.upload-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  height: 96px;
  background: var(--background);
  border: 1px dashed var(--input);
  border-radius: 3px;
  cursor: pointer;
  transition: background .15s, border-color .15s;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.upload-zone:hover {
  background: var(--accent);
  border-color: var(--border);
}

.upload-zone .upload-icon {
  width: 24px;
  height: 24px;
  color: var(--muted-foreground);
}

.upload-zone .upload-text {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

/* --- Logo Preview Box --- */
.logo-preview-box {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: rgba(244, 244, 245, 0.5);
  border-radius: var(--radius);
  border: 1px dashed var(--border);
}

/* =============================================
   MODAL (dialog ile aynı tasarım – tek bileşen mantığı)
   Yeni kodda View::component('dialog') + openDialog/closeDialog kullanın.
   ============================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s, visibility .2s;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--dialog-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 480px;
  max-height: calc(100vh - 32px);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  position: relative;
}

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

.modal-header h3 {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.25;
  margin: 0;
}

.modal-close {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  border-radius: var(--radius);
  color: var(--muted-foreground);
  cursor: pointer;
}

.modal-close:hover {
  background: var(--accent);
}

.modal-close svg {
  width: 16px;
  height: 16px;
}

.modal-body {
  flex: 1;
  padding: 20px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 16px 20px;
  border-top: 1px solid var(--border);
}

/* --- Custom Select Dropdown (for group filter) --- */
.custom-select {
  position: relative;
}

.custom-select-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  height: 36px;
  padding: 0 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground);
  cursor: pointer;
  white-space: nowrap;
  transition: border-color .15s;
  min-width: 140px;
}

.custom-select-trigger:hover {
  border-color: rgba(113, 113, 122, 0.4);
}

.custom-select.open .custom-select-trigger {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.15);
}

.custom-select-chevron {
  width: 14px;
  height: 14px;
  color: var(--muted-foreground);
  margin-left: auto;
  transition: transform .15s;
}

.custom-select.open .custom-select-chevron {
  transform: rotate(180deg);
}

.custom-select-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 50;
  min-width: 100%;
  width: max-content;
  max-height: 240px;
  overflow-y: auto;
  background: var(--popover);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, .1), 0 2px 4px -2px rgba(0, 0, 0, .1);
  padding: 4px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity .15s, visibility .15s, transform .15s;
}

.custom-select.open .custom-select-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.custom-select-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: calc(var(--radius) - 2px);
  font-size: 0.875rem;
  cursor: pointer;
  transition: background .1s;
  white-space: nowrap;
}

.custom-select-item:hover {
  background: var(--accent);
}

.custom-select-item.active {
  background: rgba(34, 113, 177, 0.08);
  font-weight: 500;
}

/* --- Group Color Dot --- */
.group-dot {
  width: 10px;
  height: 10px;
  border-radius: 9999px;
  flex-shrink: 0;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.group-dot-lg {
  width: 16px;
  height: 16px;
  border-radius: 9999px;
  flex-shrink: 0;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

/* --- Group Card (modal list item) --- */
.group-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.group-card .group-color-input {
  width: 48px;
  height: 36px;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 2px);
  cursor: pointer;
  background: var(--card);
  flex-shrink: 0;
}

.group-card .group-name-input {
  flex: 1;
  min-width: 0;
  height: 36px;
  padding: 0 10px;
  font-size: 0.875rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--input);
  color: var(--foreground);
  outline: none;
}

.group-card .group-name-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.group-card-delete {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--muted-foreground);
  flex-shrink: 0;
  transition: background .15s, color .15s;
}

.group-card-delete:hover {
  color: var(--destructive);
}

/* --- Group Empty State (modal) --- */
.group-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem 0;
  text-align: center;
}

.group-empty-state .icon-lg {
  width: 32px;
  height: 32px;
}

/* --- Group Checkbox (for site edit form) --- */
.group-checkbox-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}

.group-checkbox-item:hover {
  border-color: rgba(113, 113, 122, 0.3);
  background: rgba(244, 244, 245, 0.3);
}

.group-checkbox-item.selected {
  border-color: var(--primary);
  background: rgba(34, 113, 177, 0.05);
}

.group-checkbox-item .check-box {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all .15s;
}

.group-checkbox-item.selected .check-box {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.group-checkbox-item .check-box svg {
  width: 14px;
  height: 14px;
}

/* =============================================
   FORM ELEMENTS (reusable)
   ============================================= */
.form-input {
  width: 100%;
  height: 36px;
  padding: 0 0.75rem;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 2px);
  background: var(--input-background);
  color: var(--foreground);
  font-size: 0.875rem;
  font-family: inherit;
  line-height: 1.5;
  transition: border-color .15s, box-shadow .15s;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.15);
}

.form-textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 2px);
  background: var(--input-background);
  color: var(--foreground);
  font-size: 0.875rem;
  font-family: inherit;
  line-height: 1.5;
  resize: vertical;
  transition: border-color .15s, box-shadow .15s;
}

.form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.15);
}

.form-select {
  width: 100%;
  height: 36px;
  padding: 0 32px 0 12px;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 2px);
  background-color: var(--input-background);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 16px;
  color: var(--foreground);
  font-size: 0.875rem;
  font-family: inherit;
  line-height: 1.5;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.form-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.15);
}

.form-select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Range Slider */
.form-range {
  width: 100%;
  height: 8px;
  background: var(--muted);
  border-radius: 9999px;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  outline: none;
  accent-color: var(--primary);
}

.form-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  background: var(--primary);
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.form-range::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: var(--primary);
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.form-range::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 9999px;
}

.form-range::-moz-range-track {
  height: 8px;
  background: var(--muted);
  border-radius: 9999px;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.375rem;
  color: var(--foreground);
}

/* =============================================
   ARTICLE FORM LAYOUT
   ============================================= */
.article-form-layout {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

@media (min-width: 1024px) {
  .article-form-layout {
    flex-direction: row;
  }
}

.article-form-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.article-form-sidebar {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex-shrink: 0;
}

@media (min-width: 1024px) {
  .article-form-sidebar {
    width: 300px;
  }
}

/* --- Title Input (referans: referans nexths/zoro/components/common/title-with-permalink.tsx) --- */
.title-input-wrap {
  position: relative;
  height: 3rem;
  /* h-12 */
}

.title-input-icon {
  position: absolute;
  left: 0.75rem;
  /* left-3 */
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted-foreground);
  display: flex;
  align-items: center;
  pointer-events: auto;
  /* ikon tıklanınca focus+cursor sona gitsin */
}

.title-input-label {
  position: absolute;
  left: 2.75rem;
  /* left-11 */
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.875rem;
  color: var(--muted-foreground);
  opacity: 0.7;
  pointer-events: none;
  transition: all 0.2s;
}

.title-input-label.has-value {
  top: 0.25rem;
  /* top-1: floating label */
  transform: none;
  font-size: 10px;
  opacity: 1;
}

.title-input {
  width: 100%;
  height: 3rem;
  /* h-12 */
  padding: 0 3.5rem 0 2.75rem;
  /* pr-14 pl-11 */
  border: none;
  border-radius: calc(var(--radius) - 2px);
  background: var(--input-background);
  color: var(--foreground);
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  box-shadow: none;
  transition: padding 0.2s;
}

[data-slot="form-control"]:has(.title-input-label.has-value) .title-input,
.title-input-wrap:has(.title-input-label.has-value) .title-input {
  padding-top: 1rem;
  /* pt-4: floating label altında yazı */
  padding-bottom: 0.25rem;
  /* pb-1 */
}

.title-input:focus {
  outline: none;
  box-shadow: none;
}

.title-counter {
  position: absolute;
  right: 0.75rem;
  /* right-3 */
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.75rem;
  color: var(--muted-foreground);
  pointer-events: none;
  font-variant-numeric: tabular-nums;
}

.title-counter.warn {
  color: #eab308;
}

.title-counter.over {
  color: var(--destructive);
}

/* --- Character Counter --- */
.char-counter {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  font-variant-numeric: tabular-nums;
  pointer-events: none;
  white-space: nowrap;
}

.char-counter.warn {
  color: #eab308;
}

.char-counter.over {
  color: var(--destructive);
  background: rgba(220, 38, 38, 0.08);
}

.char-counter-inline {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  font-variant-numeric: tabular-nums;
}

.char-counter-inline.warn {
  color: #eab308;
}

.char-counter-inline.over {
  color: var(--destructive);
}

.field-with-counter {
  position: relative;
}

.field-with-counter .char-counter {
  position: absolute;
  right: 8px;
  top: 8px;
}

/* --- Permalink Row --- */
.permalink-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-top: 8px;
  font-size: 0.875rem;
  min-width: 0;
}

.permalink-label {
  color: var(--muted-foreground);
  white-space: nowrap;
  flex-shrink: 0;
}

.permalink-url {
  font-size: 0.875rem;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--foreground);
  text-decoration: none;
}

.permalink-url:hover {
  text-decoration: underline;
}

.permalink-edit-btn {
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  font-size: 0.875rem;
  padding: 0;
  flex-shrink: 0;
  margin-left: auto;
  font-family: inherit;
}

.permalink-edit-btn:hover {
  text-decoration: underline;
}

.slug-edit-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  min-width: 200px;
}

.slug-input {
  flex: 1;
  height: 1.75rem;
  padding: 0 0.5rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--input-background);
  color: var(--foreground);
  font-size: 0.875rem;
}

.slug-input:focus {
  outline: none;
  border-color: var(--primary);
}

/* --- Link Button --- */
.btn-link {
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  font-size: inherit;
  padding: 0;
  text-decoration: none;
  font-family: inherit;
}

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

/* --- Publish Box --- */
.publish-status-bar {
  padding: 0 16px;
  height: 40px;
  background: #f3f4f6;
  color: #374151;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.publish-status-bar .status-text {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.publish-status-bar .status-change-btn {
  font-size: 0.75rem;
  opacity: 0.7;
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
  padding: 0;
}

.publish-status-bar .status-change-btn:hover {
  opacity: 1;
  text-decoration: underline;
}

.publish-section {
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.publish-section:last-child {
  border-bottom: none;
}

.publish-section-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* SEO Score Badge (RankMath style) */
.seo-score-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 16px;
  font-size: 0.8125rem;
  font-weight: 600;
  text-align: center;
  transition: background 0.2s, color 0.2s;
}

.seo-score-badge--none {
  color: var(--muted-foreground);
  background: var(--muted);
}

.seo-score-badge--bad {
  color: #e93f30;
  background: #fdeae8;
}

.seo-score-badge--ok {
  color: #bf890d;
  background: #fdf0c4;
}

.seo-score-badge--good {
  color: #58bb58;
  background: #e9f6e9;
}

[data-theme="dark"] .seo-score-badge--bad {
  color: #f87171;
  background: rgba(239, 68, 68, 0.12);
}

[data-theme="dark"] .seo-score-badge--ok {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.12);
}

[data-theme="dark"] .seo-score-badge--good {
  color: #4ade80;
  background: rgba(74, 222, 128, 0.12);
}

.pub-date-row {
  display: flex;
  align-items: center;
  gap: calc(var(--spacing) * 1.5);
  flex-wrap: nowrap;
  font-size: 0.75rem;
}

.pub-date-month {
  flex-shrink: 0;
}

.pub-date-month .tf-cb {
  width: auto !important;
}

.pub-date-month .tf-cb-trigger {
  width: auto !important;
  height: 28px;
  padding-inline: calc(var(--spacing) * 1.5);
  font-size: 0.75rem;
  gap: calc(var(--spacing) * 1);
}

.pub-date-month .tf-cb-chevron {
  width: 12px;
  height: 12px;
}

.pub-date-input {
  height: 28px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--background);
  color: var(--foreground);
  font-size: 0.75rem;
  padding-inline: calc(var(--spacing) * 1.5);
  font-family: inherit;
  text-align: center;
  flex-shrink: 0;
}

.pub-date-input:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.3);
  border-color: var(--primary);
}

.pub-date-sep {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  flex-shrink: 0;
  line-height: 1;
}

.publish-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.publish-actions .btn {
  flex: 1;
}

/* --- Revizyon karşılaştırma (diff) - sayfa boyutuna göre esnek, tam sayfaya sığar --- */
.revision-diff-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: calc(100vh - 220px);
}
.revision-diff-card > .p-5 {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.revision-diff-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  flex: 1;
  min-height: 0;
  overflow: hidden;
  align-content: start;
}
.revision-diff-col {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.revision-diff-col-header {
  margin-bottom: 0.5rem;
  flex-shrink: 0;
}
.revision-diff-content-box {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.revision-diff-col .revision-diff-pre {
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
}
.revision-diff-cell {
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
  min-width: 0;
}
.revision-diff-pre {
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
  min-width: 0;
  max-height: 16rem;
  overflow-y: auto;
  overflow-x: hidden;
}
@media (max-width: 768px) {
  .revision-diff-grid {
    grid-template-columns: 1fr;
  }
  .revision-diff-card {
    max-height: none;
  }
}

/* Revizyon diff: silinen / eklenen vurgulama */
.revision-diff-card .diff-del {
  background: rgba(239, 68, 68, 0.2);
  color: var(--destructive);
  text-decoration: line-through;
  padding: 0 1px;
  border-radius: 2px;
}
.revision-diff-card .diff-ins {
  background: rgba(34, 197, 94, 0.2);
  color: #15803d;
  text-decoration: none;
  padding: 0 1px;
  border-radius: 2px;
}

/* --- Revizyon listesi: İşlem sütunu düzgün hizalı --- */
.revisions-table .revisions-actions-cell {
  vertical-align: middle;
}
.revisions-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.revisions-actions .revisions-action-form {
  display: inline-block;
  margin: 0;
}

/* Mobilde revizyon tablosunda Kullanıcı sütununu gizle (taşmayı önlemek için) */
@media (max-width: 768px) {
  .revisions-table .revisions-col-user {
    display: none;
  }
}

/* --- SEO Preview (Google-style) --- */
.seo-preview {
  padding: 1rem;
  background: var(--muted);
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid var(--border);
}

.seo-preview-title {
  font-size: 1.125rem;
  color: #1a0dab;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.seo-preview-url {
  font-size: 0.75rem;
  color: #006621;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.seo-preview-desc {
  font-size: 0.75rem;
  color: #545454;
  margin-top: 4px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --- Featured Image Preview --- */
.featured-image-preview {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16/9;
  background: var(--muted);
}

.featured-image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-image-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  transition: opacity .2s;
}

.featured-image-preview:hover .featured-image-overlay {
  opacity: 1;
}

/* --- Category Checkbox --- */
.category-list {
  max-height: 192px;
  overflow-y: auto;
}

.category-list-inner {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.category-check-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: background .1s;
}

.category-check-item:hover {
  background: rgba(244, 244, 245, 0.5);
}

.category-check-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1px solid #d1d5db;
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
}

/* --- Custom Site Selector Dropdown --- */
/* =============================================
   SITE COMBOBOX (searchable dropdown - Radix style)
   Used by site-filter (toolbar) and site-selector (forms)
   ============================================= */
.site-cb {
  position: relative;
  width: 280px;
  flex-shrink: 0;
}

.site-cb--block {
  width: 100%;
}

.site-cb-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--background);
  color: var(--foreground);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.site-cb-trigger:hover {
  border-color: rgba(113, 113, 122, 0.4);
}

.site-cb.open .site-cb-trigger {
  border-color: var(--ring);
  box-shadow: 0 0 0 2px rgba(161, 161, 170, 0.2);
}

.site-cb-value {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-cb-value.placeholder {
  color: var(--muted-foreground);
}

.site-cb-chevron {
  flex-shrink: 0;
  opacity: 0.5;
  transition: transform .15s;
}

.site-cb.open .site-cb-chevron {
  transform: rotate(180deg);
}

.site-cb-popover {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  width: 100%;
  z-index: 50;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.site-cb.open .site-cb-popover {
  display: block;
}

.site-cb-search-wrap {
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-bottom: 1px solid var(--border);
}

.site-cb-search-icon {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-right: 8px;
  color: var(--muted-foreground);
  opacity: 0.5;
}

.site-cb-search {
  flex: 1;
  border: none !important;
  background: transparent !important;
  padding: 0 !important;
  height: 44px !important;
  min-height: auto;
  font-size: 0.875rem;
  color: var(--foreground);
  outline: none;
  box-shadow: none !important;
}

.site-cb-search:focus {
  box-shadow: none !important;
  border: none !important;
}

.site-cb-search::placeholder {
  color: var(--muted-foreground);
}

.site-cb-list {
  max-height: 300px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 6px;
}

.site-cb-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 2px;
  cursor: pointer;
  user-select: none;
  transition: background .1s;
  font-size: 0.875rem;
  color: var(--foreground);
}

.site-cb-item:hover,
.site-cb-item.highlighted {
  background: var(--background);
}

.site-cb-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.site-cb-item-name {
  font-size: 0.875rem;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-cb-item-domain {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-cb-check {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-left: auto;
  color: var(--foreground);
  opacity: 0;
  transition: opacity .1s;
}

.site-cb-item.selected .site-cb-check {
  opacity: 1;
}

.site-cb-empty {
  padding: 24px 8px;
  text-align: center;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

/* --- Command Popover (Affiliate Link & Butonlar) --- */
.se-cmd-popover {
  width: 320px;
  background: var(--popover);
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: se-cmd-in 0.15s ease-out;
}

.se-cmd-popover-inner {
  background: var(--card);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 0.375rem;
}

@keyframes se-cmd-in {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.se-cmd-search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border-bottom: 1px solid var(--border);
}

.se-cmd-search,
.se-cmd-search:focus {
  flex: 1;
  height: 44px;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 0.875rem;
  color: var(--foreground);
  outline: none !important;
  font-family: inherit;
  padding: 0;
  border-radius: 0;
  width: auto;
}

.se-cmd-search::placeholder {
  color: var(--muted-foreground);
}

.se-cmd-list {
  max-height: 300px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 6px;
}

.se-cmd-group-heading {
  padding: 6px 8px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted-foreground);
}

.se-cmd-item {
  display: flex;
  align-items: center;
  padding: 6px 8px;
  border-radius: calc(var(--radius) - 2px);
  cursor: pointer;
  transition: background 0.1s;
}

.se-cmd-item:hover {
  background: var(--background);
}

.se-cmd-item-main {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.se-cmd-copy-icon {
  flex-shrink: 0;
  color: var(--muted-foreground);
  transition: color 0.15s;
}
.se-cmd-item:hover .se-cmd-copy-icon { color: var(--foreground); }

.se-cmd-item-url {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.se-cmd-item-name {
  font-size: 0.875rem;
  color: var(--foreground);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.se-cmd-item-badge {
  font-size: 0.6875rem;
  font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
  background: var(--muted);
  color: var(--muted-foreground);
  padding: 1px 6px;
  border-radius: 3px;
  white-space: nowrap;
  flex-shrink: 0;
}

.se-cmd-empty {
  padding: 24px 16px;
  text-align: center;
}

.se-cmd-empty-title {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin: 0;
}

.se-cmd-empty-sub {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  margin: 4px 0 0;
}

.se-cmd-footer {
  padding: 12px;
  border-top: 1px solid var(--border);
  background: rgba(244, 244, 245, 0.3);
}

.se-cmd-footer-title {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--foreground);
  margin: 0 0 8px;
}

.se-cmd-footer-items {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.se-cmd-footer-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.se-cmd-footer-row code {
  font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
  background: var(--muted);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.6875rem;
}

/* --- FAQ Editor --- */
.faq-item {
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 2px);
  overflow: hidden;
}

.faq-item-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 0.75rem;
  background: var(--muted);
  cursor: pointer;
  user-select: none;
  transition: background .1s;
}

.faq-item-header:hover {
  background: rgba(244, 244, 245, 0.8);
}

.faq-item-title {
  flex: 1;
  font-size: 0.875rem;
  font-weight: 500;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.faq-grip {
  cursor: grab;
  flex-shrink: 0;
}

.faq-grip:active {
  cursor: grabbing;
}

.faq-item.dragging {
  opacity: 0.35;
}

.faq-drop-placeholder {
  border: 2px dashed var(--primary);
  border-radius: calc(var(--radius) - 2px);
  background: rgba(34, 113, 177, 0.04);
  pointer-events: none;
  transition: height 0.15s ease;
}

.faq-chevron {
  flex-shrink: 0;
  transition: transform .2s;
}

.faq-item-body {
  padding: 0.75rem;
  border-top: 1px solid var(--border);
}

.empty-state-inline {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.5rem;
  text-align: center;
}

/* =============================================
   ARTICLES LIST EXTRAS
   ============================================= */

/* Tab badges */
.tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0 6px;
  height: 20px;
  min-width: 24px;
  border-radius: 6px;
  margin-left: 4px;
  font-variant-numeric: tabular-nums;
  background: var(--muted);
  color: var(--muted-foreground);
}

.tab-badge-success {
  background: rgba(34, 197, 94, 0.1);
  color: #16a34a;
}

/* Legacy tab-count alias */
.tab-count {
  font-size: 0.6875rem;
  color: var(--muted-foreground);
  background: var(--muted);
  padding: 1px 6px;
  border-radius: 10px;
  margin-left: 4px;
  font-variant-numeric: tabular-nums;
}

.tab.active .tab-count {
  background: rgba(34, 113, 177, 0.1);
  color: var(--primary);
}

/* Article thumb */
.article-thumb {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 3px;
  flex-shrink: 0;
}

.article-thumb-placeholder {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--muted);
  border-radius: 3px;
  flex-shrink: 0;
}

.article-title-link {
  font-weight: 500;
  color: var(--foreground);
  text-decoration: none;
  display: block;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color .15s;
}

.article-title-link:hover {
  color: var(--primary);
}

/* Site not assigned indicator */
.site-not-assigned {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  color: #7c3aed;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: #7c3aed;
  border-radius: 50%;
  animation: pulse-dot-anim 1.5s infinite;
}

@keyframes pulse-dot-anim {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.5;
    transform: scale(1.3);
  }
}

/* SEO score badge in table */
.data-table .seo-score-badge {
  display: inline-flex;
  gap: 3px;
  font-size: 0.75rem;
  padding: 0;
  background: none;
  font-variant-numeric: tabular-nums;
}

/* Bulk actions bar */
.bulk-actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1rem;
  background: rgba(34, 113, 177, 0.06);
  border-bottom: 1px solid var(--border);
}

/* =============================================
   CATEGORY FORM
   ============================================= */
.category-form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 1024px) {
  .category-form-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Icon Grid */
.icon-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}

.icon-grid-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 2px);
  background: transparent;
  color: var(--muted-foreground);
  cursor: pointer;
  transition: all .15s;
}

.icon-grid-item:hover {
  background: var(--muted);
  color: var(--foreground);
  border-color: var(--primary);
}

.icon-grid-item.selected {
  background: rgba(34, 113, 177, 0.1);
  color: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
}

/* Icon xs */
.icon-xs {
  width: 12px;
  height: 12px;
}

/* =============================================
   DIALOG (tek bileşen – openDialog/closeDialog)
   Arka plan: --dialog-bg (varsayılan --card)
   ============================================= */
/* Editör toolbar (ZoroEditor) çok yüksek z-index kullandığı için tüm diyaloglar onun üstünde olmalı */
.dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.dialog-content {
  background: var(--dialog-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  width: 100%;
  max-width: 28rem; /* 448px – varsayılan; geniş diyaloglar style="max-width:..." ile override eder */
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  max-height: calc(100vh - 32px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

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

.dialog-close {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  border-radius: var(--radius);
  color: var(--muted-foreground);
  cursor: pointer;
}

.dialog-close:hover {
  background: var(--accent);
}

.dialog-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.dialog-content > form {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

/* =============================================
   BTN DESTRUCTIVE
   ============================================= */
.btn-destructive {
  background: var(--destructive);
  color: #fff;
  border: 1px solid var(--destructive);
}

.btn-destructive:hover {
  opacity: 0.9;
}

/* =============================================
   COLLAPSIBLE
   ============================================= */
.collapsible-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 16px 20px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  color: inherit;
  font: inherit;
}

.collapsible-trigger:hover {
  background: var(--accent);
  border-radius: var(--radius) var(--radius) 0 0;
}

.collapsible-chevron {
  color: var(--muted-foreground);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.collapsible-chevron.open {
  transform: rotate(180deg);
}

/* =============================================
   TOOLTIP
   ============================================= */
.tooltip {
  position: fixed;
  z-index: 9999999;
  pointer-events: none;
  max-width: 280px;
  padding: 6px 12px;
  border-radius: 6px;
  background: var(--foreground);
  color: var(--background);
  font-size: 12px;
  line-height: 1.4;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
  opacity: 0;
  transform: scale(.96);
  transition: opacity .15s ease, transform .15s ease;
}

.tooltip.visible {
  opacity: 1;
  transform: scale(1);
}

.tooltip-arrow {
  position: absolute;
  width: 8px;
  height: 8px;
  background: inherit;
  transform: rotate(45deg);
}

.tooltip[data-side="top"] .tooltip-arrow {
  bottom: -4px;
  left: 50%;
  margin-left: -4px;
}

.tooltip[data-side="bottom"] .tooltip-arrow {
  top: -4px;
  left: 50%;
  margin-left: -4px;
}

.tooltip[data-side="left"] .tooltip-arrow {
  right: -4px;
  top: 50%;
  margin-top: -4px;
}

.tooltip[data-side="right"] .tooltip-arrow {
  left: -4px;
  top: 50%;
  margin-top: -4px;
}

.tooltip-rich {
  white-space: normal;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tooltip-swatch {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, .25);
}

.tooltip-mono {
  font-family: ui-monospace, SFMono-Regular, monospace;
}

/* =============================================
   USERS FORM
   ============================================= */
.user-tab-panel {
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Repeater Items */
.repeater-item {
  position: relative;
  padding: 16px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--muted) 30%, transparent);
}

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

.repeater-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--muted-foreground);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}

.repeater-remove:hover {
  background: rgba(239, 68, 68, 0.1);
  color: var(--destructive);
}

/* SERP Preview */
.serp-preview {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--background);
}

.serp-title {
  font-size: 1.125rem;
  color: #1a0dab;
  margin-bottom: 4px;
  cursor: pointer;
}

.serp-title:hover {
  text-decoration: underline;
}

.serp-url {
  font-size: 0.8125rem;
  color: #006621;
  margin-bottom: 4px;
}

.serp-desc {
  font-size: 0.8125rem;
  color: #545454;
  line-height: 1.5;
}

/* ===== Session Displacement Dialog ===== */
.session-displaced-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999999;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: sessionFadeIn 0.3s ease;
}

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

.session-displaced-dialog {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  max-width: 420px;
  width: calc(100% - 32px);
  text-align: center;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  animation: sessionSlideUp 0.3s ease;
}

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

.session-displaced-icon {
  margin-bottom: 16px;
}

.session-displaced-info {
  background: var(--muted);
  border-radius: var(--radius);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.session-displaced-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Mobile utility */
@media (max-width: 768px) {
  .hidden-mobile { display: none !important; }
  .sites-filter-row { width: 100%; }
  .site-cb { width: auto; flex: 1; min-width: 0; }
}

/* Media toolbar */
.media-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.media-toolbar-search { max-width: 384px; }
.media-toolbar-tabs { order: 0; }
@media (max-width: 768px) {
  .media-toolbar {
    flex-wrap: wrap;
  }
  .media-toolbar-tabs { flex: 1; min-width: 0; overflow-x: auto; }
  .media-toolbar-search { order: 1; flex-basis: 100%; max-width: none; }
}