* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family:
    Arial,
    Helvetica,
    sans-serif;
  background: #f4f6f8;
  color: #1f2933;
}

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-card {
  width: 420px;
  max-width: calc(100% - 32px);
  background: white;
  padding: 36px;
  border-radius: 12px;
  box-shadow:
    0 10px 30px
    rgba(0, 0, 0, 0.08);
}

.login-card h1 {
  margin-top: 0;
  margin-bottom: 5px;
}

.subtitle {
  color: #667085;
  margin-bottom: 30px;
}

label {
  display: block;
  margin-top: 16px;
  margin-bottom: 6px;
  font-weight: bold;
}

input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 16px;
}

button {
  margin-top: 24px;
  padding: 11px 18px;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-size: 15px;
}

.login-card button {
  width: 100%;
}

.error {
  background: #fee2e2;
  border: 1px solid #fecaca;
  padding: 12px;
  border-radius: 6px;
  margin-bottom: 16px;
}

.topbar {
  min-height: 64px;
  background: white;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
}

.user-area {
  display: flex;
  align-items: center;
  gap: 18px;
}

.logout {
  margin: 0;
  padding: 8px 12px;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 30px;
}

.cards {
  display: grid;
  grid-template-columns:
    repeat(3, 1fr);
  gap: 20px;
}

.card {
  background: white;
  border-radius: 10px;
  padding: 24px;
  border: 1px solid #e2e8f0;
}

.number {
  font-size: 36px;
  font-weight: bold;
  margin-bottom: 5px;
}

.panel {
  background: white;
  border-radius: 10px;
  padding: 24px;
  border: 1px solid #e2e8f0;
  margin-top: 30px;
}

@media (max-width: 800px) {

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

  .topbar {
    padding: 12px 16px;
    align-items: flex-start;
  }

  .user-area {
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
  }
}


/* project-estimate extended UI */

table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  vertical-align: top;
}

th {
  background: #f8fafc;
}

select {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 16px;
  background: white;
}

.narrow {
  max-width: 800px;
}

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

.button-link {
  display: inline-block;
  padding: 10px 16px;
  text-decoration: none;
  border-radius: 6px;
  background: #e2e8f0;
  color: #1f2933;
}

.inline-form {
  display: grid;
  grid-template-columns: 200px 1fr auto;
  gap: 12px;
  align-items: end;
}

.inline-form button {
  margin: 0;
}

.main-nav {
  display: flex;
  gap: 10px;
  margin-bottom: 25px;
  flex-wrap: wrap;
}

.main-nav a {
  text-decoration: none;
  padding: 10px 16px;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  color: #1f2933;
}

input[type="file"] {
  background: white;
  cursor: pointer;
}

.panel + .panel {
  margin-top: 24px;
}



/* ============================================================
   Aufwandsschätzung
   ============================================================ */

.muted {
  color: #667085;
}

.small {
  font-size: 12px;
  margin-top: 3px;
}

.success {
  padding: 12px 16px;
  margin-bottom: 20px;
  background: #ecfdf3;
  border: 1px solid #abefc6;
  border-radius: 8px;
}

.detail-grid {
  display: grid;
  grid-template-columns:
    repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.detail-label {
  display: block;
  font-size: 12px;
  color: #667085;
  margin-bottom: 5px;
}

.estimate-page {
  max-width: 1800px;
}

.estimate-toolbar {
  position: sticky;
  top: 0;
  z-index: 30;

  display: flex;
  align-items: center;
  gap: 30px;

  padding: 14px 18px;
  margin-bottom: 18px;

  background: white;
  border: 1px solid #d0d5dd;
  border-radius: 8px;

  box-shadow:
    0 4px 12px
    rgba(0, 0, 0, 0.05);
}

.estimate-toolbar button {
  margin: 0 0 0 auto;
}

.estimate-group {
  margin-bottom: 14px;
  background: white;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  overflow: hidden;
}

.group-header {
  width: 100%;
  margin: 0;
  padding: 14px 18px;

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

  border-radius: 0;

  text-align: left;
  font-weight: bold;
  font-size: 16px;

  background: #f2f4f7;
}

.group-summary {
  display: flex;
  gap: 20px;
  align-items: center;
}

.group-content {
  display: block;
}

.estimate-group.collapsed
.group-content {
  display: none;
}

.estimate-table {
  table-layout: fixed;
}

.estimate-table th,
.estimate-table td {
  padding: 9px 10px;
}

.activity-col {
  width: 31%;
}

.hours-col {
  width: 100px;
}

.rate-col {
  width: 100px;
}

.amount-col {
  width: 130px;
}

.note-col {
  width: 20%;
}

.hours-input {
  min-width: 80px;
  padding: 7px 8px;
}

.note-input {
  min-width: 140px;
  padding: 7px 8px;
}

.activity-used {
  background: #f8fafc;
}

.estimate-bottom-save {
  display: flex;
  justify-content: flex-end;
  margin-top: 25px;
  margin-bottom: 60px;
}

@media (max-width: 1000px) {

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

  .estimate-toolbar {
    position: static;
    flex-wrap: wrap;
  }

  .estimate-toolbar button {
    margin-left: 0;
  }

  .estimate-page {
    overflow-x: auto;
  }

  .estimate-table {
    min-width: 1100px;
  }
}



/* ============================================================
   Erweiterte Kalkulation
   ============================================================ */

.advanced-estimate-table {
  min-width: 1500px;
}

.qualification-col {
  width: 130px;
}

.costcenter-col {
  width: 120px;
}

.calc-type-col {
  width: 150px;
}

.calc-input-col {
  width: 320px;
}

.result-hours-col {
  width: 100px;
}

.calc-panel {
  display: none;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}

.calc-number {
  width: 85px;
  min-width: 70px;
  padding: 7px 8px;
}

.calc-unit {
  white-space: nowrap;
  color: #667085;
  font-size: 12px;
}

.row-hours {
  font-weight: bold;
  white-space: nowrap;
}

.row-amount {
  font-weight: bold;
  white-space: nowrap;
}

.calculation-type {
  padding: 7px 8px;
  font-size: 14px;
}


.page-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin-top: 25px;
}

.form-actions button {
  margin: 0;
}


textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-family: inherit;
  font-size: 15px;
  resize: vertical;
}

.status-box {
  padding: 10px 16px;
  background: white;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
}

.status-form {
  display: flex;
  gap: 12px;
  align-items: center;
  max-width: 700px;
}

.status-form select {
  flex: 1;
}

.status-form button {
  margin: 0;
  white-space: nowrap;
}

