/* ---------- Layout ---------- */
.employee-grid,
.store-grid,
.active-grid,
.break-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: Arial, sans-serif;
  background: #f4f4f4;
}

.store-btn.store-jindabyne.selected {
  background: #00695c;
}

.debug-on {
  background: #d32f2f !important;
  color: white !important;
}

.debug-off {
  background: #2e7d32 !important;
  color: white !important;
}

.debug-working {
  background: #ef6c00 !important;
  color: white !important;
  animation: debugPulse 1s infinite;
}

@keyframes debugPulse {
  0% {opacity:1;}
  50% {opacity:0.5;}
  100% {opacity:1;}
}

.debug-working {
  background: #d32f2f !important;
  color: white !important;
  border-color: #b71c1c !important;
  opacity: 1 !important;
}

/* ---------- Admin Dashboard ---------- */

.admin-btn {
  width: 100%;
  margin-bottom: 16px;
  padding: 22px;
  font-size: 24px;
  font-weight: 700;
  border-radius: 14px;
  color: white;
  border: none;
  text-align: center;
}

/* Employees */
.employees-btn {
  background: #1565c0;
}

/* Shift Records */
.shifts-btn {
  background: #00897b;
}

/* Weekly Reports */
.reports-btn {
  background: #6a1b9a;
}

/* Debug */
.debug-btn {
  background: #ef6c00;
}

/* Return Home */
.home-btn {
  background: #424242;
}

.admin-btn:hover {
  filter: brightness(1.08);
}

.admin-btn:active {
  transform: scale(0.98);
}

.debug-working:hover {
  background: #d32f2f !important;
}

#debugToggleBtn:disabled {
  cursor: wait;
}

/* Weekly Report */

.report-header {
  display: grid;
  grid-template-columns: 1fr 250px;
  gap: 20px;
  margin-bottom: 25px;
}

.report-card {
  background: white;
  border: 2px solid #ddd;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
}

.total-hours {
  background: #111;
  color: white;
}

.report-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
}

.report-value {
  font-size: 28px;
  font-weight: bold;
}

.report-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 25px;
}

.report-section {
  background: white;
  border: 2px solid #ddd;
  border-radius: 12px;
  padding: 15px;
}

.report-section h3 {
  margin-top: 0;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid #eee;
}

.debug-working {
  background: #d32f2f !important;
  color: white !important;
  animation: debugPulse 1s infinite;
}

@keyframes debugPulse {
  0%   { opacity: 1; }
  50%  { opacity: 0.5; }
  100% { opacity: 1; }
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th {
  background: #111;
  color: white;
  padding: 12px;
  border: 1px solid #444;
}

.admin-table td {
  padding: 10px;
  border: 1px solid #ddd;
}

.admin-table tr:nth-child(even) {
  background: #f7f7f7;
}

.detailed-table {
  font-size: 16px;
}

.admin-add-row {
  display: grid;
  grid-template-columns: 1fr 160px;
  gap: 12px;
  margin-bottom: 20px;
  align-items: center;
}

.shift-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 18px;
}

.shift-table th {
  background: #111;
  color: white;
  padding: 12px;
  text-align: left;
}

.shift-table td {
  border-bottom: 1px solid #ddd;
  padding: 8px;
  vertical-align: middle;
}

.shift-table input,
.shift-table textarea {
  margin: 0;
  font-size: 18px;
}

.shift-table textarea {
  height: 60px;
}

.employee-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 22px;
}

.employee-table th {
  background: #111;
  color: white;
  padding: 14px;
  text-align: left;
}

.employee-table td {
  border-bottom: 1px solid #ddd;
  padding: 10px;
}

.employee-table input {
  margin: 0;
  font-size: 22px;
}

.action-col {
  width: 90px;
  text-align: center;
}

.icon-btn {
  font-size: 22px;
  padding: 14px;
  margin: 0;
  border-radius: 10px;
  color: white;
}

.icon-btn.add {
  background: #2e7d32;
}

.icon-btn.edit {
  background: #1565c0;
}

.icon-btn.delete {
  background: #c62828;
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.header {
  display: flex;
  align-items: center;
  background: #111;
  color: white;
  padding: 16px 22px;
  gap: 22px;
  box-sizing: border-box;
}

.logo-container {
  width: 160px;
  flex: 0 0 160px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.logo-container img {
  width: 150px;
  max-height: 105px;
  object-fit: contain;
  display: block;
}

.header-content {
  flex: 1;
  min-width: 0;
}

.header-content h1 {
  margin: 0;
  font-size: 40px;
  line-height: 1.1;
}

#displayTime {
  font-size: 22px;
  margin-top: 8px;
  opacity: 0.9;
}

#appContent {
  flex: 1;
  padding: 24px;
  box-sizing: border-box;
}

.card {
  background: white;
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,.12);
}

h2 {
  margin-top: 0;
  font-size: 30px;
}

/* ---------- Base Buttons ---------- */
button {
  width: 100%;
  font-size: 32px;
  font-weight: bold;
  padding: 24px;
  margin: 12px 0;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.primary {
  background: #2e7d32;
  color: white;
}

.red {
  background: #c62828;
  color: white;
}

.secondary {
  background: #777;
  color: white;
}

/* ---------- Clock Out Store Sections ---------- */
.store-section {
  margin-bottom: 28px;
}

.store-heading {
  font-size: 28px;
  font-weight: bold;
  padding: 14px 18px;
  background: #111;
  color: white;
  border-radius: 10px;
  margin: 24px 0 14px;
  width: 100%;
  box-sizing: border-box;
}

.store-section .active-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.store-row {
  margin-bottom: 24px;
}

/* ---------- Selection Buttons ---------- */
.select-btn {
  background: #f5f5f5;
  color: #222;
  border: 2px solid #ccc;
  font-size: 24px;
  font-weight: bold;
  padding: 22px;
}

.select-btn:hover {
  background: #e8e8e8;
}

/* Employees */
.employee-btn.selected {
  background: #2e7d32;
  color: white;
  border-color: #1b5e20;
  transform: scale(1.03);
}

/* Stores */
.store-btn.selected {
  color: white;
  border-color: #000;
  transform: scale(1.03);
}

.store-btn.store-perisher.selected {
  background: #1565c0;
}

.store-btn.store-kebabz.selected {
  background: #e65100;
}

.store-btn.store-froyo.selected {
  background: #8e24aa;
}

/* Break Buttons */
.break-btn.selected {
  background: #1565c0;
  color: white;
  border-color: #0d47a1;
}

/* Active Clocked-In Staff */
.active-btn.selected {
  background: #2e7d32;
  color: white;
  border-color: #1b5e20;
  transform: scale(1.03);
}

/* Action Buttons */
.action-btn {
  width: 100%;
  padding: 28px;
  font-size: 34px;
  font-weight: bold;
  border-radius: 14px;
  border: none;
  margin-top: 20px;
  color: white;
}

.clockin-btn {
  background: #2e7d32;
}

.clockout-btn {
  background: #c62828;
}

/* ---------- Inputs ---------- */
select,
input,
textarea {
  width: 100%;
  font-size: 24px;
  padding: 14px;
  margin-top: 6px;
  margin-bottom: 20px;
  box-sizing: border-box;
  border-radius: 8px;
  border: 1px solid #bbb;
  background: white;
}

label {
  font-size: 24px;
  font-weight: bold;
}

textarea {
  height: 90px;
}

/* ---------- Utility ---------- */
.small {
  font-size: 18px;
  color: #555;
  margin-top: 12px;
  text-align: center;
}

.status {
  padding: 14px;
  background: #eef;
  border-radius: 8px;
  margin-bottom: 18px;
  font-size: 20px;
}

.loading {
  text-align: center;
  font-size: 24px;
}

.hidden {
  display: none !important;
}

/* ---------- Mobile ---------- */
@media (max-width: 700px) {
  .header {
    gap: 14px;
    padding: 14px;
  }

  .logo-container {
    width: 110px;
    flex-basis: 110px;
  }

  .logo-container img {
    width: 105px;
    max-height: 80px;
  }

  .header-content h1 {
    font-size: 28px;
  }

  #displayTime {
    font-size: 17px;
  }

  #appContent {
    padding: 16px;
  }

  button {
    font-size: 26px;
  }
}

/* ---------- Cleaner Clock Out Cards ---------- */
#activeButtons {
  display: block;
}

.active-btn {
  min-height: 110px;
  background: #f5f5f5;
  color: #222;
  border: 2px solid #ccc;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.active-btn strong {
  font-size: 26px;
  line-height: 1.15;
}

.active-btn .small {
  margin-top: 8px;
  font-size: 18px;
  color: #555;
}

.active-btn.selected .small {
  color: white;
}

@media (max-width: 700px) {
  .store-heading {
    font-size: 24px;
  }

  .store-section .active-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }

  .active-btn strong {
    font-size: 22px;
  }
}
