.table-action-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}

/* ACTION BUTTONS : Archive, Add */
.action-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: auto;
  padding: 15px 15px;
}

.action-buttons a {
  text-decoration: none;
  color: var(--primary-text-color);
}

.action-buttons .a-btn {
  text-decoration: none;
  color: var(--secondary-text-color);
  background-color: var(--primary-color);
  border-radius: var(--border-radius);
  width: fit-content;
  height: auto;
  padding: 10px 20px;
}

.action-buttons button,
.action-buttons .action-button,
.action-buttons .add-user button {
  align-items: center;
  justify-content: center;
  font-weight: 500;
  font-size: 16px;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--tran-05);
}

.action-buttons .action-button {
  font-size: 14px;
  background: var(--table-button);
  border: none;
  color: var(--primary-text-color);
}

.action-buttons .action-button:hover {
  background: var(--secondary-color);
}

.action-buttons .add-user button {
  background: var(--primary-color);
  color: white;
  border: none;
}

.action-buttons .add-user button:hover {
  background: #5a6fd8;
}

.action-buttons i {
  font-size: 18px;
}

.icon-button {
  border: none;
  border-radius: 5px;
  background: var(--danger-color);
  width: fit-content;
  height: fit-content;
  padding: 5px 10px;
  margin-top: 30px;
  font-size: 16px;
  color: var(--secondary-text-color);
}

.icon-btn {
  border: none;
  border-radius: 5px;
  background: var(--danger-color);
  width: fit-content;
  height: fit-content;
  padding: 5px 10px;
  margin-top: 5px;
  font-size: 16px;
  color: var(--secondary-text-color);
}

.add-button,
.add-button .icon {
  border: none;
  background: var(--shell-color);
  width: fit-content;
  font-size: 30px;
  color: var(--primary-text-color);
  margin-top: 20px;
}

.copy-btn {
  background-color: var(--body-color);
  color: var(--primary-text-color);
  border: none;
  padding: 4px 8px;
  margin-left: 4px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
}

/* Button System */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  padding: 10px var(--spacing-lg);
  border: none;
  border-radius: var(--border-radius);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: var(--tran-02);
  background-color: var(--primary-color);
  color: white;
}

.btn:hover {
  background: #5a6fd8;
  color: white;
  text-decoration: none;
}

.btn--primary {
  background: var(--primary-color);
  color: white;
}

.btn--secondary {
  background: var(--secondary-color);
  color: white;
}

.btn--success {
  background: var(--success-color);
  color: white;
}

.btn--danger {
  background: var(--danger-color);
  color: white;
}

.btn--warning {
  background: var(--warning-color);
  color: #212529;
}

.btn--outline {
  background: transparent;
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
}

.btn--outline:hover {
  background: var(--primary-color);
  color: white;
}

.btn--small {
  padding: 6px 12px;
  font-size: 12px;
}

.btn--large {
  padding: 12px 24px;
  font-size: 16px;
}

.btn:disabled {
  background: #6c757d;
  cursor: not-allowed;
  opacity: 0.6;
}

/* Extra small devices (phones, 600px and down) */
@media only screen and (max-width: 600px) {
  .action-buttons-table {
    justify-content: flex-start;
    margin-top: 0.5rem;
  }

  .action-buttons {
    flex-direction: column;
    gap: 8px;
    padding: 10px;
  }

  .action-buttons button,
  .action-buttons .action-button,
  .action-buttons .add-user button {
    width: 100%;
    font-size: 14px;
    padding: 8px 12px;
  }

  .btn {
    padding: 8px 12px;
    font-size: 13px;
  }

  .action-buttons-table button {
    width: 30px;
    height: 30px;
  }

  .action-buttons-table button i {
    font-size: 16px;
  }
}

/* Small devices (portrait tablets and large phones, 600px and up) */
@media only screen and (min-width: 600px) {
  .action-buttons {
    padding: 12px;
    gap: 8px;
  }

  .action-buttons button,
  .action-buttons .action-button,
  .action-buttons .add-user button {
    font-size: 14px;
    padding: 8px 14px;
  }
}

/* Medium devices (landscape tablets, 768px and up) */
@media only screen and (min-width: 768px) {
  .action-buttons {
    flex-direction: row;
    justify-content: flex-end;
    padding: 15px;
  }

  .action-buttons button,
  .action-buttons .action-button,
  .action-buttons .add-user button {
    font-size: 15px;
  }
}

/* Large devices (laptops/desktops, 992px and up) */
@media only screen and (min-width: 992px) {
  .action-buttons button span,
  .action-buttons .action-button span,
  .action-buttons .add-user button span {
    display: none;
  }

  .action-buttons button,
  .action-buttons .action-button,
  .action-buttons .add-user button {
    padding: 8px;
    width: auto;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .action-buttons i {
    margin: 0;
  }

  .con {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .action-buttons-table {
    gap: 4px;
  }
}

/* Extra large devices (large laptops and desktops, 1200px and up) */
@media only screen and (min-width: 1200px) {
  .action-buttons button span,
  .action-buttons .action-button span,
  .action-buttons .add-user button span {
    display: inline;
  }

  .action-buttons button,
  .action-buttons .action-button,
  .action-buttons .add-user button {
    padding: 8px 16px;
  }

  .action-buttons i {
    margin-right: 5px;
  }
}

/* Action buttons */
.action-buttons-table {
  display: flex;
  gap: 2px;
  justify-content: center;
}

.action-buttons-table button {
  width: 35px;
  height: 35px;
  border: none;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  color: white;
}

.action-buttons-table button i {
  font-size: 18px;
}

.action-buttons-table button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.action-buttons-table button:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.action-buttons-table .btn-edit {
  background-color: #0d6efd;
}

.action-buttons-table .btn-reset {
  background-color: #ffc107;
}

.action-buttons-table .btn-archive {
  background-color: #dc3545;
}

.action-buttons-table .btn-restore {
  background-color: #28a745;
}

.action-buttons-table .btn-view {
  background-color: #333834;
}

/* Small screens: only for table action buttons */
@media (max-width: 768px) {
  .table-action-buttons .action-buttons {
    flex-direction: row; /* horizontal layout */
    flex-wrap: wrap; /* allow wrapping if too many buttons */
    gap: 8px; /* spacing between buttons */
    justify-content: flex-start;
    padding: 10px;
  }

  /* Hide text in buttons inside table-action-buttons */
  .table-action-buttons .action-buttons button span,
  .table-action-buttons .action-buttons .action-button span,
  .table-action-buttons .action-buttons .add-user button span {
    display: none;
  }

  /* Make buttons square for icons */
  .table-action-buttons .action-buttons button,
  .table-action-buttons .action-buttons .action-button,
  .table-action-buttons .action-buttons .add-user button {
    width: 40px;
    height: 40px;
    padding: 0;
    justify-content: center;
    align-items: center;
  }
}

/* Medium and large screens: normal layout, scoped to table-action-buttons */
@media (min-width: 769px) {
  .table-action-buttons .action-buttons {
    flex-direction: row;
    gap: 10px;
    justify-content: flex-end;
    padding: 12px 15px;
  }

  .table-action-buttons .action-buttons button span,
  .table-action-buttons .action-buttons .action-button span,
  .table-action-buttons .action-buttons .add-user button span {
    display: inline;
  }

  .table-action-buttons .action-buttons button,
  .table-action-buttons .action-buttons .action-button,
  .table-action-buttons .action-buttons .add-user button {
    width: auto;
    padding: 8px 16px;
  }
}
