/* =============================
   Global Theme & Resets
   ============================= */
:root {
  --bg: #f9f9f9;
  --text: #333333;
  --muted: #666666;
  --surface: #ffffff;
  --border: #dddddd;
  --primary: #825538;        /* brand brown */
  --primary-hover: #6a432c;  /* darker hover */
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
               Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji",
               "Segoe UI Emoji", "Segoe UI Symbol";
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
}

/* =============================
   Header & Navigation
   ============================= */
header {
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 1rem;
}

header img {
  height: 56px;
  max-width: 100%;
  display: block;
  object-fit: contain;
}

nav a {
  color: #fff;
  margin: 0 0.8rem;
  text-decoration: none;
  font-weight: 700;
  padding: 0.35rem 0.2rem;
  border-bottom: 2px solid transparent;
}

nav a:hover { border-bottom-color: rgba(255,255,255,0.5); }
nav a.active { border-bottom-color: #fff; }

/* =============================
   Layout Helpers
   ============================= */
.container {
  padding: 2rem 1.25rem;
  max-width: 1100px;
  margin: 0 auto;
}

footer {
  margin: 3rem 0 1.5rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
}

/* =============================
   Buttons (global)
   ============================= */
a.main-btn,
button.main-btn,
.main-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.4rem;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
  background: var(--primary);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.02s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

a.main-btn:hover,
button.main-btn:hover,
.main-btn:hover { background: var(--primary-hover); }

a.main-btn:active,
button.main-btn:active,
.main-btn:active { transform: translateY(1px); }

a.main-btn[disabled],
button.main-btn[disabled],
.main-btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Equal-size buttons on the home page rows */
.buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.2rem;
  margin: 1rem 0;
}

.buttons .main-btn { width: 220px; height: 48px; }
.buttons .main-btn.wide { width: 460px; }

/* =============================
   Date Button Bar (Clean/Times/Schedule)
   ============================= */
.datebar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin: 1rem 0 1.5rem;
}

.datebar .main-btn {
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
}

.datebar .main-btn.active {
  outline: 3px solid #333;
  outline-offset: 1px;
}

/* =============================
   Tables (Clean, Orders, Logs)
   ============================= */
table.clean-table,
table.orders-table,
table.log,
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
}

table.clean-table th, table.clean-table td,
table.orders-table th, table.orders-table td,
table.log th, table.log td,
table th, table td {
  border: 1px solid #e6e6e6;
  padding: 0.6rem;
  text-align: left;
  vertical-align: middle;
}

table.clean-table th,
table.orders-table th,
table.log th,
table th {
  background: #f3f3f3;
  font-weight: 700;
}

.actions { text-align: center; margin-top: 1rem; }

/* Inputs inside tables */
table input[type="text"],
table input[type="number"],
table input[type="email"],
table input[type="date"],
table input[type="search"] {
  width: 100%;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  background: #fff;
  color: var(--text);
}

table input[type="number"] { max-width: 7rem; }

/* Readonly helper for inputs that should not be editable but remain visible */
input[readonly] { background: #f5f5f5; color: var(--text); }

/* For visible but non-interactive checkboxes (frontend orders) */
.readonly-chk { opacity: 1; }

/* =============================
   Cards (Backend dashboard)
   ============================= */
.cards {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  margin: 2rem 0;
}

.card {
  background: var(--surface);
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 1.2rem 1.5rem;
  width: 320px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.card h2 { margin: 0 0 0.5rem 0; font-size: 1.2rem; }
.card p  { color: var(--muted); margin: 0 0 1rem 0; }

/* =============================
   Pills / Status (Times pages)
   ============================= */
.pill, .status-pill {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
}

.pill.on, .status-pill.on { background: #d1fadf; color: #065f46; }
.pill.off, .status-pill.off { background: #fee2e2; color: #991b1b; }

/* =============================
   Work Schedule (Calendars)
   ============================= */
.month-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: .75rem; }
.weekday    { font-weight: 700; text-align: center; padding: .4rem 0; }

.day-card {
  background: #fff;
  border: 3px solid #333;
  border-radius: 14px;
  padding: .8rem;
  min-height: 170px;
  display: flex;
  flex-direction: column;
  gap: .55rem;
}
.day-head { display: flex; justify-content: space-between; font-weight: 700; }
.rooms    { font-size: .92rem; color: #555; }

.assign { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.person-label { min-width: 70px; font-weight: 700; }

.chooser { display: flex; gap: .4rem; margin-top: .3rem; }
.chooser.hidden { display: none; }

.note-form { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.note-input { width: 220px; padding: .35rem .5rem; border: 1px solid #ddd; border-radius: 8px; }

/* Status-Buttons im Work Schedule */
.main-btn.setbtn {
  background: #8a8a8a !important; /* grau */
  color: #fff !important;
}
.main-btn.btn-work {
  background: #22c55e !important; /* grün */
  color: #fff !important;
}
.main-btn.btn-free {
  background: #ef4444 !important; /* rot */
  color: #fff !important;
}
.main-btn.btn-holidays {
  background: #3b82f6 !important; /* blau */
  color: #fff !important;
}

/* Admin-spezifische Inputs (Schedule) */
.rooms-input { width: 100%; padding: .4rem .5rem; border: 1px solid #ddd; border-radius: 8px; }
select.status { padding: .35rem .5rem; border: 1px solid #ddd; border-radius: 8px; }

/* =============================
   Accordion (legacy pages support)
   ============================= */
.accordion { max-width: 700px; margin: 1rem auto; text-align: left; }
.accordion-item { border: 1px solid #ccc; margin-bottom: 0.5rem; border-radius: 8px; background: var(--surface); overflow: hidden; }
.accordion-header { padding: 1rem; cursor: pointer; background: #eee; font-weight: 700; }
.accordion-content { display: none; padding: 1rem; }

/* =============================
   Responsive
   ============================= */
@media (max-width: 720px) {
  header { flex-direction: column; align-items: flex-start; }
  nav { display: flex; flex-wrap: wrap; gap: 0.4rem 0.8rem; }
  nav a { margin: 0; padding: 0.4rem 0.1rem; }
  .buttons .main-btn { width: 100%; max-width: 420px; }
}

