body {
  font-family: "Segoe UI", sans-serif;
  background: #f4f7fb;
  margin: 0;
}

h1 {
  text-align: center;
  color: #333;
  margin-bottom: 30px;
}

.card-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  text-align: start;
  padding: 20px;
}

.employee-card {
  background-color: #fff;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease;
}

.employee-card:hover {
  transform: translateY(-5px);
}

.employee-card h2 {
  font-size: 1.2rem;
  color: #333;
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-icon {
  font-size: 1.1rem;
}

.status-logged-in {
  color: #28a745;
}
.status-idle {
  color: #ffc107;
}
.status-logged-out {
  color: #dc3545;
}
.status-on-leave {
  color: #6c757d;
}

.employee-card p {
  margin: 8px 0;
  color: #555;
  vertical-align: middle;
}

.hours {
  display: inline-block;
  width:100%;
}

.hours strong {
  color:#555;
}
.done-badge {
  display: inline-block;
  background-color: #cdffd982;
  color: #218838;
  padding: 4px 12px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  margin-left: 10px;
}

.done-btn {
  margin-top: 10px;
  padding: 10px 15px;
  background-color: #28a745;
  color: #fff;
  border: none;
  border-radius: 5px;
  width: 100%;
  cursor: pointer;
  font-size: 0.95em;
}

.done-btn:hover {
  background-color: #218838;
}
.done-btn:disabled {
  background-color: #6c757d;
}


.hoursContainer {
  width: 90px;
  height: 30px;
  background-color: #cdffd982;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  display: inline-block;
  vertical-align: middle;
  margin-left: 10px;
}
.hoursText {
  position: absolute;
  width: 100%;
  text-align: center;
  line-height: 30px;
  color: #218838;
  font-weight: bold;
  pointer-events: none;
  z-index: 1;
  left: 0;
}

.progressContainer {
  width: 70%;
  height: 30px;
  background-color: rgb(52 152 219 / 20%);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  display: inline-block;
  vertical-align: middle;
  margin-left: 10px;
}
.progressText {
  position: absolute;
  width: 100%;
  text-align: center;
  line-height: 30px;
  color: #444;
  font-weight: bold;
  pointer-events: none;
  z-index: 1;
  left: 0;
}

.progressBar {
  height: 100%;
  width: 0%;
  background-color: #3498dbb8;
  transition: width 0.5s linear;
  position: relative;
}

.progressBar-disabled {
  height: 100%;
  width: 0%;
  background-color: #218838;
  transition: width 0.5s linear;
  position: relative;
}
@media (max-width: 500px) {
  .employee-card {
    padding: 15px;
  }

  .employee-card h2 {
    font-size: 1rem;
  }

  .done-btn {
    font-size: 0.9rem;
  }
}

@keyframes flashIn {
  from { background-color: #e0ffe6; opacity: 0; transform: scale(0.98); }
  to { background-color: white; opacity: 1; transform: scale(1); }
}

.highlighted {
  animation: flashIn 0.4s ease-out;
}

.card-glow {
  box-shadow: 0 0 12px #ff9800;
  transition: box-shadow 0.3s ease-in-out;
}

@keyframes pulse {
  0% { transform: scale(1); background-color: #ffecb3; }
  50% { transform: scale(1.08); background-color: #ffe082; }
  100% { transform: scale(1); background-color: #ffecb3; }
}

.break-button-animate {
  animation: pulse 0.5s ease-out;
}

.brk {
    background-color: #ff9800;
    color: white;
    border: none;
    padding: 8px 16px;
    font-weight: 600;
    font-size: 0.95em;
    border-radius: 5px;
    transition: all 0.2s ease-in-out;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.brk:hover {
  box-shadow: 0 0 8px rgba(255, 152, 0, 0.6);
  transform: scale(1.02);
}
.end-break-btn {
    background-color: #4caf50;
    color: white;
    border: none;
    padding: 8px 16px;
    font-weight: 600;
    font-size: 0.95em;
    border-radius: 5px;
    transition: all 0.2s ease-in-out;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.end-break-btn:hover {
  background-color: #43a047;
  transform: scale(1.02);
}

.status-on-break {
  color: #ff9800; /* warm orange */
}

.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 32px;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 32px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 24px;
  width: 24px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}
input:checked + .slider {
  background-color: #ff9800; /* coffee orange */
}
input:checked + .slider:before {
  transform: translateX(28px);
}

.break-label {
    vertical-align: middle;
}

.break-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid #ccc;
  border-top: 3px solid #ff9800;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-left: 8px;
  vertical-align: middle;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}