/* Global styles for Petromax Teileverwaltung */
:root {
  --bg: #0e1116;
  --panel: #161b22;
  --text: #e6edf3;
  --muted: #9da7b3;
  --primary: #2f81f7;
  --danger: #f85149;
  --ok: #3fb950;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Helvetica, Arial, sans-serif;
  margin: 0;
  /* max-width: 90%; */
}

header {
  padding: 16px 20px;
  background: var(--panel);
  border-bottom: 1px solid #30363d;
  display: flex;
  align-items: center;
  justify-content: right;
  position: relative;
  max-width: -webkit-fill-available;
}

.brand {
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
}

.logo-left {
  position: absolute;
  left: 20px;
  font-size: 20px;
  line-height: 1;
  width: 35%;
}

main {
  padding: 5px;
  /* Reserve space so sticky actions don't overlap content */
  padding-bottom: 96px;
}

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

table {
  /* width: 100%; */
  border-collapse: collapse;
  background: var(--panel);
  border: 1px solid #30363d;
  border-radius: 8px;
  /* allow cell content to fully display/wrap */
  overflow: visible;
  /* max-width: 88.5%; */
  font-size: 15px;
  width: -webkit-fill-available;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid #30363d;
  text-align: center;
  /* prevent cutting after '-' and allow wrapping */
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: manual;
}

th {
  /* text-align: left; */
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-align: center;
}

tr:last-child td {
  border-bottom: none;
}

.actions {
  display: flex;
  gap: 8px;
}

button {
  cursor: pointer;
  border: 1px solid #30363d;
  background: transparent;
  color: var(--text);
  padding: 6px 10px;
  border-radius: 8px;
}

button:hover {
  background: #21262d;
}

.btn-plus {
  border-color: var(--ok);
}

.btn-minus {
  border-color: var(--danger);
}

.toolbar {
  margin: 12px 0 20px;
  display: flex;
  gap: 12px;
  align-items: center;
  color: var(--muted);
}

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

/* Home */
.home {
  max-width: -webkit-fill-available;
  margin: 0 auto;
}

.logo-row {
  margin: 24px 0 12px;
}

.logo {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.cta-col {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 24px;
}

.cta {
  display: block;
  text-align: center;
  padding: 125px 24px;
  border-radius: 16px;
  font-size: 22px;
  font-weight: 700;
  text-decoration: none;
  color: #0e1116;
}

.cta-green {
  background: #9be9a8;
}

.cta-red {
  background: #ffb3ad;
}

.cta-dark {
  background: #2d333b;
  color: #fff;
}

/* Titles */
.page-title {
  margin: 12px 0 16px 10px;
  padding: 12px 16px;
  border-radius: 12px;
  background: #2d333b;
  max-width: 88.5%;
  font-size: larger;
  text-align: center;
}

.page-title.ok {
  background: #14532d;
}

.page-title.warn {
  background: #3c2a1e;
}

/* Bulk forms */
.quantity {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.quantity input {
  width: 32px;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid #30363d;
  background: #0e1116;
  color: var(--text);
  text-align: center;
}

.qbtn {
  border: 1px solid #30363d;
  /* padding: 8px 12px; */
  border-radius: 8px;
  background: #21262d;
  color: var(--text);
}

.qbtn:hover {
  background: #2d333b;
}

.form-actions {
  margin-top: 16px;
  display: flex;
  gap: 12px;
  justify-content: center;
  /* Keep actions visible while scrolling */
  position: sticky;
  bottom: 0;
  background: var(--panel);
  border-top: 1px solid #30363d;
  padding: 12px 16px;
  z-index: 10;
}

.primary {
  background: #d97706;
  border: 1px solid #b45309;
  color: #fff;
  padding: 12px 16px;
  border-radius: 12px;
  cursor: pointer;
  width: -webkit-fill-available;
  text-align: center;
}

.primary:hover {
  filter: brightness(1.05);
}

.link {
  color: var(--text);
  text-decoration: none;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid #30363d;
  text-align: center;
  width: -webkit-fill-available;
}

.linklike {
  text-decoration: none;
}

@media screen and (max-width: 450px){
  table {
    /* width: 100%; */
    border-collapse: collapse;
    background: var(--panel);
    border: 1px solid #30363d;
    border-radius: 8px;
    overflow: visible;
    /* max-width: 88.5%; */
    font-size: 10px;
    width: -webkit-fill-available;
  }
}
