:root {
  --primary: #0066cc;
  --primary-dark: #004c99;
  --bg: #f7f9fb;
  --card: #ffffff;
  --text: #222222;
  --border: #d0d7de;
  --success: #28a745;
  --error: #dc3545;
  --info: #17a2b8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

header,
footer {
  background: var(--primary);
  color: #ffffff;
  padding: 1rem 2rem;
  text-align: center;
}

header h1 {
  margin: 0;
  font-size: 1.6rem;
}

header p {
  margin: 0.25rem 0 0;
  font-size: 0.95rem;
}

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
}

section {
  background: var(--card);
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

h2 {
  margin-top: 0;
  color: var(--primary-dark);
}

/* Forms */
.room-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

label {
  display: flex;
  flex-direction: column;
  font-size: 0.9rem;
  font-weight: 600;
}

input,
select,
textarea {
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 1rem;
  margin-top: 0.25rem;
}

button {
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 4px;
  background: var(--primary);
  color: #ffffff;
  cursor: pointer;
  font-size: 1rem;
}

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

button.secondary {
  background: #6c757d;
}

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

.form-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  font-size: 0.9rem;
}

th,
td {
  border: 1px solid var(--border);
  padding: 0.5rem;
  text-align: left;
}

th {
  background: #eef2f6;
}

tr:nth-child(even) {
  background: #fafbfc;
}

/* Upload drop zone */
.drop-zone {
  border: 2px dashed var(--border);
  border-radius: 4px;
  padding: 0.5rem;
  margin-top: 0.5rem;
  text-align: center;
  font-size: 0.8rem;
  color: #555555;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.drop-zone.dragover {
  background: #e6f2ff;
  border-color: var(--primary);
}

/* Messages */
.messages {
  margin-bottom: 1rem;
}

.message {
  padding: 0.75rem 1rem;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

.message.success {
  background: #d4edda;
  color: #155724;
}

.message.error {
  background: #f8d7da;
  color: #721c24;
}

.message.info {
  background: #d1ecf1;
  color: #0c5460;
}

/* Calculation */
.calc-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
  margin-bottom: 1rem;
}

.results {
  overflow-x: auto;
}

.summary {
  background: #eef6ff;
  border-left: 4px solid var(--primary);
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 4px;
}

.summary p {
  margin: 0.4rem 0;
}

/* Checklist */
.checklist-item {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.checklist-item:last-child {
  border-bottom: none;
}

.checklist-item label {
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}

.checklist-item textarea {
  width: 100%;
  min-height: 60px;
}

/* Responsive */
@media (max-width: 768px) {
  .room-form {
    grid-template-columns: 1fr;
  }

  table {
    font-size: 0.8rem;
  }

  th,
  td {
    padding: 0.3rem;
  }

  .calc-controls {
    flex-direction: column;
    align-items: stretch;
  }
}
