html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
}

body {
  display: flex;
  overflow: hidden;
  background: #f7f9fc;
}

/* Sidebar */
.sidebar {
  width: 350px;
  background: #fff;
  padding: 20px;
  overflow-y: auto;
  border-right: 1px solid #e0e0e0;
}

.sidebar h2,
.sidebar h3 {
  margin-bottom: 0;
}

h2 {
  font-weight: normal;
  margin: 1rem 0 .5rem 0;
}

.sidebar label {
  display: block;
  margin-top: 10px;
  font-size: 0.9rem;
}

.sidebar input,
.sidebar textarea {
  width: 95%;
  padding: 6px 8px;
  margin-top: 3px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 0.9rem;
}

.sidebar textarea {
  resize: vertical;
}

.sidebar button {
  margin-top: 10px;
  padding: 8px 12px;
  font-size: 0.9rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  background: #0077ff;
  color: white;
}

.sidebar button.info {
  background: #0fc737;
  padding: 4px 12px;
}

.sidebar button.delete {
  background: #ff3a3a;
  padding: 4px 12px;
}

.sidebar .dropdown-button {
  background-color: rgba(0, 0, 0, 0.04);
  margin-top: .3rem;
  border-top: solid 1px rgba(0, 0, 0, 0.16);
  display: flex;
  flex-flow: row nowrap;
  justify-content: space-between;
  gap: 1rem;
  padding: .3rem .6rem;
  cursor: pointer;
  border-radius: 0 0 .2rem .2rem;
}

.sidebar .dropdown-button span:last-child {
  rotate: 90deg;
  font-weight: bold;
}

.line-details {
  padding-bottom: .3rem;
}

/* Preview container */
.preview-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  /* top uitlijnen zodat scrollen logisch is */
  overflow-y: auto;
  /* hier zit scroll */
  position: relative;
  background: #f0f3f9;
  padding: 20px;
  /* optioneel voor ruimte rondom */
}

/* Slider */
.scale-slider-container {
  position: fixed;
  bottom: 10px;
  left: 420px;
  width: calc(100vw - 420px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.scale-slider-container input[type="range"] {
  width: 70%;
}

/* Invoice pages */
.invoice-pages {
  transform-origin: top center; 
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.invoice-page {
  width: 210mm;
  height: 297mm;
  background: #fff;
  margin-bottom: 20px;
  padding: 20mm;
  box-sizing: border-box;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transform-origin: top center;
  position: relative;
  font-size: 0.8rem;
}

.invoice-header,
.invoice-footer {
  margin-bottom: 10px;
}

.invoice-info {
  display: flex;
  flex-flow: column;
}
.invoice-info * {
  margin: 0;
  padding: 0;
}

.invoice-footer {
  position: absolute;
  /* padding: 0 20mm; */
  width: calc(100% - 40mm);
  bottom: 20mm;
  display: flex;
  flex-flow: row;
  justify-content: space-between;
  align-items: flex-end;
}

.invoice-footer div {
  text-align: right;
  font-weight: bold;
}

.header-container {
  min-height: 350px;
  width: 100%;
  display: flex;
  flex-flow: row nowrap;
}

.header-container .main {
  display: flex;
  flex-flow: column;
  justify-content: center;
  min-height: 100%;
  flex-grow: 1;
}

.header-container .main .tiny {
  font-size: 0.7rem;
}

.header-container .side {
  display: flex;
  flex-flow: column nowrap;
  align-items: flex-end;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 10px;
  margin-top: 10px;
}

th,
td {
  border: none;
  padding: 5px;
  font-size: 0.8rem;
  background: #fff;
  text-align: left;
  vertical-align: top;
}
td {
  vertical-align: bottom; 
}
th.r,
td.r {
  text-align: right;
}
th.s,
td.s {
  width: 16mm;
}

.hidden {
  display: none;
}

.plain-link {
  all: unset;            /* remove all default styles */
  color: inherit;        /* inherit text color */
  cursor: pointer;       /* make clickable */
  text-decoration: none; /* no underline by default */
}

.plain-link:hover {
  text-decoration: underline; /* underline only on hover */
}
