* {
  box-sizing: border-box;
}

:root {
  --primary: #635bff;
  --primary-dark: #5148e8;
  --text: #172033;
  --muted: #667085;
  --border: #e5e7eb;
  --background: #f8f9fc;
  --white: #ffffff;
  --success: #16a34a;
  --danger: #dc2626;
}

body {
  margin: 0;
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

  color: var(--text);
  background: var(--white);
}

a {
  color: inherit;
}

.navbar {
  height: 72px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 0 7%;

  border-bottom: 1px solid var(--border);

  background: white;
}

.logo {
  text-decoration: none;

  font-size: 22px;
  font-weight: 800;

  color: var(--text);
}

.navbar nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.navbar nav a {
  text-decoration: none;
  color: #4b5563;
}

.navbar form {
  margin: 0;
}

.nav-button {
  border: 0;
  background: none;
  cursor: pointer;

  color: #4b5563;

  font: inherit;
}

.button {
  display: inline-flex;

  align-items: center;
  justify-content: center;

  padding: 12px 20px;

  border: 0;
  border-radius: 8px;

  background: var(--primary);
  color: white !important;

  text-decoration: none;

  font-weight: 700;

  cursor: pointer;

  transition: 0.2s;
}

.button:hover {
  background: var(--primary-dark);
}

.button.small {
  padding: 9px 16px;
}

.button.large {
  padding: 15px 25px;
}

.button.secondary {
  background: #eef0f7;
  color: var(--text) !important;
}

.button.full {
  width: 100%;
}


/* HERO */

.hero {
  min-height: 680px;

  padding: 90px 7%;

  display: grid;
  grid-template-columns: 1fr 1fr;

  gap: 80px;

  align-items: center;

  background:
    linear-gradient(
      135deg,
      #f7f7ff,
      #ffffff
    );
}

.hero-content {
  max-width: 650px;
}

.badge {
  display: inline-block;

  padding: 8px 14px;

  border-radius: 30px;

  background: #eeecff;
  color: var(--primary);

  font-size: 13px;
  font-weight: 700;
}

.hero h1 {
  margin: 22px 0;

  font-size: 62px;

  line-height: 1.05;

  letter-spacing: -3px;
}

.hero h1 span {
  color: var(--primary);
}

.hero p {
  color: var(--muted);

  font-size: 20px;

  line-height: 1.7;
}

.hero-actions {
  display: flex;

  gap: 12px;

  margin-top: 30px;
}

.hero-note {
  margin-top: 20px;

  color: #7a8292;

  font-size: 14px;
}


/* INVOICE PREVIEW */

.invoice-preview {
  padding: 38px;

  background: white;

  border-radius: 16px;

  box-shadow:
    0 25px 70px
    rgba(30, 35, 90, 0.14);
}

.preview-top {
  display: flex;

  justify-content: space-between;
}

.preview-label {
  color: var(--muted);

  font-size: 12px;
  font-weight: 700;

  letter-spacing: 1px;

  margin-bottom: 5px;
}

.preview-top strong {
  font-size: 25px;
}

.paid-badge {
  height: fit-content;

  padding: 7px 12px;

  border-radius: 20px;

  background: #dcfce7;

  color: #15803d;

  font-size: 11px;

  font-weight: 800;
}

.preview-company {
  margin-top: 50px;

  display: flex;

  flex-direction: column;

  gap: 5px;
}

.preview-company span {
  color: var(--muted);

  font-size: 14px;
}

.preview-customer {
  margin-top: 35px;

  display: flex;

  flex-direction: column;

  gap: 5px;
}

.preview-customer span,
.preview-customer small {
  color: var(--muted);
}

.preview-items {
  margin-top: 35px;

  border-top: 1px solid var(--border);

  border-bottom: 1px solid var(--border);
}

.preview-item {
  display: flex;

  justify-content: space-between;

  padding: 16px 0;
}

.preview-total {
  display: flex;

  justify-content: space-between;

  padding-top: 20px;

  font-size: 22px;
}


/* SECTIONS */

.section {
  padding: 100px 7%;
}

.section-heading {
  max-width: 650px;

  margin: auto;

  text-align: center;
}

.eyebrow {
  color: var(--primary);

  font-size: 12px;

  font-weight: 800;

  letter-spacing: 1.5px;
}

.section-heading h2 {
  margin: 15px 0;

  font-size: 42px;

  letter-spacing: -1.5px;
}

.section-heading p {
  color: var(--muted);

  line-height: 1.7;
}


/* FEATURES */

.feature-grid {
  max-width: 1100px;

  margin: 55px auto 0;

  display: grid;

  grid-template-columns:
    repeat(3, 1fr);

  gap: 25px;
}

.feature-card {
  padding: 30px;

  border: 1px solid var(--border);

  border-radius: 14px;
}

.feature-icon {
  width: 45px;
  height: 45px;

  display: flex;

  align-items: center;
  justify-content: center;

  border-radius: 10px;

  background: #eeecff;

  color: var(--primary);

  font-size: 20px;

  font-weight: 800;
}

.feature-card p {
  color: var(--muted);

  line-height: 1.6;
}


/* PRICING */

.pricing-section {
  background: var(--background);
}

.pricing-grid {
  max-width: 850px;

  margin: 50px auto 0;

  display: grid;

  grid-template-columns:
    repeat(2, 1fr);

  gap: 25px;
}

.price-card {
  position: relative;

  padding: 40px;

  background: white;

  border: 1px solid var(--border);

  border-radius: 16px;
}

.premium-card {
  border:
    2px solid
    var(--primary);
}

.popular {
  position: absolute;

  top: 18px;
  right: 18px;

  padding: 6px 9px;

  border-radius: 20px;

  background: #eeecff;

  color: var(--primary);

  font-size: 10px;

  font-weight: 800;
}

.price {
  margin: 25px 0;

  font-size: 44px;

  font-weight: 800;
}

.price span {
  color: var(--muted);

  font-size: 15px;

  font-weight: 400;
}

.price-card ul {
  padding: 0;

  margin: 30px 0;

  list-style: none;
}

.price-card li {
  padding: 9px 0;

  color: #4b5563;
}

.price-card li::before {
  content: "✓";

  margin-right: 10px;

  color: var(--success);

  font-weight: 800;
}


/* CTA */

.cta {
  padding: 100px 7%;

  text-align: center;

  background: #111827;

  color: white;
}

.cta h2 {
  font-size: 40px;
}

.cta p {
  color: #9ca3af;

  margin-bottom: 30px;
}


/* FOOTER */

footer {
  padding: 45px 7%;

  display: flex;

  justify-content: space-between;

  background: #0b1120;

  color: white;
}

footer p {
  color: #9ca3af;
}

.footer-links {
  display: flex;

  gap: 25px;
}

.footer-links a {
  color: #d1d5db;

  text-decoration: none;
}


/* AUTH */

.auth-page {
  background: var(--background);
}

.auth-container {
  min-height: calc(100vh - 72px);

  display: flex;

  align-items: center;
  justify-content: center;

  padding: 50px 20px;
}

.auth-card {
  width: 100%;

  max-width: 450px;

  padding: 40px;

  background: white;

  border: 1px solid var(--border);

  border-radius: 16px;

  box-shadow:
    0 15px 40px
    rgba(0, 0, 0, 0.05);
}

.auth-header {
  text-align: center;

  margin-bottom: 30px;
}

.auth-header h1 {
  margin-bottom: 10px;

  font-size: 30px;
}

.auth-header p {
  color: var(--muted);
}

.auth-form {
  display: flex;

  flex-direction: column;

  gap: 20px;
}

.auth-form label {
  display: flex;

  flex-direction: column;

  gap: 8px;

  font-weight: 600;
}

.auth-form input {
  width: 100%;

  padding: 13px 14px;

  border:
    1px solid
    var(--border);

  border-radius: 8px;

  font-size: 15px;

  outline: none;
}

.auth-form input:focus {
  border-color: var(--primary);

  box-shadow:
    0 0 0 3px
    rgba(99, 91, 255, 0.1);
}

.auth-footer {
  margin-top: 25px;

  text-align: center;

  color: var(--muted);
}

.auth-footer a {
  color: var(--primary);

  font-weight: 700;
}

.alert {
  padding: 13px;

  margin-bottom: 20px;

  border-radius: 8px;

  font-size: 14px;
}

.alert.error {
  background: #fee2e2;

  color: #991b1b;
}


/* APP */

.app-page {
  background: var(--background);
}

.app-navbar {
  height: 68px;

  padding: 0 30px;

  display: flex;

  align-items: center;

  justify-content: space-between;

  background: white;

  border-bottom:
    1px solid
    var(--border);
}

.app-user {
  display: flex;

  align-items: center;

  gap: 20px;
}

.logout-button {
  border: 0;

  background: none;

  color: var(--muted);

  cursor: pointer;
}

.app-layout {
  min-height: calc(100vh - 68px);

  display: flex;
}

.sidebar {
  width: 230px;

  padding: 25px 15px;

  background: white;

  border-right:
    1px solid
    var(--border);
}

.sidebar-link {
  display: block;

  padding: 12px 15px;

  margin-bottom: 5px;

  border-radius: 8px;

  text-decoration: none;

  color: #4b5563;
}

.sidebar-link:hover,
.sidebar-link.active {
  background: #eeecff;

  color: var(--primary);

  font-weight: 700;
}

.dashboard {
  flex: 1;

  padding: 45px;

  max-width: 1400px;
}

.dashboard-header {
  display: flex;

  justify-content: space-between;

  align-items: center;

  margin-bottom: 35px;
}

.dashboard-header h1 {
  margin: 10px 0 5px;

  font-size: 32px;
}

.dashboard-header p {
  margin: 0;

  color: var(--muted);
}


/* STATS */

.stats-grid {
  display: grid;

  grid-template-columns:
    repeat(4, 1fr);

  gap: 18px;
}

.stat-card {
  padding: 25px;

  background: white;

  border:
    1px solid
    var(--border);

  border-radius: 12px;
}

.stat-card span {
  display: block;

  margin-bottom: 10px;

  color: var(--muted);

  font-size: 14px;
}

.stat-card strong {
  font-size: 27px;
}

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

.plan-text {
  color: var(--primary);
}


/* DASHBOARD SECTION */

.dashboard-section {
  margin-top: 35px;

  padding: 25px;

  background: white;

  border:
    1px solid
    var(--border);

  border-radius: 12px;
}

.section-title {
  display: flex;

  justify-content: space-between;

  align-items: center;

  margin-bottom: 20px;
}

.section-title h2 {
  margin: 0 0 5px;
}

.section-title p {
  margin: 0;

  color: var(--muted);
}

.section-title a {
  color: var(--primary);

  text-decoration: none;

  font-weight: 700;
}


/* TABLE */

.table-wrapper {
  overflow-x: auto;
}

table {
  width: 100%;

  border-collapse: collapse;
}

th {
  padding: 14px;

  text-align: left;

  color: var(--muted);

  font-size: 12px;

  text-transform: uppercase;

  border-bottom:
    1px solid
    var(--border);
}

td {
  padding: 17px 14px;

  border-bottom:
    1px solid
    var(--border);
}

.status {
  display: inline-block;

  padding: 5px 10px;

  border-radius: 20px;

  font-size: 12px;

  font-weight: 700;

  text-transform: capitalize;
}

.status.paid {
  background: #dcfce7;

  color: #15803d;
}

.status.sent {
  background: #dbeafe;

  color: #1d4ed8;
}

.status.overdue {
  background: #fee2e2;

  color: #b91c1c;
}

.status.draft {
  background: #f3f4f6;

  color: #4b5563;
}


/* EMPTY */

.empty-state {
  padding: 60px 20px;

  text-align: center;

  color: var(--muted);
}

.empty-icon {
  width: 55px;
  height: 55px;

  margin: auto;

  display: flex;

  align-items: center;
  justify-content: center;

  border-radius: 12px;

  background: #eeecff;

  color: var(--primary);

  font-weight: 800;
}


/* UPGRADE */

.upgrade-card {
  margin-top: 25px;

  padding: 30px;

  display: flex;

  justify-content: space-between;

  align-items: center;

  background:
    linear-gradient(
      135deg,
      #635bff,
      #8178ff
    );

  border-radius: 14px;

  color: white;
}

.upgrade-card .eyebrow {
  color: #ddd9ff;
}

.upgrade-card p {
  color: #e5e7eb;
}


/* PRICING PAGE */

.pricing-hero {
  padding: 90px 20px;

  text-align: center;

  background: var(--background);
}

.pricing-hero h1 {
  max-width: 700px;

  margin: 15px auto;

  font-size: 48px;

  letter-spacing: -2px;
}

  /* PRIVACY PAGE */

  .privacy-paragraphs {
    padding: 10px 20px;
  
    text-align: center;
  
    background: var(--background);
  }
  
  .privacy-paragraphs h1 {
    max-width: 700px;
  
    margin: 15px auto;
  
    font-size: 48px;
  
    letter-spacing: -2px;
  }

.privacy-paragraphs p {
  color: var(--muted);

  font-size: 18px;
}

/* Terms of Service PAGE */

.terms-paragraphs {
  padding: 10px 20px;

  text-align: center;

  background: var(--background);
}

.terms-paragraphs h1 {
  max-width: 700px;

  margin: 15px auto;

  font-size: 48px;

  letter-spacing: -2px;
}

.terms-paragraphs p {
color: var(--muted);

font-size: 18px;
}


/* MOBILE */

@media (max-width: 900px) {

  .hero {
    grid-template-columns: 1fr;

    padding: 70px 5%;
  }

  .hero h1 {
    font-size: 48px;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

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

  .sidebar {
    display: none;
  }

  .dashboard {
    padding: 25px;
  }

}


@media (max-width: 600px) {

  .navbar {
    padding: 0 20px;
  }

  .navbar nav a:not(.button) {
    display: none;
  }

  .hero {
    padding: 50px 20px;
  }

  .hero h1 {
    font-size: 40px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-header {
    flex-direction: column;

    align-items: flex-start;

    gap: 20px;
  }

  .upgrade-card {
    flex-direction: column;

    align-items: flex-start;

    gap: 20px;
  }

  footer {
    flex-direction: column;

    gap: 25px;
  }

}

.invoice-page {
  max-width: 1200px;
}

.form-card {
  margin-bottom: 25px;

  padding: 30px;

  background: white;

  border: 1px solid var(--border);

  border-radius: 14px;
}

.form-card-heading {
  margin-bottom: 25px;
}

.form-card-heading h2 {
  margin: 0 0 6px;

  font-size: 20px;
}

.form-card-heading p {
  margin: 0;

  color: var(--muted);
}

.form-label {
  display: flex;

  flex-direction: column;

  gap: 8px;

  font-weight: 600;

  color: #374151;
}

.form-label input,
.form-label select,
.form-label textarea {
  width: 100%;

  padding: 12px 13px;

  border: 1px solid var(--border);

  border-radius: 8px;

  background: white;

  font: inherit;

  color: var(--text);

  outline: none;
}

.form-label input:focus,
.form-label select:focus,
.form-label textarea:focus {
  border-color: var(--primary);

  box-shadow:
    0 0 0 3px
    rgba(99, 91, 255, 0.1);
}

.form-grid-3 {
  display: grid;

  grid-template-columns:
    repeat(3, 1fr);

  gap: 20px;
}

.notice {
  padding: 15px;

  background: #fff7ed;

  border: 1px solid #fed7aa;

  border-radius: 8px;

  color: #9a3412;
}

.notice a {
  font-weight: 700;

  color: var(--primary);
}

.invoice-items-wrapper {
  overflow-x: auto;
}

.invoice-items-table {
  min-width: 800px;

  border-collapse: collapse;
}

.invoice-items-table th {
  padding: 12px 8px;

  background: #f9fafb;

  text-align: left;

  font-size: 11px;

  white-space: nowrap;
}

.invoice-items-table td {
  padding: 10px 8px;

  vertical-align: middle;
}

.invoice-items-table input {
  width: 100%;

  min-width: 80px;

  padding: 10px;

  border: 1px solid var(--border);

  border-radius: 7px;

  font: inherit;
}

.invoice-items-table td:first-child input {
  min-width: 230px;
}

.remove-item {
  width: 34px;
  height: 34px;

  border: 0;

  border-radius: 7px;

  background: #fee2e2;

  color: #dc2626;

  font-size: 20px;

  cursor: pointer;
}

.add-item {
  margin-top: 20px;

  padding: 10px 15px;

  border: 1px dashed var(--primary);

  border-radius: 8px;

  background: #f5f3ff;

  color: var(--primary);

  font-weight: 700;

  cursor: pointer;
}

.invoice-summary {
  width: 350px;

  max-width: 100%;

  margin:

    35px 0 0 auto;
}

.summary-row {
  display: flex;

  justify-content: space-between;

  padding: 10px 0;

  color: var(--muted);
}

.summary-total {
  display: flex;

  justify-content: space-between;

  padding-top: 20px;

  margin-top: 10px;

  border-top:
    2px solid
    var(--text);

  font-size: 22px;
}

.invoice-actions {
  display: flex;

  justify-content: flex-end;

  gap: 12px;

  margin-bottom: 50px;
}

@media (max-width: 800px) {

  .form-grid-3 {
    grid-template-columns: 1fr;
  }

  .invoice-summary {
    width: 100%;
  }

}

.invoice-detail-container {
  max-width: 1100px;

  margin: 0 auto;

  padding: 40px 20px;
}

.invoice-toolbar {
  display: flex;

  justify-content: space-between;

  align-items: center;

  margin-bottom: 25px;
}

.invoice-paper {
  background: white;

  padding: 60px;

  border-radius: 4px;

  box-shadow:
    0 10px 40px
    rgba(0, 0, 0, 0.08);
}

.invoice-paper-header {
  display: flex;

  justify-content: space-between;

  gap: 30px;

  padding-bottom: 40px;

  border-bottom:
    1px solid
    var(--border);
}

.business-name {
  margin: 0 0 12px;

  font-size: 25px;
}

.invoice-title-block {
  text-align: right;
}

.invoice-title-block h2 {
  margin: 0 0 8px;

  color: var(--primary);

  font-size: 38px;

  letter-spacing: 2px;
}

.invoice-meta {
  display: grid;

  grid-template-columns: 1fr 1fr;

  gap: 40px;

  padding: 40px 0;
}

.invoice-meta > div:first-child {
  display: flex;

  flex-direction: column;

  gap: 5px;
}

.invoice-label {
  margin-bottom: 8px;

  color: var(--muted);

  font-size: 11px;

  font-weight: 800;

  letter-spacing: 1px;
}

.invoice-dates {
  display: flex;

  flex-direction: column;

  gap: 12px;
}

.invoice-dates div {
  display: flex;

  justify-content: space-between;

  gap: 30px;
}

.invoice-dates span {
  color: var(--muted);
}

.invoice-paper-table {
  width: 100%;

  border-collapse: collapse;

  margin-top: 10px;
}

.invoice-paper-table th {
  padding: 14px 10px;

  background: #f8fafc;

  color: #64748b;

  font-size: 11px;

  text-align: left;

  text-transform: uppercase;
}

.invoice-paper-table td {
  padding: 18px 10px;

  border-bottom:
    1px solid
    var(--border);
}

.invoice-paper-table th:not(:first-child),
.invoice-paper-table td:not(:first-child) {
  text-align: right;
}

.invoice-total-area {
  display: flex;

  justify-content: flex-end;

  margin-top: 35px;
}

.invoice-totals {
  width: 320px;
}

.invoice-totals > div {
  display: flex;

  justify-content: space-between;

  padding: 10px 0;

  color: var(--muted);
}

.invoice-grand-total {
  margin-top: 10px;

  padding-top: 18px !important;

  border-top:
    2px solid
    var(--text);

  color: var(--text) !important;

  font-size: 22px;
}

.invoice-notes {
  margin-top: 50px;

  padding-top: 25px;

  border-top:
    1px solid
    var(--border);
}

.invoice-notes p {
  color: var(--muted);

  white-space: pre-wrap;
}

.invoice-footer {
  margin-top: 60px;

  padding-top: 25px;

  border-top:
    1px solid
    var(--border);

  color: var(--muted);

  text-align: center;
}

.invoice-link {
  color: var(--primary);

  text-decoration: none;
}

.invoice-link:hover {
  text-decoration: underline;
}

.status {
  display: inline-block;

  padding: 5px 9px;

  border-radius: 20px;

  font-size: 11px;

  font-weight: 700;

  text-transform: capitalize;
}

.status.draft {
  background: #f1f5f9;

  color: #475569;
}

.status.sent {
  background: #dbeafe;

  color: #1d4ed8;
}

.status.paid {
  background: #dcfce7;

  color: #15803d;
}

.status.overdue {
  background: #fee2e2;

  color: #b91c1c;
}


@media print {

  body {
    background: white !important;
  }

  .no-print {
    display: none !important;
  }

  .invoice-detail-container {
    padding: 0;

    max-width: none;
  }

  .invoice-paper {
    padding: 30px;

    box-shadow: none;
  }

  @page {
    size: A4;

    margin: 15mm;
  }

}

.invoice-detail-container {
  max-width: 1100px;

  margin: 0 auto;

  padding: 40px 20px;
}

.invoice-toolbar {
  display: flex;

  justify-content: space-between;

  align-items: center;

  margin-bottom: 25px;
}

.invoice-paper {
  background: white;

  padding: 60px;

  border-radius: 4px;

  box-shadow:
    0 10px 40px
    rgba(0, 0, 0, 0.08);
}

.invoice-paper-header {
  display: flex;

  justify-content: space-between;

  gap: 30px;

  padding-bottom: 40px;

  border-bottom:
    1px solid
    var(--border);
}

.business-name {
  margin: 0 0 12px;

  font-size: 25px;
}

.invoice-title-block {
  text-align: right;
}

.invoice-title-block h2 {
  margin: 0 0 8px;

  color: var(--primary);

  font-size: 38px;

  letter-spacing: 2px;
}

.invoice-meta {
  display: grid;

  grid-template-columns: 1fr 1fr;

  gap: 40px;

  padding: 40px 0;
}

.invoice-meta > div:first-child {
  display: flex;

  flex-direction: column;

  gap: 5px;
}

.invoice-label {
  margin-bottom: 8px;

  color: var(--muted);

  font-size: 11px;

  font-weight: 800;

  letter-spacing: 1px;
}

.invoice-dates {
  display: flex;

  flex-direction: column;

  gap: 12px;
}

.invoice-dates div {
  display: flex;

  justify-content: space-between;

  gap: 30px;
}

.invoice-dates span {
  color: var(--muted);
}

.invoice-paper-table {
  width: 100%;

  border-collapse: collapse;

  margin-top: 10px;
}

.invoice-paper-table th {
  padding: 14px 10px;

  background: #f8fafc;

  color: #64748b;

  font-size: 11px;

  text-align: left;

  text-transform: uppercase;
}

.invoice-paper-table td {
  padding: 18px 10px;

  border-bottom:
    1px solid
    var(--border);
}

.invoice-paper-table th:not(:first-child),
.invoice-paper-table td:not(:first-child) {
  text-align: right;
}

.invoice-total-area {
  display: flex;

  justify-content: flex-end;

  margin-top: 35px;
}

.invoice-totals {
  width: 320px;
}

.invoice-totals > div {
  display: flex;

  justify-content: space-between;

  padding: 10px 0;

  color: var(--muted);
}

.invoice-grand-total {
  margin-top: 10px;

  padding-top: 18px !important;

  border-top:
    2px solid
    var(--text);

  color: var(--text) !important;

  font-size: 22px;
}

.invoice-notes {
  margin-top: 50px;

  padding-top: 25px;

  border-top:
    1px solid
    var(--border);
}

.invoice-notes p {
  color: var(--muted);

  white-space: pre-wrap;
}

.invoice-footer {
  margin-top: 60px;

  padding-top: 25px;

  border-top:
    1px solid
    var(--border);

  color: var(--muted);

  text-align: center;
}

.invoice-link {
  color: var(--primary);

  text-decoration: none;
}

.invoice-link:hover {
  text-decoration: underline;
}

.status {
  display: inline-block;

  padding: 5px 9px;

  border-radius: 20px;

  font-size: 11px;

  font-weight: 700;

  text-transform: capitalize;
}

.status.draft {
  background: #f1f5f9;

  color: #475569;
}

.status.sent {
  background: #dbeafe;

  color: #1d4ed8;
}

.status.paid {
  background: #dcfce7;

  color: #15803d;
}

.status.overdue {
  background: #fee2e2;

  color: #b91c1c;
}


@media print {

  body {
    background: white !important;
  }

  .no-print {
    display: none !important;
  }

  .invoice-detail-container {
    padding: 0;

    max-width: none;
  }

  .invoice-paper {
    padding: 30px;

    box-shadow: none;
  }

  @page {
    size: A4;

    margin: 15mm;
  }

}

@media print {

  body {
    background: white !important;
  }

  .no-print {
    display: none !important;
  }

  .invoice-detail-container {
    padding: 0;

    max-width: none;
  }

  .invoice-paper {
    padding: 30px;

    box-shadow: none;
  }

  @page {
    size: A4;
    margin: 15mm;
  }

}

.status {
  display: inline-block;

  padding: 6px 12px;

  border-radius: 999px;

  font-size: 12px;

  font-weight: 700;

  text-transform: uppercase;
}


.status.paid {
  background: #dcfce7;

  color: #166534;
}


.status.sent {
  background: #dbeafe;

  color: #1d4ed8;
}


.status.overdue {
  background: #fee2e2;

  color: #b91c1c;
}


.button.success {
  background: #16a34a;

  color: white;
}


.button.danger {
  background: #dc2626;

  color: white;
}

/* ==========================================================================
 EDIT INVOICE PAGE
 ========================================================================== */

.page-container {
  width: min(1100px, calc(100% - 40px));
  margin: 0 auto;
  padding: 40px 0 80px;
}


/* --------------------------------------------------------------------------
   Page Header
   -------------------------------------------------------------------------- */

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
}

.page-header > div {
  min-width: 0;
}

.eyebrow {
  display: block;
  margin-bottom: 6px;

  color: #6366f1;

  font-size: 12px;
  font-weight: 700;

  letter-spacing: 0.12em;

  text-transform: uppercase;
}

.page-header h1 {
  margin: 0;

  color: #111827;

  font-size: 32px;
  line-height: 1.2;

  font-weight: 700;
}


/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */

.card {
  margin-bottom: 24px;
  padding: 28px;

  background: #ffffff;

  border: 1px solid #e5e7eb;

  border-radius: 14px;

  box-shadow:
    0 2px 6px rgba(15, 23, 42, 0.04);
}

.card h2 {
  margin: 0 0 22px;

  color: #111827;

  font-size: 18px;
  line-height: 1.3;

  font-weight: 700;
}


/* --------------------------------------------------------------------------
   Form Grid
   -------------------------------------------------------------------------- */

.form-grid {
  display: grid;

  grid-template-columns:
    repeat(2, minmax(0, 1fr));

  gap: 20px;
}


/* --------------------------------------------------------------------------
   Form Groups
   -------------------------------------------------------------------------- */

.form-group {
  display: flex;

  flex-direction: column;

  gap: 7px;
}

.form-group label {
  color: #374151;

  font-size: 13px;

  font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea,
.card textarea {
  width: 100%;

  box-sizing: border-box;

  padding: 11px 13px;

  color: #111827;

  background: #ffffff;

  border: 1px solid #d1d5db;

  border-radius: 8px;

  outline: none;

  font-family: inherit;

  font-size: 14px;

  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.card textarea:focus {
  border-color: #6366f1;

  box-shadow:
    0 0 0 3px rgba(99, 102, 241, 0.12);
}


/* --------------------------------------------------------------------------
   Customer Select
   -------------------------------------------------------------------------- */

select {
  cursor: pointer;
}

.form-group select {
  min-height: 44px;
}


/* --------------------------------------------------------------------------
   Invoice Items Header
   -------------------------------------------------------------------------- */

.section-heading {
  display: flex;

  align-items: center;

  justify-content: space-between;

  gap: 20px;

  margin-bottom: 20px;
}

.section-heading h2 {
  margin: 0;
}


/* --------------------------------------------------------------------------
   Invoice Item
   -------------------------------------------------------------------------- */

.invoice-item {
  position: relative;

  display: grid;

  grid-template-columns:
    minmax(220px, 1fr)
    90px
    130px
    110px
    110px
    36px;

  align-items: end;

  gap: 12px;

  padding: 18px;

  margin-bottom: 14px;

  background: #f9fafb;

  border: 1px solid #e5e7eb;

  border-radius: 10px;
}

.invoice-item:last-child {
  margin-bottom: 0;
}

.invoice-item .form-group {
  min-width: 0;
}


/* --------------------------------------------------------------------------
   Item Total
   -------------------------------------------------------------------------- */

.item-total {
  display: flex;

  flex-direction: column;

  justify-content: center;

  min-height: 44px;

  gap: 4px;
}

.item-total span {
  color: #6b7280;

  font-size: 12px;

  font-weight: 600;
}

.item-total strong {
  color: #111827;

  font-size: 14px;

  font-weight: 700;
}


/* --------------------------------------------------------------------------
   Remove Item Button
   -------------------------------------------------------------------------- */

.remove-item {
  display: flex;

  align-items: center;

  justify-content: center;

  width: 36px;

  height: 36px;

  padding: 0;

  margin-bottom: 4px;

  color: #dc2626;

  background: #ffffff;

  border: 1px solid #fecaca;

  border-radius: 8px;

  cursor: pointer;

  font-size: 20px;

  line-height: 1;

  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.remove-item:hover {
  color: #ffffff;

  background: #dc2626;

  border-color: #dc2626;
}


/* --------------------------------------------------------------------------
   Invoice Summary
   -------------------------------------------------------------------------- */

.invoice-summary {
  width: min(420px, 100%);

  margin-left: auto;

  margin-top: 26px;

  padding-top: 20px;

  border-top: 1px solid #e5e7eb;
}

.invoice-summary > div {
  display: flex;

  align-items: center;

  justify-content: space-between;

  gap: 20px;

  padding: 8px 0;

  color: #4b5563;

  font-size: 14px;
}

.invoice-summary strong {
  color: #111827;

  font-weight: 600;
}

.invoice-summary .invoice-total {
  margin-top: 10px;

  padding-top: 16px;

  border-top: 1px solid #e5e7eb;

  color: #111827;

  font-size: 17px;
}

.invoice-summary .invoice-total strong {
  color: #111827;

  font-size: 22px;

  font-weight: 700;
}


/* --------------------------------------------------------------------------
   Notes
   -------------------------------------------------------------------------- */

.card textarea {
  display: block;

  min-height: 130px;

  resize: vertical;

  line-height: 1.5;
}


/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.button {
  display: inline-flex;

  align-items: center;

  justify-content: center;

  min-height: 42px;

  padding: 0 17px;

  box-sizing: border-box;

  color: #ffffff;

  background: #4f46e5;

  border: 1px solid #4f46e5;

  border-radius: 8px;

  text-decoration: none;

  cursor: pointer;

  font-family: inherit;

  font-size: 14px;

  font-weight: 600;

  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.05s ease;
}

.button:hover {
  background: #4338ca;

  border-color: #4338ca;
}

.button:active {
  transform: translateY(1px);
}


/* Secondary button */

.button.secondary {
  color: #374151;

  background: #ffffff;

  border-color: #d1d5db;
}

.button.secondary:hover {
  color: #111827;

  background: #f9fafb;

  border-color: #9ca3af;
}


/* --------------------------------------------------------------------------
   Form Actions
   -------------------------------------------------------------------------- */

.form-actions {
  display: flex;

  align-items: center;

  justify-content: flex-end;

  gap: 12px;

  margin-top: 30px;
}


/* --------------------------------------------------------------------------
   App Navbar
   -------------------------------------------------------------------------- */

.app-navbar {
  display: flex;

  align-items: center;

  justify-content: space-between;

  min-height: 64px;

  padding: 0 32px;

  background: #ffffff;

  border-bottom: 1px solid #e5e7eb;
}

.app-navbar .logo {
  color: #111827;

  text-decoration: none;

  font-size: 20px;

  font-weight: 800;
}

.app-user {
  display: flex;

  align-items: center;

  gap: 16px;

  color: #4b5563;

  font-size: 14px;
}

.logout-button {
  padding: 8px 12px;

  color: #4b5563;

  background: transparent;

  border: 1px solid #d1d5db;

  border-radius: 7px;

  cursor: pointer;

  font-family: inherit;

  font-size: 13px;

  font-weight: 600;
}

.logout-button:hover {
  color: #111827;

  background: #f9fafb;
}


/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 900px) {

  .invoice-item {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

  .invoice-item
  .form-group:first-child {
    grid-column: 1 / -1;
  }

  .item-total {
    align-items: flex-start;
  }

}


@media (max-width: 700px) {

  .page-container {
    width: min(
      100% - 24px,
      1100px
    );

    padding-top: 24px;
  }


  .page-header {
    align-items: flex-start;

    flex-direction: column;
  }


  .page-header h1 {
    font-size: 26px;
  }


  .card {
    padding: 20px;
  }


  .form-grid {
    grid-template-columns: 1fr;
  }


  .section-heading {
    align-items: flex-start;

    flex-direction: column;
  }


  .invoice-item {
    grid-template-columns: 1fr;

    padding: 16px;
  }


  .invoice-item
  .form-group:first-child {
    grid-column: auto;
  }


  .item-total {
    padding-top: 4px;
  }


  .remove-item {
    position: absolute;

    top: 12px;

    right: 12px;

    margin: 0;
  }


  .form-actions {
    flex-direction: column-reverse;

    align-items: stretch;
  }


  .form-actions .button {
    width: 100%;
  }


  .app-navbar {
    padding: 0 16px;
  }


  .app-user span {
    display: none;
  }

}

/* ==========================================================================
 SETTINGS PAGE
 ========================================================================== */

.success-message {
  margin-bottom: 24px;

  padding: 14px 16px;

  color: #166534;

  background: #dcfce7;

  border: 1px solid #bbf7d0;

  border-radius: 9px;

  font-size: 14px;

  font-weight: 600;
}


.settings-section {
  margin-bottom: 24px;
}
/* --------------------------------------------------------------------------
 Landing page refresh
 -------------------------------------------------------------------------- */
body:has(.landing-page) {
background: #f8fafc;
}

.landing-page .navbar {
position: sticky;
top: 0;
z-index: 50;
height: 76px;
padding: 0 clamp(20px, 6vw, 88px);
background: rgba(255,255,255,.88);
border-bottom: 1px solid rgba(226,232,240,.85);
backdrop-filter: blur(18px);
}

.landing-page .logo {
display: inline-flex;
align-items: center;
gap: 10px;
font-size: 21px;
letter-spacing: -.5px;
}


.landing-page .navbar nav { gap: 8px; }
.landing-page .navbar nav > a:not(.button),
.landing-page .nav-button {
padding: 9px 13px;
border-radius: 9px;
transition: .2s ease;
}

.landing-page .navbar nav > a:not(.button):hover,
.landing-page .nav-button:hover { background: #f1f5f9; color: var(--text); }

.landing-page .hero {
position: relative;
overflow: hidden;
min-height: 720px;
padding: 92px clamp(20px, 7vw, 110px) 105px;
grid-template-columns: minmax(0, 1.05fr) minmax(420px, .95fr);
gap: clamp(40px, 7vw, 100px);
background:
  radial-gradient(circle at 8% 15%, rgba(99,91,255,.12), transparent 28%),
  radial-gradient(circle at 90% 20%, rgba(56,189,248,.10), transparent 25%),
  linear-gradient(180deg, #fbfbff 0%, #fff 78%);
}

.landing-page .hero::before,
.landing-page .hero::after {
content: "";
position: absolute;
border-radius: 999px;
pointer-events: none;
}
.landing-page .hero::before {
width: 420px; height: 420px; right: -170px; bottom: -220px;
background: rgba(99,91,255,.07); filter: blur(3px);
}
.landing-page .hero::after {
width: 250px; height: 250px; left: 44%; top: -170px;
background: rgba(14,165,233,.06);
}

.landing-page .hero-content { position: relative; z-index: 1; }
.landing-page .badge {
padding: 8px 12px;
background: rgba(99,91,255,.09);
border: 1px solid rgba(99,91,255,.14);
box-shadow: 0 4px 16px rgba(99,91,255,.08);
}

.landing-page .hero h1 {
max-width: 720px;
margin: 24px 0 20px;
font-size: clamp(46px, 5.2vw, 76px);
line-height: .99;
letter-spacing: -4.5px;
}

.landing-page .hero h1 span {
display: inline-block;
background: linear-gradient(135deg, #635bff 0%, #7c5cff 55%, #9a7cff 100%);
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
}

.landing-page .hero p {
max-width: 600px;
margin: 0;
font-size: 19px;
line-height: 1.75;
}

.landing-page .hero-actions { margin-top: 32px; gap: 14px; }
.landing-page .button { border-radius: 11px; box-shadow: 0 6px 18px rgba(15,23,42,.06); }
.landing-page .button.large { padding: 15px 23px; }
.landing-page .hero-actions .button:first-child {
box-shadow: 0 12px 28px rgba(99,91,255,.25);
}
.landing-page .hero-note { font-size: 13px; }
/* Leaning to right

.landing-page .invoice-preview {
position: relative;
z-index: 2;
padding: 34px;
border: 1px solid rgba(226,232,240,.9);
border-radius: 22px;
box-shadow: 0 30px 90px rgba(15,23,42,.14), 0 5px 18px rgba(99,91,255,.07);
transform: rotate(1.2deg);
transition: transform .3s ease, box-shadow .3s ease;
}
.landing-page .invoice-preview:hover {
transform: rotate(0) translateY(-5px);
box-shadow: 0 38px 100px rgba(15,23,42,.17), 0 8px 25px rgba(99,91,255,.10);
}
*/
/* Lined Straight */
.landing-page .invoice-preview {
position: relative;
z-index: 2;
padding: 34px;
border: 1px solid rgba(226,232,240,.9);
border-radius: 22px;
box-shadow:
  0 30px 90px rgba(15,23,42,.14),
  0 5px 18px rgba(99,91,255,.07);

/* Keep the invoice perfectly aligned */
transform: none;

/* Animate only visual properties */
transition:
  box-shadow .3s ease,
  translate .3s ease;
}

.landing-page .invoice-preview:hover {
translate: 0 -5px;

box-shadow:
  0 38px 100px rgba(15,23,42,.17),
  0 8px 25px rgba(99,91,255,.10);
}
.landing-page .preview-top { padding-bottom: 22px; border-bottom: 1px solid #eef2f7; }
.landing-page .preview-top strong { letter-spacing: -.7px; }
.landing-page .paid-badge { background: #ecfdf3; border: 1px solid #bbf7d0; }
.landing-page .preview-company { margin-top: 28px; }
.landing-page .preview-customer { margin-top: 28px; padding: 15px; background: #f8fafc; border-radius: 12px; }
.landing-page .preview-items { margin-top: 25px; }
.landing-page .preview-item { padding: 15px 0; }
.landing-page .preview-total { padding-top: 20px; font-size: 20px; }

.landing-page .section { padding: 105px clamp(20px, 7vw, 110px); }
.landing-page .section-heading h2 {
margin: 13px 0 12px;
font-size: clamp(34px, 4vw, 48px);
line-height: 1.08;
letter-spacing: -2px;
}
.landing-page .section-heading p { max-width: 620px; margin: 0 auto; }

.landing-page .feature-grid { max-width: 1120px; margin-top: 58px; gap: 18px; }
.landing-page .feature-card {
position: relative;
padding: 30px;
min-height: 215px;
background: rgba(255,255,255,.9);
border: 1px solid #e7ebf2;
border-radius: 18px;
box-shadow: 0 10px 30px rgba(15,23,42,.035);
transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.landing-page .feature-card:hover {
transform: translateY(-5px);
border-color: rgba(99,91,255,.25);
box-shadow: 0 20px 45px rgba(15,23,42,.08);
}
.landing-page .feature-icon {
width: 48px; height: 48px;
margin-bottom: 20px;
border-radius: 13px;
background: linear-gradient(135deg, #eeecff, #f3f0ff);
box-shadow: inset 0 0 0 1px rgba(99,91,255,.08);
}
.landing-page .feature-card h3 { margin: 0 0 10px; font-size: 18px; letter-spacing: -.3px; }
.landing-page .feature-card p { margin: 0; }

.landing-page .pricing-section {
position: relative;
overflow: hidden;
background: linear-gradient(180deg, #f8fafc 0%, #f4f6fb 100%);
}
.landing-page .pricing-grid { max-width: 920px; gap: 20px; margin-top: 55px; }
.landing-page .price-card {
padding: 38px;
border-radius: 20px;
box-shadow: 0 12px 35px rgba(15,23,42,.045);
}
.landing-page .premium-card {
border: 2px solid #756cff;
box-shadow: 0 20px 50px rgba(99,91,255,.14);
transform: translateY(-7px);
}
.landing-page .popular { background: #eeecff; }
.landing-page .price { letter-spacing: -2px; }
.landing-page .price-card li { padding: 10px 0; }

.landing-page .cta {
position: relative;
overflow: hidden;
padding: 105px 20px;
background: radial-gradient(circle at 50% 0%, #2a2558 0%, #111827 42%, #0b1120 100%);
}
.landing-page .cta::before {
content: "";
position: absolute;
width: 480px; height: 480px;
left: 50%; top: -370px;
transform: translateX(-50%);
border-radius: 50%;
background: rgba(99,91,255,.25);
filter: blur(20px);
}
.landing-page .cta > * { position: relative; z-index: 1; }
.landing-page .cta h2 { margin: 0 0 12px; font-size: clamp(34px, 4vw, 48px); letter-spacing: -2px; }
.landing-page .cta p { margin-bottom: 28px; }

.landing-page footer {
padding: 48px clamp(20px, 7vw, 110px);
border-top: 1px solid rgba(255,255,255,.05);
}
.landing-page footer strong { font-size: 18px; }

@media (max-width: 980px) {
.landing-page .hero {
  grid-template-columns: 1fr;
  padding-top: 72px;
}
.landing-page .hero-content { max-width: 760px; margin: 0 auto; text-align: center; }
.landing-page .hero p { margin: 0 auto; }
.landing-page .hero-actions, .landing-page .hero-note { justify-content: center; }
.landing-page .invoice-preview { max-width: 620px; width: 100%; margin: 10px auto 0; }
}

@media (max-width: 720px) {
.landing-page .navbar { padding: 0 18px; }
.landing-page .navbar nav { gap: 2px; }
.landing-page .navbar nav > a:not(.button), .landing-page .nav-button { display: none; }
.landing-page .hero { min-height: auto; padding: 62px 20px 76px; }
.landing-page .hero h1 { letter-spacing: -3px; }
.landing-page .hero-actions { flex-direction: column; }
.landing-page .hero-actions .button { width: 100%; }
.landing-page .invoice-preview { padding: 24px; transform: none; }
.landing-page .feature-grid, .landing-page .pricing-grid { grid-template-columns: 1fr; }
.landing-page .premium-card { transform: none; }
.landing-page .section { padding: 78px 20px; }
.landing-page footer { flex-direction: column; gap: 25px; }
}

/* ==========================================================================
 CUSTOMER ACTIONS
 ========================================================================== */

.customer-actions {
position: relative;
min-width: 120px;
}

.customer-actions > summary {
list-style: none;
}

.customer-actions > summary::-webkit-details-marker {
display: none;
}

.customer-edit-panel {
position: absolute;
z-index: 20;
right: 0;
top: calc(100% + 8px);
width: min(760px, 70vw);
padding: 22px;
background: white;
border: 1px solid var(--border);
border-radius: 12px;
box-shadow: 0 18px 45px rgba(15, 23, 42, 0.14);
}

.customer-edit-actions {
display: flex;
justify-content: flex-end;
margin-top: 20px;
}

.customer-delete-form {
display: flex;
justify-content: flex-end;
margin-top: 12px;
padding-top: 12px;
border-top: 1px solid var(--border);
}

@media (max-width: 800px) {
.customer-edit-panel {
  position: static;
  width: auto;
  margin-top: 10px;
}
}

/* Customer edit modal */
.customer-edit-modal {
width: min(820px, calc(100vw - 32px));
max-width: 820px;
padding: 0;
border: 1px solid var(--border);
border-radius: 16px;
box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
color: var(--text);
}

.customer-edit-modal::backdrop {
background: rgba(15, 23, 42, 0.48);
backdrop-filter: blur(2px);
}

.customer-edit-modal-header {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 24px;
padding: 26px 28px 20px;
border-bottom: 1px solid var(--border);
}

.customer-edit-modal-header h2 {
margin: 5px 0 4px;
}

.customer-edit-modal-header p {
margin: 0;
color: var(--muted);
}

.customer-edit-modal > form:not(.customer-delete-form) {
padding: 24px 28px 26px;
}

.customer-modal-close {
width: 38px;
height: 38px;
flex: 0 0 38px;
border: 1px solid var(--border);
border-radius: 10px;
background: white;
color: var(--muted);
font-size: 24px;
line-height: 1;
cursor: pointer;
}

.customer-modal-close:hover {
color: var(--text);
background: #f8fafc;
}

.customer-edit-modal .customer-edit-actions {
gap: 10px;
}

.customer-edit-modal .customer-delete-form {
margin: 0;
padding: 16px 28px 22px;
}

@media (max-width: 800px) {
.customer-edit-modal {
  width: calc(100vw - 24px);
}

.customer-edit-modal-header,
.customer-edit-modal > form:not(.customer-delete-form) {
  padding-left: 20px;
  padding-right: 20px;
}

.customer-edit-modal .customer-delete-form {
  padding-left: 20px;
  padding-right: 20px;
}
}

.invoice-currency-badge{display:inline-block;padding:2px 7px;border-radius:999px;font-size:.78rem;font-weight:600;line-height:1.3}


body.app-page {
--primary: #635bff;
--primary-dark: #5148e8;
--text: #172033;
--muted: #667085;
--border: #e7ebf2;
--card-shadow: 0 10px 30px rgba(15, 23, 42, 0.035);

color: var(--text);
background:
  radial-gradient(circle at 8% 0%, rgba(99, 91, 255, 0.10), transparent 30%),
  radial-gradient(circle at 95% 8%, rgba(56, 189, 248, 0.09), transparent 26%),
  #f8f9fc;
background-attachment: fixed;
}

/* ---------- Top bar (same feel as landing navbar) ---------- */

body.app-page .app-navbar {
position: sticky;
top: 0;
z-index: 40;
height: 68px;
min-height: 68px;
padding: 0 clamp(18px, 3vw, 36px);
background: rgba(255, 255, 255, 0.88);
border-bottom: 1px solid rgba(226, 232, 240, 0.85);
backdrop-filter: blur(18px);
}

body.app-page .app-navbar .logo {
display: inline-flex;
align-items: center;
gap: 10px;
color: var(--text);
font-size: 21px;
font-weight: 800;
letter-spacing: -0.5px;
}

body.app-page .app-navbar .logo img {
width: 28px;
height: 28px;
border-radius: 7px;
object-fit: contain;
}

body.app-page .app-user {
gap: 14px;
color: var(--muted);
font-size: 14px;
}

body.app-page .app-user .avatar {
width: 34px;
height: 34px;
display: grid;
place-items: center;
border-radius: 50%;
background: linear-gradient(135deg, #eeecff, #f3f0ff);
box-shadow: inset 0 0 0 1px rgba(99, 91, 255, 0.15);
color: var(--primary);
font-size: 14px;
font-weight: 800;
text-transform: uppercase;
}

body.app-page .app-user span:not(.avatar) { color: var(--text); font-weight: 600; }

body.app-page .logout-button {
padding: 9px 14px;
color: #4b5563;
background: #fff;
border: 1px solid var(--border);
border-radius: 9px;
font-size: 13px;
font-weight: 600;
transition: 0.2s ease;
}

body.app-page .logout-button:hover { background: #f1f5f9; color: var(--text); }

/* ---------- Sidebar ---------- */

body.app-page .app-layout { min-height: calc(100vh - 68px); }

body.app-page .sidebar {
width: 240px;
padding: 24px 14px;
background: rgba(255, 255, 255, 0.7);
border-right: 1px solid var(--border);
}

body.app-page .sidebar-link {
display: flex;
align-items: center;
gap: 12px;
padding: 11px 14px;
margin-bottom: 4px;
border-radius: 10px;
color: #4b5563;
font-size: 14.5px;
font-weight: 500;
transition: 0.2s ease;
}

body.app-page .sidebar-link svg {
width: 18px;
height: 18px;
flex: 0 0 18px;
fill: none;
stroke: currentColor;
stroke-width: 1.8;
stroke-linecap: round;
stroke-linejoin: round;
}

/* NO hover effect on sidebar navigation */
body.app-page .sidebar-link,
body.app-page .sidebar-link:hover {
transition: none !important;
transform: none !important;
}

body.app-page .sidebar-link:not(.active),
body.app-page .sidebar-link:not(.active):hover {
background: transparent !important;
box-shadow: none !important;
color: #4b5563 !important;
font-weight: 500 !important;
}

body.app-page .sidebar-link.active {
background: #eeecff;
color: var(--primary);
font-weight: 700;
box-shadow: inset 0 0 0 1px rgba(99, 91, 255, 0.12);
}

/* ---------- Page header ---------- */

body.app-page .dashboard { padding: 40px clamp(20px, 3vw, 44px) 64px; max-width: 1400px; }

body.app-page .dashboard-header { margin-bottom: 30px; }

body.app-page .eyebrow {
display: block;
color: var(--primary);
font-size: 12px;
font-weight: 800;
letter-spacing: 1.5px;
}

body.app-page .dashboard-header h1 {
margin: 10px 0 6px;
font-size: clamp(28px, 3vw, 34px);
line-height: 1.1;
letter-spacing: -1.2px;
}

body.app-page .dashboard-header p { color: var(--muted); }

/* ---------- Buttons ---------- */

body.app-page .button {
min-height: 44px;
padding: 0 20px;
color: #fff !important;
background: var(--primary);
border: 0;
border-radius: 11px;
box-shadow: 0 12px 28px rgba(99, 91, 255, 0.25);
font-size: 14px;
font-weight: 700;
transition: 0.2s ease;
}

body.app-page .button:hover {
background: var(--primary-dark);
transform: translateY(-1px);
}

body.app-page .button.secondary {
color: var(--text) !important;
background: #eef0f7;
box-shadow: none;
}

body.app-page .button.secondary:hover { background: #e4e7f2; }

/* ---------- Stat cards ---------- */

body.app-page .stats-grid { gap: 18px; }

body.app-page .stat-card {
padding: 24px;
background: rgba(255, 255, 255, 0.92);
border: 1px solid var(--border);
border-radius: 18px;
box-shadow: var(--card-shadow);
transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

body.app-page .stat-card:hover {
transform: translateY(-4px);
border-color: rgba(99, 91, 255, 0.25);
box-shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
}

body.app-page .stat-icon {
width: 44px;
height: 44px;
margin-bottom: 18px;
display: grid;
place-items: center;
border-radius: 13px;
background: linear-gradient(135deg, #eeecff, #f3f0ff);
box-shadow: inset 0 0 0 1px rgba(99, 91, 255, 0.08);
color: var(--primary);
}

body.app-page .stat-icon svg {
width: 21px;
height: 21px;
fill: none;
stroke: currentColor;
stroke-width: 1.9;
stroke-linecap: round;
stroke-linejoin: round;
}

body.app-page .stat-icon.green { background: #ecfdf3; color: #16a34a; box-shadow: inset 0 0 0 1px #bbf7d0; }
body.app-page .stat-icon.blue { background: #eff6ff; color: #1d4ed8; box-shadow: inset 0 0 0 1px #bfdbfe; }
body.app-page .stat-icon.red { background: #fef2f2; color: #dc2626; box-shadow: inset 0 0 0 1px #fecaca; }

body.app-page .stat-card span {
margin-bottom: 8px;
color: var(--muted);
font-size: 14px;
font-weight: 500;
}

body.app-page .stat-card strong {
font-size: 28px;
letter-spacing: -0.8px;
}

/* ---------- Breakdown bar ---------- */

body.app-page .breakdown-bar {
display: flex;
gap: 4px;
height: 12px;
margin: 6px 0 20px;
overflow: hidden;
border-radius: 999px;
background: #eef2f7;
}

body.app-page .breakdown-bar span { display: block; height: 100%; border-radius: 999px; }
body.app-page .breakdown-bar .seg-paid { background: #22c55e; }
body.app-page .breakdown-bar .seg-out { background: #3b82f6; }
body.app-page .breakdown-bar .seg-over { background: #ef4444; }

body.app-page .breakdown-legend {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 12px;
}

body.app-page .breakdown-legend div {
display: flex;
align-items: center;
gap: 10px;
color: var(--muted);
font-size: 14px;
}

body.app-page .breakdown-legend i {
width: 10px;
height: 10px;
flex: 0 0 10px;
border-radius: 3px;
}

body.app-page .breakdown-legend b { margin-left: auto; color: var(--text); font-weight: 700; }

/* ---------- Panels (same as auth-card / feature-card) ---------- */

body.app-page .dashboard-section,
body.app-page .form-card,
body.app-page .card {
background: rgba(255, 255, 255, 0.95);
border: 1px solid var(--border);
border-radius: 18px;
box-shadow: var(--card-shadow);
}

body.app-page .dashboard-section { margin-top: 22px; padding: 26px; }

body.app-page .section-title h2,
body.app-page .card h2,
body.app-page .form-card-heading h2 { font-size: 19px; letter-spacing: -0.4px; }

body.app-page .section-title a { color: var(--primary); }
body.app-page .section-title a:hover { text-decoration: underline; }

/* ---------- Tables ---------- */

body.app-page th {
padding: 13px 14px;
color: #64748b;
background: #f8fafc;
border-bottom: 1px solid var(--border);
font-size: 11.5px;
font-weight: 700;
letter-spacing: 0.08em;
}

body.app-page th:first-child { border-radius: 10px 0 0 10px; }
body.app-page th:last-child { border-radius: 0 10px 10px 0; }

body.app-page td {
padding: 17px 14px;
border-bottom: 1px solid #eef2f7;
font-size: 14.5px;
}

body.app-page tbody tr { transition: background 0.15s ease; }
body.app-page tbody tr:hover { background: #fafaff; }
body.app-page tbody tr:last-child td { border-bottom: 0; }

body.app-page .invoice-link { color: var(--primary); }

body.app-page .invoice-currency-badge {
padding: 3px 9px;
color: #475569;
background: #f1f5f9;
border: 1px solid #e2e8f0;
font-size: 11.5px;
letter-spacing: 0.04em;
}

/* ---------- Status pills ---------- */

body.app-page .status {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 5px 11px;
border: 1px solid transparent;
border-radius: 999px;
font-size: 12px;
font-weight: 700;
text-transform: capitalize;
}

body.app-page .status::before {
content: "";
width: 6px;
height: 6px;
border-radius: 50%;
background: currentColor;
}

body.app-page .status.paid { color: #15803d; background: #ecfdf3; border-color: #bbf7d0; }
body.app-page .status.sent { color: #1d4ed8; background: #eff6ff; border-color: #bfdbfe; }
body.app-page .status.overdue { color: #b91c1c; background: #fef2f2; border-color: #fecaca; }
body.app-page .status.draft { color: #475569; background: #f1f5f9; border-color: #e2e8f0; }

/* ---------- Search + filters (inputs styled like .auth-form input) ---------- */

body.app-page .table-toolbar {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
gap: 14px;
margin-bottom: 18px;
}

body.app-page .search-input { position: relative; flex: 1 1 260px; max-width: 380px; }

body.app-page .search-input svg {
position: absolute;
left: 14px;
top: 50%;
width: 16px;
height: 16px;
transform: translateY(-50%);
fill: none;
stroke: #94a3b8;
stroke-width: 2;
stroke-linecap: round;
}

body.app-page .search-input input {
width: 100%;
height: 44px;
padding: 0 14px 0 40px;
color: var(--text);
background: #fff;
border: 1px solid var(--border);
border-radius: 10px;
font: inherit;
font-size: 15px;
outline: none;
transition: 0.2s ease;
}

body.app-page .search-input input::placeholder { color: #9aa3b5; }

body.app-page .search-input input:focus {
border-color: var(--primary);
box-shadow: 0 0 0 3px rgba(99, 91, 255, 0.1);
}

body.app-page .filter-chips { display: flex; flex-wrap: wrap; gap: 8px; }

body.app-page .chip {
padding: 9px 15px;
color: #4b5563;
background: #fff;
border: 1px solid var(--border);
border-radius: 999px;
font: inherit;
font-size: 13px;
font-weight: 600;
cursor: pointer;
transition: 0.2s ease;
}

body.app-page .chip:hover { background: #f1f5f9; color: var(--text); }

body.app-page .chip.active {
color: var(--primary);
background: #eeecff;
border-color: rgba(99, 91, 255, 0.3);
}

body.app-page .no-results {
display: none;
padding: 40px 0 10px;
color: var(--muted);
text-align: center;
}

/* ---------- Empty state ---------- */

body.app-page .empty-icon {
width: 56px;
height: 56px;
border-radius: 16px;
background: linear-gradient(135deg, #eeecff, #f3f0ff);
box-shadow: inset 0 0 0 1px rgba(99, 91, 255, 0.1);
font-size: 22px;
}

body.app-page .empty-state h3 { color: var(--text); }

/* ---------- Upgrade card (same glow as landing CTA) ---------- */

body.app-page .upgrade-card {
position: relative;
overflow: hidden;
margin-top: 22px;
padding: 32px;
background: radial-gradient(circle at 50% 0%, #2a2558 0%, #111827 48%, #0b1120 100%);
border-radius: 20px;
box-shadow: 0 24px 60px rgba(17, 24, 39, 0.2);
}

body.app-page .upgrade-card::before {
content: "";
position: absolute;
width: 380px;
height: 380px;
right: -90px;
top: -230px;
border-radius: 50%;
background: rgba(99, 91, 255, 0.35);
filter: blur(20px);
pointer-events: none;
}

body.app-page .upgrade-card > * { position: relative; z-index: 1; }
body.app-page .upgrade-card h2 { margin: 10px 0 8px; letter-spacing: -0.8px; }
body.app-page .upgrade-card .eyebrow { color: #b9b4ff; }
body.app-page .upgrade-card p { margin: 0; color: #9ca3af; }

/* ---------- Due-date toast ---------- */

body.app-page .due-date-notification {
color: var(--text);
background: #fff;
border: 1px solid var(--border);
border-left: 3px solid var(--primary);
border-radius: 12px;
box-shadow: 0 18px 50px rgba(15, 23, 42, 0.14);
}

/* ---------- Forms on other app pages (match .auth-form) ---------- */

body.app-page .form-label,
body.app-page .form-group label { color: var(--text); font-weight: 600; }

body.app-page .form-label input,
body.app-page .form-label select,
body.app-page .form-label textarea,
body.app-page .form-group input,
body.app-page .form-group select,
body.app-page .form-group textarea,
body.app-page .card textarea {
padding: 13px 14px;
border: 1px solid var(--border);
border-radius: 8px;
font-size: 15px;
}

body.app-page .form-label input:focus,
body.app-page .form-label select:focus,
body.app-page .form-label textarea:focus,
body.app-page .form-group input:focus,
body.app-page .form-group select:focus,
body.app-page .form-group textarea:focus,
body.app-page .card textarea:focus {
border-color: var(--primary);
box-shadow: 0 0 0 3px rgba(99, 91, 255, 0.1);
}

body.app-page .invoice-item { background: #f8fafc; border-color: var(--border); border-radius: 12px; }
body.app-page .invoice-paper { border-radius: 14px; box-shadow: 0 20px 60px rgba(15, 23, 42, 0.08); }
body.app-page .page-header h1 { letter-spacing: -1px; }
body.app-page .add-item { border-radius: 10px; }

/* ==========================================================================
App Layout
 ========================================================================== */

body.app-page .app-layout {
display: flex;
align-items: flex-start;
width: 100%;
}

body.app-page .sidebar {
position: sticky;
top: 68px;
align-self: flex-start;
display: flex;
flex-direction: column;
flex: 0 0 248px;
width: 248px;
height: calc(100vh - 68px);
padding: 22px 14px 18px;
overflow-y: auto;
}

body.app-page .sidebar-label {
display: block;
margin: 18px 14px 8px;
color: #98a2b3;
font-size: 11px;
font-weight: 700;
letter-spacing: 0.1em;
text-transform: uppercase;
}

body.app-page .sidebar-label:first-child { margin-top: 4px; }



body.app-page .sidebar-plan {
margin-top: auto;
padding: 18px;
background: linear-gradient(160deg, #f5f3ff 0%, #eef2ff 100%);
border: 1px solid rgba(99, 91, 255, 0.15);
border-radius: 16px;
}

body.app-page .sidebar-plan strong { display: block; margin-bottom: 4px; font-size: 14px; }

body.app-page .sidebar-plan p {
margin: 0 0 14px;
color: var(--muted);
font-size: 13px;
line-height: 1.5;
}

body.app-page .sidebar-plan .button {
width: 100%;
min-height: 38px;
font-size: 13px;
box-shadow: 0 8px 20px rgba(99, 91, 255, 0.22);
}

body.app-page .sidebar-plan .button.secondary { box-shadow: none; }

/* centred, constrained content */
body.app-page .dashboard {
flex: 1 1 0;
min-width: 0;
width: 100%;
max-width: 1320px;
margin: 0 auto;
padding: 36px clamp(20px, 3vw, 40px) 64px;
}

body.app-page .dashboard-header {
align-items: flex-end;
gap: 24px;
margin-bottom: 28px;
}

body.app-page .stats-grid { margin-bottom: 22px; }

/* two-column dashboard body */
body.app-page .dashboard-grid {
display: grid;
grid-template-columns: minmax(0, 1fr) 340px;
gap: 22px;
align-items: start;
}

body.app-page .dash-main,
body.app-page .dash-side {
display: flex;
flex-direction: column;
gap: 22px;
min-width: 0;
}

body.app-page .dash-main .dashboard-section,
body.app-page .dash-side .dashboard-section,
body.app-page .dash-side .upgrade-card { margin-top: 0; }

body.app-page .dash-side .section-title { margin-bottom: 16px; }
body.app-page .dash-side .section-title h2 { font-size: 17px; }

/* side-column upgrade card stacks vertically */
body.app-page .dash-side .upgrade-card {
flex-direction: column;
align-items: flex-start;
gap: 20px;
padding: 26px;
}

body.app-page .dash-side .upgrade-card .button { width: 100%; }

/* breakdown legend stacks in the narrow column */
body.app-page .dash-side .breakdown-legend { grid-template-columns: 1fr; gap: 10px; }

/* quick actions */
body.app-page .quick-actions { display: flex; flex-direction: column; gap: 10px; }

body.app-page .quick-action {
display: flex;
align-items: center;
gap: 14px;
padding: 12px 14px;
background: #fff;
border: 1px solid var(--border);
border-radius: 14px;
text-decoration: none;
transition: 0.2s ease;
}

body.app-page .quick-action:hover {
border-color: rgba(99, 91, 255, 0.3);
background: #fafaff;
transform: translateX(2px);
}

body.app-page .qa-icon {
width: 38px;
height: 38px;
flex: 0 0 38px;
display: grid;
place-items: center;
border-radius: 11px;
background: linear-gradient(135deg, #eeecff, #f3f0ff);
box-shadow: inset 0 0 0 1px rgba(99, 91, 255, 0.1);
color: var(--primary);
}

body.app-page .qa-icon svg {
width: 18px;
height: 18px;
fill: none;
stroke: currentColor;
stroke-width: 1.9;
stroke-linecap: round;
stroke-linejoin: round;
}

body.app-page .quick-action b { display: block; font-size: 14px; font-weight: 700; }
body.app-page .quick-action small { display: block; margin-top: 1px; color: var(--muted); font-size: 12.5px; }

/* invoices list page: table card fills the width cleanly */
body.app-page .dashboard > .dashboard-section { margin-top: 0; }

@media (max-width: 1180px) {
body.app-page .dashboard-grid { grid-template-columns: minmax(0, 1fr); }
body.app-page .dash-side { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
body.app-page .dash-side .upgrade-card { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
body.app-page .dash-side { grid-template-columns: minmax(0, 1fr); }
body.app-page .dashboard-header { align-items: flex-start; }
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
body.app-page .dashboard { padding: 26px 18px 50px; }
body.app-page .breakdown-legend { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
body.app-page .app-navbar { padding: 0 16px; }
body.app-page .app-user span:not(.avatar) { display: none; }
body.app-page .table-toolbar { flex-direction: column; align-items: stretch; }
body.app-page .search-input { max-width: none; }
body.app-page .dashboard-section { padding: 20px; }
}


/* ==========================================================================
 BILLING & CUSTOMERS PAGES (app theme)
 ========================================================================== */

/* alerts: info (default), success, error */
body.app-page .alert {
margin-bottom: 22px;
padding: 14px 16px;
color: #1d4ed8;
background: #eff6ff;
border: 1px solid #bfdbfe;
border-radius: 12px;
font-size: 14px;
font-weight: 600;
line-height: 1.5;
}

body.app-page .alert.success { color: #166534; background: #ecfdf3; border-color: #bbf7d0; }
body.app-page .alert.error { color: #b91c1c; background: #fef2f2; border-color: #fecaca; }

body.app-page .form-card { margin-bottom: 22px; padding: 28px; }
body.app-page .form-card-heading { margin-bottom: 22px; }
body.app-page .form-card-heading h2 { margin: 0 0 6px; }
body.app-page .form-card-heading p { line-height: 1.6; }

body.app-page .notice {
padding: 14px 16px;
border-radius: 12px;
font-size: 14px;
line-height: 1.6;
}

body.app-page .notice code {
padding: 2px 6px;
background: rgba(154, 52, 18, 0.08);
border-radius: 6px;
font-size: 12.5px;
}

/* danger + small buttons */
body.app-page .button.small { min-height: 36px; padding: 0 14px; font-size: 13px; }

body.app-page .button.danger {
color: #dc2626 !important;
background: #fef2f2;
border: 1px solid #fecaca;
box-shadow: none;
}

body.app-page .button.danger:hover { color: #fff !important; background: #dc2626; border-color: #dc2626; }

/* ---------- Billing ---------- */

body.app-page .billing-grid {
display: grid;
grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
gap: 22px;
align-items: start;
}

body.app-page .billing-grid .form-card { margin-bottom: 0; }

body.app-page .plan-card { position: relative; overflow: hidden; }

body.app-page .plan-card::after {
content: "";
position: absolute;
right: -70px;
top: -70px;
width: 200px;
height: 200px;
border-radius: 50%;
background: radial-gradient(circle, rgba(99, 91, 255, 0.14), transparent 70%);
pointer-events: none;
}

body.app-page .plan-card-top { margin-bottom: 16px; }

body.app-page .plan-badge {
display: inline-block;
padding: 5px 12px;
color: #475569;
background: #f1f5f9;
border: 1px solid #e2e8f0;
border-radius: 999px;
font-size: 12px;
font-weight: 700;
}

body.app-page .plan-badge.premium {
color: var(--primary);
background: #eeecff;
border-color: rgba(99, 91, 255, 0.25);
}

body.app-page .plan-price {
margin: 0 0 20px;
font-size: 40px;
font-weight: 800;
letter-spacing: -1.5px;
}

body.app-page .plan-price small {
color: var(--muted);
font-size: 15px;
font-weight: 500;
letter-spacing: 0;
}

body.app-page .feature-list {
display: flex;
flex-direction: column;
gap: 14px;
margin: 0;
padding: 0;
list-style: none;
}

body.app-page .feature-list li {
display: flex;
align-items: flex-start;
gap: 12px;
color: #344054;
font-size: 14.5px;
line-height: 1.5;
}

body.app-page .feature-list li::before {
content: "\2713";
flex: 0 0 22px;
width: 22px;
height: 22px;
display: inline-grid;
place-items: center;
color: #16a34a;
background: #ecfdf3;
border-radius: 50%;
box-shadow: inset 0 0 0 1px #bbf7d0;
font-size: 12px;
font-weight: 800;
}

/* ---------- Customers ---------- */

body.app-page .customer-cell { display: flex; align-items: center; gap: 12px; }

body.app-page .customer-avatar {
flex: 0 0 36px;
width: 36px;
height: 36px;
display: grid;
place-items: center;
color: var(--primary);
background: linear-gradient(135deg, #eeecff, #f3f0ff);
border-radius: 50%;
box-shadow: inset 0 0 0 1px rgba(99, 91, 255, 0.15);
font-size: 14px;
font-weight: 800;
text-transform: uppercase;
}

body.app-page .empty-icon svg { display: block; }

body.app-page th:last-child,
body.app-page td:last-child { white-space: nowrap; }

/* edit modal */
body.app-page .customer-edit-modal {
border: 1px solid var(--border);
border-radius: 20px;
box-shadow: 0 30px 80px rgba(15, 23, 42, 0.25);
overflow: hidden;
}

body.app-page .customer-edit-modal::backdrop {
background: rgba(15, 23, 42, 0.5);
backdrop-filter: blur(4px);
}

body.app-page .customer-edit-modal-header { padding: 26px 28px 20px; background: #fafbff; }
body.app-page .customer-edit-modal-header h2 { font-size: 22px; letter-spacing: -0.5px; }

body.app-page .customer-modal-close { border-radius: 11px; }

body.app-page .customer-edit-modal .customer-delete-form {
padding: 16px 28px 22px;
background: #fafbff;
border-top: 1px solid var(--border);
}

@media (max-width: 1000px) {
body.app-page .billing-grid { grid-template-columns: minmax(0, 1fr); }
}


/* ==========================================================================
 FORM PAGES: settings, create invoice, edit invoice, invoice view, upgrade
 ========================================================================== */

/* narrower centred column for long forms */
body.app-page .dashboard.narrow { max-width: 1060px; }

/* .page-header == .dashboard-header */
body.app-page .page-header {
display: flex;
align-items: flex-end;
justify-content: space-between;
gap: 24px;
margin-bottom: 28px;
}

body.app-page .page-header h1 {
margin: 10px 0 6px;
color: var(--text);
font-size: clamp(28px, 3vw, 34px);
line-height: 1.1;
letter-spacing: -1.2px;
}

body.app-page .page-header p { margin: 0; color: var(--muted); }

body.app-page .card { margin-bottom: 22px; padding: 28px; }
body.app-page .card h2 { margin: 0 0 20px; color: var(--text); font-size: 19px; letter-spacing: -0.4px; }

body.app-page .section-heading { margin-bottom: 20px; }
body.app-page .section-heading h2 { margin: 0 0 4px; }
body.app-page .section-heading p { margin: 0; color: var(--muted); font-size: 14px; }

body.app-page .form-group label { color: var(--text); font-size: 13.5px; font-weight: 600; }

body.app-page .form-help {
margin: 6px 0 0;
color: var(--muted);
font-size: 13px;
line-height: 1.5;
}

body.app-page .card > .form-help { margin: -8px 0 16px; }

body.app-page .form-group select { min-height: 46px; }

body.app-page .form-group input:disabled,
body.app-page .form-group select:disabled {
color: #98a2b3;
background: #f8fafc;
cursor: not-allowed;
}

/* file upload */
body.app-page input[type="file"] {
padding: 10px;
background: #fafbff;
border: 1px dashed rgba(99, 91, 255, 0.35);
border-radius: 12px;
color: var(--muted);
cursor: pointer;
}

body.app-page input[type="file"]::file-selector-button {
margin-right: 12px;
padding: 8px 14px;
color: var(--primary);
background: #eeecff;
border: 0;
border-radius: 9px;
font: inherit;
font-size: 13px;
font-weight: 700;
cursor: pointer;
}

body.app-page #logo-preview img { background: #fff; border-color: var(--border) !important; border-radius: 12px !important; }

body.app-page .success-message {
margin-bottom: 22px;
padding: 14px 16px;
color: #166534;
background: #ecfdf3;
border: 1px solid #bbf7d0;
border-radius: 12px;
}

body.app-page .empty-message {
margin-top: 16px;
padding: 18px;
color: var(--muted);
background: #f8fafc;
border: 1px dashed #d5dbe7;
border-radius: 14px;
}

body.app-page .empty-message p { margin: 0 0 12px; }

/* invoice line items */
body.app-page .invoice-item { padding: 18px; border-radius: 14px; }

body.app-page .invoice-summary {
padding: 20px 22px;
background: #fafbff;
border: 1px solid var(--border);
border-radius: 14px;
}

body.app-page .invoice-summary .invoice-total { border-top-color: var(--border); }

body.app-page .form-actions {
padding-top: 4px;
padding-bottom: 20px;
}

/* ---------- invoice view (document page) ---------- */

body.app-page .invoice-detail-container { max-width: 1040px; padding: 32px 20px 64px; }

body.app-page .invoice-toolbar {
flex-wrap: wrap;
gap: 12px;
margin-bottom: 22px;
}

body.app-page .toolbar-actions { display: flex; gap: 10px; margin-left: auto; }

body.app-page .invoice-toolbar form { margin: 0; }

body.app-page .invoice-paper-header { align-items: flex-start; flex-wrap: wrap; }

body.app-page .button.success {
color: #fff !important;
background: #16a34a;
border: 0;
box-shadow: 0 10px 24px rgba(22, 163, 74, 0.25);
}

body.app-page .button.success:hover { background: #15803d; }

/* ---------- upgrade-limit page ---------- */

body.app-page .auth-container { min-height: calc(100vh - 68px); }

body.app-page .auth-card {
padding: 40px;
border: 1px solid var(--border);
border-radius: 22px;
box-shadow: 0 30px 80px rgba(15, 23, 42, 0.08);
}

body.app-page .auth-card .feature-icon {
width: 52px;
height: 52px;
display: grid;
place-items: center;
color: var(--primary);
background: linear-gradient(135deg, #eeecff, #f3f0ff);
border-radius: 15px;
box-shadow: inset 0 0 0 1px rgba(99, 91, 255, 0.1);
font-size: 22px;
}

body.app-page .auth-card .upgrade-card { padding: 24px; }

@media (max-width: 700px) {
body.app-page .page-header { flex-direction: column; align-items: flex-start; }
body.app-page .toolbar-actions { margin-left: 0; }
body.app-page .card { padding: 20px; }
}

@media print {
body.app-page .invoice-paper { box-shadow: none; border-radius: 0; }
}


/* ==========================================================================
 SIDEBAR NAV REFINEMENT
 ========================================================================== */

body.app-page .sidebar { padding: 20px 12px 16px; background: #fff; }

body.app-page .sidebar-label {
margin: 22px 12px 8px;
color: #a0a8b8;
font-size: 10.5px;
font-weight: 700;
letter-spacing: 0.12em;
}

body.app-page .sidebar-label:first-child { margin-top: 6px; }

body.app-page .sidebar-link {
gap: 11px;
margin-bottom: 2px;
padding: 10px 12px;
border-radius: 9px;
font-size: 14px;
}

body.app-page .sidebar-link svg { width: 17px; height: 17px; flex-basis: 17px; opacity: 0.85; }

body.app-page .sidebar-link.active {
color: var(--primary);
background: rgba(99, 91, 255, 0.09);
box-shadow: none;
font-weight: 600;
}

body.app-page .sidebar-link.active svg { opacity: 1; stroke-width: 2; }
