:root {
  /* Brand Colors */
  --primary: #4F46E5; /* Indigo 600 */
  --primary-hover: #4338CA; /* Indigo 700 */
  --secondary: #64748B; /* Slate 500 */
  --accent: #0EA5E9; /* Sky 500 */
  --success: #10B981; /* Emerald 500 */
  --warning: #F59E0B; /* Amber 500 */
  --danger: #EF4444; /* Red 500 */

  /* Backgrounds */
  --bg-body: #F1F5F9; /* Slate 100 */
  --bg-card: #FFFFFF;
  --bg-sidebar: #0f172a; /* Slate 900 - Darker for contrast */
  --bg-input: #F8FAFC;

  /* Text */
  --text-main: #0F172A; /* Slate 900 */
  --text-muted: #64748B;
  --text-light: #F8FAFC;

  /* Spacing & Borders */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
  --border-light: #E2E8F0;
}

/* Reset & Base */
* { box-sizing: border-box; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-body);
  color: var(--text-main);
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { text-decoration: none; color: inherit; }

/* Layout Structure */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar Navigation */
.sidebar {
  width: 260px;
  background-color: var(--bg-sidebar);
  color: var(--text-light);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.sidebar-header {
  padding: 24px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  margin-bottom: 12px;
}

.brand {
  font-size: 1.25rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-nav {
  padding: 16px;
  flex-grow: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  color: #CBD5E1;
  margin-bottom: 4px;
  transition: all 0.2s;
  font-size: 0.9rem;
}

.nav-item:hover, .nav-item.active {
  background-color: rgba(255,255,255,0.1);
  color: white;
}

.nav-item.active {
  border-left: 3px solid var(--accent);
}

/* Main Content Area */
.main-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.top-bar {
  background: var(--bg-card);
  height: 64px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
}

.network-status {
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--success);
  font-weight: 500;
}
.network-status.offline { color: var(--text-muted); }

.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}
.avatar {
  width: 36px;
  height: 36px;
  background: var(--primary);
  border-radius: 50%;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

/* Page Content */
.page-container {
  padding: 32px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.page-header {
  margin-bottom: 24px;
}

.page-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
}

/* Components */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  margin-bottom: 24px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* Clock Components */
.clock-display {
  text-align: center;
  padding: 40px 0;
}

.time-large {
  font-size: 4rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: var(--text-main);
  margin-bottom: 8px;
}

.date-medium {
  font-size: 1.25rem;
  color: var(--text-muted);
  font-weight: 500;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 24px;
}
.status-badge.out { background: #F1F5F9; color: var(--text-muted); border: 1px solid #E2E8F0; }
.status-badge.in { background: #ECFDF5; color: var(--success); border: 1px solid #A7F3D0; }
.status-badge.break { background: #FFF7ED; color: var(--warning); border: 1px solid #FDE68A; }

/* Action Buttons */
.action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.punch-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px 16px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  background: white;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  color: var(--text-main);
  font-weight: 600;
}

.punch-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.punch-btn.primary {
  background: linear-gradient(135deg, var(--primary) 0%, #4338CA 100%);
  color: white;
  border: none;
}
.punch-btn.primary:hover {
  box-shadow: 0 10px 25px -5px rgba(79, 70, 229, 0.4);
}

.punch-btn.secondary {
  background: white;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.punch-btn-icon {
  width: 32px;
  height: 32px;
  background: rgba(255,255,255,0.2);
  border-radius: 8px;
  display: block;
}

/* Forms */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text-main);
}

.form-input, .form-select {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  transition: border-color 0.2s;
  background: var(--bg-input);
}

.form-input:focus, .form-select:focus {
  outline: none;
  border-color: var(--primary);
  background: white;
}

.form-input[readonly] {
  background: #F1F5F9;
  color: var(--text-muted);
}

/* Timeline/History */
.timeline {
  position: relative;
  padding-left: 32px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border-light);
}
.timeline-item {
  position: relative;
  margin-bottom: 24px;
}
.timeline-dot {
  position: absolute;
  left: -32px;
  top: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 3px solid white;
  background: var(--primary);
  box-shadow: 0 0 0 1px var(--border-light);
}
.timeline-time {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
}
.timeline-title {
  font-weight: 600;
  color: var(--text-main);
}
.timeline-detail {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Alerts */
.alert {
  padding: 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border-left-width: 4px;
  border-left-style: solid;
}
.alert-warning {
  background: #FFF7ED;
  border: 1px solid #FFEDD5;
  color: #9A3412;
}
.alert-danger {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: #991B1B;
}

/* Kiosk Specific */
.kiosk-body {
  background: #F8FAFC;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}
.kiosk-container {
  width: 100%;
  max-width: 600px;
  padding: 24px;
}
.keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 24px;
}
.keypad-btn {
  background: white;
  border: 1px solid var(--border-light);
  font-size: 1.5rem;
  font-weight: 600;
  padding: 24px 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.keypad-btn:hover { background: #F1F5F9; }

/* Utilities */
.text-center { text-align: center; }
.mt-4 { margin-top: 16px; }
.mt-8 { margin-top: 32px; }
.d-flex { display: flex; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.text-sm { font-size: 0.875rem; }
.text-muted { color: var(--text-muted); }
.font-bold { font-weight: 700; }
.placeholder-icon {
  width: 24px; height: 24px; background: #CBD5E1; border-radius: 4px; display: inline-block;
}
.w-full { width: 100%; }
.btn {
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  border: none;
  display: inline-block;
  text-align: center;
  transition: all 0.2s;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-outline { background: transparent; border: 1px solid var(--border-light); color: var(--text-main); }
.btn-outline:hover { background: #F8FAFC; border-color: #CBD5E1; }
.btn-danger { background: var(--danger); color: white; }

/* Modal Simulation */
.modal-wrapper {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
}
.modal-card {
  background: white;
  width: 100%;
  max-width: 500px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: modalSlide 0.3s ease-out;
}
@keyframes modalSlide {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
