body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background: #f0f2f5;
  color: #222;
}
.container {
  max-width: 400px;
  margin: 20px auto;
  padding: 20px;
  text-align: center;
}
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between; 
  background: #222;
  color: white;
  padding: 6px 10px; 
  font-weight: bold;
  border-radius: 8px;
  box-sizing: border-box;
}
.top-bar button {
  background: #444;
  color: white;
  border: none;
  width: 32px;       
  height: 32px;       
  border-radius: 6px; 
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;         
  cursor: pointer;
}
.top-bar i {
  font-size: 0.9em;
  margin: 0;
}
.card {
  background: linear-gradient(90deg,#6a11cb,#2575fc);
  color: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
  margin-bottom: 20px;
  text-align: center;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}
.card h2 {
  margin-bottom: 8px;
  font-size: 1.8em;
  font-weight: 600;
}
.card .company {
  font-size: 1.2em;
  margin-bottom: 5px;
  font-weight: 500;
}
.card .hours {
  font-size: 1.1em;
  font-weight: bold;
  background: rgba(255,255,255,0.2);
  display: inline-block;
  padding: 6px 12px;
  border-radius: 12px;
}
input, button {
  width: 95%;
  padding: 10px;
  margin: 8px auto;
  border-radius: 8px;
  border: 1px solid #ccc;
  box-sizing: border-box;
  display: block;
}
button {
  background: #4caf50;
  color: white;
  border: none;
  cursor: pointer;
  font-weight: 500;
  transition: 0.2s;
}
button:hover {
  opacity: 0.9;
}
.buttons button {
  width: 100%;
  padding: 12px;
  margin: 8px 0;
  border-radius: 12px;
  font-size: 1em;
}
.buttons button:nth-child(1) { background: #4caf50; }
.buttons button:nth-child(2) { background: #ff6b6b; }
.form-label {
  display: block;
  text-align: left;
  font-weight: 600;
  margin-top: 10px;
  margin-bottom: 5px;
}
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
}
th, td {
  padding: 8px;
  border: 1px solid #ccc;
  text-align: center;
  font-size: 0.95em;
}
.popup-overlay {
  position: fixed;
  top:0; left:0;
  width:100%; height:100%;
  background: rgba(0,0,0,0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
}
.popup {
  background: white;
  color: #222;
  padding: 20px;
  border-radius: 12px;
  width: 90%;
  max-width: 350px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}
.popup input, .popup button {
  width: 90%;
  padding: 10px;
  margin: 6px auto;
  border-radius: 8px;
  border: 1px solid #ccc;
}
.popup label {
  display: block;
  text-align: left;
  margin-top: 10px;
  font-weight: 600;
  font-size: 0.95em;
}
.dark-mode {
  background: #121212;
  color: white;
}
.dark-mode .card {
  background: #1f1f1f;
  box-shadow: 0 8px 20px rgba(0,0,0,0.5);
}
.dark-mode input, .dark-mode button {
  background: #333;
  color: white;
  border: 1px solid #555;
}
.dark-mode table th, .dark-mode table td {
  border: 1px solid #555;
}
.log-form input, .log-form button {
  width: 95%;
  padding: 10px;
  margin: 5px auto;
  border-radius: 8px;
  box-sizing: border-box;
}
.log-form label {
  display: block;
  text-align: left;
  margin-left: 5px;
  font-weight: 500;
  font-size: 0.95em;
}
button.danger {
  background: #e53935;
}
.popup select {
  width: 90%;
  padding: 10px;
  margin: 6px auto;
  border-radius: 8px;
  border: 1px solid #ccc;
  display: block;
  box-sizing: border-box;
  background: white;
  color: #222;
  font-size: 1em;
}

select, input[type="number"] {
  width: 100%;
  padding: 8px;
  margin-top: 5px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 14px;
  background: white;
  outline: none;
}

select:focus, input[type="number"]:focus {
  border-color: #2575fc;
}

.log-form select,
.log-form input[type="number"] {
  width: 95%;
  padding: 10px;
  margin: 8px auto;
  border-radius: 8px;
  border: 1px solid #ccc;
  display: block;
  box-sizing: border-box;
  font-size: 14px;
}

.absent-row {
  background: #ffebee;
  color: #c62828;
}

.halfday-row {
  background: #fff8e1;
  color: #8d6e00;
}

table {
  border-collapse: collapse;
}

td, th {
  border: 1px solid #ddd;
  padding: 8px;
}

.dtr-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.dtr-modal {
  background: #fff;
  width: 320px;
  padding: 25px;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  animation: pop 0.2s ease;
}

.dtr-modal h2 {
  margin-bottom: 15px;
  font-size: 18px;
  text-align: center;
}

.dtr-modal label {
  font-size: 13px;
  margin-top: 10px;
  display: block;
  color: #444;
}

.dtr-modal select,
.dtr-modal input {
  width: 100%;
  padding: 10px;
  margin-top: 5px;
  border-radius: 8px;
  border: 1px solid #ddd;
  outline: none;
}

.dtr-modal button {
  width: 100%;
  padding: 10px;
  margin-top: 10px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

#generateDtrBtn {
  background: #2575fc;
  color: white;
}

#closeDtrPopup {
  background: #e53935;
  color: white;
}

@keyframes pop {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}