:root {
  --accent: #ff6b00;
  --primary: #161C2E;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --muted: #6b7280;
  --card: #ffffff;
  --bg: linear-gradient(135deg, #0080c0 0%, #161C2E 100%);
  --radius: 12px;
}

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

html, body {
  height: 100%;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: var(--bg);
  color: #0f172a;
}

.wrap {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.card {
  width: 100%;
  max-width: 1100px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

header {
  padding: 20px 25px;
  background: linear-gradient(90deg, var(--accent), #ffb366);
  color: #fff;
}

header h1 {
  margin: 0;
  font-size: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
}

header .subtitle {
  font-size: 14px;
  opacity: 0.9;
  margin-top: 5px;
}

main {
  padding: 20px 25px;
}

.search-section {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

input[type="text"] {
  flex: 1;
  min-width: 250px;
  padding: 12px 15px;
  border-radius: 8px;
  border: 2px solid #e0e0e0;
  font-size: 16px;
  transition: border-color 0.3s;
}

input[type="text"]:focus {
  outline: none;
  border-color: var(--accent);
}

.btn {
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-primary {
  background: var(--accent);
  color: white;
}

.btn-secondary {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #e5e7eb;
}

.btn-success {
  background: var(--success);
  color: white;
}

.employee-info {
  background: #f0f9ff;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  border-left: 4px solid #3b82f6;
}

.employee-info h3 {
  margin: 0 0 5px 0;
  color: #1e40af;
  font-size: 18px;
}

.employee-info .details {
  font-size: 14px;
  color: #64748b;
}

.notice {
  padding: 12px 15px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 15px;
}

.notice.info {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.notice.success {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.notice.warning {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.notice.error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  flex-wrap: wrap;
  gap: 10px;
}

.controls .info {
  font-size: 14px;
  color: var(--muted);
}

.controls .info strong {
  color: var(--accent);
  font-size: 16px;
}

.table-wrapper {
  max-height: 400px;
  overflow: auto;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  margin-bottom: 15px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

thead {
  position: sticky;
  top: 0;
  background: var(--primary);
  color: white;
  z-index: 10;
}

th, td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
}

th {
  font-weight: 600;
  font-size: 13px;
}

tbody tr:hover {
  background: #f8fafc;
}

tbody tr:nth-child(even) {
  background: #fafafa;
}

.chk-col {
  width: 40px;
  text-align: center;
}

input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.totals {
  background: #f0fdf4;
  padding: 15px;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  border: 1px solid #bbf7d0;
}

.totals .label {
  color: #166534;
}

.totals .value {
  font-size: 20px;
  color: var(--success);
}

.history {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #e5e7eb;
}

.history h4 {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 10px;
}

.history-item {
  padding: 8px 0;
  border-bottom: 1px solid #f3f4f6;
  font-size: 13px;
  color: #64748b;
}

.loading {
  text-align: center;
  padding: 30px;
  color: var(--muted);
}

.spinner {
  border: 3px solid #e5e7eb;
  border-top: 3px solid var(--accent);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 0 auto 15px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.hidden {
  display: none !important;
}

@media (max-width: 768px) {
  .search-section {
    flex-direction: column;
  }

  input[type="text"] {
    width: 100%;
  }

  .controls {
    flex-direction: column;
    align-items: stretch;
  }

  th, td {
    padding: 8px;
    font-size: 12px;
  }
}