body {
  font-family: Arial, sans-serif;
  margin: 0;
  background: #f4f4f4;
}

header {
  background: #2c3e50;
  color: white;
  padding: 1rem;
}

nav button {
  margin-right: 5px;
  padding: 8px 12px;
  cursor: pointer;
}

main {
  padding: 1rem;
}

.view {
  background: white;
  padding: 1rem;
  border-radius: 4px;
}

.hidden {
  display: none;
}

input {
  margin: 5px 0;
  padding: 6px;
  width: 200px;
}

button {
  background: #3498db;
  color: white;
  border: none;
  border-radius: 3px;
}

ul {
  margin-top: 10px;
}
.login {
  max-width: 300px;
  margin: 100px auto;
  background: white;
  padding: 20px;
  border-radius: 4px;
  text-align: center;
}
.login {
  max-width: 320px;
  margin: 100px auto;
  padding: 20px;
  background: white;
  border-radius: 6px;

  display: flex;
  flex-direction: column;
  gap: 10px;
}

.login input,
.login button {
  width: 100%;
  box-sizing: border-box;
}
.top-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.nav-row button {
  background: #1e90ff;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
}

.admin-nav {
  padding-left: 0;
}
table {
  width: 100%;
  margin-top: 10px;
  border-collapse: collapse;
}

th {
  background: #f0f0f0;
}

td, th {
  text-align: left;
}

.clickable {
  cursor: pointer;
}

.clickable:hover {
  background: #f5f5f5;
}

.print-only {
  display: block;
}

@media print {
  img {
    visibility: visible !important;
    display: inline-block !important;
  }

  .company-logo {
    max-height: 60px;
  }
}

@media print {
  body * {
    visibility: hidden;
  }

  #printArea,
  #printArea * {
    visibility: visible;
  }

  #printArea {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    padding: 30px;
    font-size: 12pt;
  }

  h1, h2, p {
    margin: 6px 0;
  }

  table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
  }

  th, td {
    border: 1px solid #000;
    padding: 6px;
    text-align: left;
    vertical-align: top;
  }

  th {
    background: #f0f0f0;
  }

  button {
    display: none !important;
  }
}
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: #fff;
  padding: 20px;
  border-radius: 6px;
  min-width: 300px;
  text-align: center;
}

.modal-actions {
  margin-top: 15px;
  display: flex;
  gap: 10px;
  justify-content: center;
}
.badge-paid {
  background: #d4edda;
  color: #155724;
  padding: 2px 6px;
  border-radius: 4px;
}
.badge-unpaid {
  background: #f8d7da;
  color: #721c24;
  padding: 2px 6px;
  border-radius: 4px;
}
.doc-header {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.company-logo {
  max-height: 60px;
}
.doc-address-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 40px;
  margin-bottom: 40px;
  font-size: 12pt;
}

.sender {
  padding-left: 10mm;
  align-self: start;
}

.recipient {
  padding-left: 35mm;
  margin-top: 20mm;
}
@media print {
  body {
    margin: 0;
  }

  .doc-address-header {
    margin-top: 20mm;
  }
}