:root {
  --app-primary: #1e3a5f;
  --app-primary-light: #2d5a8a;
  --app-accent: #0d9488;
  --app-bg: #f4f6f9;
  --app-card-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);
}

html {
  font-size: 14px;
  position: relative;
  min-height: 100%;
}

@media (min-width: 768px) {
  html {
    font-size: 15px;
  }
}

body {
  margin-bottom: 60px;
  background-color: var(--app-bg);
  color: #1a1a2e;
}

.app-header .navbar {
  background: linear-gradient(135deg, var(--app-primary) 0%, var(--app-primary-light) 100%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.app-header .nav-link {
  color: rgba(255, 255, 255, 0.85) !important;
  border-radius: 0.375rem;
  padding: 0.5rem 0.85rem !important;
  transition: background 0.15s;
}

.app-header .nav-link:hover {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.12);
}

.btn-accent {
  background-color: var(--app-accent);
  border-color: var(--app-accent);
  color: #fff;
}

.btn-accent:hover {
  background-color: #0f766e;
  border-color: #0f766e;
  color: #fff;
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.375rem;
}
}

.app-footer {
  position: absolute;
  bottom: 0;
  width: 100%;
  padding: 1rem 0;
  border-top: 1px solid #dee2e6;
  background: #fff;
}

.page-title {
  font-weight: 600;
  color: var(--app-primary);
}

.card-modern {
  border: none;
  border-radius: 0.75rem;
  box-shadow: var(--app-card-shadow);
  background: #fff;
}

.card-modern .card-header {
  background: #fff;
  border-bottom: 1px solid #eef0f3;
  font-weight: 600;
  padding: 1rem 1.25rem;
  border-radius: 0.75rem 0.75rem 0 0 !important;
}

.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6c757d;
  margin-bottom: 0.75rem;
}

.status-badge-draft {
  background-color: #fff3cd;
  color: #856404;
}

.status-badge-posted {
  background-color: #d1e7dd;
  color: #0f5132;
}

.table-modern thead th {
  background: #f8f9fb;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #6c757d;
  border-bottom-width: 1px;
  white-space: nowrap;
}

.table-modern tbody tr:hover {
  background-color: #f8fafc;
}

.action-bar {
  position: sticky;
  bottom: 0;
  background: #fff;
  border-top: 1px solid #dee2e6;
  padding: 1rem 1.25rem;
  margin: 1.5rem -1.25rem -1.25rem;
  border-radius: 0 0 0.75rem 0.75rem;
  z-index: 10;
}

.invoice-line-row {
  background: #fff;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.invoice-line-row:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
}

.invoice-line-row .card-header {
  border-radius: 0.375rem 0.375rem 0 0 !important;
}

.totals-panel {
  background: linear-gradient(135deg, #f8fafc 0%, #eef2f7 100%);
  border-radius: 0.5rem;
  padding: 1.25rem;
}

.totals-panel .total-row {
  display: flex;
  justify-content: space-between;
  padding: 0.35rem 0;
}

.totals-panel .grand-total {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--app-primary);
  border-top: 2px solid #dee2e6;
  margin-top: 0.5rem;
  padding-top: 0.75rem;
}

.search-bar {
  max-width: 320px;
}

.product-search-input {
  min-width: calc(20rem);
  max-width: calc(60rem);
}

.product-search-input:focus {
  width: min(60rem, calc(100vw - 2rem));
}

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: #6c757d;
}

.empty-state i {
  font-size: 3rem;
  opacity: 0.4;
  margin-bottom: 1rem;
}

.form-floating > label {
  color: #6c757d;
}

.searchable-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 1050;
  max-height: 240px;
  overflow-y: auto;
  margin-top: 2px;
  border-radius: 0.375rem;
}

.searchable-results .list-group-item {
  border-left: none;
  border-right: none;
}

.searchable-results .list-group-item:first-child {
  border-top: none;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.2rem rgba(13, 148, 136, 0.35);
}


/* ALL ABOVE IS AUTO GENERATED BY AI AND FOLLOWING BY ME*/

.card.readonly {
    pointer-events: none; /* disables clicks */
    opacity: 0.6; /* faded look */
}

.auth-shell {
  min-height: calc(100vh - 8rem);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 0;
}

.auth-card {
  border: none;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.16);
  background: #fff;
}

.auth-panel {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-panel--highlight {
  background: linear-gradient(135deg, #0f172a 0%, #2563eb 45%, #7c3aed 100%);
  color: #fff;
}

.auth-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  width: fit-content;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.auth-title {
  font-size: 1.7rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.auth-subtitle {
  color: #e2e8f0;
  margin-bottom: 1rem;
}

.auth-illustration {
  margin-top: 1rem;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 18px;
  padding: 1rem;
  display: flex;
  justify-content: center;
}

.auth-illustration svg {
  width: 100%;
  max-width: 220px;
  height: auto;
}

.auth-form-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 0.35rem;
}

.auth-form-text {
  color: #6b7280;
  margin-bottom: 1.25rem;
}

.auth-input {
  border-radius: 14px;
  border: 1px solid #dbe3ee;
  padding: 0.85rem 1rem;
  background: #f8fafc;
  transition: all 0.2s ease;
}

.auth-input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.16);
  background: #fff;
}

.auth-btn {
  border: none;
  border-radius: 14px;
  padding: 0.85rem 1rem;
  font-weight: 600;
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  box-shadow: 0 10px 20px rgba(99, 102, 241, 0.24);
}

.auth-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(99, 102, 241, 0.3);
}

.auth-link {
  color: #4f46e5;
  font-weight: 600;
  text-decoration: none;
}

.auth-link:hover {
  text-decoration: underline;
}
