:root {
  --ink-950: #1a2129;
  --accent: #0d9488;
}

html {
  scroll-behavior: smooth;
}

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

@keyframes soft-pulse {
  0%,
  100% {
    opacity: 0.45;
  }
  50% {
    opacity: 0.75;
  }
}

.animate-fade-up {
  animation: fade-up 0.55s ease-out both;
}

.animate-fade-up-delay {
  animation: fade-up 0.65s ease-out 0.12s both;
}

.animate-glow {
  animation: soft-pulse 6s ease-in-out infinite;
}

.login-grid {
  background-image:
    radial-gradient(circle at 20% 20%, rgba(13, 148, 136, 0.18), transparent 42%),
    radial-gradient(circle at 80% 0%, rgba(90, 115, 138, 0.22), transparent 36%),
    linear-gradient(160deg, #1a2129 0%, #2c3742 48%, #1f2933 100%);
}

.app-shell {
  background-color: #eef2f5;
  background-image:
    radial-gradient(ellipse 80% 50% at 0% -10%, rgba(13, 148, 136, 0.14), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(90, 115, 138, 0.12), transparent 50%),
    linear-gradient(180deg, #f7f9fb 0%, #eef2f5 40%, #e8edf2 100%);
  min-height: 100vh;
}

.app-frame {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 640px) {
  .app-frame {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

/* Tabela raportów: prawie cała szerokość okna, lekki margines boczny. */
.reports-table-shell {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

@media (min-width: 640px) {
  .reports-table-shell {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
}

@media (min-width: 1024px) {
  .reports-table-shell {
    padding-left: 1.75rem;
    padding-right: 1.75rem;
  }
}

.glass-nav {
  background:
    radial-gradient(ellipse 70% 120% at 0% 0%, rgba(13, 148, 136, 0.28), transparent 55%),
    radial-gradient(ellipse 50% 100% at 100% 100%, rgba(20, 184, 166, 0.12), transparent 45%),
    linear-gradient(180deg, #1f2933 0%, #1a2129 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 40px -18px rgba(26, 33, 41, 0.65);
}

.nav-link {
  position: relative;
  color: rgba(255, 255, 255, 0.62);
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: color 0.15s ease, background 0.15s ease;
  padding: 0.4rem 0.7rem;
  border-radius: 0.65rem;
}

.nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.nav-link[aria-current="page"] {
  color: #fff;
  font-weight: 650;
  background: rgba(13, 148, 136, 0.22);
  box-shadow: inset 0 0 0 1px rgba(45, 212, 191, 0.35);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 0.5rem;
  padding: 0.2rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
}

.status-uploaded,
.status-draft { background: #f1f5f9; color: #475569; }
.status-parsed,
.status-validated { background: #e0f2fe; color: #0369a1; }
.status-ready,
.status-allocated { background: #ccfbf1; color: #0f766e; }
.status-exported { background: #dbeafe; color: #1d4ed8; }
.status-locked { background: #e2e8f0; color: #334155; }
.status-generated { background: #fef3c7; color: #b45309; }
.status-paid { background: #d1fae5; color: #047857; }
.status-scheduled { background: #e0e7ff; color: #4338ca; }
.status-pending { background: #f1f5f9; color: #475569; }

.custom-select {
  position: relative;
  width: 100%;
}

.custom-select-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.custom-select-trigger {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border-radius: 0.75rem;
  border: 1px solid #c9d3dd;
  background: #fff;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: #2c3742;
  text-align: left;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
}

.custom-select-trigger:hover {
  border-color: #a3b3c4;
}

.custom-select.is-open .custom-select-trigger,
.custom-select-trigger:focus {
  outline: none;
  border-color: #0d9488;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.2);
}

.custom-select-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-select-chevron {
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  color: #768fa5;
  transition: transform 0.15s ease;
}

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

.custom-select-menu {
  position: absolute;
  z-index: 50;
  top: calc(100% + 0.35rem);
  left: 0;
  right: 0;
  display: none;
  max-height: 16rem;
  overflow: auto;
  border-radius: 0.9rem;
  border: 1px solid #e4e9ee;
  background: #fff;
  padding: 0.35rem;
  box-shadow: 0 18px 40px -20px rgba(26, 33, 41, 0.45);
}

.custom-select.is-open .custom-select-menu {
  display: block;
}

.custom-select-option {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 0.65rem;
  background: transparent;
  padding: 0.65rem 0.85rem;
  text-align: left;
  font-size: 0.875rem;
  color: #2c3742;
  cursor: pointer;
}

.custom-select-option:hover,
.custom-select-option.is-active {
  background: #f0fdfa;
  color: #0f766e;
}

.custom-select-option.is-selected {
  background: #ccfbf1;
  color: #0f766e;
  font-weight: 600;
}

.flatpickr-wrapper {
  display: block;
  width: 100%;
}

input.flatpickr-input,
input.flatpickr-alt-input {
  width: 100% !important;
  box-sizing: border-box;
}

.stat-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.82));
  box-shadow: 0 10px 40px -20px rgba(26, 33, 41, 0.35);
}

.panel-card {
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 12px 40px -24px rgba(26, 33, 41, 0.4);
}
