/* ==========================================================================
   TEBAR UI — Exact Desktop & Mobile Theme Duplication of GO HIDRO
   ========================================================================== */

:root {
  --font-sans: "Schibsted Grotesk", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --background: #ffffff;
  --sidebar-bg: #f8fafc;
  --foreground: #020617;
  --heading: #0f172a;
  --body: #334155;
  --muted-text: #64748b;
  --subtle-text: #94a3b8;

  --surface: #ffffff;
  --surface-subtle: #f8fafc;
  --surface-muted: #f1f5f9;
  --surface-blue-tint: #e7f0ff;
  --border-blue-tint: #cfe0fb;

  --primary: #1d4ed8;
  --primary-hover: #1e40af;
  --primary-soft-text: #bfdbfe;
  --ring: #93c5fd;

  --border: #e2e8f0;
  --border-subtle: #eef2f6;

  --success-bg: #dcfce7;
  --success-text: #15803d;
  --success-dot: #22c55e;
  --success-hero-dot: #4ade80;

  --warning-bg: #fef3c7;
  --warning-text: #b45309;
  --warning-dot: #f59e0b;

  --offline-bg: #f1f5f9;
  --offline-text: #475569;
  --offline-dot: #94a3b8;

  --ai-gradient: linear-gradient(135deg, #2563eb 14.645%, #7c3aed 85.355%);
  --ai-shadow: 0px 10px 28px rgba(79, 70, 229, 0.4);

  --shadow-card: 0px 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-tabbar: 0 8px 24px rgba(15, 23, 42, 0.12), 0 1px 4px rgba(15, 23, 42, 0.06);

  --sidebar-w: 242px;
  --tabbar-h: 86px;
}

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

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button,
input,
select {
  font-family: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.font-mono {
  font-family: var(--font-mono);
}

[hidden] {
  display: none !important;
}

/* ---------- App Shell ---------- */
.app-shell {
  position: relative;
  display: flex;
  height: 100dvh;
  width: 100%;
  overflow: hidden;
  background: var(--background);
}

/* ---------- Desktop Sidebar (>= 1280px, matching GO HIDRO screenshot) ---------- */
.app-sidebar {
  display: none;
}

@media (min-width: 1280px) {
  .app-sidebar {
    display: flex;
    flex-direction: column;
    width: var(--sidebar-w);
    flex-shrink: 0;
    height: 100%;
    border-right: 1px solid var(--border);
    background: var(--sidebar-bg);
    z-index: 30;
    transition: width 180ms ease;
  }

  .app-shell.sidebar-collapsed .app-sidebar {
    width: 0;
    overflow: hidden;
    border-right: none;
  }
}

.sidebar-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px 18px 16px;
  border-bottom: 1px solid var(--border);
}

.brand-mark-lg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
  color: #ffffff;
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.5px;
  box-shadow: 0 4px 12px rgba(29, 78, 216, 0.28);
  margin-bottom: 10px;
}

.brand-mark-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--primary);
  color: #ffffff;
  font-weight: 800;
  font-size: 13px;
}

.brand-title {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 1.4px;
  color: var(--primary);
  line-height: 1.1;
}

.brand-subtitle {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.4px;
  color: var(--muted-text);
  text-transform: uppercase;
  line-height: 1.35;
  margin-top: 5px;
  max-width: 185px;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sidebar-group-label {
  padding: 0 10px 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted-text);
  letter-spacing: 0.15px;
}

.sidebar-group-items {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 500;
  color: var(--body);
  transition: background-color 140ms ease, color 140ms ease, border-color 140ms ease;
}

.sidebar-link svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--muted-text);
}

.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.75);
  color: var(--foreground);
}

.sidebar-link.active {
  background: #ffffff;
  border-color: var(--border);
  color: var(--primary);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

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

.sidebar-link-arrow {
  margin-left: auto;
  font-size: 13px;
  color: var(--primary);
  display: none;
}

.sidebar-link.active .sidebar-link-arrow {
  display: inline;
}

.sidebar-link-badge {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 9999px;
  background: var(--surface-blue-tint);
  color: var(--primary);
}

.sidebar-ai-card {
  margin: 0 12px 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #ffffff;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: border-color 140ms ease;
  text-align: left;
}

.sidebar-ai-card:hover {
  border-color: var(--border-blue-tint);
}

.sidebar-ai-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--surface-blue-tint);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-ai-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--foreground);
  line-height: 1.2;
}

.sidebar-ai-sub {
  font-size: 11px;
  color: var(--muted-text);
  margin-top: 1px;
}

.sidebar-footer {
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 9999px;
  background: var(--surface-blue-tint);
  border: 1px solid var(--border-blue-tint);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12.5px;
  flex-shrink: 0;
}

.sidebar-user-meta {
  min-width: 0;
  flex: 1;
}

.sidebar-user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--foreground);
  line-height: 1.2;
}

.sidebar-user-role {
  font-size: 11px;
  color: var(--muted-text);
}

/* ---------- Main Workspace Column ---------- */
.app-workspace {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  min-height: 0;
  height: 100%;
  background: var(--background);
}

/* Desktop Top Utility Bar */
.desktop-topbar {
  display: none;
}

@media (min-width: 1280px) {
  .desktop-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 54px;
    padding: 0 24px;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    flex-shrink: 0;
    z-index: 20;
  }
}

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

.sidebar-toggle-btn {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.sidebar-toggle-btn:hover {
  background: var(--surface-subtle);
  color: var(--foreground);
}

.desktop-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted-text);
}

.desktop-breadcrumb .sep {
  color: var(--subtle-text);
}

.desktop-breadcrumb .current {
  color: var(--foreground);
  font-weight: 600;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 12px;
  border-radius: 9999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 12px;
  font-weight: 500;
  color: var(--body);
}

.live-pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 9999px;
  background: var(--success-dot);
}

.topbar-ai-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--border-blue-tint);
  background: var(--surface-blue-tint);
  color: var(--primary);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: filter 140ms ease;
}

.topbar-ai-btn:hover {
  filter: brightness(0.97);
}

/* Mobile / Tablet Sticky Header (< 1280px) */
.mobile-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
}

@media (min-width: 1280px) {
  .mobile-header {
    display: none;
  }
}

.app-main {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-bottom: calc(var(--tabbar-h) + 40px);
}

@media (min-width: 1280px) {
  .app-main {
    padding-bottom: 36px;
  }
}

.page-container {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
  padding: 16px 16px 24px;
}

@media (min-width: 768px) {
  .page-container {
    padding: 20px 24px 32px;
  }
}

/* ---------- Page Title & Action Row ---------- */
.page-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.page-title-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.page-h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.6px;
  color: var(--foreground);
}

@media (min-width: 1280px) {
  .page-h1 {
    font-size: 26px;
  }
}

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

/* ---------- Rounded Hero Card ---------- */
.desktop-hero-card {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background-color: #0b1b3a;
  background-image:
    linear-gradient(
      95deg,
      rgba(7, 17, 31, 0.88) 0%,
      rgba(11, 27, 58, 0.72) 52%,
      rgba(7, 17, 31, 0.84) 100%
    ),
    radial-gradient(ellipse at 68% 30%, rgba(37, 99, 235, 0.38) 0%, transparent 56%),
    radial-gradient(ellipse at 25% 78%, rgba(14, 165, 233, 0.24) 0%, transparent 50%),
    linear-gradient(135deg, #0b1b3a 0%, #143264 55%, #07111f 100%);
  color: #ffffff;
  padding: 20px;
}

@media (min-width: 768px) {
  .desktop-hero-card {
    padding: 24px;
  }
}

.hero-grid-pattern {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(147, 197, 253, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(147, 197, 253, 0.06) 1px, transparent 1px);
  background-size: 36px 36px;
  pointer-events: none;
}

.hero-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: stretch;
}

@media (min-width: 1024px) {
  .hero-layout {
    grid-template-columns: minmax(0, 1.65fr) minmax(300px, 0.95fr);
    gap: 22px;
  }
}

.hero-left {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
}

.hero-chips {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.hero-date-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 12px;
  font-weight: 500;
  color: #e2e8f0;
}

.hero-online-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 9999px;
  background: rgba(34, 197, 94, 0.16);
  border: 1px solid rgba(74, 222, 128, 0.45);
  font-size: 12px;
  font-weight: 600;
  color: #dcfce7;
}

.hero-online-chip .dot {
  width: 7px;
  height: 7px;
  border-radius: 9999px;
  background: var(--success-hero-dot);
}

.hero-eyebrow {
  font-size: 12.5px;
  color: #cbd5e1;
  margin-bottom: 4px;
}

.hero-title {
  margin: 0;
  font-size: 25px;
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: -0.8px;
  color: #ffffff;
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 29px;
  }
}

.hero-sub {
  margin: 6px 0 0;
  font-size: 13px;
  color: #cbd5e1;
}

.hero-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

@media (min-width: 768px) {
  .hero-kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.hero-kpi-tile {
  padding: 12px 13px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
}

.hero-kpi-label {
  font-size: 11px;
  color: #cbd5e1;
  font-weight: 500;
}

.hero-kpi-value {
  margin-top: 5px;
  font-family: var(--font-mono);
  font-size: 21px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.1;
}

.hero-kpi-unit {
  font-size: 11.5px;
  font-weight: 500;
  color: #cbd5e1;
  margin-left: 3px;
}

.hero-kpi-foot {
  margin-top: 4px;
  font-size: 10.5px;
  color: #94a3b8;
}

/* Dark Status Jaringan Panel inside Hero Right */
.hero-matrix-panel {
  border-radius: 12px;
  background: rgba(8, 16, 30, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}

.hero-matrix-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.hero-matrix-title {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
}

.hero-matrix-meta {
  font-size: 11px;
  color: #94a3b8;
}

/* ---------- Matrix Rows ---------- */
.matrix-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.matrix-row {
  display: grid;
  grid-template-columns: 118px 1fr auto;
  align-items: center;
  gap: 10px;
}

.matrix-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--body);
}

.hero-matrix-panel .matrix-label {
  color: #cbd5e1;
}

.matrix-squares {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.status-sq {
  width: 15px;
  height: 15px;
  border-radius: 4px;
  display: inline-block;
}

.status-sq.ok { background: #22c55e; }
.status-sq.warn { background: #f59e0b; }
.status-sq.off { background: #64748b; }

.matrix-count {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--foreground);
}

.hero-matrix-panel .matrix-count {
  color: #ffffff;
}

.matrix-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 11.5px;
  color: var(--muted-text);
}

.hero-matrix-panel .matrix-legend {
  color: #94a3b8;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 10px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.legend-sq {
  width: 9px;
  height: 9px;
  border-radius: 2.5px;
  display: inline-block;
}

/* ---------- Filter Bar ---------- */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.segmented-pills-box {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-muted);
  overflow-x: auto;
  max-width: 100%;
  scrollbar-width: none;
}

.segmented-pills-box::-webkit-scrollbar {
  display: none;
}

.seg-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 10px;
  border-radius: 7px;
  border: none;
  background: transparent;
  font-size: 12px;
  font-weight: 500;
  color: var(--body);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 140ms ease, color 140ms ease;
}

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

.seg-pill .pill-count {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted-text);
}

.seg-pill.active {
  background: #ffffff;
  color: var(--primary);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.seg-pill.active .pill-count {
  color: var(--primary);
}

.filter-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 210px;
  height: 38px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

@media (max-width: 640px) {
  .search-box {
    width: 100%;
    flex: 1 1 200px;
  }
}

.search-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(147, 197, 253, 0.35);
}

.search-box svg {
  width: 15px;
  height: 15px;
  color: var(--muted-text);
  flex-shrink: 0;
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-size: 13px;
  color: var(--foreground);
}

.search-box input::placeholder {
  color: var(--muted-text);
}

.status-select-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 38px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 0 12px;
  gap: 7px;
}

.status-select-wrap svg {
  width: 14px;
  height: 14px;
  color: var(--muted-text);
  flex-shrink: 0;
  pointer-events: none;
}

.select-clean {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  background: transparent;
  font-size: 13px;
  line-height: 36px;
  font-weight: 500;
  color: var(--body);
  cursor: pointer;
  outline: none;
  height: 36px;
  padding: 0 2px;
}

/* ---------- Buttons & Badges ---------- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 36px;
  padding: 0 15px;
  border-radius: 8px;
  border: 1px solid var(--primary);
  background: var(--primary);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 140ms ease;
}

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

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 36px;
  padding: 0 13px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--foreground);
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-card);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 140ms ease;
}

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

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--body);
  cursor: pointer;
  transition: background-color 140ms ease;
}

.btn-icon:hover {
  background: var(--surface-subtle);
  color: var(--foreground);
}

.btn-icon svg {
  width: 16px;
  height: 16px;
}

.badge-type {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 9999px;
  background: var(--surface-blue-tint);
  border: 1px solid var(--border-blue-tint);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
}

.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 9999px;
  font-size: 11.5px;
  line-height: 15px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-status .dot {
  width: 6px;
  height: 6px;
  border-radius: 9999px;
  flex-shrink: 0;
}

.badge-status.connected { background: var(--success-bg); color: var(--success-text); }
.badge-status.connected .dot { background: var(--success-dot); }
.badge-status.warning { background: var(--warning-bg); color: var(--warning-text); }
.badge-status.warning .dot { background: var(--warning-dot); }
.badge-status.offline { background: var(--offline-bg); color: var(--offline-text); }
.badge-status.offline .dot { background: var(--offline-dot); }

/* ---------- Section & Card ---------- */
.section-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.section-heading-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-icon-tile {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--surface-blue-tint);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.section-icon-tile svg {
  width: 18px;
  height: 18px;
}

.section-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--foreground);
}

.section-sub {
  margin: 1px 0 0;
  font-size: 12px;
  color: var(--muted-text);
}

.card {
  width: 100%;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  flex-wrap: wrap;
}

/* ---------- Table Styling ---------- */
.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.hidro-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  min-width: 700px;
}

.hidro-table thead tr {
  height: 40px;
  background: var(--surface-subtle);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.hidro-table th {
  padding: 0 18px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted-text);
  letter-spacing: 0.25px;
  white-space: nowrap;
  user-select: none;
}

.hidro-table th.sortable {
  cursor: pointer;
}

.hidro-table th.sortable:hover {
  color: var(--foreground);
}

.th-inner {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.hidro-table tbody tr {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  transition: background-color 120ms ease;
}

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

.hidro-table tbody tr:hover {
  background: var(--surface-subtle);
}

.hidro-table td {
  padding: 12px 18px;
  font-size: 13.5px;
  color: var(--body);
  vertical-align: middle;
}

.akun-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
}

.akun-avatar {
  width: 38px;
  height: 38px;
  border-radius: 9999px;
  border: 1px solid var(--border);
  overflow: hidden;
  flex-shrink: 0;
}

.akun-avatar-wrap {
  position: relative;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
}

.avatar-platform-badge {
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 18px;
  height: 18px;
  border-radius: 9999px;
  border: 2px solid #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.22);
}

.avatar-platform-badge svg {
  width: 9.5px;
  height: 9.5px;
}

.akun-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.akun-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.akun-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--foreground);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.akun-username {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted-text);
  line-height: 1.35;
}

.platform-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  border-radius: 9999px;
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--foreground);
  white-space: nowrap;
}

.platform-icon {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  flex-shrink: 0;
}

.platform-icon svg {
  width: 11px;
  height: 11px;
}

.plat-instagram { background: linear-gradient(135deg, #f58529, #dd2a7b 55%, #8134af); }
.plat-tiktok { background: #0f172a; }
.plat-x { background: #020617; }
.plat-facebook { background: #1877f2; }
.plat-youtube { background: #dc2626; }
.plat-threads { background: #1e293b; }
.plat-linkedin { background: #0a66c2; }
.plat-telegram { background: #0284c7; }
.plat-discord { background: #4f46e5; }
.plat-pinterest { background: #bd081c; }
.plat-default { background: #334155; }

/* API Source / Error Notice Banner */
.api-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--border-blue-tint);
  background: var(--surface-blue-tint);
  color: #1e3a8a;
  font-size: 12.5px;
  flex-wrap: wrap;
}

.api-notice.is-error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.api-notice-left {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  flex: 1;
}

.api-notice-left svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.api-notice code {
  font-family: var(--font-mono);
  font-size: 11.5px;
  background: rgba(255, 255, 255, 0.72);
  padding: 1px 6px;
  border-radius: 5px;
}

.badge-status.danger { background: #fee2e2; color: #b91c1c; }
.badge-status.danger .dot { background: #ef4444; }
.badge-status.info { background: var(--surface-blue-tint); color: var(--primary); }
.badge-status.info .dot { background: var(--primary); }

/* ---------- Posts Table Cell & Row Action Buttons ---------- */
.post-cell {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  min-width: 240px;
  max-width: 390px;
}

.post-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  border: 1px solid var(--border);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--surface-subtle);
}

.post-body-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.post-excerpt {
  font-size: 13px;
  line-height: 1.4;
  font-weight: 500;
  color: var(--foreground);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.post-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.post-type-chip {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: 9999px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--body);
}

.action-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.btn-row-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 10px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--body);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

.btn-row-action:hover {
  background: var(--surface-subtle);
  border-color: #cbd5e1;
  color: var(--foreground);
}

.btn-row-action.primary {
  background: var(--surface-blue-tint);
  border-color: var(--border-blue-tint);
  color: var(--primary);
}

.btn-row-action.primary:hover {
  background: #dbeafe;
}

.btn-row-action.disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.textarea-control {
  min-height: 112px;
  padding: 10px 12px;
  resize: vertical;
  line-height: 1.45;
  font-family: inherit;
}

/* ---------- Standard Filter Toolbar & Multiselect Filter Modal ---------- */
.standard-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-controls-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1 1 auto;
  min-width: 0;
}

.filter-controls-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .filter-controls-right {
    width: 100%;
  }
}

.filter-trigger-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--foreground);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: var(--shadow-card);
  transition: background-color 140ms ease, border-color 140ms ease;
}

.filter-trigger-btn:hover {
  background: var(--surface-subtle);
}

.filter-trigger-btn.has-filters {
  border-color: var(--border-blue-tint);
  background: var(--surface-blue-tint);
  color: var(--primary);
}

.filter-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 9999px;
  background: var(--primary);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
}

.active-filter-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.active-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 10px;
  border-radius: 9999px;
  border: 1px solid var(--border-blue-tint);
  background: var(--surface-blue-tint);
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.active-chip:hover {
  background: #dbeafe;
}

.filter-modal-section {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.filter-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.filter-section-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--foreground);
}

.filter-clear-link {
  border: none;
  background: transparent;
  padding: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
}

.filter-options-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-check-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--body);
  cursor: pointer;
  user-select: none;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

.filter-check-pill:hover {
  background: var(--surface-subtle);
}

.filter-check-pill input[type="checkbox"] {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: var(--primary);
  cursor: pointer;
}

.filter-check-pill.checked {
  border-color: var(--primary);
  background: var(--surface-blue-tint);
  color: var(--primary);
  font-weight: 600;
}

.filter-check-count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted-text);
}

.filter-check-pill.checked .filter-check-count {
  color: var(--primary);
}

/* ---------- Row Action Dropdown Menu ---------- */
.col-actions {
  width: 60px;
  text-align: right;
}

.action-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--body);
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

.action-dropdown-trigger:hover,
.action-dropdown-trigger[aria-expanded="true"] {
  background: var(--surface-subtle);
  border-color: #cbd5e1;
  color: var(--foreground);
}

.action-dropdown-menu {
  position: fixed;
  z-index: 65;
  min-width: 158px;
  padding: 6px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14), 0 2px 6px rgba(15, 23, 42, 0.06);
  display: none;
  flex-direction: column;
  gap: 2px;
}

.action-dropdown-menu.open {
  display: flex;
}

.action-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 7px;
  border: none;
  background: transparent;
  color: var(--foreground);
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 120ms ease, color 120ms ease;
}

.action-dropdown-item:hover {
  background: var(--surface-subtle);
}

.action-dropdown-item.primary {
  color: var(--primary);
  font-weight: 600;
}

.action-dropdown-item.primary:hover {
  background: var(--surface-blue-tint);
}

.action-dropdown-item.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ---------- Sidebar Workspace Switcher & Floating Popover (Ref Screenshot Style) ---------- */
.workspace-switcher-wrap {
  position: relative;
  padding: 14px 12px 10px;
  border-bottom: 1px solid var(--border);
}

.workspace-switcher-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid var(--border-blue-tint);
  background: var(--surface-blue-tint);
  color: var(--foreground);
  text-align: left;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease;
}

.workspace-switcher-btn:hover {
  background: #dbeafe;
}

.workspace-switcher-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
  color: #ffffff;
  font-weight: 800;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.workspace-switcher-meta {
  flex: 1;
  min-width: 0;
}

.workspace-switcher-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--foreground);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.workspace-switcher-sub {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted-text);
  margin-top: 1px;
}

.workspace-popover {
  position: fixed;
  z-index: 68;
  width: 268px;
  padding: 8px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.14), 0 2px 8px rgba(15, 23, 42, 0.06);
  display: none;
  flex-direction: column;
  gap: 2px;
}

.workspace-popover.open {
  display: flex;
}

.workspace-popover-head {
  padding: 6px 10px 4px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted-text);
}

.workspace-popover-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 240px;
  overflow-y: auto;
}

.workspace-popover-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 9px;
  border: none;
  background: transparent;
  color: var(--foreground);
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background-color 120ms ease;
}

.workspace-popover-item:hover {
  background: var(--surface-subtle);
}

.workspace-popover-initial {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--surface-muted);
  color: var(--body);
  font-size: 12.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.workspace-popover-item.active .workspace-popover-initial {
  background: var(--surface-blue-tint);
  color: var(--primary);
}

.workspace-popover-active-tag {
  margin-left: auto;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--primary);
}

.workspace-popover-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 6px 4px;
}

.workspace-popover-action {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 9px;
  border: none;
  background: transparent;
  color: var(--body);
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 120ms ease, color 120ms ease;
}

.workspace-popover-action:hover {
  background: var(--surface-subtle);
  color: var(--foreground);
}

/* ---------- Workspace Cards & Linked Accounts Grid ---------- */
.workspace-cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 900px) {
  .workspace-cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.workspace-card {
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.workspace-card.is-active {
  border-color: var(--border-blue-tint);
  box-shadow: 0 2px 10px rgba(29, 78, 216, 0.08);
}

.workspace-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--surface-subtle);
}

.workspace-card-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.workspace-card-body {
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.workspace-linked-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface);
}

.workspace-linked-empty {
  padding: 18px 12px;
  border-radius: 9px;
  border: 1px dashed var(--border);
  text-align: center;
  font-size: 12.5px;
  color: var(--muted-text);
}

/* ---------- Clean Workspace Table Layout (Matches Reference Screenshot) ---------- */
.ws-clean-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  min-width: 640px;
}

.ws-clean-table thead tr {
  border-bottom: 1px solid var(--border);
}

.ws-clean-table th {
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted-text);
  white-space: nowrap;
}

.ws-clean-table tbody tr {
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color 120ms ease;
}

.ws-clean-table tbody tr:hover {
  background: var(--surface-subtle);
}

.ws-clean-table td {
  padding: 14px 14px;
  vertical-align: middle;
}

.ws-row-identity {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ws-row-initial {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--surface-blue-tint);
  color: var(--primary);
  font-size: 13.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ws-row-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--foreground);
}

.ws-pill-default {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 9999px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--body);
}

.ws-pill-active {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  border-radius: 9999px;
  background: var(--success-bg);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--success-text);
}

.ws-avatar-stack {
  display: inline-flex;
  align-items: center;
}

.ws-avatar-stack-item {
  width: 30px;
  height: 30px;
  border-radius: 9999px;
  border: 2px solid #ffffff;
  overflow: hidden;
  background: var(--surface-muted);
  margin-left: -8px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
}

.ws-avatar-stack-item:first-child {
  margin-left: 0;
}

.ws-avatar-stack-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ws-avatar-more {
  width: 30px;
  height: 30px;
  border-radius: 9999px;
  border: 2px solid #ffffff;
  background: var(--surface-muted);
  color: var(--body);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: -8px;
}

.ws-row-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.ws-dots-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted-text);
  cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease;
}

.ws-dots-btn:hover,
.ws-dots-btn[aria-expanded="true"] {
  background: var(--surface-muted);
  color: var(--foreground);
}

/* ---------- Create Post Modal & Target Picker ---------- */
.segmented-track {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 8px;
  background: var(--surface-blue-tint);
  width: 100%;
}

.segmented-btn {
  flex: 1;
  height: 32px;
  border: none;
  border-radius: 5px;
  background: transparent;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--body);
  cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease;
}

.segmented-btn.active {
  background: #ffffff;
  color: var(--primary);
  box-shadow: var(--shadow-card);
}

.target-accounts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 8px;
  max-height: 185px;
  overflow-y: auto;
  padding: 2px;
}

.target-account-pill {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  user-select: none;
  transition: background-color 140ms ease, border-color 140ms ease;
}

.target-account-pill:hover {
  background: var(--surface-subtle);
}

.target-account-pill.checked {
  border-color: var(--primary);
  background: var(--surface-blue-tint);
}

.target-account-pill input[type="checkbox"] {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: var(--primary);
  flex-shrink: 0;
}

.media-upload-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.media-chips-list {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.media-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 9999px;
  border: 1px solid var(--border-blue-tint);
  background: var(--surface-blue-tint);
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
}

.media-chip button {
  border: none;
  background: transparent;
  color: var(--primary);
  cursor: pointer;
  padding: 0;
  font-size: 14px;
  line-height: 1;
}

.form-error-box {
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 12.5px;
  line-height: 1.4;
}

/* ---------- Dedicated /posts/create Composer Page (Split Editor + Pratinjau) ---------- */
.composer-shell-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.05);
  display: flex;
  flex-direction: column;
  overflow: visible;
  margin-bottom: 64px;
}

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

.composer-shell-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--foreground);
}

.composer-close-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-text);
  transition: background 0.15s ease, color 0.15s ease;
}

.composer-close-btn:hover {
  background: var(--surface-subtle);
  color: var(--foreground);
}

.composer-split-body {
  display: grid;
  grid-template-columns: 1fr;
}

@media (min-width: 1024px) {
  .composer-split-body {
    grid-template-columns: minmax(0, 1.42fr) minmax(320px, 0.92fr);
  }
}

.composer-editor-pane {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  border-bottom: 1px solid var(--border-subtle);
}

@media (min-width: 1024px) {
  .composer-editor-pane {
    border-bottom: 0;
    border-right: 1px solid var(--border-subtle);
  }
}

/* Circular Account Avatar Bar */
.composer-avatar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.composer-avatar-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.composer-avatar-pill {
  position: relative;
  width: 40px;
  height: 40px;
  padding: 2px;
  border-radius: 9999px;
  border: 2px solid transparent;
  background: #ffffff;
  cursor: pointer;
  opacity: 0.45;
  transition: opacity 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.composer-avatar-pill:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

.composer-avatar-pill.selected {
  opacity: 1;
  border-color: #111827;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12);
}

.composer-avatar-pill .akun-avatar-wrap {
  width: 100%;
  height: 100%;
}

.composer-avatar-pill .akun-avatar {
  width: 100%;
  height: 100%;
}

.composer-avatar-pill .avatar-platform-badge {
  width: 16px;
  height: 16px;
  right: -2px;
  bottom: -2px;
  border-width: 2px;
}

.composer-picker-anchor {
  position: relative;
}

.composer-add-account-btn {
  width: 34px;
  height: 34px;
  border-radius: 9999px;
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--muted-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.composer-add-account-btn:hover {
  border-color: var(--foreground);
  color: var(--foreground);
  background: var(--surface-subtle);
}

.composer-avatar-hint {
  font-size: 11.5px;
  color: var(--muted-text);
}

.composer-account-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 50;
  width: 290px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
  overflow: hidden;
}

.composer-popover-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 12px;
  font-weight: 700;
  color: var(--foreground);
}

.composer-account-popover-list {
  max-height: 240px;
  overflow-y: auto;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.composer-popover-account-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 8px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12.5px;
  transition: background 0.12s ease;
}

.composer-popover-account-item:hover {
  background: var(--surface-subtle);
}

.composer-popover-account-item input[type="checkbox"] {
  accent-color: var(--primary);
  width: 15px;
  height: 15px;
}

.composer-popover-foot {
  padding: 8px 12px;
  border-top: 1px solid var(--border-subtle);
  background: var(--surface-subtle);
}

.composer-manage-accounts-link {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
}

.composer-manage-accounts-link:hover {
  text-decoration: underline;
}

/* Unified Editor Box */
.composer-editor-box {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  min-height: 410px;
}

.composer-tabs-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 12px;
  border-bottom: 1px solid var(--border-subtle);
  min-height: 44px;
}

.composer-tabs-scroll {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1;
  min-width: 0;
}

.composer-tabs-scroll::-webkit-scrollbar {
  display: none;
}

.composer-tab-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 44px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted-text);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: color 0.15s ease;
}

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

.composer-tab-btn.active {
  color: var(--foreground);
  font-weight: 600;
}

.composer-tab-btn.active::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: #111827;
}

.composer-tab-icon {
  width: 15px;
  height: 15px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  flex-shrink: 0;
}

.composer-tab-icon svg {
  width: 9px;
  height: 9px;
}

.composer-tab-dot {
  width: 6px;
  height: 6px;
  border-radius: 9999px;
  background: #ef4444;
  flex-shrink: 0;
}

/* Konten Sendiri Switch */
.composer-custom-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted-text);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  user-select: none;
}

.composer-custom-toggle[hidden] {
  display: none;
}

.switch-control {
  position: relative;
  display: inline-block;
  width: 32px;
  height: 18px;
}

.switch-control input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.switch-slider {
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  background: #e2e8f0;
  transition: background 0.18s ease;
}

.switch-slider::before {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  left: 2px;
  top: 2px;
  border-radius: 9999px;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.25);
  transition: transform 0.18s ease;
}

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

.switch-control input:checked + .switch-slider::before {
  transform: translateX(14px);
}

/* Main Textarea inside Unified Box */
.composer-textarea-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 12px 16px 8px;
}

.composer-textarea {
  width: 100%;
  flex: 1;
  min-height: 220px;
  border: 0;
  outline: 0;
  resize: none;
  background: transparent;
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--foreground);
}

.composer-textarea::placeholder {
  color: #94a3b8;
}

.composer-textarea.is-inherited {
  color: var(--muted-text);
  cursor: pointer;
}

/* Attached Media Strip */
.composer-media-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 6px 16px 10px;
}

.composer-media-strip[hidden] {
  display: none;
}

.composer-media-thumb {
  position: relative;
  width: 60px;
  height: 60px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.composer-media-thumb img,
.composer-media-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.composer-media-thumb-kind {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--muted-text);
  padding: 2px 5px;
}

.composer-media-remove {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 18px;
  height: 18px;
  border-radius: 9999px;
  border: 0;
  background: rgba(15, 23, 42, 0.72);
  color: #ffffff;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.composer-url-drawer {
  margin: 0 14px 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-subtle);
}

/* Option Pill Popover inside Editor Box */
.composer-option-popover {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 54px;
  z-index: 40;
  max-width: 420px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.14);
  padding: 14px;
}

.composer-option-popover[hidden] {
  display: none;
}

.composer-option-popover-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--foreground);
}

.composer-option-popover-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Bottom Editor Toolbar */
.composer-box-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  border-top: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}

.composer-toolbar-left {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
}

.composer-tool-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  border: 0;
  background: transparent;
  color: var(--muted-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.composer-tool-icon:hover {
  background: var(--surface-subtle);
  color: var(--foreground);
}

.composer-toolbar-sep {
  width: 1px;
  height: 18px;
  background: var(--border);
  margin: 0 2px;
}

.composer-toolbar-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.composer-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 10px;
  border-radius: 9999px;
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--body);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.composer-pill-btn:hover {
  border-color: #cbd5e1;
  background: var(--surface-subtle);
  color: var(--foreground);
}

.composer-pill-btn.active {
  border-color: #99f6e4;
  background: #f0fdfa;
  color: #0f766e;
  font-weight: 600;
}

.composer-pill-btn.is-open {
  border-color: #0f172a;
  color: #0f172a;
}

.composer-pill-btn.needs-input {
  border-color: #fca5a5;
  background: #fef2f2;
  color: #b91c1c;
}

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

.composer-char-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.composer-char-text {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted-text);
}

.composer-char-text.over {
  color: #dc2626;
  font-weight: 700;
}

/* Under-box Legal & Rule Validation Chips */
.composer-left-notices {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.composer-legal-note {
  font-size: 11.5px;
  color: var(--muted-text);
}

.composer-validation-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.composer-val-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 7px;
  font-size: 11.5px;
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #b91c1c;
  cursor: pointer;
}

.composer-val-chip.ok {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
  cursor: default;
}

/* Right Preview Pane */
.composer-preview-pane {
  padding: 16px 20px;
  background: #fafafa;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 600px;
  overflow-y: auto;
}

.composer-preview-heading {
  font-size: 13px;
  font-weight: 700;
  color: var(--foreground);
}

.composer-preview-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.composer-preview-empty {
  padding: 28px 16px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  background: #ffffff;
  font-size: 12.5px;
  color: var(--muted-text);
  text-align: center;
  line-height: 1.5;
}

.preview-platform-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.preview-platform-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--foreground);
}

.preview-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
}

.preview-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  gap: 8px;
}

.preview-card-user {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.preview-card-avatar {
  width: 28px;
  height: 28px;
  border-radius: 9999px;
  object-fit: cover;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.preview-card-username {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--foreground);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preview-card-sub {
  font-size: 11px;
  color: var(--muted-text);
  font-weight: 400;
  margin-left: 4px;
}

.preview-ig-media {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px;
  overflow: hidden;
  position: relative;
}

.preview-ig-media.is-story {
  aspect-ratio: 9 / 12;
}

.preview-ig-media img,
.preview-ig-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.preview-ig-placeholder {
  font-size: 12px;
  color: #9ca3af;
  line-height: 1.4;
}

.preview-ig-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px 4px;
  color: var(--foreground);
}

.preview-ig-actions-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.preview-card-caption {
  padding: 2px 12px 12px;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--foreground);
  word-break: break-word;
}

.preview-card-caption .muted-ph {
  color: #9ca3af;
}

.preview-feed-body {
  padding: 0 12px 10px 48px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.preview-feed-media {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #f3f4f6;
  max-height: 180px;
}

.preview-feed-media img,
.preview-feed-media video {
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  display: block;
}

.preview-mini-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted-text);
  padding-top: 2px;
}

.preview-meta-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 0 12px 10px;
}

.preview-meta-tag {
  font-size: 10.5px;
  padding: 2px 7px;
  border-radius: 9999px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  color: var(--body);
}

/* Global Bottom Footer */
.composer-shell-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  border-top: 1px solid var(--border-subtle);
  background: #ffffff;
  border-radius: 0 0 16px 16px;
  flex-wrap: wrap;
}

.composer-footer-left {
  flex: 1;
  min-width: 200px;
}

.composer-footer-summary {
  font-size: 12px;
  color: var(--muted-text);
}

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

.composer-schedule-anchor {
  position: relative;
}

.composer-schedule-btn {
  height: 36px;
  padding: 0 14px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 9px;
}

.composer-schedule-popover {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  z-index: 60;
  width: 260px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.16);
  padding: 14px;
}

.composer-schedule-popover[hidden] {
  display: none;
}

.composer-submit-btn {
  height: 36px;
  padding: 0 16px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 9px;
  background: #00795E;
  border-color: #00795E;
}

.composer-submit-btn:hover {
  background: #06614d;
  border-color: #06614d;
}

.option-check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--body);
  cursor: pointer;
}

.option-check-row input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--primary);
}

.connected-date {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--foreground);
  white-space: nowrap;
}

.connected-ago {
  font-size: 11.5px;
  color: var(--muted-text);
  margin-top: 2px;
}

.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 18px;
  border-top: 1px solid var(--border);
  background: var(--surface-subtle);
  font-size: 12px;
  color: var(--muted-text);
  flex-wrap: wrap;
}

.empty-state {
  padding: 44px 20px;
  text-align: center;
  color: var(--muted-text);
}

.empty-state strong {
  display: block;
  font-size: 15px;
  color: var(--foreground);
  margin-bottom: 4px;
}

/* ---------- Mobile Floating Bottom Tabbar (< 1280px) ---------- */
.tb-wrapper {
  pointer-events: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  padding: 6px 14px max(18px, calc(env(safe-area-inset-bottom) + 4px));
}

@media (min-width: 1280px) {
  .tb-wrapper {
    display: none;
  }
}

.tb {
  pointer-events: auto;
  margin: 0 auto;
  display: flex;
  align-items: center;
  height: 62px;
  max-width: 560px;
  padding: 5px;
  border-radius: 31px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: var(--shadow-tabbar);
}

.tb-tab {
  flex: 1;
  height: 100%;
  border-radius: 9999px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--muted-text);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
}

.tb-tab svg {
  width: 20px;
  height: 20px;
}

.tb-tab.active {
  background: var(--surface-blue-tint);
  color: var(--primary);
  font-weight: 600;
}

/* ---------- Floating AI Button ---------- */
.fab-ai {
  position: fixed;
  right: 16px;
  bottom: 90px;
  z-index: 45;
  width: 48px;
  height: 48px;
  border-radius: 9999px;
  border: none;
  background: var(--ai-gradient);
  color: #ffffff;
  box-shadow: var(--ai-shadow);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 150ms ease, filter 150ms ease;
}

@media (min-width: 1280px) {
  .fab-ai {
    width: 46px;
    height: 46px;
    bottom: 20px;
    right: 20px;
  }
}

.fab-ai:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
}

.fab-ai svg {
  width: 20px;
  height: 20px;
}

/* ---------- Modal & Toast ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

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

.modal-card {
  width: 100%;
  max-width: 440px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.18);
  overflow: hidden;
}

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

.modal-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.modal-body {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-group label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--body);
}

.field-control {
  height: 38px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 13.5px;
  color: var(--foreground);
  outline: none;
}

.field-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(147, 197, 253, 0.35);
}

.modal-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: var(--surface-subtle);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 96px;
  transform: translateX(-50%) translateY(16px);
  z-index: 70;
  background: #0f172a;
  color: #ffffff;
  padding: 10px 16px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

@media (min-width: 1280px) {
  .toast {
    bottom: 28px;
  }
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------- Dedicated /posts/bulk AI Generator & Scheduler ---------- */
.bulk-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 64px;
}

.btn-primary:disabled,
.btn-secondary:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.bulk-section {
  padding: 18px 20px;
}

.bulk-step-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.bulk-two-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 900px) {
  .bulk-two-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.bulk-platform-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bulk-platform-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 9999px;
  border: 1px solid var(--border);
  background: #ffffff;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--body);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.bulk-platform-chip:hover {
  background: var(--surface-subtle);
}

.bulk-platform-chip.active {
  border-color: var(--primary);
  background: #ecfdf5;
  color: #065f46;
  font-weight: 600;
}

.bulk-distribution-bar {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  flex-wrap: wrap;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
}

.bulk-dist-summary {
  flex: 1.2;
  min-width: 240px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--body);
  padding: 7px 10px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid var(--border);
}

.bulk-mapping-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 10px;
}

.bulk-mapping-item {
  padding: 10px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.bulk-token-hint {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-size: 12px;
  color: var(--muted-text);
}

.bulk-token-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 6px;
  background: #f1f5f9;
  border: 1px solid var(--border);
  color: var(--foreground);
}

.bulk-sample-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.bulk-sample-table th,
.bulk-sample-table td {
  padding: 7px 10px;
  border-bottom: 1px solid var(--border-subtle);
  text-align: left;
  white-space: nowrap;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bulk-sample-table th {
  background: var(--surface-subtle);
  font-weight: 700;
  color: var(--foreground);
}

.bulk-ref-thumb {
  width: 110px;
  height: 110px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
  display: block;
}

.bulk-mode-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bulk-mode-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #ffffff;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.bulk-mode-card.active {
  border-color: var(--primary);
  background: #f0fdf4;
}

.bulk-mode-card input[type="radio"] {
  margin-top: 3px;
  accent-color: var(--primary);
}

.bulk-mode-card strong {
  display: block;
  font-size: 12.5px;
  color: var(--foreground);
}

.bulk-mode-card span {
  display: block;
  font-size: 11.5px;
  color: var(--muted-text);
  margin-top: 2px;
  line-height: 1.4;
}

.bulk-option-b-box {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px dashed #6ee7b7;
  background: #f0fdf4;
}

.bulk-progress-bar-wrap {
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--surface-subtle);
}

.bulk-progress-track {
  height: 7px;
  border-radius: 9999px;
  background: #e2e8f0;
  overflow: hidden;
}

.bulk-progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 9999px;
  transition: width 0.25s ease;
}

.bulk-preview-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.bulk-detail-row {
  background: #fafafa;
}

.bulk-detail-card {
  padding: 14px 18px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 820px) {
  .bulk-detail-card {
    grid-template-columns: 220px minmax(0, 1fr);
  }
}

.bulk-detail-full-img {
  width: 100%;
  max-width: 220px;
  border-radius: 10px;
  border: 1px solid var(--border);
  display: block;
}

.bulk-subcard {
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
}

.bulk-excel-sheet-wrap {
  overflow-x: auto;
  max-height: 290px;
  overflow-y: auto;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
}

.bulk-excel-grid {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  min-width: 720px;
  font-size: 12px;
}

.bulk-excel-grid thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f1f5f9;
  border-right: 1px solid #cbd5e1;
  border-bottom: 1px solid #cbd5e1;
  padding: 4px 5px;
  text-align: left;
  vertical-align: top;
}

.bulk-excel-grid thead th:last-child,
.bulk-excel-grid tbody td:last-child {
  border-right: 0;
}

.bulk-excel-grid tbody td {
  border-right: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  padding: 0;
  height: 27px;
  background: #ffffff;
}

.bulk-excel-grid tbody tr:last-child td {
  border-bottom: 0;
}

.bulk-excel-row-num {
  width: 34px;
  background: #f8fafc !important;
  color: var(--muted-text);
  font-family: var(--font-mono);
  font-size: 11px;
  text-align: center;
  user-select: none;
}

.bulk-excel-col-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3px;
  margin-bottom: 3px;
}

.bulk-excel-col-letter {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  color: #334155;
}

.bulk-excel-col-count {
  font-family: var(--font-mono);
  font-size: 10px;
  color: #64748b;
}

.bulk-col-actions-mini {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.bulk-col-import-btn {
  height: 19px;
  padding: 0 5px;
  border-radius: 4px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  line-height: 1;
}

.bulk-col-import-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: #ecfdf5;
}

.bulk-col-token-input {
  height: 23px;
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #ffffff;
  font-size: 11px;
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--foreground);
  padding: 0 5px;
  outline: none;
}

.bulk-col-token-input:focus {
  border-color: var(--primary);
}

.bulk-cell-input {
  width: 100%;
  height: 27px;
  border: 0;
  outline: none;
  border-radius: 0;
  background: transparent;
  font-family: inherit;
  font-size: 12px;
  color: var(--foreground);
  padding: 0 6px;
  display: block;
}

.bulk-cell-input:focus {
  background: #f0fdf4;
  box-shadow: inset 0 0 0 1.5px var(--primary);
}

.bulk-cell-input::placeholder {
  color: #cbd5e1;
}

.bulk-mini-del {
  border: 0;
  background: transparent;
  color: #94a3b8;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.bulk-mini-del:hover {
  background: #fee2e2;
  color: #b91c1c;
}

.bulk-col-import-popover {
  position: absolute;
  top: 44px;
  left: 12px;
  z-index: 45;
  width: min(410px, calc(100% - 24px));
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.16);
  padding: 12px 14px;
}

.bulk-col-import-popover[hidden] {
  display: none;
}

.bulk-template-editor-box {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
  overflow: hidden;
}

.bulk-template-editor-box textarea[readonly] {
  background: #f8fafc;
  color: var(--muted-text);
}

.bulk-tpl-fields-body {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bulk-field-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.bulk-field-head label {
  font-size: 12px;
  font-weight: 600;
  color: var(--foreground);
}

.bulk-field-meta {
  font-size: 11px;
  color: var(--muted-text);
  white-space: nowrap;
}

.bulk-compact-ta {
  min-height: 54px !important;
  height: 54px;
  padding: 7px 10px !important;
  font-size: 12.5px !important;
  line-height: 1.45 !important;
  resize: vertical;
}

.bulk-spin-sample-box {
  padding: 9px 12px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  font-size: 12px;
  line-height: 1.45;
  color: var(--body);
}

.bulk-estimator-box {
  margin-top: 0;
  padding: 0;
  border-top: 1px solid var(--border);
  background: #fafafa;
  display: grid;
  grid-template-columns: 1fr;
}

@media (min-width: 720px) {
  .bulk-estimator-box {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.bulk-est-stat {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-subtle);
  background: transparent;
}

@media (min-width: 720px) {
  .bulk-est-stat {
    border-right: 1px solid var(--border-subtle);
  }
  .bulk-est-stat:nth-child(3) {
    border-right: 0;
  }
}

.bulk-est-stat.highlight {
  background: #f0fdf4;
}

.bulk-est-label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted-text);
}

.bulk-est-val {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--foreground);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bulk-est-stat.highlight .bulk-est-val {
  color: #047857;
}

.bulk-est-note {
  grid-column: 1 / -1;
  padding: 8px 14px;
  font-size: 11.5px;
  color: var(--muted-text);
  background: #ffffff;
}

.bulk-platform-limit-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 14px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}

.bulk-limit-info {
  font-size: 11.5px;
  color: var(--body);
  font-weight: 500;
}

.bulk-variants-3col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: start;
}

@media (min-width: 960px) {
  .bulk-variants-3col {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr) minmax(0, 0.95fr);
  }
}

.bulk-variant-col {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fafafa;
  overflow: hidden;
}

.bulk-variant-col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-subtle);
  background: #f1f5f9;
}

.bulk-variant-col-head strong {
  display: block;
  font-size: 12px;
  color: var(--foreground);
}

.bulk-add-var-btn {
  height: 24px;
  padding: 0 9px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: var(--foreground);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.bulk-add-var-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: #ecfdf5;
}

.bulk-variant-list {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bulk-variant-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bulk-variant-item[data-readonly="true"] {
  background: #f8fafc;
}

.bulk-variant-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.bulk-variant-idx {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--muted-text);
}

.bulk-var-count-badge {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--muted-text);
}

.bulk-var-count-badge.over {
  color: #dc2626;
  font-weight: 700;
}

.bulk-variant-input {
  width: 100%;
  border: 0;
  outline: 0;
  resize: vertical;
  background: transparent;
  font-family: inherit;
  font-size: 12px;
  line-height: 1.45;
  color: var(--foreground);
  min-height: 44px;
}

.bulk-variant-input[readonly] {
  color: var(--muted-text);
  cursor: default;
}

/* Drag-and-drop large left image preview (Section 3) */
.bulk-img-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: stretch;
}

@media (min-width: 900px) {
  .bulk-img-split {
    grid-template-columns: minmax(280px, 0.92fr) minmax(0, 1.25fr);
  }
}

.bulk-dropzone-panel {
  display: flex;
  flex-direction: column;
}

.bulk-dropzone {
  position: relative;
  flex: 1;
  min-height: 300px;
  border: 2px dashed #cbd5e1;
  border-radius: 14px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.bulk-dropzone:hover,
.bulk-dropzone.is-dragover {
  border-color: var(--primary);
  background: #ecfdf5;
}

.bulk-dropzone.has-file {
  border-style: solid;
  border-color: var(--border);
  background: #ffffff;
  cursor: default;
}

.bulk-dropzone-empty {
  padding: 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--muted-text);
}

.bulk-dropzone-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  margin-bottom: 4px;
}

.bulk-dropzone-empty strong {
  font-size: 13.5px;
  color: var(--foreground);
}

.bulk-dropzone-empty span {
  font-size: 11.5px;
}

.bulk-dropzone-preview {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.bulk-dropzone-preview[hidden] {
  display: none;
}

.bulk-dropzone-preview img {
  width: 100%;
  max-height: 290px;
  flex: 1;
  object-fit: contain;
  background: #f8fafc;
  display: block;
}

.bulk-dropzone-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  border-top: 1px solid var(--border);
  background: #ffffff;
}

/* ---------- Bulk Post 3/9 Column Step-by-Step Wizard Layout ---------- */
.bulk-wizard-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
  padding-bottom: 64px;
}

.bulk-wizard-nav-col {
  min-width: 0;
}

.bulk-wizard-content-col {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

@media (min-width: 1024px) {
  .bulk-wizard-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 18px;
  }
  .bulk-wizard-nav-col {
    grid-column: span 3 / span 3;
    position: sticky;
    top: 14px;
    z-index: 15;
  }
  .bulk-wizard-content-col {
    grid-column: span 9 / span 9;
  }
}

.bulk-wizard-hud {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #ffffff;
}

.bulk-hud-section-title {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.45px;
  color: var(--muted-text);
}

.bulk-hud-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 2px 0;
}

.bulk-stepper-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 6px;
}

@media (min-width: 1024px) {
  .bulk-stepper-row {
    display: flex;
    flex-direction: column;
  }
}

.bulk-step-tab {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: #f8fafc;
  color: var(--body);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  min-width: 0;
  width: 100%;
}

.bulk-step-tab:hover {
  border-color: #94a3b8;
  background: #ffffff;
}

.bulk-step-tab.is-active {
  border-color: var(--primary);
  background: #ecfdf5;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.12);
}

.bulk-step-num {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
  font-size: 11.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.bulk-step-tab.is-active .bulk-step-num {
  background: var(--primary);
  color: #ffffff;
}

.bulk-step-tab.is-ready:not(.is-active) .bulk-step-num {
  background: #d1fae5;
  color: #065f46;
}

.bulk-step-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.bulk-step-text strong {
  font-size: 12px;
  font-weight: 600;
  color: var(--foreground);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bulk-step-text small {
  font-size: 10.5px;
  color: var(--muted-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bulk-hud-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

@media (min-width: 1024px) {
  .bulk-hud-metrics {
    display: flex;
    flex-direction: column;
  }
}

.bulk-hud-chip {
  padding: 7px 10px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  min-width: 0;
}

.bulk-hud-chip.is-highlight {
  background: #ecfdf5;
  border-color: #a7f3d0;
}

.bulk-hud-label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.35px;
  color: var(--muted-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bulk-hud-value {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--foreground);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bulk-hud-chip.is-highlight .bulk-hud-value {
  color: #047857;
}

.bulk-wizard-footer {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.bulk-wizard-footer-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* ---------- Gallery Page ---------- */
.gallery-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (min-width: 900px) {
  .gallery-stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.gallery-stat-card {
  padding: 12px 16px;
}

.gallery-stat-card.is-emerald {
  background: #ecfdf5;
  border-color: #a7f3d0;
}

.gallery-stat-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted-text);
  text-transform: uppercase;
  letter-spacing: 0.35px;
}

.gallery-stat-value {
  display: block;
  font-size: 20px;
  font-weight: 700;
  color: var(--foreground);
  margin-top: 2px;
}

.gallery-stat-card.is-emerald .gallery-stat-value {
  color: #047857;
}

.gallery-filter-bar {
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 14px;
}

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

@media (min-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1360px) {
  .gallery-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.gallery-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.gallery-thumb-wrap {
  position: relative;
  height: 190px;
  background: #f1f5f9;
  border-bottom: 1px solid var(--border-subtle);
}

.gallery-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-thumb-badges {
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.gallery-card-body {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.gallery-filename {
  font-size: 12px;
  font-weight: 700;
  color: var(--foreground);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gallery-meta-line {
  font-size: 11px;
  color: var(--muted-text);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gallery-usage-box {
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 8px 10px;
  flex: 1;
}

.gallery-usage-title {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.35px;
  color: var(--muted-text);
  margin-bottom: 5px;
}

.gallery-usage-empty {
  margin: 0;
  font-size: 11.5px;
  color: var(--muted-text);
}

.gallery-usage-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.gallery-usage-item {
  font-size: 11.5px;
  line-height: 1.35;
  padding-bottom: 5px;
  border-bottom: 1px dashed var(--border-subtle);
}

.gallery-usage-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.gallery-usage-target {
  display: block;
  color: var(--foreground);
}

.gallery-usage-sub {
  display: block;
  font-size: 10.5px;
  color: var(--muted-text);
}

.gallery-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 6px;
  border-top: 1px solid var(--border-subtle);
}
