/* kwit*fit — Dark theme */

:root {
  --bg: #111111;
  --bg-surface: #1a1a1a;
  --bg-elevated: #222222;
  --text: #C8D0E0;
  --text-muted: #8892a4;
  --accent: #FF6B00;
  --accent-hover: #FF8533;
  --border: #333333;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-hover);
}

/* Navbar */

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 60px;
}

.navbar-wrapper {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
}

.navbar-brand .logo {
  font-family: var(--font);
  font-weight: 900;
  font-size: 1.5rem;
  color: var(--text);
  letter-spacing: -0.02em;
}

.navbar-brand .logo:hover {
  color: var(--text);
}

.logo-kwit {
  color: var(--text);
}

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

.logo-fit {
  color: var(--accent);
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.navbar-links a {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: color 0.15s;
}

.navbar-links a:hover {
  color: var(--text);
}

/* Container */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

/* Flash messages */

.flash {
  padding: 0.75rem 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

.flash-notice {
  background: rgba(255, 107, 0, 0.1);
  border: 1px solid var(--accent);
  color: var(--accent);
}

.flash-alert {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid #ef4444;
  color: #ef4444;
}

/* Headings */

h1, h2, h3, h4, h5, h6 {
  color: var(--text);
  font-weight: 700;
  line-height: 1.3;
}

h1 { font-size: 2rem; margin-bottom: 1.5rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }

/* Landing page */

.landing {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-height: calc(100vh - 60px);
  gap: 0;
  padding-bottom: 10rem;
}

/* Hero section */
.landing-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 6rem 1.5rem 4rem;
  width: 100%;
  animation: fadeInUp 0.6s ease-out;
}

.landing-logo {
  font-family: var(--font);
  font-weight: 900;
  font-size: 5rem;
  letter-spacing: -0.04em;
  line-height: 1;
}

.landing-tagline {
  color: var(--text);
  font-size: 1.5rem;
  font-weight: 300;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

/* Animated profession carousel */
.landing-carousel {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 1.125rem;
  color: var(--text-muted);
  height: 1.8rem;
  overflow: hidden;
}

.landing-carousel-prefix {
  opacity: 0.6;
}

.landing-carousel-track {
  display: flex;
  flex-direction: column;
  animation: carousel-scroll 12s cubic-bezier(0.45, 0, 0.55, 1) infinite;
  height: 1.8rem;
}

.landing-carousel-slide {
  height: 1.8rem;
  line-height: 1.8rem;
  color: var(--accent);
  font-weight: 600;
  white-space: nowrap;
}

@keyframes carousel-scroll {
  0%, 12% { transform: translateY(0); }
  16.66%, 28.66% { transform: translateY(-1.8rem); }
  33.33%, 45.33% { transform: translateY(-3.6rem); }
  50%, 62% { transform: translateY(-5.4rem); }
  66.66%, 78.66% { transform: translateY(-7.2rem); }
  83.33%, 95.33% { transform: translateY(-9rem); }
  100% { transform: translateY(0); }
}

.landing-cta {
  margin-top: 1.5rem;
  font-size: 1rem;
  padding: 0.875rem 2.5rem;
  border-radius: 10px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.landing-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(255, 107, 0, 0.3);
}

/* Manual carousel — full width, arrows */
.landing-slides {
  width: 100%;
  overflow: hidden;
  margin-top: 2rem;
  position: relative;
}

.landing-slides-track {
  display: flex;
  transition: transform 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
  /* JS sets this via controller, fallback to slide 1 */
  transform: translateX(-100%);
}

.landing-slide {
  width: 100%;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 2rem 3rem;
}

/* Slide label */
.slide-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  opacity: 0.6;
}

/* Slide: payment icons */
.slide-icons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

.slide-img {
  height: 36px;
  width: auto;
  opacity: 0.7;
}

/* Slide: flow */
.slide-flow {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.slide-flow-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 500;
  opacity: 0.8;
}

.slide-flow-accent {
  color: var(--accent);
}

.slide-flow-arrow {
  color: var(--text);
  opacity: 0.4;
  font-size: 1.5rem;
}

/* Slide: delivery */
.slide-delivery {
  display: flex;
  align-items: center;
  gap: 3rem;
}

.slide-delivery-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 500;
  opacity: 0.8;
}

/* Navigation dots */
.landing-slides-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.slide-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: var(--text-muted);
  opacity: 0.25;
  cursor: pointer;
  padding: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.slide-dot-active {
  opacity: 0.8;
  transform: scale(1.3);
  background: var(--accent);
}

/* Arrow navigation */
.slide-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 2.5rem;
  cursor: pointer;
  padding: 0.5rem;
  opacity: 0.3;
  transition: opacity 0.2s ease;
  z-index: 2;
  line-height: 1;
}

.slide-nav:hover {
  opacity: 0.8;
  color: var(--accent);
}

.slide-nav-left { left: 1rem; }
.slide-nav-right { right: 1rem; }

/* Bottom bar: strip + eagle pinned to viewport bottom */
.landing-bottom {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 10;
}

/* Feature strip */
.landing-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  padding: 0.75rem 1.5rem;
  width: 100%;
  border-top: 1px solid var(--border);
  background: rgba(26, 26, 26, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.landing-strip-group {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.landing-strip-label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  opacity: 0.5;
}

.landing-strip-icons {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.landing-strip-divider {
  width: 1px;
  height: 24px;
  background: var(--border);
}

.landing-icon-img {
  width: auto;
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.landing-icon-img:hover {
  opacity: 1;
}

/* Per-logo height tuning for equal visual weight */
.icon-blik { height: 16px; }
.icon-revolut { height: 14px; }
.icon-applepay { height: 18px; }
.icon-googlepay { height: 18px; }

.landing-delivery-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  opacity: 0.7;
}

/* Info box — inside landing-bottom, below strip */
.landing-info-box {
  border-top: 1px solid var(--border);
  padding: 1rem 2.25rem;
  width: 100%;
  background: rgba(26, 26, 26, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.landing-info-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  max-width: 600px;
  margin: 0 auto;
}

.landing-info-eagle {
  flex-shrink: 0;
  width: 48px;
}

.landing-info-eagle img {
  width: 48px;
  height: auto;
  opacity: 0.75;
}

.landing-info-text {
  flex: 1;
}

.landing-info-description {
  color: var(--text);
  font-size: 0.8125rem;
  line-height: 1.6;
  opacity: 0.75;
  text-align: left;
}

.landing-info-link {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  opacity: 0.8;
  text-decoration: none;
  text-align: left;
  transition: opacity 0.2s ease;
}

.landing-info-link:hover {
  opacity: 1;
  color: var(--accent-hover);
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Mobile adjustments */
@media (max-width: 640px) {
  .landing-hero { padding: 4rem 1.5rem 3rem; }
  .landing-logo { font-size: 3.5rem; }
  .landing-tagline { font-size: 1.2rem; white-space: normal; }
  .landing-strip { flex-direction: column; gap: 1.5rem; }
  .landing-strip-divider { width: 40px; height: 1px; }
  .landing-strip-group { flex-direction: column; gap: 0.5rem; }
  .landing-info-content { gap: 1rem; }
  .landing-info-description { font-size: 0.75rem; }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: #fff;
}

.btn-oauth {
  display: flex;
  align-items: center;
  position: relative;
}

.btn-oauth-icon {
  position: absolute;
  left: 1.25rem;
  display: flex;
  align-items: center;
}

.btn-oauth-label {
  flex: 1;
  text-align: center;
}

.btn-facebook {
  background: #1877F2;
  color: #fff;
}

.btn-facebook:hover {
  background: #166FE5;
  color: #fff;
}

/* Page stubs */

.page-stub {
  padding: 3rem 0;
}

.page-stub h1 {
  margin-bottom: 0.5rem;
}

.page-stub p {
  color: var(--text-muted);
}

/* Navbar logout button */

.btn-link {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  padding: 0;
  transition: color 0.15s;
}

.btn-link:hover {
  color: var(--text);
}

/* Login page */

.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 60px - 4rem);
}

.login-card {
  text-align: center;
  max-width: 400px;
  width: 100%;
}

.login-card h1 {
  margin-bottom: 0.5rem;
}

.login-subtitle {
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.login-methods {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-hint {
  color: var(--text-muted);
  font-size: 0.75rem;
  margin-top: 0.5rem;
  opacity: 0.7;
}

.form-hint i {
  color: var(--accent);
  margin-right: 0.25rem;
}

.email-login-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.email-login-form .form-group {
  margin-bottom: 0;
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--text-muted);
  font-size: 0.8125rem;
}

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

.login-resend {
  margin-top: 1.5rem;
  text-align: center;
}

.btn-google {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.15s;
}

.btn-google:hover {
  background: var(--bg-surface);
  border-color: var(--text-muted);
  color: var(--text);
}

/* Forms */

.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.375rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-input {
  width: 100%;
  padding: 0.625rem 0.75rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.9375rem;
  transition: border-color 0.15s;
}

.form-input:focus {
  outline: none;
  border-color: var(--accent);
}

.form-input[readonly] {
  opacity: 0.6;
  cursor: not-allowed;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 1rem;
}

.btn-full {
  width: 100%;
  margin-top: 0.5rem;
}

/* Onboarding */

.onboarding-page {
  max-width: 560px;
  margin: 0 auto;
  padding-top: 2rem;
}

.onboarding-subtitle {
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.onboarding-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
}

.nip-input-row {
  display: flex;
  gap: 0.75rem;
}

.nip-input-row .form-input {
  flex: 1;
}

/* Company data results */

.company-data-found {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.company-source {
  color: var(--text-muted);
  font-size: 0.8125rem;
  margin-bottom: 1rem;
}

/* NIP Verification */

.verification-success {
  padding: 0.75rem 1rem;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 8px;
  margin-bottom: 1.5rem;
  color: #22C55E;
  font-size: 0.875rem;
  font-weight: 500;
}

.verification-pending {
  margin-bottom: 1.5rem;
}

.verification-pending h3 {
  margin-bottom: 0.25rem;
}

.verification-notice {
  padding: 0.75rem 1rem;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 8px;
  margin-bottom: 1.5rem;
  color: #F59E0B;
  font-size: 0.875rem;
}

.verification-code-input {
  font-size: 1.5rem !important;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-align: center;
}

.verification-actions {
  margin-top: 0.5rem;
}

.verification-links {
  display: flex;
  justify-content: space-between;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.verification-links .btn-link {
  font-size: 0.8125rem;
}

.company-not-found {
  margin-top: 1.5rem;
  padding: 1rem;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid #ef4444;
  border-radius: 6px;
  color: #ef4444;
  font-size: 0.875rem;
}

/* Status badges */

.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 700;
}

.badge-draft { background: #374151; color: #9CA3AF; }
.badge-sent { background: rgba(59,130,246,0.2); color: #3B82F6; }
.badge-partial { background: rgba(245,158,11,0.2); color: #F59E0B; }
.badge-paid { background: rgba(34,197,94,0.2); color: #22C55E; }
.badge-pending { background: #374151; color: #9CA3AF; }
.badge-failed { background: rgba(239,68,68,0.2); color: #EF4444; }

/* Tables */

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid #2D2D3D;
}

.data-table th {
  color: #FF6B00;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Cards */

.card {
  background: #1A1A2E;
  border: 1px solid #2D2D3D;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.card-header {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1rem;
}

/* Invoice pages */

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

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

.empty-state {
  text-align: center;
  padding: 3rem 0;
  color: var(--text-muted);
}

.empty-state p {
  margin-bottom: 1rem;
}

.btn-danger-text {
  color: #EF4444 !important;
  font-size: 0.8rem;
}

.btn-danger-text:hover {
  color: #F87171 !important;
}

.form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
}

.radio-group {
  display: flex;
  gap: 1.5rem;
  padding: 0.5rem 0;
}

/* Toggle switch (Email / SMS) */

.toggle-switch {
  display: inline-flex;
  align-self: stretch;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}

.toggle-switch input[type="radio"] {
  display: none;
}

.toggle-switch label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.625rem 1.25rem;
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  border-right: 1px solid var(--border);
}

.toggle-switch label:last-of-type {
  border-right: none;
}

.toggle-switch input[type="radio"]:checked + label {
  background: var(--accent);
  color: #fff;
}

.toggle-switch-compact {
  align-self: stretch;
}

.toggle-switch-compact label {
  padding: 0.625rem 0.75rem;
  font-size: 0.875rem;
}

.radio-group label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text);
  font-size: 0.875rem;
  cursor: pointer;
}

.recipient-form {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #2D2D3D;
}

select.form-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238892a4' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

select.form-input option {
  background: var(--bg-elevated);
  color: var(--text);
  padding: 0.5rem;
}

/* Custom select */

.custom-select {
  position: relative;
  cursor: pointer;
}

.custom-select-trigger {
  display: flex;
  align-items: center;
  padding: 0.625rem 0.75rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.9375rem;
  transition: border-color 0.15s;
}

.custom-select-trigger:hover {
  border-color: var(--accent);
}

.custom-select-trigger .custom-select-example {
  flex: 1;
  font-family: "SF Mono", "Fira Code", monospace;
  font-size: 0.875rem;
}

.custom-select-trigger .custom-select-reset {
  color: var(--text-muted);
  font-size: 0.75rem;
  margin-right: 0.75rem;
}

.custom-select-arrow {
  color: var(--text-muted);
  font-size: 0.625rem;
}

.custom-select-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  z-index: 100;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.custom-select-dropdown.custom-select-open {
  display: block;
}

.custom-select-option {
  display: flex;
  align-items: center;
  padding: 0.625rem 0.75rem;
  transition: background 0.1s;
}

.custom-select-option:hover {
  background: rgba(255, 107, 0, 0.1);
}

.custom-select-option-active {
  background: rgba(255, 107, 0, 0.15);
  border-left: 3px solid var(--accent);
}

.custom-select-option .custom-select-example {
  flex: 1;
  font-family: "SF Mono", "Fira Code", monospace;
  font-size: 0.875rem;
  color: var(--text);
}

.custom-select-option .custom-select-reset {
  color: var(--text-muted);
  font-size: 0.75rem;
  text-align: right;
  min-width: 120px;
}

/* Numbering inline row */

.numbering-row {
  display: flex;
  gap: 1rem;
  align-items: flex-end;
}

.numbering-prefix {
  flex: 0 0 100px;
}

.numbering-pattern {
  flex: 1;
}

.numbering-save {
  flex: 0 0 auto;
}

.numbering-save .btn {
  white-space: nowrap;
}

/* Dashboard */

.dashboard-page .page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.stat-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: #1A1A2E;
  border: 1px solid #2D2D3D;
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
}

.stat-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
}

.stat-value-paid {
  color: #22C55E;
}

/* Locale selector */

.locale-selector {
  display: flex;
  gap: 0.75rem;
}

.locale-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid #2D2D3D;
  border-radius: 10px;
  color: #C8D0E0;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.locale-btn:hover {
  border-color: #FF6B00;
  background: rgba(255, 107, 0, 0.05);
}

.locale-active {
  border-color: #FF6B00;
  background: rgba(255, 107, 0, 0.1);
  color: #FF6B00;
}

.locale-flag {
  font-size: 1.4rem;
  line-height: 1;
}

/* Type selector (invoice new) */

.type-selector {
  display: flex;
  gap: 0.75rem;
}

.type-option {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.2rem;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid #2D2D3D;
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  flex: 1;
}

.type-option:hover {
  border-color: #FF6B00;
  background: rgba(255, 107, 0, 0.05);
}

.type-option-active {
  border-color: #FF6B00;
  background: rgba(255, 107, 0, 0.1);
}

.type-option strong {
  display: block;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.type-option .text-muted {
  font-size: 0.8125rem;
}

.type-option input[type="radio"] {
  margin-top: 0.2rem;
  accent-color: #FF6B00;
}

/* Pattern selector (settings) */

.pattern-selector {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pattern-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid #2D2D3D;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.pattern-option:hover {
  border-color: #FF6B00;
  background: rgba(255, 107, 0, 0.05);
}

.pattern-option-active {
  border-color: #FF6B00;
  background: rgba(255, 107, 0, 0.1);
}

.pattern-option input[type="radio"] {
  accent-color: #FF6B00;
}

.pattern-option code {
  font-family: "SF Mono", "Fira Code", "Fira Mono", monospace;
  font-size: 0.9rem;
  color: var(--text);
  min-width: 200px;
}

.pattern-reset {
  font-size: 0.75rem;
  margin-left: auto;
}

/* Invoice type badges */

.badge-single { background: rgba(59,130,246,0.2); color: #3B82F6; }
.badge-group { background: rgba(168,85,247,0.2); color: #A855F7; }

/* Autocomplete */

.autocomplete-wrapper { position: relative; }

.autocomplete-results {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 0 0 8px 8px;
  z-index: 100;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  max-height: 240px;
  overflow-y: auto;
}

.autocomplete-results.open { display: block; }

.autocomplete-result {
  padding: 0.625rem 0.75rem;
  cursor: pointer;
  transition: background 0.1s;
}

.autocomplete-result:hover { background: rgba(255, 107, 0, 0.1); }

.autocomplete-result-name { color: var(--text); font-size: 0.9rem; }
.autocomplete-result-detail { color: var(--text-muted); font-size: 0.75rem; }

/* Invoice items (multi-product form) */

.invoice-items-row {
  display: grid;
  grid-template-columns: 1fr 120px 100px 60px 32px;
  gap: 0.75rem;
  align-items: end;
  margin-bottom: 0.75rem;
}

.invoice-items-add {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: none;
  border: 1px dashed var(--border);
  border-radius: 6px;
  color: var(--accent);
  font-family: var(--font);
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  margin-top: 0.25rem;
}

.invoice-items-add:hover {
  border-color: var(--accent);
  background: rgba(255, 107, 0, 0.05);
}

.invoice-items-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 38px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: #EF4444;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  padding: 0;
}

.invoice-items-remove:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: #EF4444;
}

/* Recipient rows in form */

.recipient-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto 32px;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.75rem;
}

/* Template cards */

.template-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.template-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.75rem;
}

.template-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}

.template-card-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.template-card-body strong {
  font-size: 0.9rem;
  color: var(--text);
}

.badge-sm {
  font-size: 0.65rem;
  padding: 0.1rem 0.4rem;
}

/* Accent button (orange) */

.btn-accent {
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}

.btn-accent:hover {
  background: var(--accent-hover);
  color: #fff;
}

/* Small button */

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.8125rem;
}

/* Outline buttons */
.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: border-color 0.15s, color 0.15s;
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-danger-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: border-color 0.15s, color 0.15s;
}
.btn-danger-outline:hover {
  border-color: #ef4444;
  color: #ef4444;
}

/* Actions cell */
.actions-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
}
.actions-cell .btn,
.actions-cell form { width: auto; }
.actions-cell .btn-outline,
.actions-cell .btn-danger-outline {
  padding: 0.3rem 0.6rem;
  font-size: 0.75rem;
  width: 5.5rem;
  justify-content: center;
}

/* Checkbox label */

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text);
}

.checkbox-label input[type="checkbox"] {
  accent-color: var(--accent);
  width: 1rem;
  height: 1rem;
}

/* Custom confirmation modal */
.confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.confirm-overlay.confirm-visible { opacity: 1; }

.confirm-modal {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  max-width: 360px;
  width: 90%;
  transform: scale(0.95);
  transition: transform 0.15s ease;
}
.confirm-visible .confirm-modal { transform: scale(1); }

.confirm-message {
  color: var(--text);
  font-size: 0.95rem;
  margin: 0 0 1.25rem;
  line-height: 1.4;
}

.confirm-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

.confirm-btn {
  padding: 0.45rem 1rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background 0.15s ease;
}

.confirm-btn-cancel {
  background: var(--bg-surface);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.confirm-btn-cancel:hover {
  background: var(--border);
  color: var(--text);
}

.confirm-btn-confirm {
  background: var(--accent);
  color: #fff;
}
.confirm-btn-confirm:hover {
  background: var(--accent-hover);
}

/* Template card delete button */
.template-card {
  position: relative;
}

.template-delete {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.template-card:hover .template-delete {
  opacity: 1;
}

.template-delete button {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  line-height: 1;
  transition: color 0.15s ease, background 0.15s ease;
}

.template-delete button:hover {
  color: #ef4444;
  background: rgba(239,68,68,0.1);
}
