@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;700&display=swap');

:root {
  --bg-primary: #F8FAFC;
  --bg-secondary: #FFFFFF;
  --bg-card: rgba(255, 255, 255, 0.85);
  --border-color: #E2E8F0;
  --border-hover: #4F46E5;
  
  --text-primary: #0F172A; /* High contrast slate for maximum legibility */
  --text-secondary: #334155;
  --text-muted: #64748B;
  
  --accent-primary: #4F46E5;
  --accent-primary-glow: rgba(79, 70, 229, 0.08);
  --accent-success: #059669;
  --accent-success-glow: rgba(5, 150, 105, 0.08);
  --accent-danger: #D90429;
  --accent-danger-glow: rgba(217, 4, 41, 0.08);
  --accent-warning: #D97706;
  --accent-warning-glow: rgba(217, 119, 6, 0.08);
  
  --font-main: 'Plus Jakarta Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 16px 32px rgba(15, 23, 42, 0.06);
  --shadow-glow: 0 0 25px rgba(79, 70, 229, 0.05);
}

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  line-height: 1.5;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.03) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(16, 185, 129, 0.02) 0%, transparent 40%);
  background-attachment: fixed;
}

header {
  padding: 1.25rem 2rem;
  border-bottom: 1px solid var(--border-color);
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.02);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 0.02em;
}

.logo-sub {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-secondary);
  border-left: 2px solid var(--border-color);
  padding-left: 0.6rem;
  margin-left: 0.2rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.logo-icon {
  width: 2.25rem;
  height: 2.25rem;
  background: linear-gradient(135deg, var(--accent-primary) 0%, #818cf8 100%);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.2);
}

.logo-icon svg {
  width: 1.35rem;
  height: 1.35rem;
  fill: white;
}

.current-status-badge {
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  font-size: 0.875rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.status-dot {
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 50%;
  background-color: var(--text-muted);
}

.status-dot.active-work {
  background-color: var(--accent-success);
  box-shadow: 0 0 10px var(--accent-success);
  animation: pulse 2s infinite;
}

.status-dot.active-out {
  background-color: var(--text-muted);
}

.status-dot.active-done {
  background-color: var(--accent-primary);
  box-shadow: 0 0 10px var(--accent-primary);
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.5; }
  50% { transform: scale(1.05); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.5; }
}

main {
  max-width: 1200px;
  width: 100%;
  margin: 2rem auto;
  padding: 0 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Top Control Panel Layout */
.top-control-panel {
  padding: 1.75rem 2rem;
}

.top-panel-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: center;
}

@media (min-width: 768px) {
  .top-panel-grid {
    grid-template-columns: 1fr 1.2fr;
    gap: 1.75rem;
  }
  .stamp-section {
    grid-column: span 2;
  }
}

@media (min-width: 1024px) {
  .top-panel-grid {
    grid-template-columns: 280px 1.2fr 1.5fr;
    gap: 2.25rem;
  }
  .stamp-section {
    grid-column: auto;
  }
}

.clock-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0;
}

/* Keep clock-section centered always */

.employee-select-section {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  width: 100%;
}

.employee-select-row {
  display: flex;
  gap: 0.75rem;
  width: 100%;
}

.employee-no-col {
  width: 95px; /* Slightly wider for clear focus border */
  flex-shrink: 0;
}

.employee-name-col {
  flex-grow: 1;
  min-width: 0;
}

.large-select-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding-left: 0.2rem;
}

.large-select {
  font-size: 1.6rem !important; /* Make font size large and tap-friendly */
  font-weight: 700;
  padding: 0.75rem 1.25rem;
  height: 58px;
  background-color: var(--bg-secondary);
  border: 2px solid #94a3b8;
  color: var(--text-primary);
  border-radius: 0.75rem;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23475569' stroke-width='2.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19.5 8.25l-7.5 7.5-7.5-7.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1.25rem center;
  background-size: 1.25rem;
  padding-right: 3.25rem;
  transition: all 0.2s ease;
  width: 100%;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.large-select:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

.large-select option {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 1.2rem;
  padding: 10px;
}

/* Bottom Layout */
.bottom-layout {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-areas: 
    "dashboard"
    "sidebar"
    "history";
  gap: 2rem;
}

.content-area {
  grid-area: dashboard;
}

.sidebar {
  grid-area: sidebar;
}

.history-area {
  grid-area: history;
}


/* Glassmorphism Card Style */
.card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.02);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.card:hover {
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08), 0 0 20px rgba(99, 102, 241, 0.05);
  transform: translateY(-2px);
}

.card-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-primary);
}

.card-title svg {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--accent-primary);
}

/* Left Sidebar Layout */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Clock Display */
.clock-container {
  text-align: center;
  padding: 1.5rem 0;
}

.digital-clock {
  font-family: var(--font-mono);
  font-size: 3.5rem;
  font-weight: 800;
  letter-spacing: -0.05em;
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 40%, #4f46e5 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 12px rgba(79, 70, 229, 0.1));
  line-height: 1;
}

.digital-date {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-top: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.05em;
}

/* Clock Controls (Stamp Buttons) */
.stamp-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.btn {
  font-family: var(--font-main);
  font-size: 1.1rem;
  font-weight: 700;
  padding: 0 1.5rem;
  height: 52px;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn svg {
  width: 1.35rem;
  height: 1.35rem;
}

.btn-in {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.btn-in:hover:not(:disabled) {
  background: linear-gradient(135deg, #34D399 0%, #059669 100%);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35), 0 0 15px rgba(16, 185, 129, 0.15);
  transform: translateY(-2px);
}

.btn-in:active:not(:disabled) {
  transform: translateY(0);
}

.btn-out {
  background: linear-gradient(135deg, #F43F5E 0%, #E11D48 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(244, 63, 94, 0.2);
}

.btn-out:hover:not(:disabled) {
  background: linear-gradient(135deg, #FB7185 0%, #E11D48 100%);
  box-shadow: 0 6px 20px rgba(244, 63, 94, 0.35), 0 0 15px rgba(244, 63, 94, 0.15);
  transform: translateY(-2px);
}

.btn-out:active:not(:disabled) {
  transform: translateY(0);
}

.btn:disabled {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.04) !important;
  color: rgba(255, 255, 255, 0.15) !important;
  box-shadow: none !important;
  cursor: not-allowed;
  transform: none !important;
}

/* Time Machine Simulator */
.sim-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sim-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 2.75rem;
  height: 1.5rem;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  transition: .3s;
  border-radius: 9999px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 1rem;
  width: 1rem;
  left: 0.15rem;
  bottom: 0.15rem;
  background-color: var(--text-secondary);
  transition: .3s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--accent-primary);
  border-color: var(--accent-primary);
}

input:checked + .slider:before {
  transform: translateX(1.25rem);
  background-color: white;
}

.sim-controls {
  display: none;
  flex-direction: column;
  gap: 0.75rem;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--border-color);
}

.sim-controls.active {
  display: flex;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-group label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.input-time-control {
  display: flex;
  gap: 0.5rem;
}


.form-input {
  background-color: #FFFFFF;
  border: 1.5px solid #CBD5E1;
  color: var(--text-primary);
  padding: 0.6rem 0.85rem;
  border-radius: 0.5rem;
  font-family: var(--font-main);
  font-size: 0.95rem;
  width: 100%;
  outline: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.form-input:focus {
  border-color: var(--accent-primary);
  background-color: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15), 0 0 10px rgba(79, 70, 229, 0.05);
}

.btn-small {
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  background-color: var(--accent-primary);
  color: white;
  border: none;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.2s;
  font-size: 0.85rem;
}

.btn-small:hover {
  opacity: 0.9;
}

/* Info Cards / Stats */
.rules-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.rule-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.875rem;
}

.rule-badge {
  padding: 0.2rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(79, 70, 229, 0.08);
  color: #4f46e5;
  border: 1px solid rgba(79, 70, 229, 0.35);
  white-space: nowrap;
}

.rule-badge.success {
  background: rgba(5, 150, 105, 0.08);
  color: #047857;
  border-color: rgba(5, 150, 105, 0.35);
}

.rule-badge.danger {
  background: rgba(217, 4, 41, 0.06);
  color: #be123c;
  border-color: rgba(217, 4, 41, 0.3);
}

.rule-desc {
  color: var(--text-secondary);
}

.table-wrapper {
  overflow-x: auto;
  border-radius: 0.75rem;
  border: 1px solid var(--border-color);
  background-color: #FFFFFF;
  box-shadow: var(--shadow-sm);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

th, td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
}

th {
  background-color: #F1F5F9;
  font-weight: 700;
  color: var(--text-primary);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1.5px solid #CBD5E1;
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background-color: #F8FAFC;
}

/* Right Content Area */
.content-area {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.stat-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(99, 102, 241, 0.1);
  color: var(--accent-primary);
}

.stat-icon.success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--accent-success);
}

.stat-icon.warning {
  background: rgba(245, 158, 11, 0.1);
  color: var(--accent-warning);
}

.stat-details {
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* Table Area */
.table-header-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.actions-group {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap; /* Wraps onto next row on narrow screen sizes */
}

#adminActions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.btn-secondary {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  color: var(--text-primary);
  font-family: var(--font-main);
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  transition: all 0.2s;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  white-space: nowrap; /* Prevents text from splitting vertically */
  flex-shrink: 0;      /* Prevents button width from squishing */
}

.btn-secondary:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.btn-secondary svg {
  width: 1rem;
  height: 1rem;
}

.btn-danger-outline {
  background: #fff5f5;
  border: 2px solid #fecaca;
  color: #dc2626;
}

.btn-danger-outline:hover {
  background: #fee2e2;
  border-color: #f87171;
}



.time-stamp-display {
  display: flex;
  flex-direction: column;
}

.actual-time {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.adjusted-time {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-primary);
  font-size: 1rem;
}

.work-duration {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-primary);
  font-size: 1rem;
}

.break-duration-col {
  color: #b45309; /* High contrast amber on white */
  font-weight: 700;
}

.empty-state {
  padding: 3rem 1.5rem;
  text-align: center;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.empty-state svg {
  width: 3rem;
  height: 3rem;
  stroke: var(--text-muted);
  stroke-width: 1.5;
}

/* Modal Form for custom input (for adjustments/additions if needed) */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(8px);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: #ffffff;
  border: 2px solid #94a3b8;
  border-radius: 1.25rem;
  width: 100%;
  max-width: 450px;
  padding: 2rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  position: relative;
  animation: modalSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  color: var(--text-primary);
}

@keyframes modalSlideIn {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.modal-title {
  font-size: 1.35rem;
  font-weight: 700;
}

.close-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.25rem;
}

.close-btn:hover {
  color: var(--text-primary);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 2rem;
}

/* Footer styling */
footer {
  padding: 2rem;
  border-top: 1px solid var(--border-color);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 3rem;
  background-color: #f1f5f9;
}

/* Toast Notification styling */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 10000;
}

.toast {
  background: #ffffff;
  border: 2px solid #cbd5e1;
  border-left: 4px solid var(--accent-primary);
  border-radius: 0.5rem;
  padding: 0.75rem 1.25rem;
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transform: translateX(120%);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.show {
  transform: translateX(0);
}

.toast.success {
  border-left-color: var(--accent-success);
}

.toast.danger {
  border-left-color: var(--accent-danger);
}

/* Leave Control Panel styling */
.leave-control-panel {
  border-color: #94a3b8 !important;
}

.leave-panel-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 1024px) {
  .leave-panel-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }
}

.leave-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}

.leave-inputs-row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
}

@media (min-width: 640px) {
  .leave-inputs-row {
    flex-direction: row;
  }
}

.large-input-date {
  font-size: 1.2rem !important;
  font-weight: 600;
  padding: 0.75rem 1rem;
  height: 58px;
  background-color: var(--bg-secondary);
  border: 2px solid #94a3b8;
  color: var(--text-primary);
  border-radius: 0.75rem;
  cursor: pointer;
  font-family: var(--font-mono);
  outline: none;
  transition: all 0.2s ease;
  width: 100%;
}

.large-input-date:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

.large-input-date::-webkit-calendar-picker-indicator {
  opacity: 0.75;
  cursor: pointer;
}

.leave-select {
  font-size: 1.25rem !important;
  height: 58px !important;
  border: 2px solid #94a3b8 !important;
}

.leave-register-btn {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.1) 0%, rgba(79, 70, 229, 0.05) 100%) !important;
  border: 2px solid rgba(79, 70, 229, 0.4) !important;
  color: #4f46e5 !important;
  white-space: nowrap;
  min-width: 100px;
  height: 58px !important;
  font-weight: 700;
}

.leave-register-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.18) 0%, rgba(79, 70, 229, 0.08) 100%) !important;
  border-color: var(--accent-primary) !important;
  box-shadow: 0 0 15px var(--accent-primary-glow) !important;
  transform: translateY(-2px);
}

/* Hide number input spinners for numeric inputs */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"] {
  -moz-appearance: textfield;
}

/* Late and Early warning badges */
.late-badge {
  background-color: #fef3c7;
  color: #d97706;
  border: 1px solid #f59e0b;
  font-size: 0.75rem;
  padding: 0.15rem 0.4rem;
  border-radius: 0.25rem;
  font-weight: 700;
  margin-left: 0.5rem;
  display: inline-block;
}

.early-badge {
  background-color: #fee2e2;
  color: #dc2626;
  border: 1px solid #ef4444;
  font-size: 0.75rem;
  padding: 0.15rem 0.4rem;
  border-radius: 0.25rem;
  font-weight: 700;
  margin-left: 0.5rem;
  display: inline-block;
}

/* Blink warn animation for forgot clock out */
@keyframes blink-warn {
  0% { background-color: #d97706; box-shadow: 0 0 10px #d97706; }
  50% { background-color: #ef4444; box-shadow: 0 0 15px #ef4444; }
  100% { background-color: #d97706; box-shadow: 0 0 10px #d97706; }
}

.status-dot.active-warn {
  animation: blink-warn 1s infinite;
}

/* Modal sizing & error styles */
.modal-content.modal-lg {
  max-width: 800px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

.error-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
  max-height: 400px;
  overflow-y: auto;
}

.error-item {
  border: 2px solid #fca5a5;
  background-color: #fff5f5;
  border-radius: 0.75rem;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.error-item.warning {
  border-color: #fca5a5;
  background-color: #fff5f5;
}

.error-details {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.error-msg {
  font-weight: 700;
  color: #b91c1c;
}

.error-item.warning .error-msg {
  color: #b91c1c;
}

.error-meta {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.error-actions {
  display: flex;
  gap: 0.5rem;
}

/* 新しい上部操作パネルレイアウト用スタイル */
.top-panels-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem; /* モバイル用：少し狭め */
  margin-bottom: 1.25rem;
}

@media (min-width: 768px) {
  .top-panels-container {
    grid-template-columns: 1fr 1.8fr; /* 左: 時計 ＆ 社員選択, 右: 打刻・申請タブコンソール */
    gap: 1.5rem;
    margin-bottom: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .top-panels-container {
    grid-template-columns: 1fr 1.8fr; /* PC大画面でも文字改行崩れを防ぐため、2列（ゆったり幅）を維持 */
    gap: 1.5rem;
    margin-bottom: 1.5rem;
  }
}

.employee-clock-grid {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  align-items: stretch;
  width: 100%;
}

/* --- Admin Folder UI Styles --- */
.folder-tab-btn {
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  border: none;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 0.35rem;
  transition: all 0.2s;
  font-family: var(--font-main);
  outline: none;
}

.folder-tab-btn:hover {
  background-color: rgba(15, 23, 42, 0.05);
  color: var(--text-secondary);
}

.folder-tab-btn.active {
  color: var(--accent-primary);
  background: rgba(79, 70, 229, 0.08);
}

.folder-pane {
  display: none;
  animation: fadeIn 0.2s ease-in-out;
}

.folder-pane.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(2px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Accordion details/summary adjustments */
details summary::-webkit-details-marker {
  display: none;
}
details summary {
  list-style: none;
}
details[open] summary svg {
  transform: rotate(180deg);
}

/* Responsive adjustment for 1-screen iPad layout */
@media (min-width: 768px) {
  .bottom-layout {
    grid-template-columns: 1fr 1.1fr;
    grid-template-areas: 
      "dashboard sidebar"
      "history   sidebar";
  }
}
@media (min-width: 1024px) {
  .bottom-layout {
    grid-template-columns: 1.2fr 1fr;
    grid-template-areas: 
      "dashboard sidebar"
      "history   sidebar";
  }
}

/* --- Console Tab Navigation Styles --- */
.console-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 0.75rem;
  flex-wrap: wrap; /* Wraps on narrow screen sizes */
}

.console-tab-btn {
  font-family: var(--font-main);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-secondary);
  background: none;
  border: none;
  padding: 0.5rem 1rem;
  cursor: pointer;
  border-radius: 0.35rem;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.console-tab-btn:hover {
  background-color: rgba(79, 70, 229, 0.05);
  color: var(--accent-primary);
}

.console-tab-btn.active {
  background-color: var(--accent-primary-glow);
  color: var(--accent-primary);
  box-shadow: inset 0 0 0 1px rgba(79, 70, 229, 0.15);
}

/* Tab Contents visibility control */
.console-tab-pane {
  display: none;
  animation: fadeIn 0.3s ease;
}

.console-tab-pane.active {
  display: block;
}

/* Prevention of text wrapping bug inside buttons */
.btn span {
  white-space: nowrap;
  flex-shrink: 0;
}
.btn {
  white-space: nowrap;
}

