/* Sandy Desert Theme Colors */
:root {
  --bg-color: #f4e1c1;
  --card-bg: #f9f4e6;
  --header-bg: #d2b48c;
  --header-text: #4d3c2e;
  --primary-bg: #b8860b;
  --primary-bg-hover: #a67c00;
  --table-header-bg: #e0d1b9;
  --fixed-bg: #e8dccf;
  --active-bg: #f4c542;
}

/* Global resets and fonts */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: var(--bg-color);
  color: #333;
  padding: 20px;
}
h3, h4 { margin-bottom: 10px; }
.header {
  background: var(--header-bg);
  color: var(--header-text);
  padding: 15px;
  border-radius: 5px;
  margin-bottom: 20px;
}
.status-bar {
  display: flex;
  justify-content: space-around;
  align-items: center;
  font-size: 1.1em;
  flex-wrap: wrap;
}
.status-item { flex: 1; text-align: center; margin: 5px 0; }
.status-item.clickable { cursor: pointer; text-decoration: underline; }
.current { font-weight: bold; color: var(--primary-bg); }
.round-counter { font-size: 1.2em; }
.container { max-width: 1200px; margin: 0 auto; }
.side-by-side { display: flex; gap: 20px; flex-wrap: wrap; }
.side-card { flex: 1 1 45%; min-width: 300px; }
.card {
  background: var(--card-bg);
  border-radius: 5px;
  padding: 15px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  margin-bottom: 20px;
}
form label { display: block; margin: 8px 0 4px; }
form input, form select, form textarea {
  padding: 8px;
  margin-bottom: 10px;
  border: 1px solid #ced4da;
  border-radius: 3px;
}
.inline-group { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.inline-group .field-group { flex: 1; }
.color-group { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.table-container { overflow-x: auto; }
table {
  border-collapse: collapse;
  background: var(--card-bg);
  margin-bottom: 10px;
  width: max-content;
}
table th, table td {
  padding: 6px;
  border: 1px solid #dee2e6;
  text-align: center;
  vertical-align: middle;
  font-size: 0.85em;
  white-space: nowrap;
}
table th { background: var(--table-header-bg); }
table tr.active { background: var(--active-bg); font-weight: bold; }
/* Override fixed column backgrounds for active rows */
tr.active .fixed-col-1,
tr.active .fixed-col-2,
tr.active .fixed-col-3,
tr.active .fixed-col-4,
tr.active .fixed-col-5,
tr.active .fixed-col-6,
tr.active .fixed-col-7,
tr.active .fixed-col-8 {
    background: var(--active-bg) !important;
}
.fixed-col-1 { position: sticky; left: 0; background: var(--fixed-bg); z-index: 10; width: 40px; }
.fixed-col-2 { position: sticky; left: 40px; background: var(--fixed-bg); z-index: 10; width: 100px; }
.fixed-col-3 { position: sticky; left: 140px; background: var(--fixed-bg); z-index: 10; width: 60px; }
.fixed-col-4 { position: sticky; left: 200px; background: var(--fixed-bg); z-index: 10; width: 50px; }
.fixed-col-5 { position: sticky; left: 250px; background: var(--fixed-bg); z-index: 10; width: 70px; }
.fixed-col-6 { position: sticky; left: 320px; background: var(--fixed-bg); z-index: 10; width: 70px; }
.fixed-col-7 { position: sticky; left: 390px; background: var(--fixed-bg); z-index: 10; width: 60px; }
.fixed-col-8 { position: sticky; left: 450px; background: var(--fixed-bg); z-index: 10; width: 100px; }
.round-cell { max-width: 300px; word-wrap: break-word; }
.urgent { color: red; font-weight: bold; }
.event-entry { display: flex; align-items: center; gap: 5px; margin-bottom: 2px; cursor: pointer; }
#global-log-container {
  max-height: 200px; overflow-y: auto; border: 1px solid #ced4da;
  padding: 5px; margin-bottom: 10px;
}
.log-entry { display: flex; align-items: center; gap: 5px; cursor: pointer; }
.import-export {
  display: flex; gap: 20px; flex-wrap: wrap; align-items: flex-start;
  margin-top: 20px;
}
.import-export textarea {
  width: 48%; height: 100px; padding: 8px;
  border: 1px solid #ced4da; border-radius: 3px;
  font-family: monospace;
}
.import-export button { height: 40px; align-self: center; }
.primary-button {
  font-size: 1.2em;
  padding: 15px 25px;
  background-color: var(--primary-bg);
  border: none;
  border-radius: 5px;
  color: white;
  cursor: pointer;
}
.primary-button:hover { background-color: var(--primary-bg-hover); }
.disabled-field { background-color: #e0e0e0; color: #888; }
@media (max-width: 600px) {
  .side-by-side { flex-direction: column; }
  table, th, td { font-size: 0.75em; }
  .inline-group select, .inline-group input { max-width: 100px; }
  .import-export textarea { width: 100%; }
}
