* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  background: #0b0f14;
  color: #f5f5f5;
}

.dashboard-wrap {
  display: flex;
  flex-direction: row;
  gap: 1.5vw;
  padding: 2vw;
  height: 100vh;
}

.hourly-panel {
  --hour-cols: 1fr 6vw 6vw;
  flex: 0 0 70%;
  display: flex;
  flex-direction: column;
  gap: 0.6vh;
  min-width: 0;
}

.hourly-header {
  display: grid;
  grid-template-columns: var(--hour-cols);
  padding: 0 1.2vw;
  color: #6f8298;
  font-size: 1.1vw;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hourly-header-col {
  text-align: right;
}

.hourly-rows {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.8vh;
  min-height: 0;
}

.daily-panel {
  flex: 1;
  background: #131a22;
  border-radius: 24px;
  padding: 2vw;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.date-label {
  font-size: 2.2vw;
  color: #6f8298;
  margin-bottom: 1vw;
  text-align: center;
}

.panel-label {
  font-size: 1.8vw;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #9fb3c8;
}

.panel-count {
  font-size: 9vw;
  font-weight: 700;
  line-height: 1.1;
}

.panel-target {
  font-size: 1.6vw;
  color: #9fb3c8;
  margin-bottom: 1vw;
}

.progress-bar {
  width: 100%;
  height: 1.4vw;
  background: #1f2b38;
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: #3ddc84;
  transition: width 0.5s ease;
}

.hour-row {
  flex: 1;
  background: #131a22;
  border-radius: 12px;
  padding: 0.6vh 1.2vw;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.4vh;
  transition: opacity 0.3s ease, background-color 0.3s ease;
  min-height: 0;
}

.hour-row-top {
  display: grid;
  grid-template-columns: var(--hour-cols);
  align-items: baseline;
}

.hour-label {
  font-size: 1.6vw;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #9fb3c8;
  font-weight: 600;
}

.hour-actual,
.hour-target-value {
  font-size: 2.1vw;
  font-weight: 700;
  text-align: right;
}

.hour-row.future {
  opacity: 0.4;
}

.hour-row.current {
  outline: 3px solid #3ddc84;
}

.hour-row.reached {
  opacity: 1;
  background: #1f6b45;
}

.hour-row.reached .hour-label,
.hour-row.reached .hour-target-value {
  color: #d4f5e2;
}

.progress-bar.small {
  height: 0.7vh;
}

.status-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  text-align: center;
  padding: 0.5em;
  font-size: 1.2vw;
}

.status-bar.stale {
  background: #7a1f1f;
  color: white;
}

/* Admin */
.admin-wrap {
  max-width: 800px;
  margin: 2em auto;
  padding: 0 1em;
  font-size: 16px;
}

.admin-wrap table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1em;
}

.admin-wrap th, .admin-wrap td {
  border-bottom: 1px solid #333;
  padding: 0.5em;
  text-align: left;
}

.admin-wrap form.inline {
  display: flex;
  gap: 0.5em;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 2em;
}

.admin-wrap input {
  padding: 0.4em;
}

.admin-wrap button {
  padding: 0.4em 1em;
  cursor: pointer;
}

.calendar-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 1em 0;
  font-size: 1.1em;
}

.calendar-nav a {
  color: #6fb3ff;
  text-decoration: none;
}

.calendar-month {
  font-weight: 600;
}

table.calendar {
  table-layout: fixed;
}

table.calendar th {
  text-align: center;
  border-bottom: 1px solid #333;
  padding: 0.3em;
}

table.calendar td {
  border: 1px solid #222;
  padding: 0;
  height: 4.5em;
  vertical-align: top;
}

table.calendar td.empty {
  background: #0e1319;
  border-color: #161c23;
}

table.calendar td.day-cell a {
  display: block;
  height: 100%;
  padding: 0.4em;
  color: inherit;
  text-decoration: none;
}

table.calendar td.day-cell a:hover {
  background: #1a2532;
}

table.calendar td.today {
  outline: 2px solid #3ddc84;
  outline-offset: -2px;
}

table.calendar td.has-override .day-number::after {
  content: " \25CF";
  color: #f5c542;
  font-size: 0.6em;
  vertical-align: super;
}

.day-number {
  font-weight: 600;
}

.day-summary {
  font-size: 0.85em;
  color: #9fb3c8;
  margin-top: 0.3em;
}

input.is-override {
  border-color: #f5c542;
  border-width: 2px;
}

button.secondary {
  background: transparent;
  border: 1px solid #7a1f1f;
  color: #ff8a8a;
}

.login-wrap {
  max-width: 320px;
  margin: 4em auto;
  text-align: center;
}

.error {
  color: #ff6b6b;
}
