:root {
  --primary: #0d6efd;
  --success: #198754;
  --danger: #dc3545;
  --warning: #ffc107;
  --info: #0dcaf0;
  --purple: #6f42c1;
  --orange: #fd7e14;
  --background: #f8f9fa;
  --border: #dee2e6;
  --text: #212529;
  --primary-color: #2563eb;
  --success-color: #16a34a;
  --warning-color: #eab308;
  --danger-color: #dc2626;
  --background-color: #f1f5f9;
  --card-background: #ffffff;
  --text-color: #1e293b;
  --border-radius: 8px;
  --shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, sans-serif;
}

body {
  background: var(--background);
  color: var(--text);
  line-height: 1.5;
}

.container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 24px;
}

/* Header Card */
.header-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}
.data-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin: 20px 0;
}

/* Individual Card */
.data-card {
  background: white;
  border-radius: 8px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease;
}

.data-card:hover {
  transform: translateY(-2px);
}

/* Card Icon */
.card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: #eef2ff;
  flex-shrink: 0;
}

.card-icon i {
  font-size: 16px;
  color: #0066ff;
}

/* Card Info */
.card-info {
  flex: 1;
  min-width: 0;
}

.card-info label {
  display: block;
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-info span {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--primary);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 2rem;
}

/* Notification Area */
.notification-area {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.notify-link {
  color: var(--danger);
  text-decoration: none;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
}

.notification {
  position: relative;
  cursor: pointer;
}

.badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--danger);
  color: white;
  border-radius: 50%;
  padding: 0.2rem 0.5rem;
  font-size: 0.8rem;
}

.settings {
  cursor: pointer;
  color: var(--text);
  font-size: 1.2rem;
}

.quantity-display {
  text-align: right;
}

.quantity-display span {
  color: #6c757d;
  font-size: 0.9rem;
}

.quantity-display h2 {
  color: var(--primary);
  font-size: 2rem;
  margin-top: 0.25rem;
}

/* Controls */
.controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.entries-select select {
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  outline: none;
  font-size: 0.875rem;
}

.export-buttons {
  display: flex;
  gap: 0.5rem;
}

.btn {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 4px;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: opacity 0.2s;
}

.btn:hover {
  opacity: 0.9;
}

.btn-primary {
  background: var(--primary);
}
.btn-success {
  background: var(--success);
}
.btn-danger {
  background: var(--danger);
}

.search-box {
  position: relative;
}

.search-box input {
  padding: 0.5rem 1rem 0.5rem 2.5rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  width: 250px;
  font-size: 0.875rem;
}

.search-box i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #6c757d;
}

/* Table */
.table-container {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow: auto;
  margin-bottom: 1.5rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

th,
td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

th {
  background: #f8f9fa;
  font-weight: 500;
  font-size: 0.875rem;
}

td {
  vertical-align: middle;
}

tbody tr:hover {
  background: #f8f9fa;
}

/* Status Badge */
.badge.success {
  position: static;
  background: #d1e7dd;
  color: #0f5132;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
}

/* Action Buttons */
.actions {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.icon-btn {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 4px;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
  font-size: 0.875rem;
}

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

.icon-btn.primary {
  background: var(--primary);
}
.icon-btn.success {
  background: var(--success);
}
.icon-btn.warning {
  background: var(--warning);
}
.icon-btn.danger {
  background: var(--danger);
}
.icon-btn.info {
  background: var(--info);
}
.icon-btn.purple {
  background: var(--purple);
}
.icon-btn.orange {
  background: var(--orange);
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  font-size: 0.875rem;
}

.page-buttons {
  display: flex;
  gap: 0.5rem;
}

.page-btn {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  background: white;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.875rem;
}

.page-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.page-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .header-card {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .header-right {
    flex-direction: column;
    gap: 1rem;
  }

  .notification-area {
    justify-content: center;
  }
}

@media (max-width: 992px) {
  .controls {
    flex-direction: column;
    align-items: stretch;
  }

  .search-box input {
    width: 100%;
  }

  .export-buttons {
    justify-content: stretch;
  }
}

@media (max-width: 768px) {
  .container {
    margin: 1rem auto;
  }

  .notify-link span {
    display: none;
  }

  .actions {
    justify-content: center;
  }

  .pagination {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

@media (max-width: 576px) {
  .header-card {
    padding: 1rem;
  }

  .title h1 {
    font-size: 1.25rem;
  }

  .export-buttons {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .icon-btn {
    width: 40px;
    height: 40px;
  }
}

/* Table Scroll Handling */
@media (max-width: 1400px) {
  .table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  table {
    min-width: 1200px;
  }
}

/* Print Styles */
@media print {
  .container {
    margin: 0;
    padding: 0;
  }

  .header-card,
  .controls,
  .actions,
  .pagination {
    display: none;
  }

  .table-container {
    box-shadow: none;
  }

  table {
    border: 1px solid #000;
  }

  th,
  td {
    border: 1px solid #000;
  }
}
