/* Reset */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: Arial, sans-serif;
  background: #f9f9f9;
  color: #222;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background 0.3s, color 0.3s;
  overflow-x: hidden;
}

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #0077cc;
  color: #fff;
  padding: 15px;
}
header h1 { font-size: 20px; }
header button {
  background: none;
  border: none;
  color: white;
  font-size: 22px;
  cursor: pointer;
}

/* Sidebar */
.sidebar {
  position: fixed;
  left: -260px;
  top: 0;
  width: 225px;
  height: 100%;
  background: #0077cc;
  color: white;
  transition: left 0.3s ease;
  padding-top: 60px;
  z-index: 1000;
  box-shadow: 2px 0 8px rgba(0,0,0,0.3);
}
.sidebar.active { left: 0; }
.sidebar nav ul { list-style: none; }
.sidebar nav ul li { margin: 15px 0; }
.sidebar nav ul li a {
  color: white; text-decoration: none; font-size: 18px;
  display: block; padding: 10px; border-radius: 4px;
  transition: background 0.2s;
}
.sidebar nav ul li a:hover,
.sidebar nav ul li a.active { background: rgba(255,255,255,0.3); }
.close-btn {
  position: absolute; top: 10px; right: 15px; font-size: 22px;
  background: none; border: none; color: white; cursor: pointer;
}

/* Table */
.table-wrapper { overflow-x: auto; }
table {
  border-collapse: collapse;
  width: 85%;
  margin-top: 10px;
  text-align: center;
  min-width: 95%;
    margin: 0 auto;
}
th, td {
  border: 1px solid #ccc;
  padding: 10px;
  font-size: 16px;
  text-align: center;
}
th { 
    background: #e0e0e0; 
}

/* Inputs */
td input[type="text"] {
  width: 90%;
  padding: 6px;
  font-size: 14px;
  text-align: center;
}

/* Column widths */
table th:nth-child(1), table td:nth-child(1) { /* START */
    width: 20%; 
}

table th:nth-child(2), table td:nth-child(2) { /* END */
    width: 20%;
}

table th:nth-child(3), table td:nth-child(3) { /* JOB */
    width: 40%;
}

table th:nth-child(4), table td:nth-child(4) { /* HOURS */
    width: 10%;
}

table th:nth-child(5), table td:nth-child(5) { 
    width: 0; 
}

/* Controls */
.controls { margin: 15px 0; }
#resetBtn {
  padding: 8px 14px;
  background: #ff9800;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.2s, transform 0.15s;
}
#resetBtn:hover { background: #e68900; transform: translateY(-2px); }

/* Dark mode */
body.dark { background: #1e1e1e; color: #f0f0f0; }
body.dark header { background: #333; }
body.dark .sidebar { background: #222; }
body.dark table { background: #1e1e1e; }
body.dark th { background: #333; color: #fff; }
body.dark th, body.dark td { border: 1px solid #555; }
body.dark tr:nth-child(even) { background: #2a2a2a; }
body.dark tr:nth-child(odd) { background: #1e1e1e; }
body.dark td input[type="text"] {
  background: #333; color: #fff; border: 1px solid #555;
}
body.dark #resetBtn { background: #cc7a00; }
body.dark #resetBtn:hover { background: #e69500; }

.day-section {
  margin-bottom: 30px;
}

.day-header {
  background: #0077cc;
  color: #fff;
  padding: 6px;
  font-size: 16px;
  border-radius: 4px 4px 0 0;
  text-align: left;
    width: 95%;
    margin: 0 auto;
}
body.dark .day-header { background: #333; }

/* Button group under each day */
.button-group {
  margin-top: 8px;
  text-align: center;
}

.addRowBtn,
.deleteRowBtn {
  display: inline-block;
  padding: 6px 12px;
  margin: 0 5px;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  color: white;
}

.addRowBtn { background: #0077cc; }
.addRowBtn:hover { background: #005fa3; transform: translateY(-2px); }

.deleteRowBtn { background: #dc3545; }
.deleteRowBtn:hover { background: #a71d2a; transform: translateY(-2px); }

body.dark .addRowBtn { background: #444; }
body.dark .addRowBtn:hover { background: #666; }
body.dark .deleteRowBtn { background: #660000; }
body.dark .deleteRowBtn:hover { background: #990000; }

/* Daily totals */
.dailyTotalBox {
  margin-top: 6px;
  font-size: 17px;
  padding-top: 20px;
  text-align: center;
  font-weight: bold;
}
body.dark .dailyTotalBox { color: #ccc; }


/* Weekly total box */
#weeklyTotalBox {
  margin-top: 20px;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #f0f0f0;
  font-size: 18px;
  text-align: center;
}
body.dark #weeklyTotalBox {
  background: #2a2a2a;
  border: 1px solid #555;
  color: #fff;
}
