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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: #f8fafc;
  color: #1f2937;
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

.hidden {
  display: none !important;
}

.header {
  background: white;
  border-bottom: 1px solid #e5e7eb;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: #3b82f6;
  border-radius: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
}

.logo-text h1 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 2px;
  color: #1f2937;
}

.logo-text p {
  font-size: 14px;
  color: #6b7280;
}

.header-actions {
  display: flex;
  gap: 8px;
}

.btn {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: .2s ease;
}

.btn-primary {
  background: #3b82f6;
  color: white;
}

.btn-primary:hover {
  background: #2563eb;
}

.btn-outline {
  background: white;
  border: 1px solid #d1d5db;
  color: #374151;
}

.btn-outline:hover {
  background: #f9fafb;
}

.logout-btn {
  background: red;
  color: white;
  font-weight: bold;
}

.logout-btn:hover {
  background: darkred;
}

.btn-excel {
  background: #217346;
  color: white;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-excel:hover {
  background: #185a36;
}

.btn-pdf {
  background: #CC0000;
  color: white;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-pdf:hover {
  background: #A30000;
}

.btn .icon {
  font-size: 16px;
  line-height: 1;
}

.stats-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 20px;
}

.stat-icon.blue {
  background: #dbeafe;
  color: #2563eb;
}

.stat-icon.green {
  background: #dcfce7;
  color: #16a34a;
}

.stat-icon.purple {
  background: #f3e8ff;
  color: #9333ea;
}

.stat-content .stat-number {
  font-size: 24px;
  font-weight: 700;
  color: #1f2937;
}

.stat-content .stat-label {
  font-size: 14px;
  color: #6b7280;
}

.form-card {
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
  margin-bottom: 24px;
  overflow: hidden;
}

.form-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #e5e7eb;
}

.form-header h2 {
  font-size: 18px;
  font-weight: 600;
}

.form-content {
  padding: 20px;
}

.input-group {
  margin-bottom: 20px;
}

.input-group-and-button {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.input-group-and-button .input-group {
  margin-bottom: 0;
}

.input-group-and-button .input-wrapper input {
  width: 150px;
}

.input-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 6px;
}

.input-wrapper {
  position: relative;
}

.input-wrapper input {
  width: 150px; /* Adjusted width */
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 16px;
}

.input-wrapper input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59,130,246,.1);
  outline: none;
}

.table-card {
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
}

.table-header {
  padding: 20px;
  border-bottom: 1px solid #e5e7eb;
}

.table-subtitle {
  font-size: 14px;
  color: #6b7280;
}

.table-container {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

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

.table th {
  background: #f9fafb;
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
}

.table td {
  font-size: 14px;
}

.table tr:hover {
  background: #f9fafb;
}

.actions {
  display: flex;
  gap: 8px;
}

.actions button {
  font-size: 12px;
  padding: 4px 8px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.edit-btn {
  background: #fef3c7;
  color: #d97706;
}

.edit-btn:hover {
  background: #fde68a;
}

.delete-btn {
  background: #fee2e2;
  color: #dc2626;
}

.delete-btn:hover {
  background: #fecaca;
}

.save-btn {
  background: #d1fae5;
  color: #059669;
}

.save-btn:hover {
  background: #a7f3d0;
}

.cancel-btn {
  background: #f3f4f6;
  color: #6b7280;
}

.cancel-btn:hover {
  background: #e5e7eb;
}

.edit-input {
  width: 100%;
  padding: 4px 8px;
  font-size: 14px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
}

.empty-state {
  text-align: center;
  padding: 48px 20px;
}

.empty-icon {
  font-size: 48px;
  color: #d1d5db;
  margin-bottom: 16px;
}

.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: white;
  border: 1px solid #e5e7eb;
  box-shadow: 0 10px 25px rgba(0,0,0,.1);
  border-radius: 8px;
  min-width: 300px;
  transform: translateX(100%);
  transition: transform .3s ease-out;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
}

.toast.show {
  transform: translateX(0);
  opacity: 1;
  visibility: visible;
}

.toast-content {
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.toast-close {
  font-size: 18px;
  color: #6b7280;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  border-radius: 4px;
}

.toast-close:hover {
  background-color: rgba(0,0,0,.05);
}

.toast.success {
  background-color: #d4edda;
  color: #155724;
  border-color: #c3e6cb;
}

.toast.error {
  background-color: #f8d7da;
  color: #721c24;
  border-color: #f5c6cb;
}

.toast.info {
  background-color: #d1ecf1;
  color: #0c5460;
  border-color: #bee5eb;
}

.modal {
  display: none;
  position: fixed;
  z-index: 1001;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,.4);
  align-items: center;
  justify-content: center;
}

.modal.show {
  display: flex !important;
  z-index: 9999;
}

.modal-content {
  background-color: #fefefe;
  margin: auto;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 4px 8px 0 rgba(0,0,0,.2), 0 6px 20px 0 rgba(0,0,0,.19);
  max-width: 400px;
  text-align: center;
}

.modal-content p {
  margin-bottom: 20px;
  font-size: 18px;
  color: #333;
}

.modal-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
}

.modal-buttons .btn {
  min-width: 100px;
  padding: 10px 20px;
  font-size: 16px;
}

@media (max-width: 768px) {
  .modal-content {
    width: 90%;
    margin: 0 15px;
  }
}

.auth-container {
  max-width: 400px;
  margin: 60px auto;
  background: white;
  padding: 32px;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,.1);
}

.auth-container h2 {
  text-align: center;
  margin-bottom: 20px;
}

.auth-container form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-container input {
  padding: 12px;
  font-size: 16px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
}

.auth-container button {
  padding: 12px;
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
}

.auth-container button:hover {
  background: #2563eb;
}

.auth-container p {
  text-align: center;
  font-size: 14px;
  color: #6b7280;
}

.auth-container a {
  color: #3b82f6;
  text-decoration: none;
}

.auth-container a:hover {
  text-decoration: underline;
}

.error-message {
  color: red;
  font-size: 14px;
  text-align: center;
}

.success-message {
  color: green;
  font-size: 14px;
  text-align: center;
}

@media (max-width: 768px) {
  .container {
    padding: 0 12px;
  }
  .header-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .stats-container {
    grid-template-columns: 1fr;
  }
  .form-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .table {
    min-width: 600px;
  }
  .toast {
    left: 12px;
    right: 12px;
    min-width: auto;
  }
}

@media (max-width: 480px) {
  .btn {
    padding: 6px 12px;
    font-size: 12px;
  }
  .stat-card {
    padding: 16px;
  }
  .stat-number {
    font-size: 20px;
  }
  .form-content {
    padding: 16px;
  }
  .table-header {
    padding: 16px;
  }
}
