/* ================================================================
   Links Manager v2 — Custom Styles
   Primary:  #00a651 (brand green)
   Dark:     #202020
   ================================================================ */

/* @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap'); */
@font-face {
  font-family: "almarai";
  src: url("../fonts/Almarai-Regular.ttf") format("trueType"),
    url("../fonts/Almarai-Bold.ttf") format("trueType");
}

/* ── CSS Variables ───────────────────────────────────────────── */
:root {
  --brand: #00a651;
  --brand-dark: #007d3d;
  --brand-glow: rgba(0, 166, 81, 0.25);
  --bg-deep: #141414;
  --bg-surface: #202020;
  --bg-card: rgba(30, 30, 30, 0.9);
  --bg-card-hover: rgba(38, 38, 38, 0.98);
  --border-color: rgba(255, 255, 255, 0.07);
  --glass-blur: blur(14px);
  --radius-lg: 1rem;
  --radius-md: 0.75rem;
  --radius-sm: 0.5rem;
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.5);
  --shadow-hover: 0 12px 48px rgba(0, 0, 0, 0.7);
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Base ────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'almarai', system-ui, sans-serif;
  background: var(--bg-deep);
  /* background-image:
    radial-gradient(ellipse at 15% 15%, rgba(0,166,81,0.05) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 85%, rgba(0,166,81,0.03) 0%, transparent 55%); */
  background-image: url("../images/background.png");
  background-size: cover;
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 100vh;
  color: #e2e8f0;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
}

/* ── Scrollbar ───────────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: var(--bg-deep);
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 166, 81, 0.3);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 166, 81, 0.6);
}

/* ── Navbar ──────────────────────────────────────────────────── */
#mainNav {
  background: rgba(20, 20, 20, 0.92) !important;
  backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
}

.brand-icon {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  font-size: 0.9rem;
  color: #fff;
  box-shadow: 0 2px 12px var(--brand-glow);
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.75rem !important;
  transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
  background: rgba(0, 166, 81, 0.1);
  color: var(--brand) !important;
}

.badge-admin {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
  font-size: 0.62rem;
  padding: 0.2em 0.55em;
  border-radius: 999px;
}

.badge-user {
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  font-size: 0.62rem;
  padding: 0.2em 0.55em;
  border-radius: 999px;
}

/* ── Notification bell ───────────────────────────────────────── */
.notif-bell-wrap {
  position: relative;
}

.notif-bell-btn {
  color: #94a3b8 !important;
  text-decoration: none;
}

.notif-bell-btn:hover {
  color: var(--brand) !important;
}

.notif-badge {
  position: absolute;
  top: -2px;
  right: -4px;
  background: #ef4444;
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  animation: notifPulse 2s ease-in-out infinite;
}

@keyframes notifPulse {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5);
  }

  50% {
    box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
  }
}

.notif-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: 340px;
  max-height: 440px;
  background: var(--bg-surface) !important;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
  z-index: 1050;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.notif-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}

#notifList {
  overflow-y: auto;
  flex: 1;
}

.notif-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  color: inherit;
}

.notif-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.notif-item.unread {
  background: rgba(0, 166, 81, 0.06);
}

.notif-item.unread:hover {
  background: rgba(0, 166, 81, 0.1);
}

.notif-img {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  object-fit: contain;
  flex-shrink: 0;
}

.notif-icon-box {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 0.9rem;
  color: #fff;
}

.notif-content {
  flex: 1;
  min-width: 0;
}

.notif-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notif-time {
  font-size: 0.7rem;
  color: #64748b;
}

.notif-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
  flex-shrink: 0;
  margin-top: 6px;
}

/* ── Glass card ──────────────────────────────────────────────── */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
}

/* ── Navbar user dropdown ────────────────────────────────────── */
.dropdown-menu {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.dropdown-item {
  color: #e2e8f0;
  font-size: 0.875rem;
  padding: 0.45rem 1rem;
  transition: var(--transition);
}

.dropdown-item:hover,
.dropdown-item:focus {
  background: rgba(0, 166, 81, 0.1);
  color: #fff;
}

.dropdown-item.text-danger:hover {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
}

.dropdown-divider {
  border-color: var(--border-color);
}

/* ── Stat cards ──────────────────────────────────────────────── */
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1rem;
  text-align: center;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  cursor: default;
}

.stat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--platform-gradient);
  opacity: 0;
  transition: var(--transition);
}

.stat-card:hover::before {
  opacity: 0.12;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--platform-color);
}

.stat-icon {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  background: var(--platform-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-count {
  font-size: 2rem;
  font-weight: 800;
  color: #f1f5f9;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
}

/* ── Platform section header ─────────────────────────────────── */
.platform-section-header {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.875rem 1.25rem;
  position: relative;
  overflow: hidden;
}

.platform-section-header::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--platform-gradient);
}

.platform-header-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  font-size: 1rem;
  color: #fff;
  flex-shrink: 0;
}

/* ── Link cards ──────────────────────────────────────────────── */
.link-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  overflow: hidden;
  min-width: 0;
  cursor: pointer;
}

.link-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.7), 0 0 0 1px var(--platform-color);
  background: var(--bg-card-hover);
}

/* Card media area — shows image/video OR gradient fallback */
.link-card-media {
  position: relative;
  height: 145px;
  overflow: hidden;
  flex-shrink: 0;
}

/* Uploaded media fills the area */
.card-media-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 0;
}

/* Platform icon — centered, shown when no image */
.card-media-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2rem;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
  transition: var(--transition);
  z-index: 1;
}

.link-card:hover .card-media-icon {
  transform: translate(-50%, -50%) scale(1.15);
}

/* Hide the centered icon when media is present */
.link-card-media:has(.card-media-img) .card-media-icon {
  opacity: 0;
  pointer-events: none;
}

.card-media-img~.card-media-icon {
  opacity: 0;
  pointer-events: none;
}

/* Platform badge — bottom of media area, always visible */
.card-platform-badge {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem 0.6rem 0.45rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72) 0%, transparent 100%);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  z-index: 2;
}

.card-platform-badge i {
  font-size: 0.75rem;
}

.link-card-body {
  padding: 0.6rem 0.875rem;
  flex: 1;
}

.link-card-footer {
  padding: 0.5rem 0.625rem;
  border-top: 1px solid var(--border-color);
  flex-wrap: nowrap !important;
  overflow: hidden;
}

/* Favorite (star) button */
.btn-fav {
  border: 1px solid rgba(245, 158, 11, 0.4);
  background: transparent;
  color: rgba(245, 158, 11, 0.7);
  border-radius: var(--radius-sm);
  padding: 0.2rem 0.45rem;
  font-size: 0.75rem;
  line-height: 1;
  transition: var(--transition);
  flex-shrink: 0;
}

.btn-fav:hover {
  border-color: #f59e0b;
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.12);
}

.btn-fav.active {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.18);
  color: #f59e0b;
}

.btn-fav.active i {
  filter: drop-shadow(0 0 4px rgba(245, 158, 11, 0.7));
  animation: starPop 0.35s ease-out;
}

@keyframes starPop {
  0% {
    transform: scale(1) rotate(0deg);
  }

  40% {
    transform: scale(1.45) rotate(15deg);
  }

  70% {
    transform: scale(0.9) rotate(-5deg);
  }

  100% {
    transform: scale(1) rotate(0deg);
  }
}

/* Star badge on card media corner */
.link-card[data-favorited="1"] .link-card-media::after {
  content: '';
  position: absolute;
  top: 8px;
  right: 8px;
  width: 18px;
  height: 18px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23f59e0b'%3E%3Cpath d='M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z'/%3E%3C/svg%3E") center/contain no-repeat;
  z-index: 3;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.5));
}

.link-title {
  font-weight: 600;
  font-size: 0.88rem;
  line-height: 1.4;
  margin-bottom: 0.3rem;
  color: #f1f5f9;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.link-desc {
  font-size: 0.78rem;
  line-height: 1.5;
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.link-url {
  font-size: 0.68rem;
  color: #64748b;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  text-decoration: none;
  display: block;
}

.link-url:hover {
  color: var(--brand);
}

/* ── Preview modal ───────────────────────────────────────────── */
.preview-img-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.preview-img-wrapper {
  position: relative;
  background: #000;
  max-height: 340px;
  overflow: hidden;
}

.preview-img-full {
  width: 100%;
  height: 340px;
  object-fit: contain;
  display: block;
}

.preview-img-platform-badge {
  position: absolute;
  bottom: 10px;
  left: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
  backdrop-filter: blur(4px);
}

.preview-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.preview-card-banner {
  background: var(--platform-gradient);
  padding: 3rem 2rem;
  text-align: center;
  color: #fff;
}

.preview-card-body {
  padding: 1.5rem;
}

.oembed-wrapper {
  max-width: 560px;
  margin: 0 auto;
}

.oembed-wrapper iframe,
.oembed-wrapper blockquote {
  max-width: 100%;
}

/* ── Social embed cards (TikTok / LinkedIn / Instagram) ─────── */
.social-embed-container {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: #111;
}

.social-embed-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid var(--border-color);
}

.social-embed-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
}

.social-embed-body {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 16px;
  background: #0d0d0d;
  overflow-y: auto;
  max-height: 600px;
  overflow-x: hidden;
}

.social-embed-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border-top: 1px solid var(--border-color);
  flex-wrap: wrap;
}

/* Iframe sizing per platform */
.social-embed-iframe {
  display: block;
  width: 100%;
  border: none;
  border-radius: 8px;
}

.social-embed-iframe--linkedin {
  min-height: 400px;
  max-width: 552px;
}

.social-embed-iframe--instagram {
  min-height: 540px;
  max-width: 400px;
}

.social-embed-iframe--facebook {
  min-height: 560px;
  max-width: 500px;
  display: block;
  margin: 0 auto;
}

/* TikTok oEmbed blockquote reset */
.social-embed-body blockquote.tiktok-embed {
  max-width: 100%;
  margin: 0 auto;
}

/* Snapchat embed blockquote */
.social-embed-body blockquote.snapchat-embed {
  max-width: 315px;
  margin: 0 auto;
  background: #000;
  border: none;
  padding: 0;
}

/* Error / fallback card for social platforms */
.social-embed-error {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.social-embed-error-banner {
  background: var(--platform-gradient);
  padding: 2rem;
  text-align: center;
  color: #fff;
}

.social-embed-error-body {
  padding: 1.25rem 1.5rem;
  background: #1a1a1a;
}

/* ── Auth pages ──────────────────────────────────────────────── */
.auth-body {
  background: var(--bg-deep);
  background-image:
    radial-gradient(ellipse at 30% 30%, rgba(0, 166, 81, 0.1) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 70%, rgba(0, 166, 81, 0.05) 0%, transparent 60%);
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
}

.auth-logo {
  width: 64px;
  height: 64px;
  margin: 0 auto;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  color: #fff;
  box-shadow: 0 8px 24px var(--brand-glow);
}

/* ── User dashboard ──────────────────────────────────────────── */
.user-welcome-banner {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius-lg);
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.platform-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  color: #fff;
}

/* ── Filter tabs ─────────────────────────────────────────────── */
.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.875rem;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: transparent;
  color: #94a3b8;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.filter-tab:hover {
  border-color: var(--tab-color, var(--brand));
  color: #fff;
}

.filter-tab.active {
  border-color: var(--tab-color, var(--brand));
  background: var(--tab-color, var(--brand));
  color: #fff;
}

.filter-count {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 0.05em 0.45em;
  font-size: 0.7em;
}

/* ── Empty state ─────────────────────────────────────────────── */
.empty-state {
  background: var(--bg-card);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-lg);
  padding: 3rem;
  text-align: center;
  color: #64748b;
}

/* ── Form controls ───────────────────────────────────────────── */
.form-control,
.form-select {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-color);
  color: #e2e8f0;
}

.form-control:focus,
.form-select:focus {
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-glow);
  color: #e2e8f0;
}

.form-control::placeholder {
  color: #475569;
}

.input-group-text {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-color);
  color: #64748b;
}

.form-select option {
  background: #202020;
}

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.875rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  border: none;
  box-shadow: 0 2px 12px var(--brand-glow);
  color: #fff;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #00c562, var(--brand));
  box-shadow: 0 4px 20px rgba(0, 166, 81, 0.45);
  color: #fff;
}

.btn-success {
  background: var(--brand);
  border-color: var(--brand);
}

/* ── Modal ───────────────────────────────────────────────────── */
.modal-content {
  background: #1a1a1a;
  border: 1px solid var(--border-color);
}

.modal-backdrop {
  backdrop-filter: blur(4px);
}

/* ── Toast ───────────────────────────────────────────────────── */
.toast {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  backdrop-filter: var(--glass-blur);
}

/* ── Platform checkboxes (add_links.php) ─────────────────────── */
.platform-check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.75rem;
}

.platform-check-card {
  cursor: pointer;
  user-select: none;
}

.platform-check-inner {
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem 0.75rem;
  text-align: center;
  transition: var(--transition);
  position: relative;
  background: rgba(255, 255, 255, 0.02);
}

.platform-check-card.selected .platform-check-inner {
  border-color: var(--pc, var(--brand));
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.2), inset 0 0 0 1px var(--pc, var(--brand));
}

.platform-check-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  margin: 0 auto 0.5rem;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  color: #fff;
}

.platform-check-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: #94a3b8;
}

.platform-check-tick {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--pc, var(--brand));
  display: none;
  place-items: center;
  font-size: 0.6rem;
  color: #fff;
}

.platform-check-card.selected .platform-check-tick {
  display: grid;
}

/* ── Drag and drop image zone ────────────────────────────────── */
.drop-zone {
  border: 2px dashed rgba(0, 166, 81, 0.35);
  border-radius: var(--radius-md);
  padding: 2rem;
  cursor: pointer;
  transition: var(--transition);
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.drop-zone:hover,
.drop-zone-over {
  border-color: var(--brand);
  background: rgba(0, 166, 81, 0.05);
}

.drop-zone-preview {
  max-height: 180px;
  max-width: 100%;
  border-radius: var(--radius-md);
  object-fit: contain;
}

/* ── URL input with platform icon ────────────────────────────── */
.plt-icon-sm {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  display: inline-grid;
  place-items: center;
  font-size: 0.65rem;
  color: #fff;
  flex-shrink: 0;
}

/* ── Platform table (platforms.php) ─────────────────────────── */
.platform-swatch {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  color: #fff;
  flex-shrink: 0;
}

.color-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.badge-active {
  background: rgba(0, 166, 81, 0.15);
  color: #00a651;
  border: 1px solid rgba(0, 166, 81, 0.3);
  font-size: .7rem;
  padding: .3em .7em;
  border-radius: 999px;
}

.badge-inactive {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.25);
  font-size: .7rem;
  padding: .3em .7em;
  border-radius: 999px;
}

/* ── Table dark ──────────────────────────────────────────────── */
.table-dark {
  background: transparent !important;
}

.table-dark th {
  background: rgba(0, 0, 0, 0.2) !important;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #64748b;
}

.table-dark td {
  vertical-align: middle;
  border-color: var(--border-color);
  font-size: 0.875rem;
}

.table-hover tbody tr:hover td {
  background: rgba(0, 166, 81, 0.05) !important;
}

/* ── Footer ──────────────────────────────────────────────────── */
footer {
  flex-shrink: 0;
}

/* ── SweetAlert2 dark ────────────────────────────────────────── */
.swal2-popup {
  background: #1a1a1a !important;
  border: 1px solid var(--border-color) !important;
  color: #e2e8f0 !important;
}

.swal2-title {
  color: #f1f5f9 !important;
}

.swal2-html-container {
  color: #94a3b8 !important;
}

.swal2-confirm {
  background: var(--brand) !important;
}

/* ── Preloader ───────────────────────────────────────────────── */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg-deep);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s ease;
}

#preloader.fade-out {
  opacity: 0;
  pointer-events: none;
}

.preloader-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: var(--radius-md);
}

/* ── Brand logo (navbar) ─────────────────────────────────────── */
.brand-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

/* ── Auth logo image ─────────────────────────────────────────── */
.auth-logo-img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: var(--radius-md);
  display: block;
  margin: 0 auto;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* ── Group portrait cards ────────────────────────────────────── */
.group-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: var(--transition);
}

.group-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(0, 166, 81, 0.3);
  background: var(--bg-card-hover);
}

.group-card-media {
  position: relative;
  height: 200px;
  overflow: hidden;
  background: linear-gradient(135deg, #1c1c1c, #2a2a2a);
  flex-shrink: 0;
}

.group-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.group-card-gradient {
  width: 100%;
  height: 100%;
}

/* Platforms overlay */
.group-card-platforms {
  position: absolute;
  bottom: 10px;
  left: 10px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  max-width: calc(100% - 20px);
}

/* User: plain clickable badge */
.group-plt-badge {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.25);
  cursor: pointer;
  transition: var(--transition);
  backdrop-filter: blur(4px);
  padding: 0;
  line-height: 1;
}

.group-plt-badge:hover {
  transform: scale(1.18);
  border-color: rgba(255, 255, 255, 0.7);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

/* Admin: badge with remove × on hover */
.group-plt-admin-badge {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.25);
  cursor: pointer;
  transition: var(--transition);
  backdrop-filter: blur(4px);
}

.group-plt-admin-badge:hover {
  transform: scale(1.12);
  border-color: rgba(255, 255, 255, 0.6);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.plt-delete-btn {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ef4444;
  color: #fff;
  border: none;
  padding: 0;
  display: none;
  place-items: center;
  font-size: 0.55rem;
  cursor: pointer;
  z-index: 2;
  line-height: 1;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.group-plt-admin-badge:hover .plt-delete-btn {
  display: grid;
}

.plt-delete-btn:hover {
  background: #dc2626;
}

/* Card body + footer */
.group-card-body {
  padding: 0.875rem 1rem;
  flex: 1;
}

.group-card-title {
  font-weight: 600;
  font-size: 0.92rem;
  color: #f1f5f9;
  margin-bottom: 0.2rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.group-card-meta {
  font-size: 0.72rem;
  color: #64748b;
  margin-bottom: 0.35rem;
}

.group-card-desc {
  font-size: 0.78rem;
  color: #94a3b8;
  line-height: 1.4;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.group-card-footer {
  padding: 0.65rem 0.875rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

/* ── Profile avatar ──────────────────────────────────────────── */
.profile-avatar-wrap {
  position: relative;
  width: 88px;
  height: 88px;
  flex-shrink: 0;
}

.profile-avatar-img {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--brand);
  box-shadow: 0 4px 16px rgba(0, 166, 81, 0.25);
  display: block;
}

.profile-avatar-initials {
  width: 88px !important;
  height: 88px !important;
  font-size: 2rem !important;
  border: 3px solid var(--brand);
}

/* ── Group section row layout ────────────────────────────────── */
.group-section-hd {
  border-left: 4px solid var(--brand);
}

/* Thumbnail square in section header */
.gs-thumb {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: linear-gradient(135deg, #1c1c1c, #2a2a2a);
  flex-shrink: 0;
}

.gs-thumb-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gs-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-size: 1.25rem;
}

/* Video in gs-thumb: paused by default, plays on parent hover */
.gs-thumb video.gs-thumb-media {
  pointer-events: none;
}

/* Hover-play overlay hint on video thumbnails */
.gs-thumb:has(video) {
  position: relative;
  cursor: pointer;
}

/* Video card media — same rules as img */
.link-card-media video.card-media-img {
  pointer-events: none;
}

/* Link cards grid inside each group section */
.group-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
}

/* ── Extra-small button size ─────────────────────────────────── */
.btn-xs {
  padding: 0.2rem 0.45rem;
  font-size: 0.72rem;
  border-radius: var(--radius-sm);
  line-height: 1.4;
}

/* ── Go to top button ────────────────────────────────────────── */
.go-top-btn {
  position: fixed;
  bottom: 5.5rem;
  right: 1.5rem;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  border: none;
  box-shadow: 0 4px 16px var(--brand-glow);
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.3s, transform 0.3s;
  z-index: 1040;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
}

.go-top-btn.visible {
  opacity: 1;
  transform: translateY(0);
}

.go-top-btn:hover {
  background: var(--brand-dark);
  box-shadow: 0 6px 24px rgba(0, 166, 81, 0.5);
}

/* ── Watched badge on card media ─────────────────────────────── */
.card-watched-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: rgba(0, 166, 81, 0.85);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

/* ── Pinned / Scheduled / Recent badges ─────────────────────── */
.badge-pinned {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #f59e0b;
  font-size: 0.68rem;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.badge-scheduled {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  font-size: 0.68rem;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Pinned group: amber left border */
.group-section.is-pinned>.group-section-hd {
  border-left: 3px solid #f59e0b;
}

/* Scheduled group: dimmed slightly + dashed border */
.group-section.is-scheduled>.group-section-hd {
  border-left: 3px dashed #38bdf8;
  opacity: 0.85;
}

/* ── Navbar avatar link (no dropdown) ───────────────────────── */
.navbar-avatar-link {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 2px solid transparent;
  transition: var(--transition);
  text-decoration: none;
  flex-shrink: 0;
}

.navbar-avatar-link:hover {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-glow);
}

/* ── Mobile Sidebar ──────────────────────────────────────────── */
.sidebar-toggle-btn {
  width: 38px;
  height: 38px;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: #94a3b8;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  line-height: 1;
  flex-shrink: 0;
  padding: 0;
  margin: 0 0.5rem;
  transition: var(--transition);
}

.sidebar-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.mobile-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 285px;
  height: 100dvh;
  height: 100vh;
  z-index: 1060;
  background: rgba(18, 18, 18, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--border-color);
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.mobile-sidebar.open {
  transform: translateX(0);
  box-shadow: 8px 0 40px rgba(0, 0, 0, 0.65);
}

.sidebar-overlay {
  position: fixed;
  inset: 0;
  z-index: 1059;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sidebar-overlay.open {
  opacity: 1;
  visibility: visible;
}

body.sidebar-open {
  overflow: hidden;
}

/* Hide sidebar entirely on desktop */
@media (min-width: 992px) {
  .mobile-sidebar,
  .sidebar-overlay {
    display: none !important;
  }
}

.mobile-sidebar-header {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  min-height: 60px;
}

.mobile-sidebar-close {
  width: 32px;
  height: 32px;
  background: transparent;
  border: 1px solid var(--border-color);
  color: #94a3b8;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}

.mobile-sidebar-close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.mobile-sidebar-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.5rem 0;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.8rem 1.25rem;
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
  border-left: 3px solid transparent;
}

.mobile-nav-link:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #e2e8f0;
}

.mobile-nav-link.active {
  color: var(--brand);
  background: rgba(0, 166, 81, 0.08);
  border-left-color: var(--brand);
}

.mobile-nav-link i {
  width: 20px;
  text-align: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.mobile-nav-divider {
  height: 1px;
  background: var(--border-color);
  margin: 0.5rem 1.25rem;
}

.mobile-sidebar-footer {
  padding: 1rem;
  border-top: 1px solid var(--border-color);
  flex-shrink: 0;
}

.mobile-sidebar-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  margin-bottom: 0.75rem;
  min-width: 0;
}

/* ── Responsive ──────────────────────────────────────────────── */

/* Notification panel: full-width fixed panel on mobile */
@media (max-width: 991.98px) {
  .notif-dropdown {
    position: fixed;
    top: 57px;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    max-height: calc(100dvh - 57px);
    max-height: calc(100vh - 57px);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    border-top: none;
    z-index: 1045;
  }
}

/* Medium screens (tablets) */
@media (max-width: 767.98px) {
  /* Full-width modals */
  .modal-dialog {
    margin: 0.5rem auto;
    max-width: calc(100vw - 1rem);
  }

  .modal-dialog.modal-lg,
  .modal-dialog.modal-xl {
    max-width: calc(100vw - 1rem);
  }

  /* Scrollable table containers */
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Auto-scroll glass-card tables */
  .glass-card > .table,
  .glass-card .table-responsive {
    overflow-x: auto;
    display: block;
    width: 100%;
  }

  /* Smaller page headings */
  h1.fs-4 { font-size: 1.1rem !important; }
  h2.fs-5 { font-size: 1rem !important; }

  /* Stat cards: 2 per row on tablets */
  .row .col-lg-3.col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
  }

  /* Filter bar stacking */
  .sort-filter-bar .row > [class*="col-"] {
    margin-bottom: 0.5rem;
  }
}

/* Small screens */
@media (max-width: 575.98px) {
  .auth-card {
    padding: 1.5rem;
  }

  .user-welcome-banner {
    padding: 1.25rem;
  }

  .platform-check-grid {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  }

  .group-card-media {
    height: 160px;
  }

  .group-links-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }

  .gs-thumb {
    width: 48px;
    height: 48px;
  }

  /* Compact section headers on small screens */
  .group-section-hd .d-flex {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  /* Toast full-width on mobile */
  .toast-container {
    left: 0.75rem !important;
    right: 0.75rem !important;
    bottom: 1rem !important;
  }

  .toast-container .toast {
    width: 100%;
    max-width: 100%;
  }

  /* Preview modal full-height image */
  .preview-img-full {
    height: 220px;
  }
}

/* ── Group expand / collapse ─────────────────────────────────── */
.group-collapse-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
}

.group-collapse-btn i {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Smooth collapse wrapper — JS drives height/opacity, CSS provides the transition */
.group-links-wrapper {
  overflow: hidden;
  transition: height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.3s ease;
  /* height is managed by JS; opacity default */
  opacity: 1;
}

.group-collapsed .group-section-hd {
  margin-bottom: 0 !important;
}

/* ── Link card platform name label ───────────────────────────── */
.link-platform-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--platform-color, #94a3b8);
  margin-bottom: 0.2rem;
  text-transform: capitalize;
}

/* ── Users management table ──────────────────────────────────── */
.user-role-badge {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.25em 0.65em;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.user-role-badge.admin {
  background: rgba(0, 166, 81, 0.15);
  color: #00a651;
  border: 1px solid rgba(0, 166, 81, 0.3);
}

.user-role-badge.user {
  background: rgba(148, 163, 184, 0.1);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

/* ── Group highlight on notification click ───────────────────── */
@keyframes wsHighlight {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 166, 81, .6);
  }

  40% {
    box-shadow: 0 0 0 10px rgba(0, 166, 81, .2);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(0, 166, 81, 0);
  }
}

.ws-highlight .group-section-hd {
  animation: wsHighlight 2s ease-out forwards;
}

/* ── RTL overrides ─────────────────────────────────────────────── */
[dir="rtl"] .notif-dropdown {
  right: auto;
  left: 0;
}

[dir="rtl"] .notif-badge {
  right: auto;
  left: 2px;
}

[dir="rtl"] .notif-dot {
  margin-left: 0;
  margin-right: auto;
}

[dir="rtl"] .card-platform-badge {
  left: auto;
  right: 0.5rem;
}

[dir="rtl"] .card-media-icon {
  left: auto;
  right: 50%;
  transform: translate(50%, -50%);
}

[dir="rtl"] .filter-tabs {
  direction: rtl;
}

[dir="rtl"] .link-url {
  direction: ltr;
  text-align: right;
}

[dir="rtl"] .brand-logo {
  margin-left: 0.5rem;
  margin-right: 0;
}

/* RTL: mobile sidebar slides in from the right */
[dir="rtl"] .mobile-sidebar {
  left: auto;
  right: 0;
  border-right: none;
  border-left: 1px solid var(--border-color);
  transform: translateX(100%);
}

[dir="rtl"] .mobile-sidebar.open {
  transform: translateX(0);
  box-shadow: -8px 0 40px rgba(0, 0, 0, 0.65);
}

[dir="rtl"] .mobile-nav-link {
  border-left: none;
  border-right: 3px solid transparent;
}

[dir="rtl"] .mobile-nav-link.active {
  border-right-color: var(--brand);
}

/* RTL: notification panel (already full-width on mobile, just handle desktop) */
@media (min-width: 992px) {
  [dir="rtl"] .notif-dropdown {
    right: auto;
    left: 0;
  }
}

/* ── v4: Audit, Archive, Sort/Filter, Categories/Tags ─────────── */

/* Archive page — muted group sections */
.archived-section .group-section-hd {
  border-left: 3px solid var(--bs-warning);
}

/* Tag badges in group headers */
.tag-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  border: 1px solid var(--border-color);
  color: var(--bs-secondary);
  background: transparent;
  cursor: default;
}

.tag-badge:hover {
  border-color: var(--brand);
  color: var(--brand);
}

/* Category badge */
.category-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  background: rgba(var(--bs-primary-rgb), 0.15);
  color: var(--bs-primary);
  border: 1px solid rgba(var(--bs-primary-rgb), 0.3);
  cursor: default;
}

/* Sort/filter bar */
.sort-filter-bar {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
}

/* Audit page table */
#ll-body tr:hover td,
#al-body tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

/* Diff viewer pre in SweetAlert */
.swal2-html-container pre {
  font-size: 0.75rem;
  max-height: 180px;
}

/* Archive button */
.btn-archive-group {
  transition: all .15s ease;
}

.btn-archive-group:hover {
  background: rgba(245, 158, 11, .15);
}

/* ── Filter label ────────────────────────────────────────────── */
.filter-label {
  display: block;
  font-size: 0.72rem;
  color: rgba(226, 232, 240, 0.5);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}

.filter-label i {
  font-size: 0.65rem;
}

/* ── Period type buttons ─────────────────────────────────────── */
.period-type-btn {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: all .15s ease;
}

.btn-purple {
  border-color: rgba(139, 92, 246, 0.5);
  color: #a78bfa
}

/* ── Teal outline button (edit group) ────────────────────────── */
.btn-outline-teal {
  border-color: rgba(20, 184, 166, 0.5);
  color: #2dd4bf;
  background: transparent;
}

.btn-outline-teal:hover,
.btn-outline-teal:focus {
  border-color: #14b8a6;
  color: #fff;
  background: rgba(20, 184, 166, 0.18);
}