/* =============================================
    Premium Design System (Accenture)
   ============================================= */

/* --- CSS Custom Properties (Dark — default) --- */
:root {
  /* FiberCop Brand — dark mode: blue vivido per leggibilità su sfondi scuri */
  --fc-primary: #2B6BE8;
  --fc-primary-hover: #1A55CC;
  --fc-primary-light: rgba(43, 107, 232, 0.15);
  --fc-primary-glow: rgba(43, 107, 232, 0.30);

  --fc-accent: #1A55CC;
  --fc-accent-hover: #1040AA;

  /* Surfaces */
  --fc-bg-body: #0c0c14;
  --fc-bg-sidebar: #111119;
  --fc-bg-card: #18181f;
  --fc-bg-card-hover: #1f1f28;
  --fc-bg-input: #1c1c26;
  --fc-bg-header: rgba(12, 12, 20, 0.88);
  --fc-bg-popup: #18181f;
  --fc-bg-modal: #18181f;

  /* Borders */
  --fc-border: rgba(255, 255, 255, 0.07);
  --fc-border-hover: rgba(255, 255, 255, 0.14);
  --fc-border-active: var(--fc-primary);

  /* Text */
  --fc-text: #e2e8f0;
  --fc-text-secondary: #94a3b8;
  --fc-text-muted: #64748b;
  --fc-text-heading: #f1f5f9;

  /* Status */
  --fc-success: #22c55e;
  --fc-success-bg: rgba(34, 197, 94, 0.12);
  --fc-warning: #f59e0b;
  --fc-warning-bg: rgba(245, 158, 11, 0.12);
  --fc-danger: #ef4444;
  --fc-danger-bg: rgba(239, 68, 68, 0.12);
  --fc-info: #3b82f6;
  --fc-info-bg: rgba(59, 130, 246, 0.12);

  /* Layout */
  --fc-sidebar-w: 260px;
  --fc-sidebar-collapsed-w: 72px;
  --fc-header-h: 64px;
  --fc-radius: 12px;
  --fc-radius-sm: 8px;
  --fc-radius-lg: 16px;
  --fc-transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);

  /* Shadows */
  --fc-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --fc-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  --fc-shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
  --fc-shadow-glow: 0 0 20px var(--fc-primary-glow);

  /* Font */
  --fc-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* --- Light Theme --- */
[data-theme="light"] {
  --fc-primary: #00196C;
  --fc-primary-hover: #1228A0;
  --fc-primary-light: rgba(0, 25, 108, 0.09);
  --fc-primary-glow: rgba(0, 25, 108, 0.18);
  --fc-accent: #001255;
  --fc-accent-hover: #000E40;

  --fc-bg-body: #f4f4f8;
  --fc-bg-sidebar: #ffffff;
  --fc-bg-card: #ffffff;
  --fc-bg-card-hover: #f8f7fa;
  --fc-bg-input: #f4f4f8;
  --fc-bg-header: rgba(255, 255, 255, 0.92);
  --fc-bg-popup: #ffffff;
  --fc-bg-modal: #ffffff;

  --fc-border: rgba(0, 0, 0, 0.08);
  --fc-border-hover: rgba(0, 0, 0, 0.15);

  --fc-text: #1e1e2e;
  --fc-text-secondary: #555770;
  --fc-text-muted: #8e8ea0;
  --fc-text-heading: #111122;

  --fc-success-bg: rgba(34, 197, 94, 0.10);
  --fc-warning-bg: rgba(245, 158, 11, 0.10);
  --fc-danger-bg: rgba(239, 68, 68, 0.10);
  --fc-info-bg: rgba(59, 130, 246, 0.10);

  --fc-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --fc-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  --fc-shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
}

[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.25);
}

[data-theme="light"] ::selection {
  background: var(--fc-primary-light);
  color: var(--fc-text-heading);
}

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

html {
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: var(--fc-font);
  background-color: var(--fc-bg-body);
  background-image: radial-gradient(circle at 15% 50%, rgba(43, 107, 232, 0.05), transparent 25%), radial-gradient(circle at 85% 30%, rgba(43, 107, 232, 0.03), transparent 25%);
  color: var(--fc-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: var(--fc-primary);
  text-decoration: none;
  transition: color var(--fc-transition);
}

a:hover {
  color: var(--fc-primary-hover);
}

::selection {
  background: var(--fc-primary-light);
  color: var(--fc-text-heading);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

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

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* --- Layout --- */
.fc-layout {
  display: flex;
  min-height: 100vh;
}

.fc-main-wrapper {
  flex: 1;
  min-width: 0;
  margin-left: var(--fc-sidebar-w);
  transition: margin-left var(--fc-transition);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.fc-main-content {
  flex: 1;
  min-width: 0;
  padding: 2rem;
  padding-top: calc(var(--fc-header-h) + 2rem);
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

/* --- Sidebar --- */
.fc-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--fc-sidebar-w);
  height: 100vh;
  background: var(--fc-bg-sidebar);
  border-right: 1px solid var(--fc-border);
  display: flex;
  flex-direction: column;
  z-index: 1040;
  transition: width var(--fc-transition), transform var(--fc-transition);
  overflow: visible;
}

.fc-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--fc-border);
  min-height: 64px;
}

.fc-sidebar-brand-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--fc-radius-sm);
  background: linear-gradient(135deg, var(--fc-primary), var(--fc-accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: #fff;
  flex-shrink: 0;
}

.fc-sidebar-brand-text {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--fc-text-heading);
  white-space: nowrap;
  overflow: hidden;
}

.fc-sidebar-brand-text span {
  font-weight: 400;
  color: var(--fc-text-secondary);
  font-size: 0.7rem;
  display: block;
  margin-top: -2px;
}

.fc-sidebar-nav {
  flex: 1;
  padding: 12px 10px;
  overflow-y: auto;
  overflow-x: hidden;
}

.fc-sidebar-section-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--fc-text-muted);
  padding: 16px 12px 6px;
  white-space: nowrap;
}

.fc-sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--fc-radius-sm);
  color: var(--fc-text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--fc-transition);
  white-space: nowrap;
  position: relative;
  margin-bottom: 2px;
}

.fc-sidebar-link i {
  width: 20px;
  text-align: center;
  font-size: 1rem;
  flex-shrink: 0;
  transition: color var(--fc-transition);
}

.fc-sidebar-link:hover {
  background: var(--fc-primary-light);
  color: var(--fc-text-heading);
}

.fc-sidebar-link:hover i {
  color: var(--fc-primary);
}

.fc-sidebar-link.active {
  background: var(--fc-primary-light);
  color: var(--fc-primary);
  font-weight: 600;
  box-shadow: inset 0 0 10px rgba(43, 107, 232, 0.14);
}

.fc-sidebar-link.active i {
  color: var(--fc-primary);
  filter: drop-shadow(0 0 4px rgba(43, 107, 232, 0.5));
}

.fc-sidebar-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: var(--fc-primary);
  border-radius: 0 3px 3px 0;
}

.fc-sidebar-footer {
  padding: 12px 10px;
  border-top: 1px solid var(--fc-border);
  position: relative;
}

.fc-sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--fc-radius-sm);
  transition: background var(--fc-transition);
}

.fc-sidebar-user:hover {
  background: rgba(255, 255, 255, 0.03);
}

.fc-sidebar-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--fc-primary), var(--fc-accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.8rem;
  color: #fff;
  flex-shrink: 0;
}

.fc-sidebar-user-info {
  overflow: hidden;
  white-space: nowrap;
}

.fc-sidebar-user-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--fc-text-heading);
  text-overflow: ellipsis;
  overflow: hidden;
}

.fc-sidebar-user-role {
  font-size: 0.65rem;
  color: var(--fc-text-muted);
  text-overflow: ellipsis;
  overflow: hidden;
}

/* Collapsed sidebar */
body.sidebar-collapsed .fc-sidebar {
  width: var(--fc-sidebar-collapsed-w);
}

body.sidebar-collapsed .fc-main-wrapper {
  margin-left: var(--fc-sidebar-collapsed-w);
}

body.sidebar-collapsed .fc-sidebar-brand-text,
body.sidebar-collapsed .fc-sidebar-section-label,
body.sidebar-collapsed .fc-sidebar-user-info,
body.sidebar-collapsed .fc-sidebar-link span {
  opacity: 0;
  width: 0;
  overflow: hidden;
}

body.sidebar-collapsed .fc-sidebar-link {
  justify-content: center;
  padding: 12px;
  gap: 0;
}

body.sidebar-collapsed .fc-sidebar-link i {
  font-size: 1.1rem;
}

body.sidebar-collapsed .fc-sidebar-user {
  justify-content: center;
  position: relative;
}

/* Elegant tooltips for collapsed sidebar */
body.sidebar-collapsed .fc-sidebar-link::after,
body.sidebar-collapsed .fc-sidebar-user::after {
  content: attr(data-title);
  position: absolute;
  left: calc(100% + 15px);
  top: 50%;
  transform: translateY(-50%) translateX(-10px);
  background: var(--fc-bg-header);
  backdrop-filter: blur(12px);
  color: var(--fc-text-heading);
  padding: 8px 16px;
  border-radius: var(--fc-radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  box-shadow: var(--fc-shadow-lg);
  border: 1px solid var(--fc-border);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 2000;
}

body.sidebar-collapsed .fc-sidebar-nav {
  overflow: visible;
}

body.sidebar-collapsed .fc-sidebar-user::after {
  content: attr(data-user-name);
}

body.sidebar-collapsed .fc-sidebar-link:hover::after,
body.sidebar-collapsed .fc-sidebar-user:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(0);
}

/* --- Header --- */
.fc-header {
  position: fixed;
  top: 0;
  right: 0;
  left: var(--fc-sidebar-w);
  height: var(--fc-header-h);
  background: var(--fc-bg-header);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--fc-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  z-index: 1030;
  transition: left var(--fc-transition), transform 0.28s ease;
}

.fc-header--hidden {
  transform: translateY(-100%);
}

@media (min-width: 992px) {
  .fc-header--empty {
    display: none;
  }
  .fc-main-wrapper:has(.fc-header--empty) .fc-main-content {
    padding-top: 2rem;
  }
}

body.sidebar-collapsed .fc-header {
  left: var(--fc-sidebar-collapsed-w);
}

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

.fc-header-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--fc-text-heading);
  margin: 0;
}

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

.fc-header-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--fc-border);
  background: transparent;
  color: var(--fc-text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--fc-transition);
  position: relative;
  font-size: 1rem;
}

.fc-header-btn:hover {
  background: var(--fc-primary-light);
  color: var(--fc-primary);
  border-color: var(--fc-primary);
}

.fc-sidebar-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--fc-text-heading);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 4px 8px;
}

/* --- Notification Bell Badge --- */
.fc-notification-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  background: var(--fc-danger);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid var(--fc-bg-body);
  animation: fc-badge-pulse 2s ease-in-out infinite;
}

@keyframes fc-badge-pulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.1);
  }
}

.fc-notification-badge:empty,
.fc-notification-badge[data-count="0"] {
  display: none;
}

/* --- Notification Popup --- */
.fc-notif-popup {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 380px;
  background: var(--fc-bg-popup);
  border: 1px solid var(--fc-border);
  border-radius: var(--fc-radius);
  box-shadow: var(--fc-shadow-lg);
  z-index: 1060;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s ease;
}

.fc-notif-popup.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

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

.fc-notif-popup-header h6 {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--fc-text-heading);
}

.fc-notif-popup-header a {
  font-size: 0.75rem;
  font-weight: 600;
}

.fc-notif-popup-body {
  max-height: 360px;
  overflow-y: auto;
}

.fc-notif-popup-empty {
  padding: 32px 18px;
  text-align: center;
  color: var(--fc-text-muted);
  font-size: 0.85rem;
}

.fc-notif-popup-empty i {
  display: block;
  font-size: 2rem;
  margin-bottom: 8px;
  opacity: 0.4;
}

.fc-notif-item {
  display: flex;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--fc-border);
  transition: background var(--fc-transition);
  cursor: pointer;
}

.fc-notif-item:last-child {
  border-bottom: none;
}

.fc-notif-item:hover {
  background: rgba(255, 255, 255, 0.02);
}

.fc-notif-item.unread {
  background: var(--fc-primary-light);
}

.fc-notif-item-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.fc-notif-item-icon.info {
  background: var(--fc-info-bg);
  color: var(--fc-info);
}

.fc-notif-item-icon.action {
  background: var(--fc-warning-bg);
  color: var(--fc-warning);
}

.fc-notif-item-content {
  flex: 1;
  min-width: 0;
}

.fc-notif-item-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--fc-text-heading);
  margin-bottom: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.fc-notif-item-desc {
  font-size: 0.75rem;
  color: var(--fc-text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.fc-notif-item-meta {
  font-size: 0.65rem;
  color: var(--fc-text-muted);
  margin-top: 4px;
}

.fc-notif-popup-footer {
  padding: 12px 18px;
  border-top: 1px solid var(--fc-border);
  text-align: center;
}

.fc-notif-popup-footer a {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--fc-primary);
}

/* --- Cards --- */
.fc-card {
  background: var(--fc-bg-card);
  border: 1px solid var(--fc-border);
  border-radius: var(--fc-radius);
  padding: 24px;
  transition: all var(--fc-transition);
}

.fc-card:hover {
  border-color: var(--fc-border-hover);
  box-shadow: var(--fc-shadow);
}

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

.fc-card-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--fc-text-heading);
  margin: 0;
}

.fc-card-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--fc-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

/* --- Stat Cards --- */
.fc-stat-card {
  background: var(--fc-bg-card);
  border: 1px solid var(--fc-border);
  border-radius: var(--fc-radius);
  padding: 24px;
  transition: all var(--fc-transition);
  position: relative;
  overflow: hidden;
}

.fc-stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--stat-color, var(--fc-primary));
  opacity: 0;
  transition: opacity var(--fc-transition);
}

.fc-stat-card:hover {
  border-color: var(--fc-border-hover);
  transform: translateY(-2px);
  box-shadow: var(--fc-shadow);
}

.fc-stat-card:hover::before {
  opacity: 1;
}

.fc-stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--fc-text-heading);
  line-height: 1.1;
}

.fc-stat-label {
  font-size: 0.8rem;
  color: var(--fc-text-secondary);
  margin-top: 4px;
  font-weight: 500;
}

.fc-stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--fc-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

/* --- Buttons --- */
.fc-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--fc-radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--fc-font);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--fc-transition);
  white-space: nowrap;
}

.fc-btn-primary {
  background: var(--fc-primary);
  color: #ffffff;
  border-color: var(--fc-primary);
}

.fc-btn-primary:hover {
  background: var(--fc-primary-hover);
  color: #ffffff !important;
  box-shadow: var(--fc-shadow-glow);
  transform: translateY(-1px);
}

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

.fc-btn-ghost {
  background: transparent;
  color: var(--fc-text-secondary);
  border-color: var(--fc-border);
}

.fc-btn-ghost:hover {
  background: var(--fc-primary-light);
  color: var(--fc-primary);
  border-color: var(--fc-primary);
}

.fc-btn-danger {
  background: transparent;
  color: var(--fc-danger);
  border-color: rgba(239, 68, 68, 0.3);
}

.fc-btn-danger:hover {
  background: var(--fc-danger-bg);
  border-color: var(--fc-danger);
}

.fc-btn-success {
  background: var(--fc-success);
  color: #fff;
  border-color: var(--fc-success);
}

.fc-btn-sm {
  padding: 6px 14px;
  font-size: 0.78rem;
}

.fc-btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  justify-content: center;
  border-radius: 50%;
}

/* --- Badges --- */
.fc-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.fc-badge-primary {
  background: var(--fc-primary-light);
  color: var(--fc-primary);
}

.fc-badge-success {
  background: var(--fc-success-bg);
  color: var(--fc-success);
}

.fc-badge-warning {
  background: var(--fc-warning-bg);
  color: var(--fc-warning);
}

.fc-badge-danger {
  background: var(--fc-danger-bg);
  color: var(--fc-danger);
}

.fc-badge-info {
  background: var(--fc-info-bg);
  color: var(--fc-info);
}

.fc-badge-muted {
  background: rgba(100, 116, 139, 0.15);
  color: var(--fc-text-muted);
}

/* --- Tables --- */
.fc-table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--fc-border);
  border-radius: var(--fc-radius);
}

.fc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.fc-table thead th {
  background: rgba(255, 255, 255, 0.02);
  padding: 12px 16px;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--fc-text-muted);
  border-bottom: 1px solid var(--fc-border);
  white-space: nowrap;
}

.fc-table tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--fc-border);
  color: var(--fc-text);
  vertical-align: middle;
}

.fc-table tbody tr {
  transition: background var(--fc-transition);
}

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

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

/* --- Forms --- */
.fc-input {
  width: 100%;
  padding: 10px 14px;
  background: var(--fc-bg-input);
  border: 1px solid var(--fc-border);
  border-radius: var(--fc-radius-sm);
  color: var(--fc-text);
  font-size: 0.85rem;
  font-family: var(--fc-font);
  transition: all var(--fc-transition);
}

.fc-input:focus {
  outline: none;
  border-color: var(--fc-primary);
  box-shadow: 0 0 0 3px var(--fc-primary-light);
}

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

.fc-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--fc-text-secondary);
  margin-bottom: 6px;
}

.fc-select {
  appearance: none;
  width: 100%;
  padding: 10px 36px 10px 14px;
  background: var(--fc-bg-input) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 12px center;
  border: 1px solid var(--fc-border);
  border-radius: var(--fc-radius-sm);
  color: var(--fc-text);
  font-size: 0.85rem;
  font-family: var(--fc-font);
  cursor: pointer;
  transition: all var(--fc-transition);
}

.fc-select:focus {
  outline: none;
  border-color: var(--fc-primary);
  box-shadow: 0 0 0 3px var(--fc-primary-light);
}

/* --- Modals --- */
.fc-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1050;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
}

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

.fc-modal {
  background: var(--fc-bg-modal);
  border: 1px solid var(--fc-border);
  border-radius: var(--fc-radius-lg);
  width: 90%;
  max-width: 560px;
  max-height: 85vh;
  overflow-y: auto;
  transform: scale(0.95);
  transition: transform 0.2s ease;
}

.fc-modal-overlay.show .fc-modal {
  transform: scale(1);
}

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

.fc-modal-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--fc-text-heading);
  margin: 0;
}

.fc-modal-close {
  background: transparent;
  border: none;
  color: var(--fc-text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px;
  transition: color var(--fc-transition);
}

.fc-modal-close:hover {
  color: var(--fc-text-heading);
}

.fc-modal-body {
  padding: 24px;
}

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

/* --- Toasts --- */
.fc-toast-container {
  position: fixed;
  top: 80px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fc-toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: var(--fc-bg-card);
  border: 1px solid var(--fc-border);
  border-radius: var(--fc-radius-sm);
  box-shadow: var(--fc-shadow-lg);
  min-width: 300px;
  max-width: 420px;
  animation: fc-slide-in 0.3s ease;
  border-left: 3px solid var(--fc-primary);
}

.fc-toast.success {
  border-left-color: var(--fc-success);
}

.fc-toast.danger {
  border-left-color: var(--fc-danger);
}

.fc-toast.warning {
  border-left-color: var(--fc-warning);
}

.fc-toast.info {
  border-left-color: var(--fc-info);
}

.fc-toast-message {
  flex: 1;
  font-size: 0.85rem;
  color: var(--fc-text);
}

.fc-toast-close {
  background: transparent;
  border: none;
  color: var(--fc-text-muted);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 2px;
}

@keyframes fc-slide-in {
  from {
    opacity: 0;
    transform: translateX(24px);
  }

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

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

  to {
    opacity: 0;
    transform: translateX(24px);
  }
}

/* --- Page Header --- */
.fc-page-header {
  margin-bottom: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
}

.fc-page-header-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.fc-page-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--fc-primary-light);
  color: var(--fc-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.fc-page-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--fc-text-heading);
  margin: 0 0 4px;
}

.fc-page-subtitle {
  font-size: 0.85rem;
  color: var(--fc-text-secondary);
  margin: 0;
}

@media (max-width: 640px) {
  .fc-page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .fc-page-header-title {
    width: 100%;
  }

  .fc-page-subtitle {
    white-space: normal;
    font-size: 0.8rem;
  }
}

/* --- Welcome Hero --- */
.fc-hero {
  background: linear-gradient(135deg, rgba(43, 107, 232, 0.10) 0%, rgba(26, 85, 204, 0.05) 100%);
  border: 1px solid var(--fc-border);
  border-radius: var(--fc-radius-lg);
  padding: 32px;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}

.fc-hero::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, var(--fc-primary-glow) 0%, transparent 70%);
  opacity: 0.3;
  pointer-events: none;
}

.fc-hero-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--fc-text-heading);
  margin: 0 0 8px;
}

.fc-hero-subtitle {
  font-size: 0.95rem;
  color: var(--fc-text-secondary);
  margin: 0;
}

/* --- Grid helpers --- */
.fc-grid {
  display: grid;
  gap: 20px;
}

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

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

.fc-grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* --- Filters Bar --- */
.fc-filters-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  padding: 16px 20px;
  background: var(--fc-bg-card);
  border: 1px solid var(--fc-border);
  border-radius: var(--fc-radius);
}

/* --- Notification Page Items --- */
.fc-notif-page-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 24px;
  background: var(--fc-bg-card);
  border: 1px solid var(--fc-border);
  border-radius: var(--fc-radius);
  transition: all var(--fc-transition);
  margin-bottom: 12px;
}

.fc-notif-page-item.unread {
  border-left: 3px solid var(--fc-primary);
  background: linear-gradient(90deg, var(--fc-primary-light) 0%, var(--fc-bg-card) 40%);
}

.fc-notif-page-item:hover {
  border-color: var(--fc-border-hover);
  box-shadow: var(--fc-shadow-sm);
}

.fc-notif-page-item .fc-notif-checkbox {
  margin-top: 4px;
}

.fc-notif-page-item-body {
  flex: 1;
  min-width: 0;
}

.fc-notif-page-item-body h6 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--fc-text-heading);
  margin: 0 0 4px;
}

.fc-notif-page-item-body p {
  font-size: 0.82rem;
  color: var(--fc-text-secondary);
  margin: 0 0 8px;
  line-height: 1.5;
}

.fc-notif-page-item-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.72rem;
  color: var(--fc-text-muted);
}

.fc-notif-page-item-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* --- Empty State --- */
.fc-empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--fc-text-muted);
}

.fc-empty-state i {
  font-size: 3rem;
  opacity: 0.3;
  margin-bottom: 16px;
  display: block;
}

.fc-empty-state h5 {
  font-size: 1rem;
  color: var(--fc-text-secondary);
  margin: 0 0 8px;
}

.fc-empty-state p {
  font-size: 0.85rem;
  margin: 0;
}

/* --- Pagination --- */
.fc-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 24px;
}

.fc-pagination-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--fc-radius-sm);
  border: 1px solid var(--fc-border);
  background: transparent;
  color: var(--fc-text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--fc-transition);
}

.fc-pagination-btn:hover {
  background: var(--fc-primary-light);
  color: var(--fc-primary);
  border-color: var(--fc-primary);
}

.fc-pagination-btn.active {
  background: var(--fc-primary);
  color: #fff;
  border-color: var(--fc-primary);
}

.fc-pagination-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* --- Checkbox custom --- */
.fc-checkbox {
  width: 18px;
  height: 18px;
  border: 2px solid var(--fc-border-hover);
  border-radius: 4px;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  position: relative;
  transition: all var(--fc-transition);
  background: transparent;
}

.fc-checkbox:checked {
  background: var(--fc-primary);
  border-color: var(--fc-primary);
}

.fc-checkbox:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
}

/* --- Flash Messages (premium override) --- */
.fc-alert {
  display: flex;
  align-items: center;
  gap: 14px;
  border-radius: var(--fc-radius);
  border: 1px solid var(--fc-border);
  background: var(--fc-bg-card);
  color: var(--fc-text);
  padding: 16px 20px;
  font-size: 0.85rem;
  font-weight: 500;
  position: relative;
  animation: fc-slide-in 0.3s ease;
  box-shadow: var(--fc-shadow-sm);
  border-left: 4px solid var(--fc-primary);
  margin-bottom: 0.75rem;
}

.fc-alert .fc-alert-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.fc-alert .fc-alert-content {
  flex: 1;
  min-width: 0;
}

.fc-alert .fc-btn-close-alert {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--fc-text-muted);
  cursor: pointer;
  font-size: 0.95rem;
  padding: 4px;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--fc-transition);
}

.fc-alert .fc-btn-close-alert:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--fc-text-heading);
}

.fc-alert-success {
  border-left-color: var(--fc-success);
  background: linear-gradient(90deg, rgba(34, 197, 94, 0.06) 0%, var(--fc-bg-card) 40%);
}

.fc-alert-success .fc-alert-icon {
  background: var(--fc-success-bg);
  color: var(--fc-success);
}

.fc-alert-danger {
  border-left-color: var(--fc-danger);
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.06) 0%, var(--fc-bg-card) 40%);
}

.fc-alert-danger .fc-alert-icon {
  background: var(--fc-danger-bg);
  color: var(--fc-danger);
}

.fc-alert-warning {
  border-left-color: var(--fc-warning);
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.06) 0%, var(--fc-bg-card) 40%);
}

.fc-alert-warning .fc-alert-icon {
  background: var(--fc-warning-bg);
  color: var(--fc-warning);
}

.fc-alert-info {
  border-left-color: var(--fc-info);
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.06) 0%, var(--fc-bg-card) 40%);
}

.fc-alert-info .fc-alert-icon {
  background: var(--fc-info-bg);
  color: var(--fc-info);
}

/* --- Upload Modal z-index overlay --- */
#uploadDocModal.fc-modal-overlay {
  z-index: 1060;
}

/* --- Premium File Input --- */
.fc-file-input-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--fc-bg-input);
  border: 2px dashed var(--fc-border);
  border-radius: var(--fc-radius);
  transition: border-color 0.15s ease, background 0.15s ease;
  cursor: pointer;
}

.fc-file-input-wrapper:hover {
  border-color: var(--fc-primary);
  background: rgba(99, 102, 241, 0.04);
}

.fc-file-input-wrapper.drag-over {
  border-color: var(--fc-primary);
  background: rgba(99, 102, 241, 0.08);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.fc-file-input-wrapper input[type="file"] {
  display: none;
}

.fc-file-input-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--fc-radius-sm);
  border: 1px solid var(--fc-border);
  background: transparent;
  color: var(--fc-primary);
  font-size: 0.8rem;
  font-weight: 600;
  font-family: var(--fc-font);
  cursor: pointer;
  transition: all var(--fc-transition);
  white-space: nowrap;
  flex-shrink: 0;
}

.fc-file-input-btn:hover {
  background: var(--fc-primary-light);
  border-color: var(--fc-primary);
}

.fc-file-input-btn i {
  font-size: 0.85rem;
}

.fc-file-input-name {
  font-size: 0.82rem;
  color: var(--fc-text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.fc-file-input-name.has-file {
  color: var(--fc-text);
  font-weight: 500;
}

/* --- Quick Action Cards --- */
.fc-quick-action {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  background: var(--fc-bg-card);
  border: 1px solid var(--fc-border);
  border-radius: var(--fc-radius);
  cursor: pointer;
  transition: all var(--fc-transition);
  text-decoration: none;
  color: var(--fc-text);
}

.fc-quick-action:hover {
  border-color: var(--fc-primary);
  background: var(--fc-primary-light);
  transform: translateY(-2px);
  box-shadow: var(--fc-shadow);
  color: var(--fc-text-heading);
}

.fc-quick-action-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--fc-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.fc-quick-action-text h6 {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--fc-text-heading);
}

.fc-quick-action-text p {
  margin: 2px 0 0;
  font-size: 0.72rem;
  color: var(--fc-text-muted);
}

/* --- Responsive --- */
@media (max-width: 1200px) {
  .fc-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 992px) {
  .fc-sidebar {
    transform: translateX(-100%);
    width: var(--fc-sidebar-w);
    box-shadow: var(--fc-shadow-lg);
  }

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

  .fc-main-wrapper {
    margin-left: 0;
  }

  .fc-header {
    left: 0;
  }

  body.sidebar-collapsed .fc-header {
    left: 0;
  }

  body.sidebar-collapsed .fc-main-wrapper {
    margin-left: 0;
  }

  /* Override collapsed styles on mobile */
  body.sidebar-collapsed .fc-sidebar {
    width: var(--fc-sidebar-w);
  }

  body.sidebar-collapsed .fc-sidebar-brand-text,
  body.sidebar-collapsed .fc-sidebar-section-label,
  body.sidebar-collapsed .fc-sidebar-user-info,
  body.sidebar-collapsed .fc-sidebar-link span {
    opacity: 1;
    width: auto;
  }

  body.sidebar-collapsed .fc-sidebar-link {
    justify-content: flex-start;
    padding: 10px 14px;
    gap: 12px;
  }

  body.sidebar-collapsed .fc-sidebar-link i {
    font-size: 1rem;
  }

  body.sidebar-collapsed .fc-sidebar-user {
    justify-content: flex-start;
  }

  body.sidebar-collapsed .fc-sidebar-user-more {
    display: block;
  }

  body.sidebar-collapsed .fc-sidebar-link::after,
  body.sidebar-collapsed .fc-sidebar-user::after {
    display: none !important;
  }

  body.sidebar-collapsed .fc-user-dropdown {
    width: auto;
    right: 10px;
    left: 10px;
  }

  .fc-sidebar-toggle {
    display: block;
  }

  .fc-sidebar-collapse-brand {
    display: none !important;
  }

  .fc-header-brand {
    display: flex;
  }

  .fc-grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .fc-main-content {
    padding: 1.5rem;
    padding-top: calc(var(--fc-header-h) + 1.5rem);
  }
}

@media (max-width: 768px) {

  .fc-grid-2,
  .fc-grid-3,
  .fc-grid-4 {
    grid-template-columns: 1fr;
  }

  .fc-hero {
    padding: 24px;
  }

  .fc-hero-title {
    font-size: 1.2rem;
  }

  .fc-filters-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .fc-notif-popup {
    position: fixed;
    top: calc(var(--fc-header-h) + 10px);
    left: 16px;
    right: 16px;
    width: auto;
    transform: none;
    max-height: 80vh;
    overflow-y: auto;
  }
}

/* --- Mobile overlay --- */
.fc-sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1035;
}

@media (max-width: 992px) {
  .fc-sidebar.mobile-open~.fc-sidebar-overlay {
    display: block;
  }
}

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

.gap-2 {
  gap: 8px;
}

.gap-3 {
  gap: 12px;
}

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

.mt-2 {
  margin-top: 8px;
}

.mt-3 {
  margin-top: 16px;
}

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

.mb-3 {
  margin-bottom: 16px;
}

/* --- Theme Toggle --- */
.fc-theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--fc-border);
  background: transparent;
  color: var(--fc-text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.05rem;
  transition: all var(--fc-transition);
  position: relative;
}

.fc-theme-toggle:hover {
  background: var(--fc-primary-light);
  color: var(--fc-primary);
  border-color: var(--fc-primary);
}

.fc-theme-toggle .fa-sun {
  display: none;
}

.fc-theme-toggle .fa-moon {
  display: inline;
}

[data-theme="light"] .fc-theme-toggle .fa-sun {
  display: inline;
}

[data-theme="light"] .fc-theme-toggle .fa-moon {
  display: none;
}

/* --- Header Brand (mobile only) --- */
.fc-header-brand {
  display: none;
  align-items: center;
  gap: 10px;
}

.fc-header-brand img {
  height: 24px;
  width: auto;
}

.fc-header-brand-text {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--fc-text-heading);
}

/* --- Sidebar Collapse Button (in brand bar, desktop only) --- */
.fc-sidebar-collapse-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-left: auto;
  flex-shrink: 0;
  border-radius: var(--fc-radius-sm);
  background: transparent;
  border: 1px solid var(--fc-border);
  color: var(--fc-text-muted);
  font-size: 0.75rem;
  cursor: pointer;
  transition: background var(--fc-transition), border-color var(--fc-transition), color var(--fc-transition), opacity var(--fc-transition);
  opacity: 0.6;
}

.fc-sidebar-collapse-brand:hover {
  background: var(--fc-primary-light);
  border-color: var(--fc-primary);
  color: var(--fc-primary);
  opacity: 1;
}

.fc-sidebar-collapse-brand i {
  transition: transform 0.3s ease;
}

body.sidebar-collapsed .fc-sidebar-collapse-brand {
  opacity: 1;
  margin-left: auto;
}

/* --- User Dropdown --- */
.fc-sidebar-user {
  cursor: pointer;
  position: relative;
}

.fc-sidebar-user-more {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--fc-text-muted);
  opacity: 0;
  transition: opacity var(--fc-transition);
}

.fc-sidebar-user:hover .fc-sidebar-user-more {
  opacity: 1;
}

body.sidebar-collapsed .fc-sidebar-user-more {
  display: none;
}

.fc-user-dropdown {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 10px;
  right: 10px;
  background: var(--fc-bg-popup);
  border: 1px solid var(--fc-border-hover);
  border-radius: var(--fc-radius);
  box-shadow: var(--fc-shadow-lg);
  padding: 6px;
  z-index: 1060;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s ease;
  backdrop-filter: blur(16px);
}

body.sidebar-collapsed .fc-user-dropdown {
  width: 240px;
  right: auto;
}

.fc-user-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.fc-user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--fc-radius-sm);
  color: var(--fc-text-secondary);
  font-size: 0.82rem;
  font-weight: 500;
  transition: all var(--fc-transition);
  cursor: pointer;
  text-decoration: none;
}

.fc-user-dropdown-item:hover {
  background: var(--fc-primary-light);
  color: var(--fc-text-heading);
}

.fc-user-dropdown-item i {
  width: 18px;
  text-align: center;
  font-size: 0.9rem;
}

.fc-user-dropdown-logout {
  color: var(--fc-danger);
}

.fc-user-dropdown-logout:hover {
  background: var(--fc-danger-bg);
  color: var(--fc-danger);
}

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

/* --- Theme Switch Toggle --- */
.fc-theme-row {
  justify-content: flex-start;
}

.fc-theme-switch {
  position: relative;
  width: 40px;
  height: 22px;
  margin-left: auto;
  flex-shrink: 0;
}

.fc-theme-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.fc-theme-switch-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  transition: all 0.3s ease;
}

.fc-theme-switch-slider::before {
  content: '';
  position: absolute;
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background: var(--fc-text-secondary);
  border-radius: 50%;
  transition: all 0.3s ease;
}

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

.fc-theme-switch input:checked+.fc-theme-switch-slider::before {
  transform: translateX(18px);
  background: var(--fc-primary);
}

[data-theme="light"] .fc-theme-switch-slider {
  background: rgba(0, 0, 0, 0.1);
}

/* --- Login Page --- */
.fc-login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--fc-bg-body);
  position: relative;
  overflow: hidden;
  font-family: var(--fc-font);
}

.fc-login-page::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -15%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(43, 107, 232, 0.22) 0%, transparent 65%);
  pointer-events: none;
  animation: fc-login-glow 6s ease-in-out infinite alternate;
}

.fc-login-page::after {
  content: '';
  position: absolute;
  bottom: -20%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(123, 0, 204, 0.12) 0%, transparent 65%);
  pointer-events: none;
  animation: fc-login-glow 8s ease-in-out infinite alternate-reverse;
}

@keyframes fc-login-glow {
  0% {
    opacity: 0.5;
    transform: scale(1);
  }

  100% {
    opacity: 1;
    transform: scale(1.15);
  }
}

.fc-login-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  background: var(--fc-bg-card);
  border: 1px solid var(--fc-border);
  border-radius: var(--fc-radius-lg);
  padding: 40px 36px;
  box-shadow: var(--fc-shadow-lg);
  animation: fc-login-appear 0.5s ease;
}

@keyframes fc-login-appear {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

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

.fc-login-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.fc-login-logo svg {
  height: 36px;
  width: auto;
}

.fc-login-logo-text {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--fc-text-heading);
}

.fc-login-form .fc-input {
  margin-bottom: 16px;
}

.fc-login-btn {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: var(--fc-radius-sm);
  background: var(--fc-primary);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  font-family: var(--fc-font);
  cursor: pointer;
  transition: all var(--fc-transition);
}

.fc-login-btn:hover {
  background: var(--fc-primary-hover);
  box-shadow: var(--fc-shadow-glow);
  transform: translateY(-1px);
}

.fc-login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--fc-text-muted);
  font-size: 0.75rem;
}

.fc-login-divider::before,
.fc-login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--fc-border);
}

.fc-login-sso {
  width: 100%;
  padding: 11px;
  border: 1px solid var(--fc-border);
  border-radius: var(--fc-radius-sm);
  background: transparent;
  color: var(--fc-text);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--fc-font);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all var(--fc-transition);
}

.fc-login-sso:hover {
  background: var(--fc-primary-light);
  border-color: var(--fc-primary);
  color: var(--fc-primary);
}

.fc-login-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 0.72rem;
  color: var(--fc-text-muted);
}

@media (max-width: 480px) {
  .fc-login-card {
    margin: 16px;
    padding: 32px 24px;
  }
}

/* --- Nuovo Ordine Page --- */
.fc-doc-section {
  background: var(--fc-bg-card);
  border: 1px solid var(--fc-border);
  border-radius: var(--fc-radius);
  padding: 28px;
  margin-bottom: 20px;
}

.fc-doc-section h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--fc-text-heading);
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--fc-primary-light);
}

.fc-doc-section h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--fc-text-heading);
  margin: 20px 0 10px;
}

.fc-doc-section p,
.fc-doc-section li {
  font-size: 0.85rem;
  color: var(--fc-text-secondary);
  line-height: 1.7;
}

.fc-doc-section ul {
  padding-left: 20px;
}

.fc-timeline {
  display: flex;
  align-items: stretch;
  gap: 0;
  flex-wrap: wrap;
  margin: 20px 0;
  position: relative;
}

.fc-timeline-item {
  flex: 1;
  min-width: 100px;
  text-align: center;
  position: relative;
  padding: 16px 8px;
}

.fc-timeline-item::before {
  content: '';
  position: absolute;
  top: 24px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--fc-border);
}

.fc-timeline-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--fc-primary);
  border: 3px solid var(--fc-bg-card);
  position: relative;
  z-index: 1;
  margin: 0 auto 8px;
}

.fc-timeline-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--fc-text-heading);
  position: relative;
  z-index: 1;
}

.fc-timeline-date {
  font-size: 0.65rem;
  color: var(--fc-text-muted);
  position: relative;
  z-index: 1;
}

.fc-doc-footer {
  text-align: center;
  padding: 24px;
  font-size: 0.75rem;
  color: var(--fc-text-muted);
  border-top: 1px solid var(--fc-border);
  margin-top: 32px;
}

/* --- Mini Stat Cards (Home) --- */
.fc-stat-mini-card {
  text-align: center;
  padding: 16px;
  border-radius: var(--fc-radius-sm);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--fc-border);
  transition: all var(--fc-transition);
}

.fc-stat-mini-card.success {
  background: var(--fc-success-bg);
  border-color: rgba(34, 197, 94, 0.2);
}

.fc-stat-mini-card.warning {
  background: var(--fc-warning-bg);
  border-color: rgba(245, 158, 11, 0.2);
}

.fc-stat-mini-val {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--fc-text-heading);
}

.fc-stat-mini-card.success .fc-stat-mini-val {
  color: var(--fc-success);
}

.fc-stat-mini-card.warning .fc-stat-mini-val {
  color: var(--fc-warning);
}

.fc-stat-mini-label {
  font-size: 0.7rem;
  color: var(--fc-text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
}

/* Custom PDF Icon Override */
i.fas.fa-file-pdf::before {
  content: "" !important;
}

i.fas.fa-file-pdf {
  display: inline-block !important;
  width: 1.1em !important;
  height: 1.1em !important;
  background-image: url('../images/pdf40.png') !important;
  background-size: contain !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  vertical-align: text-bottom !important;
}

/* ============================================================
   FC FRONTEND IMPROVEMENTS — Additive styles
   ============================================================ */

/* --- 1A: Screen-reader utility --- */
.fc-sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); border: 0;
}

/* --- 1B: Skip navigation link --- */
.fc-skip-link {
  position: absolute; top: -100%; left: 1rem;
  background: var(--fc-primary); color: #fff;
  padding: 0.5rem 1rem; border-radius: var(--fc-radius-sm);
  font-weight: 600; font-size: 0.875rem; z-index: 9999;
  transition: top 0.2s;
  text-decoration: none;
}
.fc-skip-link:focus { top: 1rem; color: #fff; }

/* --- 1C: Keyframes --- */
@keyframes fc-fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fc-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@keyframes fc-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.5; transform: scale(0.8); }
}

@keyframes fc-progress-slide {
  from { transform: translateX(-200%); }
  to   { transform: translateX(400%); }
}

/* --- 1D: Entrance animation --- */
.fc-animate-in {
  animation: fc-fade-up 0.35s cubic-bezier(0.4, 0, 0.2, 1) both;
}

/* --- 1E: Skeleton loaders --- */
.fc-skeleton {
  background: linear-gradient(90deg, var(--fc-bg-card) 25%, var(--fc-bg-card-hover) 50%, var(--fc-bg-card) 75%);
  background-size: 200% 100%;
  animation: fc-shimmer 1.4s infinite;
  border-radius: var(--fc-radius);
  border: 1px solid var(--fc-border);
}
.fc-skeleton-line {
  height: 14px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--fc-bg-card) 25%, var(--fc-bg-card-hover) 50%, var(--fc-bg-card) 75%);
  background-size: 200% 100%;
  animation: fc-shimmer 1.4s infinite;
  margin-bottom: 0.5rem;
}
.fc-skeleton-circle {
  border-radius: 50%;
  background: linear-gradient(90deg, var(--fc-bg-card) 25%, var(--fc-bg-card-hover) 50%, var(--fc-bg-card) 75%);
  background-size: 200% 100%;
  animation: fc-shimmer 1.4s infinite;
}

/* --- 1F: Tooltip (CSS-only) --- */
[data-tooltip] { position: relative; cursor: help; }
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute; bottom: calc(100% + 6px); left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: var(--fc-bg-card); color: var(--fc-text);
  border: 1px solid var(--fc-border); border-radius: var(--fc-radius-sm);
  padding: 0.35rem 0.6rem; font-size: 0.75rem; font-weight: 400;
  white-space: nowrap; pointer-events: none; opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  box-shadow: var(--fc-shadow); z-index: 100;
}
[data-tooltip]:hover::after,
[data-tooltip]:focus::after {
  opacity: 1; transform: translateX(-50%) translateY(0);
}

/* --- 1G: Breadcrumb --- */
.fc-breadcrumb {
  display: flex; align-items: center; gap: 0.4rem;
  font-size: 0.78rem; color: var(--fc-text-muted);
  margin-left: 1rem;
}
.fc-breadcrumb a { color: var(--fc-text-secondary); text-decoration: none; }
.fc-breadcrumb a:hover { color: var(--fc-primary); }
.fc-breadcrumb i { font-size: 0.6rem; }
.fc-breadcrumb span { color: var(--fc-text-heading); font-weight: 500; }

/* --- 1H: Enhanced empty states --- */
.fc-empty-state-lg { padding: 4rem 2rem; text-align: center; color: var(--fc-text-muted); }
.fc-empty-icon {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--fc-primary-light); color: var(--fc-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.75rem; margin: 0 auto 1.25rem;
}
.fc-empty-title { font-size: 1.1rem; font-weight: 600; color: var(--fc-text-heading); margin: 0 0 0.5rem; }
.fc-empty-desc { font-size: 0.875rem; color: var(--fc-text-muted); margin: 0 0 1.5rem; }

/* --- 1I: Stat trend placeholder --- */
.fc-stat-trend {
  display: none;
  align-items: center; gap: 0.3rem;
  font-size: 0.75rem; font-weight: 600;
  margin-top: 0.25rem;
}
.fc-stat-trend.up { color: var(--fc-success); display: flex; }
.fc-stat-trend.down { color: var(--fc-danger); display: flex; }

/* --- 1J: Search/filter bar --- */
.fc-search-bar {
  display: flex; align-items: center; gap: 0.75rem;
  flex-wrap: wrap; margin-bottom: 1rem;
  padding: 0.75rem 1rem; background: var(--fc-bg-card);
  border: 1px solid var(--fc-border); border-radius: var(--fc-radius);
}
.fc-search-wrap {
  position: relative; flex: 1; min-width: 180px;
}
/* Ricerca e pillole: vedi "Filtri e campi in riga" più sotto. */
.fc-results-count {
  font-size: 0.78rem; color: var(--fc-text-muted); font-weight: 500;
  margin-left: auto; white-space: nowrap;
}

/* --- 1K: Save feedback icons --- */
.fc-save-feedback {
  display: inline-flex; align-items: center;
  font-size: 0.75rem; margin-left: 0.3rem;
  transition: opacity 0.4s ease;
}
.fc-save-feedback.success { color: var(--fc-success); }
.fc-save-feedback.error { color: var(--fc-danger); }

/* --- 1L: Table row hover --- */
.fc-doc-table tbody tr,
.fc-site-doc-table tbody tr,
.fc-file-table tbody tr {
  transition: background var(--fc-transition);
}
.fc-doc-table tbody tr:hover,
.fc-site-doc-table tbody tr:hover,
.fc-file-table tbody tr:hover {
  background: var(--fc-bg-card-hover);
}

/* --- 1M: Processing badge pulsing dot --- */
.fc-badge-processing::before {
  content: '';
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--fc-warning);
  margin-right: 5px;
  animation: fc-pulse 1.5s ease-in-out infinite;
  vertical-align: middle;
}

/* --- 1N: Stat icon hover micro-interaction --- */
.fc-stat-card .fc-stat-icon {
  transition: transform 0.2s ease;
}
.fc-stat-card:hover .fc-stat-icon {
  transform: scale(1.08);
}

/* --- 1O: Indeterminate progress bar --- */
.fc-progress-indeterminate {
  height: 4px; border-radius: 2px;
  background: var(--fc-bg-input); overflow: hidden; margin-top: 1rem;
  position: relative;
}
.fc-progress-indeterminate::after {
  content: '';
  display: block; height: 100%;
  background: linear-gradient(90deg, transparent 0%, var(--fc-primary) 50%, transparent 100%);
  animation: fc-progress-slide 1.5s ease-in-out infinite;
  width: 50%;
  position: absolute; top: 0; left: 0;
}

/* --- 1P: Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* --- 1Q: Mobile spacing --- */
@media (max-width: 640px) {
  .fc-main-content {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .fc-siti-header,
  .fc-jobs-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .fc-siti-actions-top {
    width: 100%;
  }
}

/* ============================================================
   PAGE LOADER — overlay con blur durante le navigazioni
   ============================================================ */

.fc-page-loader {
  position: fixed;
  top: 0;
  left: var(--fc-sidebar-w);
  width: calc(100% - var(--fc-sidebar-w));
  height: 100vh;
  z-index: 1050;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center,
    rgba(12, 12, 20, 0.45) 0%,
    rgba(17, 17, 25, 0.60) 60%,
    rgba(24, 24, 31, 0.75) 100%);
  backdrop-filter: blur(8px) saturate(160%);
  -webkit-backdrop-filter: blur(8px) saturate(160%);
  opacity: 1;
  visibility: visible;
  transition:
    opacity 0.45s cubic-bezier(0.4, 0, 0.2, 1),
    visibility 0.45s cubic-bezier(0.4, 0, 0.2, 1),
    left var(--fc-transition),
    width var(--fc-transition);
}

[data-theme="light"] .fc-page-loader {
  background: radial-gradient(ellipse at center,
    rgba(255, 255, 255, 0.55) 0%,
    rgba(236, 239, 247, 0.65) 60%,
    rgba(220, 226, 240, 0.75) 100%);
}

body.sidebar-collapsed .fc-page-loader {
  left: var(--fc-sidebar-collapsed-w);
  width: calc(100% - var(--fc-sidebar-collapsed-w));
}

body.page-loaded .fc-page-loader {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.fc-loader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.fc-loader-spinner {
  position: relative;
  width: 72px;
  height: 72px;
}

.fc-loader-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid transparent;
}

.fc-loader-ring-1 {
  border-top-color: var(--fc-primary);
  border-right-color: var(--fc-primary);
  animation: fc-loader-spin-cw 1.2s linear infinite;
}

.fc-loader-ring-2 {
  inset: 10px;
  border-bottom-color: var(--fc-accent);
  border-left-color: var(--fc-accent);
  animation: fc-loader-spin-ccw 1.6s linear infinite;
}

.fc-loader-ring-3 {
  inset: 20px;
  border-top-color: rgba(183, 208, 242, 0.85);
  border-right-color: rgba(183, 208, 242, 0.85);
  animation: fc-loader-spin-cw 2.0s linear infinite;
}

.fc-loader-core {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: var(--fc-primary);
  box-shadow: 0 0 12px var(--fc-primary-glow);
  animation: fc-loader-pulse 1.4s ease-in-out infinite;
}

.fc-loader-text {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--fc-text-secondary);
}

@keyframes fc-loader-spin-cw {
  to { transform: rotate(360deg); }
}

@keyframes fc-loader-spin-ccw {
  to { transform: rotate(-360deg); }
}

@keyframes fc-loader-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.6); opacity: 0.55; }
}

@media (max-width: 992px) {
  .fc-page-loader,
  body.sidebar-collapsed .fc-page-loader {
    left: 0;
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fc-loader-ring,
  .fc-loader-core {
    animation: none;
  }
  .fc-page-loader {
    transition: opacity 0.2s linear, visibility 0.2s linear;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Filtri e campi in riga (design "capsule")
   Forme a capsula, piatte (fondo uniforme e bordo sottile, niente ombre), per i
   campi modificabili delle tabelle documenti (Siti, Non raggruppati, Revisione
   job), la ricerca e i selettori dei filtri (etichetta accanto al selettore).
   Colori sobri: il Tipo è un'etichetta tenue nel colore del documento (palette
   della dashboard), la pillola attiva ha un punto, gli stati attivi usano la
   tinta primaria chiara.
   ═══════════════════════════════════════════════════════════════════════════ */
:root {
  /* Colori tipo documento (come il grafico della dashboard), in canali RGB */
  --fc-type-cil: 99 102 241;
  --fc-type-np: 168 85 247;
  --fc-type-dac: 34 197 94;
  --fc-type-ddt: 245 158 11;
  --fc-type-cui: 59 130 246;
  --fc-type-unknown: 148 163 184;
  /* Capsule: fondo uniforme + bordo sottile (box-shadow, così non cambia l'ingombro) */
  --fc-cap-surface: linear-gradient(#1c1c26, #1c1c26);
  --fc-cap-ring: 0 0 0 1px rgba(255, 255, 255, 0.08);
  --fc-cap-shadow: 0 0 #0000;
  --fc-cap-hover-ring: 0 0 0 1px rgba(43, 107, 232, 0.5);
  --fc-cap-focus: 0 0 0 1px var(--fc-primary), 0 0 0 4px var(--fc-primary-light);
  --fc-pill-dot: #6f9dff;
  --fc-filter-active-ink: #8fb3ff;
  /* Icone (grigio neutro, leggibile su entrambi i temi) */
  --fc-ic-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a94a6' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  --fc-ic-calendar: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238a94a6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4.5' width='18' height='16' rx='3'/%3E%3Cpath d='M3 9.5h18M8 2.5v4M16 2.5v4'/%3E%3C/svg%3E");
}
[data-theme="light"] {
  --fc-cap-surface: linear-gradient(#f6f7fa, #f6f7fa);
  --fc-cap-ring: 0 0 0 1px rgba(16, 24, 64, 0.11);
  --fc-cap-hover-ring: 0 0 0 1px rgba(0, 25, 108, 0.35);
  --fc-pill-dot: var(--fc-primary);
  --fc-filter-active-ink: var(--fc-primary);
}
[data-theme="dark"] .fc-doc-field-input,
[data-theme="dark"] .fc-filter-select { color-scheme: dark; }

/* ── Ricerca ────────────────────────────────────────────────────────────── */
.fc-search-input {
  width: 100%;
  padding: 0.55rem 1rem 0.55rem 2.4rem;
  background: var(--fc-cap-surface); border: none; border-radius: 999px;
  box-shadow: var(--fc-cap-ring);
  color: var(--fc-text); font-size: 0.85rem; font-family: var(--fc-font);
  transition: box-shadow var(--fc-transition);
}
.fc-search-input:hover { box-shadow: var(--fc-cap-hover-ring); }
.fc-search-input:focus { outline: none; box-shadow: var(--fc-cap-focus); }
.fc-search-icon {
  position: absolute; left: 0.95rem; top: 50%; transform: translateY(-50%);
  color: var(--fc-text-muted); font-size: 0.8rem; pointer-events: none;
}

/* ── Pillole: gruppo unico, voce attiva con un punto ────────────────────── */
.fc-filter-pills {
  display: flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: 14px;
  background: color-mix(in srgb, var(--fc-text) 4%, transparent);
  border: 1px solid var(--fc-border);
}
.fc-filter-pill {
  padding: 0.32rem 0.8rem; border-radius: 11px;
  font-size: 0.77rem; font-weight: 500; font-family: var(--fc-font);
  border: 1px solid transparent; background: transparent;
  color: var(--fc-text-secondary); cursor: pointer;
  transition: color var(--fc-transition), background var(--fc-transition), border-color var(--fc-transition);
}
.fc-filter-pill:hover { color: var(--fc-text-heading); background: color-mix(in srgb, var(--fc-text) 5%, transparent); }
.fc-filter-pill.active, .fc-filter-pill.active:hover {
  color: var(--fc-text-heading); font-weight: 600; padding-left: 1.35rem;
  background: radial-gradient(circle at 0.75rem 50%, var(--fc-pill-dot) 0 3px, transparent 3.6px), var(--fc-bg-card);
  border-color: var(--fc-border-hover);
}
[data-theme="dark"] .fc-filter-pill.active,
[data-theme="dark"] .fc-filter-pill.active:hover {
  background: radial-gradient(circle at 0.75rem 50%, var(--fc-pill-dot) 0 3px, transparent 3.6px), var(--fc-bg-card-hover);
}
/* Pillola singola (interruttore, es. "Solo i miei"): capsula, attiva in tinta primaria */
:not(.fc-filter-pills) > .fc-filter-pill {
  border-radius: 999px; background: var(--fc-cap-surface); border: none;
  box-shadow: var(--fc-cap-ring);
}
:not(.fc-filter-pills) > .fc-filter-pill:hover { box-shadow: var(--fc-cap-hover-ring); }
:not(.fc-filter-pills) > .fc-filter-pill.active,
:not(.fc-filter-pills) > .fc-filter-pill.active:hover {
  padding-left: 0.8rem; color: var(--fc-filter-active-ink); background: var(--fc-primary-light);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--fc-primary) 50%, transparent);
}

/* ── Selettori dei filtri: etichetta accanto, selettore a capsula ───────── */
.fc-filter-group { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.fc-filter-label {
  font-size: 0.75rem; font-weight: 600; color: var(--fc-text-secondary);
  display: inline-flex; align-items: center; gap: 0.35rem; white-space: nowrap;
}
.fc-filter-label i { font-size: 0.8rem; color: var(--fc-text-muted); }
.fc-filter-select {
  -webkit-appearance: none; appearance: none; cursor: pointer;
  font-family: var(--fc-font); font-size: 0.8rem; font-weight: 500; color: var(--fc-text);
  padding: 0.4rem 2rem 0.4rem 0.85rem; border: none; border-radius: 999px;
  background: var(--fc-ic-chevron) no-repeat right 0.75rem center / 12px, var(--fc-cap-surface);
  box-shadow: var(--fc-cap-ring);
  transition: box-shadow var(--fc-transition), color var(--fc-transition);
}
.fc-filter-select:hover { box-shadow: var(--fc-cap-hover-ring); }
.fc-filter-select:focus, .fc-filter-select.open { outline: none; box-shadow: var(--fc-cap-focus); }
.fc-filter-select:disabled { opacity: 0.55; cursor: not-allowed; }
/* Filtro applicato (pulsanti a tendina della vista Non raggruppati) */
.fc-filter-select.active {
  color: var(--fc-filter-active-ink); font-weight: 600;
  background: var(--fc-ic-chevron) no-repeat right 0.75rem center / 12px, var(--fc-primary-light);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--fc-primary) 50%, transparent);
}
/* Campo data con classe filtro (es. log attività in admin): capsula con icona calendario */
input.fc-filter-select[type="date"] {
  position: relative; padding: 0.4rem 0.85rem 0.4rem 1.95rem;
  background: var(--fc-ic-calendar) no-repeat 0.75rem 50% / 13px 13px, var(--fc-cap-surface);
}
input.fc-filter-select[type="date"]::-webkit-calendar-picker-indicator {
  position: absolute; inset: 0; width: auto; height: auto; opacity: 0; cursor: pointer;
}

/* ── Campi in riga: capsule piatte e compatte ───────────────────────────── */
.fc-doc-field-input {
  position: relative; width: 100%; min-height: 30px;
  padding: 0.32rem 0.6rem; border: none; border-radius: 999px;
  font-family: var(--fc-font); font-size: 0.82rem; font-weight: 500;
  color: var(--fc-text-heading); font-variant-numeric: tabular-nums;
  background: var(--fc-cap-surface); box-shadow: var(--fc-cap-ring);
  transition: box-shadow var(--fc-transition), color var(--fc-transition);
}
.fc-doc-field-input::placeholder { color: var(--fc-text-muted); opacity: 0.6; }
input.fc-doc-field-input[data-field="oda"] { width: 110px; }
input.fc-doc-field-input[data-field="codice_sito"] { width: 80px; }
input.fc-doc-field-input[data-field="nome_sito"] { width: 120px; }
/* Data: unica icona (il campo apre il calendario in qualsiasi punto) */
input.fc-doc-field-input[type="date"] {
  width: 128px; padding-left: 1.75rem; padding-right: 0.45rem;
  background: var(--fc-ic-calendar) no-repeat 0.65rem 50% / 13px 13px, var(--fc-cap-surface);
}
input.fc-doc-field-input[type="date"]::-webkit-calendar-picker-indicator {
  position: absolute; inset: 0; width: auto; height: auto; opacity: 0; cursor: pointer;
}
.fc-doc-field-input:not(:disabled):hover { box-shadow: var(--fc-cap-hover-ring); }
.fc-doc-field-input:focus { outline: none; box-shadow: var(--fc-cap-focus); }
.fc-doc-field-input.changed { box-shadow: 0 0 0 1px var(--fc-warning), 0 0 0 4px var(--fc-warning-bg); }
.fc-doc-field-input:disabled {
  cursor: not-allowed; color: var(--fc-text-secondary);
  background: transparent; box-shadow: 0 0 0 1px var(--fc-border);
}
input.fc-doc-field-input[type="date"]:disabled { background: var(--fc-ic-calendar) no-repeat 0.65rem 50% / 13px 13px; }

/* Tipo: etichetta tenue nel colore del documento (stato letto dall'opzione selezionata) */
select.fc-doc-field-input {
  --tok: var(--fc-type-unknown);
  -webkit-appearance: none; appearance: none; cursor: pointer;
  width: auto; min-width: 78px; min-height: 28px;
  padding: 0.28rem 1.65rem 0.28rem 0.75rem;
  font-size: 0.74rem; font-weight: 700; letter-spacing: 0.05em;
  color: color-mix(in srgb, rgb(var(--tok)) 82%, #fff);
  background: var(--fc-ic-chevron) no-repeat right 0.6rem center / 11px, rgb(var(--tok) / 0.14);
  box-shadow: 0 0 0 1px rgb(var(--tok) / 0.32);
}
[data-theme="light"] select.fc-doc-field-input { color: color-mix(in srgb, rgb(var(--tok)) 70%, #000); }
select.fc-doc-field-input:has(option[value="CIL"]:checked) { --tok: var(--fc-type-cil); }
select.fc-doc-field-input:has(option[value="NP"]:checked) { --tok: var(--fc-type-np); }
select.fc-doc-field-input:has(option[value="DAC"]:checked) { --tok: var(--fc-type-dac); }
select.fc-doc-field-input:has(option[value="DDT"]:checked) { --tok: var(--fc-type-ddt); }
select.fc-doc-field-input:has(option[value="CUI"]:checked) { --tok: var(--fc-type-cui); }
select.fc-doc-field-input:not(:disabled):hover {
  background-color: rgb(var(--tok) / 0.2); box-shadow: 0 0 0 1px rgb(var(--tok) / 0.5);
}
select.fc-doc-field-input:focus { box-shadow: 0 0 0 1px rgb(var(--tok) / 0.7), 0 0 0 4px rgb(var(--tok) / 0.15); }
select.fc-doc-field-input.changed { box-shadow: 0 0 0 1px var(--fc-warning), 0 0 0 4px var(--fc-warning-bg); }
select.fc-doc-field-input:disabled {
  opacity: 0.7; background: rgb(var(--tok) / 0.08); box-shadow: 0 0 0 1px rgb(var(--tok) / 0.18);
}
select.fc-doc-field-input option { color: var(--fc-text); background: var(--fc-bg-card); font-weight: 500; letter-spacing: 0; }
